@appconda/nextjs 1.0.158 → 1.0.160

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.
Files changed (88) hide show
  1. package/dist/actions/index.d.ts +0 -1
  2. package/dist/actions/index.js +0 -1
  3. package/dist/getSDKForCurrentUser.d.ts +7 -3
  4. package/dist/getSDKForCurrentUser.js +9 -3
  5. package/dist/getSDKForService.d.ts +6 -0
  6. package/dist/getSDKForService.js +49 -0
  7. package/dist/index.d.ts +6 -6
  8. package/dist/index.js +6 -5
  9. package/dist/modules/account/actions.d.ts +25 -0
  10. package/dist/modules/account/actions.js +17 -0
  11. package/dist/modules/account/enums/authentication-factor.d.ts +6 -0
  12. package/dist/modules/account/enums/authentication-factor.js +7 -0
  13. package/dist/modules/account/enums/authenticator-type.d.ts +3 -0
  14. package/dist/modules/account/enums/authenticator-type.js +4 -0
  15. package/dist/modules/account/enums/o-auth-provider.d.ts +41 -0
  16. package/dist/modules/account/enums/o-auth-provider.js +42 -0
  17. package/dist/modules/account/index.d.ts +3 -0
  18. package/dist/modules/account/index.js +3 -0
  19. package/dist/modules/account/schema.d.ts +17 -0
  20. package/dist/modules/account/schema.js +7 -0
  21. package/dist/modules/account/service.d.ts +530 -0
  22. package/dist/modules/account/service.js +1259 -0
  23. package/dist/modules/account/types.d.ts +411 -0
  24. package/dist/modules/account/types.js +1 -0
  25. package/dist/modules/agent/action.d.ts +53 -0
  26. package/dist/modules/agent/action.js +63 -0
  27. package/dist/modules/agent/index.d.ts +4 -0
  28. package/dist/modules/agent/index.js +4 -0
  29. package/dist/modules/agent/schema.d.ts +48 -0
  30. package/dist/modules/agent/schema.js +20 -0
  31. package/dist/modules/agent/service.d.ts +12 -0
  32. package/dist/modules/agent/service.js +21 -0
  33. package/dist/modules/agent/types.d.ts +11 -0
  34. package/dist/modules/agent/types.js +1 -0
  35. package/dist/modules/ai/index.d.ts +1 -0
  36. package/dist/modules/ai/index.js +1 -0
  37. package/dist/modules/ai/node/actions.d.ts +4 -0
  38. package/dist/modules/ai/node/actions.js +15 -0
  39. package/dist/modules/ai/node/index.d.ts +2 -0
  40. package/dist/modules/ai/node/index.js +2 -0
  41. package/dist/modules/ai/node/service.d.ts +5 -0
  42. package/dist/modules/ai/node/service.js +11 -0
  43. package/dist/modules/index.d.ts +3 -0
  44. package/dist/modules/index.js +3 -0
  45. package/dist/modules/waitlist/action.d.ts +24 -0
  46. package/dist/modules/waitlist/action.js +29 -4
  47. package/dist/modules/waitlist/index.d.ts +1 -0
  48. package/dist/modules/waitlist/index.js +1 -0
  49. package/dist/modules/waitlist/schema.d.ts +14 -0
  50. package/dist/modules/waitlist/schema.js +6 -0
  51. package/dist/modules/waitlist/service.d.ts +4 -2
  52. package/dist/modules/waitlist/service.js +6 -0
  53. package/dist/modules/waitlist/types.d.ts +4 -0
  54. package/dist/services/chat-flow.d.ts +7 -0
  55. package/dist/services/chat-flow.js +25 -0
  56. package/dist/services/projects.d.ts +1 -1
  57. package/dist/services/users.d.ts +1 -1
  58. package/package.json +1 -1
  59. package/src/actions/index.ts +0 -1
  60. package/src/getSDKForCurrentUser.ts +9 -3
  61. package/src/getSDKForService.ts +52 -0
  62. package/src/index.ts +6 -6
  63. package/src/modules/account/actions.ts +21 -0
  64. package/src/modules/account/index.ts +3 -0
  65. package/src/modules/account/schema.ts +8 -0
  66. package/src/{services/account.ts → modules/account/service.ts} +61 -59
  67. package/src/modules/account/types.ts +426 -0
  68. package/src/modules/agent/action.ts +77 -0
  69. package/src/modules/agent/index.ts +4 -0
  70. package/src/modules/agent/schema.ts +25 -0
  71. package/src/modules/agent/service.ts +34 -0
  72. package/src/modules/agent/types.ts +15 -0
  73. package/src/modules/ai/index.ts +1 -0
  74. package/src/{actions/nodes.ts → modules/ai/node/actions.ts} +2 -2
  75. package/src/modules/ai/node/index.ts +2 -0
  76. package/src/{services/node.ts → modules/ai/node/service.ts} +4 -4
  77. package/src/modules/index.ts +4 -1
  78. package/src/modules/waitlist/action.ts +33 -4
  79. package/src/modules/waitlist/index.ts +2 -1
  80. package/src/modules/waitlist/schema.ts +9 -0
  81. package/src/modules/waitlist/service.ts +11 -2
  82. package/src/modules/waitlist/types.ts +5 -0
  83. package/src/services/chat-flow.ts +32 -0
  84. package/src/services/projects.ts +1 -1
  85. package/src/services/users.ts +1 -1
  86. /package/src/{enums → modules/account/enums}/authentication-factor.ts +0 -0
  87. /package/src/{enums → modules/account/enums}/authenticator-type.ts +0 -0
  88. /package/src/{enums → modules/account/enums}/o-auth-provider.ts +0 -0
