File tree Expand file tree Collapse file tree 10 files changed +68
-56
lines changed Expand file tree Collapse file tree 10 files changed +68
-56
lines changed Original file line number Diff line number Diff line change
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 }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
# Appwrite Web SDK
2
2
3
3
![ License] ( https://img.shields.io/github/license/appwrite/sdk-for-web.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.7 -blue.svg?style=flat-square )
5
5
[ ![ Build Status] ( https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square )] ( https://travis-ci.com/appwrite/sdk-generator )
6
6
[ ![ Twitter Account] ( https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square )] ( https://twitter.com/appwrite )
7
7
[ ![ Discord] ( https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square )] ( https://appwrite.io/discord )
@@ -33,7 +33,7 @@ import { Client, Account } from "appwrite";
33
33
To install with a CDN (content delivery network) add the following scripts to the bottom of your <body > tag, but before you use any Appwrite services:
34
34
35
35
``` html
36
- <script src =" https://cdn.jsdelivr.net/npm/appwrite@14 .0.1 " ></script >
36
+ <script src =" https://cdn.jsdelivr.net/npm/appwrite@15 .0.0 " ></script >
37
37
```
38
38
39
39
Original file line number Diff line number Diff line change 2
2
"name" : " appwrite" ,
3
3
"homepage" : " https://appwrite.io/support" ,
4
4
"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" : " 14 .0.1 " ,
5
+ "version" : " 15 .0.0 " ,
6
6
"license" : " BSD-3-Clause" ,
7
7
"main" : " dist/cjs/sdk.js" ,
8
8
"exports" : {
32
32
"tslib" : " 2.4.0" ,
33
33
"typescript" : " 4.7.2"
34
34
},
35
- "dependencies" : {
36
- "cross-fetch" : " 3.1.5" ,
37
- "isomorphic-form-data" : " 2.0.0"
38
- },
39
35
"jsdelivr" : " dist/iife/sdk.js" ,
40
36
"unpkg" : " dist/iife/sdk.js"
41
37
}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import pkg from "./package.json";
2
2
import typescript from "@rollup/plugin-typescript" ;
3
3
4
4
export default {
5
- external : Object . keys ( pkg . dependencies ) ,
5
+ external : Object . keys ( pkg . dependencies ?? { } ) ,
6
6
input : "src/index.ts" ,
7
7
plugins : [ typescript ( ) ] ,
8
8
output : [
@@ -22,10 +22,6 @@ export default {
22
22
file : pkg . jsdelivr ,
23
23
name : "Appwrite" ,
24
24
extend : true ,
25
- globals : {
26
- "cross-fetch" : "window" ,
27
- "FormData" : "FormData" ,
28
- } ,
29
25
} ,
30
26
] ,
31
27
} ;
Original file line number Diff line number Diff line change 1
- import 'isomorphic-form-data' ;
2
- import { fetch } from 'cross-fetch' ;
3
1
import { Models } from './models' ;
4
2
import { Service } from './service' ;
5
3
@@ -103,7 +101,7 @@ class Client {
103
101
'x-sdk-name' : 'Web' ,
104
102
'x-sdk-platform' : 'client' ,
105
103
'x-sdk-language' : 'web' ,
106
- 'x-sdk-version' : '14 .0.1 ' ,
104
+ 'x-sdk-version' : '15 .0.0 ' ,
107
105
'X-Appwrite-Response-Format' : '1.5.0' ,
108
106
} ;
109
107
@@ -391,7 +389,10 @@ class Client {
391
389
} ;
392
390
393
391
if ( typeof window !== 'undefined' && window . localStorage ) {
394
- headers [ 'X-Fallback-Cookies' ] = window . localStorage . getItem ( 'cookieFallback' ) ?? '' ;
392
+ const cookieFallback = window . localStorage . getItem ( 'cookieFallback' ) ;
393
+ if ( cookieFallback ) {
394
+ headers [ 'X-Fallback-Cookies' ] = cookieFallback ;
395
+ }
395
396
}
396
397
397
398
if ( method === 'GET' ) {
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ export enum CreditCard {
2
2
AmericanExpress = 'amex' ,
3
3
Argencard = 'argencard' ,
4
4
Cabal = 'cabal' ,
5
- Consosud = 'censosud ' ,
5
+ Cencosud = 'cencosud ' ,
6
6
DinersClub = 'diners' ,
7
7
Discover = 'discover' ,
8
8
Elo = 'elo' ,
Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ export enum Flag {
140
140
Palau = 'pw' ,
141
141
PapuaNewGuinea = 'pg' ,
142
142
Poland = 'pl' ,
143
+ FrenchPolynesia = 'pf' ,
143
144
NorthKorea = 'kp' ,
144
145
Portugal = 'pt' ,
145
146
Paraguay = 'py' ,
Original file line number Diff line number Diff line change @@ -502,6 +502,10 @@ export namespace Models {
502
502
* Session creation date in ISO 8601 format.
503
503
*/
504
504
$createdAt : string ;
505
+ /**
506
+ * Session update date in ISO 8601 format.
507
+ */
508
+ $updatedAt : string ;
505
509
/**
506
510
* User ID.
507
511
*/
@@ -1094,17 +1098,21 @@ export namespace Models {
1094
1098
*/
1095
1099
export type MfaFactors = {
1096
1100
/**
1097
- * TOTP
1101
+ * Can TOTP be used for MFA challenge for this account.
1098
1102
*/
1099
1103
totp : boolean ;
1100
1104
/**
1101
- * Phone
1105
+ * Can phone (SMS) be used for MFA challenge for this account.
1102
1106
*/
1103
1107
phone : boolean ;
1104
1108
/**
1105
- * Email
1109
+ * Can email be used for MFA challenge for this account.
1106
1110
*/
1107
1111
email : boolean ;
1112
+ /**
1113
+ * Can recovery code be used for MFA challenge for this account.
1114
+ */
1115
+ recoveryCode : boolean ;
1108
1116
}
1109
1117
/**
1110
1118
* Subscriber
Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ export class Account extends Service {
254
254
*
255
255
* Add an authenticator app to be used as an MFA factor. Verify the
256
256
* authenticator using the [verify
257
- * authenticator](/docs/references/cloud/client-web/account#verifyAuthenticator )
257
+ * authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator )
258
258
* method.
259
259
*
260
260
* @param {AuthenticatorType } type
@@ -279,8 +279,8 @@ export class Account extends Service {
279
279
* Verify Authenticator
280
280
*
281
281
* Verify an authenticator app after adding it using the [add
282
- * authenticator](/docs/references/cloud/client-web/account#addAuthenticator )
283
- * method.
282
+ * authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator )
283
+ * method. add
284
284
*
285
285
* @param {AuthenticatorType } type
286
286
* @param {string } otp
@@ -319,7 +319,7 @@ export class Account extends Service {
319
319
* @throws {AppwriteException }
320
320
* @returns {Promise }
321
321
*/
322
- async deleteMfaAuthenticator < Preferences extends Models . Preferences > ( type : AuthenticatorType , otp : string ) : Promise < Models . User < Preferences > > {
322
+ async deleteMfaAuthenticator ( type : AuthenticatorType , otp : string ) : Promise < { } > {
323
323
if ( typeof type === 'undefined' ) {
324
324
throw new AppwriteException ( 'Missing required parameter: "type"' ) ;
325
325
}
You can’t perform that action at this time.
0 commit comments