@wix/user-management 1.0.0 → 1.0.1

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.
@@ -196,6 +196,891 @@ interface ListChildAccountsResponseNonNullableFields {
196
196
  childAccounts: AccountV2NonNullableFields[];
197
197
  }
198
198
 
199
+ type __PublicMethodMetaInfo$3<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
200
+ getUrl: (context: any) => string;
201
+ httpMethod: K;
202
+ path: string;
203
+ pathParams: M;
204
+ __requestType: T;
205
+ __originalRequestType: S;
206
+ __responseType: Q;
207
+ __originalResponseType: R;
208
+ };
209
+ declare function createAccount(): __PublicMethodMetaInfo$3<'POST', {}, CreateAccountRequest, CreateAccountRequest$1, CreateAccountResponse & CreateAccountResponseNonNullableFields, CreateAccountResponse$1 & CreateAccountResponseNonNullableFields$1>;
210
+ declare function listChildAccounts(): __PublicMethodMetaInfo$3<'GET', {}, ListChildAccountsRequest, ListChildAccountsRequest$1, ListChildAccountsResponse & ListChildAccountsResponseNonNullableFields, ListChildAccountsResponse$1 & ListChildAccountsResponseNonNullableFields$1>;
211
+
212
+ declare const meta$3_createAccount: typeof createAccount;
213
+ declare const meta$3_listChildAccounts: typeof listChildAccounts;
214
+ declare namespace meta$3 {
215
+ export { type __PublicMethodMetaInfo$3 as __PublicMethodMetaInfo, meta$3_createAccount as createAccount, meta$3_listChildAccounts as listChildAccounts };
216
+ }
217
+
218
+ interface AccountInvite$1 {
219
+ /**
220
+ * Invite ID.
221
+ * @readonly
222
+ */
223
+ id?: string;
224
+ /**
225
+ * Account ID.
226
+ * @readonly
227
+ */
228
+ accountId?: string;
229
+ /** Email address where the invite was sent. */
230
+ email?: string;
231
+ /**
232
+ * Deprecated. Use `policyIds`.
233
+ * @deprecated
234
+ */
235
+ role?: string;
236
+ /**
237
+ * Deprecated. Use `inviterAccountId`.
238
+ * @readonly
239
+ * @deprecated
240
+ */
241
+ inviterId?: string;
242
+ /**
243
+ * Invite status.
244
+ *
245
+ * Supported values:
246
+ * - **Pending:** The invite has been sent and is valid, waiting for the user's response.
247
+ * - **Used:** The invite has been accepted.
248
+ * - **Deleted:** The invite has been deleted or revoked.
249
+ * - **Declined:** The user has declined the invite.
250
+ * - **Expired:** The invite has expired without being accepted.
251
+ */
252
+ status?: InviteStatus$3;
253
+ /** Link to accept the invite. */
254
+ acceptLink?: string;
255
+ /**
256
+ * Inviting account ID.
257
+ * @readonly
258
+ */
259
+ inviterAccountId?: string;
260
+ /**
261
+ * Account ID that accepted the invite. Populated only once the invite is accepted.
262
+ * @readonly
263
+ */
264
+ acceptedByAccountId?: string | null;
265
+ /** Date the invite was created. */
266
+ dateCreated?: Date | null;
267
+ /** Role IDs included in the invite. */
268
+ policyIds?: string[];
269
+ /** Date the invite was last updated. */
270
+ dateUpdated?: Date | null;
271
+ /** Assets the users are invited to join. */
272
+ assignments?: InviteResourceAssignment$1[];
273
+ /** Invite expiration date. */
274
+ expirationDate?: Date | null;
275
+ }
276
+ /** Invite status stating whether the invite was accepted, waiting to be accepted, deleted etc.. */
277
+ declare enum InviteStatus$3 {
278
+ Pending = "Pending",
279
+ Used = "Used",
280
+ Deleted = "Deleted",
281
+ Declined = "Declined",
282
+ Expired = "Expired"
283
+ }
284
+ interface InviteResourceAssignment$1 {
285
+ /** Role ID. */
286
+ policyId?: string;
287
+ /** Resources the user will be able to access. */
288
+ assignments?: InviteAssignment$1[];
289
+ }
290
+ interface InviteAssignment$1 {
291
+ /** Full name of resource to be assigned. */
292
+ fullNameResource?: FullNameResource$1;
293
+ }
294
+ interface FullNameResource$1 extends FullNameResourceResourceContextOneOf$1 {
295
+ /** Specific site details. */
296
+ siteContext?: SiteResourceContext$1;
297
+ /** Specific account details. */
298
+ accountContext?: AccountResourceContext$1;
299
+ }
300
+ /** @oneof */
301
+ interface FullNameResourceResourceContextOneOf$1 {
302
+ /** Specific site details. */
303
+ siteContext?: SiteResourceContext$1;
304
+ /** Specific account details. */
305
+ accountContext?: AccountResourceContext$1;
306
+ }
307
+ /** 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) */
308
+ interface SiteResourceContext$1 {
309
+ /** Site ID. */
310
+ metasiteId?: string;
311
+ }
312
+ /** 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) */
313
+ interface AccountResourceContext$1 {
314
+ /** Account ID. */
315
+ accountId?: string;
316
+ }
317
+ declare enum SimpleConditionOperator$1 {
318
+ UNKNOWN_SIMPLE_OP = "UNKNOWN_SIMPLE_OP",
319
+ EQUAL = "EQUAL"
320
+ }
321
+ declare enum JoinedConditionOperator$1 {
322
+ UNKNOWN_JOIN_OP = "UNKNOWN_JOIN_OP",
323
+ OR = "OR",
324
+ AND = "AND"
325
+ }
326
+ declare enum SubjectType$1 {
327
+ UNKNOWN = "UNKNOWN",
328
+ ACCOUNT = "ACCOUNT",
329
+ USER = "USER",
330
+ USER_GROUP = "USER_GROUP",
331
+ MEMBER_GROUP = "MEMBER_GROUP",
332
+ VISITOR_GROUP = "VISITOR_GROUP",
333
+ EXTERNAL_APP = "EXTERNAL_APP",
334
+ ACCOUNT_GROUP = "ACCOUNT_GROUP",
335
+ WIX_APP = "WIX_APP"
336
+ }
337
+ declare enum SubjectContextType$1 {
338
+ UNKNOWN_CTX = "UNKNOWN_CTX",
339
+ ORG_CTX = "ORG_CTX",
340
+ ACCOUNT_CTX = "ACCOUNT_CTX"
341
+ }
342
+ interface CreateInviteRequest$1 {
343
+ /** Array of potential team members' email addresses and their corresponding assignments (how they will be assigned when they accept the invite). */
344
+ subjectsAssignments: SubjectInviteAssignments$1[];
345
+ /** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
346
+ defaultEmailLanguage?: string | null;
347
+ }
348
+ interface SubjectInviteAssignments$1 {
349
+ /** Invitee's email address. */
350
+ subjectEmail?: string;
351
+ /** Mapping of roles (referred to here as policies) and assets (referred to here as resources) that will be assigned to the invitee when they accept the invite. When no resources are specified, the invitee will be given access to everything within the account. */
352
+ assignments?: InviteResourceAssignment$1[];
353
+ }
354
+ interface CreateInviteResponse$1 {
355
+ /** Invites that were sent successfully. */
356
+ successfulInvites?: AccountInvite$1[];
357
+ /** Invites that failed. */
358
+ failedInvites?: InviteFailure$1[];
359
+ }
360
+ interface InviteFailure$1 {
361
+ /** Email address of the failed invite. */
362
+ subjectEmail?: string;
363
+ /** Error description. */
364
+ errorMessage?: string;
365
+ }
366
+ interface SiteResourceContextNonNullableFields$1 {
367
+ metasiteId: string;
368
+ }
369
+ interface AccountResourceContextNonNullableFields$1 {
370
+ accountId: string;
371
+ }
372
+ interface FullNameResourceNonNullableFields$1 {
373
+ siteContext?: SiteResourceContextNonNullableFields$1;
374
+ accountContext?: AccountResourceContextNonNullableFields$1;
375
+ }
376
+ interface SimpleConditionValueNonNullableFields$1 {
377
+ attrName: string;
378
+ stringValue: string;
379
+ boolValue: boolean;
380
+ }
381
+ interface SimpleConditionNonNullableFields$1 {
382
+ attrName: string;
383
+ value?: SimpleConditionValueNonNullableFields$1;
384
+ op: SimpleConditionOperator$1;
385
+ conditionModelId: string;
386
+ }
387
+ interface JoinedConditionNonNullableFields$1 {
388
+ op: JoinedConditionOperator$1;
389
+ conditions: ConditionTypeNonNullableFields$1[];
390
+ }
391
+ interface ExperimentConditionNonNullableFields$1 {
392
+ spec: string;
393
+ fallbackValue: string;
394
+ expectedValue: string;
395
+ }
396
+ interface EnvironmentConditionNonNullableFields$1 {
397
+ experimentCondition?: ExperimentConditionNonNullableFields$1;
398
+ }
399
+ interface ConditionValueNonNullableFields$1 {
400
+ attrName: string;
401
+ stringValue: string;
402
+ boolValue: boolean;
403
+ }
404
+ interface EqualOperatorNonNullableFields$1 {
405
+ attrName: string;
406
+ value?: ConditionValueNonNullableFields$1;
407
+ }
408
+ interface LikeOperatorNonNullableFields$1 {
409
+ attrName: string;
410
+ values: string[];
411
+ }
412
+ interface ExperimentOperatorNonNullableFields$1 {
413
+ spec: string;
414
+ fallbackValue: string;
415
+ expectedValue: string;
416
+ }
417
+ interface SubjectContextNonNullableFields$1 {
418
+ id: string;
419
+ contextType: SubjectContextType$1;
420
+ }
421
+ interface SubjectNonNullableFields$1 {
422
+ id: string;
423
+ subjectType: SubjectType$1;
424
+ context?: SubjectContextNonNullableFields$1;
425
+ }
426
+ interface DependOnOperatorNonNullableFields$1 {
427
+ dependOnSubject?: SubjectNonNullableFields$1;
428
+ }
429
+ interface ConditionOperatorNonNullableFields$1 {
430
+ equals?: EqualOperatorNonNullableFields$1;
431
+ like?: LikeOperatorNonNullableFields$1;
432
+ experiment?: ExperimentOperatorNonNullableFields$1;
433
+ dependOn?: DependOnOperatorNonNullableFields$1;
434
+ }
435
+ interface ConditionNonNullableFields$1 {
436
+ conditionModelId: string;
437
+ operator?: ConditionOperatorNonNullableFields$1;
438
+ }
439
+ interface ConditionTypeNonNullableFields$1 {
440
+ simpleCondition?: SimpleConditionNonNullableFields$1;
441
+ joinedConditions?: JoinedConditionNonNullableFields$1;
442
+ environmentCondition?: EnvironmentConditionNonNullableFields$1;
443
+ condition?: ConditionNonNullableFields$1;
444
+ }
445
+ interface PolicyConditionNonNullableFields$1 {
446
+ condition?: ConditionTypeNonNullableFields$1;
447
+ }
448
+ interface InviteAssignmentNonNullableFields$1 {
449
+ fullNameResource?: FullNameResourceNonNullableFields$1;
450
+ condition?: PolicyConditionNonNullableFields$1;
451
+ }
452
+ interface InviteResourceAssignmentNonNullableFields$1 {
453
+ policyId: string;
454
+ assignments: InviteAssignmentNonNullableFields$1[];
455
+ }
456
+ interface AccountInviteNonNullableFields$1 {
457
+ id: string;
458
+ accountId: string;
459
+ email: string;
460
+ role: string;
461
+ inviterId: string;
462
+ status: InviteStatus$3;
463
+ acceptLink: string;
464
+ inviterAccountId: string;
465
+ policyIds: string[];
466
+ assignments: InviteResourceAssignmentNonNullableFields$1[];
467
+ }
468
+ interface InviteFailureNonNullableFields$1 {
469
+ subjectEmail: string;
470
+ errorMessage: string;
471
+ }
472
+ interface CreateInviteResponseNonNullableFields$1 {
473
+ successfulInvites: AccountInviteNonNullableFields$1[];
474
+ failedInvites: InviteFailureNonNullableFields$1[];
475
+ }
476
+
477
+ interface AccountInvite {
478
+ /**
479
+ * Invite ID.
480
+ * @readonly
481
+ */
482
+ _id?: string;
483
+ /**
484
+ * Account ID.
485
+ * @readonly
486
+ */
487
+ accountId?: string;
488
+ /** Email address where the invite was sent. */
489
+ email?: string;
490
+ /**
491
+ * Deprecated. Use `policyIds`.
492
+ * @deprecated
493
+ */
494
+ role?: string;
495
+ /**
496
+ * Deprecated. Use `inviterAccountId`.
497
+ * @readonly
498
+ * @deprecated
499
+ */
500
+ inviterId?: string;
501
+ /**
502
+ * Invite status.
503
+ *
504
+ * Supported values:
505
+ * - **Pending:** The invite has been sent and is valid, waiting for the user's response.
506
+ * - **Used:** The invite has been accepted.
507
+ * - **Deleted:** The invite has been deleted or revoked.
508
+ * - **Declined:** The user has declined the invite.
509
+ * - **Expired:** The invite has expired without being accepted.
510
+ */
511
+ status?: InviteStatus$2;
512
+ /** Link to accept the invite. */
513
+ acceptLink?: string;
514
+ /**
515
+ * Inviting account ID.
516
+ * @readonly
517
+ */
518
+ inviterAccountId?: string;
519
+ /**
520
+ * Account ID that accepted the invite. Populated only once the invite is accepted.
521
+ * @readonly
522
+ */
523
+ acceptedByAccountId?: string | null;
524
+ /** Date the invite was created. */
525
+ dateCreated?: Date | null;
526
+ /** Role IDs included in the invite. */
527
+ policyIds?: string[];
528
+ /** Date the invite was last updated. */
529
+ dateUpdated?: Date | null;
530
+ /** Assets the users are invited to join. */
531
+ assignments?: InviteResourceAssignment[];
532
+ /** Invite expiration date. */
533
+ expirationDate?: Date | null;
534
+ }
535
+ /** Invite status stating whether the invite was accepted, waiting to be accepted, deleted etc.. */
536
+ declare enum InviteStatus$2 {
537
+ Pending = "Pending",
538
+ Used = "Used",
539
+ Deleted = "Deleted",
540
+ Declined = "Declined",
541
+ Expired = "Expired"
542
+ }
543
+ interface InviteResourceAssignment {
544
+ /** Role ID. */
545
+ policyId?: string;
546
+ /** Resources the user will be able to access. */
547
+ assignments?: InviteAssignment[];
548
+ }
549
+ interface InviteAssignment {
550
+ /** Full name of resource to be assigned. */
551
+ fullNameResource?: FullNameResource;
552
+ }
553
+ interface FullNameResource extends FullNameResourceResourceContextOneOf {
554
+ /** Specific site details. */
555
+ siteContext?: SiteResourceContext;
556
+ /** Specific account details. */
557
+ accountContext?: AccountResourceContext;
558
+ }
559
+ /** @oneof */
560
+ interface FullNameResourceResourceContextOneOf {
561
+ /** Specific site details. */
562
+ siteContext?: SiteResourceContext;
563
+ /** Specific account details. */
564
+ accountContext?: AccountResourceContext;
565
+ }
566
+ /** 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) */
567
+ interface SiteResourceContext {
568
+ /** Site ID. */
569
+ metasiteId?: string;
570
+ }
571
+ /** 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) */
572
+ interface AccountResourceContext {
573
+ /** Account ID. */
574
+ accountId?: string;
575
+ }
576
+ declare enum SimpleConditionOperator {
577
+ UNKNOWN_SIMPLE_OP = "UNKNOWN_SIMPLE_OP",
578
+ EQUAL = "EQUAL"
579
+ }
580
+ declare enum JoinedConditionOperator {
581
+ UNKNOWN_JOIN_OP = "UNKNOWN_JOIN_OP",
582
+ OR = "OR",
583
+ AND = "AND"
584
+ }
585
+ declare enum SubjectType {
586
+ UNKNOWN = "UNKNOWN",
587
+ ACCOUNT = "ACCOUNT",
588
+ USER = "USER",
589
+ USER_GROUP = "USER_GROUP",
590
+ MEMBER_GROUP = "MEMBER_GROUP",
591
+ VISITOR_GROUP = "VISITOR_GROUP",
592
+ EXTERNAL_APP = "EXTERNAL_APP",
593
+ ACCOUNT_GROUP = "ACCOUNT_GROUP",
594
+ WIX_APP = "WIX_APP"
595
+ }
596
+ declare enum SubjectContextType {
597
+ UNKNOWN_CTX = "UNKNOWN_CTX",
598
+ ORG_CTX = "ORG_CTX",
599
+ ACCOUNT_CTX = "ACCOUNT_CTX"
600
+ }
601
+ interface CreateInviteRequest {
602
+ /** Array of potential team members' email addresses and their corresponding assignments (how they will be assigned when they accept the invite). */
603
+ subjectsAssignments: SubjectInviteAssignments[];
604
+ /** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
605
+ defaultEmailLanguage?: string | null;
606
+ }
607
+ interface SubjectInviteAssignments {
608
+ /** Invitee's email address. */
609
+ subjectEmail?: string;
610
+ /** Mapping of roles (referred to here as policies) and assets (referred to here as resources) that will be assigned to the invitee when they accept the invite. When no resources are specified, the invitee will be given access to everything within the account. */
611
+ assignments?: InviteResourceAssignment[];
612
+ }
613
+ interface CreateInviteResponse {
614
+ /** Invites that were sent successfully. */
615
+ successfulInvites?: AccountInvite[];
616
+ /** Invites that failed. */
617
+ failedInvites?: InviteFailure[];
618
+ }
619
+ interface InviteFailure {
620
+ /** Email address of the failed invite. */
621
+ subjectEmail?: string;
622
+ /** Error description. */
623
+ errorMessage?: string;
624
+ }
625
+ interface SiteResourceContextNonNullableFields {
626
+ metasiteId: string;
627
+ }
628
+ interface AccountResourceContextNonNullableFields {
629
+ accountId: string;
630
+ }
631
+ interface FullNameResourceNonNullableFields {
632
+ siteContext?: SiteResourceContextNonNullableFields;
633
+ accountContext?: AccountResourceContextNonNullableFields;
634
+ }
635
+ interface SimpleConditionValueNonNullableFields {
636
+ attrName: string;
637
+ stringValue: string;
638
+ boolValue: boolean;
639
+ }
640
+ interface SimpleConditionNonNullableFields {
641
+ attrName: string;
642
+ value?: SimpleConditionValueNonNullableFields;
643
+ op: SimpleConditionOperator;
644
+ conditionModelId: string;
645
+ }
646
+ interface JoinedConditionNonNullableFields {
647
+ op: JoinedConditionOperator;
648
+ conditions: ConditionTypeNonNullableFields[];
649
+ }
650
+ interface ExperimentConditionNonNullableFields {
651
+ spec: string;
652
+ fallbackValue: string;
653
+ expectedValue: string;
654
+ }
655
+ interface EnvironmentConditionNonNullableFields {
656
+ experimentCondition?: ExperimentConditionNonNullableFields;
657
+ }
658
+ interface ConditionValueNonNullableFields {
659
+ attrName: string;
660
+ stringValue: string;
661
+ boolValue: boolean;
662
+ }
663
+ interface EqualOperatorNonNullableFields {
664
+ attrName: string;
665
+ value?: ConditionValueNonNullableFields;
666
+ }
667
+ interface LikeOperatorNonNullableFields {
668
+ attrName: string;
669
+ values: string[];
670
+ }
671
+ interface ExperimentOperatorNonNullableFields {
672
+ spec: string;
673
+ fallbackValue: string;
674
+ expectedValue: string;
675
+ }
676
+ interface SubjectContextNonNullableFields {
677
+ _id: string;
678
+ contextType: SubjectContextType;
679
+ }
680
+ interface SubjectNonNullableFields {
681
+ _id: string;
682
+ subjectType: SubjectType;
683
+ context?: SubjectContextNonNullableFields;
684
+ }
685
+ interface DependOnOperatorNonNullableFields {
686
+ dependOnSubject?: SubjectNonNullableFields;
687
+ }
688
+ interface ConditionOperatorNonNullableFields {
689
+ equals?: EqualOperatorNonNullableFields;
690
+ like?: LikeOperatorNonNullableFields;
691
+ experiment?: ExperimentOperatorNonNullableFields;
692
+ dependOn?: DependOnOperatorNonNullableFields;
693
+ }
694
+ interface ConditionNonNullableFields {
695
+ conditionModelId: string;
696
+ operator?: ConditionOperatorNonNullableFields;
697
+ }
698
+ interface ConditionTypeNonNullableFields {
699
+ simpleCondition?: SimpleConditionNonNullableFields;
700
+ joinedConditions?: JoinedConditionNonNullableFields;
701
+ environmentCondition?: EnvironmentConditionNonNullableFields;
702
+ condition?: ConditionNonNullableFields;
703
+ }
704
+ interface PolicyConditionNonNullableFields {
705
+ condition?: ConditionTypeNonNullableFields;
706
+ }
707
+ interface InviteAssignmentNonNullableFields {
708
+ fullNameResource?: FullNameResourceNonNullableFields;
709
+ condition?: PolicyConditionNonNullableFields;
710
+ }
711
+ interface InviteResourceAssignmentNonNullableFields {
712
+ policyId: string;
713
+ assignments: InviteAssignmentNonNullableFields[];
714
+ }
715
+ interface AccountInviteNonNullableFields {
716
+ _id: string;
717
+ accountId: string;
718
+ email: string;
719
+ role: string;
720
+ inviterId: string;
721
+ status: InviteStatus$2;
722
+ acceptLink: string;
723
+ inviterAccountId: string;
724
+ policyIds: string[];
725
+ assignments: InviteResourceAssignmentNonNullableFields[];
726
+ }
727
+ interface InviteFailureNonNullableFields {
728
+ subjectEmail: string;
729
+ errorMessage: string;
730
+ }
731
+ interface CreateInviteResponseNonNullableFields {
732
+ successfulInvites: AccountInviteNonNullableFields[];
733
+ failedInvites: InviteFailureNonNullableFields[];
734
+ }
735
+
736
+ type __PublicMethodMetaInfo$2<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
737
+ getUrl: (context: any) => string;
738
+ httpMethod: K;
739
+ path: string;
740
+ pathParams: M;
741
+ __requestType: T;
742
+ __originalRequestType: S;
743
+ __responseType: Q;
744
+ __originalResponseType: R;
745
+ };
746
+ declare function createInvite(): __PublicMethodMetaInfo$2<'POST', {}, CreateInviteRequest, CreateInviteRequest$1, CreateInviteResponse & CreateInviteResponseNonNullableFields, CreateInviteResponse$1 & CreateInviteResponseNonNullableFields$1>;
747
+
748
+ declare const meta$2_createInvite: typeof createInvite;
749
+ declare namespace meta$2 {
750
+ export { type __PublicMethodMetaInfo$2 as __PublicMethodMetaInfo, meta$2_createInvite as createInvite };
751
+ }
752
+
753
+ interface SiteInvite$1 {
754
+ /**
755
+ * Invite ID.
756
+ * @readonly
757
+ */
758
+ id?: string;
759
+ /**
760
+ * Site ID the user is invited to as a collaborator.
761
+ * @readonly
762
+ */
763
+ siteId?: string;
764
+ /** Email address where the invite was sent. */
765
+ email?: string;
766
+ /** Role IDs included in the invite. */
767
+ policyIds?: string[];
768
+ /**
769
+ * Deprecated. Use `inviterAccountId`.
770
+ * @readonly
771
+ * @deprecated
772
+ */
773
+ inviterId?: string;
774
+ /**
775
+ * Invite Status.
776
+ *
777
+ * Supported values:
778
+ * - **Pending:** The invite has been sent and is valid, waiting for the user's response.
779
+ * - **Used:** The invite has been accepted.
780
+ * - **Deleted:** The invite has been deleted or revoked.
781
+ * - **Declined:** The user declined the invite.
782
+ * - **Expired:** The invite has expired without being accepted.
783
+ */
784
+ status?: InviteStatus$1;
785
+ /** Link to accept the invite. */
786
+ acceptLink?: string;
787
+ /**
788
+ * Inviting account ID.
789
+ * @readonly
790
+ */
791
+ inviterAccountId?: string;
792
+ /**
793
+ * Account ID that accepted the invite. Populated only once the invite is accepted.
794
+ * @readonly
795
+ */
796
+ acceptedByAccountId?: string | null;
797
+ /** Date the invite was created. */
798
+ dateCreated?: Date | null;
799
+ /** User's Wix Bookings staff ID, if relevant. */
800
+ staffId?: string | null;
801
+ /** Invite expiration date */
802
+ expirationDate?: Date | null;
803
+ }
804
+ /** Invite status stating whether the invite was accepted, waiting to be accepted, deleted etc.. */
805
+ declare enum InviteStatus$1 {
806
+ Pending = "Pending",
807
+ Used = "Used",
808
+ Deleted = "Deleted",
809
+ Declined = "Declined",
810
+ Expired = "Expired"
811
+ }
812
+ interface SiteInviteResponse$1 {
813
+ /** Invites that were sent. */
814
+ invite?: SiteInvite$1;
815
+ }
816
+ interface BulkSiteInviteRequest$1 {
817
+ /** Role IDs, referred to as policy IDs, to assign to the contributors. */
818
+ policyIds: string[];
819
+ /** Email addresses to which the invites should be sent. */
820
+ emails: string[];
821
+ /** Details explaining the purpose of the invite. */
822
+ invitePurpose?: string | null;
823
+ /** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
824
+ defaultEmailLanguage?: string | null;
825
+ }
826
+ interface BulkSiteInviteResponse$1 {
827
+ /** Invites that were sent successfully. */
828
+ invites?: SiteInvite$1[];
829
+ /** Invites that failed. */
830
+ failedEmails?: string[];
831
+ }
832
+ interface ResendSiteInviteRequest$1 {
833
+ /** Invite ID. */
834
+ inviteId: string;
835
+ /** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
836
+ defaultEmailLanguage?: string | null;
837
+ }
838
+ interface RevokeSiteInviteRequest$1 {
839
+ /** Invite ID. */
840
+ inviteId: string;
841
+ }
842
+ interface RevokeSiteInviteResponse$1 {
843
+ }
844
+ interface SiteInviteNonNullableFields$1 {
845
+ id: string;
846
+ siteId: string;
847
+ email: string;
848
+ policyIds: string[];
849
+ inviterId: string;
850
+ status: InviteStatus$1;
851
+ acceptLink: string;
852
+ inviterAccountId: string;
853
+ }
854
+ interface BulkSiteInviteResponseNonNullableFields$1 {
855
+ invites: SiteInviteNonNullableFields$1[];
856
+ failedEmails: string[];
857
+ }
858
+ interface SiteInviteResponseNonNullableFields$1 {
859
+ invite?: SiteInviteNonNullableFields$1;
860
+ }
861
+
862
+ interface SiteInvite {
863
+ /**
864
+ * Invite ID.
865
+ * @readonly
866
+ */
867
+ _id?: string;
868
+ /**
869
+ * Site ID the user is invited to as a collaborator.
870
+ * @readonly
871
+ */
872
+ siteId?: string;
873
+ /** Email address where the invite was sent. */
874
+ email?: string;
875
+ /** Role IDs included in the invite. */
876
+ policyIds?: string[];
877
+ /**
878
+ * Deprecated. Use `inviterAccountId`.
879
+ * @readonly
880
+ * @deprecated
881
+ */
882
+ inviterId?: string;
883
+ /**
884
+ * Invite Status.
885
+ *
886
+ * Supported values:
887
+ * - **Pending:** The invite has been sent and is valid, waiting for the user's response.
888
+ * - **Used:** The invite has been accepted.
889
+ * - **Deleted:** The invite has been deleted or revoked.
890
+ * - **Declined:** The user declined the invite.
891
+ * - **Expired:** The invite has expired without being accepted.
892
+ */
893
+ status?: InviteStatus;
894
+ /** Link to accept the invite. */
895
+ acceptLink?: string;
896
+ /**
897
+ * Inviting account ID.
898
+ * @readonly
899
+ */
900
+ inviterAccountId?: string;
901
+ /**
902
+ * Account ID that accepted the invite. Populated only once the invite is accepted.
903
+ * @readonly
904
+ */
905
+ acceptedByAccountId?: string | null;
906
+ /** Date the invite was created. */
907
+ dateCreated?: Date | null;
908
+ /** User's Wix Bookings staff ID, if relevant. */
909
+ staffId?: string | null;
910
+ /** Invite expiration date */
911
+ expirationDate?: Date | null;
912
+ }
913
+ /** Invite status stating whether the invite was accepted, waiting to be accepted, deleted etc.. */
914
+ declare enum InviteStatus {
915
+ Pending = "Pending",
916
+ Used = "Used",
917
+ Deleted = "Deleted",
918
+ Declined = "Declined",
919
+ Expired = "Expired"
920
+ }
921
+ interface SiteInviteResponse {
922
+ /** Invites that were sent. */
923
+ invite?: SiteInvite;
924
+ }
925
+ interface BulkSiteInviteRequest {
926
+ /** Role IDs, referred to as policy IDs, to assign to the contributors. */
927
+ policyIds: string[];
928
+ /** Email addresses to which the invites should be sent. */
929
+ emails: string[];
930
+ /** Details explaining the purpose of the invite. */
931
+ invitePurpose?: string | null;
932
+ /** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
933
+ defaultEmailLanguage?: string | null;
934
+ }
935
+ interface BulkSiteInviteResponse {
936
+ /** Invites that were sent successfully. */
937
+ invites?: SiteInvite[];
938
+ /** Invites that failed. */
939
+ failedEmails?: string[];
940
+ }
941
+ interface ResendSiteInviteRequest {
942
+ /** Invite ID. */
943
+ inviteId: string;
944
+ /** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
945
+ defaultEmailLanguage?: string | null;
946
+ }
947
+ interface RevokeSiteInviteRequest {
948
+ /** Invite ID. */
949
+ inviteId: string;
950
+ }
951
+ interface RevokeSiteInviteResponse {
952
+ }
953
+ interface SiteInviteNonNullableFields {
954
+ _id: string;
955
+ siteId: string;
956
+ email: string;
957
+ policyIds: string[];
958
+ inviterId: string;
959
+ status: InviteStatus;
960
+ acceptLink: string;
961
+ inviterAccountId: string;
962
+ }
963
+ interface BulkSiteInviteResponseNonNullableFields {
964
+ invites: SiteInviteNonNullableFields[];
965
+ failedEmails: string[];
966
+ }
967
+ interface SiteInviteResponseNonNullableFields {
968
+ invite?: SiteInviteNonNullableFields;
969
+ }
970
+
971
+ type __PublicMethodMetaInfo$1<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
972
+ getUrl: (context: any) => string;
973
+ httpMethod: K;
974
+ path: string;
975
+ pathParams: M;
976
+ __requestType: T;
977
+ __originalRequestType: S;
978
+ __responseType: Q;
979
+ __originalResponseType: R;
980
+ };
981
+ declare function bulkInvite(): __PublicMethodMetaInfo$1<'POST', {}, BulkSiteInviteRequest, BulkSiteInviteRequest$1, BulkSiteInviteResponse & BulkSiteInviteResponseNonNullableFields, BulkSiteInviteResponse$1 & BulkSiteInviteResponseNonNullableFields$1>;
982
+ declare function resendInvite(): __PublicMethodMetaInfo$1<'POST', {
983
+ inviteId: string;
984
+ }, ResendSiteInviteRequest, ResendSiteInviteRequest$1, SiteInviteResponse & SiteInviteResponseNonNullableFields, SiteInviteResponse$1 & SiteInviteResponseNonNullableFields$1>;
985
+ declare function revokeInvite(): __PublicMethodMetaInfo$1<'POST', {
986
+ inviteId: string;
987
+ }, RevokeSiteInviteRequest, RevokeSiteInviteRequest$1, RevokeSiteInviteResponse, RevokeSiteInviteResponse$1>;
988
+
989
+ declare const meta$1_bulkInvite: typeof bulkInvite;
990
+ declare const meta$1_resendInvite: typeof resendInvite;
991
+ declare const meta$1_revokeInvite: typeof revokeInvite;
992
+ declare namespace meta$1 {
993
+ export { type __PublicMethodMetaInfo$1 as __PublicMethodMetaInfo, meta$1_bulkInvite as bulkInvite, meta$1_resendInvite as resendInvite, meta$1_revokeInvite as revokeInvite };
994
+ }
995
+
996
+ interface ChangeContributorRoleRequest$1 {
997
+ /** Contributor's account ID. */
998
+ accountId: string;
999
+ /** New roles to assign to the contributor on the site. */
1000
+ newRoles: SiteRoleAssignment$1[];
1001
+ }
1002
+ interface SiteRoleAssignment$1 {
1003
+ /** 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. */
1004
+ roleId?: string;
1005
+ /**
1006
+ * Assignment ID mapping the role to the contributor on the site.
1007
+ * @readonly
1008
+ */
1009
+ assignmentId?: string;
1010
+ }
1011
+ interface ChangeContributorRoleResponse$1 {
1012
+ /** New roles assigned to the contributor on the site. */
1013
+ newAssignedRoles?: SiteRoleAssignment$1[];
1014
+ }
1015
+ interface QuerySiteContributorsRequest$1 {
1016
+ filter?: QuerySiteContributorsFilter$1;
1017
+ }
1018
+ interface QuerySiteContributorsFilter$1 {
1019
+ /** 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. */
1020
+ policyIds?: string[];
1021
+ }
1022
+ interface QuerySiteContributorsResponse$1 {
1023
+ /** List of site contributors. */
1024
+ contributors?: ContributorV2$1[];
1025
+ }
1026
+ interface ContributorV2$1 {
1027
+ /** Contributor's account ID. */
1028
+ accountId?: string | null;
1029
+ /** User ID of the owner of the account that the contributor has joined. */
1030
+ accountOwnerId?: string | null;
1031
+ }
1032
+ interface SiteRoleAssignmentNonNullableFields$1 {
1033
+ roleId: string;
1034
+ assignmentId: string;
1035
+ }
1036
+ interface ChangeContributorRoleResponseNonNullableFields$1 {
1037
+ newAssignedRoles: SiteRoleAssignmentNonNullableFields$1[];
1038
+ }
1039
+
1040
+ interface ChangeContributorRoleRequest {
1041
+ /** Contributor's account ID. */
1042
+ accountId: string;
1043
+ /** New roles to assign to the contributor on the site. */
1044
+ newRoles: SiteRoleAssignment[];
1045
+ }
1046
+ interface SiteRoleAssignment {
1047
+ /** 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. */
1048
+ roleId?: string;
1049
+ /**
1050
+ * Assignment ID mapping the role to the contributor on the site.
1051
+ * @readonly
1052
+ */
1053
+ assignmentId?: string;
1054
+ }
1055
+ interface ChangeContributorRoleResponse {
1056
+ /** New roles assigned to the contributor on the site. */
1057
+ newAssignedRoles?: SiteRoleAssignment[];
1058
+ }
1059
+ interface QuerySiteContributorsRequest {
1060
+ filter?: QuerySiteContributorsFilter;
1061
+ }
1062
+ interface QuerySiteContributorsFilter {
1063
+ /** 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. */
1064
+ policyIds?: string[];
1065
+ }
1066
+ interface QuerySiteContributorsResponse {
1067
+ /** List of site contributors. */
1068
+ contributors?: ContributorV2[];
1069
+ }
1070
+ interface ContributorV2 {
1071
+ /** Contributor's account ID. */
1072
+ accountId?: string | null;
1073
+ /** User ID of the owner of the account that the contributor has joined. */
1074
+ accountOwnerId?: string | null;
1075
+ }
1076
+ interface SiteRoleAssignmentNonNullableFields {
1077
+ roleId: string;
1078
+ assignmentId: string;
1079
+ }
1080
+ interface ChangeContributorRoleResponseNonNullableFields {
1081
+ newAssignedRoles: SiteRoleAssignmentNonNullableFields[];
1082
+ }
1083
+
199
1084
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
200
1085
  getUrl: (context: any) => string;