@@ -1,10 +1,12 @@
1
1
 
2
- import { AppcondaException, Client, type Payload, UploadProgress } from '../client';
3
- import type { Models } from '../models';
4
- import { AuthenticatorType } from '../enums/authenticator-type';
5
- import { AuthenticationFactor } from '../enums/authentication-factor';
6
- import { OAuthProvider } from '../enums/o-auth-provider';
7
- import { Service } from '../service';
2
+
3
+ import { AuthenticatorType } from './enums/authenticator-type';
4
+ import { AuthenticationFactor } from './enums/authentication-factor';
5
+ import { OAuthProvider } from './enums/o-auth-provider';
6
+ import { AppcondaException, Client, Payload } from '../../client';
7
+ import { User, Preferences, IdentityList, Jwt, LogList, MfaType, MfaChallenge, MfaFactors, MfaRecoveryCodes, Token, SessionList, Session, Target } from './types';
8
+ import { Service } from '../../service';
9
+
8
10
 
9
11
  export class Account {
10
12
  client: Client;
@@ -21,7 +23,7 @@ export class Account {
21
23
  * @throws {AppcondaException}
22
24
  * @returns {Promise<Models.User<Preferences>>}
23
25
  */
24
- async get<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>> {
26
+ async get<T extends Preferences>(): Promise<User<T>> {
25
27
  const apiPath = '/account';
26
28
  const payload: Payload = {};
27
29
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -50,7 +52,7 @@ export class Account {
50
52
  * @throws {AppcondaException}
51
53
  * @returns {Promise<Models.User<Preferences>>}
52
54
  */
53
- async create<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>> {
55
+ async create<T extends Preferences>(userId: string, email: string, password: string, name?: string): Promise<User<T>> {
54
56
  if (typeof userId === 'undefined') {
55
57
  throw new AppcondaException('Missing required parameter: "userId"');
56
58
  }
@@ -113,7 +115,7 @@ export class Account {
113
115
  payload
114
116
  );
115
117
  }
116
-
118
+
117
119
  /**
118
120
  * Update email
119
121
  *
@@ -126,7 +128,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
126
128
  * @throws {AppcondaException}
127
129
  * @returns {Promise<Models.User<Preferences>>}
128
130
  */
129
- async updateEmail<Preferences extends Models.Preferences>(email: string, password: string): Promise<Models.User<Preferences>> {
131
+ async updateEmail<T extends Preferences>(email: string, password: string): Promise<User<T>> {
130
132
  if (typeof email === 'undefined') {
131
133
  throw new AppcondaException('Missing required parameter: "email"');
132
134
  }
@@ -162,9 +164,9 @@ This endpoint can also be used to convert an anonymous account to a normal one,
162
164
  *
163
165
  * @param {string[]} queries
164
166
  * @throws {AppcondaException}
165
- * @returns {Promise<Models.IdentityList>}
167
+ * @returns {Promise<IdentityList>}
166
168
  */
167
- async listIdentities(queries?: string[]): Promise<Models.IdentityList> {
169
+ async listIdentities(queries?: string[]): Promise<IdentityList> {
168
170
  const apiPath = '/account/identities';
169
171
  const payload: Payload = {};
170
172
  if (typeof queries !== 'undefined') {
@@ -219,9 +221,9 @@ This endpoint can also be used to convert an anonymous account to a normal one,
219
221
  * 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.
220
222
  *
221
223
  * @throws {AppcondaException}
222
- * @returns {Promise<Models.Jwt>}
224
+ * @returns {Promise<Jwt>}
223
225
  */
224
- async createJWT(): Promise<Models.Jwt> {
226
+ async createJWT(): Promise<Jwt> {
225
227
  const apiPath = '/account/jwts';
226
228
  const payload: Payload = {};
227
229
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -245,9 +247,9 @@ This endpoint can also be used to convert an anonymous account to a normal one,
245
247
  *
246
248
  * @param {string[]} queries
247
249
  * @throws {AppcondaException}
248
- * @returns {Promise<Models.LogList>}
250
+ * @returns {Promise<LogList>}
249
251
  */
250
- async listLogs(queries?: string[]): Promise<Models.LogList> {
252
+ async listLogs(queries?: string[]): Promise<LogList> {
251
253
  const apiPath = '/account/logs';
252
254
  const payload: Payload = {};
253
255
  if (typeof queries !== 'undefined') {
@@ -276,7 +278,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
276
278
  * @throws {AppcondaException}
277
279
  * @returns {Promise<Models.User<Preferences>>}
278
280
  */
279
- async updateMFA<Preferences extends Models.Preferences>(mfa: boolean): Promise<Models.User<Preferences>> {
281
+ async updateMFA<T extends Preferences>(mfa: boolean): Promise<User<T>> {
280
282
  if (typeof mfa === 'undefined') {
281
283
  throw new AppcondaException('Missing required parameter: "mfa"');
282
284
  }
@@ -306,9 +308,9 @@ This endpoint can also be used to convert an anonymous account to a normal one,
306
308
  *
307
309
  * @param {AuthenticatorType} type
308
310
  * @throws {AppcondaException}
309
- * @returns {Promise<Models.MfaType>}
311
+ * @returns {Promise<MfaType>}
310
312
  */
311
- async createMfaAuthenticator(type: AuthenticatorType): Promise<Models.MfaType> {
313
+ async createMfaAuthenticator(type: AuthenticatorType): Promise<MfaType> {
312
314
  if (typeof type === 'undefined') {
313
315
  throw new AppcondaException('Missing required parameter: "type"');
314
316
  }
@@ -338,7 +340,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
338
340
  * @throws {AppcondaException}
339
341
  * @returns {Promise<Models.User<Preferences>>}
340
342
  */
341
- async updateMfaAuthenticator<Preferences extends Models.Preferences>(type: AuthenticatorType, otp: string): Promise<Models.User<Preferences>> {
343
+ async updateMfaAuthenticator<T extends Preferences>(type: AuthenticatorType, otp: string): Promise<User<T>> {
342
344
  if (typeof type === 'undefined') {
343
345
  throw new AppcondaException('Missing required parameter: "type"');
344
346
  }
@@ -400,9 +402,9 @@ This endpoint can also be used to convert an anonymous account to a normal one,
400
402
  *
401
403
  * @param {AuthenticationFactor} factor
402
404
  * @throws {AppcondaException}
403
- * @returns {Promise<Models.MfaChallenge>}
405
+ * @returns {Promise<MfaChallenge>}
404
406
  */
405
- async createMfaChallenge(factor: AuthenticationFactor): Promise<Models.MfaChallenge> {
407
+ async createMfaChallenge(factor: AuthenticationFactor): Promise<MfaChallenge> {
406
408
  if (typeof factor === 'undefined') {
407
409
  throw new AppcondaException('Missing required parameter: "factor"');
408
410
  }
@@ -470,9 +472,9 @@ This endpoint can also be used to convert an anonymous account to a normal one,
470
472
  * List the factors available on the account to be used as a MFA challange.
471
473
  *
472
474
  * @throws {AppcondaException}
473
- * @returns {Promise<Models.MfaFactors>}
475
+ * @returns {Promise<MfaFactors>}
474
476
  */
475
- async listMfaFactors(): Promise<Models.MfaFactors> {
477
+ async listMfaFactors(): Promise<MfaFactors> {
476
478
  const apiPath = '/account/mfa/factors';
477
479
  const payload: Payload = {};
478
480
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -495,9 +497,9 @@ This endpoint can also be used to convert an anonymous account to a normal one,
495
497
  * 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.
496
498
  *
497
499
  * @throws {AppcondaException}
498
- * @returns {Promise<Models.MfaRecoveryCodes>}
500
+ * @returns {Promise<MfaRecoveryCodes>}
499
501
  */
500
- async getMfaRecoveryCodes(): Promise<Models.MfaRecoveryCodes> {
502
+ async getMfaRecoveryCodes(): Promise<MfaRecoveryCodes> {
501
503
  const apiPath = '/account/mfa/recovery-codes';
502
504
  const payload: Payload = {};
503
505
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -522,7 +524,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
522
524
  * @throws {AppcondaException}
523
525
  * @returns {Promise<Models.MfaRecoveryCodes>}
524
526
  */
525
- async createMfaRecoveryCodes(): Promise<Models.MfaRecoveryCodes> {
527
+ async createMfaRecoveryCodes(): Promise<MfaRecoveryCodes> {
526
528
  const apiPath = '/account/mfa/recovery-codes';
527
529
  const payload: Payload = {};
528
530
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -548,7 +550,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
548
550
  * @throws {AppcondaException}
549
551
  * @returns {Promise<Models.MfaRecoveryCodes>}
550
552
  */
551
- async updateMfaRecoveryCodes(): Promise<Models.MfaRecoveryCodes> {
553
+ async updateMfaRecoveryCodes(): Promise<MfaRecoveryCodes> {
552
554
  const apiPath = '/account/mfa/recovery-codes';
553
555
  const payload: Payload = {};
554
556
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -574,7 +576,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
574
576
  * @throws {AppcondaException}
575
577
  * @returns {Promise<Models.User<Preferences>>}
576
578
  */
577
- async updateName<Preferences extends Models.Preferences>(name: string): Promise<Models.User<Preferences>> {
579
+ async updateName<T extends Preferences>(name: string): Promise<User<T>> {
578
580
  if (typeof name === 'undefined') {
579
581
  throw new AppcondaException('Missing required parameter: "name"');
580
582
  }
@@ -607,7 +609,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
607
609
  * @throws {AppcondaException}
608
610
  * @returns {Promise<Models.User<Preferences>>}
609
611
  */
610
- async updatePassword<Preferences extends Models.Preferences>(password: string, oldPassword?: string): Promise<Models.User<Preferences>> {
612
+ async updatePassword<T extends Preferences>(password: string, oldPassword?: string): Promise<User<T>> {
611
613
  if (typeof password === 'undefined') {
612
614
  throw new AppcondaException('Missing required parameter: "password"');
613
615
  }
@@ -643,7 +645,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
643
645
  * @throws {AppcondaException}
644
646
  * @returns {Promise<Models.User<Preferences>>}
645
647
  */
646
- async updatePhone<Preferences extends Models.Preferences>(phone: string, password: string): Promise<Models.User<Preferences>> {
648
+ async updatePhone<T extends Preferences>(phone: string, password: string): Promise<User<T>> {
647
649
  if (typeof phone === 'undefined') {
648
650
  throw new AppcondaException('Missing required parameter: "phone"');
649
651
  }
@@ -680,7 +682,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
680
682
  * @throws {AppcondaException}
681
683
  * @returns {Promise<Preferences>}
682
684
  */
683
- async getPrefs<Preferences extends Models.Preferences>(): Promise<Preferences> {
685
+ async getPrefs<T extends Preferences>(): Promise<T> {
684
686
  const apiPath = '/account/prefs';
685
687
  const payload: Payload = {};
686
688
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -706,7 +708,7 @@ This endpoint can also be used to convert an anonymous account to a normal one,
706
708
  * @throws {AppcondaException}
707
709
  * @returns {Promise<Models.User<Preferences>>}
708
710
  */
709
- async updatePrefs<Preferences extends Models.Preferences>(prefs: Partial<Preferences>): Promise<Models.User<Preferences>> {
711
+ async updatePrefs<T extends Preferences>(prefs: Partial<Preferences>): Promise<User<T>> {
710
712
  if (typeof prefs === 'undefined') {
711
713
  throw new AppcondaException('Missing required parameter: "prefs"');
712
714
  }
@@ -737,9 +739,9 @@ This endpoint can also be used to convert an anonymous account to a normal one,
737
739
  * @param {string} email
738
740
  * @param {string} url
739
741
  * @throws {AppcondaException}
740
- * @returns {Promise<Models.Token>}
742
+ * @returns {Promise<Token>}
741
743
  */
742
- async createRecovery(email: string, url: string): Promise<Models.Token> {
744
+ async createRecovery(email: string, url: string): Promise<Token> {
743
745
  if (typeof email === 'undefined') {
744
746
  throw new AppcondaException('Missing required parameter: "email"');
745
747
  }
@@ -781,7 +783,7 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/
781
783
  * @throws {AppcondaException}
782
784
  * @returns {Promise<Models.Token>}
783
785
  */
784
- async updateRecovery(userId: string, secret: string, password: string): Promise<Models.Token> {
786
+ async updateRecovery(userId: string, secret: string, password: string): Promise<Token> {
785
787
  if (typeof userId === 'undefined') {
786
788
  throw new AppcondaException('Missing required parameter: "userId"');
787
789
  }
@@ -822,9 +824,9 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/
822
824
  * Get the list of active sessions across different devices for the currently logged in user.
823
825
  *
824
826
  * @throws {AppcondaException}
825
- * @returns {Promise<Models.SessionList>}
827
+ * @returns {Promise<SessionList>}
826
828
  */
827
- async listSessions(): Promise<Models.SessionList> {
829
+ async listSessions(): Promise<SessionList> {
828
830
  const apiPath = '/account/sessions';
829
831
  const payload: Payload = {};
830
832
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -874,7 +876,7 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/
874
876
  * @throws {AppcondaException}
875
877
  * @returns {Promise<Models.Session>}
876
878
  */
877
- async createAnonymousSession(): Promise<Models.Session> {
879
+ async createAnonymousSession(): Promise<Session> {
878
880
  const apiPath = '/account/sessions/anonymous';
879
881
  const payload: Payload = {};
880
882
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -901,9 +903,9 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
901
903
  * @param {string} email
902
904
  * @param {string} password
903
905
  * @throws {AppcondaException}
904
- * @returns {Promise<Models.Session>}
906
+ * @returns {Promise<Session>}
905
907
  */
906
- async createEmailPasswordSession(email: string, password: string): Promise<Models.Session> {
908
+ async createEmailPasswordSession(email: string, password: string): Promise<Session> {
907
909
  if (typeof email === 'undefined') {
908
910
  throw new AppcondaException('Missing required parameter: "email"');
909
911
  }
@@ -942,7 +944,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
942
944
  * @throws {AppcondaException}
943
945
  * @returns {Promise<Models.Session>}
944
946
  */
945
- async updateMagicURLSession(userId: string, secret: string): Promise<Models.Session> {
947
+ async updateMagicURLSession(userId: string, secret: string): Promise<Session> {
946
948
  if (typeof userId === 'undefined') {
947
949
  throw new AppcondaException('Missing required parameter: "userId"');
948
950
  }
@@ -989,7 +991,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
989
991
  * @returns {Promise<void | string>}
990
992
  */
991
993
  async createOAuth2Session(provider: OAuthProvider, success?: string, failure?: string, scopes?: string[]): Promise<void | string> {
992
-
994
+
993
995
  if (typeof provider === 'undefined') {
994
996
  throw new AppcondaException('Missing required parameter: "provider"');
995
997
  }
@@ -1032,7 +1034,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
1032
1034
  * @throws {AppcondaException}
1033
1035
  * @returns {Promise<Models.Session>}
1034
1036
  */
1035
- async updatePhoneSession(userId: string, secret: string): Promise<Models.Session> {
1037
+ async updatePhoneSession(userId: string, secret: string): Promise<Session> {
1036
1038
  if (typeof userId === 'undefined') {
1037
1039
  throw new AppcondaException('Missing required parameter: "userId"');
1038
1040
  }
@@ -1071,7 +1073,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
1071
1073
  * @throws {AppcondaException}
1072
1074
  * @returns {Promise<Models.Session>}
1073
1075
  */
1074
- async createSession(userId: string, secret: string): Promise<Models.Session> {
1076
+ async createSession(userId: string, secret: string): Promise<Session> {
1075
1077
  if (typeof userId === 'undefined') {
1076
1078
  throw new AppcondaException('Missing required parameter: "userId"');
1077
1079
  }
@@ -1109,7 +1111,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
1109
1111
  * @throws {AppcondaException}
1110
1112
  * @returns {Promise<Models.Session>}
1111
1113
  */
1112
- async getSession(sessionId: string): Promise<Models.Session> {
1114
+ async getSession(sessionId: string): Promise<Session> {
1113
1115
  if (typeof sessionId === 'undefined') {
1114
1116
  throw new AppcondaException('Missing required parameter: "sessionId"');
1115
1117
  }
@@ -1138,7 +1140,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
1138
1140
  * @throws {AppcondaException}
1139
1141
  * @returns {Promise<Models.Session>}
1140
1142
  */
1141
- async updateSession(sessionId: string): Promise<Models.Session> {
1143
+ async updateSession(sessionId: string): Promise<Session> {
1142
1144
  if (typeof sessionId === 'undefined') {
1143
1145
  throw new AppcondaException('Missing required parameter: "sessionId"');
1144
1146
  }
@@ -1195,7 +1197,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
1195
1197
  * @throws {AppcondaException}
1196
1198
  * @returns {Promise<Models.User<Preferences>>}
1197
1199
  */
1198
- async updateStatus<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>> {
1200
+ async updateStatus<T extends Preferences>(): Promise<User<T>> {
1199
1201
  const apiPath = '/account/status';
1200
1202
  const payload: Payload = {};
1201
1203
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1220,9 +1222,9 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
1220
1222
  * @param {string} identifier
1221
1223
  * @param {string} providerId
1222
1224
  * @throws {AppcondaException}
1223
- * @returns {Promise<Models.Target>}
1225
+ * @returns {Promise<Target>}
1224
1226
  */
1225
- async createPushTarget(targetId: string, identifier: string, providerId?: string): Promise<Models.Target> {
1227
+ async createPushTarget(targetId: string, identifier: string, providerId?: string): Promise<Target> {
1226
1228
  if (typeof targetId === 'undefined') {
1227
1229
  throw new AppcondaException('Missing required parameter: "targetId"');
1228
1230
  }
@@ -1261,9 +1263,9 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
1261
1263
  * @param {string} targetId
1262
1264
  * @param {string} identifier
1263
1265
  * @throws {AppcondaException}
1264
- * @returns {Promise<Models.Target>}
1266
+ * @returns {Promise<Target>}
1265
1267
  */
1266
- async updatePushTarget(targetId: string, identifier: string): Promise<Models.Target> {
1268
+ async updatePushTarget(targetId: string, identifier: string): Promise<Target> {
1267
1269
  if (typeof targetId === 'undefined') {
1268
1270
  throw new AppcondaException('Missing required parameter: "targetId"');
1269
1271
  }
@@ -1330,7 +1332,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
1330
1332
  * @throws {AppcondaException}
1331
1333
  * @returns {Promise<Models.Token>}
1332
1334
  */
1333
- async createEmailToken(userId: string, email: string, phrase?: boolean): Promise<Models.Token> {
1335
+ async createEmailToken(userId: string, email: string, phrase?: boolean): Promise<Token> {
1334
1336
  if (typeof userId === 'undefined') {
1335
1337
  throw new AppcondaException('Missing required parameter: "userId"');
1336
1338
  }
@@ -1377,7 +1379,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
1377
1379
  * @throws {AppcondaException}
1378
1380
  * @returns {Promise<Models.Token>}
1379
1381
  */
1380
- async createMagicURLToken(userId: string, email: string, url?: string, phrase?: boolean): Promise<Models.Token> {
1382
+ async createMagicURLToken(userId: string, email: string, url?: string, phrase?: boolean): Promise<Token> {
1381
1383
  if (typeof userId === 'undefined') {
1382
1384
  throw new AppcondaException('Missing required parameter: "userId"');
1383
1385
  }
@@ -1473,7 +1475,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
1473
1475
  * @throws {AppcondaException}
1474
1476
  * @returns {Promise<Models.Token>}
1475
1477
  */
1476
- async createPhoneToken(userId: string, phone: string): Promise<Models.Token> {
1478
+ async createPhoneToken(userId: string, phone: string): Promise<Token> {
1477
1479
  if (typeof userId === 'undefined') {
1478
1480
  throw new AppcondaException('Missing required parameter: "userId"');
1479
1481
  }
@@ -1514,7 +1516,7 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/
1514
1516
  * @throws {AppcondaException}
1515
1517
  * @returns {Promise<Models.Token>}
1516
1518
  */
1517
- async createVerification(url: string): Promise<Models.Token> {
1519
+ async createVerification(url: string): Promise<Token> {
1518
1520
  if (typeof url === 'undefined') {
1519
1521
  throw new AppcondaException('Missing required parameter: "url"');
1520
1522
  }
@@ -1547,7 +1549,7 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/
1547
1549
  * @throws {AppcondaException}
1548
1550
  * @returns {Promise<Models.Token>}
1549
1551
  */
1550
- async updateVerification(userId: string, secret: string): Promise<Models.Token> {
1552
+ async updateVerification(userId: string, secret: string): Promise<Token> {
1551
1553
  if (typeof userId === 'undefined') {
1552
1554
  throw new AppcondaException('Missing required parameter: "userId"');
1553
1555
  }
@@ -1584,7 +1586,7 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/
1584
1586
  * @throws {AppcondaException}
1585
1587
  * @returns {Promise<Models.Token>}
1586
1588
  */
1587
- async createPhoneVerification(): Promise<Models.Token> {
1589
+ async createPhoneVerification(): Promise<Token> {
1588
1590
  const apiPath = '/account/verification/phone';
1589
1591
  const payload: Payload = {};
1590
1592
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -1611,7 +1613,7 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/
1611
1613
  * @throws {AppcondaException}
1612
1614
  * @returns {Promise<Models.Token>}
1613
1615
  */
1614
- async updatePhoneVerification(userId: string, secret: string): Promise<Models.Token> {
1616
+ async updatePhoneVerification(userId: string, secret: string): Promise<Token> {
1615
1617
  if (typeof userId === 'undefined') {
1616
1618
  throw new AppcondaException('Missing required parameter: "userId"');
1617
1619
  }