@appconda/nextjs 1.0.21 → 1.0.23

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 (114) hide show
  1. package/dist/index.js +37 -12565
  2. package/package.json +1 -2
  3. package/dist/iife/sdk.js +0 -12556
  4. package/dist/index.js.map +0 -1
  5. package/dist/types/Cache/Adapter.d.ts +0 -10
  6. package/dist/types/Cache/Adapters/Filesystem.d.ts +0 -16
  7. package/dist/types/Cache/Adapters/Memory.d.ts +0 -18
  8. package/dist/types/Cache/Adapters/None.d.ts +0 -12
  9. package/dist/types/Cache/Adapters/Redis.d.ts +0 -14
  10. package/dist/types/Cache/Adapters/Sharding.d.ts +0 -17
  11. package/dist/types/Cache/Cache.d.ts +0 -16
  12. package/dist/types/Cache/index.d.ts +0 -5
  13. package/dist/types/Cache/test.d.ts +0 -0
  14. package/dist/types/Services.d.ts +0 -6
  15. package/dist/types/actions/actionClient.d.ts +0 -4
  16. package/dist/types/actions/index.d.ts +0 -1
  17. package/dist/types/actions/nodes.d.ts +0 -4
  18. package/dist/types/client.d.ts +0 -141
  19. package/dist/types/decorators/Cache.d.ts +0 -1
  20. package/dist/types/decorators/CacheKey.d.ts +0 -1
  21. package/dist/types/decorators/Invalidate.d.ts +0 -1
  22. package/dist/types/enums/api-service.d.ts +0 -13
  23. package/dist/types/enums/api.d.ts +0 -5
  24. package/dist/types/enums/auth-method.d.ts +0 -9
  25. package/dist/types/enums/authentication-factor.d.ts +0 -6
  26. package/dist/types/enums/authenticator-type.d.ts +0 -3
  27. package/dist/types/enums/browser.d.ts +0 -16
  28. package/dist/types/enums/compression.d.ts +0 -5
  29. package/dist/types/enums/credit-card.d.ts +0 -18
  30. package/dist/types/enums/database-usage-range.d.ts +0 -5
  31. package/dist/types/enums/email-template-locale.d.ts +0 -133
  32. package/dist/types/enums/email-template-type.d.ts +0 -9
  33. package/dist/types/enums/entities/EntityLimitType.d.ts +0 -4
  34. package/dist/types/enums/entities/PropertyAttributeName.d.ts +0 -27
  35. package/dist/types/enums/entities/PropertyCondition.d.ts +0 -7
  36. package/dist/types/enums/entities/PropertyType.d.ts +0 -12
  37. package/dist/types/enums/entities/PropertyValueType.d.ts +0 -6
  38. package/dist/types/enums/entities/RowAccess.d.ts +0 -2
  39. package/dist/types/enums/entities/ViewFilterCondition.d.ts +0 -12
  40. package/dist/types/enums/execution-method.d.ts +0 -8
  41. package/dist/types/enums/flag.d.ts +0 -197
  42. package/dist/types/enums/function-usage-range.d.ts +0 -5
  43. package/dist/types/enums/image-format.d.ts +0 -7
  44. package/dist/types/enums/image-gravity.d.ts +0 -11
  45. package/dist/types/enums/index-type.d.ts +0 -5
  46. package/dist/types/enums/messaging-provider-type.d.ts +0 -5
  47. package/dist/types/enums/name.d.ts +0 -14
  48. package/dist/types/enums/o-auth-provider copy.d.ts +0 -41
  49. package/dist/types/enums/o-auth-provider.d.ts +0 -41
  50. package/dist/types/enums/password-hash.d.ts +0 -13
  51. package/dist/types/enums/platform-type.d.ts +0 -17
  52. package/dist/types/enums/project-usage-range.d.ts +0 -4
  53. package/dist/types/enums/region.d.ts +0 -4
  54. package/dist/types/enums/relation-mutate.d.ts +0 -5
  55. package/dist/types/enums/relationship-type.d.ts +0 -6
  56. package/dist/types/enums/resource-type.d.ts +0 -4
  57. package/dist/types/enums/runtime.d.ts +0 -48
  58. package/dist/types/enums/s-m-t-p-secure.d.ts +0 -3
  59. package/dist/types/enums/shared/ApplicationLayout.d.ts +0 -4
  60. package/dist/types/enums/shared/Colors.d.ts +0 -24
  61. package/dist/types/enums/shared/InputType.d.ts +0 -6
  62. package/dist/types/enums/shared/Periodicity.d.ts +0 -7
  63. package/dist/types/enums/shared/SvgIcon.d.ts +0 -37
  64. package/dist/types/enums/shared/Theme.d.ts +0 -4
  65. package/dist/types/enums/sms-template-locale.d.ts +0 -133
  66. package/dist/types/enums/sms-template-type.d.ts +0 -6
  67. package/dist/types/enums/smtp-encryption.d.ts +0 -5
  68. package/dist/types/enums/storage-usage-range.d.ts +0 -5
  69. package/dist/types/enums/subscriptions/PricingModel.d.ts +0 -11
  70. package/dist/types/enums/subscriptions/SubscriptionBillingPeriod.d.ts +0 -10
  71. package/dist/types/enums/subscriptions/SubscriptionFeatureLimitType.d.ts +0 -10
  72. package/dist/types/enums/subscriptions/SubscriptionPriceType.d.ts +0 -7
  73. package/dist/types/enums/tenants/LinkedAccountStatus.d.ts +0 -5
  74. package/dist/types/enums/tenants/TenantUserJoined.d.ts +0 -6
  75. package/dist/types/enums/tenants/TenantUserStatus.d.ts +0 -6
  76. package/dist/types/enums/tenants/TenantUserType.d.ts +0 -5
  77. package/dist/types/enums/user-usage-range.d.ts +0 -5
  78. package/dist/types/getAppcondaClient.d.ts +0 -2
  79. package/dist/types/getSDKForCurrentUser.d.ts +0 -33
  80. package/dist/types/id.d.ts +0 -20
  81. package/dist/types/index.d.ts +0 -39
  82. package/dist/types/inputFile.d.ts +0 -6
  83. package/dist/types/lib/Registry/Registry.d.ts +0 -38
  84. package/dist/types/lib/Registry/index.d.ts +0 -1
  85. package/dist/types/models.d.ts +0 -3272
  86. package/dist/types/permission.d.ts +0 -43
  87. package/dist/types/query.d.ts +0 -194
  88. package/dist/types/role.d.ts +0 -70
  89. package/dist/types/service-client.d.ts +0 -7
  90. package/dist/types/service.d.ts +0 -11
  91. package/dist/types/services/account.d.ts +0 -530
  92. package/dist/types/services/applets.d.ts +0 -9
  93. package/dist/types/services/avatars.d.ts +0 -115
  94. package/dist/types/services/community.d.ts +0 -19
  95. package/dist/types/services/configuration.d.ts +0 -5
  96. package/dist/types/services/databases.d.ts +0 -613
  97. package/dist/types/services/functions.d.ts +0 -319
  98. package/dist/types/services/graphql.d.ts +0 -25
  99. package/dist/types/services/health.d.ts +0 -231
  100. package/dist/types/services/locale.d.ts +0 -80
  101. package/dist/types/services/messaging.d.ts +0 -685
  102. package/dist/types/services/node.d.ts +0 -5
  103. package/dist/types/services/permissions.d.ts +0 -20
  104. package/dist/types/services/pricing.d.ts +0 -15
  105. package/dist/types/services/projects.d.ts +0 -542
  106. package/dist/types/services/roles.d.ts +0 -19
  107. package/dist/types/services/schema.d.ts +0 -17
  108. package/dist/types/services/storage.d.ts +0 -189
  109. package/dist/types/services/subscription.d.ts +0 -15
  110. package/dist/types/services/teams.d.ts +0 -167
  111. package/dist/types/services/tenant-subscription.d.ts +0 -12
  112. package/dist/types/services/tenant.d.ts +0 -32
  113. package/dist/types/services/users.d.ts +0 -499
  114. package/dist/types/services/waitlist.d.ts +0 -5
