@wix/auto_sdk_data_permissions 1.0.15 → 1.0.17

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 (33) hide show
  1. package/build/cjs/index.d.ts +33 -22
  2. package/build/cjs/index.js +1 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/{data-v1-data-permissions-permissions.universal-B1qSIhq7.d.ts → index.typings.d.ts} +171 -54
  5. package/build/cjs/index.typings.js +422 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +46 -45
  8. package/build/cjs/meta.js.map +1 -1
  9. package/build/es/index.d.mts +33 -22
  10. package/build/es/index.mjs +1 -0
  11. package/build/es/index.mjs.map +1 -1
  12. package/build/es/{data-v1-data-permissions-permissions.universal-B1qSIhq7.d.mts → index.typings.d.mts} +171 -54
  13. package/build/es/index.typings.mjs +384 -0
  14. package/build/es/index.typings.mjs.map +1 -0
  15. package/build/es/meta.d.mts +46 -45
  16. package/build/es/meta.mjs.map +1 -1
  17. package/build/internal/cjs/index.d.ts +33 -22
  18. package/build/internal/cjs/index.js +1 -0
  19. package/build/internal/cjs/index.js.map +1 -1
  20. package/build/internal/cjs/{data-v1-data-permissions-permissions.universal-B1qSIhq7.d.ts → index.typings.d.ts} +171 -54
  21. package/build/internal/cjs/index.typings.js +422 -0
  22. package/build/internal/cjs/index.typings.js.map +1 -0
  23. package/build/internal/cjs/meta.d.ts +46 -45
  24. package/build/internal/cjs/meta.js.map +1 -1
  25. package/build/internal/es/index.d.mts +33 -22
  26. package/build/internal/es/index.mjs +1 -0
  27. package/build/internal/es/index.mjs.map +1 -1
  28. package/build/internal/es/{data-v1-data-permissions-permissions.universal-B1qSIhq7.d.mts → index.typings.d.mts} +171 -54
  29. package/build/internal/es/index.typings.mjs +384 -0
  30. package/build/internal/es/index.typings.mjs.map +1 -0
  31. package/build/internal/es/meta.d.mts +46 -45
  32. package/build/internal/es/meta.mjs.map +1 -1
  33. package/package.json +2 -2
@@ -1,57 +1,68 @@
1
1
  import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { G as GetPermissionsResponse, D as DataPermissions, U as UpdatePermissionsResponse, A as AddSpecialPermissionsOptions, a as AddSpecialPermissionsResponse, b as UpdateSpecialPermissions, c as UpdateSpecialPermissionsResponse, d as GetMyPermissionsResponse } from './data-v1-data-permissions-permissions.universal-B1qSIhq7.js';
3
- export { f as Access, e as AccessLevel, ad as ActionEvent, n as AddSpecialPermissionsRequest, T as Condition, V as ConditionOperator, W as ConditionOperatorOperatorsOneOf, C as ConditionType, F as ConditionTypeOfOneOf, Y as ConditionValue, Z as ConditionValueValueOneOf, a0 as DependOnOperator, a7 as DomainEvent, a8 as DomainEventBodyOneOf, E as Effect, a3 as Empty, a9 as EntityCreatedEvent, ac as EntityDeletedEvent, ab as EntityUpdatedEvent, N as EnvironmentCondition, O as EnvironmentConditionConditionOneOf, X as EqualOperator, Q as ExperimentCondition, $ as ExperimentOperator, q as GetMyPermissionsRequest, l as GetPermissionsRequest, L as JoinedCondition, J as JoinedConditionOperator, _ as LikeOperator, M as MigrateCustomRolesRequest, r as MigrateCustomRolesResponse, u as PolicyAssigned, x as PolicyAssignment, a2 as PolicyAssignmentUpdated, s as PolicyAssignmentsUpdated, t as PolicyAssignmentsUpdatedEventOneOf, a4 as PolicyAuthorizationDataUpdated, B as PolicyCondition, a6 as PolicyOwner, i as PolicyOwnerType, a5 as PolicyStatement, P as PolicyType, a1 as PolicyUnassigned, R as RemoveSpecialPermissionsRequest, p as RemoveSpecialPermissionsResponse, z as Resource, y as ResourcePath, aa as RestoreInfo, H as SimpleCondition, h as SimpleConditionOperator, I as SimpleConditionValue, K as SimpleConditionValueValueOneOf, j as SpecialPermissions, k as SpecialPermissionsSubjectOneOf, v as Subject, w as SubjectContext, g as SubjectContextType, S as SubjectType, m as UpdatePermissionsRequest, o as UpdateSpecialPermissionsRequest } from './data-v1-data-permissions-permissions.universal-B1qSIhq7.js';
2
+ import { GetPermissionsResponse, GetPermissionsApplicationErrors, DataPermissions, UpdatePermissionsResponse, AddSpecialPermissionsOptions, AddSpecialPermissionsResponse, AddSpecialPermissionsApplicationErrors, UpdateSpecialPermissions, UpdateSpecialPermissionsResponse, UpdateSpecialPermissionsApplicationErrors, RemoveSpecialPermissionsApplicationErrors, GetMyPermissionsResponse } from './index.typings.js';
3
+ export { Access, AccessLevel, ActionEvent, AddSpecialPermissionsRequest, Condition, ConditionOperator, ConditionOperatorOperatorsOneOf, ConditionType, ConditionTypeOfOneOf, ConditionValue, ConditionValueValueOneOf, DependOnOperator, DomainEvent, DomainEventBodyOneOf, Effect, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EnvironmentCondition, EnvironmentConditionConditionOneOf, EqualOperator, ExperimentCondition, ExperimentOperator, GetMyPermissionsRequest, GetPermissionsRequest, JoinedCondition, JoinedConditionOperator, LikeOperator, MigrateCustomRolesRequest, MigrateCustomRolesResponse, PolicyAssigned, PolicyAssignment, PolicyAssignmentUpdated, PolicyAssignmentsUpdated, PolicyAssignmentsUpdatedEventOneOf, PolicyAuthorizationDataUpdated, PolicyCondition, PolicyOwner, PolicyOwnerType, PolicyStatement, PolicyType, PolicyUnassigned, RemoveSpecialPermissionsRequest, RemoveSpecialPermissionsResponse, Resource, ResourcePath, RestoreInfo, SimpleCondition, SimpleConditionOperator, SimpleConditionValue, SimpleConditionValueValueOneOf, SpecialPermissions, SpecialPermissionsSubjectOneOf, Subject, SubjectContext, SubjectContextType, SubjectType, UpdatePermissionsRequest, UpdateSpecialPermissionsRequest } from './index.typings.js';
4
4
 
5
5
  declare function getPermissions$1(httpClient: HttpClient): GetPermissionsSignature;
6
6
  interface GetPermissionsSignature {
7
7
  /**
8
- * Returns data permissions for a data collection
9
- * @param - Data Collection ID to get permissions for
8
+ * Retrieves the current permissions configuration for a data collection.
9
+ * @param - ID of the data collection to retrieve permissions for.
10
10
  */
11
- (dataCollectionId: string): Promise<GetPermissionsResponse>;
11
+ (dataCollectionId: string): Promise<GetPermissionsResponse & {
12
+ __applicationErrorsType?: GetPermissionsApplicationErrors | undefined;
13
+ }>;
12
14
  }
13
15
  declare function updatePermissions$1(httpClient: HttpClient): UpdatePermissionsSignature;
14
16
  interface UpdatePermissionsSignature {
15
17
  /**
16
- * Updates data permissions for a data collection
18
+ * Updates permissions configuration for the specified data collection.
17
19
  *
18
- * NOTE that special permissions are not updated using this API, use dedicated methods for it.
19
- * @param - Data permissions to update
20
+ * > **Note:** To manage special permissions, call Add Special Permissions ([SDK](https://dev.wix.com/docs/sdk/backend-modules/data/permissions/add-special-permissions) | [REST](https://dev.wix.com/docs/rest/business-solutions/cms/data-permissions/add-special-permissions)), Update Special Permissions ([SDK](https://dev.wix.com/docs/sdk/backend-modules/data/permissions/update-special-permissions) | [REST](https://dev.wix.com/docs/rest/business-solutions/cms/data-permissions/update-special-permissions)), or Remove Special Permissions ([SDK](https://dev.wix.com/docs/sdk/backend-modules/data/permissions/remove-special-permissions) | [REST](https://dev.wix.com/docs/rest/business-solutions/cms/data-permissions/remove-special-permissions)).
21
+ * @param - Permissions to update.
20
22
  */
21
23
  (dataPermissions: DataPermissions): Promise<UpdatePermissionsResponse>;
22
24
  }
23
25
  declare function addSpecialPermissions$1(httpClient: HttpClient): AddSpecialPermissionsSignature;
24
26
  interface AddSpecialPermissionsSignature {
25
27
  /**
26
- * Adds special data permissions for particular user/group
27
- * Errors:
28
- * - `ALREADY_EXISTS` in case if special permission for same subject already exists
29
- * @param - Data Collection ID to add special permission for
28
+ * Adds special permissions to a specific user or role for the specified data collection.
29
+ *
30
+ * Special permissions allow specific users or roles to perform actions that would otherwise be restricted by the collection's access levels ([SDK](ADDLINK) | [REST](ADDLINK)).
31
+ * @param - ID of the data collection to grant special permissions for.
30
32
  */
31
- (dataCollectionId: string, options: AddSpecialPermissionsOptions): Promise<AddSpecialPermissionsResponse>;
33
+ (dataCollectionId: string, options: AddSpecialPermissionsOptions): Promise<AddSpecialPermissionsResponse & {
34
+ __applicationErrorsType?: AddSpecialPermissionsApplicationErrors | undefined;
35
+ }>;
32
36
  }
33
37
  declare function updateSpecialPermissions$1(httpClient: HttpClient): UpdateSpecialPermissionsSignature;
34
38
  interface UpdateSpecialPermissionsSignature {
35
39
  /**
36
- * Updates special data permissions for particular user/group.
37
- * Any omitted permissions will be set to UNSPECIFIED.
38
- * @param - ID of this special access, so it can be managed separately
40
+ * Updates the special permissions for a specific user or role.
41
+ *
42
+ * > **Note:** Special permissions that aren't explicitly included in the request are set to `UNSPECIFIED` and are replaced by the collection's general access levels.
43
+ * @param - ID of the special permissions.
39
44
  */
40
- (_id: string, specialPermissions: UpdateSpecialPermissions): Promise<UpdateSpecialPermissionsResponse>;
45
+ (_id: string, specialPermissions: UpdateSpecialPermissions): Promise<UpdateSpecialPermissionsResponse & {
46
+ __applicationErrorsType?: UpdateSpecialPermissionsApplicationErrors | undefined;
47
+ }>;
41
48
  }
42
49
  declare function removeSpecialPermissions$1(httpClient: HttpClient): RemoveSpecialPermissionsSignature;
43
50
  interface RemoveSpecialPermissionsSignature {
44
51
  /**
45
- * Deletes special data permissions for particular user/group
46
- * @param - Special permissions ID to remove
52
+ * Removes special permissions from a specific user or role.
53
+ *
54
+ * After special permissions are removed, the user or role is subject to the collection's general access levels for all actions.
55
+ * @param - ID of the special permissions to remove.
47
56
  */
48
- (specialPermissionsId: string): Promise<void>;
57
+ (specialPermissionsId: string): Promise<void & {
58
+ __applicationErrorsType?: RemoveSpecialPermissionsApplicationErrors | undefined;
59
+ }>;
49
60
  }
50
61
  declare function getMyPermissions$1(httpClient: HttpClient): GetMyPermissionsSignature;
51
62
  interface GetMyPermissionsSignature {
52
63
  /**
53
- * Returns current user permissions for given data collection
54
- * @param - Data Collection ID to get permission for
64
+ * Retrieves the current user's permissions for a data collection.
65
+ * @param - ID of the data collection to check permissions for.
55
66
  */
56
67
  (dataCollectionId: string): Promise<GetMyPermissionsResponse>;
57
68
  }
