@appconda/sdk 1.0.555 → 1.0.556
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/package.json +1 -1
- package/src/modules/emploid/schema.ts +1 -1
- package/dist/EmploidClient.d.ts +0 -52
- package/dist/EmploidClient.js +0 -78
- package/dist/client.d.ts +0 -149
- package/dist/client.js +0 -408
- package/dist/enums/api-service.d.ts +0 -13
- package/dist/enums/api-service.js +0 -15
- package/dist/enums/api.d.ts +0 -5
- package/dist/enums/api.js +0 -7
- package/dist/enums/auth-method.d.ts +0 -9
- package/dist/enums/auth-method.js +0 -11
- package/dist/enums/browser.d.ts +0 -16
- package/dist/enums/browser.js +0 -18
- package/dist/enums/compression.d.ts +0 -5
- package/dist/enums/compression.js +0 -7
- package/dist/enums/credit-card.d.ts +0 -18
- package/dist/enums/credit-card.js +0 -20
- package/dist/enums/database-usage-range.d.ts +0 -5
- package/dist/enums/database-usage-range.js +0 -7
- package/dist/enums/email-template-locale.d.ts +0 -133
- package/dist/enums/email-template-locale.js +0 -135
- package/dist/enums/email-template-type.d.ts +0 -9
- package/dist/enums/email-template-type.js +0 -11
- package/dist/enums/entities/EntityLimitType.d.ts +0 -4
- package/dist/enums/entities/EntityLimitType.js +0 -6
- package/dist/enums/entities/PropertyAttributeName.d.ts +0 -27
- package/dist/enums/entities/PropertyAttributeName.js +0 -29
- package/dist/enums/entities/PropertyCondition.d.ts +0 -7
- package/dist/enums/entities/PropertyCondition.js +0 -10
- package/dist/enums/entities/PropertyType.d.ts +0 -12
- package/dist/enums/entities/PropertyType.js +0 -18
- package/dist/enums/entities/PropertyValueType.d.ts +0 -6
- package/dist/enums/entities/PropertyValueType.js +0 -8
- package/dist/enums/entities/RowAccess.d.ts +0 -2
- package/dist/enums/entities/RowAccess.js +0 -2
- package/dist/enums/entities/ViewFilterCondition.d.ts +0 -12
- package/dist/enums/entities/ViewFilterCondition.js +0 -14
- package/dist/enums/execution-method.d.ts +0 -8
- package/dist/enums/execution-method.js +0 -10
- package/dist/enums/flag.d.ts +0 -197
- package/dist/enums/flag.js +0 -199
- package/dist/enums/function-usage-range.d.ts +0 -5
- package/dist/enums/function-usage-range.js +0 -7
- package/dist/enums/image-format.d.ts +0 -7
- package/dist/enums/image-format.js +0 -9
- package/dist/enums/image-gravity.d.ts +0 -11
- package/dist/enums/image-gravity.js +0 -13
- package/dist/enums/index-type.d.ts +0 -5
- package/dist/enums/index-type.js +0 -7
- package/dist/enums/messaging-provider-type.d.ts +0 -5
- package/dist/enums/messaging-provider-type.js +0 -7
- package/dist/enums/name.d.ts +0 -14
- package/dist/enums/name.js +0 -16
- package/dist/enums/o-auth-provider copy.d.ts +0 -41
- package/dist/enums/o-auth-provider copy.js +0 -43
- package/dist/enums/password-hash.d.ts +0 -13
- package/dist/enums/password-hash.js +0 -15
- package/dist/enums/platform-type.d.ts +0 -17
- package/dist/enums/platform-type.js +0 -19
- package/dist/enums/project-usage-range.d.ts +0 -4
- package/dist/enums/project-usage-range.js +0 -6
- package/dist/enums/region.d.ts +0 -4
- package/dist/enums/region.js +0 -6
- package/dist/enums/relation-mutate.d.ts +0 -5
- package/dist/enums/relation-mutate.js +0 -7
- package/dist/enums/relationship-type.d.ts +0 -6
- package/dist/enums/relationship-type.js +0 -8
- package/dist/enums/resource-type.d.ts +0 -4
- package/dist/enums/resource-type.js +0 -6
- package/dist/enums/runtime.d.ts +0 -48
- package/dist/enums/runtime.js +0 -50
- package/dist/enums/s-m-t-p-secure.d.ts +0 -3
- package/dist/enums/s-m-t-p-secure.js +0 -5
- package/dist/enums/shared/ApplicationLayout.d.ts +0 -4
- package/dist/enums/shared/ApplicationLayout.js +0 -6
- package/dist/enums/shared/Colors.d.ts +0 -24
- package/dist/enums/shared/Colors.js +0 -26
- package/dist/enums/shared/InputType.d.ts +0 -6
- package/dist/enums/shared/InputType.js +0 -8
- package/dist/enums/shared/Periodicity.d.ts +0 -7
- package/dist/enums/shared/Periodicity.js +0 -9
- package/dist/enums/shared/SvgIcon.d.ts +0 -37
- package/dist/enums/shared/SvgIcon.js +0 -39
- package/dist/enums/shared/Theme.d.ts +0 -4
- package/dist/enums/shared/Theme.js +0 -6
- package/dist/enums/sms-template-locale.d.ts +0 -133
- package/dist/enums/sms-template-locale.js +0 -135
- package/dist/enums/sms-template-type.d.ts +0 -6
- package/dist/enums/sms-template-type.js +0 -8
- package/dist/enums/smtp-encryption.d.ts +0 -5
- package/dist/enums/smtp-encryption.js +0 -7
- package/dist/enums/storage-usage-range.d.ts +0 -5
- package/dist/enums/storage-usage-range.js +0 -7
- package/dist/enums/subscriptions/PricingModel.d.ts +0 -11
- package/dist/enums/subscriptions/PricingModel.js +0 -12
- package/dist/enums/subscriptions/SubscriptionBillingPeriod.d.ts +0 -10
- package/dist/enums/subscriptions/SubscriptionBillingPeriod.js +0 -11
- package/dist/enums/subscriptions/SubscriptionFeatureLimitType.d.ts +0 -10
- package/dist/enums/subscriptions/SubscriptionFeatureLimitType.js +0 -13
- package/dist/enums/subscriptions/SubscriptionPriceType.d.ts +0 -7
- package/dist/enums/subscriptions/SubscriptionPriceType.js +0 -8
- package/dist/enums/tenants/LinkedAccountStatus.d.ts +0 -5
- package/dist/enums/tenants/LinkedAccountStatus.js +0 -7
- package/dist/enums/tenants/TenantUserJoined.d.ts +0 -6
- package/dist/enums/tenants/TenantUserJoined.js +0 -8
- package/dist/enums/tenants/TenantUserStatus.d.ts +0 -6
- package/dist/enums/tenants/TenantUserStatus.js +0 -8
- package/dist/enums/tenants/TenantUserType.d.ts +0 -5
- package/dist/enums/tenants/TenantUserType.js +0 -7
- package/dist/enums/user-usage-range.d.ts +0 -5
- package/dist/enums/user-usage-range.js +0 -7
- package/dist/getAppcondaClient.d.ts +0 -14
- package/dist/getAppcondaClient.js +0 -60
- package/dist/getSDKForService.d.ts +0 -22
- package/dist/getSDKForService.js +0 -72
- package/dist/id.d.ts +0 -20
- package/dist/id.js +0 -45
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -6
- package/dist/lib/errors.d.ts +0 -70
- package/dist/lib/errors.js +0 -79
- package/dist/lib/index.d.ts +0 -0
- package/dist/lib/index.js +0 -1
- package/dist/lib/types.d.ts +0 -5
- package/dist/lib/types.js +0 -2
- package/dist/models.d.ts +0 -3272
- package/dist/models.js +0 -2
- package/dist/modules/account/enums/authentication-factor.d.ts +0 -6
- package/dist/modules/account/enums/authentication-factor.js +0 -8
- package/dist/modules/account/enums/authenticator-type.d.ts +0 -3
- package/dist/modules/account/enums/authenticator-type.js +0 -5
- package/dist/modules/account/enums/o-auth-provider.d.ts +0 -41
- package/dist/modules/account/enums/o-auth-provider.js +0 -43
- package/dist/modules/account/index.d.ts +0 -2
- package/dist/modules/account/index.js +0 -3
- package/dist/modules/account/schema.d.ts +0 -7
- package/dist/modules/account/schema.js +0 -8
- package/dist/modules/account/service.d.ts +0 -530
- package/dist/modules/account/service.js +0 -1263
- package/dist/modules/account/types.d.ts +0 -411
- package/dist/modules/account/types.js +0 -2
- package/dist/modules/accounv1/index.d.ts +0 -3
- package/dist/modules/accounv1/index.js +0 -4
- package/dist/modules/accounv1/schema.d.ts +0 -43
- package/dist/modules/accounv1/schema.js +0 -44
- package/dist/modules/accounv1/service.d.ts +0 -14
- package/dist/modules/accounv1/service.js +0 -28
- package/dist/modules/accounv1/types.d.ts +0 -14
- package/dist/modules/accounv1/types.js +0 -2
- package/dist/modules/acl/service.d.ts +0 -26
- package/dist/modules/acl/service.js +0 -27
- package/dist/modules/agent/index.d.ts +0 -3
- package/dist/modules/agent/index.js +0 -4
- package/dist/modules/agent/schema.d.ts +0 -20
- package/dist/modules/agent/schema.js +0 -21
- package/dist/modules/agent/service.d.ts +0 -12
- package/dist/modules/agent/service.js +0 -22
- package/dist/modules/agent/types.d.ts +0 -11
- package/dist/modules/agent/types.js +0 -2
- package/dist/modules/ai/index.d.ts +0 -1
- package/dist/modules/ai/index.js +0 -2
- package/dist/modules/ai/node/index.d.ts +0 -1
- package/dist/modules/ai/node/index.js +0 -2
- package/dist/modules/ai/node/service.d.ts +0 -5
- package/dist/modules/ai/node/service.js +0 -12
- package/dist/modules/bpm/index.d.ts +0 -3
- package/dist/modules/bpm/index.js +0 -4
- package/dist/modules/bpm/schema.d.ts +0 -18
- package/dist/modules/bpm/schema.js +0 -19
- package/dist/modules/bpm/service.d.ts +0 -11
- package/dist/modules/bpm/service.js +0 -20
- package/dist/modules/bpm/types.d.ts +0 -9
- package/dist/modules/bpm/types.js +0 -2
- package/dist/modules/builder/index.d.ts +0 -3
- package/dist/modules/builder/index.js +0 -4
- package/dist/modules/builder/schema.d.ts +0 -80
- package/dist/modules/builder/schema.js +0 -81
- package/dist/modules/builder/service.d.ts +0 -22
- package/dist/modules/builder/service.js +0 -52
- package/dist/modules/builder/types.d.ts +0 -62
- package/dist/modules/builder/types.js +0 -2
- package/dist/modules/datasource/index.d.ts +0 -3
- package/dist/modules/datasource/index.js +0 -4
- package/dist/modules/datasource/schema.d.ts +0 -55
- package/dist/modules/datasource/schema.js +0 -56
- package/dist/modules/datasource/service.d.ts +0 -19
- package/dist/modules/datasource/service.js +0 -43
- package/dist/modules/datasource/types.d.ts +0 -28
- package/dist/modules/datasource/types.js +0 -2
- package/dist/modules/emploid/index.d.ts +0 -3
- package/dist/modules/emploid/index.js +0 -4
- package/dist/modules/emploid/schema.d.ts +0 -1057
- package/dist/modules/emploid/schema.js +0 -1019
- package/dist/modules/emploid/service.d.ts +0 -198
- package/dist/modules/emploid/service.js +0 -575
- package/dist/modules/emploid/types.d.ts +0 -350
- package/dist/modules/emploid/types.js +0 -2
- package/dist/modules/google/index.d.ts +0 -3
- package/dist/modules/google/index.js +0 -4
- package/dist/modules/google/schema.d.ts +0 -13
- package/dist/modules/google/schema.js +0 -14
- package/dist/modules/google/service.d.ts +0 -10
- package/dist/modules/google/service.js +0 -16
- package/dist/modules/google/types.d.ts +0 -12
- package/dist/modules/google/types.js +0 -2
- package/dist/modules/hooks/index.d.ts +0 -2
- package/dist/modules/hooks/index.js +0 -3
- package/dist/modules/hooks/lib/Hooks.d.ts +0 -32
- package/dist/modules/hooks/lib/Hooks.js +0 -64
- package/dist/modules/hooks/lib/jobs/index.d.ts +0 -2
- package/dist/modules/hooks/lib/jobs/index.js +0 -3
- package/dist/modules/hooks/lib/jobs/job1.d.ts +0 -1
- package/dist/modules/hooks/lib/jobs/job1.js +0 -16
- package/dist/modules/hooks/lib/jobs/log-job.d.ts +0 -1
- package/dist/modules/hooks/lib/jobs/log-job.js +0 -9
- package/dist/modules/hooks/lib/wait.d.ts +0 -8
- package/dist/modules/hooks/lib/wait.js +0 -13
- package/dist/modules/index.d.ts +0 -18
- package/dist/modules/index.js +0 -19
- package/dist/modules/mail/index.d.ts +0 -3
- package/dist/modules/mail/index.js +0 -4
- package/dist/modules/mail/schema.d.ts +0 -6
- package/dist/modules/mail/schema.js +0 -7
- package/dist/modules/mail/service.d.ts +0 -8
- package/dist/modules/mail/service.js +0 -10
- package/dist/modules/mail/types.d.ts +0 -6
- package/dist/modules/mail/types.js +0 -2
- package/dist/modules/notion/index.d.ts +0 -3
- package/dist/modules/notion/index.js +0 -4
- package/dist/modules/notion/schema.d.ts +0 -13
- package/dist/modules/notion/schema.js +0 -14
- package/dist/modules/notion/service.d.ts +0 -10
- package/dist/modules/notion/service.js +0 -19
- package/dist/modules/notion/types.d.ts +0 -11
- package/dist/modules/notion/types.js +0 -2
- package/dist/modules/organization/index.d.ts +0 -3
- package/dist/modules/organization/index.js +0 -4
- package/dist/modules/organization/schema.d.ts +0 -31
- package/dist/modules/organization/schema.js +0 -27
- package/dist/modules/organization/service.d.ts +0 -13
- package/dist/modules/organization/service.js +0 -25
- package/dist/modules/organization/types.d.ts +0 -11
- package/dist/modules/organization/types.js +0 -2
- package/dist/modules/scheduled-job/index.d.ts +0 -5
- package/dist/modules/scheduled-job/index.js +0 -6
- package/dist/modules/scheduled-job/lib/Schedules.d.ts +0 -34
- package/dist/modules/scheduled-job/lib/Schedules.js +0 -65
- package/dist/modules/scheduled-job/lib/jobs/index.d.ts +0 -1
- package/dist/modules/scheduled-job/lib/jobs/index.js +0 -2
- package/dist/modules/scheduled-job/lib/jobs/job1.d.ts +0 -1
- package/dist/modules/scheduled-job/lib/jobs/job1.js +0 -10
- package/dist/modules/scheduled-job/lib/wait.d.ts +0 -8
- package/dist/modules/scheduled-job/lib/wait.js +0 -13
- package/dist/modules/scheduled-job/schema.d.ts +0 -39
- package/dist/modules/scheduled-job/schema.js +0 -40
- package/dist/modules/scheduled-job/service.d.ts +0 -20
- package/dist/modules/scheduled-job/service.js +0 -46
- package/dist/modules/scheduled-job/types.d.ts +0 -66
- package/dist/modules/scheduled-job/types.js +0 -2
- package/dist/modules/scrapflow/index.d.ts +0 -2
- package/dist/modules/scrapflow/index.js +0 -3
- package/dist/modules/scrapflow/schema.d.ts +0 -105
- package/dist/modules/scrapflow/schema.js +0 -106
- package/dist/modules/scrapflow/service.d.ts +0 -24
- package/dist/modules/scrapflow/service.js +0 -61
- package/dist/modules/scrapflow/types.d.ts +0 -0
- package/dist/modules/scrapflow/types.js +0 -1
- package/dist/modules/task/index.d.ts +0 -3
- package/dist/modules/task/index.js +0 -4
- package/dist/modules/task/schema.d.ts +0 -355
- package/dist/modules/task/schema.js +0 -371
- package/dist/modules/task/service.d.ts +0 -69
- package/dist/modules/task/service.js +0 -193
- package/dist/modules/task/types.d.ts +0 -293
- package/dist/modules/task/types.js +0 -37
- package/dist/modules/tenant/index.d.ts +0 -2
- package/dist/modules/tenant/index.js +0 -3
- package/dist/modules/tenant/schema.d.ts +0 -26
- package/dist/modules/tenant/schema.js +0 -28
- package/dist/modules/tenant/service.d.ts +0 -14
- package/dist/modules/tenant/service.js +0 -28
- package/dist/modules/tenant/tenant.d.ts +0 -32
- package/dist/modules/tenant/tenant.js +0 -125
- package/dist/modules/tenant/types.d.ts +0 -20
- package/dist/modules/tenant/types.js +0 -2
- package/dist/modules/waitlist/index.d.ts +0 -3
- package/dist/modules/waitlist/index.js +0 -4
- package/dist/modules/waitlist/schema.d.ts +0 -17
- package/dist/modules/waitlist/schema.js +0 -18
- package/dist/modules/waitlist/service.d.ts +0 -13
- package/dist/modules/waitlist/service.js +0 -28
- package/dist/modules/waitlist/types.d.ts +0 -14
- package/dist/modules/waitlist/types.js +0 -2
- package/dist/permission.d.ts +0 -43
- package/dist/permission.js +0 -54
- package/dist/query.d.ts +0 -194
- package/dist/query.js +0 -204
- package/dist/role.d.ts +0 -70
- package/dist/role.js +0 -94
- package/dist/service-client.d.ts +0 -10
- package/dist/service-client.js +0 -31
- package/dist/service.d.ts +0 -11
- package/dist/service.js +0 -23
- package/dist/services/applets.d.ts +0 -9
- package/dist/services/applets.js +0 -40
- package/dist/services/avatars.d.ts +0 -115
- package/dist/services/avatars.js +0 -251
- package/dist/services/chat-flow.d.ts +0 -7
- package/dist/services/chat-flow.js +0 -26
- package/dist/services/community.d.ts +0 -19
- package/dist/services/community.js +0 -69
- package/dist/services/configuration.d.ts +0 -5
- package/dist/services/configuration.js +0 -11
- package/dist/services/databases.d.ts +0 -613
- package/dist/services/databases.js +0 -1736
- package/dist/services/functions.d.ts +0 -319
- package/dist/services/functions.js +0 -810
- package/dist/services/graphql.d.ts +0 -25
- package/dist/services/graphql.js +0 -57
- package/dist/services/health.d.ts +0 -231
- package/dist/services/health.js +0 -463
- package/dist/services/locale.d.ts +0 -80
- package/dist/services/locale.js +0 -144
- package/dist/services/messaging.d.ts +0 -685
- package/dist/services/messaging.js +0 -1920
- package/dist/services/permissions.d.ts +0 -20
- package/dist/services/permissions.js +0 -90
- package/dist/services/pricing.d.ts +0 -15
- package/dist/services/pricing.js +0 -21
- package/dist/services/projects.d.ts +0 -542
- package/dist/services/projects.js +0 -1526
- package/dist/services/roles.d.ts +0 -19
- package/dist/services/roles.js +0 -72
- package/dist/services/schema.d.ts +0 -17
- package/dist/services/schema.js +0 -48
- package/dist/services/storage.d.ts +0 -189
- package/dist/services/storage.js +0 -474
- package/dist/services/subscription.d.ts +0 -15
- package/dist/services/subscription.js +0 -30
- package/dist/services/teams.d.ts +0 -167
- package/dist/services/teams.js +0 -395
- package/dist/services/tenant-subscription.d.ts +0 -12
- package/dist/services/tenant-subscription.js +0 -52
- package/dist/services/users.d.ts +0 -499
- package/dist/services/users.js +0 -1283
package/dist/services/roles.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Client, Models } from "../client";
|
|
2
|
-
export declare class Roles {
|
|
3
|
-
client: Client;
|
|
4
|
-
constructor(client: Client);
|
|
5
|
-
get(roleId: string): Promise<Models.Role>;
|
|
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
|
-
create({ $id, name, description }: Models.Role): Promise<Models.Tenant>;
|
|
18
|
-
list(queries?: string[], search?: string): Promise<Models.RoleList>;
|
|
19
|
-
}
|
package/dist/services/roles.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { AppcondaException } from "../client";
|
|
2
|
-
export class Roles {
|
|
3
|
-
constructor(client) {
|
|
4
|
-
this.client = client;
|
|
5
|
-
}
|
|
6
|
-
async get(roleId) {
|
|
7
|
-
if (typeof roleId === 'undefined') {
|
|
8
|
-
throw new AppcondaException('Missing required parameter: "tenantId"');
|
|
9
|
-
}
|
|
10
|
-
const apiPath = '/roles/{roleId}'.replace('{roleId}', roleId);
|
|
11
|
-
const payload = {};
|
|
12
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13
|
-
const apiHeaders = {
|
|
14
|
-
'content-type': 'application/json',
|
|
15
|
-
};
|
|
16
|
-
return await this.client.call('get', uri, apiHeaders, payload);
|
|
17
|
-
}
|
|
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} tenantId
|
|
24
|
-
* @param {string} name
|
|
25
|
-
* @param {string} slug
|
|
26
|
-
* @throws {AppcondaException}
|
|
27
|
-
* @returns {Promise<Models.User<Preferences>>}
|
|
28
|
-
*/
|
|
29
|
-
async create({ $id, name, description }) {
|
|
30
|
-
if (typeof $id === 'undefined') {
|
|
31
|
-
throw new AppcondaException('Missing required parameter: "roleId"');
|
|
32
|
-
}
|
|
33
|
-
if (typeof name === 'undefined') {
|
|
34
|
-
throw new AppcondaException('Missing required parameter: "name"');
|
|
35
|
-
}
|
|
36
|
-
if (typeof description === 'undefined') {
|
|
37
|
-
throw new AppcondaException('Missing required parameter: "description"');
|
|
38
|
-
}
|
|
39
|
-
const apiPath = '/roles';
|
|
40
|
-
const payload = {};
|
|
41
|
-
if (typeof $id !== 'undefined') {
|
|
42
|
-
payload['roleId'] = $id;
|
|
43
|
-
}
|
|
44
|
-
if (typeof name !== 'undefined') {
|
|
45
|
-
payload['name'] = name;
|
|
46
|
-
}
|
|
47
|
-
if (typeof description !== 'undefined') {
|
|
48
|
-
payload['description'] = description;
|
|
49
|
-
}
|
|
50
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
51
|
-
const apiHeaders = {
|
|
52
|
-
'content-type': 'application/json',
|
|
53
|
-
};
|
|
54
|
-
return await this.client.call('post', uri, apiHeaders, payload);
|
|
55
|
-
}
|
|
56
|
-
async list(queries, search) {
|
|
57
|
-
const apiPath = '/roles';
|
|
58
|
-
const payload = {};
|
|
59
|
-
if (typeof queries !== 'undefined') {
|
|
60
|
-
payload['queries'] = queries;
|
|
61
|
-
}
|
|
62
|
-
if (typeof search !== 'undefined') {
|
|
63
|
-
payload['search'] = search;
|
|
64
|
-
}
|
|
65
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
66
|
-
const apiHeaders = {
|
|
67
|
-
'content-type': 'application/json',
|
|
68
|
-
};
|
|
69
|
-
return await this.client.call('get', uri, apiHeaders, payload);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm9sZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2VydmljZXMvcm9sZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGlCQUFpQixFQUEyQixNQUFNLFdBQVcsQ0FBQztBQUV2RSxNQUFNLE9BQU8sS0FBSztJQUdkLFlBQVksTUFBYztRQUN0QixJQUFJLENBQUMsTUFBTSxHQUFHLE1BQU0sQ0FBQztJQUN6QixDQUFDO0lBR0QsS0FBSyxDQUFDLEdBQUcsQ0FBQyxNQUFjO1FBQ3BCLElBQUksT0FBTyxNQUFNLEtBQUssV0FBVyxFQUFFLENBQUM7WUFDaEMsTUFBTSxJQUFJLGlCQUFpQixDQUFDLHdDQUF3QyxDQUFDLENBQUM7UUFDMUUsQ0FBQztRQUNELE1BQU0sT0FBTyxHQUFHLGlCQUFpQixDQUFDLE9BQU8sQ0FBQyxVQUFVLEVBQUUsTUFBTSxDQUFDLENBQUM7UUFDOUQsTUFBTSxPQUFPLEdBQVksRUFBRSxDQUFDO1FBQzVCLE1BQU0sR0FBRyxHQUFHLElBQUksR0FBRyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDLFFBQ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2ludCArIGFwaVBhdGgpO1xuXG4gICAgICAgIGNvbnN0IGFwaUhlYWRlcnM6IHsgW2hlYWRlcjogc3RyaW5nXTogc3RyaW5nIH0gPSB7XG4gICAgICAgICAgICAnY29udGVudC10eXBlJzogJ2FwcGxpY2F0aW9uL2pzb24nLFxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHRoaXMuY2xpZW50LmNhbGwoXG4gICAgICAgICAgICAnZ2V0JyxcbiAgICAgICAgICAgIHVyaSxcbiAgICAgICAgICAgIGFwaUhlYWRlcnMsXG4gICAgICAgICAgICBwYXlsb2FkLFxuICAgICAgICApO1xuICAgIH1cblxufSJdfQ==
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Client } from "../client";
|
|
2
|
-
export declare class Schemas {
|
|
3
|
-
client: Client;
|
|
4
|
-
constructor(client: Client);
|
|
5
|
-
/**
|
|
6
|
-
* Create account
|
|
7
|
-
*
|
|
8
|
-
* 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).
|
|
9
|
-
*
|
|
10
|
-
* @param {string} tenantId
|
|
11
|
-
* @param {string} name
|
|
12
|
-
* @param {string} slug
|
|
13
|
-
* @throws {AppcondaException}
|
|
14
|
-
* @returns {Promise<Models.User<Preferences>>}
|
|
15
|
-
*/
|
|
16
|
-
import(projectId: string, databaseId: string, databaseName: string, schema: string): Promise<any>;
|
|
17
|
-
}
|
package/dist/services/schema.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { AppcondaException } from "../client";
|
|
2
|
-
export class Schemas {
|
|
3
|
-
constructor(client) {
|
|
4
|
-
this.client = client;
|
|
5
|
-
}
|
|
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
|
-
async import(projectId, databaseId, databaseName, schema) {
|
|
18
|
-
if (typeof projectId === 'undefined') {
|
|
19
|
-
throw new AppcondaException('Missing required parameter: "projectId"');
|
|
20
|
-
}
|
|
21
|
-
if (typeof databaseId === 'undefined') {
|
|
22
|
-
throw new AppcondaException('Missing required parameter: "databaseId"');
|
|
23
|
-
}
|
|
24
|
-
if (typeof schema === 'undefined') {
|
|
25
|
-
throw new AppcondaException('Missing required parameter: "schema"');
|
|
26
|
-
}
|
|
27
|
-
const apiPath = `/schema/${projectId}/${databaseId}`;
|
|
28
|
-
const payload = {};
|
|
29
|
-
if (typeof projectId !== 'undefined') {
|
|
30
|
-
payload['projectId'] = projectId;
|
|
31
|
-
}
|
|
32
|
-
if (typeof databaseId !== 'undefined') {
|
|
33
|
-
payload['databaseId'] = databaseId;
|
|
34
|
-
}
|
|
35
|
-
if (typeof databaseName !== 'undefined') {
|
|
36
|
-
payload['databaseName'] = databaseName;
|
|
37
|
-
}
|
|
38
|
-
if (typeof schema !== 'undefined') {
|
|
39
|
-
payload['schema'] = schema;
|
|
40
|
-
}
|
|
41
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
42
|
-
const apiHeaders = {
|
|
43
|
-
'content-type': 'application/json',
|
|
44
|
-
};
|
|
45
|
-
return await this.client.call('post', uri, apiHeaders, payload);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uI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2VOYW1lO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHR5cGVvZiBzY2hlbWEgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICBwYXlsb2FkWydzY2hlbWEnXSA9IHNjaGVtYTtcbiAgICAgICAgfVxuICAgICBcbiAgICAgICAgY29uc3QgdXJpID0gbmV3IFVSTCh0aGlzLmNsaWVudC5jb25maWcuZW5kcG9pbnQgKyBhcGlQYXRoKTtcblxuICAgICAgICBjb25zdCBhcGlIZWFkZXJzOiB7IFtoZWFkZXI6IHN0cmluZ106IHN0cmluZyB9ID0ge1xuICAgICAgICAgICAgJ2NvbnRlbnQtdHlwZSc6ICdhcHBsaWNhdGlvbi9qc29uJyxcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBhd2FpdCB0aGlzLmNsaWVudC5jYWxsKFxuICAgICAgICAgICAgJ3Bvc3QnLFxuICAgICAgICAgICAgdXJpLFxuICAgICAgICAgICAgYXBpSGVhZGVycyxcbiAgICAgICAgICAgIHBheWxvYWQsXG4gICAgICAgICk7XG4gICAgfVxuXG59Il19
|
|
@@ -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'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'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 'Content-Disposition: attachment' 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 'Content-Disposition: attachment' 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
|
-
}
|