@wix/auto_sdk_user-management_contributors 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-v1-contributor-contributors.context.d.ts +7 -0
  11. package/build/cjs/src/identity-v1-contributor-contributors.context.js +21 -0
  12. package/build/cjs/src/identity-v1-contributor-contributors.context.js.map +1 -0
  13. package/build/cjs/src/identity-v1-contributor-contributors.http.d.ts +13 -0
  14. package/build/cjs/src/identity-v1-contributor-contributors.http.js +247 -0
  15. package/build/cjs/src/identity-v1-contributor-contributors.http.js.map +1 -0
  16. package/build/cjs/src/identity-v1-contributor-contributors.meta.d.ts +17 -0
  17. package/build/cjs/src/identity-v1-contributor-contributors.meta.js +123 -0
  18. package/build/cjs/src/identity-v1-contributor-contributors.meta.js.map +1 -0
  19. package/build/cjs/src/identity-v1-contributor-contributors.public.d.ts +28 -0
  20. package/build/cjs/src/identity-v1-contributor-contributors.public.js +46 -0
  21. package/build/cjs/src/identity-v1-contributor-contributors.public.js.map +1 -0
  22. package/build/cjs/src/identity-v1-contributor-contributors.types.d.ts +579 -0
  23. package/build/cjs/src/identity-v1-contributor-contributors.types.js +54 -0
  24. package/build/cjs/src/identity-v1-contributor-contributors.types.js.map +1 -0
  25. package/build/cjs/src/identity-v1-contributor-contributors.universal.d.ts +639 -0
  26. package/build/cjs/src/identity-v1-contributor-contributors.universal.js +287 -0
  27. package/build/cjs/src/identity-v1-contributor-contributors.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-v1-contributor-contributors.context.d.ts +7 -0
  39. package/build/es/src/identity-v1-contributor-contributors.context.js +11 -0
  40. package/build/es/src/identity-v1-contributor-contributors.context.js.map +1 -0
  41. package/build/es/src/identity-v1-contributor-contributors.http.d.ts +13 -0
  42. package/build/es/src/identity-v1-contributor-contributors.http.js +239 -0
  43. package/build/es/src/identity-v1-contributor-contributors.http.js.map +1 -0
  44. package/build/es/src/identity-v1-contributor-contributors.meta.d.ts +17 -0
  45. package/build/es/src/identity-v1-contributor-contributors.meta.js +92 -0
  46. package/build/es/src/identity-v1-contributor-contributors.meta.js.map +1 -0
  47. package/build/es/src/identity-v1-contributor-contributors.public.d.ts +28 -0
  48. package/build/es/src/identity-v1-contributor-contributors.public.js +31 -0
  49. package/build/es/src/identity-v1-contributor-contributors.public.js.map +1 -0
  50. package/build/es/src/identity-v1-contributor-contributors.types.d.ts +579 -0
  51. package/build/es/src/identity-v1-contributor-contributors.types.js +51 -0
  52. package/build/es/src/identity-v1-contributor-contributors.types.js.map +1 -0
  53. package/build/es/src/identity-v1-contributor-contributors.universal.d.ts +639 -0
  54. package/build/es/src/identity-v1-contributor-contributors.universal.js +256 -0
  55. package/build/es/src/identity-v1-contributor-contributors.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-v1-contributor-contributors.context.d.ts +11 -0
  66. package/build/internal/cjs/src/identity-v1-contributor-contributors.context.js +21 -0
  67. package/build/internal/cjs/src/identity-v1-contributor-contributors.context.js.map +1 -0
  68. package/build/internal/cjs/src/identity-v1-contributor-contributors.http.d.ts +13 -0
  69. package/build/internal/cjs/src/identity-v1-contributor-contributors.http.js +247 -0
  70. package/build/internal/cjs/src/identity-v1-contributor-contributors.http.js.map +1 -0
  71. package/build/internal/cjs/src/identity-v1-contributor-contributors.meta.d.ts +17 -0
  72. package/build/internal/cjs/src/identity-v1-contributor-contributors.meta.js +123 -0
  73. package/build/internal/cjs/src/identity-v1-contributor-contributors.meta.js.map +1 -0
  74. package/build/internal/cjs/src/identity-v1-contributor-contributors.public.d.ts +45 -0
  75. package/build/internal/cjs/src/identity-v1-contributor-contributors.public.js +46 -0
  76. package/build/internal/cjs/src/identity-v1-contributor-contributors.public.js.map +1 -0
  77. package/build/internal/cjs/src/identity-v1-contributor-contributors.types.d.ts +579 -0
  78. package/build/internal/cjs/src/identity-v1-contributor-contributors.types.js +54 -0
  79. package/build/internal/cjs/src/identity-v1-contributor-contributors.types.js.map +1 -0
  80. package/build/internal/cjs/src/identity-v1-contributor-contributors.universal.d.ts +678 -0
  81. package/build/internal/cjs/src/identity-v1-contributor-contributors.universal.js +287 -0
  82. package/build/internal/cjs/src/identity-v1-contributor-contributors.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-v1-contributor-contributors.context.d.ts +11 -0
  93. package/build/internal/es/src/identity-v1-contributor-contributors.context.js +11 -0
  94. package/build/internal/es/src/identity-v1-contributor-contributors.context.js.map +1 -0
  95. package/build/internal/es/src/identity-v1-contributor-contributors.http.d.ts +13 -0
  96. package/build/internal/es/src/identity-v1-contributor-contributors.http.js +239 -0
  97. package/build/internal/es/src/identity-v1-contributor-contributors.http.js.map +1 -0
  98. package/build/internal/es/src/identity-v1-contributor-contributors.meta.d.ts +17 -0
  99. package/build/internal/es/src/identity-v1-contributor-contributors.meta.js +92 -0
  100. package/build/internal/es/src/identity-v1-contributor-contributors.meta.js.map +1 -0
  101. package/build/internal/es/src/identity-v1-contributor-contributors.public.d.ts +45 -0
  102. package/build/internal/es/src/identity-v1-contributor-contributors.public.js +31 -0
  103. package/build/internal/es/src/identity-v1-contributor-contributors.public.js.map +1 -0
  104. package/build/internal/es/src/identity-v1-contributor-contributors.types.d.ts +579 -0
  105. package/build/internal/es/src/identity-v1-contributor-contributors.types.js +51 -0
  106. package/build/internal/es/src/identity-v1-contributor-contributors.types.js.map +1 -0
  107. package/build/internal/es/src/identity-v1-contributor-contributors.universal.d.ts +678 -0
  108. package/build/internal/es/src/identity-v1-contributor-contributors.universal.js +256 -0
  109. package/build/internal/es/src/identity-v1-contributor-contributors.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,678 @@
