Skip to content

Commit 8113032

Browse files
authored
Merge pull request #88 from appwrite/dev
fix: minor bugs
2 parents 0dc59ba + 5584303 commit 8113032

File tree

18 files changed

+116
-82
lines changed

18 files changed

+116
-82
lines changed

.github/workflows/publish.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Publish to NPM
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
# Setup Node.js environment
16+
- name: Use Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '20.x'
20+
registry-url: 'https://registry.npmjs.org'
21+
22+
# Determine release tag based on the tag name
23+
- name: Determine release tag
24+
id: release_tag
25+
run: |
26+
if [[ "${{ github.ref }}" == *"-rc"* ]] || [[ "${{ github.ref }}" == *"-RC"* ]]; then
27+
echo "tag=next" >> "$GITHUB_OUTPUT"
28+
else
29+
echo "tag=latest" >> "$GITHUB_OUTPUT"
30+
fi
31+
32+
# Install dependencies (if any) and build your project (if necessary)
33+
- name: Install dependencies and build
34+
run: |
35+
npm install
36+
npm run build
37+
38+
# Publish to NPM with the appropriate tag
39+
- name: Publish
40+
run: npm publish --tag ${{ steps.release_tag.outputs.tag }}
41+
env:
42+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.travis.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Appwrite Node.js SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-node.svg?style=flat-square)
4-
![Version](https://img.shields.io/badge/api%20version-1.5.0-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.5.6-blue.svg?style=flat-square)
55
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
66
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
77
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)

docs/examples/messaging/create-msg91provider.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const messaging = new sdk.Messaging(client);
1010
const result = await messaging.createMsg91Provider(
1111
'<PROVIDER_ID>', // providerId
1212
'<NAME>', // name
13-
'+12065550100', // from (optional)
13+
'<TEMPLATE_ID>', // templateId (optional)
1414
'<SENDER_ID>', // senderId (optional)
1515
'<AUTH_KEY>', // authKey (optional)
1616
false // enabled (optional)

docs/examples/messaging/update-email.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ const result = await messaging.updateEmail(
1818
false, // html (optional)
1919
[], // cc (optional)
2020
[], // bcc (optional)
21-
'' // scheduledAt (optional)
21+
'', // scheduledAt (optional)
22+
[] // attachments (optional)
2223
);

docs/examples/messaging/update-msg91provider.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const result = await messaging.updateMsg91Provider(
1111
'<PROVIDER_ID>', // providerId
1212
'<NAME>', // name (optional)
1313
false, // enabled (optional)
14+
'<TEMPLATE_ID>', // templateId (optional)
1415
'<SENDER_ID>', // senderId (optional)
15-
'<AUTH_KEY>', // authKey (optional)
16-
'<FROM>' // from (optional)
16+
'<AUTH_KEY>' // authKey (optional)
1717
);

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "node-appwrite",
33
"homepage": "https://appwrite.io/support",
44
"description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
5-
"version": "12.1.0-rc.4",
5+
"version": "13.0.0",
66
"license": "BSD-3-Clause",
77
"main": "dist/index.js",
88
"type": "commonjs",
@@ -31,6 +31,9 @@
3131
}
3232
}
3333
},
34+
"files": [
35+
"dist"
36+
],
3437
"module": "dist/index.mjs",
3538
"types": "dist/index.d.ts",
3639
"repository": {
@@ -40,6 +43,7 @@
4043
"devDependencies": {
4144
"@types/node": "20.11.25",
4245
"tsup": "7.2.0",
46+
"esbuild-plugin-file-path-extensions": "^2.0.0",
4347
"tslib": "2.6.2",
4448
"typescript": "5.4.2"
4549
},

src/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class AppwriteException extends Error {
3333
}
3434

3535
function getUserAgent() {
36-
let ua = 'AppwriteNodeJSSDK/12.1.0-rc.4';
36+
let ua = 'AppwriteNodeJSSDK/13.0.0';
3737

3838
// `process` is a global in Node.js, but not fully available in all runtimes.
3939
const platform: string[] = [];
@@ -82,7 +82,7 @@ class Client {
8282
'x-sdk-name': 'Node.js',
8383
'x-sdk-platform': 'server',
8484
'x-sdk-language': 'nodejs',
85-
'x-sdk-version': '12.1.0-rc.4',
85+
'x-sdk-version': '13.0.0',
8686
'user-agent' : getUserAgent(),
8787
'X-Appwrite-Response-Format': '1.5.0',
8888
};

src/enums/credit-card.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export enum CreditCard {
22
AmericanExpress = 'amex',
33
Argencard = 'argencard',
44
Cabal = 'cabal',
5-
Consosud = 'censosud',
5+
Cencosud = 'cencosud',
66
DinersClub = 'diners',
77
Discover = 'discover',
88
Elo = 'elo',

src/enums/flag.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ export enum Flag {
140140
Palau = 'pw',
141141
PapuaNewGuinea = 'pg',
142142
Poland = 'pl',
143+
FrenchPolynesia = 'pf',
143144
NorthKorea = 'kp',
144145
Portugal = 'pt',
145146
Paraguay = 'py',

0 commit comments

Comments
 (0)