@@ -1,530 +0,0 @@
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
- export declare class Account {
7
- client: Client;
8
- constructor(client: Client);
9
- /**
10
- * Get account
11
- *
12
- * Get the currently logged in user.
13
- *
14
- * @throws {AppcondaException}
15
- * @returns {Promise<Models.User<Preferences>>}
16
- */
17
- get<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>>;
18
- /**
19
- * Create account
20
- *
21
- * Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](https://appconda.io/docs/references/cloud/client-web/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https://appconda.io/docs/references/cloud/client-web/account#createEmailSession).
22
- *
23
- * @param {string} userId
24
- * @param {string} email
25
- * @param {string} password
26
- * @param {string} name
27
- * @throws {AppcondaException}
28
- * @returns {Promise<Models.User<Preferences>>}
29
- */
30
- create<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
31
- /**
32
- * Delete account
33
- *
34
- * Delete the currently logged in user.
35
- *
36
- * @throws {AppcondaException}
37
- * @returns {Promise<{}>}
38
- */
39
- delete(): Promise<{}>;
40
- /**
41
- * Update email
42
- *
43
- * Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.
44
- This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.
45
-
46
- *
47
- * @param {string} email
48
- * @param {string} password
49
- * @throws {AppcondaException}
50
- * @returns {Promise<Models.User<Preferences>>}
51
- */
52
- updateEmail<Preferences extends Models.Preferences>(email: string, password: string): Promise<Models.User<Preferences>>;
53
- /**
54
- * List Identities
55
- *
56
- * Get the list of identities for the currently logged in user.
57
- *
58
- * @param {string[]} queries
59
- * @throws {AppcondaException}
60
- * @returns {Promise<Models.IdentityList>}
61
- */
62
- listIdentities(queries?: string[]): Promise<Models.IdentityList>;
63
- /**
64
- * Delete identity
65
- *
66
- * Delete an identity by its unique ID.
67
- *
68
- * @param {string} identityId
69
- * @throws {AppcondaException}
70
- * @returns {Promise<{}>}
71
- */
72
- deleteIdentity(identityId: string): Promise<{}>;
73
- /**
74
- * Create JWT
75
- *
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
- *
78
- * @throws {AppcondaException}
79
- * @returns {Promise<Models.Jwt>}
80
- */
81
- createJWT(): Promise<Models.Jwt>;
82
- /**
83
- * List logs
84
- *
85
- * Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.
86
- *
87
- * @param {string[]} queries
88
- * @throws {AppcondaException}
89
- * @returns {Promise<Models.LogList>}
90
- */
91
- listLogs(queries?: string[]): Promise<Models.LogList>;
92
- /**
93
- * Update MFA
94
- *
95
- * Enable or disable MFA on an account.
96
- *
97
- * @param {boolean} mfa
98
- * @throws {AppcondaException}
99
- * @returns {Promise<Models.User<Preferences>>}
100
- */
101
- updateMFA<Preferences extends Models.Preferences>(mfa: boolean): Promise<Models.User<Preferences>>;
102
- /**
103
- * Create Authenticator
104
- *
105
- * Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method.
106
- *
107
- * @param {AuthenticatorType} type
108
- * @throws {AppcondaException}
109
- * @returns {Promise<Models.MfaType>}
110
- */
111
- createMfaAuthenticator(type: AuthenticatorType): Promise<Models.MfaType>;
112
- /**
113
- * Verify Authenticator
114
- *
115
- * Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.
116
- *
117
- * @param {AuthenticatorType} type
118
- * @param {string} otp
119
- * @throws {AppcondaException}
120
- * @returns {Promise<Models.User<Preferences>>}
121
- */
122
- updateMfaAuthenticator<Preferences extends Models.Preferences>(type: AuthenticatorType, otp: string): Promise<Models.User<Preferences>>;
123
- /**
124
- * Delete Authenticator
125
- *
126
- * Delete an authenticator for a user by ID.
127
- *
128
- * @param {AuthenticatorType} type
129
- * @throws {AppcondaException}
130
- * @returns {Promise<{}>}
131
- */
132
- deleteMfaAuthenticator(type: AuthenticatorType): Promise<{}>;
133
- /**
134
- * Create MFA Challenge
135
- *
136
- * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.
137
- *
138
- * @param {AuthenticationFactor} factor
139
- * @throws {AppcondaException}
140
- * @returns {Promise<Models.MfaChallenge>}
141
- */
142
- createMfaChallenge(factor: AuthenticationFactor): Promise<Models.MfaChallenge>;
143
- /**
144
- * Create MFA Challenge (confirmation)
145
- *
146
- * Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.
147
- *
148
- * @param {string} challengeId
149
- * @param {string} otp
150
- * @throws {AppcondaException}
151
- * @returns {Promise<{}>}
152
- */
153
- updateMfaChallenge(challengeId: string, otp: string): Promise<{}>;
154
- /**
155
- * List Factors
156
- *
157
- * List the factors available on the account to be used as a MFA challange.
158
- *
159
- * @throws {AppcondaException}
160
- * @returns {Promise<Models.MfaFactors>}
161
- */
162
- listMfaFactors(): Promise<Models.MfaFactors>;
163
- /**
164
- * Get MFA Recovery Codes
165
- *
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
- *
168
- * @throws {AppcondaException}
169
- * @returns {Promise<Models.MfaRecoveryCodes>}
170
- */
171
- getMfaRecoveryCodes(): Promise<Models.MfaRecoveryCodes>;
172
- /**
173
- * Create MFA Recovery Codes
174
- *
175
- * Generate recovery codes as backup for MFA flow. It&#039;s recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.
176
- *
177
- * @throws {AppcondaException}
178
- * @returns {Promise<Models.MfaRecoveryCodes>}
179
- */
180
- createMfaRecoveryCodes(): Promise<Models.MfaRecoveryCodes>;
181
- /**
182
- * Regenerate MFA Recovery Codes
183
- *
184
- * Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.
185
- *
186
- * @throws {AppcondaException}
187
- * @returns {Promise<Models.MfaRecoveryCodes>}
188
- */
189
- updateMfaRecoveryCodes(): Promise<Models.MfaRecoveryCodes>;
190
- /**
191
- * Update name
192
- *
193
- * Update currently logged in user account name.
194
- *
195
- * @param {string} name
196
- * @throws {AppcondaException}
197
- * @returns {Promise<Models.User<Preferences>>}
198
- */
199
- updateName<Preferences extends Models.Preferences>(name: string): Promise<Models.User<Preferences>>;
200
- /**
201
- * Update password
202
- *
203
- * Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.
204
- *
205
- * @param {string} password
206
- * @param {string} oldPassword
207
- * @throws {AppcondaException}
208
- * @returns {Promise<Models.User<Preferences>>}
209
- */
210
- updatePassword<Preferences extends Models.Preferences>(password: string, oldPassword?: string): Promise<Models.User<Preferences>>;
211
- /**
212
- * Update phone
213
- *
214
- * Update the currently logged in user&#039;s phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appconda.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS.
215
- *
216
- * @param {string} phone
217
- * @param {string} password
218
- * @throws {AppcondaException}
219
- * @returns {Promise<Models.User<Preferences>>}
220
- */
221
- updatePhone<Preferences extends Models.Preferences>(phone: string, password: string): Promise<Models.User<Preferences>>;
222
- /**
223
- * Get account preferences
224
- *
225
- * Get the preferences as a key-value object for the currently logged in user.
226
- *
227
- * @throws {AppcondaException}
228
- * @returns {Promise<Preferences>}
229
- */
230
- getPrefs<Preferences extends Models.Preferences>(): Promise<Preferences>;
231
- /**
232
- * Update preferences
233
- *
234
- * Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.
235
- *
236
- * @param {Partial<Preferences>} prefs
237
- * @throws {AppcondaException}
238
- * @returns {Promise<Models.User<Preferences>>}
239
- */
240
- updatePrefs<Preferences extends Models.Preferences>(prefs: Partial<Preferences>): Promise<Models.User<Preferences>>;
241
- /**
242
- * Create password recovery
243
- *
244
- * Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](https://appconda.io/docs/references/cloud/client-web/account#updateRecovery) endpoint to complete the process. The verification link sent to the user&#039;s email address is valid for 1 hour.
245
- *
246
- * @param {string} email
247
- * @param {string} url
248
- * @throws {AppcondaException}
249
- * @returns {Promise<Models.Token>}
250
- */
251
- createRecovery(email: string, url: string): Promise<Models.Token>;
252
- /**
253
- * Create password recovery (confirmation)
254
- *
255
- * Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](https://appconda.io/docs/references/cloud/client-web/account#createRecovery) endpoint.
256
-
257
- Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.
258
- *
259
- * @param {string} userId
260
- * @param {string} secret
261
- * @param {string} password
262
- * @throws {AppcondaException}
263
- * @returns {Promise<Models.Token>}
264
- */
265
- updateRecovery(userId: string, secret: string, password: string): Promise<Models.Token>;
266
- /**
267
- * List sessions
268
- *
269
- * Get the list of active sessions across different devices for the currently logged in user.
270
- *
271
- * @throws {AppcondaException}
272
- * @returns {Promise<Models.SessionList>}
273
- */
274
- listSessions(): Promise<Models.SessionList>;
275
- /**
276
- * Delete sessions
277
- *
278
- * Delete all sessions from the user account and remove any sessions cookies from the end client.
279
- *
280
- * @throws {AppcondaException}
281
- * @returns {Promise<{}>}
282
- */
283
- deleteSessions(): Promise<{}>;
284
- /**
285
- * Create anonymous session
286
- *
287
- * Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https://appconda.io/docs/references/cloud/client-web/account#updateEmail) or create an [OAuth2 session](https://appconda.io/docs/references/cloud/client-web/account#CreateOAuth2Session).
288
- *
289
- * @throws {AppcondaException}
290
- * @returns {Promise<Models.Session>}
291
- */
292
- createAnonymousSession(): Promise<Models.Session>;
293
- /**
294
- * Create email password session
295
- *
296
- * Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.
297
-
298
- A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appconda.io/docs/authentication-security#limits).
299
- *
300
- * @param {string} email
301
- * @param {string} password
302
- * @throws {AppcondaException}
303
- * @returns {Promise<Models.Session>}
304
- */
305
- createEmailPasswordSession(email: string, password: string): Promise<Models.Session>;
306
- /**
307
- * Update magic URL session
308
- *
309
- * Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.
310
- *
311
- * @param {string} userId
312
- * @param {string} secret
313
- * @throws {AppcondaException}
314
- * @returns {Promise<Models.Session>}
315
- */
316
- updateMagicURLSession(userId: string, secret: string): Promise<Models.Session>;
317
- /**
318
- * Create OAuth2 session
319
- *
320
- * Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appconda console first. Use the success and failure arguments to provide a redirect URL&#039;s back to your app when login is completed.
321
-
322
- If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.
323
-
324
- A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appconda.io/docs/authentication-security#limits).
325
-
326
- *
327
- * @param {OAuthProvider} provider
328
- * @param {string} success
329
- * @param {string} failure
330
- * @param {string[]} scopes
331
- * @throws {AppcondaException}
332
- * @returns {Promise<void | string>}
333
- */
334
- createOAuth2Session(provider: OAuthProvider, success?: string, failure?: string, scopes?: string[]): Promise<void | string>;
335
- /**
336
- * Update phone session
337
- *
338
- * Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.
339
- *
340
- * @param {string} userId
341
- * @param {string} secret
342
- * @throws {AppcondaException}
343
- * @returns {Promise<Models.Session>}
344
- */
345
- updatePhoneSession(userId: string, secret: string): Promise<Models.Session>;
346
- /**
347
- * Create session
348
- *
349
- * Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.
350
- *
351
- * @param {string} userId
352
- * @param {string} secret
353
- * @throws {AppcondaException}
354
- * @returns {Promise<Models.Session>}
355
- */
356
- createSession(userId: string, secret: string): Promise<Models.Session>;
357
- /**
358
- * Get session
359
- *
360
- * Use this endpoint to get a logged in user&#039;s session using a Session ID. Inputting &#039;current&#039; will return the current session being used.
361
- *
362
- * @param {string} sessionId
363
- * @throws {AppcondaException}
364
- * @returns {Promise<Models.Session>}
365
- */
366
- getSession(sessionId: string): Promise<Models.Session>;
367
- /**
368
- * Update session
369
- *
370
- * Use this endpoint to extend a session&#039;s length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.
371
- *
372
- * @param {string} sessionId
373
- * @throws {AppcondaException}
374
- * @returns {Promise<Models.Session>}
375
- */
376
- updateSession(sessionId: string): Promise<Models.Session>;
377
- /**
378
- * Delete session
379
- *
380
- * Logout the user. Use &#039;current&#039; as the session ID to logout on this device, use a session ID to logout on another device. If you&#039;re looking to logout the user on all devices, use [Delete Sessions](https://appconda.io/docs/references/cloud/client-web/account#deleteSessions) instead.
381
- *
382
- * @param {string} sessionId
383
- * @throws {AppcondaException}
384
- * @returns {Promise<{}>}
385
- */
386
- deleteSession(sessionId: string): Promise<{}>;
387
- /**
388
- * Update status
389
- *
390
- * Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.
391
- *
392
- * @throws {AppcondaException}
393
- * @returns {Promise<Models.User<Preferences>>}
394
- */
395
- updateStatus<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>>;
396
- /**
397
- * Create push target
398
- *
399
- *
400
- * @param {string} targetId
401
- * @param {string} identifier
402
- * @param {string} providerId
403
- * @throws {AppcondaException}
404
- * @returns {Promise<Models.Target>}
405
- */
406
- createPushTarget(targetId: string, identifier: string, providerId?: string): Promise<Models.Target>;
407
- /**
408
- * Update push target
409
- *
410
- *
411
- * @param {string} targetId
412
- * @param {string} identifier
413
- * @throws {AppcondaException}
414
- * @returns {Promise<Models.Target>}
415
- */
416
- updatePushTarget(targetId: string, identifier: string): Promise<Models.Target>;
417
- /**
418
- * Delete push target
419
- *
420
- *
421
- * @param {string} targetId
422
- * @throws {AppcondaException}
423
- * @returns {Promise<{}>}
424
- */
425
- deletePushTarget(targetId: string): Promise<{}>;
426
- /**
427
- * Create email token (OTP)
428
- *
429
- * Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appconda.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user&#039;s email is valid for 15 minutes.
430
-
431
- A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appconda.io/docs/authentication-security#limits).
432
- *
433
- * @param {string} userId
434
- * @param {string} email
435
- * @param {boolean} phrase
436
- * @throws {AppcondaException}
437
- * @returns {Promise<Models.Token>}
438
- */
439
- createEmailToken(userId: string, email: string, phrase?: boolean): Promise<Models.Token>;
440
- /**
441
- * Create magic URL token
442
- *
443
- * Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appconda.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user&#039;s email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appconda instance by default.
444
-
445
- A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appconda.io/docs/authentication-security#limits).
446
-
447
- *
448
- * @param {string} userId
449
- * @param {string} email
450
- * @param {string} url
451
- * @param {boolean} phrase
452
- * @throws {AppcondaException}
453
- * @returns {Promise<Models.Token>}
454
- */
455
- createMagicURLToken(userId: string, email: string, url?: string, phrase?: boolean): Promise<Models.Token>;
456
- /**
457
- * Create OAuth2 token
458
- *
459
- * Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appconda console first. Use the success and failure arguments to provide a redirect URL&#039;s back to your app when login is completed.
460
-
461
- If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appconda.io/docs/references/cloud/client-web/account#createSession) endpoint.
462
-
463
- A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appconda.io/docs/authentication-security#limits).
464
- *
465
- * @param {OAuthProvider} provider
466
- * @param {string} success
467
- * @param {string} failure
468
- * @param {string[]} scopes
469
- * @throws {AppcondaException}
470
- * @returns {Promise<void | string>}
471
- */
472
- createOAuth2Token(provider: OAuthProvider, success?: string, failure?: string, scopes?: string[]): Promise<void | string>;
473
- /**
474
- * Create phone token
475
- *
476
- * Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appconda.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user&#039;s phone is valid for 15 minutes.
477
-
478
- A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appconda.io/docs/authentication-security#limits).
479
- *
480
- * @param {string} userId
481
- * @param {string} phone
482
- * @throws {AppcondaException}
483
- * @returns {Promise<Models.Token>}
484
- */
485
- createPhoneToken(userId: string, phone: string): Promise<Models.Token>;
486
- /**
487
- * Create email verification
488
- *
489
- * Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appconda.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user&#039;s email address is valid for 7 days.
490
-
491
- Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.
492
-
493
- *
494
- * @param {string} url
495
- * @throws {AppcondaException}
496
- * @returns {Promise<Models.Token>}
497
- */
498
- createVerification(url: string): Promise<Models.Token>;
499
- /**
500
- * Create email verification (confirmation)
501
- *
502
- * Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.
503
- *
504
- * @param {string} userId
505
- * @param {string} secret
506
- * @throws {AppcondaException}
507
- * @returns {Promise<Models.Token>}
508
- */
509
- updateVerification(userId: string, secret: string): Promise<Models.Token>;
510
- /**
511
- * Create phone verification
512
- *
513
- * Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user&#039;s phone number using the [accountUpdatePhone](https://appconda.io/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https://appconda.io/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user&#039;s phone number is valid for 15 minutes.
514
- *
515
- * @throws {AppcondaException}
516
- * @returns {Promise<Models.Token>}
517
- */
518
- createPhoneVerification(): Promise<Models.Token>;
519
- /**
520
- * Update phone verification (confirmation)
521
- *
522
- * Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user&#039;s phone number to verify the user email ownership. If confirmed this route will return a 200 status code.
523
- *
524
- * @param {string} userId
525
- * @param {string} secret
526
- * @throws {AppcondaException}
527
- * @returns {Promise<Models.Token>}
528
- */
529
- updatePhoneVerification(userId: string, secret: string): Promise<Models.Token>;
530
- }
@@ -1,9 +0,0 @@
1
- import { Client } from '../client';
2
- import type { Models } from '../models';
3
- export declare class Applets {
4
- client: Client;
5
- constructor(client: Client);
6
- list(): Promise<Models.AppletList>;
7
- getManifest(appletId: string): Promise<Models.Applet>;
8
- getAppletScript(appletId: string): Promise<Models.Applet>;
9
- }
@@ -1,115 +0,0 @@
1
- import { Client } from '../client';
2
- import { Browser } from '../enums/browser';
3
- import { CreditCard } from '../enums/credit-card';
4
- import { Flag } from '../enums/flag';
5
- export declare class Avatars {
6
- client: Client;
7
- constructor(client: Client);
8
- /**
9
- * Get browser icon
10
- *
11
- * You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appconda.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.
12
-
13
- When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
14
- *
15
- * @param {Browser} code
16
- * @param {number} width
17
- * @param {number} height
18
- * @param {number} quality
19
- * @throws {AppcondaException}
20
- * @returns {Promise<ArrayBuffer>}
21
- */
22
- getBrowser(code: Browser, width?: number, height?: number, quality?: number): Promise<ArrayBuffer>;
23
- /**
24
- * Get credit card icon
25
- *
26
- * The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.
27
-
28
- When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
29
-
30
- *
31
- * @param {CreditCard} code
32
- * @param {number} width
33
- * @param {number} height
34
- * @param {number} quality
35
- * @throws {AppcondaException}
36
- * @returns {Promise<ArrayBuffer>}
37
- */
38
- getCreditCard(code: CreditCard, width?: number, height?: number, quality?: number): Promise<ArrayBuffer>;
39
- /**
40
- * Get favicon
41
- *
42
- * Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.
43
-
44
- This endpoint does not follow HTTP redirects.
45
- *
46
- * @param {string} url
47
- * @throws {AppcondaException}
48
- * @returns {Promise<ArrayBuffer>}
49
- */
50
- getFavicon(url: string): Promise<ArrayBuffer>;
51
- /**
52
- * Get country flag
53
- *
54
- * You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.
55
-
56
- When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
57
-
58
- *
59
- * @param {Flag} code
60
- * @param {number} width
61
- * @param {number} height
62
- * @param {number} quality
63
- * @throws {AppcondaException}
64
- * @returns {Promise<ArrayBuffer>}
65
- */
66
- getFlag(code: Flag, width?: number, height?: number, quality?: number): Promise<ArrayBuffer>;
67
- /**
68
- * Get image from URL
69
- *
70
- * Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.
71
-
72
- When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.
73
-
74
- This endpoint does not follow HTTP redirects.
75
- *
76
- * @param {string} url
77
- * @param {number} width
78
- * @param {number} height
79
- * @throws {AppcondaException}
80
- * @returns {Promise<ArrayBuffer>}
81
- */
82
- getImage(url: string, width?: number, height?: number): Promise<ArrayBuffer>;
83
- /**
84
- * Get user initials
85
- *
86
- * Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the &#039;name&#039; parameter. If no name is given and no user is logged, an empty avatar will be returned.
87
-
88
- You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user&#039;s initials when reloading the same theme will always return for the same initials.
89
-
90
- When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
91
-
92
- *
93
- * @param {string} name
94
- * @param {number} width
95
- * @param {number} height
96
- * @param {string} background
97
- * @throws {AppcondaException}
98
- * @returns {Promise<ArrayBuffer>}
99
- */
100
- getInitials(name?: string, width?: number, height?: number, background?: string): Promise<ArrayBuffer>;
101
- /**
102
- * Get QR code
103
- *
104
- * Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.
105
-
106
- *
107
- * @param {string} text
108
- * @param {number} size
109
- * @param {number} margin
110
- * @param {boolean} download
111
- * @throws {AppcondaException}
112
- * @returns {Promise<ArrayBuffer>}
113
- */
114
- getQR(text: string, size?: number, margin?: number, download?: boolean): Promise<ArrayBuffer>;
115
- }
@@ -1,19 +0,0 @@
1
- import { Client, Models } from "../client";
2
- export declare class Community {
3
- client: Client;
4
- constructor(client: Client);
5
- get(tenantId: string): Promise<Models.Tenant>;
6
- /**
7
- * Create account
8
- *
9
- * Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](https://appconda.io/docs/references/cloud/client-web/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https://appconda.io/docs/references/cloud/client-web/account#createEmailSession).
10
- *
11
- * @param {string} tenantId
12
- * @param {string} name
13
- * @param {string} slug
14
- * @throws {AppcondaException}
15
- * @returns {Promise<Models.User<Preferences>>}
16
- */
17
- createSpaceGroup({ $id, name, description }: Models.SpaceGroup): Promise<Models.SpaceGroup>;
18
- listSpaceGroups(queries?: string[], search?: string): Promise<Models.SpaceGroupList>;
19
- }