@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,189 +0,0 @@
1
- import { Client, UploadProgress } from '../client';
2
- import type { Models } from '../models';
3
- import { Compression } from '../enums/compression';
4
- import { ImageGravity } from '../enums/image-gravity';
5
- import { ImageFormat } from '../enums/image-format';
6
- export declare class Storage {
7
- client: Client;
8
- constructor(client: Client);
9
- /**
10
- * List buckets
11
- *
12
- * Get a list of all the storage buckets. You can use the query params to filter your results.
13
- *
14
- * @param {string[]} queries
15
- * @param {string} search
16
- * @throws {AppcondaException}
17
- * @returns {Promise<Models.BucketList>}
18
- */
19
- listBuckets(queries?: string[], search?: string): Promise<Models.BucketList>;
20
- /**
21
- * Create bucket
22
- *
23
- * Create a new storage bucket.
24
- *
25
- * @param {string} bucketId
26
- * @param {string} name
27
- * @param {string[]} permissions
28
- * @param {boolean} fileSecurity
29
- * @param {boolean} enabled
30
- * @param {number} maximumFileSize
31
- * @param {string[]} allowedFileExtensions
32
- * @param {Compression} compression
33
- * @param {boolean} encryption
34
- * @param {boolean} antivirus
35
- * @throws {AppcondaException}
36
- * @returns {Promise<Models.Bucket>}
37
- */
38
- createBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean): Promise<Models.Bucket>;
39
- /**
40
- * Get bucket
41
- *
42
- * Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.
43
- *
44
- * @param {string} bucketId
45
- * @throws {AppcondaException}
46
- * @returns {Promise<Models.Bucket>}
47
- */
48
- getBucket(bucketId: string): Promise<Models.Bucket>;
49
- /**
50
- * Update bucket
51
- *
52
- * Update a storage bucket by its unique ID.
53
- *
54
- * @param {string} bucketId
55
- * @param {string} name
56
- * @param {string[]} permissions
57
- * @param {boolean} fileSecurity
58
- * @param {boolean} enabled
59
- * @param {number} maximumFileSize
60
- * @param {string[]} allowedFileExtensions
61
- * @param {Compression} compression
62
- * @param {boolean} encryption
63
- * @param {boolean} antivirus
64
- * @throws {AppcondaException}
65
- * @returns {Promise<Models.Bucket>}
66
- */
67
- updateBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean): Promise<Models.Bucket>;
68
- /**
69
- * Delete bucket
70
- *
71
- * Delete a storage bucket by its unique ID.
72
- *
73
- * @param {string} bucketId
74
- * @throws {AppcondaException}
75
- * @returns {Promise<{}>}
76
- */
77
- deleteBucket(bucketId: string): Promise<{}>;
78
- /**
79
- * List files
80
- *
81
- * Get a list of all the user files. You can use the query params to filter your results.
82
- *
83
- * @param {string} bucketId
84
- * @param {string[]} queries
85
- * @param {string} search
86
- * @throws {AppcondaException}
87
- * @returns {Promise<Models.FileList>}
88
- */
89
- listFiles(bucketId: string, queries?: string[], search?: string): Promise<Models.FileList>;
90
- /**
91
- * Create file
92
- *
93
- * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appconda.io/docs/server/storage#storageCreateBucket) API or directly from your Appconda console.
94
-
95
- Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.
96
-
97
- When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file&#039;s **id** in `x-appconda-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.
98
-
99
- If you&#039;re creating a new file using one of the Appconda SDKs, all the chunking logic will be managed by the SDK internally.
100
-
101
- *
102
- * @param {string} bucketId
103
- * @param {string} fileId
104
- * @param {File} file
105
- * @param {string[]} permissions
106
- * @throws {AppcondaException}
107
- * @returns {Promise<Models.File>}
108
- */
109
- createFile(bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void): Promise<Models.File>;
110
- /**
111
- * Get file
112
- *
113
- * Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.
114
- *
115
- * @param {string} bucketId
116
- * @param {string} fileId
117
- * @throws {AppcondaException}
118
- * @returns {Promise<Models.File>}
119
- */
120
- getFile(bucketId: string, fileId: string): Promise<Models.File>;
121
- /**
122
- * Update file
123
- *
124
- * Update a file by its unique ID. Only users with write permissions have access to update this resource.
125
- *
126
- * @param {string} bucketId
127
- * @param {string} fileId
128
- * @param {string} name
129
- * @param {string[]} permissions
130
- * @throws {AppcondaException}
131
- * @returns {Promise<Models.File>}
132
- */
133
- updateFile(bucketId: string, fileId: string, name?: string, permissions?: string[]): Promise<Models.File>;
134
- /**
135
- * Delete File
136
- *
137
- * Delete a file by its unique ID. Only users with write permissions have access to delete this resource.
138
- *
139
- * @param {string} bucketId
140
- * @param {string} fileId
141
- * @throws {AppcondaException}
142
- * @returns {Promise<{}>}
143
- */
144
- deleteFile(bucketId: string, fileId: string): Promise<{}>;
145
- /**
146
- * Get file for download
147
- *
148
- * Get a file content by its unique ID. The endpoint response return with a &#039;Content-Disposition: attachment&#039; header that tells the browser to start downloading the file to user downloads directory.
149
- *
150
- * @param {string} bucketId
151
- * @param {string} fileId
152
- * @throws {AppcondaException}
153
- * @returns {Promise<ArrayBuffer>}
154
- */
155
- getFileDownload(bucketId: string, fileId: string): Promise<ArrayBuffer>;
156
- /**
157
- * Get file preview
158
- *
159
- * Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.
160
- *
161
- * @param {string} bucketId
162
- * @param {string} fileId
163
- * @param {number} width
164
- * @param {number} height
165
- * @param {ImageGravity} gravity
166
- * @param {number} quality
167
- * @param {number} borderWidth
168
- * @param {string} borderColor
169
- * @param {number} borderRadius
170
- * @param {number} opacity
171
- * @param {number} rotation
172
- * @param {string} background
173
- * @param {ImageFormat} output
174
- * @throws {AppcondaException}
175
- * @returns {Promise<ArrayBuffer>}
176
- */
177
- getFilePreview(bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat): Promise<ArrayBuffer>;
178
- /**
179
- * Get file for view
180
- *
181
- * Get a file content by its unique ID. This endpoint is similar to the download method but returns with no &#039;Content-Disposition: attachment&#039; header.
182
- *
183
- * @param {string} bucketId
184
- * @param {string} fileId
185
- * @throws {AppcondaException}
186
- * @returns {Promise<ArrayBuffer>}
187
- */
188
- getFileView(bucketId: string, fileId: string): Promise<ArrayBuffer>;
189
- }
@@ -1,15 +0,0 @@
1
- import { ServiceClient } from "../service-client";
2
- export declare class Subscription extends ServiceClient {
3
- protected getServiceName(): string;
4
- getAllSubscriptionProducts(isPublic?: boolean): Promise<any[]>;
5
- getActiveTenantsSubscriptions(isPublic?: boolean): Promise<any[]>;
6
- getAllSubscriptionProductsWithTenants(): Promise<any[]>;
7
- getSubscriptionProduct(productId: string): Promise<any>;
8
- getAllTenantSubscriptionProducts(filters?: any, pagination?: {
9
- page: number;
10
- pageSize: number;
11
- }): Promise<{
12
- items: any[];
13
- pagination: any;
14
- }>;
15
- }
@@ -1,167 +0,0 @@
1
- import { Client } from '../client';
2
- import type { Models } from '../models';
3
- export declare class Teams {
4
- client: Client;
5
- constructor(client: Client);
6
- /**
7
- * List teams
8
- *
9
- * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.
10
- *
11
- * @param {string[]} queries
12
- * @param {string} search
13
- * @throws {AppcondaException}
14
- * @returns {Promise<Models.TeamList<Preferences>>}
15
- */
16
- list<Preferences extends Models.Preferences>(queries?: string[], search?: string): Promise<Models.TeamList<Preferences>>;
17
- /**
18
- * Create team
19
- *
20
- * Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.
21
- *
22
- * @param {string} teamId
23
- * @param {string} name
24
- * @param {string[]} roles
25
- * @throws {AppcondaException}
26
- * @returns {Promise<Models.Team<Preferences>>}
27
- */
28
- create<Preferences extends Models.Preferences>(teamId: string, name: string, roles?: string[]): Promise<Models.Team<Preferences>>;
29
- /**
30
- * Get team
31
- *
32
- * Get a team by its ID. All team members have read access for this resource.
33
- *
34
- * @param {string} teamId
35
- * @throws {AppcondaException}
36
- * @returns {Promise<Models.Team<Preferences>>}
37
- */
38
- get<Preferences extends Models.Preferences>(teamId: string): Promise<Models.Team<Preferences>>;
39
- /**
40
- * Update name
41
- *
42
- * Update the team&#039;s name by its unique ID.
43
- *
44
- * @param {string} teamId
45
- * @param {string} name
46
- * @throws {AppcondaException}
47
- * @returns {Promise<Models.Team<Preferences>>}
48
- */
49
- updateName<Preferences extends Models.Preferences>(teamId: string, name: string): Promise<Models.Team<Preferences>>;
50
- /**
51
- * Delete team
52
- *
53
- * Delete a team using its ID. Only team members with the owner role can delete the team.
54
- *
55
- * @param {string} teamId
56
- * @throws {AppcondaException}
57
- * @returns {Promise<{}>}
58
- */
59
- delete(teamId: string): Promise<{}>;
60
- /**
61
- * List team memberships
62
- *
63
- * Use this endpoint to list a team&#039;s members using the team&#039;s ID. All team members have read access to this endpoint.
64
- *
65
- * @param {string} teamId
66
- * @param {string[]} queries
67
- * @param {string} search
68
- * @throws {AppcondaException}
69
- * @returns {Promise<Models.MembershipList>}
70
- */
71
- listMemberships(teamId: string, queries?: string[], search?: string): Promise<Models.MembershipList>;
72
- /**
73
- * Create team membership
74
- *
75
- * Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appconda will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn&#039;t exist. If initiated from a Server SDK, the new member will be added automatically to the team.
76
-
77
- You only need to provide one of a user ID, email, or phone number. Appconda will prioritize accepting the user ID &gt; email &gt; phone number if you provide more than one of these parameters.
78
-
79
- Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appconda.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team.
80
-
81
- Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appconda will accept the only redirect URLs under the domains you have added as a platform on the Appconda Console.
82
-
83
- *
84
- * @param {string} teamId
85
- * @param {string[]} roles
86
- * @param {string} email
87
- * @param {string} userId
88
- * @param {string} phone
89
- * @param {string} url
90
- * @param {string} name
91
- * @throws {AppcondaException}
92
- * @returns {Promise<Models.Membership>}
93
- */
94
- createMembership(teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string): Promise<Models.Membership>;
95
- /**
96
- * Get team membership
97
- *
98
- * Get a team member by the membership unique id. All team members have read access for this resource.
99
- *
100
- * @param {string} teamId
101
- * @param {string} membershipId
102
- * @throws {AppcondaException}
103
- * @returns {Promise<Models.Membership>}
104
- */
105
- getMembership(teamId: string, membershipId: string): Promise<Models.Membership>;
106
- /**
107
- * Update membership
108
- *
109
- * Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appconda.io/docs/permissions).
110
-
111
- *
112
- * @param {string} teamId
113
- * @param {string} membershipId
114
- * @param {string[]} roles
115
- * @throws {AppcondaException}
116
- * @returns {Promise<Models.Membership>}
117
- */
118
- updateMembership(teamId: string, membershipId: string, roles: string[]): Promise<Models.Membership>;
119
- /**
120
- * Delete team membership
121
- *
122
- * This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.
123
- *
124
- * @param {string} teamId
125
- * @param {string} membershipId
126
- * @throws {AppcondaException}
127
- * @returns {Promise<{}>}
128
- */
129
- deleteMembership(teamId: string, membershipId: string): Promise<{}>;
130
- /**
131
- * Update team membership status
132
- *
133
- * Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.
134
-
135
- If the request is successful, a session for the user is automatically created.
136
-
137
- *
138
- * @param {string} teamId
139
- * @param {string} membershipId
140
- * @param {string} userId
141
- * @param {string} secret
142
- * @throws {AppcondaException}
143
- * @returns {Promise<Models.Membership>}
144
- */
145
- updateMembershipStatus(teamId: string, membershipId: string, userId: string, secret: string): Promise<Models.Membership>;
146
- /**
147
- * Get team preferences
148
- *
149
- * Get the team&#039;s shared preferences by its unique ID. If a preference doesn&#039;t need to be shared by all team members, prefer storing them in [user preferences](https://appconda.io/docs/references/cloud/client-web/account#getPrefs).
150
- *
151
- * @param {string} teamId
152
- * @throws {AppcondaException}
153
- * @returns {Promise<Preferences>}
154
- */
155
- getPrefs<Preferences extends Models.Preferences>(teamId: string): Promise<Preferences>;
156
- /**
157
- * Update preferences
158
- *
159
- * Update the team&#039;s preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded.
160
- *
161
- * @param {string} teamId
162
- * @param {object} prefs
163
- * @throws {AppcondaException}
164
- * @returns {Promise<Preferences>}
165
- */
166
- updatePrefs<Preferences extends Models.Preferences>(teamId: string, prefs: object): Promise<Preferences>;
167
- }
@@ -1,12 +0,0 @@
1
- import { Client } from "../client";
2
- export declare class TenantSubscription {
3
- client: Client;
4
- constructor(client: Client);
5
- getOrPersistTenantSubscription(tenantId: string): Promise<ArrayBuffer>;
6
- getTenantSubscriptions(): Promise<any>;
7
- createTenantSubscription(tenantId: string, stripeCustomerId: string): Promise<{
8
- id: string;
9
- tenantId: string;
10
- stripeCustomerId: string;
11
- }>;
12
- }
@@ -1,32 +0,0 @@
1
- import { Models } from "../client";
2
- import { ServiceClient } from "../service-client";
3
- export type TenantSimple = {
4
- id: string;
5
- name: string;
6
- slug: string;
7
- icon: string | null;
8
- deactivatedReason: string | null;
9
- types: any[];
10
- active: boolean;
11
- };
12
- export declare class Tenant extends ServiceClient {
13
- getServiceName(): string;
14
- get(tenantId: string): Promise<Models.Tenant>;
15
- /**
16
- * Create account
17
- *
18
- * 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).
19
- *
20
- * @param {string} tenantId
21
- * @param {string} name
22
- * @param {string} slug
23
- * @throws {AppcondaException}
24
- * @returns {Promise<Models.User<Preferences>>}
25
- */
26
- create({ $id, name, slug }: Models.Tenant): Promise<Models.Tenant>;
27
- list(queries?: string[], search?: string): Promise<Models.TenantList>;
28
- listUserTenants(userId: string, queries?: string[], search?: string): Promise<Models.TenantUserList>;
29
- listTenantUsers(tenantId: string, queries?: string[], search?: string): Promise<Models.TenantUserList>;
30
- createTenantUser({ tenantId, userId }: Models.TenantUser): Promise<Models.TenantUser>;
31
- adminGetAllTenantsIdsAndNames(): Promise<TenantSimple[]>;
32
- }