@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.
- package/build/{cjs/src/data-v1-data-permissions-permissions.types.d.ts → data-v1-data-permissions-permissions.universal-B1qSIhq7.d.mts} +121 -89
- package/build/{internal/cjs/src/data-v1-data-permissions-permissions.types.d.ts → data-v1-data-permissions-permissions.universal-B1qSIhq7.d.ts} +121 -89
- package/build/index.d.mts +66 -0
- package/build/index.d.ts +66 -0
- package/build/index.js +476 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +438 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/{es/src/data-v1-data-permissions-permissions.types.d.ts → data-v1-data-permissions-permissions.universal-B1qSIhq7.d.mts} +121 -89
- package/build/{es/src/data-v1-data-permissions-permissions.types.d.ts → internal/data-v1-data-permissions-permissions.universal-B1qSIhq7.d.ts} +121 -89
- package/build/internal/index.d.mts +66 -0
- package/build/internal/index.d.ts +66 -0
- package/build/internal/index.js +476 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +438 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/meta.d.mts +184 -0
- package/build/internal/meta.d.ts +184 -0
- package/build/internal/meta.js +294 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +262 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/meta.d.mts +184 -0
- package/build/meta.d.ts +184 -0
- package/build/meta.js +294 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +262 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/data-v1-data-permissions-permissions.context.d.ts +0 -10
- package/build/cjs/src/data-v1-data-permissions-permissions.context.js +0 -22
- package/build/cjs/src/data-v1-data-permissions-permissions.context.js.map +0 -1
- package/build/cjs/src/data-v1-data-permissions-permissions.http.d.ts +0 -24
- package/build/cjs/src/data-v1-data-permissions-permissions.http.js +0 -167
- package/build/cjs/src/data-v1-data-permissions-permissions.http.js.map +0 -1
- package/build/cjs/src/data-v1-data-permissions-permissions.meta.d.ts +0 -22
- package/build/cjs/src/data-v1-data-permissions-permissions.meta.js +0 -144
- package/build/cjs/src/data-v1-data-permissions-permissions.meta.js.map +0 -1
- package/build/cjs/src/data-v1-data-permissions-permissions.public.d.ts +0 -59
- package/build/cjs/src/data-v1-data-permissions-permissions.public.js +0 -52
- package/build/cjs/src/data-v1-data-permissions-permissions.public.js.map +0 -1
- package/build/cjs/src/data-v1-data-permissions-permissions.types.js +0 -78
- package/build/cjs/src/data-v1-data-permissions-permissions.types.js.map +0 -1
- package/build/cjs/src/data-v1-data-permissions-permissions.universal.d.ts +0 -636
- package/build/cjs/src/data-v1-data-permissions-permissions.universal.js +0 -349
- package/build/cjs/src/data-v1-data-permissions-permissions.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/data-v1-data-permissions-permissions.context.d.ts +0 -10
- package/build/es/src/data-v1-data-permissions-permissions.context.js +0 -10
- package/build/es/src/data-v1-data-permissions-permissions.context.js.map +0 -1
- package/build/es/src/data-v1-data-permissions-permissions.http.d.ts +0 -24
- package/build/es/src/data-v1-data-permissions-permissions.http.js +0 -158
- package/build/es/src/data-v1-data-permissions-permissions.http.js.map +0 -1
- package/build/es/src/data-v1-data-permissions-permissions.meta.d.ts +0 -22
- package/build/es/src/data-v1-data-permissions-permissions.meta.js +0 -112
- package/build/es/src/data-v1-data-permissions-permissions.meta.js.map +0 -1
- package/build/es/src/data-v1-data-permissions-permissions.public.d.ts +0 -59
- package/build/es/src/data-v1-data-permissions-permissions.public.js +0 -34
- package/build/es/src/data-v1-data-permissions-permissions.public.js.map +0 -1
- package/build/es/src/data-v1-data-permissions-permissions.types.js +0 -75
- package/build/es/src/data-v1-data-permissions-permissions.types.js.map +0 -1
- package/build/es/src/data-v1-data-permissions-permissions.universal.d.ts +0 -636
- package/build/es/src/data-v1-data-permissions-permissions.universal.js +0 -317
- package/build/es/src/data-v1-data-permissions-permissions.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/data-v1-data-permissions-permissions.context.d.ts +0 -10
- package/build/internal/cjs/src/data-v1-data-permissions-permissions.context.js +0 -22
- package/build/internal/cjs/src/data-v1-data-permissions-permissions.context.js.map +0 -1
- package/build/internal/cjs/src/data-v1-data-permissions-permissions.http.d.ts +0 -24
- package/build/internal/cjs/src/data-v1-data-permissions-permissions.http.js +0 -167
- package/build/internal/cjs/src/data-v1-data-permissions-permissions.http.js.map +0 -1
- package/build/internal/cjs/src/data-v1-data-permissions-permissions.meta.d.ts +0 -22
- package/build/internal/cjs/src/data-v1-data-permissions-permissions.meta.js +0 -144
- package/build/internal/cjs/src/data-v1-data-permissions-permissions.meta.js.map +0 -1
- package/build/internal/cjs/src/data-v1-data-permissions-permissions.public.d.ts +0 -59
- package/build/internal/cjs/src/data-v1-data-permissions-permissions.public.js +0 -52
- package/build/internal/cjs/src/data-v1-data-permissions-permissions.public.js.map +0 -1
- package/build/internal/cjs/src/data-v1-data-permissions-permissions.types.js +0 -78
- package/build/internal/cjs/src/data-v1-data-permissions-permissions.types.js.map +0 -1
- package/build/internal/cjs/src/data-v1-data-permissions-permissions.universal.d.ts +0 -636
- package/build/internal/cjs/src/data-v1-data-permissions-permissions.universal.js +0 -349
- package/build/internal/cjs/src/data-v1-data-permissions-permissions.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/data-v1-data-permissions-permissions.context.d.ts +0 -10
- package/build/internal/es/src/data-v1-data-permissions-permissions.context.js +0 -10
- package/build/internal/es/src/data-v1-data-permissions-permissions.context.js.map +0 -1
- package/build/internal/es/src/data-v1-data-permissions-permissions.http.d.ts +0 -24
- package/build/internal/es/src/data-v1-data-permissions-permissions.http.js +0 -158
- package/build/internal/es/src/data-v1-data-permissions-permissions.http.js.map +0 -1
- package/build/internal/es/src/data-v1-data-permissions-permissions.meta.d.ts +0 -22
- package/build/internal/es/src/data-v1-data-permissions-permissions.meta.js +0 -112
- package/build/internal/es/src/data-v1-data-permissions-permissions.meta.js.map +0 -1
- package/build/internal/es/src/data-v1-data-permissions-permissions.public.d.ts +0 -59
- package/build/internal/es/src/data-v1-data-permissions-permissions.public.js +0 -34
- package/build/internal/es/src/data-v1-data-permissions-permissions.public.js.map +0 -1
- package/build/internal/es/src/data-v1-data-permissions-permissions.types.js +0 -75
- package/build/internal/es/src/data-v1-data-permissions-permissions.types.js.map +0 -1
- package/build/internal/es/src/data-v1-data-permissions-permissions.universal.d.ts +0 -636
- package/build/internal/es/src/data-v1-data-permissions-permissions.universal.js +0 -317
- package/build/internal/es/src/data-v1-data-permissions-permissions.universal.js.map +0 -1
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Describes who can perform certain data operations on a collection.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
interface DataPermissions {
|
|
7
7
|
/**
|
|
8
8
|
* Data Collection ID that is subject of these permissions
|
|
9
9
|
* @immutable
|
|
10
10
|
* @maxLength 255
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
_id?: string;
|
|
13
13
|
/** Access level for data items read */
|
|
14
14
|
itemRead?: AccessLevelWithLiterals;
|
|
15
15
|
/** Access level for data items insert */
|
|
@@ -23,7 +23,7 @@ export interface DataPermissions {
|
|
|
23
23
|
* Describes who can perform certain action.
|
|
24
24
|
* Each level includes all levels below it (except UNDEFINED).
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
declare enum AccessLevel {
|
|
27
27
|
/** Not set */
|
|
28
28
|
UNKNOWN = "UNKNOWN",
|
|
29
29
|
/** Any subject, including visitors */
|
|
@@ -38,9 +38,9 @@ export declare enum AccessLevel {
|
|
|
38
38
|
PRIVILEGED = "PRIVILEGED"
|
|
39
39
|
}
|
|
40
40
|
/** @enumType */
|
|
41
|
-
|
|
41
|
+
type AccessLevelWithLiterals = AccessLevel | 'UNKNOWN' | 'ANYONE' | 'SITE_MEMBER' | 'SITE_MEMBER_AUTHOR' | 'CMS_EDITOR' | 'PRIVILEGED';
|
|
42
42
|
/** Special access granted to user or role */
|
|
43
|
-
|
|
43
|
+
interface SpecialPermissions extends SpecialPermissionsSubjectOneOf {
|
|
44
44
|
/**
|
|
45
45
|
* User ID that is subject of these permissions
|
|
46
46
|
* @immutable
|
|
@@ -58,7 +58,7 @@ export interface SpecialPermissions extends SpecialPermissionsSubjectOneOf {
|
|
|
58
58
|
* @format GUID
|
|
59
59
|
* @readonly
|
|
60
60
|
*/
|
|
61
|
-
|
|
61
|
+
_id?: string;
|
|
62
62
|
/** If data item read is allowed */
|
|
63
63
|
itemRead?: AccessWithLiterals;
|
|
64
64
|
/** If data item insert is allowed */
|
|
@@ -69,7 +69,7 @@ export interface SpecialPermissions extends SpecialPermissionsSubjectOneOf {
|
|
|
69
69
|
itemRemove?: AccessWithLiterals;
|
|
70
70
|
}
|
|
71
71
|
/** @oneof */
|
|
72
|
-
|
|
72
|
+
interface SpecialPermissionsSubjectOneOf {
|
|
73
73
|
/**
|
|
74
74
|
* User ID that is subject of these permissions
|
|
75
75
|
* @immutable
|
|
@@ -83,34 +83,34 @@ export interface SpecialPermissionsSubjectOneOf {
|
|
|
83
83
|
*/
|
|
84
84
|
policyId?: string;
|
|
85
85
|
}
|
|
86
|
-
|
|
86
|
+
declare enum Access {
|
|
87
87
|
/** Action is not specifically allowed, but can be allowed by top-level permissions */
|
|
88
88
|
UNSPECIFIED = "UNSPECIFIED",
|
|
89
89
|
/** Action is specifically allowed */
|
|
90
90
|
ALLOWED = "ALLOWED"
|
|
91
91
|
}
|
|
92
92
|
/** @enumType */
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
type AccessWithLiterals = Access | 'UNSPECIFIED' | 'ALLOWED';
|
|
94
|
+
interface GetPermissionsRequest {
|
|
95
95
|
/**
|
|
96
96
|
* Data Collection ID to get permissions for
|
|
97
97
|
* @maxLength 256
|
|
98
98
|
*/
|
|
99
99
|
dataCollectionId: string;
|
|
100
100
|
}
|
|
101
|
-
|
|
101
|
+
interface GetPermissionsResponse {
|
|
102
102
|
/** Requested data permissions */
|
|
103
103
|
dataPermissions?: DataPermissions;
|
|
104
104
|
}
|
|
105
|
-
|
|
105
|
+
interface UpdatePermissionsRequest {
|
|
106
106
|
/** Data permissions to update */
|
|
107
107
|
dataPermissions: DataPermissions;
|
|
108
108
|
}
|
|
109
|
-
|
|
109
|
+
interface UpdatePermissionsResponse {
|
|
110
110
|
/** Updated data permissions */
|
|
111
111
|
dataPermissions?: DataPermissions;
|
|
112
112
|
}
|
|
113
|
-
|
|
113
|
+
interface AddSpecialPermissionsRequest {
|
|
114
114
|
/**
|
|
115
115
|
* Data Collection ID to add special permission for
|
|
116
116
|
* @maxLength 256
|
|
@@ -119,35 +119,35 @@ export interface AddSpecialPermissionsRequest {
|
|
|
119
119
|
/** Special permissions to add */
|
|
120
120
|
specialPermissions: SpecialPermissions;
|
|
121
121
|
}
|
|
122
|
-
|
|
122
|
+
interface AddSpecialPermissionsResponse {
|
|
123
123
|
/** Added special data permissions */
|
|
124
124
|
specialPermissions?: SpecialPermissions;
|
|
125
125
|
}
|
|
126
|
-
|
|
126
|
+
interface UpdateSpecialPermissionsRequest {
|
|
127
127
|
/** Special permissions to update */
|
|
128
128
|
specialPermissions: SpecialPermissions;
|
|
129
129
|
}
|
|
130
|
-
|
|
130
|
+
interface UpdateSpecialPermissionsResponse {
|
|
131
131
|
/** Updated special data permissions */
|
|
132
132
|
specialPermissions?: SpecialPermissions;
|
|
133
133
|
}
|
|
134
|
-
|
|
134
|
+
interface RemoveSpecialPermissionsRequest {
|
|
135
135
|
/**
|
|
136
136
|
* Special permissions ID to remove
|
|
137
137
|
* @format GUID
|
|
138
138
|
*/
|
|
139
139
|
specialPermissionsId: string;
|
|
140
140
|
}
|
|
141
|
-
|
|
141
|
+
interface RemoveSpecialPermissionsResponse {
|
|
142
142
|
}
|
|
143
|
-
|
|
143
|
+
interface GetMyPermissionsRequest {
|
|
144
144
|
/**
|
|
145
145
|
* Data Collection ID to get permission for
|
|
146
146
|
* @maxLength 256
|
|
147
147
|
*/
|
|
148
148
|
dataCollectionId: string;
|
|
149
149
|
}
|
|
150
|
-
|
|
150
|
+
interface GetMyPermissionsResponse {
|
|
151
151
|
/** If data item read is allowed */
|
|
152
152
|
itemRead?: boolean;
|
|
153
153
|
/** If data item insert is allowed */
|
|
@@ -157,39 +157,39 @@ export interface GetMyPermissionsResponse {
|
|
|
157
157
|
/** If data item remove is allowed */
|
|
158
158
|
itemRemove?: boolean;
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
interface MigrateCustomRolesRequest {
|
|
161
161
|
/**
|
|
162
162
|
* Role ID to update, if empty updates all roles in scope
|
|
163
163
|
* @format GUID
|
|
164
164
|
*/
|
|
165
165
|
policyId?: string | null;
|
|
166
166
|
}
|
|
167
|
-
|
|
167
|
+
interface MigrateCustomRolesResponse {
|
|
168
168
|
}
|
|
169
|
-
|
|
169
|
+
interface PolicyAssignmentsUpdated extends PolicyAssignmentsUpdatedEventOneOf {
|
|
170
170
|
policyAssigned?: PolicyAssigned;
|
|
171
171
|
policyUnassigned?: PolicyUnassigned;
|
|
172
172
|
policyAssignmentUpdated?: PolicyAssignmentUpdated;
|
|
173
173
|
}
|
|
174
174
|
/** @oneof */
|
|
175
|
-
|
|
175
|
+
interface PolicyAssignmentsUpdatedEventOneOf {
|
|
176
176
|
policyAssigned?: PolicyAssigned;
|
|
177
177
|
policyUnassigned?: PolicyUnassigned;
|
|
178
178
|
policyAssignmentUpdated?: PolicyAssignmentUpdated;
|
|
179
179
|
}
|
|
180
|
-
|
|
180
|
+
interface PolicyAssigned {
|
|
181
181
|
subject?: Subject;
|
|
182
182
|
assignment?: PolicyAssignment[];
|
|
183
183
|
}
|
|
184
|
-
|
|
184
|
+
interface Subject {
|
|
185
185
|
/** ID of identity assigned to the asset. */
|
|
186
|
-
|
|
186
|
+
_id?: string;
|
|
187
187
|
/** Type of identity assigned to the asset. Supported subject types include user IDs, account IDs, and app IDs. */
|
|
188
188
|
subjectType?: SubjectTypeWithLiterals;
|
|
189
189
|
/** Context of identity assigned to the asset. For example, a `subjectType` = `USER` will have `context` = `ACCOUNT`. */
|
|
190
190
|
context?: SubjectContext;
|
|
191
191
|
}
|
|
192
|
-
|
|
192
|
+
declare enum SubjectType {
|
|
193
193
|
UNKNOWN = "UNKNOWN",
|
|
194
194
|
ACCOUNT = "ACCOUNT",
|
|
195
195
|
USER = "USER",
|
|
@@ -201,25 +201,25 @@ export declare enum SubjectType {
|
|
|
201
201
|
WIX_APP = "WIX_APP"
|
|
202
202
|
}
|
|
203
203
|
/** @enumType */
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
204
|
+
type SubjectTypeWithLiterals = SubjectType | 'UNKNOWN' | 'ACCOUNT' | 'USER' | 'USER_GROUP' | 'MEMBER_GROUP' | 'VISITOR_GROUP' | 'EXTERNAL_APP' | 'ACCOUNT_GROUP' | 'WIX_APP';
|
|
205
|
+
interface SubjectContext {
|
|
206
|
+
_id?: string;
|
|
207
207
|
contextType?: SubjectContextTypeWithLiterals;
|
|
208
208
|
}
|
|
209
|
-
|
|
209
|
+
declare enum SubjectContextType {
|
|
210
210
|
UNKNOWN_CTX = "UNKNOWN_CTX",
|
|
211
211
|
ORG_CTX = "ORG_CTX",
|
|
212
212
|
ACCOUNT_CTX = "ACCOUNT_CTX"
|
|
213
213
|
}
|
|
214
214
|
/** @enumType */
|
|
215
|
-
|
|
216
|
-
|
|
215
|
+
type SubjectContextTypeWithLiterals = SubjectContextType | 'UNKNOWN_CTX' | 'ORG_CTX' | 'ACCOUNT_CTX';
|
|
216
|
+
interface PolicyAssignment {
|
|
217
217
|
policyId?: string;
|
|
218
218
|
resource?: ResourcePath;
|
|
219
219
|
condition?: PolicyCondition;
|
|
220
220
|
assignmentId?: string | null;
|
|
221
221
|
}
|
|
222
|
-
|
|
222
|
+
interface ResourcePath {
|
|
223
223
|
organization?: string | null;
|
|
224
224
|
account?: string | null;
|
|
225
225
|
site?: string | null;
|
|
@@ -229,17 +229,17 @@ export interface ResourcePath {
|
|
|
229
229
|
* A custom resource. Is used to represent some asset that is not a direct resource context (site or account), but something custom.
|
|
230
230
|
* For example: payment method, blog post, domain, logo.
|
|
231
231
|
*/
|
|
232
|
-
|
|
232
|
+
interface Resource {
|
|
233
233
|
/** The resource id. */
|
|
234
|
-
|
|
234
|
+
_id?: string | null;
|
|
235
235
|
/** The resource type */
|
|
236
236
|
type?: string | null;
|
|
237
237
|
}
|
|
238
|
-
|
|
238
|
+
interface PolicyCondition {
|
|
239
239
|
/** The type of the condition */
|
|
240
240
|
condition?: ConditionType;
|
|
241
241
|
}
|
|
242
|
-
|
|
242
|
+
interface ConditionType extends ConditionTypeOfOneOf {
|
|
243
243
|
/** @deprecated */
|
|
244
244
|
simpleCondition?: SimpleCondition;
|
|
245
245
|
/** A logic combination between several conditions, with an operator between them */
|
|
@@ -250,7 +250,7 @@ export interface ConditionType extends ConditionTypeOfOneOf {
|
|
|
250
250
|
condition?: Condition;
|
|
251
251
|
}
|
|
252
252
|
/** @oneof */
|
|
253
|
-
|
|
253
|
+
interface ConditionTypeOfOneOf {
|
|
254
254
|
/** @deprecated */
|
|
255
255
|
simpleCondition?: SimpleCondition;
|
|
256
256
|
/** A logic combination between several conditions, with an operator between them */
|
|
@@ -260,61 +260,61 @@ export interface ConditionTypeOfOneOf {
|
|
|
260
260
|
/** A single condition */
|
|
261
261
|
condition?: Condition;
|
|
262
262
|
}
|
|
263
|
-
|
|
263
|
+
interface SimpleCondition {
|
|
264
264
|
attrName?: string;
|
|
265
265
|
value?: SimpleConditionValue;
|
|
266
266
|
op?: SimpleConditionOperatorWithLiterals;
|
|
267
267
|
conditionModelId?: string;
|
|
268
268
|
}
|
|
269
|
-
|
|
269
|
+
interface SimpleConditionValue extends SimpleConditionValueValueOneOf {
|
|
270
270
|
attrName?: string;
|
|
271
271
|
stringValue?: string;
|
|
272
272
|
boolValue?: boolean;
|
|
273
273
|
}
|
|
274
274
|
/** @oneof */
|
|
275
|
-
|
|
275
|
+
interface SimpleConditionValueValueOneOf {
|
|
276
276
|
attrName?: string;
|
|
277
277
|
stringValue?: string;
|
|
278
278
|
boolValue?: boolean;
|
|
279
279
|
}
|
|
280
|
-
|
|
280
|
+
declare enum SimpleConditionOperator {
|
|
281
281
|
UNKNOWN_SIMPLE_OP = "UNKNOWN_SIMPLE_OP",
|
|
282
282
|
EQUAL = "EQUAL"
|
|
283
283
|
}
|
|
284
284
|
/** @enumType */
|
|
285
|
-
|
|
286
|
-
|
|
285
|
+
type SimpleConditionOperatorWithLiterals = SimpleConditionOperator | 'UNKNOWN_SIMPLE_OP' | 'EQUAL';
|
|
286
|
+
interface JoinedCondition {
|
|
287
287
|
/** The operator that should be used when evaluating the condition */
|
|
288
288
|
op?: JoinedConditionOperatorWithLiterals;
|
|
289
289
|
/** The conditions that should be evaluated, and then joined using the operator provided */
|
|
290
290
|
conditions?: ConditionType[];
|
|
291
291
|
}
|
|
292
|
-
|
|
292
|
+
declare enum JoinedConditionOperator {
|
|
293
293
|
UNKNOWN_JOIN_OP = "UNKNOWN_JOIN_OP",
|
|
294
294
|
OR = "OR",
|
|
295
295
|
AND = "AND"
|
|
296
296
|
}
|
|
297
297
|
/** @enumType */
|
|
298
|
-
|
|
299
|
-
|
|
298
|
+
type JoinedConditionOperatorWithLiterals = JoinedConditionOperator | 'UNKNOWN_JOIN_OP' | 'OR' | 'AND';
|
|
299
|
+
interface EnvironmentCondition extends EnvironmentConditionConditionOneOf {
|
|
300
300
|
experimentCondition?: ExperimentCondition;
|
|
301
301
|
}
|
|
302
302
|
/** @oneof */
|
|
303
|
-
|
|
303
|
+
interface EnvironmentConditionConditionOneOf {
|
|
304
304
|
experimentCondition?: ExperimentCondition;
|
|
305
305
|
}
|
|
306
|
-
|
|
306
|
+
interface ExperimentCondition {
|
|
307
307
|
spec?: string;
|
|
308
308
|
fallbackValue?: string;
|
|
309
309
|
expectedValue?: string;
|
|
310
310
|
}
|
|
311
|
-
|
|
311
|
+
interface Condition {
|
|
312
312
|
/** The unique identifier of the condition model. Indicates which actions the condition is working on */
|
|
313
313
|
conditionModelId?: string;
|
|
314
314
|
/** The operator that should be evaluated */
|
|
315
315
|
operator?: ConditionOperator;
|
|
316
316
|
}
|
|
317
|
-
|
|
317
|
+
interface ConditionOperator extends ConditionOperatorOperatorsOneOf {
|
|
318
318
|
/** Comparison of equality - will be evaluated to true if the given parties are equal */
|
|
319
319
|
equals?: EqualOperator;
|
|
320
320
|
/** Regex operator - will be evaluated to true if the given value matches the provided regex */
|
|
@@ -325,7 +325,7 @@ export interface ConditionOperator extends ConditionOperatorOperatorsOneOf {
|
|
|
325
325
|
dependOn?: DependOnOperator;
|
|
326
326
|
}
|
|
327
327
|
/** @oneof */
|
|
328
|
-
|
|
328
|
+
interface ConditionOperatorOperatorsOneOf {
|
|
329
329
|
/** Comparison of equality - will be evaluated to true if the given parties are equal */
|
|
330
330
|
equals?: EqualOperator;
|
|
331
331
|
/** Regex operator - will be evaluated to true if the given value matches the provided regex */
|
|
@@ -335,13 +335,13 @@ export interface ConditionOperatorOperatorsOneOf {
|
|
|
335
335
|
/** Operator that indicates a dependency on another subject being allowed to perform something. */
|
|
336
336
|
dependOn?: DependOnOperator;
|
|
337
337
|
}
|
|
338
|
-
|
|
338
|
+
interface EqualOperator {
|
|
339
339
|
/** The attribute which should be compared. The attribute will be first evaluated to a value, and then compared the other side (attribute/value) */
|
|
340
340
|
attrName?: string;
|
|
341
341
|
/** The value to compare to. If the two parties are equal - we will return true. */
|
|
342
342
|
value?: ConditionValue;
|
|
343
343
|
}
|
|
344
|
-
|
|
344
|
+
interface ConditionValue extends ConditionValueValueOneOf {
|
|
345
345
|
/** 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. */
|
|
346
346
|
attrName?: string;
|
|
347
347
|
/** a value with a string type. Will be compared to the attribute provided, and be true only if they match the operator. */
|
|
@@ -350,7 +350,7 @@ export interface ConditionValue extends ConditionValueValueOneOf {
|
|
|
350
350
|
boolValue?: boolean;
|
|
351
351
|
}
|
|
352
352
|
/** @oneof */
|
|
353
|
-
|
|
353
|
+
interface ConditionValueValueOneOf {
|
|
354
354
|
/** 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. */
|
|
355
355
|
attrName?: string;
|
|
356
356
|
/** a value with a string type. Will be compared to the attribute provided, and be true only if they match the operator. */
|
|
@@ -358,13 +358,13 @@ export interface ConditionValueValueOneOf {
|
|
|
358
358
|
/** a value with a boolean type. Will be compared to the attribute provided, and be true only if they match the operator. */
|
|
359
359
|
boolValue?: boolean;
|
|
360
360
|
}
|
|
361
|
-
|
|
361
|
+
interface LikeOperator {
|
|
362
362
|
/** The attribute which should be compared. The attribute will be first evaluated to a value, and then compared the regex values provided. */
|
|
363
363
|
attrName?: string;
|
|
364
364
|
/** 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 */
|
|
365
365
|
values?: string[];
|
|
366
366
|
}
|
|
367
|
-
|
|
367
|
+
interface ExperimentOperator {
|
|
368
368
|
/** The spec to conduct the experiment on. */
|
|
369
369
|
spec?: string;
|
|
370
370
|
/** The value to use if the experiment could not be conducted */
|
|
@@ -373,69 +373,69 @@ export interface ExperimentOperator {
|
|
|
373
373
|
expectedValue?: string;
|
|
374
374
|
}
|
|
375
375
|
/** Implies that the policy takes affect only if the depend on subject is permitted as well. */
|
|
376
|
-
|
|
376
|
+
interface DependOnOperator {
|
|
377
377
|
/** 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 */
|
|
378
378
|
dependOnSubject?: Subject;
|
|
379
379
|
}
|
|
380
|
-
|
|
380
|
+
interface PolicyUnassigned {
|
|
381
381
|
subject?: Subject;
|
|
382
382
|
assignment?: PolicyAssignment[];
|
|
383
383
|
}
|
|
384
|
-
|
|
384
|
+
interface PolicyAssignmentUpdated {
|
|
385
385
|
subject?: Subject;
|
|
386
386
|
fromAssignment?: PolicyAssignment[];
|
|
387
387
|
toAssignment?: PolicyAssignment[];
|
|
388
388
|
}
|
|
389
|
-
|
|
389
|
+
interface Empty {
|
|
390
390
|
}
|
|
391
|
-
|
|
391
|
+
interface PolicyAuthorizationDataUpdated {
|
|
392
392
|
policyId?: string;
|
|
393
393
|
fromPolicyStatements?: PolicyStatement[];
|
|
394
394
|
toPolicyStatements?: PolicyStatement[];
|
|
395
395
|
policyType?: PolicyTypeWithLiterals;
|
|
396
396
|
policyOwner?: PolicyOwner;
|
|
397
397
|
}
|
|
398
|
-
|
|
398
|
+
interface PolicyStatement {
|
|
399
399
|
/** @readonly */
|
|
400
|
-
|
|
400
|
+
_id?: string | null;
|
|
401
401
|
permissions?: string[];
|
|
402
402
|
scopes?: string[];
|
|
403
403
|
effect?: EffectWithLiterals;
|
|
404
404
|
condition?: PolicyCondition;
|
|
405
405
|
}
|
|
406
|
-
|
|
406
|
+
declare enum Effect {
|
|
407
407
|
UNKNOWN_EFFECT = "UNKNOWN_EFFECT",
|
|
408
408
|
ALLOW = "ALLOW",
|
|
409
409
|
DENY = "DENY"
|
|
410
410
|
}
|
|
411
411
|
/** @enumType */
|
|
412
|
-
|
|
413
|
-
|
|
412
|
+
type EffectWithLiterals = Effect | 'UNKNOWN_EFFECT' | 'ALLOW' | 'DENY';
|
|
413
|
+
declare enum PolicyType {
|
|
414
414
|
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
415
415
|
PREDEFINED = "PREDEFINED",
|
|
416
416
|
CUSTOM = "CUSTOM",
|
|
417
417
|
INLINE_CUSTOM = "INLINE_CUSTOM"
|
|
418
418
|
}
|
|
419
419
|
/** @enumType */
|
|
420
|
-
|
|
421
|
-
|
|
420
|
+
type PolicyTypeWithLiterals = PolicyType | 'UNKNOWN_STATUS' | 'PREDEFINED' | 'CUSTOM' | 'INLINE_CUSTOM';
|
|
421
|
+
interface PolicyOwner {
|
|
422
422
|
type?: PolicyOwnerTypeWithLiterals;
|
|
423
|
-
|
|
423
|
+
_id?: string;
|
|
424
424
|
}
|
|
425
|
-
|
|
425
|
+
declare enum PolicyOwnerType {
|
|
426
426
|
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
427
427
|
WIX = "WIX",
|
|
428
428
|
WIX_ACCOUNT = "WIX_ACCOUNT"
|
|
429
429
|
}
|
|
430
430
|
/** @enumType */
|
|
431
|
-
|
|
432
|
-
|
|
431
|
+
type PolicyOwnerTypeWithLiterals = PolicyOwnerType | 'UNKNOWN_TYPE' | 'WIX' | 'WIX_ACCOUNT';
|
|
432
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
433
433
|
createdEvent?: EntityCreatedEvent;
|
|
434
434
|
updatedEvent?: EntityUpdatedEvent;
|
|
435
435
|
deletedEvent?: EntityDeletedEvent;
|
|
436
436
|
actionEvent?: ActionEvent;
|
|
437
437
|
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
438
|
-
|
|
438
|
+
_id?: string;
|
|
439
439
|
/**
|
|
440
440
|
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
441
441
|
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
@@ -464,32 +464,64 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
464
464
|
entityEventSequence?: string | null;
|
|
465
465
|
}
|
|
466
466
|
/** @oneof */
|
|
467
|
-
|
|
467
|
+
interface DomainEventBodyOneOf {
|
|
468
468
|
createdEvent?: EntityCreatedEvent;
|
|
469
469
|
updatedEvent?: EntityUpdatedEvent;
|
|
470
470
|
deletedEvent?: EntityDeletedEvent;
|
|
471
471
|
actionEvent?: ActionEvent;
|
|
472
472
|
}
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
476
|
-
restoreInfo?: RestoreInfo;
|
|
473
|
+
interface EntityCreatedEvent {
|
|
474
|
+
entity?: string;
|
|
477
475
|
}
|
|
478
|
-
|
|
476
|
+
interface RestoreInfo {
|
|
479
477
|
deletedDate?: Date | null;
|
|
480
478
|
}
|
|
481
|
-
|
|
479
|
+
interface EntityUpdatedEvent {
|
|
482
480
|
/**
|
|
483
481
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
484
482
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
485
483
|
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
486
484
|
*/
|
|
487
|
-
|
|
485
|
+
currentEntity?: string;
|
|
488
486
|
}
|
|
489
|
-
|
|
487
|
+
interface EntityDeletedEvent {
|
|
490
488
|
/** Entity that was deleted. */
|
|
491
|
-
|
|
489
|
+
deletedEntity?: string | null;
|
|
492
490
|
}
|
|
493
|
-
|
|
494
|
-
|
|
491
|
+
interface ActionEvent {
|
|
492
|
+
body?: string;
|
|
495
493
|
}
|
|
494
|
+
interface AddSpecialPermissionsOptions {
|
|
495
|
+
/** Special permissions to add */
|
|
496
|
+
specialPermissions: SpecialPermissions;
|
|
497
|
+
}
|
|
498
|
+
interface UpdateSpecialPermissions {
|
|
499
|
+
/**
|
|
500
|
+
* User ID that is subject of these permissions
|
|
501
|
+
* @immutable
|
|
502
|
+
* @maxLength 64
|
|
503
|
+
*/
|
|
504
|
+
userId?: string;
|
|
505
|
+
/**
|
|
506
|
+
* Policy ID of (custom) role that is subject of these permissions
|
|
507
|
+
* @immutable
|
|
508
|
+
* @maxLength 64
|
|
509
|
+
*/
|
|
510
|
+
policyId?: string;
|
|
511
|
+
/**
|
|
512
|
+
* ID of this special access, so it can be managed separately
|
|
513
|
+
* @format GUID
|
|
514
|
+
* @readonly
|
|
515
|
+
*/
|
|
516
|
+
_id?: string;
|
|
517
|
+
/** If data item read is allowed */
|
|
518
|
+
itemRead?: AccessWithLiterals;
|
|
519
|
+
/** If data item insert is allowed */
|
|
520
|
+
itemInsert?: AccessWithLiterals;
|
|
521
|
+
/** If data item update is allowed */
|
|
522
|
+
itemUpdate?: AccessWithLiterals;
|
|
523
|
+
/** If data item remove is allowed */
|
|
524
|
+
itemRemove?: AccessWithLiterals;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
export { type ExperimentOperator as $, type AddSpecialPermissionsOptions as A, type PolicyCondition as B, type ConditionType as C, type DataPermissions as D, Effect as E, type ConditionTypeOfOneOf as F, type GetPermissionsResponse as G, type SimpleCondition as H, type SimpleConditionValue as I, JoinedConditionOperator as J, type SimpleConditionValueValueOneOf as K, type JoinedCondition as L, type MigrateCustomRolesRequest as M, type EnvironmentCondition as N, type EnvironmentConditionConditionOneOf as O, PolicyType as P, type ExperimentCondition as Q, type RemoveSpecialPermissionsRequest as R, SubjectType as S, type Condition as T, type UpdatePermissionsResponse as U, type ConditionOperator as V, type ConditionOperatorOperatorsOneOf as W, type EqualOperator as X, type ConditionValue as Y, type ConditionValueValueOneOf as Z, type LikeOperator as _, type AddSpecialPermissionsResponse as a, type DependOnOperator as a0, type PolicyUnassigned as a1, type PolicyAssignmentUpdated as a2, type Empty as a3, type PolicyAuthorizationDataUpdated as a4, type PolicyStatement as a5, type PolicyOwner as a6, type DomainEvent as a7, type DomainEventBodyOneOf as a8, type EntityCreatedEvent as a9, type RestoreInfo as aa, type EntityUpdatedEvent as ab, type EntityDeletedEvent as ac, type ActionEvent as ad, type UpdateSpecialPermissions as b, type UpdateSpecialPermissionsResponse as c, type GetMyPermissionsResponse as d, AccessLevel as e, Access as f, SubjectContextType as g, SimpleConditionOperator as h, PolicyOwnerType as i, type SpecialPermissions as j, type SpecialPermissionsSubjectOneOf as k, type GetPermissionsRequest as l, type UpdatePermissionsRequest as m, type AddSpecialPermissionsRequest as n, type UpdateSpecialPermissionsRequest as o, type RemoveSpecialPermissionsResponse as p, type GetMyPermissionsRequest as q, type MigrateCustomRolesResponse as r, type PolicyAssignmentsUpdated as s, type PolicyAssignmentsUpdatedEventOneOf as t, type PolicyAssigned as u, type Subject as v, type SubjectContext as w, type PolicyAssignment as x, type ResourcePath as y, type Resource as z };
|