201
1086
  httpMethod: K;
@@ -206,14 +1091,14 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
206
1091
  __responseType: Q;
207
1092
  __originalResponseType: R;
208
1093
  };
209
- declare function createAccount(): __PublicMethodMetaInfo<'POST', {}, CreateAccountRequest, CreateAccountRequest$1, CreateAccountResponse & CreateAccountResponseNonNullableFields, CreateAccountResponse$1 & CreateAccountResponseNonNullableFields$1>;
210
- declare function listChildAccounts(): __PublicMethodMetaInfo<'GET', {}, ListChildAccountsRequest, ListChildAccountsRequest$1, ListChildAccountsResponse & ListChildAccountsResponseNonNullableFields, ListChildAccountsResponse$1 & ListChildAccountsResponseNonNullableFields$1>;
1094
+ declare function changeRole(): __PublicMethodMetaInfo<'PUT', {}, ChangeContributorRoleRequest, ChangeContributorRoleRequest$1, ChangeContributorRoleResponse & ChangeContributorRoleResponseNonNullableFields, ChangeContributorRoleResponse$1 & ChangeContributorRoleResponseNonNullableFields$1>;
1095
+ declare function querySiteContributors(): __PublicMethodMetaInfo<'GET', {}, QuerySiteContributorsRequest, QuerySiteContributorsRequest$1, QuerySiteContributorsResponse, QuerySiteContributorsResponse$1>;
211
1096
 
212
1097
  type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
213
- declare const meta_createAccount: typeof createAccount;
214
- declare const meta_listChildAccounts: typeof listChildAccounts;
1098
+ declare const meta_changeRole: typeof changeRole;
1099
+ declare const meta_querySiteContributors: typeof querySiteContributors;
215
1100
  declare namespace meta {
216
- export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_createAccount as createAccount, meta_listChildAccounts as listChildAccounts };
1101
+ export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_changeRole as changeRole, meta_querySiteContributors as querySiteContributors };
217
1102
  }
218
1103
 
219
- export { meta as accounts };
1104
+ export { meta$2 as accountInvites, meta$3 as accounts, meta as contributors, meta$1 as siteInvites };