@@ -361,6 +361,7 @@ async function removeSpecialPermissions2(specialPermissionsId) {
361
361
  try {
362
362
  const result = await httpClient.request(reqOpts);
363
363
  sideEffects?.onSuccess?.(result);
364
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
364
365
  } catch (err) {
365
366
  const transformedError = (0, import_transform_error.transformError)(
366
367
  err,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/data-v1-data-permissions-permissions.universal.ts","../../src/data-v1-data-permissions-permissions.http.ts","../../src/data-v1-data-permissions-permissions.public.ts","../../src/data-v1-data-permissions-permissions.context.ts"],"sourcesContent":["export * from './src/data-v1-data-permissions-permissions.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixDataV1DataPermissions from './data-v1-data-permissions-permissions.http.js';\n\n/**\n * Permissions configuration of a data collection.\n *\n * Describes who can perform certain data operations on a collection.\n */\nexport interface DataPermissions {\n /**\n * Data Collection ID that is subject of these permissions\n * @immutable\n * @maxLength 255\n */\n _id?: string;\n /** Access level for data items read */\n itemRead?: AccessLevelWithLiterals;\n /** Access level for data items insert */\n itemInsert?: AccessLevelWithLiterals;\n /** Access level for data items update */\n itemUpdate?: AccessLevelWithLiterals;\n /** Access level for data items removal */\n itemRemove?: AccessLevelWithLiterals;\n}\n\n/**\n * Describes who can perform certain action.\n * Each level includes all levels below it (except UNDEFINED).\n */\nexport enum AccessLevel {\n /** Not set */\n UNKNOWN = 'UNKNOWN',\n /** Any subject, including visitors */\n ANYONE = 'ANYONE',\n /** Any signed-in user (both site members and collaborators) */\n SITE_MEMBER = 'SITE_MEMBER',\n /** Any signed-in user, but site members only have access to own items */\n SITE_MEMBER_AUTHOR = 'SITE_MEMBER_AUTHOR',\n /** Site collaborator that has a role with CMS Access permission */\n CMS_EDITOR = 'CMS_EDITOR',\n /** CMS administrators and users or roles granted with special access */\n PRIVILEGED = 'PRIVILEGED',\n}\n\n/** @enumType */\nexport type AccessLevelWithLiterals =\n | AccessLevel\n | 'UNKNOWN'\n | 'ANYONE'\n | 'SITE_MEMBER'\n | 'SITE_MEMBER_AUTHOR'\n | 'CMS_EDITOR'\n | 'PRIVILEGED';\n\n/** Special access granted to user or role */\nexport interface SpecialPermissions extends SpecialPermissionsSubjectOneOf {\n /**\n * User ID that is subject of these permissions\n * @immutable\n * @maxLength 64\n */\n userId?: string;\n /**\n * Policy ID of (custom) role that is subject of these permissions\n * @immutable\n * @maxLength 64\n */\n policyId?: string;\n /**\n * ID of this special access, so it can be managed separately\n * @format GUID\n * @readonly\n */\n _id?: string;\n /** If data item read is allowed */\n itemRead?: AccessWithLiterals;\n /** If data item insert is allowed */\n itemInsert?: AccessWithLiterals;\n /** If data item update is allowed */\n itemUpdate?: AccessWithLiterals;\n /** If data item remove is allowed */\n itemRemove?: AccessWithLiterals;\n}\n\n/** @oneof */\nexport interface SpecialPermissionsSubjectOneOf {\n /**\n * User ID that is subject of these permissions\n * @immutable\n * @maxLength 64\n */\n userId?: string;\n /**\n * Policy ID of (custom) role that is subject of these permissions\n * @immutable\n * @maxLength 64\n */\n policyId?: string;\n}\n\nexport enum Access {\n /** Action is not specifically allowed, but can be allowed by top-level permissions */\n UNSPECIFIED = 'UNSPECIFIED',\n /** Action is specifically allowed */\n ALLOWED = 'ALLOWED',\n}\n\n/** @enumType */\nexport type AccessWithLiterals = Access | 'UNSPECIFIED' | 'ALLOWED';\n\nexport interface GetPermissionsRequest {\n /**\n * Data Collection ID to get permissions for\n * @maxLength 256\n */\n dataCollectionId: string;\n}\n\nexport interface GetPermissionsResponse {\n /** Requested data permissions */\n dataPermissions?: DataPermissions;\n}\n\nexport interface UpdatePermissionsRequest {\n /** Data permissions to update */\n dataPermissions: DataPermissions;\n}\n\nexport interface UpdatePermissionsResponse {\n /** Updated data permissions */\n dataPermissions?: DataPermissions;\n}\n\nexport interface AddSpecialPermissionsRequest {\n /**\n * Data Collection ID to add special permission for\n * @maxLength 256\n */\n dataCollectionId: string;\n /** Special permissions to add */\n specialPermissions: SpecialPermissions;\n}\n\nexport interface AddSpecialPermissionsResponse {\n /** Added special data permissions */\n specialPermissions?: SpecialPermissions;\n}\n\nexport interface UpdateSpecialPermissionsRequest {\n /** Special permissions to update */\n specialPermissions: SpecialPermissions;\n}\n\nexport interface UpdateSpecialPermissionsResponse {\n /** Updated special data permissions */\n specialPermissions?: SpecialPermissions;\n}\n\nexport interface RemoveSpecialPermissionsRequest {\n /**\n * Special permissions ID to remove\n * @format GUID\n */\n specialPermissionsId: string;\n}\n\nexport interface RemoveSpecialPermissionsResponse {}\n\nexport interface GetMyPermissionsRequest {\n /**\n * Data Collection ID to get permission for\n * @maxLength 256\n */\n dataCollectionId: string;\n}\n\nexport interface GetMyPermissionsResponse {\n /** If data item read is allowed */\n itemRead?: boolean;\n /** If data item insert is allowed */\n itemInsert?: boolean;\n /** If data item update is allowed */\n itemUpdate?: boolean;\n /** If data item remove is allowed */\n itemRemove?: boolean;\n}\n\nexport interface MigrateCustomRolesRequest {\n /**\n * Role ID to update, if empty updates all roles in scope\n * @format GUID\n */\n policyId?: string | null;\n}\n\nexport interface MigrateCustomRolesResponse {}\n\nexport interface PolicyAssignmentsUpdated\n extends PolicyAssignmentsUpdatedEventOneOf {\n policyAssigned?: PolicyAssigned;\n policyUnassigned?: PolicyUnassigned;\n policyAssignmentUpdated?: PolicyAssignmentUpdated;\n}\n\n/** @oneof */\nexport interface PolicyAssignmentsUpdatedEventOneOf {\n policyAssigned?: PolicyAssigned;\n policyUnassigned?: PolicyUnassigned;\n policyAssignmentUpdated?: PolicyAssignmentUpdated;\n}\n\nexport interface PolicyAssigned {\n subject?: Subject;\n assignment?: PolicyAssignment[];\n}\n\nexport interface Subject {\n /** ID of identity assigned to the asset. */\n _id?: string;\n /** Type of identity assigned to the asset. Supported subject types include user IDs, account IDs, and app IDs. */\n subjectType?: SubjectTypeWithLiterals;\n /** Context of identity assigned to the asset. For example, a `subjectType` = `USER` will have `context` = `ACCOUNT`. */\n context?: SubjectContext;\n}\n\nexport enum SubjectType {\n UNKNOWN = 'UNKNOWN',\n ACCOUNT = 'ACCOUNT',\n USER = 'USER',\n USER_GROUP = 'USER_GROUP',\n MEMBER_GROUP = 'MEMBER_GROUP',\n VISITOR_GROUP = 'VISITOR_GROUP',\n EXTERNAL_APP = 'EXTERNAL_APP',\n ACCOUNT_GROUP = 'ACCOUNT_GROUP',\n WIX_APP = 'WIX_APP',\n}\n\n/** @enumType */\nexport type SubjectTypeWithLiterals =\n | SubjectType\n | 'UNKNOWN'\n | 'ACCOUNT'\n | 'USER'\n | 'USER_GROUP'\n | 'MEMBER_GROUP'\n | 'VISITOR_GROUP'\n | 'EXTERNAL_APP'\n | 'ACCOUNT_GROUP'\n | 'WIX_APP';\n\nexport interface SubjectContext {\n _id?: string;\n contextType?: SubjectContextTypeWithLiterals;\n}\n\nexport enum SubjectContextType {\n UNKNOWN_CTX = 'UNKNOWN_CTX',\n ORG_CTX = 'ORG_CTX',\n ACCOUNT_CTX = 'ACCOUNT_CTX',\n}\n\n/** @enumType */\nexport type SubjectContextTypeWithLiterals =\n | SubjectContextType\n | 'UNKNOWN_CTX'\n | 'ORG_CTX'\n | 'ACCOUNT_CTX';\n\nexport interface PolicyAssignment {\n policyId?: string;\n resource?: ResourcePath;\n condition?: PolicyCondition;\n assignmentId?: string | null;\n}\n\nexport interface ResourcePath {\n organization?: string | null;\n account?: string | null;\n site?: string | null;\n resource?: Resource;\n}\n\n/**\n * A custom resource. Is used to represent some asset that is not a direct resource context (site or account), but something custom.\n * For example: payment method, blog post, domain, logo.\n */\nexport interface Resource {\n /** The resource id. */\n _id?: string | null;\n /** The resource type */\n type?: string | null;\n}\n\nexport interface PolicyCondition {\n /** The type of the condition */\n condition?: ConditionType;\n}\n\nexport interface ConditionType extends ConditionTypeOfOneOf {\n /** @deprecated */\n simpleCondition?: SimpleCondition;\n /** A logic combination between several conditions, with an operator between them */\n joinedConditions?: JoinedCondition;\n /** @deprecated */\n environmentCondition?: EnvironmentCondition;\n /** A single condition */\n condition?: Condition;\n}\n\n/** @oneof */\nexport interface ConditionTypeOfOneOf {\n /** @deprecated */\n simpleCondition?: SimpleCondition;\n /** A logic combination between several conditions, with an operator between them */\n joinedConditions?: JoinedCondition;\n /** @deprecated */\n environmentCondition?: EnvironmentCondition;\n /** A single condition */\n condition?: Condition;\n}\n\nexport interface SimpleCondition {\n attrName?: string;\n value?: SimpleConditionValue;\n op?: SimpleConditionOperatorWithLiterals;\n conditionModelId?: string;\n}\n\nexport interface SimpleConditionValue extends SimpleConditionValueValueOneOf {\n attrName?: string;\n stringValue?: string;\n boolValue?: boolean;\n}\n\n/** @oneof */\nexport interface SimpleConditionValueValueOneOf {\n attrName?: string;\n stringValue?: string;\n boolValue?: boolean;\n}\n\nexport enum SimpleConditionOperator {\n UNKNOWN_SIMPLE_OP = 'UNKNOWN_SIMPLE_OP',\n EQUAL = 'EQUAL',\n}\n\n/** @enumType */\nexport type SimpleConditionOperatorWithLiterals =\n | SimpleConditionOperator\n | 'UNKNOWN_SIMPLE_OP'\n | 'EQUAL';\n\nexport interface JoinedCondition {\n /** The operator that should be used when evaluating the condition */\n op?: JoinedConditionOperatorWithLiterals;\n /** The conditions that should be evaluated, and then joined using the operator provided */\n conditions?: ConditionType[];\n}\n\nexport enum JoinedConditionOperator {\n UNKNOWN_JOIN_OP = 'UNKNOWN_JOIN_OP',\n OR = 'OR',\n AND = 'AND',\n}\n\n/** @enumType */\nexport type JoinedConditionOperatorWithLiterals =\n | JoinedConditionOperator\n | 'UNKNOWN_JOIN_OP'\n | 'OR'\n | 'AND';\n\nexport interface EnvironmentCondition\n extends EnvironmentConditionConditionOneOf {\n experimentCondition?: ExperimentCondition;\n}\n\n/** @oneof */\nexport interface EnvironmentConditionConditionOneOf {\n experimentCondition?: ExperimentCondition;\n}\n\nexport interface ExperimentCondition {\n spec?: string;\n fallbackValue?: string;\n expectedValue?: string;\n}\n\nexport interface Condition {\n /** The unique identifier of the condition model. Indicates which actions the condition is working on */\n conditionModelId?: string;\n /** The operator that should be evaluated */\n operator?: ConditionOperator;\n}\n\nexport interface ConditionOperator extends ConditionOperatorOperatorsOneOf {\n /** Comparison of equality - will be evaluated to true if the given parties are equal */\n equals?: EqualOperator;\n /** Regex operator - will be evaluated to true if the given value matches the provided regex */\n like?: LikeOperator;\n /** Petri experiment - will be evaluated using petri. */\n experiment?: ExperimentOperator;\n /** Operator that indicates a dependency on another subject being allowed to perform something. */\n dependOn?: DependOnOperator;\n}\n\n/** @oneof */\nexport interface ConditionOperatorOperatorsOneOf {\n /** Comparison of equality - will be evaluated to true if the given parties are equal */\n equals?: EqualOperator;\n /** Regex operator - will be evaluated to true if the given value matches the provided regex */\n like?: LikeOperator;\n /** Petri experiment - will be evaluated using petri. */\n experiment?: ExperimentOperator;\n /** Operator that indicates a dependency on another subject being allowed to perform something. */\n dependOn?: DependOnOperator;\n}\n\nexport interface EqualOperator {\n /** The attribute which should be compared. The attribute will be first evaluated to a value, and then compared the other side (attribute/value) */\n attrName?: string;\n /** The value to compare to. If the two parties are equal - we will return true. */\n value?: ConditionValue;\n}\n\nexport interface ConditionValue extends ConditionValueValueOneOf {\n /** an attribute. We'll first retrieve the value of the attribute (from the request or from pre-indexed values), and then compare to what it needs to be compared with. */\n attrName?: string;\n /** a value with a string type. Will be compared to the attribute provided, and be true only if they match the operator. */\n stringValue?: string;\n /** a value with a boolean type. Will be compared to the attribute provided, and be true only if they match the operator. */\n boolValue?: boolean;\n}\n\n/** @oneof */\nexport interface ConditionValueValueOneOf {\n /** an attribute. We'll first retrieve the value of the attribute (from the request or from pre-indexed values), and then compare to what it needs to be compared with. */\n attrName?: string;\n /** a value with a string type. Will be compared to the attribute provided, and be true only if they match the operator. */\n stringValue?: string;\n /** a value with a boolean type. Will be compared to the attribute provided, and be true only if they match the operator. */\n boolValue?: boolean;\n}\n\nexport interface LikeOperator {\n /** The attribute which should be compared. The attribute will be first evaluated to a value, and then compared the regex values provided. */\n attrName?: string;\n /** The regex values which the attribute value should be evaluated on. If the attribute value matches at least one of the regular expressions provided - we will return true */\n values?: string[];\n}\n\nexport interface ExperimentOperator {\n /** The spec to conduct the experiment on. */\n spec?: string;\n /** The value to use if the experiment could not be conducted */\n fallbackValue?: string;\n /** The expected value of the experiment conduction. If it matches the actual value - true will be returned. Otherwise - false. */\n expectedValue?: string;\n}\n\n/** Implies that the policy takes affect only if the depend on subject is permitted as well. */\nexport interface DependOnOperator {\n /** The subject on which the current entry depends on. If the subject is allowed to perform what the query was about - the condition will be evaluated to true. Otherwise - false */\n dependOnSubject?: Subject;\n}\n\nexport interface PolicyUnassigned {\n subject?: Subject;\n assignment?: PolicyAssignment[];\n}\n\nexport interface PolicyAssignmentUpdated {\n subject?: Subject;\n fromAssignment?: PolicyAssignment[];\n toAssignment?: PolicyAssignment[];\n}\n\nexport interface Empty {}\n\nexport interface PolicyAuthorizationDataUpdated {\n policyId?: string;\n fromPolicyStatements?: PolicyStatement[];\n toPolicyStatements?: PolicyStatement[];\n policyType?: PolicyTypeWithLiterals;\n policyOwner?: PolicyOwner;\n}\n\nexport interface PolicyStatement {\n /** @readonly */\n _id?: string | null;\n permissions?: string[];\n scopes?: string[];\n effect?: EffectWithLiterals;\n condition?: PolicyCondition;\n}\n\nexport enum Effect {\n UNKNOWN_EFFECT = 'UNKNOWN_EFFECT',\n ALLOW = 'ALLOW',\n DENY = 'DENY',\n}\n\n/** @enumType */\nexport type EffectWithLiterals = Effect | 'UNKNOWN_EFFECT' | 'ALLOW' | 'DENY';\n\nexport enum PolicyType {\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n PREDEFINED = 'PREDEFINED',\n CUSTOM = 'CUSTOM',\n INLINE_CUSTOM = 'INLINE_CUSTOM',\n}\n\n/** @enumType */\nexport type PolicyTypeWithLiterals =\n | PolicyType\n | 'UNKNOWN_STATUS'\n | 'PREDEFINED'\n | 'CUSTOM'\n | 'INLINE_CUSTOM';\n\nexport interface PolicyOwner {\n type?: PolicyOwnerTypeWithLiterals;\n _id?: string;\n}\n\nexport enum PolicyOwnerType {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n WIX = 'WIX',\n WIX_ACCOUNT = 'WIX_ACCOUNT',\n}\n\n/** @enumType */\nexport type PolicyOwnerTypeWithLiterals =\n | PolicyOwnerType\n | 'UNKNOWN_TYPE'\n | 'WIX'\n | 'WIX_ACCOUNT';\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\ntype DataPermissionsNonNullablePaths =\n | `_id`\n | `itemRead`\n | `itemInsert`\n | `itemUpdate`\n | `itemRemove`;\n\n/**\n * Returns data permissions for a data collection\n * @param dataCollectionId - Data Collection ID to get permissions for\n * @public\n * @documentationMaturity preview\n * @requiredField dataCollectionId\n * @permissionId WIX_DATA.PERMISSIONS_READ\n * @applicableIdentity APP\n * @fqn wix.cloud.permissions.v1.DataPermissionsService.GetPermissions\n */\nexport async function getPermissions(\n dataCollectionId: string\n): Promise<\n NonNullablePaths<\n GetPermissionsResponse,\n {\n [P in DataPermissionsNonNullablePaths]: `dataPermissions.${P}`;\n }[DataPermissionsNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n dataCollectionId: dataCollectionId,\n });\n\n const reqOpts = ambassadorWixDataV1DataPermissions.getPermissions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { dataCollectionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates data permissions for a data collection\n *\n * NOTE that special permissions are not updated using this API, use dedicated methods for it.\n * @param dataPermissions - Data permissions to update\n * @public\n * @documentationMaturity preview\n * @requiredField dataPermissions\n * @requiredField dataPermissions._id\n * @requiredField dataPermissions.itemInsert\n * @requiredField dataPermissions.itemRead\n * @requiredField dataPermissions.itemRemove\n * @requiredField dataPermissions.itemUpdate\n * @permissionId WIX_DATA.PERMISSIONS_UPDATE\n * @applicableIdentity APP\n * @fqn wix.cloud.permissions.v1.DataPermissionsService.UpdatePermissions\n */\nexport async function updatePermissions(\n dataPermissions: NonNullablePaths<\n DataPermissions,\n `_id` | `itemInsert` | `itemRead` | `itemRemove` | `itemUpdate`\n >\n): Promise<\n NonNullablePaths<\n UpdatePermissionsResponse,\n {\n [P in DataPermissionsNonNullablePaths]: `dataPermissions.${P}`;\n }[DataPermissionsNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n dataPermissions: dataPermissions,\n });\n\n const reqOpts = ambassadorWixDataV1DataPermissions.updatePermissions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { dataPermissions: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['dataPermissions']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Adds special data permissions for particular user/group\n * Errors:\n * - `ALREADY_EXISTS` in case if special permission for same subject already exists\n * @param dataCollectionId - Data Collection ID to add special permission for\n * @public\n * @documentationMaturity preview\n * @requiredField dataCollectionId\n * @requiredField options\n * @requiredField options.specialPermissions\n * @permissionId WIX_DATA.PERMISSIONS_UPDATE_SPECIAL\n * @applicableIdentity APP\n * @fqn wix.cloud.permissions.v1.DataPermissionsService.AddSpecialPermissions\n */\nexport async function addSpecialPermissions(\n dataCollectionId: string,\n options: NonNullablePaths<AddSpecialPermissionsOptions, `specialPermissions`>\n): Promise<\n NonNullablePaths<\n AddSpecialPermissionsResponse,\n | `specialPermissions.userId`\n | `specialPermissions.policyId`\n | `specialPermissions._id`\n | `specialPermissions.itemRead`\n | `specialPermissions.itemInsert`\n | `specialPermissions.itemUpdate`\n | `specialPermissions.itemRemove`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n dataCollectionId: dataCollectionId,\n specialPermissions: options?.specialPermissions,\n });\n\n const reqOpts =\n ambassadorWixDataV1DataPermissions.addSpecialPermissions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n dataCollectionId: '$[0]',\n specialPermissions: '$[1].specialPermissions',\n },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface AddSpecialPermissionsOptions {\n /** Special permissions to add */\n specialPermissions: SpecialPermissions;\n}\n\n/**\n * Updates special data permissions for particular user/group.\n * Any omitted permissions will be set to UNSPECIFIED.\n * @param _id - ID of this special access, so it can be managed separately\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField specialPermissions\n * @permissionId WIX_DATA.PERMISSIONS_UPDATE_SPECIAL\n * @applicableIdentity APP\n * @fqn wix.cloud.permissions.v1.DataPermissionsService.UpdateSpecialPermissions\n */\nexport async function updateSpecialPermissions(\n _id: string,\n specialPermissions: UpdateSpecialPermissions\n): Promise<\n NonNullablePaths<\n UpdateSpecialPermissionsResponse,\n | `specialPermissions.userId`\n | `specialPermissions.policyId`\n | `specialPermissions._id`\n | `specialPermissions.itemRead`\n | `specialPermissions.itemInsert`\n | `specialPermissions.itemUpdate`\n | `specialPermissions.itemRemove`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n specialPermissions: { ...specialPermissions, id: _id },\n });\n\n const reqOpts =\n ambassadorWixDataV1DataPermissions.updateSpecialPermissions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { specialPermissions: '$[1]' },\n explicitPathsToArguments: { 'specialPermissions.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'specialPermissions']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateSpecialPermissions {\n /**\n * User ID that is subject of these permissions\n * @immutable\n * @maxLength 64\n */\n userId?: string;\n /**\n * Policy ID of (custom) role that is subject of these permissions\n * @immutable\n * @maxLength 64\n */\n policyId?: string;\n /**\n * ID of this special access, so it can be managed separately\n * @format GUID\n * @readonly\n */\n _id?: string;\n /** If data item read is allowed */\n itemRead?: AccessWithLiterals;\n /** If data item insert is allowed */\n itemInsert?: AccessWithLiterals;\n /** If data item update is allowed */\n itemUpdate?: AccessWithLiterals;\n /** If data item remove is allowed */\n itemRemove?: AccessWithLiterals;\n}\n\n/**\n * Deletes special data permissions for particular user/group\n * @param specialPermissionsId - Special permissions ID to remove\n * @public\n * @documentationMaturity preview\n * @requiredField specialPermissionsId\n * @permissionId WIX_DATA.PERMISSIONS_UPDATE_SPECIAL\n * @applicableIdentity APP\n * @fqn wix.cloud.permissions.v1.DataPermissionsService.RemoveSpecialPermissions\n */\nexport async function removeSpecialPermissions(\n specialPermissionsId: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n specialPermissionsId: specialPermissionsId,\n });\n\n const reqOpts =\n ambassadorWixDataV1DataPermissions.removeSpecialPermissions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { specialPermissionsId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['specialPermissionsId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Returns current user permissions for given data collection\n * @param dataCollectionId - Data Collection ID to get permission for\n * @public\n * @documentationMaturity preview\n * @requiredField dataCollectionId\n * @permissionId WIX_DATA.PERMISSIONS_GET_ALLOWED\n * @applicableIdentity APP\n * @fqn wix.cloud.permissions.v1.DataPermissionsService.GetMyPermissions\n */\nexport async function getMyPermissions(\n dataCollectionId: string\n): Promise<\n NonNullablePaths<\n GetMyPermissionsResponse,\n `itemRead` | `itemInsert` | `itemUpdate` | `itemRemove`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n dataCollectionId: dataCollectionId,\n });\n\n const reqOpts = ambassadorWixDataV1DataPermissions.getMyPermissions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { dataCollectionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCloudPermissionsV1DataPermissionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/permissions',\n destPath: '/v1/permissions',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/permissions',\n destPath: '/v1/permissions',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/permissions',\n destPath: '/v1/permissions',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/cloud-data/v1/permissions',\n destPath: '/v1/permissions',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_data_permissions';\n\n/** Returns data permissions for a data collection */\nexport function getPermissions(payload: object): RequestOptionsFactory<any> {\n function __getPermissions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.data_permissions',\n method: 'GET' as any,\n methodFqn:\n 'wix.cloud.permissions.v1.DataPermissionsService.GetPermissions',\n packageName: PACKAGE_NAME,\n url: resolveWixCloudPermissionsV1DataPermissionsServiceUrl({\n protoPath: '/v1/permissions',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getPermissions;\n}\n\n/**\n * Updates data permissions for a data collection\n *\n * NOTE that special permissions are not updated using this API, use dedicated methods for it.\n */\nexport function updatePermissions(payload: object): RequestOptionsFactory<any> {\n function __updatePermissions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.data_permissions',\n method: 'POST' as any,\n methodFqn:\n 'wix.cloud.permissions.v1.DataPermissionsService.UpdatePermissions',\n packageName: PACKAGE_NAME,\n url: resolveWixCloudPermissionsV1DataPermissionsServiceUrl({\n protoPath: '/v1/permissions',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __updatePermissions;\n}\n\n/**\n * Adds special data permissions for particular user/group\n * Errors:\n * - `ALREADY_EXISTS` in case if special permission for same subject already exists\n */\nexport function addSpecialPermissions(\n payload: object\n): RequestOptionsFactory<any> {\n function __addSpecialPermissions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.data_permissions',\n method: 'POST' as any,\n methodFqn:\n 'wix.cloud.permissions.v1.DataPermissionsService.AddSpecialPermissions',\n packageName: PACKAGE_NAME,\n url: resolveWixCloudPermissionsV1DataPermissionsServiceUrl({\n protoPath: '/v1/permissions/special',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __addSpecialPermissions;\n}\n\n/**\n * Updates special data permissions for particular user/group.\n * Any omitted permissions will be set to UNSPECIFIED.\n */\nexport function updateSpecialPermissions(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateSpecialPermissions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.data_permissions',\n method: 'POST' as any,\n methodFqn:\n 'wix.cloud.permissions.v1.DataPermissionsService.UpdateSpecialPermissions',\n packageName: PACKAGE_NAME,\n url: resolveWixCloudPermissionsV1DataPermissionsServiceUrl({\n protoPath: '/v1/permissions/special/{specialPermissions.id}',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __updateSpecialPermissions;\n}\n\n/** Deletes special data permissions for particular user/group */\nexport function removeSpecialPermissions(\n payload: object\n): RequestOptionsFactory<any> {\n function __removeSpecialPermissions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.data_permissions',\n method: 'DELETE' as any,\n methodFqn:\n 'wix.cloud.permissions.v1.DataPermissionsService.RemoveSpecialPermissions',\n packageName: PACKAGE_NAME,\n url: resolveWixCloudPermissionsV1DataPermissionsServiceUrl({\n protoPath: '/v1/permissions/special/{specialPermissionsId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __removeSpecialPermissions;\n}\n\n/** Returns current user permissions for given data collection */\nexport function getMyPermissions(payload: object): RequestOptionsFactory<any> {\n function __getMyPermissions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.data_permissions',\n method: 'GET' as any,\n methodFqn:\n 'wix.cloud.permissions.v1.DataPermissionsService.GetMyPermissions',\n packageName: PACKAGE_NAME,\n url: resolveWixCloudPermissionsV1DataPermissionsServiceUrl({\n protoPath: '/v1/permissions/current',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getMyPermissions;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n AddSpecialPermissionsOptions,\n AddSpecialPermissionsResponse,\n DataPermissions,\n GetMyPermissionsResponse,\n GetPermissionsResponse,\n UpdatePermissionsResponse,\n UpdateSpecialPermissions,\n UpdateSpecialPermissionsResponse,\n addSpecialPermissions as universalAddSpecialPermissions,\n getMyPermissions as universalGetMyPermissions,\n getPermissions as universalGetPermissions,\n removeSpecialPermissions as universalRemoveSpecialPermissions,\n updatePermissions as universalUpdatePermissions,\n updateSpecialPermissions as universalUpdateSpecialPermissions,\n} from './data-v1-data-permissions-permissions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/data' };\n\nexport function getPermissions(\n httpClient: HttpClient\n): GetPermissionsSignature {\n return (dataCollectionId: string) =>\n universalGetPermissions(\n dataCollectionId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetPermissionsSignature {\n /**\n * Returns data permissions for a data collection\n * @param - Data Collection ID to get permissions for\n */\n (dataCollectionId: string): Promise<GetPermissionsResponse>;\n}\n\nexport function updatePermissions(\n httpClient: HttpClient\n): UpdatePermissionsSignature {\n return (\n dataPermissions: NonNullablePaths<\n DataPermissions,\n `_id` | `itemInsert` | `itemRead` | `itemRemove` | `itemUpdate`\n >\n ) =>\n universalUpdatePermissions(\n dataPermissions,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdatePermissionsSignature {\n /**\n * Updates data permissions for a data collection\n *\n * NOTE that special permissions are not updated using this API, use dedicated methods for it.\n * @param - Data permissions to update\n */\n (dataPermissions: DataPermissions): Promise<UpdatePermissionsResponse>;\n}\n\nexport function addSpecialPermissions(\n httpClient: HttpClient\n): AddSpecialPermissionsSignature {\n return (\n dataCollectionId: string,\n options: NonNullablePaths<\n AddSpecialPermissionsOptions,\n `specialPermissions`\n >\n ) =>\n universalAddSpecialPermissions(\n dataCollectionId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface AddSpecialPermissionsSignature {\n /**\n * Adds special data permissions for particular user/group\n * Errors:\n * - `ALREADY_EXISTS` in case if special permission for same subject already exists\n * @param - Data Collection ID to add special permission for\n */\n (\n dataCollectionId: string,\n options: AddSpecialPermissionsOptions\n ): Promise<AddSpecialPermissionsResponse>;\n}\n\nexport function updateSpecialPermissions(\n httpClient: HttpClient\n): UpdateSpecialPermissionsSignature {\n return (_id: string, specialPermissions: UpdateSpecialPermissions) =>\n universalUpdateSpecialPermissions(\n _id,\n specialPermissions,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateSpecialPermissionsSignature {\n /**\n * Updates special data permissions for particular user/group.\n * Any omitted permissions will be set to UNSPECIFIED.\n * @param - ID of this special access, so it can be managed separately\n */\n (\n _id: string,\n specialPermissions: UpdateSpecialPermissions\n ): Promise<UpdateSpecialPermissionsResponse>;\n}\n\nexport function removeSpecialPermissions(\n httpClient: HttpClient\n): RemoveSpecialPermissionsSignature {\n return (specialPermissionsId: string) =>\n universalRemoveSpecialPermissions(\n specialPermissionsId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RemoveSpecialPermissionsSignature {\n /**\n * Deletes special data permissions for particular user/group\n * @param - Special permissions ID to remove\n */\n (specialPermissionsId: string): Promise<void>;\n}\n\nexport function getMyPermissions(\n httpClient: HttpClient\n): GetMyPermissionsSignature {\n return (dataCollectionId: string) =>\n universalGetMyPermissions(\n dataCollectionId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetMyPermissionsSignature {\n /**\n * Returns current user permissions for given data collection\n * @param - Data Collection ID to get permission for\n */\n (dataCollectionId: string): Promise<GetMyPermissionsResponse>;\n}\n\nexport {\n Access,\n AccessLevel,\n ActionEvent,\n AddSpecialPermissionsOptions,\n AddSpecialPermissionsRequest,\n AddSpecialPermissionsResponse,\n Condition,\n ConditionOperator,\n ConditionOperatorOperatorsOneOf,\n ConditionType,\n ConditionTypeOfOneOf,\n ConditionValue,\n ConditionValueValueOneOf,\n DataPermissions,\n DependOnOperator,\n DomainEvent,\n DomainEventBodyOneOf,\n Effect,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EnvironmentCondition,\n EnvironmentConditionConditionOneOf,\n EqualOperator,\n ExperimentCondition,\n ExperimentOperator,\n GetMyPermissionsRequest,\n GetMyPermissionsResponse,\n GetPermissionsRequest,\n GetPermissionsResponse,\n JoinedCondition,\n JoinedConditionOperator,\n LikeOperator,\n MigrateCustomRolesRequest,\n MigrateCustomRolesResponse,\n PolicyAssigned,\n PolicyAssignment,\n PolicyAssignmentUpdated,\n PolicyAssignmentsUpdated,\n PolicyAssignmentsUpdatedEventOneOf,\n PolicyAuthorizationDataUpdated,\n PolicyCondition,\n PolicyOwner,\n PolicyOwnerType,\n PolicyStatement,\n PolicyType,\n PolicyUnassigned,\n RemoveSpecialPermissionsRequest,\n RemoveSpecialPermissionsResponse,\n Resource,\n ResourcePath,\n RestoreInfo,\n SimpleCondition,\n SimpleConditionOperator,\n SimpleConditionValue,\n SimpleConditionValueValueOneOf,\n SpecialPermissions,\n SpecialPermissionsSubjectOneOf,\n Subject,\n SubjectContext,\n SubjectContextType,\n SubjectType,\n UpdatePermissionsRequest,\n UpdatePermissionsResponse,\n UpdateSpecialPermissions,\n UpdateSpecialPermissionsRequest,\n UpdateSpecialPermissionsResponse,\n} from './data-v1-data-permissions-permissions.universal.js';\n","import {\n getPermissions as publicGetPermissions,\n updatePermissions as publicUpdatePermissions,\n addSpecialPermissions as publicAddSpecialPermissions,\n updateSpecialPermissions as publicUpdateSpecialPermissions,\n removeSpecialPermissions as publicRemoveSpecialPermissions,\n getMyPermissions as publicGetMyPermissions,\n} from './data-v1-data-permissions-permissions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getPermissions: MaybeContext<\n BuildRESTFunction<typeof publicGetPermissions> & typeof publicGetPermissions\n> = /*#__PURE__*/ createRESTModule(publicGetPermissions);\nexport const updatePermissions: MaybeContext<\n BuildRESTFunction<typeof publicUpdatePermissions> &\n typeof publicUpdatePermissions\n> = /*#__PURE__*/ createRESTModule(publicUpdatePermissions);\nexport const addSpecialPermissions: MaybeContext<\n BuildRESTFunction<typeof publicAddSpecialPermissions> &\n typeof publicAddSpecialPermissions\n> = /*#__PURE__*/ createRESTModule(publicAddSpecialPermissions);\nexport const updateSpecialPermissions: MaybeContext<\n BuildRESTFunction<typeof publicUpdateSpecialPermissions> &\n typeof publicUpdateSpecialPermissions\n> = /*#__PURE__*/ createRESTModule(publicUpdateSpecialPermissions);\nexport const removeSpecialPermissions: MaybeContext<\n BuildRESTFunction<typeof publicRemoveSpecialPermissions> &\n typeof publicRemoveSpecialPermissions\n> = /*#__PURE__*/ createRESTModule(publicRemoveSpecialPermissions);\nexport const getMyPermissions: MaybeContext<\n BuildRESTFunction<typeof publicGetMyPermissions> &\n typeof publicGetMyPermissions\n> = /*#__PURE__*/ createRESTModule(publicGetMyPermissions);\n\nexport {\n AccessLevel,\n Access,\n SubjectType,\n SubjectContextType,\n SimpleConditionOperator,\n JoinedConditionOperator,\n Effect,\n PolicyType,\n PolicyOwnerType,\n} from './data-v1-data-permissions-permissions.universal.js';\nexport {\n DataPermissions,\n SpecialPermissions,\n SpecialPermissionsSubjectOneOf,\n GetPermissionsRequest,\n GetPermissionsResponse,\n UpdatePermissionsRequest,\n UpdatePermissionsResponse,\n AddSpecialPermissionsRequest,\n AddSpecialPermissionsResponse,\n UpdateSpecialPermissionsRequest,\n UpdateSpecialPermissionsResponse,\n RemoveSpecialPermissionsRequest,\n RemoveSpecialPermissionsResponse,\n GetMyPermissionsRequest,\n GetMyPermissionsResponse,\n MigrateCustomRolesRequest,\n MigrateCustomRolesResponse,\n PolicyAssignmentsUpdated,\n PolicyAssignmentsUpdatedEventOneOf,\n PolicyAssigned,\n Subject,\n SubjectContext,\n PolicyAssignment,\n ResourcePath,\n Resource,\n PolicyCondition,\n ConditionType,\n ConditionTypeOfOneOf,\n SimpleCondition,\n SimpleConditionValue,\n SimpleConditionValueValueOneOf,\n JoinedCondition,\n EnvironmentCondition,\n EnvironmentConditionConditionOneOf,\n ExperimentCondition,\n Condition,\n ConditionOperator,\n ConditionOperatorOperatorsOneOf,\n EqualOperator,\n ConditionValue,\n ConditionValueValueOneOf,\n LikeOperator,\n ExperimentOperator,\n DependOnOperator,\n PolicyUnassigned,\n PolicyAssignmentUpdated,\n Empty,\n PolicyAuthorizationDataUpdated,\n PolicyStatement,\n PolicyOwner,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n AddSpecialPermissionsOptions,\n UpdateSpecialPermissions,\n} from './data-v1-data-permissions-permissions.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,kBAAkB,OAAO;AAAA,QACrD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,kBAAkB;AAAA,IACrB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEj9BO,SAASM,gBACd,YACyB;AACzB,SAAO,CAAC,qBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAUO,SAASC,mBACd,YAC4B;AAC5B,SAAO,CACL,oBAKAA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAYO,SAASC,uBACd,YACgC;AAChC,SAAO,CACL,kBACA,YAKAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAeO,SAASC,0BACd,YACmC;AACnC,SAAO,CAAC,KAAa,uBACnBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAcO,SAASC,0BACd,YACmC;AACnC,SAAO,CAAC,yBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAUO,SAASC,kBACd,YAC2B;AAC3B,SAAO,CAAC,qBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC5IA,IAAAC,uBAAiC;AAG1B,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,yBAGK,2DAAiBA,sBAA2B;AACvD,IAAMC,4BAGK,2DAAiBA,yBAA8B;AAC1D,IAAMC,4BAGK,2DAAiBA,yBAA8B;AAC1D,IAAMC,oBAGK,2DAAiBA,iBAAsB;","names":["addSpecialPermissions","getMyPermissions","getPermissions","removeSpecialPermissions","updatePermissions","updateSpecialPermissions","import_rest_modules","AccessLevel","Access","SubjectType","SubjectContextType","SimpleConditionOperator","JoinedConditionOperator","Effect","PolicyType","PolicyOwnerType","getPermissions","sdkTransformError","updatePermissions","addSpecialPermissions","updateSpecialPermissions","removeSpecialPermissions","getMyPermissions","getPermissions","updatePermissions","addSpecialPermissions","updateSpecialPermissions","removeSpecialPermissions","getMyPermissions","import_rest_modules","getPermissions","updatePermissions","addSpecialPermissions","updateSpecialPermissions","removeSpecialPermissions","getMyPermissions"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/data-v1-data-permissions-permissions.universal.ts","../../src/data-v1-data-permissions-permissions.http.ts","../../src/data-v1-data-permissions-permissions.public.ts","../../src/data-v1-data-permissions-permissions.context.ts"],"sourcesContent":["export * from './src/data-v1-data-permissions-permissions.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixDataV1DataPermissions from './data-v1-data-permissions-permissions.http.js';\n\n/**\n * Permissions configuration for a data collection. These define the minimum access requirements for performing actions on collection items.\n *\n * Each action (read, insert, update, remove) can have a different access level requirement. Special permissions can override these default settings for specific users or roles, providing more granular control.\n */\nexport interface DataPermissions {\n /**\n * ID of the data collection these permissions apply to.\n * @immutable\n * @maxLength 255\n */\n _id?: string;\n /** Read items from the collection. */\n itemRead?: AccessLevelWithLiterals;\n /** Create new items in the collection. */\n itemInsert?: AccessLevelWithLiterals;\n /** Update existing items in the collection. */\n itemUpdate?: AccessLevelWithLiterals;\n /** Remove items from the collection. */\n itemRemove?: AccessLevelWithLiterals;\n}\n\n/** Minimum access level required to perform an action on collection items. Each access level includes the permissions of lower restriction levels */\nexport enum AccessLevel {\n /** Access level is not set. */\n UNKNOWN = 'UNKNOWN',\n /** Any user, including site visitors ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-identities#site-visitor) | [REST](https://dev.wix.com/docs/rest/articles/get-started/about-identities#site-visitor)). */\n ANYONE = 'ANYONE',\n /** Logged-in users, including site members ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-identities#site-member) | [REST](https://dev.wix.com/docs/rest/articles/get-started/about-identities#site-member)) and [collaborators](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site). */\n SITE_MEMBER = 'SITE_MEMBER',\n /** Logged-in site members ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-identities#site-member) | [REST](https://dev.wix.com/docs/rest/articles/get-started/about-identities#site-member)) and [collaborators](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site). Members can only access items they created. */\n SITE_MEMBER_AUTHOR = 'SITE_MEMBER_AUTHOR',\n /** Site [collaborators with a CMS role](https://support.wix.com/en/article/roles-permissions-overview#roles-for-integrated-wix-apps) permissions. */\n CMS_EDITOR = 'CMS_EDITOR',\n /**\n * Site administrators, users, or roles with special permissions.\n *\n * Learn more about [roles for site management](https://support.wix.com/en/article/roles-permissions-overview#general-roles-for-site-management).\n */\n PRIVILEGED = 'PRIVILEGED',\n}\n\n/** @enumType */\nexport type AccessLevelWithLiterals =\n | AccessLevel\n | 'UNKNOWN'\n | 'ANYONE'\n | 'SITE_MEMBER'\n | 'SITE_MEMBER_AUTHOR'\n | 'CMS_EDITOR'\n | 'PRIVILEGED';\n\nexport interface SpecialPermissions extends SpecialPermissionsSubjectOneOf {\n /**\n * ID of the user to add these special permissions to.\n * @immutable\n * @maxLength 64\n */\n userId?: string;\n /**\n * ID of the policy or role to add these special permissions to.\n * @immutable\n * @maxLength 64\n */\n policyId?: string;\n /**\n * ID of the special permissions.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /** Read items from the collection. */\n itemRead?: AccessWithLiterals;\n /** Create new items in the collection. */\n itemInsert?: AccessWithLiterals;\n /** Update existing items in the collection. */\n itemUpdate?: AccessWithLiterals;\n /** Remove items from the collection. */\n itemRemove?: AccessWithLiterals;\n}\n\n/** @oneof */\nexport interface SpecialPermissionsSubjectOneOf {\n /**\n * ID of the user to add these special permissions to.\n * @immutable\n * @maxLength 64\n */\n userId?: string;\n /**\n * ID of the policy or role to add these special permissions to.\n * @immutable\n * @maxLength 64\n */\n policyId?: string;\n}\n\nexport enum Access {\n /** No special permissions are specified for this action. The collection's default access level applies. */\n UNSPECIFIED = 'UNSPECIFIED',\n /** Special permission is granted to perform this action. This overrides the collection's access level configuration. */\n ALLOWED = 'ALLOWED',\n}\n\n/** @enumType */\nexport type AccessWithLiterals = Access | 'UNSPECIFIED' | 'ALLOWED';\n\nexport interface GetPermissionsRequest {\n /**\n * ID of the data collection to retrieve permissions for.\n * @maxLength 256\n */\n dataCollectionId: string;\n}\n\nexport interface GetPermissionsResponse {\n /** Permissions for the specified collection. */\n dataPermissions?: DataPermissions;\n}\n\nexport interface UpdatePermissionsRequest {\n /** Permissions to update. */\n dataPermissions: DataPermissions;\n}\n\nexport interface UpdatePermissionsResponse {\n /** Updated permissions for the specified collection. */\n dataPermissions?: DataPermissions;\n}\n\nexport interface AddSpecialPermissionsRequest {\n /**\n * ID of the data collection to grant special permissions for.\n * @maxLength 256\n */\n dataCollectionId: string;\n /** Special permissions to add to the user or role. */\n specialPermissions: SpecialPermissions;\n}\n\nexport interface AddSpecialPermissionsResponse {\n /** Special permissions added to the user or role. */\n specialPermissions?: SpecialPermissions;\n}\n\nexport interface UpdateSpecialPermissionsRequest {\n /** Special permissions to update. */\n specialPermissions: SpecialPermissions;\n}\n\nexport interface UpdateSpecialPermissionsResponse {\n /** Updated special permissions for the specified user or role. */\n specialPermissions?: SpecialPermissions;\n}\n\nexport interface RemoveSpecialPermissionsRequest {\n /**\n * ID of the special permissions to remove.\n * @format GUID\n */\n specialPermissionsId: string;\n}\n\nexport interface RemoveSpecialPermissionsResponse {}\n\nexport interface GetMyPermissionsRequest {\n /**\n * ID of the data collection to check permissions for.\n * @maxLength 256\n */\n dataCollectionId: string;\n}\n\nexport interface GetMyPermissionsResponse {\n /** Whether the current user can read items from the collection. */\n itemRead?: boolean;\n /** Whether the current user can create new items in the collection. */\n itemInsert?: boolean;\n /** Whether the current user can update existing items in the collection. */\n itemUpdate?: boolean;\n /** Whether the current user can remove items from the collection. */\n itemRemove?: boolean;\n}\n\nexport interface MigrateCustomRolesRequest {\n /**\n * ID of the role to update. If empty, all roles in the site are updated.\n * @format GUID\n */\n policyId?: string | null;\n}\n\nexport interface MigrateCustomRolesResponse {}\n\nexport interface PolicyAssignmentsUpdated\n extends PolicyAssignmentsUpdatedEventOneOf {\n policyAssigned?: PolicyAssigned;\n policyUnassigned?: PolicyUnassigned;\n policyAssignmentUpdated?: PolicyAssignmentUpdated;\n}\n\n/** @oneof */\nexport interface PolicyAssignmentsUpdatedEventOneOf {\n policyAssigned?: PolicyAssigned;\n policyUnassigned?: PolicyUnassigned;\n policyAssignmentUpdated?: PolicyAssignmentUpdated;\n}\n\nexport interface PolicyAssigned {\n subject?: Subject;\n assignment?: PolicyAssignment[];\n}\n\nexport interface Subject {\n /** ID of identity assigned to the asset. */\n _id?: string;\n /** Type of identity assigned to the asset. Supported subject types include user IDs, account IDs, and app IDs. */\n subjectType?: SubjectTypeWithLiterals;\n /** Context of identity assigned to the asset. For example, a `subjectType` = `USER` will have `context` = `ACCOUNT`. */\n context?: SubjectContext;\n}\n\nexport enum SubjectType {\n UNKNOWN = 'UNKNOWN',\n ACCOUNT = 'ACCOUNT',\n USER = 'USER',\n USER_GROUP = 'USER_GROUP',\n MEMBER_GROUP = 'MEMBER_GROUP',\n VISITOR_GROUP = 'VISITOR_GROUP',\n EXTERNAL_APP = 'EXTERNAL_APP',\n ACCOUNT_GROUP = 'ACCOUNT_GROUP',\n WIX_APP = 'WIX_APP',\n}\n\n/** @enumType */\nexport type SubjectTypeWithLiterals =\n | SubjectType\n | 'UNKNOWN'\n | 'ACCOUNT'\n | 'USER'\n | 'USER_GROUP'\n | 'MEMBER_GROUP'\n | 'VISITOR_GROUP'\n | 'EXTERNAL_APP'\n | 'ACCOUNT_GROUP'\n | 'WIX_APP';\n\nexport interface SubjectContext {\n _id?: string;\n contextType?: SubjectContextTypeWithLiterals;\n}\n\nexport enum SubjectContextType {\n UNKNOWN_CTX = 'UNKNOWN_CTX',\n ORG_CTX = 'ORG_CTX',\n ACCOUNT_CTX = 'ACCOUNT_CTX',\n}\n\n/** @enumType */\nexport type SubjectContextTypeWithLiterals =\n | SubjectContextType\n | 'UNKNOWN_CTX'\n | 'ORG_CTX'\n | 'ACCOUNT_CTX';\n\nexport interface PolicyAssignment {\n policyId?: string;\n resource?: ResourcePath;\n condition?: PolicyCondition;\n assignmentId?: string | null;\n}\n\nexport interface ResourcePath {\n organization?: string | null;\n account?: string | null;\n site?: string | null;\n resource?: Resource;\n}\n\n/**\n * A custom resource. Is used to represent some asset that is not a direct resource context (site or account), but something custom.\n * For example: payment method, blog post, domain, logo.\n */\nexport interface Resource {\n /** The resource id. */\n _id?: string | null;\n /** The resource type */\n type?: string | null;\n}\n\nexport interface PolicyCondition {\n /** The type of the condition */\n condition?: ConditionType;\n}\n\nexport interface ConditionType extends ConditionTypeOfOneOf {\n /** @deprecated */\n simpleCondition?: SimpleCondition;\n /** A logic combination between several conditions, with an operator between them */\n joinedConditions?: JoinedCondition;\n /** @deprecated */\n environmentCondition?: EnvironmentCondition;\n /** A single condition */\n condition?: Condition;\n}\n\n/** @oneof */\nexport interface ConditionTypeOfOneOf {\n /** @deprecated */\n simpleCondition?: SimpleCondition;\n /** A logic combination between several conditions, with an operator between them */\n joinedConditions?: JoinedCondition;\n /** @deprecated */\n environmentCondition?: EnvironmentCondition;\n /** A single condition */\n condition?: Condition;\n}\n\nexport interface SimpleCondition {\n attrName?: string;\n value?: SimpleConditionValue;\n op?: SimpleConditionOperatorWithLiterals;\n conditionModelId?: string;\n}\n\nexport interface SimpleConditionValue extends SimpleConditionValueValueOneOf {\n attrName?: string;\n stringValue?: string;\n boolValue?: boolean;\n}\n\n/** @oneof */\nexport interface SimpleConditionValueValueOneOf {\n attrName?: string;\n stringValue?: string;\n boolValue?: boolean;\n}\n\nexport enum SimpleConditionOperator {\n UNKNOWN_SIMPLE_OP = 'UNKNOWN_SIMPLE_OP',\n EQUAL = 'EQUAL',\n}\n\n/** @enumType */\nexport type SimpleConditionOperatorWithLiterals =\n | SimpleConditionOperator\n | 'UNKNOWN_SIMPLE_OP'\n | 'EQUAL';\n\nexport interface JoinedCondition {\n /** The operator that should be used when evaluating the condition */\n op?: JoinedConditionOperatorWithLiterals;\n /** The conditions that should be evaluated, and then joined using the operator provided */\n conditions?: ConditionType[];\n}\n\nexport enum JoinedConditionOperator {\n UNKNOWN_JOIN_OP = 'UNKNOWN_JOIN_OP',\n OR = 'OR',\n AND = 'AND',\n}\n\n/** @enumType */\nexport type JoinedConditionOperatorWithLiterals =\n | JoinedConditionOperator\n | 'UNKNOWN_JOIN_OP'\n | 'OR'\n | 'AND';\n\nexport interface EnvironmentCondition\n extends EnvironmentConditionConditionOneOf {\n experimentCondition?: ExperimentCondition;\n}\n\n/** @oneof */\nexport interface EnvironmentConditionConditionOneOf {\n experimentCondition?: ExperimentCondition;\n}\n\nexport interface ExperimentCondition {\n spec?: string;\n fallbackValue?: string;\n expectedValue?: string;\n}\n\nexport interface Condition {\n /** The unique identifier of the condition model. Indicates which actions the condition is working on */\n conditionModelId?: string;\n /** The operator that should be evaluated */\n operator?: ConditionOperator;\n}\n\nexport interface ConditionOperator extends ConditionOperatorOperatorsOneOf {\n /** Comparison of equality - will be evaluated to true if the given parties are equal */\n equals?: EqualOperator;\n /** Regex operator - will be evaluated to true if the given value matches the provided regex */\n like?: LikeOperator;\n /** Petri experiment - will be evaluated using petri. */\n experiment?: ExperimentOperator;\n /** Operator that indicates a dependency on another subject being allowed to perform something. */\n dependOn?: DependOnOperator;\n}\n\n/** @oneof */\nexport interface ConditionOperatorOperatorsOneOf {\n /** Comparison of equality - will be evaluated to true if the given parties are equal */\n equals?: EqualOperator;\n /** Regex operator - will be evaluated to true if the given value matches the provided regex */\n like?: LikeOperator;\n /** Petri experiment - will be evaluated using petri. */\n experiment?: ExperimentOperator;\n /** Operator that indicates a dependency on another subject being allowed to perform something. */\n dependOn?: DependOnOperator;\n}\n\nexport interface EqualOperator {\n /** The attribute which should be compared. The attribute will be first evaluated to a value, and then compared the other side (attribute/value) */\n attrName?: string;\n /** The value to compare to. If the two parties are equal - we will return true. */\n value?: ConditionValue;\n}\n\nexport interface ConditionValue extends ConditionValueValueOneOf {\n /** an attribute. We'll first retrieve the value of the attribute (from the request or from pre-indexed values), and then compare to what it needs to be compared with. */\n attrName?: string;\n /** a value with a string type. Will be compared to the attribute provided, and be true only if they match the operator. */\n stringValue?: string;\n /** a value with a boolean type. Will be compared to the attribute provided, and be true only if they match the operator. */\n boolValue?: boolean;\n}\n\n/** @oneof */\nexport interface ConditionValueValueOneOf {\n /** an attribute. We'll first retrieve the value of the attribute (from the request or from pre-indexed values), and then compare to what it needs to be compared with. */\n attrName?: string;\n /** a value with a string type. Will be compared to the attribute provided, and be true only if they match the operator. */\n stringValue?: string;\n /** a value with a boolean type. Will be compared to the attribute provided, and be true only if they match the operator. */\n boolValue?: boolean;\n}\n\nexport interface LikeOperator {\n /** The attribute which should be compared. The attribute will be first evaluated to a value, and then compared the regex values provided. */\n attrName?: string;\n /** The regex values which the attribute value should be evaluated on. If the attribute value matches at least one of the regular expressions provided - we will return true */\n values?: string[];\n}\n\nexport interface ExperimentOperator {\n /** The spec to conduct the experiment on. */\n spec?: string;\n /** The value to use if the experiment could not be conducted */\n fallbackValue?: string;\n /** The expected value of the experiment conduction. If it matches the actual value - true will be returned. Otherwise - false. */\n expectedValue?: string;\n}\n\n/** Implies that the policy takes affect only if the depend on subject is permitted as well. */\nexport interface DependOnOperator {\n /** The subject on which the current entry depends on. If the subject is allowed to perform what the query was about - the condition will be evaluated to true. Otherwise - false */\n dependOnSubject?: Subject;\n}\n\nexport interface PolicyUnassigned {\n subject?: Subject;\n assignment?: PolicyAssignment[];\n}\n\nexport interface PolicyAssignmentUpdated {\n subject?: Subject;\n fromAssignment?: PolicyAssignment[];\n toAssignment?: PolicyAssignment[];\n}\n\nexport interface Empty {}\n\nexport interface PolicyAuthorizationDataUpdated {\n policyId?: string;\n fromPolicyStatements?: PolicyStatement[];\n toPolicyStatements?: PolicyStatement[];\n policyType?: PolicyTypeWithLiterals;\n policyOwner?: PolicyOwner;\n}\n\nexport interface PolicyStatement {\n /** @readonly */\n _id?: string | null;\n permissions?: string[];\n scopes?: string[];\n effect?: EffectWithLiterals;\n condition?: PolicyCondition;\n}\n\nexport enum Effect {\n UNKNOWN_EFFECT = 'UNKNOWN_EFFECT',\n ALLOW = 'ALLOW',\n DENY = 'DENY',\n}\n\n/** @enumType */\nexport type EffectWithLiterals = Effect | 'UNKNOWN_EFFECT' | 'ALLOW' | 'DENY';\n\nexport enum PolicyType {\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n PREDEFINED = 'PREDEFINED',\n CUSTOM = 'CUSTOM',\n INLINE_CUSTOM = 'INLINE_CUSTOM',\n}\n\n/** @enumType */\nexport type PolicyTypeWithLiterals =\n | PolicyType\n | 'UNKNOWN_STATUS'\n | 'PREDEFINED'\n | 'CUSTOM'\n | 'INLINE_CUSTOM';\n\nexport interface PolicyOwner {\n type?: PolicyOwnerTypeWithLiterals;\n _id?: string;\n}\n\nexport enum PolicyOwnerType {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n WIX = 'WIX',\n WIX_ACCOUNT = 'WIX_ACCOUNT',\n}\n\n/** @enumType */\nexport type PolicyOwnerTypeWithLiterals =\n | PolicyOwnerType\n | 'UNKNOWN_TYPE'\n | 'WIX'\n | 'WIX_ACCOUNT';\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport type GetPermissionsApplicationErrors = {\n code?: 'WDE0025';\n description?: string;\n data?: Record<string, any>;\n};\nexport type AddSpecialPermissionsApplicationErrors = {\n code?: 'ALREADY_EXISTS';\n description?: string;\n data?: Record<string, any>;\n};\nexport type UpdateSpecialPermissionsApplicationErrors = {\n code?: 'NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\nexport type RemoveSpecialPermissionsApplicationErrors = {\n code?: 'NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n\ntype DataPermissionsNonNullablePaths =\n | `_id`\n | `itemRead`\n | `itemInsert`\n | `itemUpdate`\n | `itemRemove`;\n\n/**\n * Retrieves the current permissions configuration for a data collection.\n * @param dataCollectionId - ID of the data collection to retrieve permissions for.\n * @public\n * @documentationMaturity preview\n * @requiredField dataCollectionId\n * @permissionId WIX_DATA.PERMISSIONS_READ\n * @applicableIdentity APP\n * @fqn wix.cloud.permissions.v1.DataPermissionsService.GetPermissions\n */\nexport async function getPermissions(dataCollectionId: string): Promise<\n NonNullablePaths<\n GetPermissionsResponse,\n {\n [P in DataPermissionsNonNullablePaths]: `dataPermissions.${P}`;\n }[DataPermissionsNonNullablePaths]\n > & {\n __applicationErrorsType?: GetPermissionsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n dataCollectionId: dataCollectionId,\n });\n\n const reqOpts = ambassadorWixDataV1DataPermissions.getPermissions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { dataCollectionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates permissions configuration for the specified data collection.\n *\n * > **Note:** To manage special permissions, call Add Special Permissions ([SDK](https://dev.wix.com/docs/sdk/backend-modules/data/permissions/add-special-permissions) | [REST](https://dev.wix.com/docs/rest/business-solutions/cms/data-permissions/add-special-permissions)), Update Special Permissions ([SDK](https://dev.wix.com/docs/sdk/backend-modules/data/permissions/update-special-permissions) | [REST](https://dev.wix.com/docs/rest/business-solutions/cms/data-permissions/update-special-permissions)), or Remove Special Permissions ([SDK](https://dev.wix.com/docs/sdk/backend-modules/data/permissions/remove-special-permissions) | [REST](https://dev.wix.com/docs/rest/business-solutions/cms/data-permissions/remove-special-permissions)).\n * @param dataPermissions - Permissions to update.\n * @public\n * @documentationMaturity preview\n * @requiredField dataPermissions\n * @requiredField dataPermissions._id\n * @requiredField dataPermissions.itemInsert\n * @requiredField dataPermissions.itemRead\n * @requiredField dataPermissions.itemRemove\n * @requiredField dataPermissions.itemUpdate\n * @permissionId WIX_DATA.PERMISSIONS_UPDATE\n * @applicableIdentity APP\n * @fqn wix.cloud.permissions.v1.DataPermissionsService.UpdatePermissions\n */\nexport async function updatePermissions(\n dataPermissions: NonNullablePaths<\n DataPermissions,\n `_id` | `itemInsert` | `itemRead` | `itemRemove` | `itemUpdate`\n >\n): Promise<\n NonNullablePaths<\n UpdatePermissionsResponse,\n {\n [P in DataPermissionsNonNullablePaths]: `dataPermissions.${P}`;\n }[DataPermissionsNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n dataPermissions: dataPermissions,\n });\n\n const reqOpts = ambassadorWixDataV1DataPermissions.updatePermissions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { dataPermissions: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['dataPermissions']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Adds special permissions to a specific user or role for the specified data collection.\n *\n * Special permissions allow specific users or roles to perform actions that would otherwise be restricted by the collection's access levels ([SDK](ADDLINK) | [REST](ADDLINK)).\n * @param dataCollectionId - ID of the data collection to grant special permissions for.\n * @public\n * @documentationMaturity preview\n * @requiredField dataCollectionId\n * @requiredField options\n * @requiredField options.specialPermissions\n * @permissionId WIX_DATA.PERMISSIONS_UPDATE_SPECIAL\n * @applicableIdentity APP\n * @fqn wix.cloud.permissions.v1.DataPermissionsService.AddSpecialPermissions\n */\nexport async function addSpecialPermissions(\n dataCollectionId: string,\n options: NonNullablePaths<AddSpecialPermissionsOptions, `specialPermissions`>\n): Promise<\n NonNullablePaths<\n AddSpecialPermissionsResponse,\n | `specialPermissions.userId`\n | `specialPermissions.policyId`\n | `specialPermissions._id`\n | `specialPermissions.itemRead`\n | `specialPermissions.itemInsert`\n | `specialPermissions.itemUpdate`\n | `specialPermissions.itemRemove`\n > & {\n __applicationErrorsType?: AddSpecialPermissionsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n dataCollectionId: dataCollectionId,\n specialPermissions: options?.specialPermissions,\n });\n\n const reqOpts =\n ambassadorWixDataV1DataPermissions.addSpecialPermissions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n dataCollectionId: '$[0]',\n specialPermissions: '$[1].specialPermissions',\n },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface AddSpecialPermissionsOptions {\n /** Special permissions to add to the user or role. */\n specialPermissions: SpecialPermissions;\n}\n\n/**\n * Updates the special permissions for a specific user or role.\n *\n * > **Note:** Special permissions that aren't explicitly included in the request are set to `UNSPECIFIED` and are replaced by the collection's general access levels.\n * @param _id - ID of the special permissions.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField specialPermissions\n * @permissionId WIX_DATA.PERMISSIONS_UPDATE_SPECIAL\n * @applicableIdentity APP\n * @fqn wix.cloud.permissions.v1.DataPermissionsService.UpdateSpecialPermissions\n */\nexport async function updateSpecialPermissions(\n _id: string,\n specialPermissions: UpdateSpecialPermissions\n): Promise<\n NonNullablePaths<\n UpdateSpecialPermissionsResponse,\n | `specialPermissions.userId`\n | `specialPermissions.policyId`\n | `specialPermissions._id`\n | `specialPermissions.itemRead`\n | `specialPermissions.itemInsert`\n | `specialPermissions.itemUpdate`\n | `specialPermissions.itemRemove`\n > & {\n __applicationErrorsType?: UpdateSpecialPermissionsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n specialPermissions: { ...specialPermissions, id: _id },\n });\n\n const reqOpts =\n ambassadorWixDataV1DataPermissions.updateSpecialPermissions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { specialPermissions: '$[1]' },\n explicitPathsToArguments: { 'specialPermissions.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'specialPermissions']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateSpecialPermissions {\n /**\n * ID of the user to add these special permissions to.\n * @immutable\n * @maxLength 64\n */\n userId?: string;\n /**\n * ID of the policy or role to add these special permissions to.\n * @immutable\n * @maxLength 64\n */\n policyId?: string;\n /**\n * ID of the special permissions.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /** Read items from the collection. */\n itemRead?: AccessWithLiterals;\n /** Create new items in the collection. */\n itemInsert?: AccessWithLiterals;\n /** Update existing items in the collection. */\n itemUpdate?: AccessWithLiterals;\n /** Remove items from the collection. */\n itemRemove?: AccessWithLiterals;\n}\n\n/**\n * Removes special permissions from a specific user or role.\n *\n * After special permissions are removed, the user or role is subject to the collection's general access levels for all actions.\n * @param specialPermissionsId - ID of the special permissions to remove.\n * @public\n * @documentationMaturity preview\n * @requiredField specialPermissionsId\n * @permissionId WIX_DATA.PERMISSIONS_UPDATE_SPECIAL\n * @applicableIdentity APP\n * @fqn wix.cloud.permissions.v1.DataPermissionsService.RemoveSpecialPermissions\n */\nexport async function removeSpecialPermissions(\n specialPermissionsId: string\n): Promise<\n void & {\n __applicationErrorsType?: RemoveSpecialPermissionsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n specialPermissionsId: specialPermissionsId,\n });\n\n const reqOpts =\n ambassadorWixDataV1DataPermissions.removeSpecialPermissions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { specialPermissionsId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['specialPermissionsId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves the current user's permissions for a data collection.\n * @param dataCollectionId - ID of the data collection to check permissions for.\n * @public\n * @documentationMaturity preview\n * @requiredField dataCollectionId\n * @permissionId WIX_DATA.PERMISSIONS_GET_ALLOWED\n * @applicableIdentity APP\n * @fqn wix.cloud.permissions.v1.DataPermissionsService.GetMyPermissions\n */\nexport async function getMyPermissions(\n dataCollectionId: string\n): Promise<\n NonNullablePaths<\n GetMyPermissionsResponse,\n `itemRead` | `itemInsert` | `itemUpdate` | `itemRemove`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n dataCollectionId: dataCollectionId,\n });\n\n const reqOpts = ambassadorWixDataV1DataPermissions.getMyPermissions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { dataCollectionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCloudPermissionsV1DataPermissionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/permissions',\n destPath: '/v1/permissions',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/permissions',\n destPath: '/v1/permissions',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/permissions',\n destPath: '/v1/permissions',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/cloud-data/v1/permissions',\n destPath: '/v1/permissions',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_data_permissions';\n\n/** Retrieves the current permissions configuration for a data collection. */\nexport function getPermissions(payload: object): RequestOptionsFactory<any> {\n function __getPermissions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.data_permissions',\n method: 'GET' as any,\n methodFqn:\n 'wix.cloud.permissions.v1.DataPermissionsService.GetPermissions',\n packageName: PACKAGE_NAME,\n url: resolveWixCloudPermissionsV1DataPermissionsServiceUrl({\n protoPath: '/v1/permissions',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getPermissions;\n}\n\n/**\n * Updates permissions configuration for the specified data collection.\n *\n * > **Note:** To manage special permissions, call Add Special Permissions ([SDK](https://dev.wix.com/docs/sdk/backend-modules/data/permissions/add-special-permissions) | [REST](https://dev.wix.com/docs/rest/business-solutions/cms/data-permissions/add-special-permissions)), Update Special Permissions ([SDK](https://dev.wix.com/docs/sdk/backend-modules/data/permissions/update-special-permissions) | [REST](https://dev.wix.com/docs/rest/business-solutions/cms/data-permissions/update-special-permissions)), or Remove Special Permissions ([SDK](https://dev.wix.com/docs/sdk/backend-modules/data/permissions/remove-special-permissions) | [REST](https://dev.wix.com/docs/rest/business-solutions/cms/data-permissions/remove-special-permissions)).\n */\nexport function updatePermissions(payload: object): RequestOptionsFactory<any> {\n function __updatePermissions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.data_permissions',\n method: 'POST' as any,\n methodFqn:\n 'wix.cloud.permissions.v1.DataPermissionsService.UpdatePermissions',\n packageName: PACKAGE_NAME,\n url: resolveWixCloudPermissionsV1DataPermissionsServiceUrl({\n protoPath: '/v1/permissions',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __updatePermissions;\n}\n\n/**\n * Adds special permissions to a specific user or role for the specified data collection.\n *\n * Special permissions allow specific users or roles to perform actions that would otherwise be restricted by the collection's access levels ([SDK](ADDLINK) | [REST](ADDLINK)).\n */\nexport function addSpecialPermissions(\n payload: object\n): RequestOptionsFactory<any> {\n function __addSpecialPermissions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.data_permissions',\n method: 'POST' as any,\n methodFqn:\n 'wix.cloud.permissions.v1.DataPermissionsService.AddSpecialPermissions',\n packageName: PACKAGE_NAME,\n url: resolveWixCloudPermissionsV1DataPermissionsServiceUrl({\n protoPath: '/v1/permissions/special',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __addSpecialPermissions;\n}\n\n/**\n * Updates the special permissions for a specific user or role.\n *\n * > **Note:** Special permissions that aren't explicitly included in the request are set to `UNSPECIFIED` and are replaced by the collection's general access levels.\n */\nexport function updateSpecialPermissions(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateSpecialPermissions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.data_permissions',\n method: 'POST' as any,\n methodFqn:\n 'wix.cloud.permissions.v1.DataPermissionsService.UpdateSpecialPermissions',\n packageName: PACKAGE_NAME,\n url: resolveWixCloudPermissionsV1DataPermissionsServiceUrl({\n protoPath: '/v1/permissions/special/{specialPermissions.id}',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __updateSpecialPermissions;\n}\n\n/**\n * Removes special permissions from a specific user or role.\n *\n * After special permissions are removed, the user or role is subject to the collection's general access levels for all actions.\n */\nexport function removeSpecialPermissions(\n payload: object\n): RequestOptionsFactory<any> {\n function __removeSpecialPermissions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.data_permissions',\n method: 'DELETE' as any,\n methodFqn:\n 'wix.cloud.permissions.v1.DataPermissionsService.RemoveSpecialPermissions',\n packageName: PACKAGE_NAME,\n url: resolveWixCloudPermissionsV1DataPermissionsServiceUrl({\n protoPath: '/v1/permissions/special/{specialPermissionsId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __removeSpecialPermissions;\n}\n\n/** Retrieves the current user's permissions for a data collection. */\nexport function getMyPermissions(payload: object): RequestOptionsFactory<any> {\n function __getMyPermissions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.data_permissions',\n method: 'GET' as any,\n methodFqn:\n 'wix.cloud.permissions.v1.DataPermissionsService.GetMyPermissions',\n packageName: PACKAGE_NAME,\n url: resolveWixCloudPermissionsV1DataPermissionsServiceUrl({\n protoPath: '/v1/permissions/current',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getMyPermissions;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n AddSpecialPermissionsApplicationErrors,\n AddSpecialPermissionsOptions,\n AddSpecialPermissionsResponse,\n DataPermissions,\n GetMyPermissionsResponse,\n GetPermissionsApplicationErrors,\n GetPermissionsResponse,\n RemoveSpecialPermissionsApplicationErrors,\n UpdatePermissionsResponse,\n UpdateSpecialPermissions,\n UpdateSpecialPermissionsApplicationErrors,\n UpdateSpecialPermissionsResponse,\n addSpecialPermissions as universalAddSpecialPermissions,\n getMyPermissions as universalGetMyPermissions,\n getPermissions as universalGetPermissions,\n removeSpecialPermissions as universalRemoveSpecialPermissions,\n updatePermissions as universalUpdatePermissions,\n updateSpecialPermissions as universalUpdateSpecialPermissions,\n} from './data-v1-data-permissions-permissions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/data' };\n\nexport function getPermissions(\n httpClient: HttpClient\n): GetPermissionsSignature {\n return (dataCollectionId: string) =>\n universalGetPermissions(\n dataCollectionId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetPermissionsSignature {\n /**\n * Retrieves the current permissions configuration for a data collection.\n * @param - ID of the data collection to retrieve permissions for.\n */\n (dataCollectionId: string): Promise<\n GetPermissionsResponse & {\n __applicationErrorsType?: GetPermissionsApplicationErrors | undefined;\n }\n >;\n}\n\nexport function updatePermissions(\n httpClient: HttpClient\n): UpdatePermissionsSignature {\n return (\n dataPermissions: NonNullablePaths<\n DataPermissions,\n `_id` | `itemInsert` | `itemRead` | `itemRemove` | `itemUpdate`\n >\n ) =>\n universalUpdatePermissions(\n dataPermissions,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdatePermissionsSignature {\n /**\n * Updates permissions configuration for the specified data collection.\n *\n * > **Note:** To manage special permissions, call Add Special Permissions ([SDK](https://dev.wix.com/docs/sdk/backend-modules/data/permissions/add-special-permissions) | [REST](https://dev.wix.com/docs/rest/business-solutions/cms/data-permissions/add-special-permissions)), Update Special Permissions ([SDK](https://dev.wix.com/docs/sdk/backend-modules/data/permissions/update-special-permissions) | [REST](https://dev.wix.com/docs/rest/business-solutions/cms/data-permissions/update-special-permissions)), or Remove Special Permissions ([SDK](https://dev.wix.com/docs/sdk/backend-modules/data/permissions/remove-special-permissions) | [REST](https://dev.wix.com/docs/rest/business-solutions/cms/data-permissions/remove-special-permissions)).\n * @param - Permissions to update.\n */\n (dataPermissions: DataPermissions): Promise<UpdatePermissionsResponse>;\n}\n\nexport function addSpecialPermissions(\n httpClient: HttpClient\n): AddSpecialPermissionsSignature {\n return (\n dataCollectionId: string,\n options: NonNullablePaths<\n AddSpecialPermissionsOptions,\n `specialPermissions`\n >\n ) =>\n universalAddSpecialPermissions(\n dataCollectionId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface AddSpecialPermissionsSignature {\n /**\n * Adds special permissions to a specific user or role for the specified data collection.\n *\n * Special permissions allow specific users or roles to perform actions that would otherwise be restricted by the collection's access levels ([SDK](ADDLINK) | [REST](ADDLINK)).\n * @param - ID of the data collection to grant special permissions for.\n */\n (dataCollectionId: string, options: AddSpecialPermissionsOptions): Promise<\n AddSpecialPermissionsResponse & {\n __applicationErrorsType?:\n | AddSpecialPermissionsApplicationErrors\n | undefined;\n }\n >;\n}\n\nexport function updateSpecialPermissions(\n httpClient: HttpClient\n): UpdateSpecialPermissionsSignature {\n return (_id: string, specialPermissions: UpdateSpecialPermissions) =>\n universalUpdateSpecialPermissions(\n _id,\n specialPermissions,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateSpecialPermissionsSignature {\n /**\n * Updates the special permissions for a specific user or role.\n *\n * > **Note:** Special permissions that aren't explicitly included in the request are set to `UNSPECIFIED` and are replaced by the collection's general access levels.\n * @param - ID of the special permissions.\n */\n (_id: string, specialPermissions: UpdateSpecialPermissions): Promise<\n UpdateSpecialPermissionsResponse & {\n __applicationErrorsType?:\n | UpdateSpecialPermissionsApplicationErrors\n | undefined;\n }\n >;\n}\n\nexport function removeSpecialPermissions(\n httpClient: HttpClient\n): RemoveSpecialPermissionsSignature {\n return (specialPermissionsId: string) =>\n universalRemoveSpecialPermissions(\n specialPermissionsId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RemoveSpecialPermissionsSignature {\n /**\n * Removes special permissions from a specific user or role.\n *\n * After special permissions are removed, the user or role is subject to the collection's general access levels for all actions.\n * @param - ID of the special permissions to remove.\n */\n (specialPermissionsId: string): Promise<\n void & {\n __applicationErrorsType?:\n | RemoveSpecialPermissionsApplicationErrors\n | undefined;\n }\n >;\n}\n\nexport function getMyPermissions(\n httpClient: HttpClient\n): GetMyPermissionsSignature {\n return (dataCollectionId: string) =>\n universalGetMyPermissions(\n dataCollectionId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetMyPermissionsSignature {\n /**\n * Retrieves the current user's permissions for a data collection.\n * @param - ID of the data collection to check permissions for.\n */\n (dataCollectionId: string): Promise<GetMyPermissionsResponse>;\n}\n\nexport {\n Access,\n AccessLevel,\n ActionEvent,\n AddSpecialPermissionsOptions,\n AddSpecialPermissionsRequest,\n AddSpecialPermissionsResponse,\n Condition,\n ConditionOperator,\n ConditionOperatorOperatorsOneOf,\n ConditionType,\n ConditionTypeOfOneOf,\n ConditionValue,\n ConditionValueValueOneOf,\n DataPermissions,\n DependOnOperator,\n DomainEvent,\n DomainEventBodyOneOf,\n Effect,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EnvironmentCondition,\n EnvironmentConditionConditionOneOf,\n EqualOperator,\n ExperimentCondition,\n ExperimentOperator,\n GetMyPermissionsRequest,\n GetMyPermissionsResponse,\n GetPermissionsRequest,\n GetPermissionsResponse,\n JoinedCondition,\n JoinedConditionOperator,\n LikeOperator,\n MigrateCustomRolesRequest,\n MigrateCustomRolesResponse,\n PolicyAssigned,\n PolicyAssignment,\n PolicyAssignmentUpdated,\n PolicyAssignmentsUpdated,\n PolicyAssignmentsUpdatedEventOneOf,\n PolicyAuthorizationDataUpdated,\n PolicyCondition,\n PolicyOwner,\n PolicyOwnerType,\n PolicyStatement,\n PolicyType,\n PolicyUnassigned,\n RemoveSpecialPermissionsRequest,\n RemoveSpecialPermissionsResponse,\n Resource,\n ResourcePath,\n RestoreInfo,\n SimpleCondition,\n SimpleConditionOperator,\n SimpleConditionValue,\n SimpleConditionValueValueOneOf,\n SpecialPermissions,\n SpecialPermissionsSubjectOneOf,\n Subject,\n SubjectContext,\n SubjectContextType,\n SubjectType,\n UpdatePermissionsRequest,\n UpdatePermissionsResponse,\n UpdateSpecialPermissions,\n UpdateSpecialPermissionsRequest,\n UpdateSpecialPermissionsResponse,\n} from './data-v1-data-permissions-permissions.universal.js';\n","import {\n getPermissions as publicGetPermissions,\n updatePermissions as publicUpdatePermissions,\n addSpecialPermissions as publicAddSpecialPermissions,\n updateSpecialPermissions as publicUpdateSpecialPermissions,\n removeSpecialPermissions as publicRemoveSpecialPermissions,\n getMyPermissions as publicGetMyPermissions,\n} from './data-v1-data-permissions-permissions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getPermissions: MaybeContext<\n BuildRESTFunction<typeof publicGetPermissions> & typeof publicGetPermissions\n> = /*#__PURE__*/ createRESTModule(publicGetPermissions);\nexport const updatePermissions: MaybeContext<\n BuildRESTFunction<typeof publicUpdatePermissions> &\n typeof publicUpdatePermissions\n> = /*#__PURE__*/ createRESTModule(publicUpdatePermissions);\nexport const addSpecialPermissions: MaybeContext<\n BuildRESTFunction<typeof publicAddSpecialPermissions> &\n typeof publicAddSpecialPermissions\n> = /*#__PURE__*/ createRESTModule(publicAddSpecialPermissions);\nexport const updateSpecialPermissions: MaybeContext<\n BuildRESTFunction<typeof publicUpdateSpecialPermissions> &\n typeof publicUpdateSpecialPermissions\n> = /*#__PURE__*/ createRESTModule(publicUpdateSpecialPermissions);\nexport const removeSpecialPermissions: MaybeContext<\n BuildRESTFunction<typeof publicRemoveSpecialPermissions> &\n typeof publicRemoveSpecialPermissions\n> = /*#__PURE__*/ createRESTModule(publicRemoveSpecialPermissions);\nexport const getMyPermissions: MaybeContext<\n BuildRESTFunction<typeof publicGetMyPermissions> &\n typeof publicGetMyPermissions\n> = /*#__PURE__*/ createRESTModule(publicGetMyPermissions);\n\nexport {\n AccessLevel,\n Access,\n SubjectType,\n SubjectContextType,\n SimpleConditionOperator,\n JoinedConditionOperator,\n Effect,\n PolicyType,\n PolicyOwnerType,\n} from './data-v1-data-permissions-permissions.universal.js';\nexport {\n DataPermissions,\n SpecialPermissions,\n SpecialPermissionsSubjectOneOf,\n GetPermissionsRequest,\n GetPermissionsResponse,\n UpdatePermissionsRequest,\n UpdatePermissionsResponse,\n AddSpecialPermissionsRequest,\n AddSpecialPermissionsResponse,\n UpdateSpecialPermissionsRequest,\n UpdateSpecialPermissionsResponse,\n RemoveSpecialPermissionsRequest,\n RemoveSpecialPermissionsResponse,\n GetMyPermissionsRequest,\n GetMyPermissionsResponse,\n MigrateCustomRolesRequest,\n MigrateCustomRolesResponse,\n PolicyAssignmentsUpdated,\n PolicyAssignmentsUpdatedEventOneOf,\n PolicyAssigned,\n Subject,\n SubjectContext,\n PolicyAssignment,\n ResourcePath,\n Resource,\n PolicyCondition,\n ConditionType,\n ConditionTypeOfOneOf,\n SimpleCondition,\n SimpleConditionValue,\n SimpleConditionValueValueOneOf,\n JoinedCondition,\n EnvironmentCondition,\n EnvironmentConditionConditionOneOf,\n ExperimentCondition,\n Condition,\n ConditionOperator,\n ConditionOperatorOperatorsOneOf,\n EqualOperator,\n ConditionValue,\n ConditionValueValueOneOf,\n LikeOperator,\n ExperimentOperator,\n DependOnOperator,\n PolicyUnassigned,\n PolicyAssignmentUpdated,\n Empty,\n PolicyAuthorizationDataUpdated,\n PolicyStatement,\n PolicyOwner,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n AddSpecialPermissionsOptions,\n UpdateSpecialPermissions,\n} from './data-v1-data-permissions-permissions.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+BAAAA;AAAA,EAAA,wBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,gCAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,gCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,sDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,E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A,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAkBO,SAASC,0BACd,YACmC;AACnC,SAAO,CAAC,yBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAkBO,SAASC,kBACd,YAC2B;AAC3B,SAAO,CAAC,qBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACnKA,IAAAC,uBAAiC;AAG1B,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,yBAGK,2DAAiBA,sBAA2B;AACvD,IAAMC,4BAGK,2DAAiBA,yBAA8B;AAC1D,IAAMC,4BAGK,2DAAiBA,yBAA8B;AAC1D,IAAMC,oBAGK,2DAAiBA,iBAAsB;","names":["addSpecialPermissions","getMyPermissions","getPermissions","removeSpecialPermissions","updatePermissions","updateSpecialPermissions","import_rest_modules","AccessLevel","Access","SubjectType","SubjectContextType","SimpleConditionOperator","JoinedConditionOperator","Effect","PolicyType","PolicyOwnerType","getPermissions","sdkTransformError","updatePermissions","addSpecialPermissions","updateSpecialPermissions","removeSpecialPermissions","getMyPermissions","getPermissions","updatePermissions","addSpecialPermissions","updateSpecialPermissions","removeSpecialPermissions","getMyPermissions","import_rest_modules","getPermissions","updatePermissions","addSpecialPermissions","updateSpecialPermissions","removeSpecialPermissions","getMyPermissions"]}