@wix/auto_sdk_data_permissions 1.0.8 → 1.0.10

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 (134) hide show
  1. package/build/{cjs/src/data-v1-data-permissions-permissions.types.d.ts → data-v1-data-permissions-permissions.universal-B1qSIhq7.d.mts} +121 -89
  2. package/build/{internal/cjs/src/data-v1-data-permissions-permissions.types.d.ts → data-v1-data-permissions-permissions.universal-B1qSIhq7.d.ts} +121 -89
  3. package/build/index.d.mts +66 -0
  4. package/build/index.d.ts +66 -0
  5. package/build/index.js +476 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +438 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/internal/{es/src/data-v1-data-permissions-permissions.types.d.ts → data-v1-data-permissions-permissions.universal-B1qSIhq7.d.mts} +121 -89
  10. package/build/{es/src/data-v1-data-permissions-permissions.types.d.ts → internal/data-v1-data-permissions-permissions.universal-B1qSIhq7.d.ts} +121 -89
  11. package/build/internal/index.d.mts +66 -0
  12. package/build/internal/index.d.ts +66 -0
  13. package/build/internal/index.js +476 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +438 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +184 -0
  18. package/build/internal/meta.d.ts +184 -0
  19. package/build/internal/meta.js +294 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +262 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/meta.d.mts +184 -0
  24. package/build/meta.d.ts +184 -0
  25. package/build/meta.js +294 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +262 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +13 -12
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/data-v1-data-permissions-permissions.context.d.ts +0 -10
  40. package/build/cjs/src/data-v1-data-permissions-permissions.context.js +0 -22
  41. package/build/cjs/src/data-v1-data-permissions-permissions.context.js.map +0 -1
  42. package/build/cjs/src/data-v1-data-permissions-permissions.http.d.ts +0 -24
  43. package/build/cjs/src/data-v1-data-permissions-permissions.http.js +0 -167
  44. package/build/cjs/src/data-v1-data-permissions-permissions.http.js.map +0 -1
  45. package/build/cjs/src/data-v1-data-permissions-permissions.meta.d.ts +0 -22
  46. package/build/cjs/src/data-v1-data-permissions-permissions.meta.js +0 -144
  47. package/build/cjs/src/data-v1-data-permissions-permissions.meta.js.map +0 -1
  48. package/build/cjs/src/data-v1-data-permissions-permissions.public.d.ts +0 -59
  49. package/build/cjs/src/data-v1-data-permissions-permissions.public.js +0 -52
  50. package/build/cjs/src/data-v1-data-permissions-permissions.public.js.map +0 -1
  51. package/build/cjs/src/data-v1-data-permissions-permissions.types.js +0 -78
  52. package/build/cjs/src/data-v1-data-permissions-permissions.types.js.map +0 -1
  53. package/build/cjs/src/data-v1-data-permissions-permissions.universal.d.ts +0 -636
  54. package/build/cjs/src/data-v1-data-permissions-permissions.universal.js +0 -349
  55. package/build/cjs/src/data-v1-data-permissions-permissions.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/package.json +0 -3
  66. package/build/es/src/data-v1-data-permissions-permissions.context.d.ts +0 -10
  67. package/build/es/src/data-v1-data-permissions-permissions.context.js +0 -10
  68. package/build/es/src/data-v1-data-permissions-permissions.context.js.map +0 -1
  69. package/build/es/src/data-v1-data-permissions-permissions.http.d.ts +0 -24
  70. package/build/es/src/data-v1-data-permissions-permissions.http.js +0 -158
  71. package/build/es/src/data-v1-data-permissions-permissions.http.js.map +0 -1
  72. package/build/es/src/data-v1-data-permissions-permissions.meta.d.ts +0 -22
  73. package/build/es/src/data-v1-data-permissions-permissions.meta.js +0 -112
  74. package/build/es/src/data-v1-data-permissions-permissions.meta.js.map +0 -1
  75. package/build/es/src/data-v1-data-permissions-permissions.public.d.ts +0 -59
  76. package/build/es/src/data-v1-data-permissions-permissions.public.js +0 -34
  77. package/build/es/src/data-v1-data-permissions-permissions.public.js.map +0 -1
  78. package/build/es/src/data-v1-data-permissions-permissions.types.js +0 -75
  79. package/build/es/src/data-v1-data-permissions-permissions.types.js.map +0 -1
  80. package/build/es/src/data-v1-data-permissions-permissions.universal.d.ts +0 -636
  81. package/build/es/src/data-v1-data-permissions-permissions.universal.js +0 -317
  82. package/build/es/src/data-v1-data-permissions-permissions.universal.js.map +0 -1
  83. package/build/internal/cjs/index.d.ts +0 -1
  84. package/build/internal/cjs/index.js +0 -18
  85. package/build/internal/cjs/index.js.map +0 -1
  86. package/build/internal/cjs/index.typings.d.ts +0 -1
  87. package/build/internal/cjs/index.typings.js +0 -18
  88. package/build/internal/cjs/index.typings.js.map +0 -1
  89. package/build/internal/cjs/meta.d.ts +0 -1
  90. package/build/internal/cjs/meta.js +0 -18
  91. package/build/internal/cjs/meta.js.map +0 -1
  92. package/build/internal/cjs/src/data-v1-data-permissions-permissions.context.d.ts +0 -10
  93. package/build/internal/cjs/src/data-v1-data-permissions-permissions.context.js +0 -22
  94. package/build/internal/cjs/src/data-v1-data-permissions-permissions.context.js.map +0 -1
  95. package/build/internal/cjs/src/data-v1-data-permissions-permissions.http.d.ts +0 -24
  96. package/build/internal/cjs/src/data-v1-data-permissions-permissions.http.js +0 -167
  97. package/build/internal/cjs/src/data-v1-data-permissions-permissions.http.js.map +0 -1
  98. package/build/internal/cjs/src/data-v1-data-permissions-permissions.meta.d.ts +0 -22
  99. package/build/internal/cjs/src/data-v1-data-permissions-permissions.meta.js +0 -144
  100. package/build/internal/cjs/src/data-v1-data-permissions-permissions.meta.js.map +0 -1
  101. package/build/internal/cjs/src/data-v1-data-permissions-permissions.public.d.ts +0 -59
  102. package/build/internal/cjs/src/data-v1-data-permissions-permissions.public.js +0 -52
  103. package/build/internal/cjs/src/data-v1-data-permissions-permissions.public.js.map +0 -1
  104. package/build/internal/cjs/src/data-v1-data-permissions-permissions.types.js +0 -78
  105. package/build/internal/cjs/src/data-v1-data-permissions-permissions.types.js.map +0 -1
  106. package/build/internal/cjs/src/data-v1-data-permissions-permissions.universal.d.ts +0 -636
  107. package/build/internal/cjs/src/data-v1-data-permissions-permissions.universal.js +0 -349
  108. package/build/internal/cjs/src/data-v1-data-permissions-permissions.universal.js.map +0 -1
  109. package/build/internal/es/index.d.ts +0 -1
  110. package/build/internal/es/index.js +0 -2
  111. package/build/internal/es/index.js.map +0 -1
  112. package/build/internal/es/index.typings.d.ts +0 -1
  113. package/build/internal/es/index.typings.js +0 -2
  114. package/build/internal/es/index.typings.js.map +0 -1
  115. package/build/internal/es/meta.d.ts +0 -1
  116. package/build/internal/es/meta.js +0 -2
  117. package/build/internal/es/meta.js.map +0 -1
  118. package/build/internal/es/src/data-v1-data-permissions-permissions.context.d.ts +0 -10
  119. package/build/internal/es/src/data-v1-data-permissions-permissions.context.js +0 -10
  120. package/build/internal/es/src/data-v1-data-permissions-permissions.context.js.map +0 -1
  121. package/build/internal/es/src/data-v1-data-permissions-permissions.http.d.ts +0 -24
  122. package/build/internal/es/src/data-v1-data-permissions-permissions.http.js +0 -158
  123. package/build/internal/es/src/data-v1-data-permissions-permissions.http.js.map +0 -1
  124. package/build/internal/es/src/data-v1-data-permissions-permissions.meta.d.ts +0 -22
  125. package/build/internal/es/src/data-v1-data-permissions-permissions.meta.js +0 -112
  126. package/build/internal/es/src/data-v1-data-permissions-permissions.meta.js.map +0 -1
  127. package/build/internal/es/src/data-v1-data-permissions-permissions.public.d.ts +0 -59
  128. package/build/internal/es/src/data-v1-data-permissions-permissions.public.js +0 -34
  129. package/build/internal/es/src/data-v1-data-permissions-permissions.public.js.map +0 -1
  130. package/build/internal/es/src/data-v1-data-permissions-permissions.types.js +0 -75
  131. package/build/internal/es/src/data-v1-data-permissions-permissions.types.js.map +0 -1
  132. package/build/internal/es/src/data-v1-data-permissions-permissions.universal.d.ts +0 -636
  133. package/build/internal/es/src/data-v1-data-permissions-permissions.universal.js +0 -317
  134. package/build/internal/es/src/data-v1-data-permissions-permissions.universal.js.map +0 -1
