@appconda/nextjs 1.0.71 → 1.0.158
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/index.d.ts +1 -0
- package/dist/actions/index.js +1 -0
- package/dist/{modules/ai/node/actions.js → actions/nodes.js} +2 -2
- package/dist/getSDKForCurrentUser.d.ts +3 -5
- package/dist/getSDKForCurrentUser.js +3 -6
- package/dist/index.d.ts +6 -5
- package/dist/index.js +5 -5
- package/dist/modules/index.d.ts +0 -3
- package/dist/modules/index.js +0 -3
- package/dist/modules/waitlist/action.d.ts +0 -24
- package/dist/modules/waitlist/action.js +4 -29
- package/dist/modules/waitlist/index.d.ts +0 -1
- package/dist/modules/waitlist/index.js +0 -1
- package/dist/modules/waitlist/schema.d.ts +0 -14
- package/dist/modules/waitlist/schema.js +0 -6
- package/dist/modules/waitlist/service.d.ts +2 -4
- package/dist/modules/waitlist/service.js +0 -6
- package/dist/modules/waitlist/types.d.ts +0 -4
- package/dist/{modules/account/service.d.ts → services/account.d.ts} +56 -56
- package/dist/{modules/account/service.js → services/account.js} +14 -14
- package/dist/{modules/ai/node/service.d.ts → services/node.d.ts} +1 -1
- package/dist/{modules/ai/node/service.js → services/node.js} +1 -1
- package/dist/services/projects.d.ts +1 -1
- package/dist/services/users.d.ts +1 -1
- package/package.json +1 -1
- package/src/actions/index.ts +1 -0
- package/src/{modules/ai/node/actions.ts → actions/nodes.ts} +2 -2
- package/src/getSDKForCurrentUser.ts +3 -6
- package/src/index.ts +8 -6
- package/src/modules/index.ts +1 -4
- package/src/modules/waitlist/action.ts +4 -33
- package/src/modules/waitlist/index.ts +1 -2
- package/src/modules/waitlist/schema.ts +0 -9
- package/src/modules/waitlist/service.ts +2 -11
- package/src/modules/waitlist/types.ts +0 -5
- package/src/{modules/account/service.ts → services/account.ts} +59 -61
- package/src/{modules/ai/node/service.ts → services/node.ts} +4 -4
- package/src/services/projects.ts +1 -1
- package/src/services/users.ts +1 -1
- package/dist/getSDKForService.d.ts +0 -6
- package/dist/getSDKForService.js +0 -49
- package/dist/modules/account/actions.d.ts +0 -25
- package/dist/modules/account/actions.js +0 -17
- package/dist/modules/account/index.d.ts +0 -3
- package/dist/modules/account/index.js +0 -3
- package/dist/modules/account/schema.d.ts +0 -17
- package/dist/modules/account/schema.js +0 -7
- package/dist/modules/account/types.d.ts +0 -411
- package/dist/modules/account/types.js +0 -1
- package/dist/modules/agent/action.d.ts +0 -41
- package/dist/modules/agent/action.js +0 -51
- package/dist/modules/agent/index.d.ts +0 -4
- package/dist/modules/agent/index.js +0 -4
- package/dist/modules/agent/schema.d.ts +0 -41
- package/dist/modules/agent/schema.js +0 -17
- package/dist/modules/agent/service.d.ts +0 -11
- package/dist/modules/agent/service.js +0 -18
- package/dist/modules/agent/types.d.ts +0 -7
- package/dist/modules/agent/types.js +0 -1
- package/dist/modules/ai/index.d.ts +0 -1
- package/dist/modules/ai/index.js +0 -1
- package/dist/modules/ai/node/index.d.ts +0 -2
- package/dist/modules/ai/node/index.js +0 -2
- package/src/getSDKForService.ts +0 -52
- package/src/modules/account/actions.ts +0 -21
- package/src/modules/account/index.ts +0 -3
- package/src/modules/account/schema.ts +0 -8
- package/src/modules/account/types.ts +0 -426
- package/src/modules/agent/action.ts +0 -64
- package/src/modules/agent/index.ts +0 -4
- package/src/modules/agent/schema.ts +0 -21
- package/src/modules/agent/service.ts +0 -30
- package/src/modules/agent/types.ts +0 -9
- package/src/modules/ai/index.ts +0 -1
- package/src/modules/ai/node/index.ts +0 -2
- /package/dist/{modules/ai/node/actions.d.ts → actions/nodes.d.ts} +0 -0
- /package/dist/{modules/account/enums → enums}/authentication-factor.d.ts +0 -0
- /package/dist/{modules/account/enums → enums}/authentication-factor.js +0 -0
- /package/dist/{modules/account/enums → enums}/authenticator-type.d.ts +0 -0
- /package/dist/{modules/account/enums → enums}/authenticator-type.js +0 -0
- /package/dist/{modules/account/enums → enums}/o-auth-provider.d.ts +0 -0
- /package/dist/{modules/account/enums → enums}/o-auth-provider.js +0 -0
- /package/src/{modules/account/enums → enums}/authentication-factor.ts +0 -0
- /package/src/{modules/account/enums → enums}/authenticator-type.ts +0 -0
- /package/src/{modules/account/enums → enums}/o-auth-provider.ts +0 -0
@@ -1,8 +1,8 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
1
|
+
import { Client } from '../client';
|
2
|
+
import type { Models } from '../models';
|
3
|
+
import { AuthenticatorType } from '../enums/authenticator-type';
|
4
|
+
import { AuthenticationFactor } from '../enums/authentication-factor';
|
5
|
+
import { OAuthProvider } from '../enums/o-auth-provider';
|
6
6
|
export declare class Account {
|
7
7
|
client: Client;
|
8
8
|
constructor(client: Client);
|
@@ -14,7 +14,7 @@ export declare class Account {
|
|
14
14
|
* @throws {AppcondaException}
|
15
15
|
* @returns {Promise<Models.User<Preferences>>}
|
16
16
|
*/
|
17
|
-
get<
|
17
|
+
get<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>>;
|
18
18
|
/**
|
19
19
|
* Create account
|
20
20
|
*
|
@@ -27,7 +27,7 @@ export declare class Account {
|
|
27
27
|
* @throws {AppcondaException}
|
28
28
|
* @returns {Promise<Models.User<Preferences>>}
|
29
29
|
*/
|
30
|
-
create<
|
30
|
+
create<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
|
31
31
|
/**
|
32
32
|
* Delete account
|
33
33
|
*
|
@@ -49,7 +49,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
49
49
|
* @throws {AppcondaException}
|
50
50
|
* @returns {Promise<Models.User<Preferences>>}
|
51
51
|
*/
|
52
|
-
updateEmail<
|
52
|
+
updateEmail<Preferences extends Models.Preferences>(email: string, password: string): Promise<Models.User<Preferences>>;
|
53
53
|
/**
|
54
54
|
* List Identities
|
55
55
|
*
|
@@ -57,9 +57,9 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
57
57
|
*
|
58
58
|
* @param {string[]} queries
|
59
59
|
* @throws {AppcondaException}
|
60
|
-
* @returns {Promise<IdentityList>}
|
60
|
+
* @returns {Promise<Models.IdentityList>}
|
61
61
|
*/
|
62
|
-
listIdentities(queries?: string[]): Promise<IdentityList>;
|
62
|
+
listIdentities(queries?: string[]): Promise<Models.IdentityList>;
|
63
63
|
/**
|
64
64
|
* Delete identity
|
65
65
|
*
|
@@ -76,9 +76,9 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
76
76
|
* Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appconda server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.
|
77
77
|
*
|
78
78
|
* @throws {AppcondaException}
|
79
|
-
* @returns {Promise<Jwt>}
|
79
|
+
* @returns {Promise<Models.Jwt>}
|
80
80
|
*/
|
81
|
-
createJWT(): Promise<Jwt>;
|
81
|
+
createJWT(): Promise<Models.Jwt>;
|
82
82
|
/**
|
83
83
|
* List logs
|
84
84
|
*
|
@@ -86,9 +86,9 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
86
86
|
*
|
87
87
|
* @param {string[]} queries
|
88
88
|
* @throws {AppcondaException}
|
89
|
-
* @returns {Promise<LogList>}
|
89
|
+
* @returns {Promise<Models.LogList>}
|
90
90
|
*/
|
91
|
-
listLogs(queries?: string[]): Promise<LogList>;
|
91
|
+
listLogs(queries?: string[]): Promise<Models.LogList>;
|
92
92
|
/**
|
93
93
|
* Update MFA
|
94
94
|
*
|
@@ -98,7 +98,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
98
98
|
* @throws {AppcondaException}
|
99
99
|
* @returns {Promise<Models.User<Preferences>>}
|
100
100
|
*/
|
101
|
-
updateMFA<
|
101
|
+
updateMFA<Preferences extends Models.Preferences>(mfa: boolean): Promise<Models.User<Preferences>>;
|
102
102
|
/**
|
103
103
|
* Create Authenticator
|
104
104
|
*
|
@@ -106,9 +106,9 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
106
106
|
*
|
107
107
|
* @param {AuthenticatorType} type
|
108
108
|
* @throws {AppcondaException}
|
109
|
-
* @returns {Promise<MfaType>}
|
109
|
+
* @returns {Promise<Models.MfaType>}
|
110
110
|
*/
|
111
|
-
createMfaAuthenticator(type: AuthenticatorType): Promise<MfaType>;
|
111
|
+
createMfaAuthenticator(type: AuthenticatorType): Promise<Models.MfaType>;
|
112
112
|
/**
|
113
113
|
* Verify Authenticator
|
114
114
|
*
|
@@ -119,7 +119,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
119
119
|
* @throws {AppcondaException}
|
120
120
|
* @returns {Promise<Models.User<Preferences>>}
|
121
121
|
*/
|
122
|
-
updateMfaAuthenticator<
|
122
|
+
updateMfaAuthenticator<Preferences extends Models.Preferences>(type: AuthenticatorType, otp: string): Promise<Models.User<Preferences>>;
|
123
123
|
/**
|
124
124
|
* Delete Authenticator
|
125
125
|
*
|
@@ -137,9 +137,9 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
137
137
|
*
|
138
138
|
* @param {AuthenticationFactor} factor
|
139
139
|
* @throws {AppcondaException}
|
140
|
-
* @returns {Promise<MfaChallenge>}
|
140
|
+
* @returns {Promise<Models.MfaChallenge>}
|
141
141
|
*/
|
142
|
-
createMfaChallenge(factor: AuthenticationFactor): Promise<MfaChallenge>;
|
142
|
+
createMfaChallenge(factor: AuthenticationFactor): Promise<Models.MfaChallenge>;
|
143
143
|
/**
|
144
144
|
* Create MFA Challenge (confirmation)
|
145
145
|
*
|
@@ -157,18 +157,18 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
157
157
|
* List the factors available on the account to be used as a MFA challange.
|
158
158
|
*
|
159
159
|
* @throws {AppcondaException}
|
160
|
-
* @returns {Promise<MfaFactors>}
|
160
|
+
* @returns {Promise<Models.MfaFactors>}
|
161
161
|
*/
|
162
|
-
listMfaFactors(): Promise<MfaFactors>;
|
162
|
+
listMfaFactors(): Promise<Models.MfaFactors>;
|
163
163
|
/**
|
164
164
|
* Get MFA Recovery Codes
|
165
165
|
*
|
166
166
|
* Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.
|
167
167
|
*
|
168
168
|
* @throws {AppcondaException}
|
169
|
-
* @returns {Promise<MfaRecoveryCodes>}
|
169
|
+
* @returns {Promise<Models.MfaRecoveryCodes>}
|
170
170
|
*/
|
171
|
-
getMfaRecoveryCodes(): Promise<MfaRecoveryCodes>;
|
171
|
+
getMfaRecoveryCodes(): Promise<Models.MfaRecoveryCodes>;
|
172
172
|
/**
|
173
173
|
* Create MFA Recovery Codes
|
174
174
|
*
|
@@ -177,7 +177,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
177
177
|
* @throws {AppcondaException}
|
178
178
|
* @returns {Promise<Models.MfaRecoveryCodes>}
|
179
179
|
*/
|
180
|
-
createMfaRecoveryCodes(): Promise<MfaRecoveryCodes>;
|
180
|
+
createMfaRecoveryCodes(): Promise<Models.MfaRecoveryCodes>;
|
181
181
|
/**
|
182
182
|
* Regenerate MFA Recovery Codes
|
183
183
|
*
|
@@ -186,7 +186,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
186
186
|
* @throws {AppcondaException}
|
187
187
|
* @returns {Promise<Models.MfaRecoveryCodes>}
|
188
188
|
*/
|
189
|
-
updateMfaRecoveryCodes(): Promise<MfaRecoveryCodes>;
|
189
|
+
updateMfaRecoveryCodes(): Promise<Models.MfaRecoveryCodes>;
|
190
190
|
/**
|
191
191
|
* Update name
|
192
192
|
*
|
@@ -196,7 +196,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
196
196
|
* @throws {AppcondaException}
|
197
197
|
* @returns {Promise<Models.User<Preferences>>}
|
198
198
|
*/
|
199
|
-
updateName<
|
199
|
+
updateName<Preferences extends Models.Preferences>(name: string): Promise<Models.User<Preferences>>;
|
200
200
|
/**
|
201
201
|
* Update password
|
202
202
|
*
|
@@ -207,7 +207,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
207
207
|
* @throws {AppcondaException}
|
208
208
|
* @returns {Promise<Models.User<Preferences>>}
|
209
209
|
*/
|
210
|
-
updatePassword<
|
210
|
+
updatePassword<Preferences extends Models.Preferences>(password: string, oldPassword?: string): Promise<Models.User<Preferences>>;
|
211
211
|
/**
|
212
212
|
* Update phone
|
213
213
|
*
|
@@ -218,7 +218,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
218
218
|
* @throws {AppcondaException}
|
219
219
|
* @returns {Promise<Models.User<Preferences>>}
|
220
220
|
*/
|
221
|
-
updatePhone<
|
221
|
+
updatePhone<Preferences extends Models.Preferences>(phone: string, password: string): Promise<Models.User<Preferences>>;
|
222
222
|
/**
|
223
223
|
* Get account preferences
|
224
224
|
*
|
@@ -227,7 +227,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
227
227
|
* @throws {AppcondaException}
|
228
228
|
* @returns {Promise<Preferences>}
|
229
229
|
*/
|
230
|
-
getPrefs<
|
230
|
+
getPrefs<Preferences extends Models.Preferences>(): Promise<Preferences>;
|
231
231
|
/**
|
232
232
|
* Update preferences
|
233
233
|
*
|
@@ -237,7 +237,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
237
237
|
* @throws {AppcondaException}
|
238
238
|
* @returns {Promise<Models.User<Preferences>>}
|
239
239
|
*/
|
240
|
-
updatePrefs<
|
240
|
+
updatePrefs<Preferences extends Models.Preferences>(prefs: Partial<Preferences>): Promise<Models.User<Preferences>>;
|
241
241
|
/**
|
242
242
|
* Create password recovery
|
243
243
|
*
|
@@ -246,9 +246,9 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
246
246
|
* @param {string} email
|
247
247
|
* @param {string} url
|
248
248
|
* @throws {AppcondaException}
|
249
|
-
* @returns {Promise<Token>}
|
249
|
+
* @returns {Promise<Models.Token>}
|
250
250
|
*/
|
251
|
-
createRecovery(email: string, url: string): Promise<Token>;
|
251
|
+
createRecovery(email: string, url: string): Promise<Models.Token>;
|
252
252
|
/**
|
253
253
|
* Create password recovery (confirmation)
|
254
254
|
*
|
@@ -262,16 +262,16 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/
|
|
262
262
|
* @throws {AppcondaException}
|
263
263
|
* @returns {Promise<Models.Token>}
|
264
264
|
*/
|
265
|
-
updateRecovery(userId: string, secret: string, password: string): Promise<Token>;
|
265
|
+
updateRecovery(userId: string, secret: string, password: string): Promise<Models.Token>;
|
266
266
|
/**
|
267
267
|
* List sessions
|
268
268
|
*
|
269
269
|
* Get the list of active sessions across different devices for the currently logged in user.
|
270
270
|
*
|
271
271
|
* @throws {AppcondaException}
|
272
|
-
* @returns {Promise<SessionList>}
|
272
|
+
* @returns {Promise<Models.SessionList>}
|
273
273
|
*/
|
274
|
-
listSessions(): Promise<SessionList>;
|
274
|
+
listSessions(): Promise<Models.SessionList>;
|
275
275
|
/**
|
276
276
|
* Delete sessions
|
277
277
|
*
|
@@ -289,7 +289,7 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/
|
|
289
289
|
* @throws {AppcondaException}
|
290
290
|
* @returns {Promise<Models.Session>}
|
291
291
|
*/
|
292
|
-
createAnonymousSession(): Promise<Session>;
|
292
|
+
createAnonymousSession(): Promise<Models.Session>;
|
293
293
|
/**
|
294
294
|
* Create email password session
|
295
295
|
*
|
@@ -300,9 +300,9 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
|
|
300
300
|
* @param {string} email
|
301
301
|
* @param {string} password
|
302
302
|
* @throws {AppcondaException}
|
303
|
-
* @returns {Promise<Session>}
|
303
|
+
* @returns {Promise<Models.Session>}
|
304
304
|
*/
|
305
|
-
createEmailPasswordSession(email: string, password: string): Promise<Session>;
|
305
|
+
createEmailPasswordSession(email: string, password: string): Promise<Models.Session>;
|
306
306
|
/**
|
307
307
|
* Update magic URL session
|
308
308
|
*
|
@@ -313,7 +313,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
|
|
313
313
|
* @throws {AppcondaException}
|
314
314
|
* @returns {Promise<Models.Session>}
|
315
315
|
*/
|
316
|
-
updateMagicURLSession(userId: string, secret: string): Promise<Session>;
|
316
|
+
updateMagicURLSession(userId: string, secret: string): Promise<Models.Session>;
|
317
317
|
/**
|
318
318
|
* Create OAuth2 session
|
319
319
|
*
|
@@ -342,7 +342,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
|
|
342
342
|
* @throws {AppcondaException}
|
343
343
|
* @returns {Promise<Models.Session>}
|
344
344
|
*/
|
345
|
-
updatePhoneSession(userId: string, secret: string): Promise<Session>;
|
345
|
+
updatePhoneSession(userId: string, secret: string): Promise<Models.Session>;
|
346
346
|
/**
|
347
347
|
* Create session
|
348
348
|
*
|
@@ -353,7 +353,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
|
|
353
353
|
* @throws {AppcondaException}
|
354
354
|
* @returns {Promise<Models.Session>}
|
355
355
|
*/
|
356
|
-
createSession(userId: string, secret: string): Promise<Session>;
|
356
|
+
createSession(userId: string, secret: string): Promise<Models.Session>;
|
357
357
|
/**
|
358
358
|
* Get session
|
359
359
|
*
|
@@ -363,7 +363,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
|
|
363
363
|
* @throws {AppcondaException}
|
364
364
|
* @returns {Promise<Models.Session>}
|
365
365
|
*/
|
366
|
-
getSession(sessionId: string): Promise<Session>;
|
366
|
+
getSession(sessionId: string): Promise<Models.Session>;
|
367
367
|
/**
|
368
368
|
* Update session
|
369
369
|
*
|
@@ -373,7 +373,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
|
|
373
373
|
* @throws {AppcondaException}
|
374
374
|
* @returns {Promise<Models.Session>}
|
375
375
|
*/
|
376
|
-
updateSession(sessionId: string): Promise<Session>;
|
376
|
+
updateSession(sessionId: string): Promise<Models.Session>;
|
377
377
|
/**
|
378
378
|
* Delete session
|
379
379
|
*
|
@@ -392,7 +392,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
|
|
392
392
|
* @throws {AppcondaException}
|
393
393
|
* @returns {Promise<Models.User<Preferences>>}
|
394
394
|
*/
|
395
|
-
updateStatus<
|
395
|
+
updateStatus<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>>;
|
396
396
|
/**
|
397
397
|
* Create push target
|
398
398
|
*
|
@@ -401,9 +401,9 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
|
|
401
401
|
* @param {string} identifier
|
402
402
|
* @param {string} providerId
|
403
403
|
* @throws {AppcondaException}
|
404
|
-
* @returns {Promise<Target>}
|
404
|
+
* @returns {Promise<Models.Target>}
|
405
405
|
*/
|
406
|
-
createPushTarget(targetId: string, identifier: string, providerId?: string): Promise<Target>;
|
406
|
+
createPushTarget(targetId: string, identifier: string, providerId?: string): Promise<Models.Target>;
|
407
407
|
/**
|
408
408
|
* Update push target
|
409
409
|
*
|
@@ -411,9 +411,9 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
|
|
411
411
|
* @param {string} targetId
|
412
412
|
* @param {string} identifier
|
413
413
|
* @throws {AppcondaException}
|
414
|
-
* @returns {Promise<Target>}
|
414
|
+
* @returns {Promise<Models.Target>}
|
415
415
|
*/
|
416
|
-
updatePushTarget(targetId: string, identifier: string): Promise<Target>;
|
416
|
+
updatePushTarget(targetId: string, identifier: string): Promise<Models.Target>;
|
417
417
|
/**
|
418
418
|
* Delete push target
|
419
419
|
*
|
@@ -436,7 +436,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
|
|
436
436
|
* @throws {AppcondaException}
|
437
437
|
* @returns {Promise<Models.Token>}
|
438
438
|
*/
|
439
|
-
createEmailToken(userId: string, email: string, phrase?: boolean): Promise<Token>;
|
439
|
+
createEmailToken(userId: string, email: string, phrase?: boolean): Promise<Models.Token>;
|
440
440
|
/**
|
441
441
|
* Create magic URL token
|
442
442
|
*
|
@@ -452,7 +452,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
|
|
452
452
|
* @throws {AppcondaException}
|
453
453
|
* @returns {Promise<Models.Token>}
|
454
454
|
*/
|
455
|
-
createMagicURLToken(userId: string, email: string, url?: string, phrase?: boolean): Promise<Token>;
|
455
|
+
createMagicURLToken(userId: string, email: string, url?: string, phrase?: boolean): Promise<Models.Token>;
|
456
456
|
/**
|
457
457
|
* Create OAuth2 token
|
458
458
|
*
|
@@ -482,7 +482,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
|
|
482
482
|
* @throws {AppcondaException}
|
483
483
|
* @returns {Promise<Models.Token>}
|
484
484
|
*/
|
485
|
-
createPhoneToken(userId: string, phone: string): Promise<Token>;
|
485
|
+
createPhoneToken(userId: string, phone: string): Promise<Models.Token>;
|
486
486
|
/**
|
487
487
|
* Create email verification
|
488
488
|
*
|
@@ -495,7 +495,7 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/
|
|
495
495
|
* @throws {AppcondaException}
|
496
496
|
* @returns {Promise<Models.Token>}
|
497
497
|
*/
|
498
|
-
createVerification(url: string): Promise<Token>;
|
498
|
+
createVerification(url: string): Promise<Models.Token>;
|
499
499
|
/**
|
500
500
|
* Create email verification (confirmation)
|
501
501
|
*
|
@@ -506,7 +506,7 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/
|
|
506
506
|
* @throws {AppcondaException}
|
507
507
|
* @returns {Promise<Models.Token>}
|
508
508
|
*/
|
509
|
-
updateVerification(userId: string, secret: string): Promise<Token>;
|
509
|
+
updateVerification(userId: string, secret: string): Promise<Models.Token>;
|
510
510
|
/**
|
511
511
|
* Create phone verification
|
512
512
|
*
|
@@ -515,7 +515,7 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/
|
|
515
515
|
* @throws {AppcondaException}
|
516
516
|
* @returns {Promise<Models.Token>}
|
517
517
|
*/
|
518
|
-
createPhoneVerification(): Promise<Token>;
|
518
|
+
createPhoneVerification(): Promise<Models.Token>;
|
519
519
|
/**
|
520
520
|
* Update phone verification (confirmation)
|
521
521
|
*
|
@@ -526,5 +526,5 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/
|
|
526
526
|
* @throws {AppcondaException}
|
527
527
|
* @returns {Promise<Models.Token>}
|
528
528
|
*/
|
529
|
-
updatePhoneVerification(userId: string, secret: string): Promise<Token>;
|
529
|
+
updatePhoneVerification(userId: string, secret: string): Promise<Models.Token>;
|
530
530
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { AppcondaException } from '
|
2
|
-
import { Service } from '
|
1
|
+
import { AppcondaException } from '../client';
|
2
|
+
import { Service } from '../service';
|
3
3
|
export class Account {
|
4
4
|
constructor(client) {
|
5
5
|
this.client = client;
|
@@ -120,7 +120,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
120
120
|
*
|
121
121
|
* @param {string[]} queries
|
122
122
|
* @throws {AppcondaException}
|
123
|
-
* @returns {Promise<IdentityList>}
|
123
|
+
* @returns {Promise<Models.IdentityList>}
|
124
124
|
*/
|
125
125
|
async listIdentities(queries) {
|
126
126
|
const apiPath = '/account/identities';
|
@@ -161,7 +161,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
161
161
|
* Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appconda server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.
|
162
162
|
*
|
163
163
|
* @throws {AppcondaException}
|
164
|
-
* @returns {Promise<Jwt>}
|
164
|
+
* @returns {Promise<Models.Jwt>}
|
165
165
|
*/
|
166
166
|
async createJWT() {
|
167
167
|
const apiPath = '/account/jwts';
|
@@ -179,7 +179,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
179
179
|
*
|
180
180
|
* @param {string[]} queries
|
181
181
|
* @throws {AppcondaException}
|
182
|
-
* @returns {Promise<LogList>}
|
182
|
+
* @returns {Promise<Models.LogList>}
|
183
183
|
*/
|
184
184
|
async listLogs(queries) {
|
185
185
|
const apiPath = '/account/logs';
|
@@ -224,7 +224,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
224
224
|
*
|
225
225
|
* @param {AuthenticatorType} type
|
226
226
|
* @throws {AppcondaException}
|
227
|
-
* @returns {Promise<MfaType>}
|
227
|
+
* @returns {Promise<Models.MfaType>}
|
228
228
|
*/
|
229
229
|
async createMfaAuthenticator(type) {
|
230
230
|
if (typeof type === 'undefined') {
|
@@ -294,7 +294,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
294
294
|
*
|
295
295
|
* @param {AuthenticationFactor} factor
|
296
296
|
* @throws {AppcondaException}
|
297
|
-
* @returns {Promise<MfaChallenge>}
|
297
|
+
* @returns {Promise<Models.MfaChallenge>}
|
298
298
|
*/
|
299
299
|
async createMfaChallenge(factor) {
|
300
300
|
if (typeof factor === 'undefined') {
|
@@ -348,7 +348,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
348
348
|
* List the factors available on the account to be used as a MFA challange.
|
349
349
|
*
|
350
350
|
* @throws {AppcondaException}
|
351
|
-
* @returns {Promise<MfaFactors>}
|
351
|
+
* @returns {Promise<Models.MfaFactors>}
|
352
352
|
*/
|
353
353
|
async listMfaFactors() {
|
354
354
|
const apiPath = '/account/mfa/factors';
|
@@ -365,7 +365,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
365
365
|
* Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.
|
366
366
|
*
|
367
367
|
* @throws {AppcondaException}
|
368
|
-
* @returns {Promise<MfaRecoveryCodes>}
|
368
|
+
* @returns {Promise<Models.MfaRecoveryCodes>}
|
369
369
|
*/
|
370
370
|
async getMfaRecoveryCodes() {
|
371
371
|
const apiPath = '/account/mfa/recovery-codes';
|
@@ -542,7 +542,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
|
|
542
542
|
* @param {string} email
|
543
543
|
* @param {string} url
|
544
544
|
* @throws {AppcondaException}
|
545
|
-
* @returns {Promise<Token>}
|
545
|
+
* @returns {Promise<Models.Token>}
|
546
546
|
*/
|
547
547
|
async createRecovery(email, url) {
|
548
548
|
if (typeof email === 'undefined') {
|
@@ -611,7 +611,7 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/
|
|
611
611
|
* Get the list of active sessions across different devices for the currently logged in user.
|
612
612
|
*
|
613
613
|
* @throws {AppcondaException}
|
614
|
-
* @returns {Promise<SessionList>}
|
614
|
+
* @returns {Promise<Models.SessionList>}
|
615
615
|
*/
|
616
616
|
async listSessions() {
|
617
617
|
const apiPath = '/account/sessions';
|
@@ -666,7 +666,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
|
|
666
666
|
* @param {string} email
|
667
667
|
* @param {string} password
|
668
668
|
* @throws {AppcondaException}
|
669
|
-
* @returns {Promise<Session>}
|
669
|
+
* @returns {Promise<Models.Session>}
|
670
670
|
*/
|
671
671
|
async createEmailPasswordSession(email, password) {
|
672
672
|
if (typeof email === 'undefined') {
|
@@ -918,7 +918,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
|
|
918
918
|
* @param {string} identifier
|
919
919
|
* @param {string} providerId
|
920
920
|
* @throws {AppcondaException}
|
921
|
-
* @returns {Promise<Target>}
|
921
|
+
* @returns {Promise<Models.Target>}
|
922
922
|
*/
|
923
923
|
async createPushTarget(targetId, identifier, providerId) {
|
924
924
|
if (typeof targetId === 'undefined') {
|
@@ -951,7 +951,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
|
|
951
951
|
* @param {string} targetId
|
952
952
|
* @param {string} identifier
|
953
953
|
* @throws {AppcondaException}
|
954
|
-
* @returns {Promise<Target>}
|
954
|
+
* @returns {Promise<Models.Target>}
|
955
955
|
*/
|
956
956
|
async updatePushTarget(targetId, identifier) {
|
957
957
|
if (typeof targetId === 'undefined') {
|
@@ -4,7 +4,7 @@ import { ApiService } from "../enums/api-service";
|
|
4
4
|
import { AuthMethod } from "../enums/auth-method";
|
5
5
|
import { EmailTemplateLocale } from "../enums/email-template-locale";
|
6
6
|
import { EmailTemplateType } from "../enums/email-template-type";
|
7
|
-
import { OAuthProvider } from "../
|
7
|
+
import { OAuthProvider } from "../enums/o-auth-provider";
|
8
8
|
import { PlatformType } from "../enums/platform-type";
|
9
9
|
import { Region } from "../enums/region";
|
10
10
|
import { SMTPSecure } from "../enums/s-m-t-p-secure";
|
package/dist/services/users.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Client } from '../client';
|
2
2
|
import type { Models } from '../models';
|
3
3
|
import { PasswordHash } from '../enums/password-hash';
|
4
|
-
import { AuthenticatorType } from '../
|
4
|
+
import { AuthenticatorType } from '../enums/authenticator-type';
|
5
5
|
import { MessagingProviderType } from '../enums/messaging-provider-type';
|
6
6
|
export declare class Users {
|
7
7
|
client: Client;
|
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "@appconda/nextjs",
|
3
3
|
"homepage": "https://appconda.io/support",
|
4
4
|
"description": "Appconda 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": "1.0.
|
5
|
+
"version": "1.0.158",
|
6
6
|
"license": "BSD-3-Clause",
|
7
7
|
"main": "dist/index.js",
|
8
8
|
"types": "dist/index.d.ts",
|
package/src/actions/index.ts
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
export * from './nodes';
|
@@ -1,8 +1,8 @@
|
|
1
1
|
'use server';
|
2
2
|
|
3
|
-
import { getSDKForCurrentUser } from "@appconda/nextjs";
|
4
3
|
import { z } from "zod";
|
5
|
-
import { actionClient } from "
|
4
|
+
import { actionClient } from "./actionClient";
|
5
|
+
import { getSDKForCurrentUser } from '../getSDKForCurrentUser';
|
6
6
|
|
7
7
|
export const getAllNodesAction = actionClient
|
8
8
|
// .schema(listModelsSchema)
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { cookies } from "next/headers";
|
2
2
|
import { getAppcondaClient } from "./getAppcondaClient";
|
3
|
+
import { Account } from "./services/account";
|
3
4
|
import { Community } from "./services/community";
|
4
5
|
import { Configuration } from "./services/configuration";
|
5
6
|
import { Databases } from "./services/databases";
|
@@ -12,11 +13,9 @@ import { Teams } from "./services/teams";
|
|
12
13
|
import { Tenant } from "./services/tenant";
|
13
14
|
import { TenantSubscription } from "./services/tenant-subscription";
|
14
15
|
import { Users } from "./services/users";
|
16
|
+
import { Node } from "./services/node";
|
15
17
|
import { Permissions } from "./services/permissions";
|
16
18
|
import { WaitlistService } from "./modules/waitlist/service";
|
17
|
-
import { Account } from "./modules/account/service";
|
18
|
-
import { Node } from "./modules/ai/node/service";
|
19
|
-
import { AgentService } from "./modules/agent/service";
|
20
19
|
|
21
20
|
export async function getSDKForCurrentUser() {
|
22
21
|
const adminClient = await getAppcondaClient();
|
@@ -55,7 +54,6 @@ export async function getSDKForCurrentUser() {
|
|
55
54
|
|
56
55
|
const node = new Node(adminClient);
|
57
56
|
const waitlist = new WaitlistService(adminClient);
|
58
|
-
const agent = new AgentService(adminClient);
|
59
57
|
|
60
58
|
return {
|
61
59
|
currentUser,
|
@@ -75,7 +73,6 @@ export async function getSDKForCurrentUser() {
|
|
75
73
|
configuration,
|
76
74
|
// acl,
|
77
75
|
node,
|
78
|
-
waitlist
|
79
|
-
agent
|
76
|
+
waitlist
|
80
77
|
}
|
81
78
|
}
|
package/src/index.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
export { Client, Query, AppcondaException } from './client';
|
2
|
-
export { Account } from './
|
2
|
+
export { Account } from './services/account';
|
3
3
|
export { Avatars } from './services/avatars';
|
4
4
|
export { Databases } from './services/databases';
|
5
5
|
export { Applets } from './services/applets';
|
@@ -16,9 +16,9 @@ export type { QueryTypes, QueryTypesList } from './query';
|
|
16
16
|
export { Permission } from './permission';
|
17
17
|
export { Role } from './role';
|
18
18
|
export { ID } from './id';
|
19
|
-
export { AuthenticatorType } from './
|
20
|
-
export { AuthenticationFactor } from './
|
21
|
-
export { OAuthProvider } from './
|
19
|
+
export { AuthenticatorType } from './enums/authenticator-type';
|
20
|
+
export { AuthenticationFactor } from './enums/authentication-factor';
|
21
|
+
export { OAuthProvider } from './enums/o-auth-provider';
|
22
22
|
export { Browser } from './enums/browser';
|
23
23
|
export { CreditCard } from './enums/credit-card';
|
24
24
|
export { Flag } from './enums/flag';
|
@@ -35,6 +35,8 @@ export { ImageFormat } from './enums/image-format';
|
|
35
35
|
export { PasswordHash } from './enums/password-hash';
|
36
36
|
export { MessagingProviderType } from './enums/messaging-provider-type';
|
37
37
|
export { getSDKForCurrentUser } from './getSDKForCurrentUser';
|
38
|
-
export
|
38
|
+
export * from './actions';
|
39
39
|
export * from './modules';
|
40
|
-
export type { SafeActionFn } from 'next-safe-action';
|
40
|
+
export type { SafeActionFn } from 'next-safe-action';
|
41
|
+
|
42
|
+
export type { getAppcondaClient } from './getAppcondaClient';
|
package/src/modules/index.ts
CHANGED