@wix/auto_sdk_user-management_users 1.0.0

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 (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/identity-roles-v1-user-users.context.d.ts +8 -0
  11. package/build/cjs/src/identity-roles-v1-user-users.context.js +32 -0
  12. package/build/cjs/src/identity-roles-v1-user-users.context.js.map +1 -0
  13. package/build/cjs/src/identity-roles-v1-user-users.http.d.ts +26 -0
  14. package/build/cjs/src/identity-roles-v1-user-users.http.js +254 -0
  15. package/build/cjs/src/identity-roles-v1-user-users.http.js.map +1 -0
  16. package/build/cjs/src/identity-roles-v1-user-users.meta.d.ts +17 -0
  17. package/build/cjs/src/identity-roles-v1-user-users.meta.js +123 -0
  18. package/build/cjs/src/identity-roles-v1-user-users.meta.js.map +1 -0
  19. package/build/cjs/src/identity-roles-v1-user-users.public.d.ts +43 -0
  20. package/build/cjs/src/identity-roles-v1-user-users.public.js +57 -0
  21. package/build/cjs/src/identity-roles-v1-user-users.public.js.map +1 -0
  22. package/build/cjs/src/identity-roles-v1-user-users.types.d.ts +1043 -0
  23. package/build/cjs/src/identity-roles-v1-user-users.types.js +140 -0
  24. package/build/cjs/src/identity-roles-v1-user-users.types.js.map +1 -0
  25. package/build/cjs/src/identity-roles-v1-user-users.universal.d.ts +1124 -0
  26. package/build/cjs/src/identity-roles-v1-user-users.universal.js +363 -0
  27. package/build/cjs/src/identity-roles-v1-user-users.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/identity-roles-v1-user-users.context.d.ts +8 -0
  39. package/build/es/src/identity-roles-v1-user-users.context.js +10 -0
  40. package/build/es/src/identity-roles-v1-user-users.context.js.map +1 -0
  41. package/build/es/src/identity-roles-v1-user-users.http.d.ts +26 -0
  42. package/build/es/src/identity-roles-v1-user-users.http.js +246 -0
  43. package/build/es/src/identity-roles-v1-user-users.http.js.map +1 -0
  44. package/build/es/src/identity-roles-v1-user-users.meta.d.ts +17 -0
  45. package/build/es/src/identity-roles-v1-user-users.meta.js +92 -0
  46. package/build/es/src/identity-roles-v1-user-users.meta.js.map +1 -0
  47. package/build/es/src/identity-roles-v1-user-users.public.d.ts +43 -0
  48. package/build/es/src/identity-roles-v1-user-users.public.js +30 -0
  49. package/build/es/src/identity-roles-v1-user-users.public.js.map +1 -0
  50. package/build/es/src/identity-roles-v1-user-users.types.d.ts +1043 -0
  51. package/build/es/src/identity-roles-v1-user-users.types.js +137 -0
  52. package/build/es/src/identity-roles-v1-user-users.types.js.map +1 -0
  53. package/build/es/src/identity-roles-v1-user-users.universal.d.ts +1124 -0
  54. package/build/es/src/identity-roles-v1-user-users.universal.js +332 -0
  55. package/build/es/src/identity-roles-v1-user-users.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/identity-roles-v1-user-users.context.d.ts +10 -0
  66. package/build/internal/cjs/src/identity-roles-v1-user-users.context.js +32 -0
  67. package/build/internal/cjs/src/identity-roles-v1-user-users.context.js.map +1 -0
  68. package/build/internal/cjs/src/identity-roles-v1-user-users.http.d.ts +26 -0
  69. package/build/internal/cjs/src/identity-roles-v1-user-users.http.js +254 -0
  70. package/build/internal/cjs/src/identity-roles-v1-user-users.http.js.map +1 -0
  71. package/build/internal/cjs/src/identity-roles-v1-user-users.meta.d.ts +17 -0
  72. package/build/internal/cjs/src/identity-roles-v1-user-users.meta.js +123 -0
  73. package/build/internal/cjs/src/identity-roles-v1-user-users.meta.js.map +1 -0
  74. package/build/internal/cjs/src/identity-roles-v1-user-users.public.d.ts +53 -0
  75. package/build/internal/cjs/src/identity-roles-v1-user-users.public.js +57 -0
  76. package/build/internal/cjs/src/identity-roles-v1-user-users.public.js.map +1 -0
  77. package/build/internal/cjs/src/identity-roles-v1-user-users.types.d.ts +1043 -0
  78. package/build/internal/cjs/src/identity-roles-v1-user-users.types.js +140 -0
  79. package/build/internal/cjs/src/identity-roles-v1-user-users.types.js.map +1 -0
  80. package/build/internal/cjs/src/identity-roles-v1-user-users.universal.d.ts +1138 -0
  81. package/build/internal/cjs/src/identity-roles-v1-user-users.universal.js +363 -0
  82. package/build/internal/cjs/src/identity-roles-v1-user-users.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/identity-roles-v1-user-users.context.d.ts +10 -0
  93. package/build/internal/es/src/identity-roles-v1-user-users.context.js +10 -0
  94. package/build/internal/es/src/identity-roles-v1-user-users.context.js.map +1 -0
  95. package/build/internal/es/src/identity-roles-v1-user-users.http.d.ts +26 -0
  96. package/build/internal/es/src/identity-roles-v1-user-users.http.js +246 -0
  97. package/build/internal/es/src/identity-roles-v1-user-users.http.js.map +1 -0
  98. package/build/internal/es/src/identity-roles-v1-user-users.meta.d.ts +17 -0
  99. package/build/internal/es/src/identity-roles-v1-user-users.meta.js +92 -0
  100. package/build/internal/es/src/identity-roles-v1-user-users.meta.js.map +1 -0
  101. package/build/internal/es/src/identity-roles-v1-user-users.public.d.ts +53 -0
  102. package/build/internal/es/src/identity-roles-v1-user-users.public.js +30 -0
  103. package/build/internal/es/src/identity-roles-v1-user-users.public.js.map +1 -0
  104. package/build/internal/es/src/identity-roles-v1-user-users.types.d.ts +1043 -0
  105. package/build/internal/es/src/identity-roles-v1-user-users.types.js +137 -0
  106. package/build/internal/es/src/identity-roles-v1-user-users.types.js.map +1 -0
  107. package/build/internal/es/src/identity-roles-v1-user-users.universal.d.ts +1138 -0
  108. package/build/internal/es/src/identity-roles-v1-user-users.universal.js +332 -0
  109. package/build/internal/es/src/identity-roles-v1-user-users.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,1124 @@
1
+ export interface User {
2
+ /** User ID. */
3
+ _id?: string;
4
+ /**
5
+ * Deprecated.
6
+ * @deprecated
7
+ */
8
+ roles?: string[];
9
+ /** User's email address. */
10
+ email?: string;
11
+ /** User's name. */
12
+ name?: Name;
13
+ /** URL to user's profile image, when provided. */
14
+ profileImage?: string | null;
15
+ /** Date the user joined the team. */
16
+ joinedTeamAt?: Date | null;
17
+ /**
18
+ * Deprecated.
19
+ * @deprecated
20
+ */
21
+ policyIds?: string[];
22
+ /** Resources the user can access. */
23
+ assignments?: Assignment[];
24
+ }
25
+ export interface Name {
26
+ /** User's first name. */
27
+ firstName?: string;
28
+ /** User's last name. */
29
+ lastName?: string;
30
+ }
31
+ export interface Assignment {
32
+ /** Role assigned to the user. */
33
+ policy?: AssignedPolicy;
34
+ /** Unique ID for this specific assignment. */
35
+ assignmentId?: string;
36
+ /** Identity assigned to the asset in an assignment, referred to as subject. Supported subjects include user IDs, account IDs, and app IDs. */
37
+ subject?: Subject;
38
+ }
39
+ export interface AssignedPolicy {
40
+ /** Role ID. */
41
+ policyId?: string;
42
+ /** Role title. */
43
+ title?: string | null;
44
+ /** Role description. */
45
+ description?: string | null;
46
+ }
47
+ export interface Restriction extends RestrictionRestrictionsOneOf {
48
+ /**
49
+ * Deprecated.
50
+ * @deprecated
51
+ */
52
+ resource?: ApiResource;
53
+ /** List of conditions restricting the user's access. Currently only folder conditions are supported. */
54
+ conditions?: Conditions;
55
+ /** Site where the assignment restrictions apply. */
56
+ site?: SiteRestriction;
57
+ /** Location where the assignment restrictions apply. */
58
+ locations?: LocationsRestriction;
59
+ }
60
+ /** @oneof */
61
+ export interface RestrictionRestrictionsOneOf {
62
+ /**
63
+ * Deprecated.
64
+ * @deprecated
65
+ */
66
+ resource?: ApiResource;
67
+ /** List of conditions restricting the user's access. Currently only folder conditions are supported. */
68
+ conditions?: Conditions;
69
+ /** Site where the assignment restrictions apply. */
70
+ site?: SiteRestriction;
71
+ /** Location where the assignment restrictions apply. */
72
+ locations?: LocationsRestriction;
73
+ }
74
+ export interface ApiResource {
75
+ /** Resource type. */
76
+ resourceType?: ResourceType;
77
+ /** Resource ID. */
78
+ _id?: string;
79
+ value?: string | null;
80
+ }
81
+ export declare enum ResourceType {
82
+ UNKNOWN_RESOURCE_TYPE = "UNKNOWN_RESOURCE_TYPE",
83
+ SITE = "SITE"
84
+ }
85
+ export interface Conditions {
86
+ /** List of conditions. */
87
+ conditions?: ApiCondition[];
88
+ }
89
+ export interface ApiCondition {
90
+ /** Condition type. */
91
+ conditionType?: ConditionAttributeType;
92
+ /** Condition ID. */
93
+ _id?: string;
94
+ /** Expected value of the condition. When `conditionType` = "FOLDER", this is the folder path. */
95
+ value?: string | null;
96
+ }
97
+ export declare enum ConditionAttributeType {
98
+ UNKNOWN_CONDITION_TYPE = "UNKNOWN_CONDITION_TYPE",
99
+ FOLDER = "FOLDER"
100
+ }
101
+ export interface SiteRestriction {
102
+ /** Site ID. */
103
+ _id?: string;
104
+ /** Site name. */
105
+ value?: string | null;
106
+ }
107
+ export interface CompanionResource {
108
+ /** Asset ID (referred to here as resource ID). */
109
+ _id?: string;
110
+ /** Asset type (referred to here as resource type). as predefined in the authorization system */
111
+ resourceType?: string;
112
+ }
113
+ export interface LocationsRestriction {
114
+ /** Location IDs. */
115
+ ids?: string[];
116
+ }
117
+ export interface Subject {
118
+ /** ID of identity assigned to the asset. */
119
+ _id?: string;
120
+ /** Type of identity assigned to the asset. Supported subject types include user IDs, account IDs, and app IDs. */
121
+ subjectType?: SubjectType;
122
+ /** Context of identity assigned to the asset. For example, a `subjectType` = `USER` will have `context` = `ACCOUNT`. */
123
+ context?: SubjectContext;
124
+ }
125
+ export declare enum SubjectType {
126
+ UNKNOWN = "UNKNOWN",
127
+ ACCOUNT = "ACCOUNT",
128
+ USER = "USER",
129
+ USER_GROUP = "USER_GROUP",
130
+ MEMBER_GROUP = "MEMBER_GROUP",
131
+ VISITOR_GROUP = "VISITOR_GROUP",
132
+ EXTERNAL_APP = "EXTERNAL_APP",
133
+ ACCOUNT_GROUP = "ACCOUNT_GROUP",
134
+ WIX_APP = "WIX_APP"
135
+ }
136
+ export interface SubjectContext {
137
+ _id?: string;
138
+ contextType?: SubjectContextType;
139
+ }
140
+ export declare enum SubjectContextType {
141
+ UNKNOWN_CTX = "UNKNOWN_CTX",
142
+ ORG_CTX = "ORG_CTX",
143
+ ACCOUNT_CTX = "ACCOUNT_CTX"
144
+ }
145
+ export interface GetTeamRequest {
146
+ /** @deprecated */
147
+ usersLimit?: number | null;
148
+ /** The locale of the request. Defaults to en */
149
+ locale?: string | null;
150
+ paging?: Paging;
151
+ }
152
+ export interface Paging {
153
+ /** Number of items to load. */
154
+ limit?: number | null;
155
+ /** Number of items to skip in the current sort order. */
156
+ offset?: number | null;
157
+ }
158
+ export interface GetTeamResponse {
159
+ users?: User[];
160
+ invites?: AccountInvite[];
161
+ accountInfo?: AccountInfo;
162
+ permissions?: string[];
163
+ userId?: string;
164
+ targetAccountId?: string;
165
+ policies?: ApiPolicy[];
166
+ totalUsersInAccount?: string;
167
+ predefinedRoles?: PredefinedRoles;
168
+ }
169
+ export interface AccountInvite {
170
+ /**
171
+ * Invite ID.
172
+ * @readonly
173
+ */
174
+ _id?: string;
175
+ /**
176
+ * Account ID.
177
+ * @readonly
178
+ */
179
+ accountId?: string;
180
+ /** Email address where the invite was sent. */
181
+ email?: string;
182
+ /**
183
+ * Deprecated. Use `policyIds`.
184
+ * @deprecated
185
+ */
186
+ role?: string;
187
+ /**
188
+ * Deprecated. Use `inviterAccountId`.
189
+ * @readonly
190
+ * @deprecated
191
+ */
192
+ inviterId?: string;
193
+ /**
194
+ * Invite status.
195
+ *
196
+ * Supported values:
197
+ * - **Pending:** The invite has been sent and is valid, waiting for the user's response.
198
+ * - **Used:** The invite has been accepted.
199
+ * - **Deleted:** The invite has been deleted or revoked.
200
+ * - **Declined:** The user has declined the invite.
201
+ * - **Expired:** The invite has expired without being accepted.
202
+ */
203
+ status?: InviteStatus;
204
+ /** Link to accept the invite. */
205
+ acceptLink?: string;
206
+ /**
207
+ * Inviting account ID.
208
+ * @readonly
209
+ */
210
+ inviterAccountId?: string;
211
+ /**
212
+ * Account ID that accepted the invite. Populated only once the invite is accepted.
213
+ * @readonly
214
+ */
215
+ acceptedByAccountId?: string | null;
216
+ /** Date the invite was created. */
217
+ dateCreated?: Date | null;
218
+ /** Role IDs included in the invite. */
219
+ policyIds?: string[];
220
+ /** Date the invite was last updated. */
221
+ dateUpdated?: Date | null;
222
+ /** Assets the users are invited to join. */
223
+ assignments?: InviteResourceAssignment[];
224
+ /** Invite expiration date. */
225
+ expirationDate?: Date | null;
226
+ }
227
+ /** Invite status stating whether the invite was accepted, waiting to be accepted, deleted etc.. */
228
+ export declare enum InviteStatus {
229
+ Pending = "Pending",
230
+ Used = "Used",
231
+ Deleted = "Deleted",
232
+ Declined = "Declined",
233
+ Expired = "Expired"
234
+ }
235
+ export interface InviteResourceAssignment {
236
+ /** Role ID. */
237
+ policyId?: string;
238
+ /** Resources the user will be able to access. */
239
+ assignments?: InviteAssignment[];
240
+ }
241
+ export interface InviteAssignment {
242
+ /** Full name of resource to be assigned. */
243
+ fullNameResource?: FullNameResource;
244
+ }
245
+ export interface FullNameResource extends FullNameResourceResourceContextOneOf {
246
+ /** Specific site details. */
247
+ siteContext?: SiteResourceContext;
248
+ /** Specific account details. */
249
+ accountContext?: AccountResourceContext;
250
+ }
251
+ /** @oneof */
252
+ export interface FullNameResourceResourceContextOneOf {
253
+ /** Specific site details. */
254
+ siteContext?: SiteResourceContext;
255
+ /** Specific account details. */
256
+ accountContext?: AccountResourceContext;
257
+ }
258
+ /** Site resource context. It indicates that the resource is under a site (can be the site itself or some asset of a site, like a blog post) */
259
+ export interface SiteResourceContext {
260
+ /** Site ID. */
261
+ metasiteId?: string;
262
+ }
263
+ /** Account resource contexts. It indicates that the resource is under the account (can be the account itself or some asset of an account, like a logo or a domain) */
264
+ export interface AccountResourceContext {
265
+ /** Account ID. */
266
+ accountId?: string;
267
+ }
268
+ export interface OrganizationResourceContext {
269
+ }
270
+ /**
271
+ * A custom resource. Is used to represent some asset that is not a direct resource context (site or account), but something custom.
272
+ * For example: payment method, blog post, domain, logo.
273
+ */
274
+ export interface Resource {
275
+ /** The resource id. */
276
+ _id?: string | null;
277
+ /** The resource type */
278
+ type?: string | null;
279
+ }
280
+ export interface PolicyCondition {
281
+ /** The type of the condition */
282
+ condition?: ConditionType;
283
+ }
284
+ export interface ConditionType extends ConditionTypeOfOneOf {
285
+ /** @deprecated */
286
+ simpleCondition?: SimpleCondition;
287
+ /** A logic combination between several conditions, with an operator between them */
288
+ joinedConditions?: JoinedCondition;
289
+ /** @deprecated */
290
+ environmentCondition?: EnvironmentCondition;
291
+ /** A single condition */
292
+ condition?: Condition;
293
+ }
294
+ /** @oneof */
295
+ export interface ConditionTypeOfOneOf {
296
+ /** @deprecated */
297
+ simpleCondition?: SimpleCondition;
298
+ /** A logic combination between several conditions, with an operator between them */
299
+ joinedConditions?: JoinedCondition;
300
+ /** @deprecated */
301
+ environmentCondition?: EnvironmentCondition;
302
+ /** A single condition */
303
+ condition?: Condition;
304
+ }
305
+ export interface SimpleCondition {
306
+ attrName?: string;
307
+ value?: SimpleConditionValue;
308
+ op?: SimpleConditionOperator;
309
+ conditionModelId?: string;
310
+ }
311
+ export interface SimpleConditionValue extends SimpleConditionValueValueOneOf {
312
+ attrName?: string;
313
+ stringValue?: string;
314
+ boolValue?: boolean;
315
+ }
316
+ /** @oneof */
317
+ export interface SimpleConditionValueValueOneOf {
318
+ attrName?: string;
319
+ stringValue?: string;
320
+ boolValue?: boolean;
321
+ }
322
+ export declare enum SimpleConditionOperator {
323
+ UNKNOWN_SIMPLE_OP = "UNKNOWN_SIMPLE_OP",
324
+ EQUAL = "EQUAL"
325
+ }
326
+ export interface JoinedCondition {
327
+ /** The operator that should be used when evaluating the condition */
328
+ op?: JoinedConditionOperator;
329
+ /** The conditions that should be evaluated, and then joined using the operator provided */
330
+ conditions?: ConditionType[];
331
+ }
332
+ export declare enum JoinedConditionOperator {
333
+ UNKNOWN_JOIN_OP = "UNKNOWN_JOIN_OP",
334
+ OR = "OR",
335
+ AND = "AND"
336
+ }
337
+ export interface EnvironmentCondition extends EnvironmentConditionConditionOneOf {
338
+ experimentCondition?: ExperimentCondition;
339
+ }
340
+ /** @oneof */
341
+ export interface EnvironmentConditionConditionOneOf {
342
+ experimentCondition?: ExperimentCondition;
343
+ }
344
+ export interface ExperimentCondition {
345
+ spec?: string;
346
+ fallbackValue?: string;
347
+ expectedValue?: string;
348
+ }
349
+ export interface Condition {
350
+ /** The unique identifier of the condition model. Indicates which actions the condition is working on */
351
+ conditionModelId?: string;
352
+ /** The operator that should be evaluated */
353
+ operator?: ConditionOperator;
354
+ }
355
+ export interface ConditionOperator extends ConditionOperatorOperatorsOneOf {
356
+ /** Comparison of equality - will be evaluated to true if the given parties are equal */
357
+ equals?: EqualOperator;
358
+ /** Regex operator - will be evaluated to true if the given value matches the provided regex */
359
+ like?: LikeOperator;
360
+ /** Petri experiment - will be evaluated using petri. */
361
+ experiment?: ExperimentOperator;
362
+ /** Operator that indicates a dependency on another subject being allowed to perform something. */
363
+ dependOn?: DependOnOperator;
364
+ }
365
+ /** @oneof */
366
+ export interface ConditionOperatorOperatorsOneOf {
367
+ /** Comparison of equality - will be evaluated to true if the given parties are equal */
368
+ equals?: EqualOperator;
369
+ /** Regex operator - will be evaluated to true if the given value matches the provided regex */
370
+ like?: LikeOperator;
371
+ /** Petri experiment - will be evaluated using petri. */
372
+ experiment?: ExperimentOperator;
373
+ /** Operator that indicates a dependency on another subject being allowed to perform something. */
374
+ dependOn?: DependOnOperator;
375
+ }
376
+ export interface EqualOperator {
377
+ /** The attribute which should be compared. The attribute will be first evaluated to a value, and then compared the other side (attribute/value) */
378
+ attrName?: string;
379
+ /** The value to compare to. If the two parties are equal - we will return true. */
380
+ value?: ConditionValue;
381
+ }
382
+ export interface ConditionValue extends ConditionValueValueOneOf {
383
+ /** 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. */
384
+ attrName?: string;
385
+ /** a value with a string type. Will be compared to the attribute provided, and be true only if they match the operator. */
386
+ stringValue?: string;
387
+ /** a value with a boolean type. Will be compared to the attribute provided, and be true only if they match the operator. */
388
+ boolValue?: boolean;
389
+ }
390
+ /** @oneof */
391
+ export interface ConditionValueValueOneOf {
392
+ /** 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. */
393
+ attrName?: string;
394
+ /** a value with a string type. Will be compared to the attribute provided, and be true only if they match the operator. */
395
+ stringValue?: string;
396
+ /** a value with a boolean type. Will be compared to the attribute provided, and be true only if they match the operator. */
397
+ boolValue?: boolean;
398
+ }
399
+ export interface LikeOperator {
400
+ /** The attribute which should be compared. The attribute will be first evaluated to a value, and then compared the regex values provided. */
401
+ attrName?: string;
402
+ /** 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 */
403
+ values?: string[];
404
+ }
405
+ export interface ExperimentOperator {
406
+ /** The spec to conduct the experiment on. */
407
+ spec?: string;
408
+ /** The value to use if the experiment could not be conducted */
409
+ fallbackValue?: string;
410
+ /** The expected value of the experiment conduction. If it matches the actual value - true will be returned. Otherwise - false. */
411
+ expectedValue?: string;
412
+ }
413
+ /** Implies that the policy takes affect only if the depend on subject is permitted as well. */
414
+ export interface DependOnOperator {
415
+ /** 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 */
416
+ dependOnSubject?: Subject;
417
+ }
418
+ export interface AccountInfo {
419
+ accountName?: string;
420
+ accountImage?: string;
421
+ isTeam?: boolean;
422
+ }
423
+ export interface ApiPolicy {
424
+ _id?: string;
425
+ description?: string | null;
426
+ name?: string | null;
427
+ isCustom?: boolean;
428
+ scopes?: string[];
429
+ }
430
+ export interface PredefinedRoles {
431
+ roles?: PredefinedRole[];
432
+ }
433
+ export interface PredefinedRole {
434
+ titleKey?: string;
435
+ roles?: Role[];
436
+ title?: string | null;
437
+ areaId?: string;
438
+ }
439
+ export interface Role {
440
+ _id?: string;
441
+ deprecatedKey?: string;
442
+ /** @deprecated */
443
+ titleKey?: string;
444
+ /** @deprecated */
445
+ descriptionKey?: string;
446
+ deprecated?: boolean;
447
+ restrictFromLevel?: string;
448
+ experiments?: string[];
449
+ appDefIds?: string[];
450
+ title?: string | null;
451
+ description?: string | null;
452
+ isCustom?: boolean;
453
+ scopes?: string[];
454
+ availableResourceTypes?: ResourceType[];
455
+ availableConditions?: ConditionAttributeType[];
456
+ limitToEditorTypes?: string[];
457
+ }
458
+ export interface ChangeRoleRequest {
459
+ /** User ID. */
460
+ _id?: string;
461
+ /**
462
+ * Deprecated. Use `policyIds`.
463
+ * @deprecated
464
+ */
465
+ role?: string;
466
+ /** Role IDs to be assigned. */
467
+ policyIds?: string[];
468
+ }
469
+ export interface ChangeRoleResponse {
470
+ }
471
+ export interface RemoveMemberRequest {
472
+ /** User ID of the team member to remove. */
473
+ userId: string;
474
+ }
475
+ export interface RemoveMemberResponse {
476
+ }
477
+ export interface GetUsersRequest {
478
+ /** The number of items to load */
479
+ limit?: number | null;
480
+ /** number of items to skip in the current sort order */
481
+ offset?: number | null;
482
+ }
483
+ export interface GetUsersResponse {
484
+ users?: User[];
485
+ }
486
+ export interface GetScopesRequest {
487
+ /** The locale of the request. Defaults to en */
488
+ locale?: string | null;
489
+ }
490
+ export interface GetScopesResponse {
491
+ scopeAreas?: ScopeArea[];
492
+ }
493
+ export interface ScopeArea {
494
+ title?: string;
495
+ appDefIds?: string[];
496
+ scopes?: PermissionScope[];
497
+ restrictFromLevel?: ScopeLevel;
498
+ }
499
+ export interface PermissionScope {
500
+ _id?: string;
501
+ title?: string;
502
+ description?: string;
503
+ level?: ScopeLevel;
504
+ experiments?: string[];
505
+ dependantScopes?: string[];
506
+ restrictFromLevel?: ScopeLevel;
507
+ deprecated?: boolean | null;
508
+ /** The visibility of the scope for the caller */
509
+ visibility?: Visibility;
510
+ appDefIds?: string[];
511
+ }
512
+ export declare enum ScopeLevel {
513
+ None = "None",
514
+ SITE = "SITE",
515
+ ACCOUNT = "ACCOUNT"
516
+ }
517
+ export declare enum Visibility {
518
+ /** The scope should be visible to the caller */
519
+ VISIBLE = "VISIBLE",
520
+ /** The scope shouldn't be visible for the caller, because the capability that blocks it is turned on for the caller */
521
+ BLOCKED_BY_CAPABILITY = "BLOCKED_BY_CAPABILITY"
522
+ }
523
+ export interface GetPeopleRequest {
524
+ resource?: PeopleResource;
525
+ peopleType?: PeopleType;
526
+ paging?: Paging;
527
+ /** The locale of the request. Defaults to en */
528
+ locale?: string | null;
529
+ }
530
+ export interface PeopleResource extends PeopleResourceResourceTypeOneOf {
531
+ site?: string;
532
+ folder?: FolderResource;
533
+ }
534
+ /** @oneof */
535
+ export interface PeopleResourceResourceTypeOneOf {
536
+ site?: string;
537
+ folder?: FolderResource;
538
+ }
539
+ export interface FolderResource {
540
+ folderId?: string;
541
+ folderFullPath?: string;
542
+ }
543
+ export declare enum PeopleType {
544
+ UNDEF_PEOPLE_TYPE = "UNDEF_PEOPLE_TYPE",
545
+ CONTRIBUTOR = "CONTRIBUTOR",
546
+ TEAM_MEMBER = "TEAM_MEMBER"
547
+ }
548
+ export interface GetPeopleResponse {
549
+ people?: People;
550
+ }
551
+ export interface People {
552
+ people?: Person[];
553
+ totalPeople?: number;
554
+ }
555
+ export interface Person extends PersonPersonOneOf {
556
+ contributor?: Contributor;
557
+ teamMember?: TeamMember;
558
+ }
559
+ /** @oneof */
560
+ export interface PersonPersonOneOf {
561
+ contributor?: Contributor;
562
+ teamMember?: TeamMember;
563
+ }
564
+ export interface Contributor {
565
+ /** Contributor's metadata. */
566
+ metaData?: PersonMetaData;
567
+ /** Whether the contributor account is a team account. */
568
+ isTeam?: boolean | null;
569
+ /** Date that the contributor joined the site. */
570
+ joinedAt?: Date | null;
571
+ /** Email address that received the invite. */
572
+ invitedEmail?: string | null;
573
+ /** Whether the contributor account is a client account. */
574
+ isClient?: boolean | null;
575
+ /**
576
+ * Contributor's user ID.
577
+ * @readonly
578
+ */
579
+ _id?: string;
580
+ }
581
+ export interface PersonMetaData {
582
+ /** Contributor's account ID. */
583
+ _id?: string;
584
+ /** Contributor's full name. */
585
+ fullName?: string | null;
586
+ /** URL for contributor's profile image. */
587
+ imageUrl?: string | null;
588
+ /** Contributor's email address. */
589
+ email?: string | null;
590
+ /** Contributor's access to assets and their assigned role (`policy`) for that asset. */
591
+ assignments?: Assignment[];
592
+ }
593
+ export interface TeamMember {
594
+ metaData?: PersonMetaData;
595
+ }
596
+ export interface GetTeamV2Response {
597
+ users?: User[];
598
+ totalUsersInAccount?: string;
599
+ }
600
+ export interface GetTeamInvitesRequest {
601
+ /** The locale of the request. Defaults to en */
602
+ locale?: string | null;
603
+ }
604
+ export interface GetTeamInvitesResponse {
605
+ invites?: Invite[];
606
+ }
607
+ export interface Invite {
608
+ /** @readonly */
609
+ _id?: string;
610
+ /** @readonly */
611
+ accountId?: string;
612
+ email?: string;
613
+ status?: InviteStatus;
614
+ acceptLink?: string;
615
+ dateCreated?: Date | null;
616
+ dateUpdated?: Date | null;
617
+ assignments?: ApiInviteAssignment[];
618
+ /** Invite expiration date */
619
+ expirationDate?: Date | null;
620
+ }
621
+ export interface ApiInviteAssignment {
622
+ policy?: AssignedPolicy;
623
+ restrictions?: Restriction;
624
+ }
625
+ export interface GetPoliciesRequest {
626
+ /** The locale of the request. Defaults to en */
627
+ locale?: string | null;
628
+ /** Areas filter to include only roles from areas that pass this filter. When not provided, roles from all areas will be returned */
629
+ areasFilter?: AreasFilter;
630
+ /** Role level filter to include only roles that are not restricted from the requested resource level (site/account). When set to ALL, all levels are returned */
631
+ roleLevel?: RoleLevel;
632
+ }
633
+ export interface AreasFilter {
634
+ /** A list of role area ids, to filter only roles belonging to these areas */
635
+ areaIds?: string[];
636
+ }
637
+ export declare enum RoleLevel {
638
+ ALL = "ALL",
639
+ SITE_LEVEL = "SITE_LEVEL",
640
+ ACCOUNT_LEVEL = "ACCOUNT_LEVEL"
641
+ }
642
+ export interface GetPoliciesResponse {
643
+ policies?: PredefinedRoles;
644
+ }
645
+ export interface SearchTeamRequest {
646
+ /** Free text to search for within team member name and email address fields. */
647
+ query?: string | null;
648
+ /** Sort data. */
649
+ orderBy?: Ordering[];
650
+ /**
651
+ * Filter object. Supported values: `inviteType` and `roleId`. For example, `{'inviteType': {'$eq': 'Expired'}}`.
652
+ * See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more information.
653
+ */
654
+ filter?: Record<string, any> | null;
655
+ /**
656
+ * A list of facets to return in the response. Facets count the items within logical groupings.
657
+ * See [Filters and Facets: An Explainer](https://medium.com/@westontt/filters-and-facets-an-explainer-3b73a9538eca) for more information.
658
+ */
659
+ facets?: FacetType[];
660
+ /** Pagination. */
661
+ paging?: Paging;
662
+ }
663
+ export interface Ordering {
664
+ /** Field to sort by. */
665
+ fieldName?: OrderField;
666
+ /** Sort order. */
667
+ direction?: Direction;
668
+ }
669
+ export declare enum OrderField {
670
+ /** For internal use. */
671
+ Undefined = "Undefined",
672
+ /** Team member name. */
673
+ Name = "Name",
674
+ /** Date team member joined the account. */
675
+ JoinedAt = "JoinedAt"
676
+ }
677
+ export declare enum Direction {
678
+ /** For internal use. */
679
+ UninitializedDirection = "UninitializedDirection",
680
+ /** Ascending. */
681
+ ASC = "ASC",
682
+ /** Descending. */
683
+ DESC = "DESC"
684
+ }
685
+ export declare enum FacetType {
686
+ Undefined = "Undefined",
687
+ /** How many team members with each role */
688
+ Roles = "Roles",
689
+ /** How many team members by invite status */
690
+ InviteStatus = "InviteStatus",
691
+ /** How many team members in total in the account */
692
+ Users = "Users"
693
+ }
694
+ export interface SearchTeamResponse {
695
+ /** List of facets, as requested. */
696
+ facets?: Facet[];
697
+ /** Existing team members and invites sent to join the account. */
698
+ teamMembers?: TeamMemberV3[];
699
+ }
700
+ export interface Facet {
701
+ /** Facet type. */
702
+ facetType?: FacetType;
703
+ /** Values and their counters. Values with count = 0 are not returned. */
704
+ values?: FacetValue[];
705
+ }
706
+ export interface FacetValue {
707
+ /** Supported values: `Roles`, `InviteStatus`, `Users`. */
708
+ value?: string;
709
+ /** Number of existing items for the value. */
710
+ count?: number;
711
+ }
712
+ export interface TeamMemberV3 extends TeamMemberV3MembersOneOf {
713
+ /** Existing team member data. */
714
+ user?: UserV3;
715
+ /** Invited team member data. */
716
+ invite?: InviteV3;
717
+ }
718
+ /** @oneof */
719
+ export interface TeamMemberV3MembersOneOf {
720
+ /** Existing team member data. */
721
+ user?: UserV3;
722
+ /** Invited team member data. */
723
+ invite?: InviteV3;
724
+ }
725
+ export interface UserV3 {
726
+ /** User ID. */
727
+ _id?: string;
728
+ /** User's email address. */
729
+ email?: string | null;
730
+ /** User's name, when provided. */
731
+ name?: Name;
732
+ /** URL to user's profile image, when provided. */
733
+ profileImage?: string | null;
734
+ /** Date the user joined the team. */
735
+ joinedTeamAt?: Date | null;
736
+ /** Mapping of the user's access to an asset and their assigned role. */
737
+ assignments?: AssignmentV3[];
738
+ }
739
+ export interface AssignmentV3 {
740
+ /** Role assigned to the user. To retrieve all available roles, call Get Roles Info. */
741
+ policyId?: string | null;
742
+ /**
743
+ * Unique ID for this specific assignment.
744
+ * @readonly
745
+ */
746
+ assignmentId?: string | null;
747
+ /** The asset where a user is assigned access in an assignment. When empty, the role covers all assets, with no restrictions to specific sites or folders. */
748
+ restrictions?: Restriction;
749
+ /** Identity assigned to the asset in an assignment, referred to as subject. Supported subjects include user IDs, account IDs, and app IDs. */
750
+ subject?: AssignedSubject;
751
+ }
752
+ export interface AssignedSubject {
753
+ /**
754
+ * Identity ID.
755
+ * @readonly
756
+ */
757
+ _id?: string;
758
+ /** Identity type. */
759
+ subjectType?: SubjectType;
760
+ }
761
+ export interface InviteV3 {
762
+ /**
763
+ * Invite ID.
764
+ * @readonly
765
+ */
766
+ _id?: string;
767
+ /** Invitee's email address. */
768
+ email?: string | null;
769
+ /** Invite status. */
770
+ status?: InviteStatus;
771
+ /** URL of direct link to accept the invite. */
772
+ acceptLink?: string | null;
773
+ /** Date the invite was created. */
774
+ dateCreated?: Date | null;
775
+ /** Date the invite was last updated. */
776
+ dateUpdated?: Date | null;
777
+ /** A list of assignments that will be applied to the invitees when they accept the invite. */
778
+ assignments?: InviteAssignmentV3[];
779
+ /** Invite expiration date. */
780
+ expirationDate?: Date | null;
781
+ }
782
+ export interface InviteAssignmentV3 {
783
+ /** Role ID that will be assigned once the invite is accepted. */
784
+ policyId?: string | null;
785
+ /** Assets where the user will be assigned access. When empty, the role covers all assets, with no restrictions to specific sites or folders. */
786
+ restrictions?: Restriction;
787
+ }
788
+ export interface GetRolesRequest {
789
+ /** The locale of the predefined roles names and descriptions. Defaults to English */
790
+ locale?: string | null;
791
+ }
792
+ export interface GetRolesResponse {
793
+ /** The predefined roles (by areas) */
794
+ predefinedRolesAreas?: PredefinedRolesArea[];
795
+ /** The custom roles */
796
+ customRoles?: CustomRole[];
797
+ }
798
+ export interface PredefinedRolesArea {
799
+ /** The id of the area (e.g "Blog") */
800
+ areaId?: string;
801
+ /** The translated area title, according to the request locale, or the original title if translation failed */
802
+ title?: string;
803
+ /** The predefined roles belonging to this area */
804
+ roles?: PredefinedRoleV2[];
805
+ }
806
+ export interface PredefinedRoleV2 {
807
+ /** The policy id of this role */
808
+ _id?: string;
809
+ /** The title of this role, translated according to the request locale, or the original title if translation failed */
810
+ title?: string;
811
+ /** The description of this role, translated according to the request locale, or the original description if translation failed */
812
+ description?: string;
813
+ /** The permission-scopes this role's policy contains */
814
+ scopes?: string[];
815
+ /** Indicates if the role is deprecated (shouldn't be granted, and only exists for backward compatability) */
816
+ deprecated?: boolean;
817
+ /** Indicates if this role should be restricted from assignments of a specific resource type (if RoleLevelRestriction = None, there is no restriction) */
818
+ restrictFromLevel?: RoleLevelRestriction;
819
+ /** Experiments that should be open for this role to be visible */
820
+ experiments?: string[];
821
+ /** Applications that should be installed for this role to be visible */
822
+ appDefIds?: string[];
823
+ /** Editor types this role should be limited to (if empty, available in all editors) */
824
+ limitToEditorTypes?: EditorType[];
825
+ /** The visibility of the role */
826
+ visibility?: RoleVisibility;
827
+ }
828
+ export declare enum RoleLevelRestriction {
829
+ NoRestriction = "NoRestriction",
830
+ Site = "Site",
831
+ Account = "Account"
832
+ }
833
+ export declare enum EditorType {
834
+ UNINITIALIZED = "UNINITIALIZED",
835
+ EDITORX = "EDITORX",
836
+ BLOCKS = "BLOCKS",
837
+ STUDIO = "STUDIO"
838
+ }
839
+ export declare enum RoleVisibility {
840
+ /** the role should be visible to the caller */
841
+ Visible = "Visible",
842
+ /** the role should be disabled for the caller, because it contains permissions the caller wasn't granted on the call context (site/account) */
843
+ Disabled_Dependency = "Disabled_Dependency",
844
+ /** the role should be disabled for the caller, because the role's capability is disabled for the caller */
845
+ Disabled_Capability = "Disabled_Capability"
846
+ }
847
+ export interface CustomRole {
848
+ /** The policy this role grants */
849
+ policy?: ApiPolicy;
850
+ /** The visibility of the role */
851
+ visibility?: RoleVisibility;
852
+ /** Whether this role is assigned to a subject */
853
+ assigned?: boolean | null;
854
+ }
855
+ export interface GetRolesInfoRequest {
856
+ /** Language of predefined roles names and descriptions to return, in ISO 639 format. Default: `en`. */
857
+ locale?: string | null;
858
+ /** Roles to return. */
859
+ filter?: RolesInfoFilter;
860
+ }
861
+ export interface RolesInfoFilter {
862
+ /** Role level to return. Default: ALL. */
863
+ roleLevel?: RoleLevel;
864
+ /** Filter for editor-specific roles. Default: ALL. */
865
+ editorTypes?: EditorType[];
866
+ }
867
+ export interface GetRolesInfoResponse {
868
+ /** Predefined roles. */
869
+ predefinedRoles?: RoleInfo[];
870
+ /** Custom roles. */
871
+ customRoles?: RoleInfo[];
872
+ }
873
+ export interface RoleInfo {
874
+ /** Role ID. */
875
+ _id?: string;
876
+ /** Role title, translated according to the request locale. If translation fails, the original title is returned. */
877
+ title?: string;
878
+ /** Role description, translated according to the request locale. If translation fails, the original description is returned. */
879
+ description?: string;
880
+ /** Whether this role is restricted from accessing a specific resource type. Default: `NoRestriction`. */
881
+ restrictFromLevel?: RoleLevelRestriction;
882
+ }
883
+ export interface CreateCustomRoleRequest {
884
+ /** The custom role to create */
885
+ role?: Policy;
886
+ }
887
+ export interface Policy {
888
+ /** @readonly */
889
+ _id?: string | null;
890
+ name?: string | null;
891
+ description?: string | null;
892
+ /** @readonly */
893
+ status?: string;
894
+ policyType?: PolicyType;
895
+ statements?: PolicyStatement[];
896
+ }
897
+ export declare enum PolicyType {
898
+ UNKNOWN_STATUS = "UNKNOWN_STATUS",
899
+ PREDEFINED = "PREDEFINED",
900
+ CUSTOM = "CUSTOM",
901
+ INLINE_CUSTOM = "INLINE_CUSTOM"
902
+ }
903
+ export interface PolicyStatement {
904
+ /** @readonly */
905
+ _id?: string | null;
906
+ permissions?: string[];
907
+ scopes?: string[];
908
+ effect?: Effect;
909
+ condition?: PolicyCondition;
910
+ }
911
+ export declare enum Effect {
912
+ UNKNOWN_EFFECT = "UNKNOWN_EFFECT",
913
+ ALLOW = "ALLOW",
914
+ DENY = "DENY"
915
+ }
916
+ export interface CreateCustomRoleResponse {
917
+ /** The newly created custom role */
918
+ roleCreated?: Policy;
919
+ }
920
+ export interface ChangeRoleV2Request {
921
+ /** ID of team member being affected. */
922
+ userId: string;
923
+ /** New assignments, including roles, to apply to the team member in this account. To retrieve all available roles, call Get Roles Info. */
924
+ roles: AssignmentV3[];
925
+ /** Existing assignment IDs to remove. To retrieve all existing assignment IDs for a team member, call Search Team. */
926
+ assignmentIdsToReplace: string[];
927
+ }
928
+ export interface ChangeRoleV2Response {
929
+ /** New roles assigned to the given team member. */
930
+ roles?: AssignmentV3[];
931
+ }
932
+ export interface UpdateTeamMemberAssignmentsRequest {
933
+ /** ID of team member being affected. */
934
+ userId: string;
935
+ /** New assignments to apply to the team member in this account. */
936
+ newAssignments: AssignmentV3[];
937
+ /** Existing assignment IDs to remove. To retrieve all existing assignment IDs for a team member, call Search Team. */
938
+ assignmentIdsToRemove: string[];
939
+ }
940
+ export interface UpdateTeamMemberAssignmentsResponse {
941
+ /** The new assignments, assigned to the given team member. */
942
+ assignments?: AssignmentV3[];
943
+ }
944
+ export interface GetSubjectsAssignmentsRequest {
945
+ /** The locale of the request. Defaults to en */
946
+ locale?: string | null;
947
+ /** list of subjects */
948
+ subjects?: Subject[];
949
+ }
950
+ export interface GetSubjectsAssignmentsResponse {
951
+ /** list of subjects with assignments */
952
+ subjectsAssignments?: SubjectAssignments[];
953
+ }
954
+ export interface SubjectAssignments {
955
+ subject?: Subject;
956
+ assignments?: Assignment[];
957
+ }
958
+ interface FacetValueNonNullableFields {
959
+ value: string;
960
+ count: number;
961
+ }
962
+ interface FacetNonNullableFields {
963
+ facetType: FacetType;
964
+ values: FacetValueNonNullableFields[];
965
+ }
966
+ interface NameNonNullableFields {
967
+ firstName: string;
968
+ lastName: string;
969
+ }
970
+ interface ApiResourceNonNullableFields {
971
+ resourceType: ResourceType;
972
+ _id: string;
973
+ }
974
+ interface ApiConditionNonNullableFields {
975
+ conditionType: ConditionAttributeType;
976
+ _id: string;
977
+ }
978
+ interface ConditionsNonNullableFields {
979
+ conditions: ApiConditionNonNullableFields[];
980
+ }
981
+ interface CompanionResourceNonNullableFields {
982
+ _id: string;
983
+ resourceType: string;
984
+ }
985
+ interface SiteRestrictionNonNullableFields {
986
+ _id: string;
987
+ resource?: CompanionResourceNonNullableFields;
988
+ }
989
+ interface LocationsRestrictionNonNullableFields {
990
+ ids: string[];
991
+ }
992
+ interface RestrictionNonNullableFields {
993
+ resource?: ApiResourceNonNullableFields;
994
+ conditions?: ConditionsNonNullableFields;
995
+ site?: SiteRestrictionNonNullableFields;
996
+ locations?: LocationsRestrictionNonNullableFields;
997
+ }
998
+ interface AssignedSubjectNonNullableFields {
999
+ _id: string;
1000
+ subjectType: SubjectType;
1001
+ }
1002
+ interface AssignmentV3NonNullableFields {
1003
+ restrictions?: RestrictionNonNullableFields;
1004
+ subject?: AssignedSubjectNonNullableFields;
1005
+ }
1006
+ interface UserV3NonNullableFields {
1007
+ _id: string;
1008
+ name?: NameNonNullableFields;
1009
+ assignments: AssignmentV3NonNullableFields[];
1010
+ }
1011
+ interface InviteAssignmentV3NonNullableFields {
1012
+ restrictions?: RestrictionNonNullableFields;
1013
+ }
1014
+ interface InviteV3NonNullableFields {
1015
+ _id: string;
1016
+ status: InviteStatus;
1017
+ assignments: InviteAssignmentV3NonNullableFields[];
1018
+ }
1019
+ interface TeamMemberV3NonNullableFields {
1020
+ user?: UserV3NonNullableFields;
1021
+ invite?: InviteV3NonNullableFields;
1022
+ }
1023
+ export interface SearchTeamResponseNonNullableFields {
1024
+ facets: FacetNonNullableFields[];
1025
+ teamMembers: TeamMemberV3NonNullableFields[];
1026
+ }
1027
+ interface RoleInfoNonNullableFields {
1028
+ _id: string;
1029
+ title: string;
1030
+ description: string;
1031
+ restrictFromLevel: RoleLevelRestriction;
1032
+ }
1033
+ export interface GetRolesInfoResponseNonNullableFields {
1034
+ predefinedRoles: RoleInfoNonNullableFields[];
1035
+ customRoles: RoleInfoNonNullableFields[];
1036
+ }
1037
+ export interface ChangeRoleV2ResponseNonNullableFields {
1038
+ roles: AssignmentV3NonNullableFields[];
1039
+ }
1040
+ export interface UpdateTeamMemberAssignmentsResponseNonNullableFields {
1041
+ assignments: AssignmentV3NonNullableFields[];
1042
+ }
1043
+ /**
1044
+ * Removes a team member from the requesting account.
1045
+ * > **Important**: This call requires an account level API key and cannot be authenticated with the standard authorization header. API keys are currently available to selected beta users only.
1046
+ * @param userId - User ID of the team member to remove.
1047
+ * @public
1048
+ * @documentationMaturity preview
1049
+ * @requiredField userId
1050
+ * @permissionId team.delete-member
1051
+ * @fqn com.wixpress.roles.management.api.RolesManagementService.RemoveMember
1052
+ */
1053
+ export declare function removeMember(userId: string): Promise<void>;
1054
+ /**
1055
+ * Retrieves all team members of the requesting account, based on the provided filters and free text queries.
1056
+ * > **Important**: This call requires an account level API key and cannot be authenticated with the standard authorization header. API keys are currently available to selected beta users only.
1057
+ * @public
1058
+ * @documentationMaturity preview
1059
+ * @param options - Filter options.
1060
+ * @fqn com.wixpress.roles.management.api.RolesManagementService.SearchTeam
1061
+ */
1062
+ export declare function searchTeam(options?: SearchTeamOptions): Promise<SearchTeamResponse & SearchTeamResponseNonNullableFields>;
1063
+ export interface SearchTeamOptions {
1064
+ /** Free text to search for within team member name and email address fields. */
1065
+ query?: string | null;
1066
+ /** Sort data. */
1067
+ orderBy?: Ordering[];
1068
+ /**
1069
+ * Filter object. Supported values: `inviteType` and `roleId`. For example, `{'inviteType': {'$eq': 'Expired'}}`.
1070
+ * See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more information.
1071
+ */
1072
+ filter?: Record<string, any> | null;
1073
+ /**
1074
+ * A list of facets to return in the response. Facets count the items within logical groupings.
1075
+ * See [Filters and Facets: An Explainer](https://medium.com/@westontt/filters-and-facets-an-explainer-3b73a9538eca) for more information.
1076
+ */
1077
+ facets?: FacetType[];
1078
+ /** Pagination. */
1079
+ paging?: Paging;
1080
+ }
1081
+ /**
1082
+ * Retrieves all available roles in the requesting account, including predefined and custom roles.
1083
+ * > **Important**: This call requires an account level API key and cannot be authenticated with the standard authorization header. API keys are currently available to selected beta users only.
1084
+ * @public
1085
+ * @documentationMaturity preview
1086
+ * @param options - Filter options.
1087
+ * @permissionId ACCOUNT_ROLES.GET_ROLES
1088
+ * @fqn com.wixpress.roles.management.api.RolesManagementService.GetRolesInfo
1089
+ */
1090
+ export declare function getRolesInfo(options?: GetRolesInfoOptions): Promise<GetRolesInfoResponse & GetRolesInfoResponseNonNullableFields>;
1091
+ export interface GetRolesInfoOptions {
1092
+ /** Language of predefined roles names and descriptions to return, in ISO 639 format. Default: `en`. */
1093
+ locale?: string | null;
1094
+ /** Roles to return. */
1095
+ filter?: RolesInfoFilter;
1096
+ }
1097
+ export interface ChangeRoleV2Options {
1098
+ /** New assignments, including roles, to apply to the team member in this account. To retrieve all available roles, call Get Roles Info. */
1099
+ roles: AssignmentV3[];
1100
+ /** Existing assignment IDs to remove. To retrieve all existing assignment IDs for a team member, call Search Team. */
1101
+ assignmentIdsToReplace: string[];
1102
+ }
1103
+ /**
1104
+ * Updates the assignments of roles and conditions for an existing team member. Changing assignments changes the team member’s access to account assets.
1105
+ * > **Important**: This call requires an account level API key and cannot be authenticated with the standard authorization header. API keys are currently available to selected beta users only.
1106
+ * @param userId - ID of team member being affected.
1107
+ * @public
1108
+ * @documentationMaturity preview
1109
+ * @requiredField options
1110
+ * @requiredField options.assignmentIdsToRemove
1111
+ * @requiredField options.newAssignments
1112
+ * @requiredField userId
1113
+ * @param options - Filter options. The `assignmentIdsToRemove` and `newAssignments` fields **must** be passed.
1114
+ * @permissionId team.manage-team-member-roles
1115
+ * @fqn com.wixpress.roles.management.api.RolesManagementService.UpdateTeamMemberAssignments
1116
+ */
1117
+ export declare function updateTeamMemberAssignments(userId: string, options: UpdateTeamMemberAssignmentsOptions): Promise<UpdateTeamMemberAssignmentsResponse & UpdateTeamMemberAssignmentsResponseNonNullableFields>;
1118
+ export interface UpdateTeamMemberAssignmentsOptions {
1119
+ /** New assignments to apply to the team member in this account. */
1120
+ newAssignments: AssignmentV3[];
1121
+ /** Existing assignment IDs to remove. To retrieve all existing assignment IDs for a team member, call Search Team. */
1122
+ assignmentIdsToRemove: string[];
1123
+ }
1124
+ export {};