@@ -1,636 +0,0 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
2
- /**
3
- * Permissions configuration of a data collection.
4
- *
5
- * Describes who can perform certain data operations on a collection.
6
- */
7
- export interface DataPermissions {
8
- /**
9
- * Data Collection ID that is subject of these permissions
10
- * @immutable
11
- * @maxLength 255
12
- */
13
- _id?: string;
14
- /** Access level for data items read */
15
- itemRead?: AccessLevelWithLiterals;
16
- /** Access level for data items insert */
17
- itemInsert?: AccessLevelWithLiterals;
18
- /** Access level for data items update */
19
- itemUpdate?: AccessLevelWithLiterals;
20
- /** Access level for data items removal */
21
- itemRemove?: AccessLevelWithLiterals;
22
- }
23
- /**
24
- * Describes who can perform certain action.
25
- * Each level includes all levels below it (except UNDEFINED).
26
- */
27
- export declare enum AccessLevel {
28
- /** Not set */
29
- UNKNOWN = "UNKNOWN",
30
- /** Any subject, including visitors */
31
- ANYONE = "ANYONE",
32
- /** Any signed-in user (both site members and collaborators) */
33
- SITE_MEMBER = "SITE_MEMBER",
34
- /** Any signed-in user, but site members only have access to own items */
35
- SITE_MEMBER_AUTHOR = "SITE_MEMBER_AUTHOR",
36
- /** Site collaborator that has a role with CMS Access permission */
37
- CMS_EDITOR = "CMS_EDITOR",
38
- /** CMS administrators and users or roles granted with special access */
39
- PRIVILEGED = "PRIVILEGED"
40
- }
41
- /** @enumType */
42
- export type AccessLevelWithLiterals = AccessLevel | 'UNKNOWN' | 'ANYONE' | 'SITE_MEMBER' | 'SITE_MEMBER_AUTHOR' | 'CMS_EDITOR' | 'PRIVILEGED';
43
- /** Special access granted to user or role */
44
- export interface SpecialPermissions extends SpecialPermissionsSubjectOneOf {
45
- /**
46
- * User ID that is subject of these permissions
47
- * @immutable
48
- * @maxLength 64
49
- */
50
- userId?: string;
51
- /**
52
- * Policy ID of (custom) role that is subject of these permissions
53
- * @immutable
54
- * @maxLength 64
55
- */
56
- policyId?: string;
57
- /**
58
- * ID of this special access, so it can be managed separately
59
- * @format GUID
60
- * @readonly
61
- */
62
- _id?: string;
63
- /** If data item read is allowed */
64
- itemRead?: AccessWithLiterals;
65
- /** If data item insert is allowed */
66
- itemInsert?: AccessWithLiterals;
67
- /** If data item update is allowed */
68
- itemUpdate?: AccessWithLiterals;
69
- /** If data item remove is allowed */
70
- itemRemove?: AccessWithLiterals;
71
- }
72
- /** @oneof */
73
- export interface SpecialPermissionsSubjectOneOf {
74
- /**
75
- * User ID that is subject of these permissions
76
- * @immutable
77
- * @maxLength 64
78
- */
79
- userId?: string;
80
- /**
81
- * Policy ID of (custom) role that is subject of these permissions
82
- * @immutable
83
- * @maxLength 64
84
- */
85
- policyId?: string;
86
- }
87
- export declare enum Access {
88
- /** Action is not specifically allowed, but can be allowed by top-level permissions */
89
- UNSPECIFIED = "UNSPECIFIED",
90
- /** Action is specifically allowed */
91
- ALLOWED = "ALLOWED"
92
- }
93
- /** @enumType */
94
- export type AccessWithLiterals = Access | 'UNSPECIFIED' | 'ALLOWED';
95
- export interface GetPermissionsRequest {
96
- /**
97
- * Data Collection ID to get permissions for
98
- * @maxLength 256
99
- */
100
- dataCollectionId: string;
101
- }
102
- export interface GetPermissionsResponse {
103
- /** Requested data permissions */
104
- dataPermissions?: DataPermissions;
105
- }
106
- export interface UpdatePermissionsRequest {
107
- /** Data permissions to update */
108
- dataPermissions: DataPermissions;
109
- }
110
- export interface UpdatePermissionsResponse {
111
- /** Updated data permissions */
112
- dataPermissions?: DataPermissions;
113
- }
114
- export interface AddSpecialPermissionsRequest {
115
- /**
116
- * Data Collection ID to add special permission for
117
- * @maxLength 256
118
- */
119
- dataCollectionId: string;
120
- /** Special permissions to add */
121
- specialPermissions: SpecialPermissions;
122
- }
123
- export interface AddSpecialPermissionsResponse {
124
- /** Added special data permissions */
125
- specialPermissions?: SpecialPermissions;
126
- }
127
- export interface UpdateSpecialPermissionsRequest {
128
- /** Special permissions to update */
129
- specialPermissions: SpecialPermissions;
130
- }
131
- export interface UpdateSpecialPermissionsResponse {
132
- /** Updated special data permissions */
133
- specialPermissions?: SpecialPermissions;
134
- }
135
- export interface RemoveSpecialPermissionsRequest {
136
- /**
137
- * Special permissions ID to remove
138
- * @format GUID
139
- */
140
- specialPermissionsId: string;
141
- }
142
- export interface RemoveSpecialPermissionsResponse {
143
- }
144
- export interface GetMyPermissionsRequest {
145
- /**
146
- * Data Collection ID to get permission for
147
- * @maxLength 256
148
- */
149
- dataCollectionId: string;
150
- }
151
- export interface GetMyPermissionsResponse {
152
- /** If data item read is allowed */
153
- itemRead?: boolean;
154
- /** If data item insert is allowed */
155
- itemInsert?: boolean;
156
- /** If data item update is allowed */
157
- itemUpdate?: boolean;
158
- /** If data item remove is allowed */
159
- itemRemove?: boolean;
160
- }
161
- export interface MigrateCustomRolesRequest {
162
- /**
163
- * Role ID to update, if empty updates all roles in scope
164
- * @format GUID
165
- */
166
- policyId?: string | null;
167
- }
168
- export interface MigrateCustomRolesResponse {
169
- }
170
- export interface PolicyAssignmentsUpdated extends PolicyAssignmentsUpdatedEventOneOf {
171
- policyAssigned?: PolicyAssigned;
172
- policyUnassigned?: PolicyUnassigned;
173
- policyAssignmentUpdated?: PolicyAssignmentUpdated;
174
- }
175
- /** @oneof */
176
- export interface PolicyAssignmentsUpdatedEventOneOf {
177
- policyAssigned?: PolicyAssigned;
178
- policyUnassigned?: PolicyUnassigned;
179
- policyAssignmentUpdated?: PolicyAssignmentUpdated;
180
- }
181
- export interface PolicyAssigned {
182
- subject?: Subject;
183
- assignment?: PolicyAssignment[];
184
- }
185
- export interface Subject {
186
- /** ID of identity assigned to the asset. */
187
- _id?: string;
188
- /** Type of identity assigned to the asset. Supported subject types include user IDs, account IDs, and app IDs. */
189
- subjectType?: SubjectTypeWithLiterals;
190
- /** Context of identity assigned to the asset. For example, a `subjectType` = `USER` will have `context` = `ACCOUNT`. */
191
- context?: SubjectContext;
192
- }
193
- export declare enum SubjectType {
194
- UNKNOWN = "UNKNOWN",
195
- ACCOUNT = "ACCOUNT",
196
- USER = "USER",
197
- USER_GROUP = "USER_GROUP",
198
- MEMBER_GROUP = "MEMBER_GROUP",
199
- VISITOR_GROUP = "VISITOR_GROUP",
200
- EXTERNAL_APP = "EXTERNAL_APP",
201
- ACCOUNT_GROUP = "ACCOUNT_GROUP",
202
- WIX_APP = "WIX_APP"
203
- }
204
- /** @enumType */
205
- export type SubjectTypeWithLiterals = SubjectType | 'UNKNOWN' | 'ACCOUNT' | 'USER' | 'USER_GROUP' | 'MEMBER_GROUP' | 'VISITOR_GROUP' | 'EXTERNAL_APP' | 'ACCOUNT_GROUP' | 'WIX_APP';
206
- export interface SubjectContext {
207
- _id?: string;
208
- contextType?: SubjectContextTypeWithLiterals;
209
- }
210
- export declare enum SubjectContextType {
211
- UNKNOWN_CTX = "UNKNOWN_CTX",
212
- ORG_CTX = "ORG_CTX",
213
- ACCOUNT_CTX = "ACCOUNT_CTX"
214
- }
215
- /** @enumType */
216
- export type SubjectContextTypeWithLiterals = SubjectContextType | 'UNKNOWN_CTX' | 'ORG_CTX' | 'ACCOUNT_CTX';
217
- export interface PolicyAssignment {
218
- policyId?: string;
219
- resource?: ResourcePath;
220
- condition?: PolicyCondition;
221
- assignmentId?: string | null;
222
- }
223
- export interface ResourcePath {
224
- organization?: string | null;
225
- account?: string | null;
226
- site?: string | null;
227
- resource?: Resource;
228
- }
229
- /**
230
- * A custom resource. Is used to represent some asset that is not a direct resource context (site or account), but something custom.
231
- * For example: payment method, blog post, domain, logo.
232
- */
233
- export interface Resource {
234
- /** The resource id. */
235
- _id?: string | null;
236
- /** The resource type */
237
- type?: string | null;
238
- }
239
- export interface PolicyCondition {
240
- /** The type of the condition */
241
- condition?: ConditionType;
242
- }
243
- export interface ConditionType extends ConditionTypeOfOneOf {
244
- /** @deprecated */
245
- simpleCondition?: SimpleCondition;
246
- /** A logic combination between several conditions, with an operator between them */
247
- joinedConditions?: JoinedCondition;
248
- /** @deprecated */
249
- environmentCondition?: EnvironmentCondition;
250
- /** A single condition */
251
- condition?: Condition;
252
- }
253
- /** @oneof */
254
- export interface ConditionTypeOfOneOf {
255
- /** @deprecated */
256
- simpleCondition?: SimpleCondition;
257
- /** A logic combination between several conditions, with an operator between them */
258
- joinedConditions?: JoinedCondition;
259
- /** @deprecated */
260
- environmentCondition?: EnvironmentCondition;
261
- /** A single condition */
262
- condition?: Condition;
263
- }
264
- export interface SimpleCondition {
265
- attrName?: string;
266
- value?: SimpleConditionValue;
267
- op?: SimpleConditionOperatorWithLiterals;
268
- conditionModelId?: string;
269
- }
270
- export interface SimpleConditionValue extends SimpleConditionValueValueOneOf {
271
- attrName?: string;
272
- stringValue?: string;
273
- boolValue?: boolean;
274
- }
275
- /** @oneof */
276
- export interface SimpleConditionValueValueOneOf {
277
- attrName?: string;
278
- stringValue?: string;
279
- boolValue?: boolean;
280
- }
281
- export declare enum SimpleConditionOperator {
282
- UNKNOWN_SIMPLE_OP = "UNKNOWN_SIMPLE_OP",
283
- EQUAL = "EQUAL"
284
- }
285
- /** @enumType */
286
- export type SimpleConditionOperatorWithLiterals = SimpleConditionOperator | 'UNKNOWN_SIMPLE_OP' | 'EQUAL';
287
- export interface JoinedCondition {
288
- /** The operator that should be used when evaluating the condition */
289
- op?: JoinedConditionOperatorWithLiterals;
290
- /** The conditions that should be evaluated, and then joined using the operator provided */
291
- conditions?: ConditionType[];
292
- }
293
- export declare enum JoinedConditionOperator {
294
- UNKNOWN_JOIN_OP = "UNKNOWN_JOIN_OP",
295
- OR = "OR",
296
- AND = "AND"
297
- }
298
- /** @enumType */
299
- export type JoinedConditionOperatorWithLiterals = JoinedConditionOperator | 'UNKNOWN_JOIN_OP' | 'OR' | 'AND';
300
- export interface EnvironmentCondition extends EnvironmentConditionConditionOneOf {
301
- experimentCondition?: ExperimentCondition;
302
- }
303
- /** @oneof */
304
- export interface EnvironmentConditionConditionOneOf {
305
- experimentCondition?: ExperimentCondition;
306
- }
307
- export interface ExperimentCondition {
308
- spec?: string;
309
- fallbackValue?: string;
310
- expectedValue?: string;
311
- }
312
- export interface Condition {
313
- /** The unique identifier of the condition model. Indicates which actions the condition is working on */
314
- conditionModelId?: string;
315
- /** The operator that should be evaluated */
316
- operator?: ConditionOperator;
317
- }
318
- export interface ConditionOperator extends ConditionOperatorOperatorsOneOf {
319
- /** Comparison of equality - will be evaluated to true if the given parties are equal */
320
- equals?: EqualOperator;
321
- /** Regex operator - will be evaluated to true if the given value matches the provided regex */
322
- like?: LikeOperator;
323
- /** Petri experiment - will be evaluated using petri. */
324
- experiment?: ExperimentOperator;
325
- /** Operator that indicates a dependency on another subject being allowed to perform something. */
326
- dependOn?: DependOnOperator;
327
- }
328
- /** @oneof */
329
- export interface ConditionOperatorOperatorsOneOf {
330
- /** Comparison of equality - will be evaluated to true if the given parties are equal */
331
- equals?: EqualOperator;
332
- /** Regex operator - will be evaluated to true if the given value matches the provided regex */
333
- like?: LikeOperator;
334
- /** Petri experiment - will be evaluated using petri. */
335
- experiment?: ExperimentOperator;
336
- /** Operator that indicates a dependency on another subject being allowed to perform something. */
337
- dependOn?: DependOnOperator;
338
- }
339
- export interface EqualOperator {
340
- /** The attribute which should be compared. The attribute will be first evaluated to a value, and then compared the other side (attribute/value) */
341
- attrName?: string;
342
- /** The value to compare to. If the two parties are equal - we will return true. */
343
- value?: ConditionValue;
344
- }
345
- export interface ConditionValue extends ConditionValueValueOneOf {
346
- /** 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. */
347
- attrName?: string;
348
- /** a value with a string type. Will be compared to the attribute provided, and be true only if they match the operator. */
349
- stringValue?: string;
350
- /** a value with a boolean type. Will be compared to the attribute provided, and be true only if they match the operator. */
351
- boolValue?: boolean;
352
- }
353
- /** @oneof */
354
- export interface ConditionValueValueOneOf {
355
- /** 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. */
356
- attrName?: string;
357
- /** a value with a string type. Will be compared to the attribute provided, and be true only if they match the operator. */
358
- stringValue?: string;
359
- /** a value with a boolean type. Will be compared to the attribute provided, and be true only if they match the operator. */
360
- boolValue?: boolean;
361
- }
362
- export interface LikeOperator {
363
- /** The attribute which should be compared. The attribute will be first evaluated to a value, and then compared the regex values provided. */
364
- attrName?: string;
365
- /** 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 */
366
- values?: string[];
367
- }
368
- export interface ExperimentOperator {
369
- /** The spec to conduct the experiment on. */
370
- spec?: string;
371
- /** The value to use if the experiment could not be conducted */
372
- fallbackValue?: string;
373
- /** The expected value of the experiment conduction. If it matches the actual value - true will be returned. Otherwise - false. */
374
- expectedValue?: string;
375
- }
376
- /** Implies that the policy takes affect only if the depend on subject is permitted as well. */
377
- export interface DependOnOperator {
378
- /** 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 */
379
- dependOnSubject?: Subject;
380
- }
381
- export interface PolicyUnassigned {
382
- subject?: Subject;
383
- assignment?: PolicyAssignment[];
384
- }
385
- export interface PolicyAssignmentUpdated {
386
- subject?: Subject;
387
- fromAssignment?: PolicyAssignment[];
388
- toAssignment?: PolicyAssignment[];
389
- }
390
- export interface Empty {
391
- }
392
- export interface PolicyAuthorizationDataUpdated {
393
- policyId?: string;
394
- fromPolicyStatements?: PolicyStatement[];
395
- toPolicyStatements?: PolicyStatement[];
396
- policyType?: PolicyTypeWithLiterals;
397
- policyOwner?: PolicyOwner;
398
- }
399
- export interface PolicyStatement {
400
- /** @readonly */
401
- _id?: string | null;
402
- permissions?: string[];
403
- scopes?: string[];
404
- effect?: EffectWithLiterals;
405
- condition?: PolicyCondition;
406
- }
407
- export declare enum Effect {
408
- UNKNOWN_EFFECT = "UNKNOWN_EFFECT",
409
- ALLOW = "ALLOW",
410
- DENY = "DENY"
411
- }
412
- /** @enumType */
413
- export type EffectWithLiterals = Effect | 'UNKNOWN_EFFECT' | 'ALLOW' | 'DENY';
414
- export declare enum PolicyType {
415
- UNKNOWN_STATUS = "UNKNOWN_STATUS",
416
- PREDEFINED = "PREDEFINED",
417
- CUSTOM = "CUSTOM",
418
- INLINE_CUSTOM = "INLINE_CUSTOM"
419
- }
420
- /** @enumType */
421
- export type PolicyTypeWithLiterals = PolicyType | 'UNKNOWN_STATUS' | 'PREDEFINED' | 'CUSTOM' | 'INLINE_CUSTOM';
422
- export interface PolicyOwner {
423
- type?: PolicyOwnerTypeWithLiterals;
424
- _id?: string;
425
- }
426
- export declare enum PolicyOwnerType {
427
- UNKNOWN_TYPE = "UNKNOWN_TYPE",
428
- WIX = "WIX",
429
- WIX_ACCOUNT = "WIX_ACCOUNT"
430
- }
431
- /** @enumType */
432
- export type PolicyOwnerTypeWithLiterals = PolicyOwnerType | 'UNKNOWN_TYPE' | 'WIX' | 'WIX_ACCOUNT';
433
- export interface DomainEvent extends DomainEventBodyOneOf {
434
- createdEvent?: EntityCreatedEvent;
435
- updatedEvent?: EntityUpdatedEvent;
436
- deletedEvent?: EntityDeletedEvent;
437
- actionEvent?: ActionEvent;
438
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
439
- _id?: string;
440
- /**
441
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
442
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
443
- */
444
- entityFqdn?: string;
445
- /**
446
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
447
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
448
- */
449
- slug?: string;
450
- /** ID of the entity associated with the event. */
451
- entityId?: string;
452
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
453
- eventTime?: Date | null;
454
- /**
455
- * Whether the event was triggered as a result of a privacy regulation application
456
- * (for example, GDPR).
457
- */
458
- triggeredByAnonymizeRequest?: boolean | null;
459
- /** If present, indicates the action that triggered the event. */
460
- originatedFrom?: string | null;
461
- /**
462
- * 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.
463
- * 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.
464
- */
465
- entityEventSequence?: string | null;
466
- }
467
- /** @oneof */
468
- export interface DomainEventBodyOneOf {
469
- createdEvent?: EntityCreatedEvent;
470
- updatedEvent?: EntityUpdatedEvent;
471
- deletedEvent?: EntityDeletedEvent;
472
- actionEvent?: ActionEvent;
473
- }
474
- export interface EntityCreatedEvent {
475
- entity?: string;
476
- }
477
- export interface RestoreInfo {
478
- deletedDate?: Date | null;
479
- }
480
- export interface EntityUpdatedEvent {
481
- /**
482
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
483
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
484
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
485
- */
486
- currentEntity?: string;
487
- }
488
- export interface EntityDeletedEvent {
489
- /** Entity that was deleted. */
490
- deletedEntity?: string | null;
491
- }
492
- export interface ActionEvent {
493
- body?: string;
494
- }
495
- type DataPermissionsNonNullablePaths = `_id` | `itemRead` | `itemInsert` | `itemUpdate` | `itemRemove`;
496
- /**
497
- * Returns data permissions for a data collection
498
- * @param dataCollectionId - Data Collection ID to get permissions for
499
- * @public
500
- * @documentationMaturity preview
501
- * @requiredField dataCollectionId
502
- * @permissionId WIX_DATA.PERMISSIONS_READ
503
- * @permissionScope Manage All Data Resources
504
- * @permissionScopeId SCOPE.DC-DATA.MANAGE-ALL
505
- * @permissionScope Manage Data Collections
506
- * @permissionScopeId SCOPE.DC-DATA.DATA-COLLECTIONS-MANAGE
507
- * @applicableIdentity APP
508
- * @fqn wix.cloud.permissions.v1.DataPermissionsService.GetPermissions
509
- */
510
- export declare function getPermissions(dataCollectionId: string): Promise<NonNullablePaths<GetPermissionsResponse, {
511
- [P in DataPermissionsNonNullablePaths]: `dataPermissions.${P}`;
512
- }[DataPermissionsNonNullablePaths]>>;
513
- /**
514
- * Updates data permissions for a data collection
515
- *
516
- * NOTE that special permissions are not updated using this API, use dedicated methods for it.
517
- * @param dataPermissions - Data permissions to update
518
- * @public
519
- * @documentationMaturity preview
520
- * @requiredField dataPermissions
521
- * @requiredField dataPermissions._id
522
- * @requiredField dataPermissions.itemInsert
523
- * @requiredField dataPermissions.itemRead
524
- * @requiredField dataPermissions.itemRemove
525
- * @requiredField dataPermissions.itemUpdate
526
- * @permissionId WIX_DATA.PERMISSIONS_UPDATE
527
- * @permissionScope Manage All Data Resources
528
- * @permissionScopeId SCOPE.DC-DATA.MANAGE-ALL
529
- * @permissionScope Manage Data Collections
530
- * @permissionScopeId SCOPE.DC-DATA.DATA-COLLECTIONS-MANAGE
531
- * @applicableIdentity APP
532
- * @fqn wix.cloud.permissions.v1.DataPermissionsService.UpdatePermissions
533
- */
534
- export declare function updatePermissions(dataPermissions: NonNullablePaths<DataPermissions, `_id` | `itemInsert` | `itemRead` | `itemRemove` | `itemUpdate`>): Promise<NonNullablePaths<UpdatePermissionsResponse, {
535
- [P in DataPermissionsNonNullablePaths]: `dataPermissions.${P}`;
536
- }[DataPermissionsNonNullablePaths]>>;
537
- /**
538
- * Adds special data permissions for particular user/group
539
- * Errors:
540
- * - `ALREADY_EXISTS` in case if special permission for same subject already exists
541
- * @param dataCollectionId - Data Collection ID to add special permission for
542
- * @public
543
- * @documentationMaturity preview
544
- * @requiredField dataCollectionId
545
- * @requiredField options
546
- * @requiredField options.specialPermissions
547
- * @requiredField options.specialPermissions.subject
548
- * @permissionId WIX_DATA.PERMISSIONS_UPDATE_SPECIAL
549
- * @permissionScope Manage All Data Resources
550
- * @permissionScopeId SCOPE.DC-DATA.MANAGE-ALL
551
- * @permissionScope Manage Data Collections
552
- * @permissionScopeId SCOPE.DC-DATA.DATA-COLLECTIONS-MANAGE
553
- * @applicableIdentity APP
554
- * @fqn wix.cloud.permissions.v1.DataPermissionsService.AddSpecialPermissions
555
- */
556
- export declare function addSpecialPermissions(dataCollectionId: string, options: NonNullablePaths<AddSpecialPermissionsOptions, `specialPermissions`>): Promise<NonNullablePaths<AddSpecialPermissionsResponse, `specialPermissions.userId` | `specialPermissions.policyId` | `specialPermissions._id` | `specialPermissions.itemRead` | `specialPermissions.itemInsert` | `specialPermissions.itemUpdate` | `specialPermissions.itemRemove`>>;
557
- export interface AddSpecialPermissionsOptions {
558
- /** Special permissions to add */
559
- specialPermissions: SpecialPermissions;
560
- }
561
- /**
562
- * Updates special data permissions for particular user/group.
563
- * Any omitted permissions will be set to UNSPECIFIED.
564
- * @param _id - ID of this special access, so it can be managed separately
565
- * @public
566
- * @documentationMaturity preview
567
- * @requiredField _id
568
- * @requiredField specialPermissions
569
- * @permissionId WIX_DATA.PERMISSIONS_UPDATE_SPECIAL
570
- * @permissionScope Manage All Data Resources
571
- * @permissionScopeId SCOPE.DC-DATA.MANAGE-ALL
572
- * @permissionScope Manage Data Collections
573
- * @permissionScopeId SCOPE.DC-DATA.DATA-COLLECTIONS-MANAGE
574
- * @applicableIdentity APP
575
- * @fqn wix.cloud.permissions.v1.DataPermissionsService.UpdateSpecialPermissions
576
- */
577
- export declare function updateSpecialPermissions(_id: string, specialPermissions: UpdateSpecialPermissions): Promise<NonNullablePaths<UpdateSpecialPermissionsResponse, `specialPermissions.userId` | `specialPermissions.policyId` | `specialPermissions._id` | `specialPermissions.itemRead` | `specialPermissions.itemInsert` | `specialPermissions.itemUpdate` | `specialPermissions.itemRemove`>>;
578
- export interface UpdateSpecialPermissions {
579
- /**
580
- * User ID that is subject of these permissions
581
- * @immutable
582
- * @maxLength 64
583
- */
584
- userId?: string;
585
- /**
586
- * Policy ID of (custom) role that is subject of these permissions
587
- * @immutable
588
- * @maxLength 64
589
- */
590
- policyId?: string;
591
- /**
592
- * ID of this special access, so it can be managed separately
593
- * @format GUID
594
- * @readonly
595
- */
596
- _id?: string;
597
- /** If data item read is allowed */
598
- itemRead?: AccessWithLiterals;
599
- /** If data item insert is allowed */
600
- itemInsert?: AccessWithLiterals;
601
- /** If data item update is allowed */
602
- itemUpdate?: AccessWithLiterals;
603
- /** If data item remove is allowed */
604
- itemRemove?: AccessWithLiterals;
605
- }
606
- /**
607
- * Deletes special data permissions for particular user/group
608
- * @param specialPermissionsId - Special permissions ID to remove
609
- * @public
610
- * @documentationMaturity preview
611
- * @requiredField specialPermissionsId
612
- * @permissionId WIX_DATA.PERMISSIONS_UPDATE_SPECIAL
613
- * @permissionScope Manage All Data Resources
614
- * @permissionScopeId SCOPE.DC-DATA.MANAGE-ALL
615
- * @permissionScope Manage Data Collections
616
- * @permissionScopeId SCOPE.DC-DATA.DATA-COLLECTIONS-MANAGE
617
- * @applicableIdentity APP
618
- * @fqn wix.cloud.permissions.v1.DataPermissionsService.RemoveSpecialPermissions
619
- */
620
- export declare function removeSpecialPermissions(specialPermissionsId: string): Promise<void>;
621
- /**
622
- * Returns current user permissions for given data collection
623
- * @param dataCollectionId - Data Collection ID to get permission for
624
- * @public
625
- * @documentationMaturity preview
626
- * @requiredField dataCollectionId
627
- * @permissionId WIX_DATA.PERMISSIONS_GET_ALLOWED
628
- * @permissionScope Manage All Data Resources
629
- * @permissionScopeId SCOPE.DC-DATA.MANAGE-ALL
630
- * @permissionScope Manage Data Collections
631
- * @permissionScopeId SCOPE.DC-DATA.DATA-COLLECTIONS-MANAGE
632
- * @applicableIdentity APP
633
- * @fqn wix.cloud.permissions.v1.DataPermissionsService.GetMyPermissions
634
- */
635
- export declare function getMyPermissions(dataCollectionId: string): Promise<NonNullablePaths<GetMyPermissionsResponse, `itemRead` | `itemInsert` | `itemUpdate` | `itemRemove`>>;
636
- export {};