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