1
+ export interface Contributor {
2
+ /** Contributor's metadata. */
3
+ metaData?: PersonMetaData;
4
+ /** Whether the contributor account is a team account. */
5
+ isTeam?: boolean | null;
6
+ /** Date that the contributor joined the site. */
7
+ joinedAt?: Date | null;
8
+ /** Email address that received the invite. */
9
+ invitedEmail?: string | null;
10
+ /** Whether the contributor account is a client account. */
11
+ isClient?: boolean | null;
12
+ /**
13
+ * Contributor's user ID.
14
+ * @readonly
15
+ */
16
+ _id?: string;
17
+ }
18
+ export interface PersonMetaData {
19
+ /** Contributor's account ID. */
20
+ _id?: string;
21
+ /** Contributor's full name. */
22
+ fullName?: string | null;
23
+ /** URL for contributor's profile image. */
24
+ imageUrl?: string | null;
25
+ /** Contributor's email address. */
26
+ email?: string | null;
27
+ /** Contributor's access to assets and their assigned role (`policy`) for that asset. */
28
+ assignments?: Assignment[];
29
+ }
30
+ export interface Assignment {
31
+ /** Role assigned to the user. */
32
+ policy?: AssignedPolicy;
33
+ /** Unique ID for this specific assignment. */
34
+ assignmentId?: string;
35
+ /** Identity assigned to the asset in an assignment, referred to as subject. Supported subjects include user IDs, account IDs, and app IDs. */
36
+ subject?: Subject;
37
+ }
38
+ export interface AssignedPolicy {
39
+ /** Role ID. */
40
+ policyId?: string;
41
+ /** Role title. */
42
+ title?: string | null;
43
+ /** Role description. */
44
+ description?: string | null;
45
+ }
46
+ export interface Restriction extends RestrictionRestrictionsOneOf {
47
+ /**
48
+ * Deprecated.
49
+ * @deprecated
50
+ */
51
+ resource?: Resource;
52
+ /** List of conditions restricting the user's access. Currently only folder conditions are supported. */
53
+ conditions?: Conditions;
54
+ /** Site where the assignment restrictions apply. */
55
+ site?: SiteRestriction;
56
+ /** Location where the assignment restrictions apply. */
57
+ locations?: LocationsRestriction;
58
+ }
59
+ /** @oneof */
60
+ export interface RestrictionRestrictionsOneOf {
61
+ /**
62
+ * Deprecated.
63
+ * @deprecated
64
+ */
65
+ resource?: Resource;
66
+ /** List of conditions restricting the user's access. Currently only folder conditions are supported. */
67
+ conditions?: Conditions;
68
+ /** Site where the assignment restrictions apply. */
69
+ site?: SiteRestriction;
70
+ /** Location where the assignment restrictions apply. */
71
+ locations?: LocationsRestriction;
72
+ }
73
+ export interface Resource {
74
+ /** Resource type. */
75
+ resourceType?: ResourceType;
76
+ /** Resource ID. */
77
+ _id?: string;
78
+ value?: string | null;
79
+ }
80
+ export declare enum ResourceType {
81
+ UNKNOWN_RESOURCE_TYPE = "UNKNOWN_RESOURCE_TYPE",
82
+ SITE = "SITE"
83
+ }
84
+ export interface Conditions {
85
+ /** List of conditions. */
86
+ conditions?: Condition[];
87
+ }
88
+ export interface Condition {
89
+ /** Condition type. */
90
+ conditionType?: ConditionAttributeType;
91
+ /** Condition ID. */
92
+ _id?: string;
93
+ /** Expected value of the condition. When `conditionType` = "FOLDER", this is the folder path. */
94
+ value?: string | null;
95
+ }
96
+ export declare enum ConditionAttributeType {
97
+ UNKNOWN_CONDITION_TYPE = "UNKNOWN_CONDITION_TYPE",
98
+ FOLDER = "FOLDER"
99
+ }
100
+ export interface SiteRestriction {
101
+ /** Site ID. */
102
+ _id?: string;
103
+ /** Site name. */
104
+ value?: string | null;
105
+ }
106
+ export interface CompanionResource {
107
+ /** Asset ID (referred to here as resource ID). */
108
+ _id?: string;
109
+ /** Asset type (referred to here as resource type). as predefined in the authorization system */
110
+ resourceType?: string;
111
+ }
112
+ export interface LocationsRestriction {
113
+ /** Location IDs. */
114
+ ids?: string[];
115
+ }
116
+ export interface Subject {
117
+ /** ID of identity assigned to the asset. */
118
+ _id?: string;
119
+ /** Type of identity assigned to the asset. Supported subject types include user IDs, account IDs, and app IDs. */
120
+ subjectType?: SubjectType;
121
+ /** Context of identity assigned to the asset. For example, a `subjectType` = `USER` will have `context` = `ACCOUNT`. */
122
+ context?: SubjectContext;
123
+ }
124
+ export declare enum SubjectType {
125
+ UNKNOWN = "UNKNOWN",
126
+ ACCOUNT = "ACCOUNT",
127
+ USER = "USER",
128
+ USER_GROUP = "USER_GROUP",
129
+ MEMBER_GROUP = "MEMBER_GROUP",
130
+ VISITOR_GROUP = "VISITOR_GROUP",
131
+ EXTERNAL_APP = "EXTERNAL_APP",
132
+ ACCOUNT_GROUP = "ACCOUNT_GROUP",
133
+ WIX_APP = "WIX_APP"
134
+ }
135
+ export interface SubjectContext {
136
+ _id?: string;
137
+ contextType?: SubjectContextType;
138
+ }
139
+ export declare enum SubjectContextType {
140
+ UNKNOWN_CTX = "UNKNOWN_CTX",
141
+ ORG_CTX = "ORG_CTX",
142
+ ACCOUNT_CTX = "ACCOUNT_CTX"
143
+ }
144
+ export interface GetAppContributorsRequest {
145
+ appId?: string;
146
+ /** The locale of the request. Defaults to en-us. */
147
+ locale?: string | null;
148
+ }
149
+ export interface GetAppContributorsResponse {
150
+ contributors?: Contributor[];
151
+ invites?: AppInvite[];
152
+ }
153
+ export interface AppInvite {
154
+ /** @readonly */
155
+ _id?: string;
156
+ /** TODO: amitis - remove this comment after the next merge */
157
+ destEmail?: string;
158
+ /** @readonly */
159
+ status?: string;
160
+ /** @readonly */
161
+ acceptLink?: string;
162
+ invitePurpose?: string | null;
163
+ policies?: AssignedPolicy[];
164
+ /** @readonly */
165
+ expirationDate?: Date | null;
166
+ /** @readonly */
167
+ dateCreated?: Date | null;
168
+ /** @readonly */
169
+ dateUpdated?: Date | null;
170
+ }
171
+ export interface GetSiteContributorsRequest {
172
+ /** The locale of the request. Defaults to en-us */
173
+ locale?: string | null;
174
+ }
175
+ export interface GetSiteContributorsResponse {
176
+ users?: User[];
177
+ teams?: Team[];
178
+ invites?: SiteInvite[];
179
+ policies?: Policy[];
180
+ permissions?: string[];
181
+ userId?: string;
182
+ loggedInAccountId?: string;
183
+ pendingOwner?: PendingOwner;
184
+ contributorLimit?: ContributorLimit;
185
+ predefinedRoles?: PredefinedRoles;
186
+ }
187
+ export interface User {
188
+ /** User ID. */
189
+ _id?: string;
190
+ /**
191
+ * Deprecated.
192
+ * @deprecated
193
+ */
194
+ roles?: string[];
195
+ /** User's email address. */
196
+ email?: string;
197
+ /** User's name. */
198
+ name?: Name;
199
+ /** URL to user's profile image, when provided. */
200
+ profileImage?: string | null;
201
+ /** Date the user joined the team. */
202
+ joinedTeamAt?: Date | null;
203
+ /**
204
+ * Deprecated.
205
+ * @deprecated
206
+ */
207
+ policyIds?: string[];
208
+ /** Resources the user can access. */
209
+ assignments?: Assignment[];
210
+ }
211
+ export interface Name {
212
+ /** User's first name. */
213
+ firstName?: string;
214
+ /** User's last name. */
215
+ lastName?: string;
216
+ }
217
+ export interface Team {
218
+ accountId?: string;
219
+ accountInfo?: AccountInfo;
220
+ policyIds?: string[];
221
+ joinedAt?: Date | null;
222
+ }
223
+ export interface AccountInfo {
224
+ accountName?: string;
225
+ accountImage?: string;
226
+ isTeam?: boolean;
227
+ }
228
+ export interface SiteInvite {
229
+ /**
230
+ * Invite ID.
231
+ * @readonly
232
+ */
233
+ _id?: string;
234
+ /**
235
+ * Site ID the user is invited to as a collaborator.
236
+ * @readonly
237
+ */
238
+ siteId?: string;
239
+ /** Email address where the invite was sent. */
240
+ email?: string;
241
+ /** Role IDs included in the invite. */
242
+ policyIds?: string[];
243
+ /**
244
+ * Deprecated. Use `inviterAccountId`.
245
+ * @readonly
246
+ * @deprecated
247
+ */
248
+ inviterId?: string;
249
+ /**
250
+ * Invite Status.
251
+ *
252
+ * Supported values:
253
+ * - **Pending:** The invite has been sent and is valid, waiting for the user's response.
254
+ * - **Used:** The invite has been accepted.
255
+ * - **Deleted:** The invite has been deleted or revoked.
256
+ * - **Declined:** The user declined the invite.
257
+ * - **Expired:** The invite has expired without being accepted.
258
+ */
259
+ status?: InviteStatus;
260
+ /** Link to accept the invite. */
261
+ acceptLink?: string;
262
+ /**
263
+ * Inviting account ID.
264
+ * @readonly
265
+ */
266
+ inviterAccountId?: string;
267
+ /**
268
+ * Account ID that accepted the invite. Populated only once the invite is accepted.
269
+ * @readonly
270
+ */
271
+ acceptedByAccountId?: string | null;
272
+ /** Date the invite was created. */
273
+ dateCreated?: Date | null;
274
+ /** User's Wix Bookings staff ID, if relevant. */
275
+ staffId?: string | null;
276
+ /** Invite expiration date */
277
+ expirationDate?: Date | null;
278
+ /**
279
+ * Location ids included in the invite
280
+ * @readonly
281
+ */
282
+ locationIds?: string[];
283
+ }
284
+ /** Invite status stating whether the invite was accepted, waiting to be accepted, deleted etc.. */
285
+ export declare enum InviteStatus {
286
+ Pending = "Pending",
287
+ Used = "Used",
288
+ Deleted = "Deleted",
289
+ Declined = "Declined",
290
+ Expired = "Expired"
291
+ }
292
+ export interface Policy {
293
+ _id?: string;
294
+ description?: string | null;
295
+ name?: string | null;
296
+ isCustom?: boolean;
297
+ scopes?: string[];
298
+ }
299
+ export interface PendingOwner {
300
+ email?: string;
301
+ expirationDate?: Date | null;
302
+ acceptLink?: string;
303
+ }
304
+ export interface ContributorLimit {
305
+ contributorLimit?: number;
306
+ }
307
+ export interface PredefinedRoles {
308
+ roles?: PredefinedRole[];
309
+ }
310
+ export interface PredefinedRole {
311
+ titleKey?: string;
312
+ roles?: Role[];
313
+ title?: string | null;
314
+ areaId?: string;
315
+ }
316
+ export interface Role {
317
+ _id?: string;
318
+ deprecatedKey?: string;
319
+ /** @deprecated */
320
+ titleKey?: string;
321
+ /** @deprecated */
322
+ descriptionKey?: string;
323
+ deprecated?: boolean;
324
+ restrictFromLevel?: string;
325
+ experiments?: string[];
326
+ appDefIds?: string[];
327
+ title?: string | null;
328
+ description?: string | null;
329
+ isCustom?: boolean;
330
+ scopes?: string[];
331
+ availableResourceTypes?: ResourceType[];
332
+ availableConditions?: ConditionAttributeType[];
333
+ limitToEditorTypes?: string[];
334
+ }
335
+ export interface GetSiteContributorsV2Request {
336
+ /** The locale of the request. Defaults to en-us. */
337
+ locale?: string | null;
338
+ /** The set of desired fields. */
339
+ fields?: string[];
340
+ }
341
+ export interface GetSiteContributorsV2Response {
342
+ /** List of contributors of the given site. */
343
+ contributors?: Contributor[];
344
+ /** List of invites to contribute to the given site. */
345
+ invites?: SiteInvite[];
346
+ /** Quota information for contributors on the given site. */
347
+ contributorsQuota?: ContributorsQuota;
348
+ }
349
+ export interface ContributorsQuota extends ContributorsQuotaOptionsOneOf {
350
+ /** Limited contributors quota details. */
351
+ limitedOptions?: LimitedOptions;
352
+ /** Type of contributors quota */
353
+ type?: Type;
354
+ }
355
+ /** @oneof */
356
+ export interface ContributorsQuotaOptionsOneOf {
357
+ /** Limited contributors quota details. */
358
+ limitedOptions?: LimitedOptions;
359
+ }
360
+ /** Enum to represent different types of contributors quota. */
361
+ export declare enum Type {
362
+ UNKNOWN = "UNKNOWN",
363
+ LIMITED = "LIMITED",
364
+ UNLIMITED = "UNLIMITED"
365
+ }
366
+ /** Details for a limited contributors quota. */
367
+ export interface LimitedOptions {
368
+ /** Maximum number of contributors allowed. */
369
+ limit?: number;
370
+ /** Number of accepted or pending invitations. */
371
+ used?: number;
372
+ }
373
+ export interface HandleSiteTransferRequest {
374
+ originalOwnerAccountId?: string;
375
+ newOwnerAccountId?: string;
376
+ metaSiteId?: string;
377
+ keepOriginalOwnerAsContributor?: boolean;
378
+ }
379
+ export interface HandleSiteTransferResponse {
380
+ }
381
+ export interface GetCurrentUserRolesRequest {
382
+ /** The locale of the request. Defaults to en-us */
383
+ locale?: string | null;
384
+ }
385
+ export interface GetCurrentUserRolesResponse {
386
+ roles?: LocalizedRole[];
387
+ }
388
+ export interface LocalizedRole {
389
+ name?: string;
390
+ description?: string | null;
391
+ }
392
+ export interface BulkGetUserRolesOnSiteRequest {
393
+ users?: UserSubject[];
394
+ /** The locale of the request. Defaults to en-us */
395
+ locale?: string | null;
396
+ }
397
+ export interface UserSubject {
398
+ userId?: string;
399
+ accountId?: string;
400
+ }
401
+ export interface BulkGetUserRolesOnSiteResponse {
402
+ userRoles?: UserLocalizedRoles[];
403
+ }
404
+ export interface UserLocalizedRoles {
405
+ user?: UserSubject;
406
+ roles?: LocalizedRole[];
407
+ }
408
+ export interface BulkValidateEmailInviteEligibilityRequest {
409
+ /** List of emails to be checked for invite eligibility. */
410
+ emails?: string[];
411
+ }
412
+ export interface BulkValidateEmailInviteEligibilityResponse {
413
+ /** List of email invite eligibility results. */
414
+ emailsEligibility?: EmailInviteEligibility[];
415
+ }
416
+ export interface EmailInviteEligibility {
417
+ /** The email address being checked. */
418
+ email?: string;
419
+ /** Whether the email is eligible for an invite. */
420
+ eligible?: boolean;
421
+ }
422
+ export interface ChangeContributorRoleRequest {
423
+ /** Contributor's account ID. */
424
+ accountId: string;
425
+ /** New roles to assign to the contributor on the site. */
426
+ newRoles: SiteRoleAssignment[];
427
+ }
428
+ export interface SiteRoleAssignment {
429
+ /** Role ID. Sometimes referred to as policy ID. See [Roles and Permissions](https://support.wix.com/en/article/roles-permissions-overview) for a list of available roles. */
430
+ roleId?: string;
431
+ /**
432
+ * Assignment ID mapping the role to the contributor on the site.
433
+ * @readonly
434
+ */
435
+ assignmentId?: string;
436
+ }
437
+ export interface ChangeContributorRoleResponse {
438
+ /** New roles assigned to the contributor on the site. */
439
+ newAssignedRoles?: SiteRoleAssignment[];
440
+ }
441
+ export interface ChangeContributorLocationRequest {
442
+ /** Contributor's account ID. */
443
+ accountId: string;
444
+ /** New locations to assign to the contributor on the site. */
445
+ newLocations: string[];
446
+ }
447
+ export interface ChangeContributorLocationResponse {
448
+ /** New locations assigned to the contributor on the site. */
449
+ newAssignedLocations?: SiteLocationAssignment[];
450
+ }
451
+ export interface SiteLocationAssignment {
452
+ locationId?: string;
453
+ /** @readonly */
454
+ assignmentIds?: string[];
455
+ }
456
+ export interface QuerySiteContributorsRequest {
457
+ filter?: QuerySiteContributorsFilter;
458
+ }
459
+ export interface QuerySiteContributorsFilter {
460
+ /** Role IDs (referred to here as policy IDs) to return. See [Roles and Permissions](https://support.wix.com/en/article/roles-permissions-overview) for available roles. */
461
+ policyIds?: string[];
462
+ }
463
+ export declare enum FieldSet {
464
+ UNKNOWN = "UNKNOWN",
465
+ /** Include only `account_id` and `account_owner_id` fields. */
466
+ META_DATA = "META_DATA"
467
+ }
468
+ export interface QuerySiteContributorsResponse {
469
+ /** List of site contributors. */
470
+ contributors?: ContributorV2[];
471
+ }
472
+ export interface ContributorV2 {
473
+ /** Contributor's account ID. */
474
+ accountId?: string | null;
475
+ /** User ID of the owner of the account that the contributor has joined. */
476
+ accountOwnerId?: string | null;
477
+ }
478
+ export interface GetContributorsQuotaRequest {
479
+ }
480
+ export interface GetContributorsQuotaResponse {
481
+ /** Quota information for contributors on the given site. */
482
+ contributorsQuota?: ContributorsQuota;
483
+ }
484
+ interface AssignedPolicyNonNullableFields {
485
+ policyId: string;
486
+ }
487
+ interface ResourceNonNullableFields {
488
+ resourceType: ResourceType;
489
+ _id: string;
490
+ }
491
+ interface ConditionNonNullableFields {
492
+ conditionType: ConditionAttributeType;
493
+ _id: string;
494
+ }
495
+ interface ConditionsNonNullableFields {
496
+ conditions: ConditionNonNullableFields[];
497
+ }
498
+ interface CompanionResourceNonNullableFields {
499
+ _id: string;
500
+ resourceType: string;
501
+ }
502
+ interface SiteRestrictionNonNullableFields {
503
+ _id: string;
504
+ resource?: CompanionResourceNonNullableFields;
505
+ }
506
+ interface LocationsRestrictionNonNullableFields {
507
+ ids: string[];
508
+ }
509
+ interface RestrictionNonNullableFields {
510
+ resource?: ResourceNonNullableFields;
511
+ conditions?: ConditionsNonNullableFields;
512
+ site?: SiteRestrictionNonNullableFields;
513
+ locations?: LocationsRestrictionNonNullableFields;
514
+ }
515
+ interface SubjectContextNonNullableFields {
516
+ _id: string;
517
+ contextType: SubjectContextType;
518
+ }
519
+ interface SubjectNonNullableFields {
520
+ _id: string;
521
+ subjectType: SubjectType;
522
+ context?: SubjectContextNonNullableFields;
523
+ }
524
+ interface AssignmentNonNullableFields {
525
+ policy?: AssignedPolicyNonNullableFields;
526
+ assignmentId: string;
527
+ restrictions?: RestrictionNonNullableFields;
528
+ subject?: SubjectNonNullableFields;
529
+ }
530
+ interface PersonMetaDataNonNullableFields {
531
+ _id: string;
532
+ assignments: AssignmentNonNullableFields[];
533
+ }
534
+ interface ContributorNonNullableFields {
535
+ metaData?: PersonMetaDataNonNullableFields;
536
+ _id: string;
537
+ }
538
+ interface SiteInviteNonNullableFields {
539
+ _id: string;
540
+ siteId: string;
541
+ email: string;
542
+ policyIds: string[];
543
+ inviterId: string;
544
+ status: InviteStatus;
545
+ acceptLink: string;
546
+ inviterAccountId: string;
547
+ locationIds: string[];
548
+ }
549
+ interface LimitedOptionsNonNullableFields {
550
+ limit: number;
551
+ used: number;
552
+ }
553
+ interface ContributorsQuotaNonNullableFields {
554
+ limitedOptions?: LimitedOptionsNonNullableFields;
555
+ type: Type;
556
+ }
557
+ export interface GetSiteContributorsV2ResponseNonNullableFields {
558
+ contributors: ContributorNonNullableFields[];
559
+ invites: SiteInviteNonNullableFields[];
560
+ contributorsQuota?: ContributorsQuotaNonNullableFields;
561
+ }
562
+ interface SiteRoleAssignmentNonNullableFields {
563
+ roleId: string;
564
+ assignmentId: string;
565
+ }
566
+ export interface ChangeContributorRoleResponseNonNullableFields {
567
+ newAssignedRoles: SiteRoleAssignmentNonNullableFields[];
568
+ }
569
+ interface SiteLocationAssignmentNonNullableFields {
570
+ locationId: string;
571
+ assignmentIds: string[];
572
+ }
573
+ export interface ChangeContributorLocationResponseNonNullableFields {
574
+ newAssignedLocations: SiteLocationAssignmentNonNullableFields[];
575
+ }
576
+ export interface GetContributorsQuotaResponseNonNullableFields {
577
+ contributorsQuota?: ContributorsQuotaNonNullableFields;
578
+ }
579
+ /**
580
+ * returns a list of all the contributors + invites to be contributors of a given meta site ID taken from the
581
+ * context.
582
+ * @internal
583
+ * @documentationMaturity preview
584
+ * @permissionId site-users.view-users
585
+ * @permissionScope Manage Bookings Services and Settings
586
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
587
+ * @permissionScope Manage Events
588
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
589
+ * @permissionScope Manage Portfolio
590
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
591
+ * @permissionScope Access Verticals by Automations
592
+ * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
593
+ * @permissionScope Manage Restaurants - all permissions
594
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
595
+ * @applicableIdentity APP
596
+ * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.GetSiteContributorsV2
597
+ */
598
+ export declare function getSiteContributorsV2(options?: GetSiteContributorsV2Options): Promise<GetSiteContributorsV2Response & GetSiteContributorsV2ResponseNonNullableFields>;
599
+ export interface GetSiteContributorsV2Options {
600
+ /** The locale of the request. Defaults to en-us. */
601
+ locale?: string | null;
602
+ /** The set of desired fields. */
603
+ fields?: string[];
604
+ }
605
+ /**
606
+ * Overrides all the roles of a contributor for the specified site.
607
+ * @param accountId - Contributor's account ID.
608
+ * @public
609
+ * @documentationMaturity preview
610
+ * @requiredField accountId
611
+ * @requiredField options
612
+ * @requiredField options.newRoles
613
+ * @param options - Filter options. The `newRoles` field **must** be passed.
614
+ * @permissionId SITE_ROLES.CHANGE_ROLE
615
+ * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.ChangeRole
616
+ */
617
+ export declare function changeRole(accountId: string, options: ChangeRoleOptions): Promise<ChangeContributorRoleResponse & ChangeContributorRoleResponseNonNullableFields>;
618
+ export interface ChangeRoleOptions {
619
+ /** New roles to assign to the contributor on the site. */
620
+ newRoles: SiteRoleAssignment[];
621
+ }
622
+ /** @param accountId - Contributor's account ID.
623
+ * @public
624
+ * @documentationMaturity preview
625
+ * @requiredField accountId
626
+ * @requiredField options
627
+ * @requiredField options.newLocations
628
+ * @permissionId SITE_ROLES.CHANGE_LOCATION
629
+ * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.ChangeContributorLocation
630
+ */
631
+ export declare function changeContributorLocation(accountId: string, options: ChangeContributorLocationOptions): Promise<ChangeContributorLocationResponse & ChangeContributorLocationResponseNonNullableFields>;
632
+ export interface ChangeContributorLocationOptions {
633
+ /** New locations to assign to the contributor on the site. */
634
+ newLocations: string[];
635
+ }
636
+ /**
637
+ * Retrieves a list of contributors for the specified site, given the provided filters.
638
+ * @public
639
+ * @documentationMaturity preview
640
+ * @param options - Filter options.
641
+ * @permissionId site-users.view-users
642
+ * @permissionScope Manage Bookings Services and Settings
643
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
644
+ * @permissionScope Manage Events
645
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
646
+ * @permissionScope Manage Portfolio
647
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
648
+ * @permissionScope Access Verticals by Automations
649
+ * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
650
+ * @permissionScope Manage Restaurants - all permissions
651
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
652
+ * @applicableIdentity APP
653
+ * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.QuerySiteContributors
654
+ */
655
+ export declare function querySiteContributors(options?: QuerySiteContributorsOptions): Promise<QuerySiteContributorsResponse>;
656
+ export interface QuerySiteContributorsOptions {
657
+ filter?: QuerySiteContributorsFilter;
658
+ }
659
+ /**
660
+ * returns the quota information for contributors on the given site.
661
+ * @internal
662
+ * @documentationMaturity preview
663
+ * @permissionId site-users.view-users
664
+ * @permissionScope Manage Bookings Services and Settings
665
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
666
+ * @permissionScope Manage Events
667
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
668
+ * @permissionScope Manage Portfolio
669
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
670
+ * @permissionScope Access Verticals by Automations
671
+ * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
672
+ * @permissionScope Manage Restaurants - all permissions
673
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
674
+ * @applicableIdentity APP
675
+ * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.GetContributorsQuota
676
+ */
677
+ export declare function getContributorsQuota(): Promise<GetContributorsQuotaResponse & GetContributorsQuotaResponseNonNullableFields>;
678
+ export {};