@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.
@@ -557,9 +557,9 @@ interface GetUserAccountsRequest {
557
557
  /** the user id that his accounts we query */
558
558
  userId?: string;
559
559
  /** Limited to max 20 at a single request */
560
- paging?: Paging;
560
+ paging?: Paging$1;
561
561
  }
562
- interface Paging {
562
+ interface Paging$1 {
563
563
  /** Number of items to load. */
564
564
  limit?: number | null;
565
565
  /** Number of items to skip in the current sort order. */
@@ -570,7 +570,7 @@ interface AccountsResponse {
570
570
  }
571
571
  interface GetMyUserAccountsRequest {
572
572
  /** Limited to max 20 at a single request */
573
- paging?: Paging;
573
+ paging?: Paging$1;
574
574
  }
575
575
  interface GetAccountRequest {
576
576
  /** the account id that it's data should be retrieved */
@@ -587,7 +587,7 @@ interface GetAccountsRequest {
587
587
  }
588
588
  interface CreateAccountRequest {
589
589
  /** The user to create under the new account, with the roles defined in `roles`. */
590
- user: User;
590
+ user: User$1;
591
591
  /**
592
592
  * Roles to be assigned to the user in the new account. To retrieve all available roles, call Get Roles Info in the Users API.
593
593
  * Default: OWNER.
@@ -595,7 +595,7 @@ interface CreateAccountRequest {
595
595
  roles?: string[] | null;
596
596
  }
597
597
  /** A User to be created under an implicitly provided accountId: must have a unique email. */
598
- interface User {
598
+ interface User$1 {
599
599
  /** User's unique email address details. Required. */
600
600
  email?: Email;
601
601
  /** User's single sign on identity, when the user is identified via SSO authentication response token params, as specified by [OpenID Connect](https://openid.net/developers/how-connect-works/) (aka. OIDC) protocol. */
@@ -748,9 +748,9 @@ interface GetParentAccountInfoRequest {
748
748
  }
749
749
  interface GetParentAccountInfoResponse {
750
750
  /** The info of the parent account, if the account has a parent */
751
- parentAccountInfo?: AccountInfo;
751
+ parentAccountInfo?: AccountInfo$1;
752
752
  }
753
- interface AccountInfo {
753
+ interface AccountInfo$1 {
754
754
  /** The name of the account */
755
755
  name?: string | null;
756
756
  /** The url of the image of the account */
@@ -758,7 +758,7 @@ interface AccountInfo {
758
758
  }
759
759
  interface GetSubAccountsRequest {
760
760
  /** Offset-based pagination for the response. Default page size is 20, max page size is 50 */
761
- paging?: Paging;
761
+ paging?: Paging$1;
762
762
  }
763
763
  interface GetSubAccountsResponse {
764
764
  /** The sub accounts of the target account */
@@ -785,7 +785,7 @@ interface ListChildAccountsRequest {
785
785
  * Paging options to limit and offset the number of items.
786
786
  * Default: 20. Max: 50.
787
787
  */
788
- paging?: Paging;
788
+ paging?: Paging$1;
789
789
  }
790
790
  interface ListChildAccountsResponse {
791
791
  /** The requested child accounts. */
@@ -818,7 +818,7 @@ interface ListChildAccountsOptions {
818
818
  * Paging options to limit and offset the number of items.
819
819
  * Default: 20. Max: 50.
820
820
  */
821
- paging?: Paging;
821
+ paging?: Paging$1;
822
822
  }
823
823
 
824
824
  declare function createAccount$1(httpClient: HttpClient): CreateAccountSignature;
@@ -831,7 +831,7 @@ interface CreateAccountSignature {
831
831
  * @param - The user to create under the new account, with the roles defined in `roles`.
832
832
  * @param - Filter options.
833
833
  */
834
- (user: User, options?: CreateAccountOptions | undefined): Promise<CreateAccountResponse & CreateAccountResponseNonNullableFields>;
834
+ (user: User$1, options?: CreateAccountOptions | undefined): Promise<CreateAccountResponse & CreateAccountResponseNonNullableFields>;
835
835
  }
836
836
  declare function listChildAccounts$1(httpClient: HttpClient): ListChildAccountsSignature;
837
837
  interface ListChildAccountsSignature {
@@ -848,62 +848,1476 @@ interface ListChildAccountsSignature {
848
848
  declare const createAccount: MaybeContext<BuildRESTFunction<typeof createAccount$1> & typeof createAccount$1>;
849
849
  declare const listChildAccounts: MaybeContext<BuildRESTFunction<typeof listChildAccounts$1> & typeof listChildAccounts$1>;
850
850
 
851
- type context_Account = Account;
851
+ type context$3_Account = Account;
852
+ type context$3_AccountProperties = AccountProperties;
853
+ type context$3_AccountResponse = AccountResponse;
854
+ type context$3_AccountStatus = AccountStatus;
855
+ declare const context$3_AccountStatus: typeof AccountStatus;
856
+ type context$3_AccountV2 = AccountV2;
857
+ type context$3_AccountsResponse = AccountsResponse;
858
+ type context$3_CoBranding = CoBranding;
859
+ declare const context$3_CoBranding: typeof CoBranding;
860
+ type context$3_CreateAccountAndAssignUserRequest = CreateAccountAndAssignUserRequest;
861
+ type context$3_CreateAccountForMyUserRequest = CreateAccountForMyUserRequest;
862
+ type context$3_CreateAccountOptions = CreateAccountOptions;
863
+ type context$3_CreateAccountRequest = CreateAccountRequest;
864
+ type context$3_CreateAccountResponse = CreateAccountResponse;
865
+ type context$3_CreateAccountResponseNonNullableFields = CreateAccountResponseNonNullableFields;
866
+ type context$3_CreateAccountTenantRequest = CreateAccountTenantRequest;
867
+ type context$3_CreateAccountTenantResponse = CreateAccountTenantResponse;
868
+ type context$3_DeleteAccountRequest = DeleteAccountRequest;
869
+ type context$3_Email = Email;
870
+ type context$3_EmptyResponse = EmptyResponse;
871
+ type context$3_GetAccountRequest = GetAccountRequest;
872
+ type context$3_GetAccountsRequest = GetAccountsRequest;
873
+ type context$3_GetMyAccountRequest = GetMyAccountRequest;
874
+ type context$3_GetMyUserAccountsRequest = GetMyUserAccountsRequest;
875
+ type context$3_GetParentAccountInfoRequest = GetParentAccountInfoRequest;
876
+ type context$3_GetParentAccountInfoResponse = GetParentAccountInfoResponse;
877
+ type context$3_GetSubAccountsRequest = GetSubAccountsRequest;
878
+ type context$3_GetSubAccountsResponse = GetSubAccountsResponse;
879
+ type context$3_GetUserAccountRequest = GetUserAccountRequest;
880
+ type context$3_GetUserAccountsRequest = GetUserAccountsRequest;
881
+ type context$3_IsTeamRequest = IsTeamRequest;
882
+ type context$3_IsTeamResponse = IsTeamResponse;
883
+ type context$3_ListChildAccountsOptions = ListChildAccountsOptions;
884
+ type context$3_ListChildAccountsRequest = ListChildAccountsRequest;
885
+ type context$3_ListChildAccountsResponse = ListChildAccountsResponse;
886
+ type context$3_ListChildAccountsResponseNonNullableFields = ListChildAccountsResponseNonNullableFields;
887
+ type context$3_MarkAccountFlagRequest = MarkAccountFlagRequest;
888
+ type context$3_MarkAccountFlagRequestFlagOneOf = MarkAccountFlagRequestFlagOneOf;
889
+ type context$3_PagingMetadata = PagingMetadata;
890
+ type context$3_RemoveParent = RemoveParent;
891
+ type context$3_SetIsReadOnlyAccountRequest = SetIsReadOnlyAccountRequest;
892
+ type context$3_SsoIdentity = SsoIdentity;
893
+ type context$3_SubAccountInfo = SubAccountInfo;
894
+ type context$3_UpdateAccountRequest = UpdateAccountRequest;
895
+ type context$3_UpdateParentAccountRequest = UpdateParentAccountRequest;
896
+ type context$3_UpdateParentAccountRequestUpdateOneOf = UpdateParentAccountRequestUpdateOneOf;
897
+ type context$3_UpdateParentAccountResponse = UpdateParentAccountResponse;
898
+ type context$3_UpdateSlugRequest = UpdateSlugRequest;
899
+ type context$3_UserDetails = UserDetails;
900
+ declare const context$3_createAccount: typeof createAccount;
901
+ declare const context$3_listChildAccounts: typeof listChildAccounts;
902
+ declare namespace context$3 {
903
+ export { type context$3_Account as Account, type AccountInfo$1 as AccountInfo, type context$3_AccountProperties as AccountProperties, type context$3_AccountResponse as AccountResponse, context$3_AccountStatus as AccountStatus, type context$3_AccountV2 as AccountV2, type context$3_AccountsResponse as AccountsResponse, context$3_CoBranding as CoBranding, type context$3_CreateAccountAndAssignUserRequest as CreateAccountAndAssignUserRequest, type context$3_CreateAccountForMyUserRequest as CreateAccountForMyUserRequest, type context$3_CreateAccountOptions as CreateAccountOptions, type context$3_CreateAccountRequest as CreateAccountRequest, type context$3_CreateAccountResponse as CreateAccountResponse, type context$3_CreateAccountResponseNonNullableFields as CreateAccountResponseNonNullableFields, type context$3_CreateAccountTenantRequest as CreateAccountTenantRequest, type context$3_CreateAccountTenantResponse as CreateAccountTenantResponse, type context$3_DeleteAccountRequest as DeleteAccountRequest, type context$3_Email as Email, type context$3_EmptyResponse as EmptyResponse, type context$3_GetAccountRequest as GetAccountRequest, type context$3_GetAccountsRequest as GetAccountsRequest, type context$3_GetMyAccountRequest as GetMyAccountRequest, type context$3_GetMyUserAccountsRequest as GetMyUserAccountsRequest, type context$3_GetParentAccountInfoRequest as GetParentAccountInfoRequest, type context$3_GetParentAccountInfoResponse as GetParentAccountInfoResponse, type context$3_GetSubAccountsRequest as GetSubAccountsRequest, type context$3_GetSubAccountsResponse as GetSubAccountsResponse, type context$3_GetUserAccountRequest as GetUserAccountRequest, type context$3_GetUserAccountsRequest as GetUserAccountsRequest, type context$3_IsTeamRequest as IsTeamRequest, type context$3_IsTeamResponse as IsTeamResponse, type context$3_ListChildAccountsOptions as ListChildAccountsOptions, type context$3_ListChildAccountsRequest as ListChildAccountsRequest, type context$3_ListChildAccountsResponse as ListChildAccountsResponse, type context$3_ListChildAccountsResponseNonNullableFields as ListChildAccountsResponseNonNullableFields, type context$3_MarkAccountFlagRequest as MarkAccountFlagRequest, type context$3_MarkAccountFlagRequestFlagOneOf as MarkAccountFlagRequestFlagOneOf, type Paging$1 as Paging, type context$3_PagingMetadata as PagingMetadata, type context$3_RemoveParent as RemoveParent, type context$3_SetIsReadOnlyAccountRequest as SetIsReadOnlyAccountRequest, type context$3_SsoIdentity as SsoIdentity, type context$3_SubAccountInfo as SubAccountInfo, type context$3_UpdateAccountRequest as UpdateAccountRequest, type context$3_UpdateParentAccountRequest as UpdateParentAccountRequest, type context$3_UpdateParentAccountRequestUpdateOneOf as UpdateParentAccountRequestUpdateOneOf, type context$3_UpdateParentAccountResponse as UpdateParentAccountResponse, type context$3_UpdateSlugRequest as UpdateSlugRequest, type User$1 as User, type context$3_UserDetails as UserDetails, context$3_createAccount as createAccount, context$3_listChildAccounts as listChildAccounts };
904
+ }
905
+
906
+ interface AccountInvite {
907
+ /**
908
+ * Invite ID.
909
+ * @readonly
910
+ */
911
+ _id?: string;
912
+ /**
913
+ * Account ID.
914
+ * @readonly
915
+ */
916
+ accountId?: string;
917
+ /** Email address where the invite was sent. */
918
+ email?: string;
919
+ /**
920
+ * Deprecated. Use `policyIds`.
921
+ * @deprecated
922
+ */
923
+ role?: string;
924
+ /**
925
+ * Deprecated. Use `inviterAccountId`.
926
+ * @readonly
927
+ * @deprecated
928
+ */
929
+ inviterId?: string;
930
+ /**
931
+ * Invite status.
932
+ *
933
+ * Supported values:
934
+ * - **Pending:** The invite has been sent and is valid, waiting for the user's response.
935
+ * - **Used:** The invite has been accepted.
936
+ * - **Deleted:** The invite has been deleted or revoked.
937
+ * - **Declined:** The user has declined the invite.
938
+ * - **Expired:** The invite has expired without being accepted.
939
+ */
940
+ status?: InviteStatus$2;
941
+ /** Link to accept the invite. */
942
+ acceptLink?: string;
943
+ /**
944
+ * Inviting account ID.
945
+ * @readonly
946
+ */
947
+ inviterAccountId?: string;
948
+ /**
949
+ * Account ID that accepted the invite. Populated only once the invite is accepted.
950
+ * @readonly
951
+ */
952
+ acceptedByAccountId?: string | null;
953
+ /** Date the invite was created. */
954
+ dateCreated?: Date | null;
955
+ /** Role IDs included in the invite. */
956
+ policyIds?: string[];
957
+ /** Date the invite was last updated. */
958
+ dateUpdated?: Date | null;
959
+ /** Assets the users are invited to join. */
960
+ assignments?: InviteResourceAssignment[];
961
+ /** Invite expiration date. */
962
+ expirationDate?: Date | null;
963
+ }
964
+ /** Invite status stating whether the invite was accepted, waiting to be accepted, deleted etc.. */
965
+ declare enum InviteStatus$2 {
966
+ Pending = "Pending",
967
+ Used = "Used",
968
+ Deleted = "Deleted",
969
+ Declined = "Declined",
970
+ Expired = "Expired"
971
+ }
972
+ interface InviteResourceAssignment {
973
+ /** Role ID. */
974
+ policyId?: string;
975
+ /** Resources the user will be able to access. */
976
+ assignments?: InviteAssignment[];
977
+ }
978
+ interface InviteAssignment {
979
+ /** Full name of resource to be assigned. */
980
+ fullNameResource?: FullNameResource;
981
+ }
982
+ interface FullNameResource extends FullNameResourceResourceContextOneOf {
983
+ /** Specific site details. */
984
+ siteContext?: SiteResourceContext;
985
+ /** Specific account details. */
986
+ accountContext?: AccountResourceContext;
987
+ }
988
+ /** @oneof */
989
+ interface FullNameResourceResourceContextOneOf {
990
+ /** Specific site details. */
991
+ siteContext?: SiteResourceContext;
992
+ /** Specific account details. */
993
+ accountContext?: AccountResourceContext;
994
+ }
995
+ /** 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) */
996
+ interface SiteResourceContext {
997
+ /** Site ID. */
998
+ metasiteId?: string;
999
+ }
1000
+ /** 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) */
1001
+ interface AccountResourceContext {
1002
+ /** Account ID. */
1003
+ accountId?: string;
1004
+ }
1005
+ interface OrganizationResourceContext {
1006
+ }
1007
+ /**
1008
+ * A custom resource. Is used to represent some asset that is not a direct resource context (site or account), but something custom.
1009
+ * For example: payment method, blog post, domain, logo.
1010
+ */
1011
+ interface Resource$1 {
1012
+ /** The resource id. */
1013
+ _id?: string | null;
1014
+ /** The resource type */
1015
+ type?: string | null;
1016
+ }
1017
+ interface PolicyCondition {
1018
+ /** The type of the condition */
1019
+ condition?: ConditionType;
1020
+ }
1021
+ interface ConditionType extends ConditionTypeOfOneOf {
1022
+ /** @deprecated */
1023
+ simpleCondition?: SimpleCondition;
1024
+ /** A logic combination between several conditions, with an operator between them */
1025
+ joinedConditions?: JoinedCondition;
1026
+ /** @deprecated */
1027
+ environmentCondition?: EnvironmentCondition;
1028
+ /** A single condition */
1029
+ condition?: Condition$1;
1030
+ }
1031
+ /** @oneof */
1032
+ interface ConditionTypeOfOneOf {
1033
+ /** @deprecated */
1034
+ simpleCondition?: SimpleCondition;
1035
+ /** A logic combination between several conditions, with an operator between them */
1036
+ joinedConditions?: JoinedCondition;
1037
+ /** @deprecated */
1038
+ environmentCondition?: EnvironmentCondition;
1039
+ /** A single condition */
1040
+ condition?: Condition$1;
1041
+ }
1042
+ interface SimpleCondition {
1043
+ attrName?: string;
1044
+ value?: SimpleConditionValue;
1045
+ op?: SimpleConditionOperator;
1046
+ conditionModelId?: string;
1047
+ }
1048
+ interface SimpleConditionValue extends SimpleConditionValueValueOneOf {
1049
+ attrName?: string;
1050
+ stringValue?: string;
1051
+ boolValue?: boolean;
1052
+ }
1053
+ /** @oneof */
1054
+ interface SimpleConditionValueValueOneOf {
1055
+ attrName?: string;
1056
+ stringValue?: string;
1057
+ boolValue?: boolean;
1058
+ }
1059
+ declare enum SimpleConditionOperator {
1060
+ UNKNOWN_SIMPLE_OP = "UNKNOWN_SIMPLE_OP",
1061
+ EQUAL = "EQUAL"
1062
+ }
1063
+ interface JoinedCondition {
1064
+ /** The operator that should be used when evaluating the condition */
1065
+ op?: JoinedConditionOperator;
1066
+ /** The conditions that should be evaluated, and then joined using the operator provided */
1067
+ conditions?: ConditionType[];
1068
+ }
1069
+ declare enum JoinedConditionOperator {
1070
+ UNKNOWN_JOIN_OP = "UNKNOWN_JOIN_OP",
1071
+ OR = "OR",
1072
+ AND = "AND"
1073
+ }
1074
+ interface EnvironmentCondition extends EnvironmentConditionConditionOneOf {
1075
+ experimentCondition?: ExperimentCondition;
1076
+ }
1077
+ /** @oneof */
1078
+ interface EnvironmentConditionConditionOneOf {
1079
+ experimentCondition?: ExperimentCondition;
1080
+ }
1081
+ interface ExperimentCondition {
1082
+ spec?: string;
1083
+ fallbackValue?: string;
1084
+ expectedValue?: string;
1085
+ }
1086
+ interface Condition$1 {
1087
+ /** The unique identifier of the condition model. Indicates which actions the condition is working on */
1088
+ conditionModelId?: string;
1089
+ /** The operator that should be evaluated */
1090
+ operator?: ConditionOperator;
1091
+ }
1092
+ interface ConditionOperator extends ConditionOperatorOperatorsOneOf {
1093
+ /** Comparison of equality - will be evaluated to true if the given parties are equal */
1094
+ equals?: EqualOperator;
1095
+ /** Regex operator - will be evaluated to true if the given value matches the provided regex */
1096
+ like?: LikeOperator;
1097
+ /** Petri experiment - will be evaluated using petri. */
1098
+ experiment?: ExperimentOperator;
1099
+ /** Operator that indicates a dependency on another subject being allowed to perform something. */
1100
+ dependOn?: DependOnOperator;
1101
+ }
1102
+ /** @oneof */
1103
+ interface ConditionOperatorOperatorsOneOf {
1104
+ /** Comparison of equality - will be evaluated to true if the given parties are equal */
1105
+ equals?: EqualOperator;
1106
+ /** Regex operator - will be evaluated to true if the given value matches the provided regex */
1107
+ like?: LikeOperator;
1108
+ /** Petri experiment - will be evaluated using petri. */
1109
+ experiment?: ExperimentOperator;
1110
+ /** Operator that indicates a dependency on another subject being allowed to perform something. */
1111
+ dependOn?: DependOnOperator;
1112
+ }
1113
+ interface EqualOperator {
1114
+ /** The attribute which should be compared. The attribute will be first evaluated to a value, and then compared the other side (attribute/value) */
1115
+ attrName?: string;
1116
+ /** The value to compare to. If the two parties are equal - we will return true. */
1117
+ value?: ConditionValue;
1118
+ }
1119
+ interface ConditionValue extends ConditionValueValueOneOf {
1120
+ /** 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. */
1121
+ attrName?: string;
1122
+ /** a value with a string type. Will be compared to the attribute provided, and be true only if they match the operator. */
1123
+ stringValue?: string;
1124
+ /** a value with a boolean type. Will be compared to the attribute provided, and be true only if they match the operator. */
1125
+ boolValue?: boolean;
1126
+ }
1127
+ /** @oneof */
1128
+ interface ConditionValueValueOneOf {
1129
+ /** 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. */
1130
+ attrName?: string;
1131
+ /** a value with a string type. Will be compared to the attribute provided, and be true only if they match the operator. */
1132
+ stringValue?: string;
1133
+ /** a value with a boolean type. Will be compared to the attribute provided, and be true only if they match the operator. */
1134
+ boolValue?: boolean;
1135
+ }
1136
+ interface LikeOperator {
1137
+ /** The attribute which should be compared. The attribute will be first evaluated to a value, and then compared the regex values provided. */
1138
+ attrName?: string;
1139
+ /** 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 */
1140
+ values?: string[];
1141
+ }
1142
+ interface ExperimentOperator {
1143
+ /** The spec to conduct the experiment on. */
1144
+ spec?: string;
1145
+ /** The value to use if the experiment could not be conducted */
1146
+ fallbackValue?: string;
1147
+ /** The expected value of the experiment conduction. If it matches the actual value - true will be returned. Otherwise - false. */
1148
+ expectedValue?: string;
1149
+ }
1150
+ /** Implies that the policy takes affect only if the depend on subject is permitted as well. */
1151
+ interface DependOnOperator {
1152
+ /** 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 */
1153
+ dependOnSubject?: Subject$1;
1154
+ }
1155
+ interface Subject$1 {
1156
+ /** ID of identity assigned to the asset. */
1157
+ _id?: string;
1158
+ /** Type of identity assigned to the asset. Supported subject types include user IDs, account IDs, and app IDs. */
1159
+ subjectType?: SubjectType$1;
1160
+ /** Context of identity assigned to the asset. For example, a `subjectType` = `USER` will have `context` = `ACCOUNT`. */
1161
+ context?: SubjectContext$1;
1162
+ }
1163
+ declare enum SubjectType$1 {
1164
+ UNKNOWN = "UNKNOWN",
1165
+ ACCOUNT = "ACCOUNT",
1166
+ USER = "USER",
1167
+ USER_GROUP = "USER_GROUP",
1168
+ MEMBER_GROUP = "MEMBER_GROUP",
1169
+ VISITOR_GROUP = "VISITOR_GROUP",
1170
+ EXTERNAL_APP = "EXTERNAL_APP",
1171
+ ACCOUNT_GROUP = "ACCOUNT_GROUP",
1172
+ WIX_APP = "WIX_APP"
1173
+ }
1174
+ interface SubjectContext$1 {
1175
+ _id?: string;
1176
+ contextType?: SubjectContextType$1;
1177
+ }
1178
+ declare enum SubjectContextType$1 {
1179
+ UNKNOWN_CTX = "UNKNOWN_CTX",
1180
+ ORG_CTX = "ORG_CTX",
1181
+ ACCOUNT_CTX = "ACCOUNT_CTX"
1182
+ }
1183
+ interface GetAccountInvitesRequest {
1184
+ }
1185
+ interface GetAccountInvitesResponse {
1186
+ invites?: AccountInvite[];
1187
+ }
1188
+ interface GetAccountInviteRequest {
1189
+ _id?: string;
1190
+ }
1191
+ interface GetAccountInviteResponse {
1192
+ invite?: AccountInvite;
1193
+ }
1194
+ interface AccountInviteRequest {
1195
+ role?: string;
1196
+ email?: string;
1197
+ policyIds?: string[];
1198
+ }
1199
+ interface AccountInviteResponse {
1200
+ invite?: AccountInvite;
1201
+ }
1202
+ interface CreateInviteRequest {
1203
+ /** Array of potential team members' email addresses and their corresponding assignments (how they will be assigned when they accept the invite). */
1204
+ subjectsAssignments: SubjectInviteAssignments[];
1205
+ /** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
1206
+ defaultEmailLanguage?: string | null;
1207
+ }
1208
+ interface SubjectInviteAssignments {
1209
+ /** Invitee's email address. */
1210
+ subjectEmail?: string;
1211
+ /** 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. */
1212
+ assignments?: InviteResourceAssignment[];
1213
+ }
1214
+ interface CreateInviteResponse {
1215
+ /** Invites that were sent successfully. */
1216
+ successfulInvites?: AccountInvite[];
1217
+ /** Invites that failed. */
1218
+ failedInvites?: InviteFailure[];
1219
+ }
1220
+ interface InviteFailure {
1221
+ /** Email address of the failed invite. */
1222
+ subjectEmail?: string;
1223
+ /** Error description. */
1224
+ errorMessage?: string;
1225
+ }
1226
+ interface BulkAccountInviteRequest {
1227
+ role?: string;
1228
+ emails?: string[];
1229
+ policyIds?: string[];
1230
+ }
1231
+ interface BulkAccountInviteResponse {
1232
+ invites?: AccountInvite[];
1233
+ failedEmails?: string[];
1234
+ }
1235
+ interface ResendAccountInviteRequest {
1236
+ inviteId?: string;
1237
+ /** The language of emails that will be used only for recipients that don't have a user, in case this parameter is unspecified, the sender's language will be used instead */
1238
+ defaultEmailLanguage?: string | null;
1239
+ }
1240
+ interface AcceptAccountInviteRequest {
1241
+ inviteToken?: string;
1242
+ }
1243
+ interface AcceptAccountInviteResponse {
1244
+ }
1245
+ interface RevokeAccountInviteRequest {
1246
+ inviteId?: string;
1247
+ }
1248
+ interface RevokeAccountInviteResponse {
1249
+ }
1250
+ interface UpdateAccountInviteRequest {
1251
+ inviteId?: string;
1252
+ role?: string;
1253
+ policyIds?: string[];
1254
+ }
1255
+ interface UpdateAccountInviteResponse {
1256
+ }
1257
+ interface UpdateAccountInviteAssignmentsRequest {
1258
+ inviteId?: string;
1259
+ assignments?: InviteResourceAssignment[];
1260
+ }
1261
+ interface UpdateAccountInviteAssignmentsResponse {
1262
+ }
1263
+ interface ParseAccountInviteTokenRequest {
1264
+ inviteToken?: string;
1265
+ }
1266
+ interface ParseAccountInviteTokenResponse {
1267
+ inviteId?: string;
1268
+ accountId?: string;
1269
+ status?: InviteStatus$2;
1270
+ }
1271
+ interface SiteResourceContextNonNullableFields {
1272
+ metasiteId: string;
1273
+ }
1274
+ interface AccountResourceContextNonNullableFields {
1275
+ accountId: string;
1276
+ }
1277
+ interface FullNameResourceNonNullableFields {
1278
+ siteContext?: SiteResourceContextNonNullableFields;
1279
+ accountContext?: AccountResourceContextNonNullableFields;
1280
+ }
1281
+ interface SimpleConditionValueNonNullableFields {
1282
+ attrName: string;
1283
+ stringValue: string;
1284
+ boolValue: boolean;
1285
+ }
1286
+ interface SimpleConditionNonNullableFields {
1287
+ attrName: string;
1288
+ value?: SimpleConditionValueNonNullableFields;
1289
+ op: SimpleConditionOperator;
1290
+ conditionModelId: string;
1291
+ }
1292
+ interface JoinedConditionNonNullableFields {
1293
+ op: JoinedConditionOperator;
1294
+ conditions: ConditionTypeNonNullableFields[];
1295
+ }
1296
+ interface ExperimentConditionNonNullableFields {
1297
+ spec: string;
1298
+ fallbackValue: string;
1299
+ expectedValue: string;
1300
+ }
1301
+ interface EnvironmentConditionNonNullableFields {
1302
+ experimentCondition?: ExperimentConditionNonNullableFields;
1303
+ }
1304
+ interface ConditionValueNonNullableFields {
1305
+ attrName: string;
1306
+ stringValue: string;
1307
+ boolValue: boolean;
1308
+ }
1309
+ interface EqualOperatorNonNullableFields {
1310
+ attrName: string;
1311
+ value?: ConditionValueNonNullableFields;
1312
+ }
1313
+ interface LikeOperatorNonNullableFields {
1314
+ attrName: string;
1315
+ values: string[];
1316
+ }
1317
+ interface ExperimentOperatorNonNullableFields {
1318
+ spec: string;
1319
+ fallbackValue: string;
1320
+ expectedValue: string;
1321
+ }
1322
+ interface SubjectContextNonNullableFields {
1323
+ _id: string;
1324
+ contextType: SubjectContextType$1;
1325
+ }
1326
+ interface SubjectNonNullableFields {
1327
+ _id: string;
1328
+ subjectType: SubjectType$1;
1329
+ context?: SubjectContextNonNullableFields;
1330
+ }
1331
+ interface DependOnOperatorNonNullableFields {
1332
+ dependOnSubject?: SubjectNonNullableFields;
1333
+ }
1334
+ interface ConditionOperatorNonNullableFields {
1335
+ equals?: EqualOperatorNonNullableFields;
1336
+ like?: LikeOperatorNonNullableFields;
1337
+ experiment?: ExperimentOperatorNonNullableFields;
1338
+ dependOn?: DependOnOperatorNonNullableFields;
1339
+ }
1340
+ interface ConditionNonNullableFields {
1341
+ conditionModelId: string;
1342
+ operator?: ConditionOperatorNonNullableFields;
1343
+ }
1344
+ interface ConditionTypeNonNullableFields {
1345
+ simpleCondition?: SimpleConditionNonNullableFields;
1346
+ joinedConditions?: JoinedConditionNonNullableFields;
1347
+ environmentCondition?: EnvironmentConditionNonNullableFields;
1348
+ condition?: ConditionNonNullableFields;
1349
+ }
1350
+ interface PolicyConditionNonNullableFields {
1351
+ condition?: ConditionTypeNonNullableFields;
1352
+ }
1353
+ interface InviteAssignmentNonNullableFields {
1354
+ fullNameResource?: FullNameResourceNonNullableFields;
1355
+ condition?: PolicyConditionNonNullableFields;
1356
+ }
1357
+ interface InviteResourceAssignmentNonNullableFields {
1358
+ policyId: string;
1359
+ assignments: InviteAssignmentNonNullableFields[];
1360
+ }
1361
+ interface AccountInviteNonNullableFields {
1362
+ _id: string;
1363
+ accountId: string;
1364
+ email: string;
1365
+ role: string;
1366
+ inviterId: string;
1367
+ status: InviteStatus$2;
1368
+ acceptLink: string;
1369
+ inviterAccountId: string;
1370
+ policyIds: string[];
1371
+ assignments: InviteResourceAssignmentNonNullableFields[];
1372
+ }
1373
+ interface InviteFailureNonNullableFields {
1374
+ subjectEmail: string;
1375
+ errorMessage: string;
1376
+ }
1377
+ interface CreateInviteResponseNonNullableFields {
1378
+ successfulInvites: AccountInviteNonNullableFields[];
1379
+ failedInvites: InviteFailureNonNullableFields[];
1380
+ }
1381
+ interface CreateInviteOptions {
1382
+ /** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
1383
+ defaultEmailLanguage?: string | null;
1384
+ }
1385
+
1386
+ declare function createInvite$1(httpClient: HttpClient): CreateInviteSignature;
1387
+ interface CreateInviteSignature {
1388
+ /**
1389
+ * Creates and sends invite emails to a list of potential team members, inviting them to become team members of the requesting account.
1390
+ * The invites may be limited to a specific resource (site or other asset).
1391
+ * Maximum 50 invitees can be specified per call.
1392
+ *
1393
+ * > **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.
1394
+ * @param - Array of potential team members' email addresses and their corresponding assignments (how they will be assigned when they accept the invite).
1395
+ * @param - Filter options.
1396
+ */
1397
+ (subjectsAssignments: SubjectInviteAssignments[], options?: CreateInviteOptions | undefined): Promise<CreateInviteResponse & CreateInviteResponseNonNullableFields>;
1398
+ }
1399
+
1400
+ declare const createInvite: MaybeContext<BuildRESTFunction<typeof createInvite$1> & typeof createInvite$1>;
1401
+
1402
+ type context$2_AcceptAccountInviteRequest = AcceptAccountInviteRequest;
1403
+ type context$2_AcceptAccountInviteResponse = AcceptAccountInviteResponse;
1404
+ type context$2_AccountInvite = AccountInvite;
1405
+ type context$2_AccountInviteRequest = AccountInviteRequest;
1406
+ type context$2_AccountInviteResponse = AccountInviteResponse;
1407
+ type context$2_AccountResourceContext = AccountResourceContext;
1408
+ type context$2_BulkAccountInviteRequest = BulkAccountInviteRequest;
1409
+ type context$2_BulkAccountInviteResponse = BulkAccountInviteResponse;
1410
+ type context$2_ConditionOperator = ConditionOperator;
1411
+ type context$2_ConditionOperatorOperatorsOneOf = ConditionOperatorOperatorsOneOf;
1412
+ type context$2_ConditionType = ConditionType;
1413
+ type context$2_ConditionTypeOfOneOf = ConditionTypeOfOneOf;
1414
+ type context$2_ConditionValue = ConditionValue;
1415
+ type context$2_ConditionValueValueOneOf = ConditionValueValueOneOf;
1416
+ type context$2_CreateInviteOptions = CreateInviteOptions;
1417
+ type context$2_CreateInviteRequest = CreateInviteRequest;
1418
+ type context$2_CreateInviteResponse = CreateInviteResponse;
1419
+ type context$2_CreateInviteResponseNonNullableFields = CreateInviteResponseNonNullableFields;
1420
+ type context$2_DependOnOperator = DependOnOperator;
1421
+ type context$2_EnvironmentCondition = EnvironmentCondition;
1422
+ type context$2_EnvironmentConditionConditionOneOf = EnvironmentConditionConditionOneOf;
1423
+ type context$2_EqualOperator = EqualOperator;
1424
+ type context$2_ExperimentCondition = ExperimentCondition;
1425
+ type context$2_ExperimentOperator = ExperimentOperator;
1426
+ type context$2_FullNameResource = FullNameResource;
1427
+ type context$2_FullNameResourceResourceContextOneOf = FullNameResourceResourceContextOneOf;
1428
+ type context$2_GetAccountInviteRequest = GetAccountInviteRequest;
1429
+ type context$2_GetAccountInviteResponse = GetAccountInviteResponse;
1430
+ type context$2_GetAccountInvitesRequest = GetAccountInvitesRequest;
1431
+ type context$2_GetAccountInvitesResponse = GetAccountInvitesResponse;
1432
+ type context$2_InviteAssignment = InviteAssignment;
1433
+ type context$2_InviteFailure = InviteFailure;
1434
+ type context$2_InviteResourceAssignment = InviteResourceAssignment;
1435
+ type context$2_JoinedCondition = JoinedCondition;
1436
+ type context$2_JoinedConditionOperator = JoinedConditionOperator;
1437
+ declare const context$2_JoinedConditionOperator: typeof JoinedConditionOperator;
1438
+ type context$2_LikeOperator = LikeOperator;
1439
+ type context$2_OrganizationResourceContext = OrganizationResourceContext;
1440
+ type context$2_ParseAccountInviteTokenRequest = ParseAccountInviteTokenRequest;
1441
+ type context$2_ParseAccountInviteTokenResponse = ParseAccountInviteTokenResponse;
1442
+ type context$2_PolicyCondition = PolicyCondition;
1443
+ type context$2_ResendAccountInviteRequest = ResendAccountInviteRequest;
1444
+ type context$2_RevokeAccountInviteRequest = RevokeAccountInviteRequest;
1445
+ type context$2_RevokeAccountInviteResponse = RevokeAccountInviteResponse;
1446
+ type context$2_SimpleCondition = SimpleCondition;
1447
+ type context$2_SimpleConditionOperator = SimpleConditionOperator;
1448
+ declare const context$2_SimpleConditionOperator: typeof SimpleConditionOperator;
1449
+ type context$2_SimpleConditionValue = SimpleConditionValue;
1450
+ type context$2_SimpleConditionValueValueOneOf = SimpleConditionValueValueOneOf;
1451
+ type context$2_SiteResourceContext = SiteResourceContext;
1452
+ type context$2_SubjectInviteAssignments = SubjectInviteAssignments;
1453
+ type context$2_UpdateAccountInviteAssignmentsRequest = UpdateAccountInviteAssignmentsRequest;
1454
+ type context$2_UpdateAccountInviteAssignmentsResponse = UpdateAccountInviteAssignmentsResponse;
1455
+ type context$2_UpdateAccountInviteRequest = UpdateAccountInviteRequest;
1456
+ type context$2_UpdateAccountInviteResponse = UpdateAccountInviteResponse;
1457
+ declare const context$2_createInvite: typeof createInvite;
1458
+ declare namespace context$2 {
1459
+ export { type context$2_AcceptAccountInviteRequest as AcceptAccountInviteRequest, type context$2_AcceptAccountInviteResponse as AcceptAccountInviteResponse, type context$2_AccountInvite as AccountInvite, type context$2_AccountInviteRequest as AccountInviteRequest, type context$2_AccountInviteResponse as AccountInviteResponse, type context$2_AccountResourceContext as AccountResourceContext, type context$2_BulkAccountInviteRequest as BulkAccountInviteRequest, type context$2_BulkAccountInviteResponse as BulkAccountInviteResponse, type Condition$1 as Condition, type context$2_ConditionOperator as ConditionOperator, type context$2_ConditionOperatorOperatorsOneOf as ConditionOperatorOperatorsOneOf, type context$2_ConditionType as ConditionType, type context$2_ConditionTypeOfOneOf as ConditionTypeOfOneOf, type context$2_ConditionValue as ConditionValue, type context$2_ConditionValueValueOneOf as ConditionValueValueOneOf, type context$2_CreateInviteOptions as CreateInviteOptions, type context$2_CreateInviteRequest as CreateInviteRequest, type context$2_CreateInviteResponse as CreateInviteResponse, type context$2_CreateInviteResponseNonNullableFields as CreateInviteResponseNonNullableFields, type context$2_DependOnOperator as DependOnOperator, type context$2_EnvironmentCondition as EnvironmentCondition, type context$2_EnvironmentConditionConditionOneOf as EnvironmentConditionConditionOneOf, type context$2_EqualOperator as EqualOperator, type context$2_ExperimentCondition as ExperimentCondition, type context$2_ExperimentOperator as ExperimentOperator, type context$2_FullNameResource as FullNameResource, type context$2_FullNameResourceResourceContextOneOf as FullNameResourceResourceContextOneOf, type context$2_GetAccountInviteRequest as GetAccountInviteRequest, type context$2_GetAccountInviteResponse as GetAccountInviteResponse, type context$2_GetAccountInvitesRequest as GetAccountInvitesRequest, type context$2_GetAccountInvitesResponse as GetAccountInvitesResponse, type context$2_InviteAssignment as InviteAssignment, type context$2_InviteFailure as InviteFailure, type context$2_InviteResourceAssignment as InviteResourceAssignment, InviteStatus$2 as InviteStatus, type context$2_JoinedCondition as JoinedCondition, context$2_JoinedConditionOperator as JoinedConditionOperator, type context$2_LikeOperator as LikeOperator, type context$2_OrganizationResourceContext as OrganizationResourceContext, type context$2_ParseAccountInviteTokenRequest as ParseAccountInviteTokenRequest, type context$2_ParseAccountInviteTokenResponse as ParseAccountInviteTokenResponse, type context$2_PolicyCondition as PolicyCondition, type context$2_ResendAccountInviteRequest as ResendAccountInviteRequest, type Resource$1 as Resource, type context$2_RevokeAccountInviteRequest as RevokeAccountInviteRequest, type context$2_RevokeAccountInviteResponse as RevokeAccountInviteResponse, type context$2_SimpleCondition as SimpleCondition, context$2_SimpleConditionOperator as SimpleConditionOperator, type context$2_SimpleConditionValue as SimpleConditionValue, type context$2_SimpleConditionValueValueOneOf as SimpleConditionValueValueOneOf, type context$2_SiteResourceContext as SiteResourceContext, type Subject$1 as Subject, type SubjectContext$1 as SubjectContext, SubjectContextType$1 as SubjectContextType, type context$2_SubjectInviteAssignments as SubjectInviteAssignments, SubjectType$1 as SubjectType, type context$2_UpdateAccountInviteAssignmentsRequest as UpdateAccountInviteAssignmentsRequest, type context$2_UpdateAccountInviteAssignmentsResponse as UpdateAccountInviteAssignmentsResponse, type context$2_UpdateAccountInviteRequest as UpdateAccountInviteRequest, type context$2_UpdateAccountInviteResponse as UpdateAccountInviteResponse, context$2_createInvite as createInvite };
1460
+ }
1461
+
1462
+ interface SiteInvite$1 {
1463
+ /**
1464
+ * Invite ID.
1465
+ * @readonly
1466
+ */
1467
+ _id?: string;
1468
+ /**
1469
+ * Site ID the user is invited to as a collaborator.
1470
+ * @readonly
1471
+ */
1472
+ siteId?: string;
1473
+ /** Email address where the invite was sent. */
1474
+ email?: string;
1475
+ /** Role IDs included in the invite. */
1476
+ policyIds?: string[];
1477
+ /**
1478
+ * Deprecated. Use `inviterAccountId`.
1479
+ * @readonly
1480
+ * @deprecated
1481
+ */
1482
+ inviterId?: string;
1483
+ /**
1484
+ * Invite Status.
1485
+ *
1486
+ * Supported values:
1487
+ * - **Pending:** The invite has been sent and is valid, waiting for the user's response.
1488
+ * - **Used:** The invite has been accepted.
1489
+ * - **Deleted:** The invite has been deleted or revoked.
1490
+ * - **Declined:** The user declined the invite.
1491
+ * - **Expired:** The invite has expired without being accepted.
1492
+ */
1493
+ status?: InviteStatus$1;
1494
+ /** Link to accept the invite. */
1495
+ acceptLink?: string;
1496
+ /**
1497
+ * Inviting account ID.
1498
+ * @readonly
1499
+ */
1500
+ inviterAccountId?: string;
1501
+ /**
1502
+ * Account ID that accepted the invite. Populated only once the invite is accepted.
1503
+ * @readonly
1504
+ */
1505
+ acceptedByAccountId?: string | null;
1506
+ /** Date the invite was created. */
1507
+ dateCreated?: Date | null;
1508
+ /** User's Wix Bookings staff ID, if relevant. */
1509
+ staffId?: string | null;
1510
+ /** Invite expiration date */
1511
+ expirationDate?: Date | null;
1512
+ }
1513
+ /** Invite status stating whether the invite was accepted, waiting to be accepted, deleted etc.. */
1514
+ declare enum InviteStatus$1 {
1515
+ Pending = "Pending",
1516
+ Used = "Used",
1517
+ Deleted = "Deleted",
1518
+ Declined = "Declined",
1519
+ Expired = "Expired"
1520
+ }
1521
+ interface GetSiteInvitesRequest {
1522
+ }
1523
+ interface GetSiteInvitesResponse {
1524
+ invites?: SiteInvite$1[];
1525
+ }
1526
+ interface QuerySiteInvitesRequest {
1527
+ /**
1528
+ * Supports only `filter` field with
1529
+ * `"filter" : {
1530
+ * "acceptedByAccountId":{"$in": [<id1>, <id2>, ...]}
1531
+ * }`
1532
+ */
1533
+ query?: QueryV2;
1534
+ }
1535
+ interface QueryV2 extends QueryV2PagingMethodOneOf {
1536
+ /** Paging options to limit and skip the number of items. */
1537
+ paging?: Paging;
1538
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
1539
+ cursorPaging?: CursorPaging;
1540
+ /**
1541
+ * Filter object.
1542
+ *
1543
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
1544
+ */
1545
+ filter?: Record<string, any> | null;
1546
+ /**
1547
+ * Sort object.
1548
+ *
1549
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
1550
+ */
1551
+ sort?: Sorting[];
1552
+ /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
1553
+ fields?: string[];
1554
+ /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
1555
+ fieldsets?: string[];
1556
+ }
1557
+ /** @oneof */
1558
+ interface QueryV2PagingMethodOneOf {
1559
+ /** Paging options to limit and skip the number of items. */
1560
+ paging?: Paging;
1561
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
1562
+ cursorPaging?: CursorPaging;
1563
+ }
1564
+ interface Sorting {
1565
+ /** Name of the field to sort by. */
1566
+ fieldName?: string;
1567
+ /** Sort order. */
1568
+ order?: SortOrder;
1569
+ }
1570
+ declare enum SortOrder {
1571
+ ASC = "ASC",
1572
+ DESC = "DESC"
1573
+ }
1574
+ interface Paging {
1575
+ /** Number of items to load. */
1576
+ limit?: number | null;
1577
+ /** Number of items to skip in the current sort order. */
1578
+ offset?: number | null;
1579
+ }
1580
+ interface CursorPaging {
1581
+ /** Maximum number of items to return in the results. */
1582
+ limit?: number | null;
1583
+ /**
1584
+ * Pointer to the next or previous page in the list of results.
1585
+ *
1586
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1587
+ * Not relevant for the first request.
1588
+ */
1589
+ cursor?: string | null;
1590
+ }
1591
+ interface QuerySiteInvitesResponse {
1592
+ invites?: SiteInvite$1[];
1593
+ }
1594
+ interface GetSiteInviteRequest {
1595
+ _id?: string;
1596
+ }
1597
+ interface GetSiteInviteResponse {
1598
+ invite?: SiteInvite$1;
1599
+ }
1600
+ interface SiteInviteRequest {
1601
+ /** The role ids to be assigned */
1602
+ policyIds?: string[];
1603
+ /** Invitee email */
1604
+ email?: string;
1605
+ /** The language of emails that will be used only for recipients that don't have a user, in case this parameter is unspecified, the sender's language will be used instead */
1606
+ defaultEmailLanguage?: string | null;
1607
+ }
1608
+ interface SiteInviteResponse {
1609
+ /** Invites that were sent. */
1610
+ invite?: SiteInvite$1;
1611
+ }
1612
+ interface BulkSiteInviteRequest {
1613
+ /** Role IDs, referred to as policy IDs, to assign to the contributors. */
1614
+ policyIds: string[];
1615
+ /** Email addresses to which the invites should be sent. */
1616
+ emails: string[];
1617
+ /** Details explaining the purpose of the invite. */
1618
+ invitePurpose?: string | null;
1619
+ /** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
1620
+ defaultEmailLanguage?: string | null;
1621
+ }
1622
+ interface BulkSiteInviteResponse {
1623
+ /** Invites that were sent successfully. */
1624
+ invites?: SiteInvite$1[];
1625
+ /** Invites that failed. */
1626
+ failedEmails?: string[];
1627
+ }
1628
+ interface ResendSiteInviteRequest {
1629
+ /** Invite ID. */
1630
+ inviteId: string;
1631
+ /** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
1632
+ defaultEmailLanguage?: string | null;
1633
+ }
1634
+ interface AcceptSiteInviteRequest {
1635
+ inviteToken?: string;
1636
+ }
1637
+ interface AcceptSiteInviteResponse {
1638
+ }
1639
+ interface RevokeSiteInviteRequest {
1640
+ /** Invite ID. */
1641
+ inviteId: string;
1642
+ }
1643
+ interface RevokeSiteInviteResponse {
1644
+ }
1645
+ interface UpdateSiteInviteRequest {
1646
+ inviteId?: string;
1647
+ policyIds?: string[];
1648
+ staffId?: string | null;
1649
+ }
1650
+ interface UpdateSiteInviteResponse {
1651
+ }
1652
+ interface GetContributorLimitRequest {
1653
+ }
1654
+ interface GetContributorLimitResponse {
1655
+ contributorLimitation?: ContributorLimitation;
1656
+ }
1657
+ interface ContributorLimitation {
1658
+ contributorLimit?: number;
1659
+ leftInvites?: number;
1660
+ }
1661
+ interface ParseSiteInviteTokenRequest {
1662
+ inviteToken?: string;
1663
+ }
1664
+ interface ParseSiteInviteTokenResponse {
1665
+ inviteId?: string;
1666
+ siteId?: string;
1667
+ status?: InviteStatus$1;
1668
+ }
1669
+ interface SiteInviteNonNullableFields {
1670
+ _id: string;
1671
+ siteId: string;
1672
+ email: string;
1673
+ policyIds: string[];
1674
+ inviterId: string;
1675
+ status: InviteStatus$1;
1676
+ acceptLink: string;
1677
+ inviterAccountId: string;
1678
+ }
1679
+ interface BulkSiteInviteResponseNonNullableFields {
1680
+ invites: SiteInviteNonNullableFields[];
1681
+ failedEmails: string[];
1682
+ }
1683
+ interface SiteInviteResponseNonNullableFields {
1684
+ invite?: SiteInviteNonNullableFields;
1685
+ }
1686
+ interface BulkInviteOptions {
1687
+ /** Email addresses to which the invites should be sent. */
1688
+ emails: string[];
1689
+ /** Details explaining the purpose of the invite. */
1690
+ invitePurpose?: string | null;
1691
+ /** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
1692
+ defaultEmailLanguage?: string | null;
1693
+ }
1694
+ interface ResendInviteOptions {
1695
+ /** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
1696
+ defaultEmailLanguage?: string | null;
1697
+ }
1698
+
1699
+ declare function bulkInvite$1(httpClient: HttpClient): BulkInviteSignature;
1700
+ interface BulkInviteSignature {
1701
+ /**
1702
+ * Creates and sends emails inviting potential site contributors to become contributors in the requesting site.
1703
+ * > **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.
1704
+ * @param - Role IDs, referred to as policy IDs, to assign to the contributors.
1705
+ * @param - Filter options.
1706
+ */
1707
+ (policyIds: string[], options?: BulkInviteOptions | undefined): Promise<BulkSiteInviteResponse & BulkSiteInviteResponseNonNullableFields>;
1708
+ }
1709
+ declare function resendInvite$1(httpClient: HttpClient): ResendInviteSignature;
1710
+ interface ResendInviteSignature {
1711
+ /**
1712
+ * Resends the email invitation to a potential site contributor.
1713
+ * > **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.
1714
+ * @param - Invite ID.
1715
+ * @param - Filter options.
1716
+ */
1717
+ (inviteId: string, options?: ResendInviteOptions | undefined): Promise<SiteInviteResponse & SiteInviteResponseNonNullableFields>;
1718
+ }
1719
+ declare function revokeInvite$1(httpClient: HttpClient): RevokeInviteSignature;
1720
+ interface RevokeInviteSignature {
1721
+ /**
1722
+ * Revokes a pending site contributor invite.
1723
+ * > **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.
1724
+ * @param - Invite ID.
1725
+ */
1726
+ (inviteId: string): Promise<void>;
1727
+ }
1728
+
1729
+ declare const bulkInvite: MaybeContext<BuildRESTFunction<typeof bulkInvite$1> & typeof bulkInvite$1>;
1730
+ declare const resendInvite: MaybeContext<BuildRESTFunction<typeof resendInvite$1> & typeof resendInvite$1>;
1731
+ declare const revokeInvite: MaybeContext<BuildRESTFunction<typeof revokeInvite$1> & typeof revokeInvite$1>;
1732
+
1733
+ type context$1_AcceptSiteInviteRequest = AcceptSiteInviteRequest;
1734
+ type context$1_AcceptSiteInviteResponse = AcceptSiteInviteResponse;
1735
+ type context$1_BulkInviteOptions = BulkInviteOptions;
1736
+ type context$1_BulkSiteInviteRequest = BulkSiteInviteRequest;
1737
+ type context$1_BulkSiteInviteResponse = BulkSiteInviteResponse;
1738
+ type context$1_BulkSiteInviteResponseNonNullableFields = BulkSiteInviteResponseNonNullableFields;
1739
+ type context$1_ContributorLimitation = ContributorLimitation;
1740
+ type context$1_CursorPaging = CursorPaging;
1741
+ type context$1_GetContributorLimitRequest = GetContributorLimitRequest;
1742
+ type context$1_GetContributorLimitResponse = GetContributorLimitResponse;
1743
+ type context$1_GetSiteInviteRequest = GetSiteInviteRequest;
1744
+ type context$1_GetSiteInviteResponse = GetSiteInviteResponse;
1745
+ type context$1_GetSiteInvitesRequest = GetSiteInvitesRequest;
1746
+ type context$1_GetSiteInvitesResponse = GetSiteInvitesResponse;
1747
+ type context$1_Paging = Paging;
1748
+ type context$1_ParseSiteInviteTokenRequest = ParseSiteInviteTokenRequest;
1749
+ type context$1_ParseSiteInviteTokenResponse = ParseSiteInviteTokenResponse;
1750
+ type context$1_QuerySiteInvitesRequest = QuerySiteInvitesRequest;
1751
+ type context$1_QuerySiteInvitesResponse = QuerySiteInvitesResponse;
1752
+ type context$1_QueryV2 = QueryV2;
1753
+ type context$1_QueryV2PagingMethodOneOf = QueryV2PagingMethodOneOf;
1754
+ type context$1_ResendInviteOptions = ResendInviteOptions;
1755
+ type context$1_ResendSiteInviteRequest = ResendSiteInviteRequest;
1756
+ type context$1_RevokeSiteInviteRequest = RevokeSiteInviteRequest;
1757
+ type context$1_RevokeSiteInviteResponse = RevokeSiteInviteResponse;
1758
+ type context$1_SiteInviteRequest = SiteInviteRequest;
1759
+ type context$1_SiteInviteResponse = SiteInviteResponse;
1760
+ type context$1_SiteInviteResponseNonNullableFields = SiteInviteResponseNonNullableFields;
1761
+ type context$1_SortOrder = SortOrder;
1762
+ declare const context$1_SortOrder: typeof SortOrder;
1763
+ type context$1_Sorting = Sorting;
1764
+ type context$1_UpdateSiteInviteRequest = UpdateSiteInviteRequest;
1765
+ type context$1_UpdateSiteInviteResponse = UpdateSiteInviteResponse;
1766
+ declare const context$1_bulkInvite: typeof bulkInvite;
1767
+ declare const context$1_resendInvite: typeof resendInvite;
1768
+ declare const context$1_revokeInvite: typeof revokeInvite;
1769
+ declare namespace context$1 {
1770
+ export { type context$1_AcceptSiteInviteRequest as AcceptSiteInviteRequest, type context$1_AcceptSiteInviteResponse as AcceptSiteInviteResponse, type context$1_BulkInviteOptions as BulkInviteOptions, type context$1_BulkSiteInviteRequest as BulkSiteInviteRequest, type context$1_BulkSiteInviteResponse as BulkSiteInviteResponse, type context$1_BulkSiteInviteResponseNonNullableFields as BulkSiteInviteResponseNonNullableFields, type context$1_ContributorLimitation as ContributorLimitation, type context$1_CursorPaging as CursorPaging, type context$1_GetContributorLimitRequest as GetContributorLimitRequest, type context$1_GetContributorLimitResponse as GetContributorLimitResponse, type context$1_GetSiteInviteRequest as GetSiteInviteRequest, type context$1_GetSiteInviteResponse as GetSiteInviteResponse, type context$1_GetSiteInvitesRequest as GetSiteInvitesRequest, type context$1_GetSiteInvitesResponse as GetSiteInvitesResponse, InviteStatus$1 as InviteStatus, type context$1_Paging as Paging, type context$1_ParseSiteInviteTokenRequest as ParseSiteInviteTokenRequest, type context$1_ParseSiteInviteTokenResponse as ParseSiteInviteTokenResponse, type context$1_QuerySiteInvitesRequest as QuerySiteInvitesRequest, type context$1_QuerySiteInvitesResponse as QuerySiteInvitesResponse, type context$1_QueryV2 as QueryV2, type context$1_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type context$1_ResendInviteOptions as ResendInviteOptions, type context$1_ResendSiteInviteRequest as ResendSiteInviteRequest, type context$1_RevokeSiteInviteRequest as RevokeSiteInviteRequest, type context$1_RevokeSiteInviteResponse as RevokeSiteInviteResponse, type SiteInvite$1 as SiteInvite, type context$1_SiteInviteRequest as SiteInviteRequest, type context$1_SiteInviteResponse as SiteInviteResponse, type context$1_SiteInviteResponseNonNullableFields as SiteInviteResponseNonNullableFields, context$1_SortOrder as SortOrder, type context$1_Sorting as Sorting, type context$1_UpdateSiteInviteRequest as UpdateSiteInviteRequest, type context$1_UpdateSiteInviteResponse as UpdateSiteInviteResponse, context$1_bulkInvite as bulkInvite, context$1_resendInvite as resendInvite, context$1_revokeInvite as revokeInvite };
1771
+ }
1772
+
1773
+ interface Contributor {
1774
+ /** Contributor's metadata. */
1775
+ metaData?: PersonMetaData;
1776
+ /** Whether the contributor account is a team account. */
1777
+ isTeam?: boolean | null;
1778
+ /** Date that the contributor joined the site. */
1779
+ joinedAt?: Date | null;
1780
+ /** Email address that received the invite. */
1781
+ invitedEmail?: string | null;
1782
+ /** Whether the contributor account is a client account. */
1783
+ isClient?: boolean | null;
1784
+ /**
1785
+ * Contributor's user ID.
1786
+ * @readonly
1787
+ */
1788
+ _id?: string;
1789
+ }
1790
+ interface PersonMetaData {
1791
+ /** Contributor's account ID. */
1792
+ _id?: string;
1793
+ /** Contributor's full name. */
1794
+ fullName?: string | null;
1795
+ /** URL for contributor's profile image. */
1796
+ imageUrl?: string | null;
1797
+ /** Contributor's email address. */
1798
+ email?: string | null;
1799
+ /** Contributor's access to assets and their assigned role (`policy`) for that asset. */
1800
+ assignments?: Assignment[];
1801
+ }
1802
+ interface Assignment {
1803
+ /** Role assigned to the user. */
1804
+ policy?: AssignedPolicy;
1805
+ /** Unique ID for this specific assignment. */
1806
+ assignmentId?: string;
1807
+ /** Identity assigned to the asset in an assignment, referred to as subject. Supported subjects include user IDs, account IDs, and app IDs. */
1808
+ subject?: Subject;
1809
+ }
1810
+ interface AssignedPolicy {
1811
+ /** Role ID. */
1812
+ policyId?: string;
1813
+ /** Role title. */
1814
+ title?: string | null;
1815
+ /** Role description. */
1816
+ description?: string | null;
1817
+ }
1818
+ interface Restriction extends RestrictionRestrictionsOneOf {
1819
+ /**
1820
+ * Deprecated.
1821
+ * @deprecated
1822
+ */
1823
+ resource?: Resource;
1824
+ /** List of conditions restricting the user's access. Currently only folder conditions are supported. */
1825
+ conditions?: Conditions;
1826
+ /** Site where the assignment restrictions apply. */
1827
+ site?: SiteRestriction;
1828
+ }
1829
+ /** @oneof */
1830
+ interface RestrictionRestrictionsOneOf {
1831
+ /**
1832
+ * Deprecated.
1833
+ * @deprecated
1834
+ */
1835
+ resource?: Resource;
1836
+ /** List of conditions restricting the user's access. Currently only folder conditions are supported. */
1837
+ conditions?: Conditions;
1838
+ /** Site where the assignment restrictions apply. */
1839
+ site?: SiteRestriction;
1840
+ }
1841
+ interface Resource {
1842
+ /** Resource type. */
1843
+ resourceType?: ResourceType;
1844
+ /** Resource ID. */
1845
+ _id?: string;
1846
+ value?: string | null;
1847
+ }
1848
+ declare enum ResourceType {
1849
+ UNKNOWN_RESOURCE_TYPE = "UNKNOWN_RESOURCE_TYPE",
1850
+ SITE = "SITE"
1851
+ }
1852
+ interface Conditions {
1853
+ /** List of conditions. */
1854
+ conditions?: Condition[];
1855
+ }
1856
+ interface Condition {
1857
+ /** Condition type. */
1858
+ conditionType?: ConditionAttributeType;
1859
+ /** Condition ID. */
1860
+ _id?: string;
1861
+ /** Expected value of the condition. When `conditionType` = "FOLDER", this is the folder path. */
1862
+ value?: string | null;
1863
+ }
1864
+ declare enum ConditionAttributeType {
1865
+ UNKNOWN_CONDITION_TYPE = "UNKNOWN_CONDITION_TYPE",
1866
+ FOLDER = "FOLDER"
1867
+ }
1868
+ interface SiteRestriction {
1869
+ /** Site ID. */
1870
+ _id?: string;
1871
+ /** Site name. */
1872
+ value?: string | null;
1873
+ }
1874
+ interface CompanionResource {
1875
+ /** Asset ID (referred to here as resource ID). */
1876
+ _id?: string;
1877
+ /** Asset type (referred to here as resource type). as predefined in the authorization system */
1878
+ resourceType?: string;
1879
+ }
1880
+ interface Subject {
1881
+ /** ID of identity assigned to the asset. */
1882
+ _id?: string;
1883
+ /** Type of identity assigned to the asset. Supported subject types include user IDs, account IDs, and app IDs. */
1884
+ subjectType?: SubjectType;
1885
+ /** Context of identity assigned to the asset. For example, a `subjectType` = `USER` will have `context` = `ACCOUNT`. */
1886
+ context?: SubjectContext;
1887
+ }
1888
+ declare enum SubjectType {
1889
+ UNKNOWN = "UNKNOWN",
1890
+ ACCOUNT = "ACCOUNT",
1891
+ USER = "USER",
1892
+ USER_GROUP = "USER_GROUP",
1893
+ MEMBER_GROUP = "MEMBER_GROUP",
1894
+ VISITOR_GROUP = "VISITOR_GROUP",
1895
+ EXTERNAL_APP = "EXTERNAL_APP",
1896
+ ACCOUNT_GROUP = "ACCOUNT_GROUP",
1897
+ WIX_APP = "WIX_APP"
1898
+ }
1899
+ interface SubjectContext {
1900
+ _id?: string;
1901
+ contextType?: SubjectContextType;
1902
+ }
1903
+ declare enum SubjectContextType {
1904
+ UNKNOWN_CTX = "UNKNOWN_CTX",
1905
+ ORG_CTX = "ORG_CTX",
1906
+ ACCOUNT_CTX = "ACCOUNT_CTX"
1907
+ }
1908
+ interface GetAppContributorsRequest {
1909
+ appId?: string;
1910
+ /** The locale of the request. Defaults to en-us. */
1911
+ locale?: string | null;
1912
+ }
1913
+ interface GetAppContributorsResponse {
1914
+ contributors?: Contributor[];
1915
+ invites?: AppInvite[];
1916
+ }
1917
+ interface AppInvite {
1918
+ /** @readonly */
1919
+ _id?: string;
1920
+ /** TODO: amitis - remove this comment after the next merge */
1921
+ destEmail?: string;
1922
+ /** @readonly */
1923
+ status?: string;
1924
+ /** @readonly */
1925
+ acceptLink?: string;
1926
+ invitePurpose?: string | null;
1927
+ policies?: AssignedPolicy[];
1928
+ /** @readonly */
1929
+ expirationDate?: Date | null;
1930
+ /** @readonly */
1931
+ dateCreated?: Date | null;
1932
+ /** @readonly */
1933
+ dateUpdated?: Date | null;
1934
+ }
1935
+ interface GetSiteContributorsRequest {
1936
+ /** The locale of the request. Defaults to en-us */
1937
+ locale?: string | null;
1938
+ }
1939
+ interface GetSiteContributorsResponse {
1940
+ users?: User[];
1941
+ teams?: Team[];
1942
+ invites?: SiteInvite[];
1943
+ policies?: Policy[];
1944
+ permissions?: string[];
1945
+ userId?: string;
1946
+ loggedInAccountId?: string;
1947
+ pendingOwner?: PendingOwner;
1948
+ contributorLimit?: ContributorLimit;
1949
+ predefinedRoles?: PredefinedRoles;
1950
+ }
1951
+ interface User {
1952
+ /** User ID. */
1953
+ _id?: string;
1954
+ /**
1955
+ * Deprecated.
1956
+ * @deprecated
1957
+ */
1958
+ roles?: string[];
1959
+ /** User's email address. */
1960
+ email?: string;
1961
+ /** User's name. */
1962
+ name?: Name;
1963
+ /** URL to user's profile image, when provided. */
1964
+ profileImage?: string | null;
1965
+ /** Date the user joined the team. */
1966
+ joinedTeamAt?: Date | null;
1967
+ /**
1968
+ * Deprecated.
1969
+ * @deprecated
1970
+ */
1971
+ policyIds?: string[];
1972
+ /** Resources the user can access. */
1973
+ assignments?: Assignment[];
1974
+ }
1975
+ interface Name {
1976
+ /** User's first name. */
1977
+ firstName?: string;
1978
+ /** User's last name. */
1979
+ lastName?: string;
1980
+ }
1981
+ interface Team {
1982
+ accountId?: string;
1983
+ accountInfo?: AccountInfo;
1984
+ policyIds?: string[];
1985
+ joinedAt?: Date | null;
1986
+ }
1987
+ interface AccountInfo {
1988
+ accountName?: string;
1989
+ accountImage?: string;
1990
+ isTeam?: boolean;
1991
+ }
1992
+ interface SiteInvite {
1993
+ /**
1994
+ * Invite ID.
1995
+ * @readonly
1996
+ */
1997
+ _id?: string;
1998
+ /**
1999
+ * Site ID the user is invited to as a collaborator.
2000
+ * @readonly
2001
+ */
2002
+ siteId?: string;
2003
+ /** Email address where the invite was sent. */
2004
+ email?: string;
2005
+ /** Role IDs included in the invite. */
2006
+ policyIds?: string[];
2007
+ /**
2008
+ * Deprecated. Use `inviterAccountId`.
2009
+ * @readonly
2010
+ * @deprecated
2011
+ */
2012
+ inviterId?: string;
2013
+ /**
2014
+ * Invite Status.
2015
+ *
2016
+ * Supported values:
2017
+ * - **Pending:** The invite has been sent and is valid, waiting for the user's response.
2018
+ * - **Used:** The invite has been accepted.
2019
+ * - **Deleted:** The invite has been deleted or revoked.
2020
+ * - **Declined:** The user declined the invite.
2021
+ * - **Expired:** The invite has expired without being accepted.
2022
+ */
2023
+ status?: InviteStatus;
2024
+ /** Link to accept the invite. */
2025
+ acceptLink?: string;
2026
+ /**
2027
+ * Inviting account ID.
2028
+ * @readonly
2029
+ */
2030
+ inviterAccountId?: string;
2031
+ /**
2032
+ * Account ID that accepted the invite. Populated only once the invite is accepted.
2033
+ * @readonly
2034
+ */
2035
+ acceptedByAccountId?: string | null;
2036
+ /** Date the invite was created. */
2037
+ dateCreated?: Date | null;
2038
+ /** User's Wix Bookings staff ID, if relevant. */
2039
+ staffId?: string | null;
2040
+ /** Invite expiration date */
2041
+ expirationDate?: Date | null;
2042
+ }
2043
+ /** Invite status stating whether the invite was accepted, waiting to be accepted, deleted etc.. */
2044
+ declare enum InviteStatus {
2045
+ Pending = "Pending",
2046
+ Used = "Used",
2047
+ Deleted = "Deleted",
2048
+ Declined = "Declined",
2049
+ Expired = "Expired"
2050
+ }
2051
+ interface Policy {
2052
+ _id?: string;
2053
+ description?: string | null;
2054
+ name?: string | null;
2055
+ isCustom?: boolean;
2056
+ scopes?: string[];
2057
+ }
2058
+ interface PendingOwner {
2059
+ email?: string;
2060
+ expirationDate?: Date | null;
2061
+ acceptLink?: string;
2062
+ }
2063
+ interface ContributorLimit {
2064
+ contributorLimit?: number;
2065
+ }
2066
+ interface PredefinedRoles {
2067
+ roles?: PredefinedRole[];
2068
+ }
2069
+ interface PredefinedRole {
2070
+ titleKey?: string;
2071
+ roles?: Role[];
2072
+ title?: string | null;
2073
+ areaId?: string;
2074
+ }
2075
+ interface Role {
2076
+ _id?: string;
2077
+ deprecatedKey?: string;
2078
+ /** @deprecated */
2079
+ titleKey?: string;
2080
+ /** @deprecated */
2081
+ descriptionKey?: string;
2082
+ deprecated?: boolean;
2083
+ restrictFromLevel?: string;
2084
+ experiments?: string[];
2085
+ appDefIds?: string[];
2086
+ title?: string | null;
2087
+ description?: string | null;
2088
+ isCustom?: boolean;
2089
+ scopes?: string[];
2090
+ availableResourceTypes?: ResourceType[];
2091
+ availableConditions?: ConditionAttributeType[];
2092
+ limitToEditorTypes?: string[];
2093
+ }
2094
+ interface GetSiteContributorsV2Request {
2095
+ /** The locale of the request. Defaults to en-us. */
2096
+ locale?: string | null;
2097
+ }
2098
+ interface GetSiteContributorsV2Response {
2099
+ /** List of contributors of the given site. */
2100
+ contributors?: Contributor[];
2101
+ /** List of invites to contribute to the given site. */
2102
+ invites?: SiteInvite[];
2103
+ /** Quota information for contributors on the given site. */
2104
+ contributorsQuota?: ContributorsQuota;
2105
+ }
2106
+ interface ContributorsQuota extends ContributorsQuotaOptionsOneOf {
2107
+ /** Limited contributors quota details. */
2108
+ limitedOptions?: LimitedOptions;
2109
+ /** Type of contributors quota */
2110
+ type?: Type;
2111
+ }
2112
+ /** @oneof */
2113
+ interface ContributorsQuotaOptionsOneOf {
2114
+ /** Limited contributors quota details. */
2115
+ limitedOptions?: LimitedOptions;
2116
+ }
2117
+ /** Enum to represent different types of contributors quota. */
2118
+ declare enum Type {
2119
+ UNKNOWN = "UNKNOWN",
2120
+ LIMITED = "LIMITED",
2121
+ UNLIMITED = "UNLIMITED"
2122
+ }
2123
+ /** Details for a limited contributors quota. */
2124
+ interface LimitedOptions {
2125
+ /** Maximum number of contributors allowed. */
2126
+ limit?: number;
2127
+ /** Number of accepted or pending invitations. */
2128
+ used?: number;
2129
+ }
2130
+ interface HandleSiteTransferRequest {
2131
+ originalOwnerAccountId?: string;
2132
+ newOwnerAccountId?: string;
2133
+ metaSiteId?: string;
2134
+ keepOriginalOwnerAsContributor?: boolean;
2135
+ }
2136
+ interface HandleSiteTransferResponse {
2137
+ }
2138
+ interface GetCurrentUserRolesRequest {
2139
+ /** The locale of the request. Defaults to en-us */
2140
+ locale?: string | null;
2141
+ }
2142
+ interface GetCurrentUserRolesResponse {
2143
+ roles?: LocalizedRole[];
2144
+ }
2145
+ interface LocalizedRole {
2146
+ name?: string;
2147
+ description?: string | null;
2148
+ }
2149
+ interface BulkGetUserRolesOnSiteRequest {
2150
+ users?: UserSubject[];
2151
+ /** The locale of the request. Defaults to en-us */
2152
+ locale?: string | null;
2153
+ }
2154
+ interface UserSubject {
2155
+ userId?: string;
2156
+ accountId?: string;
2157
+ }
2158
+ interface BulkGetUserRolesOnSiteResponse {
2159
+ userRoles?: UserLocalizedRoles[];
2160
+ }
2161
+ interface UserLocalizedRoles {
2162
+ user?: UserSubject;
2163
+ roles?: LocalizedRole[];
2164
+ }
2165
+ interface ChangeContributorRoleRequest {
2166
+ /** Contributor's account ID. */
2167
+ accountId: string;
2168
+ /** New roles to assign to the contributor on the site. */
2169
+ newRoles: SiteRoleAssignment[];
2170
+ }
2171
+ interface SiteRoleAssignment {
2172
+ /** 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. */
2173
+ roleId?: string;
2174
+ /**
2175
+ * Assignment ID mapping the role to the contributor on the site.
2176
+ * @readonly
2177
+ */
2178
+ assignmentId?: string;
2179
+ }
2180
+ interface ChangeContributorRoleResponse {
2181
+ /** New roles assigned to the contributor on the site. */
2182
+ newAssignedRoles?: SiteRoleAssignment[];
2183
+ }
2184
+ interface QuerySiteContributorsRequest {
2185
+ filter?: QuerySiteContributorsFilter;
2186
+ }
2187
+ interface QuerySiteContributorsFilter {
2188
+ /** 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. */
2189
+ policyIds?: string[];
2190
+ }
2191
+ declare enum FieldSet {
2192
+ UNKNOWN = "UNKNOWN",
2193
+ /** Include only `account_id` and `account_owner_id` fields. */
2194
+ META_DATA = "META_DATA"
2195
+ }
2196
+ interface QuerySiteContributorsResponse {
2197
+ /** List of site contributors. */
2198
+ contributors?: ContributorV2[];
2199
+ }
2200
+ interface ContributorV2 {
2201
+ /** Contributor's account ID. */
2202
+ accountId?: string | null;
2203
+ /** User ID of the owner of the account that the contributor has joined. */
2204
+ accountOwnerId?: string | null;
2205
+ }
2206
+ interface GetContributorsQuotaRequest {
2207
+ }
2208
+ interface GetContributorsQuotaResponse {
2209
+ /** Quota information for contributors on the given site. */
2210
+ contributorsQuota?: ContributorsQuota;
2211
+ }
2212
+ interface SiteRoleAssignmentNonNullableFields {
2213
+ roleId: string;
2214
+ assignmentId: string;
2215
+ }
2216
+ interface ChangeContributorRoleResponseNonNullableFields {
2217
+ newAssignedRoles: SiteRoleAssignmentNonNullableFields[];
2218
+ }
2219
+ interface ChangeRoleOptions {
2220
+ /** New roles to assign to the contributor on the site. */
2221
+ newRoles: SiteRoleAssignment[];
2222
+ }
2223
+ interface QuerySiteContributorsOptions {
2224
+ filter?: QuerySiteContributorsFilter;
2225
+ }
2226
+
2227
+ declare function changeRole$1(httpClient: HttpClient): ChangeRoleSignature;
2228
+ interface ChangeRoleSignature {
2229
+ /**
2230
+ * Overrides all the roles of a contributor for the specified site.
2231
+ * @param - Contributor's account ID.
2232
+ * @param - Filter options. The `newRoles` field **must** be passed.
2233
+ */
2234
+ (accountId: string, options: ChangeRoleOptions): Promise<ChangeContributorRoleResponse & ChangeContributorRoleResponseNonNullableFields>;
2235
+ }
2236
+ declare function querySiteContributors$1(httpClient: HttpClient): QuerySiteContributorsSignature;
2237
+ interface QuerySiteContributorsSignature {
2238
+ /**
2239
+ * Retrieves a list of contributors for the specified site, given the provided filters.
2240
+ * @param - Filter options.
2241
+ */
2242
+ (options?: QuerySiteContributorsOptions | undefined): Promise<QuerySiteContributorsResponse>;
2243
+ }
2244
+
2245
+ declare const changeRole: MaybeContext<BuildRESTFunction<typeof changeRole$1> & typeof changeRole$1>;
2246
+ declare const querySiteContributors: MaybeContext<BuildRESTFunction<typeof querySiteContributors$1> & typeof querySiteContributors$1>;
2247
+
852
2248
  type context_AccountInfo = AccountInfo;
853
- type context_AccountProperties = AccountProperties;
854
- type context_AccountResponse = AccountResponse;
855
- type context_AccountStatus = AccountStatus;
856
- declare const context_AccountStatus: typeof AccountStatus;
857
- type context_AccountV2 = AccountV2;
858
- type context_AccountsResponse = AccountsResponse;
859
- type context_CoBranding = CoBranding;
860
- declare const context_CoBranding: typeof CoBranding;
861
- type context_CreateAccountAndAssignUserRequest = CreateAccountAndAssignUserRequest;
862
- type context_CreateAccountForMyUserRequest = CreateAccountForMyUserRequest;
863
- type context_CreateAccountOptions = CreateAccountOptions;
864
- type context_CreateAccountRequest = CreateAccountRequest;
865
- type context_CreateAccountResponse = CreateAccountResponse;
866
- type context_CreateAccountResponseNonNullableFields = CreateAccountResponseNonNullableFields;
867
- type context_CreateAccountTenantRequest = CreateAccountTenantRequest;
868
- type context_CreateAccountTenantResponse = CreateAccountTenantResponse;
869
- type context_DeleteAccountRequest = DeleteAccountRequest;
870
- type context_Email = Email;
871
- type context_EmptyResponse = EmptyResponse;
872
- type context_GetAccountRequest = GetAccountRequest;
873
- type context_GetAccountsRequest = GetAccountsRequest;
874
- type context_GetMyAccountRequest = GetMyAccountRequest;
875
- type context_GetMyUserAccountsRequest = GetMyUserAccountsRequest;
876
- type context_GetParentAccountInfoRequest = GetParentAccountInfoRequest;
877
- type context_GetParentAccountInfoResponse = GetParentAccountInfoResponse;
878
- type context_GetSubAccountsRequest = GetSubAccountsRequest;
879
- type context_GetSubAccountsResponse = GetSubAccountsResponse;
880
- type context_GetUserAccountRequest = GetUserAccountRequest;
881
- type context_GetUserAccountsRequest = GetUserAccountsRequest;
882
- type context_IsTeamRequest = IsTeamRequest;
883
- type context_IsTeamResponse = IsTeamResponse;
884
- type context_ListChildAccountsOptions = ListChildAccountsOptions;
885
- type context_ListChildAccountsRequest = ListChildAccountsRequest;
886
- type context_ListChildAccountsResponse = ListChildAccountsResponse;
887
- type context_ListChildAccountsResponseNonNullableFields = ListChildAccountsResponseNonNullableFields;
888
- type context_MarkAccountFlagRequest = MarkAccountFlagRequest;
889
- type context_MarkAccountFlagRequestFlagOneOf = MarkAccountFlagRequestFlagOneOf;
890
- type context_Paging = Paging;
891
- type context_PagingMetadata = PagingMetadata;
892
- type context_RemoveParent = RemoveParent;
893
- type context_SetIsReadOnlyAccountRequest = SetIsReadOnlyAccountRequest;
894
- type context_SsoIdentity = SsoIdentity;
895
- type context_SubAccountInfo = SubAccountInfo;
896
- type context_UpdateAccountRequest = UpdateAccountRequest;
897
- type context_UpdateParentAccountRequest = UpdateParentAccountRequest;
898
- type context_UpdateParentAccountRequestUpdateOneOf = UpdateParentAccountRequestUpdateOneOf;
899
- type context_UpdateParentAccountResponse = UpdateParentAccountResponse;
900
- type context_UpdateSlugRequest = UpdateSlugRequest;
2249
+ type context_AppInvite = AppInvite;
2250
+ type context_AssignedPolicy = AssignedPolicy;
2251
+ type context_Assignment = Assignment;
2252
+ type context_BulkGetUserRolesOnSiteRequest = BulkGetUserRolesOnSiteRequest;
2253
+ type context_BulkGetUserRolesOnSiteResponse = BulkGetUserRolesOnSiteResponse;
2254
+ type context_ChangeContributorRoleRequest = ChangeContributorRoleRequest;
2255
+ type context_ChangeContributorRoleResponse = ChangeContributorRoleResponse;
2256
+ type context_ChangeContributorRoleResponseNonNullableFields = ChangeContributorRoleResponseNonNullableFields;
2257
+ type context_ChangeRoleOptions = ChangeRoleOptions;
2258
+ type context_CompanionResource = CompanionResource;
2259
+ type context_Condition = Condition;
2260
+ type context_ConditionAttributeType = ConditionAttributeType;
2261
+ declare const context_ConditionAttributeType: typeof ConditionAttributeType;
2262
+ type context_Conditions = Conditions;
2263
+ type context_Contributor = Contributor;
2264
+ type context_ContributorLimit = ContributorLimit;
2265
+ type context_ContributorV2 = ContributorV2;
2266
+ type context_ContributorsQuota = ContributorsQuota;
2267
+ type context_ContributorsQuotaOptionsOneOf = ContributorsQuotaOptionsOneOf;
2268
+ type context_FieldSet = FieldSet;
2269
+ declare const context_FieldSet: typeof FieldSet;
2270
+ type context_GetAppContributorsRequest = GetAppContributorsRequest;
2271
+ type context_GetAppContributorsResponse = GetAppContributorsResponse;
2272
+ type context_GetContributorsQuotaRequest = GetContributorsQuotaRequest;
2273
+ type context_GetContributorsQuotaResponse = GetContributorsQuotaResponse;
2274
+ type context_GetCurrentUserRolesRequest = GetCurrentUserRolesRequest;
2275
+ type context_GetCurrentUserRolesResponse = GetCurrentUserRolesResponse;
2276
+ type context_GetSiteContributorsRequest = GetSiteContributorsRequest;
2277
+ type context_GetSiteContributorsResponse = GetSiteContributorsResponse;
2278
+ type context_GetSiteContributorsV2Request = GetSiteContributorsV2Request;
2279
+ type context_GetSiteContributorsV2Response = GetSiteContributorsV2Response;
2280
+ type context_HandleSiteTransferRequest = HandleSiteTransferRequest;
2281
+ type context_HandleSiteTransferResponse = HandleSiteTransferResponse;
2282
+ type context_InviteStatus = InviteStatus;
2283
+ declare const context_InviteStatus: typeof InviteStatus;
2284
+ type context_LimitedOptions = LimitedOptions;
2285
+ type context_LocalizedRole = LocalizedRole;
2286
+ type context_Name = Name;
2287
+ type context_PendingOwner = PendingOwner;
2288
+ type context_PersonMetaData = PersonMetaData;
2289
+ type context_Policy = Policy;
2290
+ type context_PredefinedRole = PredefinedRole;
2291
+ type context_PredefinedRoles = PredefinedRoles;
2292
+ type context_QuerySiteContributorsFilter = QuerySiteContributorsFilter;
2293
+ type context_QuerySiteContributorsOptions = QuerySiteContributorsOptions;
2294
+ type context_QuerySiteContributorsRequest = QuerySiteContributorsRequest;
2295
+ type context_QuerySiteContributorsResponse = QuerySiteContributorsResponse;
2296
+ type context_Resource = Resource;
2297
+ type context_ResourceType = ResourceType;
2298
+ declare const context_ResourceType: typeof ResourceType;
2299
+ type context_Restriction = Restriction;
2300
+ type context_RestrictionRestrictionsOneOf = RestrictionRestrictionsOneOf;
2301
+ type context_Role = Role;
2302
+ type context_SiteInvite = SiteInvite;
2303
+ type context_SiteRestriction = SiteRestriction;
2304
+ type context_SiteRoleAssignment = SiteRoleAssignment;
2305
+ type context_Subject = Subject;
2306
+ type context_SubjectContext = SubjectContext;
2307
+ type context_SubjectContextType = SubjectContextType;
2308
+ declare const context_SubjectContextType: typeof SubjectContextType;
2309
+ type context_SubjectType = SubjectType;
2310
+ declare const context_SubjectType: typeof SubjectType;
2311
+ type context_Team = Team;
2312
+ type context_Type = Type;
2313
+ declare const context_Type: typeof Type;
901
2314
  type context_User = User;
902
- type context_UserDetails = UserDetails;
903
- declare const context_createAccount: typeof createAccount;
904
- declare const context_listChildAccounts: typeof listChildAccounts;
2315
+ type context_UserLocalizedRoles = UserLocalizedRoles;
2316
+ type context_UserSubject = UserSubject;
2317
+ declare const context_changeRole: typeof changeRole;
2318
+ declare const context_querySiteContributors: typeof querySiteContributors;
905
2319
  declare namespace context {
906
- export { type context_Account as Account, type context_AccountInfo as AccountInfo, type context_AccountProperties as AccountProperties, type context_AccountResponse as AccountResponse, context_AccountStatus as AccountStatus, type context_AccountV2 as AccountV2, type context_AccountsResponse as AccountsResponse, context_CoBranding as CoBranding, type context_CreateAccountAndAssignUserRequest as CreateAccountAndAssignUserRequest, type context_CreateAccountForMyUserRequest as CreateAccountForMyUserRequest, type context_CreateAccountOptions as CreateAccountOptions, type context_CreateAccountRequest as CreateAccountRequest, type context_CreateAccountResponse as CreateAccountResponse, type context_CreateAccountResponseNonNullableFields as CreateAccountResponseNonNullableFields, type context_CreateAccountTenantRequest as CreateAccountTenantRequest, type context_CreateAccountTenantResponse as CreateAccountTenantResponse, type context_DeleteAccountRequest as DeleteAccountRequest, type context_Email as Email, type context_EmptyResponse as EmptyResponse, type context_GetAccountRequest as GetAccountRequest, type context_GetAccountsRequest as GetAccountsRequest, type context_GetMyAccountRequest as GetMyAccountRequest, type context_GetMyUserAccountsRequest as GetMyUserAccountsRequest, type context_GetParentAccountInfoRequest as GetParentAccountInfoRequest, type context_GetParentAccountInfoResponse as GetParentAccountInfoResponse, type context_GetSubAccountsRequest as GetSubAccountsRequest, type context_GetSubAccountsResponse as GetSubAccountsResponse, type context_GetUserAccountRequest as GetUserAccountRequest, type context_GetUserAccountsRequest as GetUserAccountsRequest, type context_IsTeamRequest as IsTeamRequest, type context_IsTeamResponse as IsTeamResponse, type context_ListChildAccountsOptions as ListChildAccountsOptions, type context_ListChildAccountsRequest as ListChildAccountsRequest, type context_ListChildAccountsResponse as ListChildAccountsResponse, type context_ListChildAccountsResponseNonNullableFields as ListChildAccountsResponseNonNullableFields, type context_MarkAccountFlagRequest as MarkAccountFlagRequest, type context_MarkAccountFlagRequestFlagOneOf as MarkAccountFlagRequestFlagOneOf, type context_Paging as Paging, type context_PagingMetadata as PagingMetadata, type context_RemoveParent as RemoveParent, type context_SetIsReadOnlyAccountRequest as SetIsReadOnlyAccountRequest, type context_SsoIdentity as SsoIdentity, type context_SubAccountInfo as SubAccountInfo, type context_UpdateAccountRequest as UpdateAccountRequest, type context_UpdateParentAccountRequest as UpdateParentAccountRequest, type context_UpdateParentAccountRequestUpdateOneOf as UpdateParentAccountRequestUpdateOneOf, type context_UpdateParentAccountResponse as UpdateParentAccountResponse, type context_UpdateSlugRequest as UpdateSlugRequest, type context_User as User, type context_UserDetails as UserDetails, context_createAccount as createAccount, context_listChildAccounts as listChildAccounts };
2320
+ export { type context_AccountInfo as AccountInfo, type context_AppInvite as AppInvite, type context_AssignedPolicy as AssignedPolicy, type context_Assignment as Assignment, type context_BulkGetUserRolesOnSiteRequest as BulkGetUserRolesOnSiteRequest, type context_BulkGetUserRolesOnSiteResponse as BulkGetUserRolesOnSiteResponse, type context_ChangeContributorRoleRequest as ChangeContributorRoleRequest, type context_ChangeContributorRoleResponse as ChangeContributorRoleResponse, type context_ChangeContributorRoleResponseNonNullableFields as ChangeContributorRoleResponseNonNullableFields, type context_ChangeRoleOptions as ChangeRoleOptions, type context_CompanionResource as CompanionResource, type context_Condition as Condition, context_ConditionAttributeType as ConditionAttributeType, type context_Conditions as Conditions, type context_Contributor as Contributor, type context_ContributorLimit as ContributorLimit, type context_ContributorV2 as ContributorV2, type context_ContributorsQuota as ContributorsQuota, type context_ContributorsQuotaOptionsOneOf as ContributorsQuotaOptionsOneOf, context_FieldSet as FieldSet, type context_GetAppContributorsRequest as GetAppContributorsRequest, type context_GetAppContributorsResponse as GetAppContributorsResponse, type context_GetContributorsQuotaRequest as GetContributorsQuotaRequest, type context_GetContributorsQuotaResponse as GetContributorsQuotaResponse, type context_GetCurrentUserRolesRequest as GetCurrentUserRolesRequest, type context_GetCurrentUserRolesResponse as GetCurrentUserRolesResponse, type context_GetSiteContributorsRequest as GetSiteContributorsRequest, type context_GetSiteContributorsResponse as GetSiteContributorsResponse, type context_GetSiteContributorsV2Request as GetSiteContributorsV2Request, type context_GetSiteContributorsV2Response as GetSiteContributorsV2Response, type context_HandleSiteTransferRequest as HandleSiteTransferRequest, type context_HandleSiteTransferResponse as HandleSiteTransferResponse, context_InviteStatus as InviteStatus, type context_LimitedOptions as LimitedOptions, type context_LocalizedRole as LocalizedRole, type context_Name as Name, type context_PendingOwner as PendingOwner, type context_PersonMetaData as PersonMetaData, type context_Policy as Policy, type context_PredefinedRole as PredefinedRole, type context_PredefinedRoles as PredefinedRoles, type context_QuerySiteContributorsFilter as QuerySiteContributorsFilter, type context_QuerySiteContributorsOptions as QuerySiteContributorsOptions, type context_QuerySiteContributorsRequest as QuerySiteContributorsRequest, type context_QuerySiteContributorsResponse as QuerySiteContributorsResponse, type context_Resource as Resource, context_ResourceType as ResourceType, type context_Restriction as Restriction, type context_RestrictionRestrictionsOneOf as RestrictionRestrictionsOneOf, type context_Role as Role, type context_SiteInvite as SiteInvite, type context_SiteRestriction as SiteRestriction, type context_SiteRoleAssignment as SiteRoleAssignment, type context_Subject as Subject, type context_SubjectContext as SubjectContext, context_SubjectContextType as SubjectContextType, context_SubjectType as SubjectType, type context_Team as Team, context_Type as Type, type context_User as User, type context_UserLocalizedRoles as UserLocalizedRoles, type context_UserSubject as UserSubject, context_changeRole as changeRole, context_querySiteContributors as querySiteContributors };
907
2321
  }
908
2322
 
909
- export { context as accounts };
2323
+ export { context$2 as accountInvites, context$3 as accounts, context as contributors, context$1 as siteInvites };