@wix/auto_sdk_user-management_contributors 1.0.21 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +4 -4
- package/build/cjs/index.js +2 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +2 -0
- package/build/cjs/index.typings.js +2 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +7 -0
- package/build/cjs/meta.js +2 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +4 -4
- package/build/es/index.mjs +2 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +2 -0
- package/build/es/index.typings.mjs +2 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +7 -0
- package/build/es/meta.mjs +2 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +9 -6
- package/build/internal/cjs/index.js +2 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +3 -1
- package/build/internal/cjs/index.typings.js +2 -1
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +7 -0
- package/build/internal/cjs/meta.js +2 -1
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +9 -6
- package/build/internal/es/index.mjs +2 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +3 -1
- package/build/internal/es/index.typings.mjs +2 -1
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +7 -0
- package/build/internal/es/meta.mjs +2 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
1
|
+
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
2
|
import { ChangeRoleOptions, ChangeContributorRoleResponse, ChangeContributorLocationOptions, ChangeContributorLocationResponse, QuerySiteContributorsOptions, QuerySiteContributorsResponse } from './index.typings.js';
|
|
3
3
|
export { AccountInfo, AppInvite, AssignedPolicy, Assignment, BulkGetUserRolesOnSiteRequest, BulkGetUserRolesOnSiteResponse, BulkValidateEmailInviteEligibilityRequest, BulkValidateEmailInviteEligibilityResponse, ChangeContributorLocationRequest, ChangeContributorRoleRequest, CompanionResource, Condition, ConditionAttributeType, Conditions, Contributor, ContributorLimit, ContributorV2, ContributorsQuota, ContributorsQuotaOptionsOneOf, EmailInviteEligibility, FieldSet, GetAppContributorsRequest, GetAppContributorsResponse, GetContributorsQuotaRequest, GetContributorsQuotaResponse, GetCurrentUserRolesRequest, GetCurrentUserRolesResponse, GetSiteContributorsRequest, GetSiteContributorsResponse, GetSiteContributorsV2Options, GetSiteContributorsV2Request, GetSiteContributorsV2Response, HandleSiteTransferRequest, HandleSiteTransferResponse, InviteStatus, LimitedOptions, LocalizedRole, LocationsRestriction, Name, PendingOwner, PersonMetaData, Policy, PredefinedRole, PredefinedRoles, QuerySiteContributorsFilter, QuerySiteContributorsRequest, Resource, ResourceType, Restriction, RestrictionRestrictionsOneOf, Role, SiteInvite, SiteLocationAssignment, SiteRestriction, SiteRoleAssignment, Subject, SubjectContext, SubjectContextType, SubjectType, Team, Type, User, UserLocalizedRoles, UserSubject } from './index.typings.js';
|
|
4
4
|
|
|
@@ -9,12 +9,12 @@ interface ChangeRoleSignature {
|
|
|
9
9
|
* @param - Contributor's account ID.
|
|
10
10
|
* @param - Filter options. The `newRoles` field **must** be passed.
|
|
11
11
|
*/
|
|
12
|
-
(accountId: string, options: ChangeRoleOptions): Promise<ChangeContributorRoleResponse
|
|
12
|
+
(accountId: string, options: NonNullablePaths<ChangeRoleOptions, `newRoles`>): Promise<NonNullablePaths<ChangeContributorRoleResponse, `newAssignedRoles` | `newAssignedRoles.${number}.roleId` | `newAssignedRoles.${number}.assignmentId`>>;
|
|
13
13
|
}
|
|
14
14
|
declare function changeContributorLocation$1(httpClient: HttpClient): ChangeContributorLocationSignature;
|
|
15
15
|
interface ChangeContributorLocationSignature {
|
|
16
16
|
/** @param - Contributor's account ID. */
|
|
17
|
-
(accountId: string, options: ChangeContributorLocationOptions): Promise<ChangeContributorLocationResponse
|
|
17
|
+
(accountId: string, options: NonNullablePaths<ChangeContributorLocationOptions, `newLocations`>): Promise<NonNullablePaths<ChangeContributorLocationResponse, `newAssignedLocations`>>;
|
|
18
18
|
}
|
|
19
19
|
declare function querySiteContributors$1(httpClient: HttpClient): QuerySiteContributorsSignature;
|
|
20
20
|
interface QuerySiteContributorsSignature {
|
|
@@ -22,7 +22,7 @@ interface QuerySiteContributorsSignature {
|
|
|
22
22
|
* Retrieves a list of contributors for the specified site, given the provided filters.
|
|
23
23
|
* @param - Filter options.
|
|
24
24
|
*/
|
|
25
|
-
(options?: QuerySiteContributorsOptions
|
|
25
|
+
(options?: QuerySiteContributorsOptions): Promise<NonNullablePaths<QuerySiteContributorsResponse, `contributors`>>;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
declare const changeRole: MaybeContext<BuildRESTFunction<typeof changeRole$1> & typeof changeRole$1>;
|
package/build/cjs/index.js
CHANGED
|
@@ -190,7 +190,8 @@ function getSiteContributorsV2(payload) {
|
|
|
190
190
|
paths: [
|
|
191
191
|
{ path: "contributors.joinedAt" },
|
|
192
192
|
{ path: "invites.dateCreated" },
|
|
193
|
-
{ path: "invites.expirationDate" }
|
|
193
|
+
{ path: "invites.expirationDate" },
|
|
194
|
+
{ path: "pendingOwner.expirationDate" }
|
|
194
195
|
]
|
|
195
196
|
}
|
|
196
197
|
])
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/identity-v1-contributor-contributors.universal.ts","../../src/identity-v1-contributor-contributors.http.ts","../../src/identity-v1-contributor-contributors.public.ts","../../src/identity-v1-contributor-contributors.context.ts"],"sourcesContent":["export * from './src/identity-v1-contributor-contributors.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixIdentityV1Contributor from './identity-v1-contributor-contributors.http.js';\n\nexport interface Contributor {\n /** Contributor's metadata. */\n metaData?: PersonMetaData;\n /** Whether the contributor account is a team account. */\n isTeam?: boolean | null;\n /** Date that the contributor joined the site. */\n joinedAt?: Date | null;\n /** Email address that received the invite. */\n invitedEmail?: string | null;\n /** Whether the contributor account is a client account. */\n isClient?: boolean | null;\n /**\n * Contributor's user ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n}\n\nexport interface PersonMetaData {\n /** Contributor's account ID. */\n _id?: string;\n /** Contributor's full name. */\n fullName?: string | null;\n /** URL for contributor's profile image. */\n imageUrl?: string | null;\n /** Contributor's email address. */\n email?: string | null;\n /** Contributor's access to assets and their assigned role (`policy`) for that asset. */\n assignments?: Assignment[];\n}\n\nexport interface Assignment {\n /** Role assigned to the user. */\n policy?: AssignedPolicy;\n /** Unique ID for this specific assignment. */\n assignmentId?: string;\n /** Identity assigned to the asset in an assignment, referred to as subject. Supported subjects include user IDs, account IDs, and app IDs. */\n subject?: Subject;\n}\n\nexport interface AssignedPolicy {\n /** Role ID. */\n policyId?: string;\n /** Role title. */\n title?: string | null;\n /** Role description. */\n description?: string | null;\n}\n\nexport interface Restriction extends RestrictionRestrictionsOneOf {\n /**\n * Deprecated.\n * @deprecated\n */\n resource?: Resource;\n /** List of conditions restricting the user's access. Currently only folder conditions are supported. */\n conditions?: Conditions;\n /** Site where the assignment restrictions apply. */\n site?: SiteRestriction;\n /** Location where the assignment restrictions apply. */\n locations?: LocationsRestriction;\n}\n\n/** @oneof */\nexport interface RestrictionRestrictionsOneOf {\n /**\n * Deprecated.\n * @deprecated\n */\n resource?: Resource;\n /** List of conditions restricting the user's access. Currently only folder conditions are supported. */\n conditions?: Conditions;\n /** Site where the assignment restrictions apply. */\n site?: SiteRestriction;\n /** Location where the assignment restrictions apply. */\n locations?: LocationsRestriction;\n}\n\nexport interface Resource {\n /** Resource type. */\n resourceType?: ResourceTypeWithLiterals;\n /** Resource ID. */\n _id?: string;\n value?: string | null;\n}\n\nexport enum ResourceType {\n UNKNOWN_RESOURCE_TYPE = 'UNKNOWN_RESOURCE_TYPE',\n SITE = 'SITE',\n}\n\n/** @enumType */\nexport type ResourceTypeWithLiterals =\n | ResourceType\n | 'UNKNOWN_RESOURCE_TYPE'\n | 'SITE';\n\nexport interface Conditions {\n /** List of conditions. */\n conditions?: Condition[];\n}\n\nexport interface Condition {\n /** Condition type. */\n conditionType?: ConditionAttributeTypeWithLiterals;\n /** Condition ID. */\n _id?: string;\n /** Expected value of the condition. When `conditionType` = \"FOLDER\", this is the folder path. */\n value?: string | null;\n}\n\nexport enum ConditionAttributeType {\n UNKNOWN_CONDITION_TYPE = 'UNKNOWN_CONDITION_TYPE',\n FOLDER = 'FOLDER',\n}\n\n/** @enumType */\nexport type ConditionAttributeTypeWithLiterals =\n | ConditionAttributeType\n | 'UNKNOWN_CONDITION_TYPE'\n | 'FOLDER';\n\nexport interface SiteRestriction {\n /** Site ID. */\n _id?: string;\n /** Site name. */\n value?: string | null;\n}\n\nexport interface CompanionResource {\n /** Asset ID (referred to here as resource ID). */\n _id?: string;\n /** Asset type (referred to here as resource type). as predefined in the authorization system */\n resourceType?: string;\n}\n\nexport interface LocationsRestriction {\n /**\n * Location IDs.\n * @format GUID\n * @maxSize 20\n */\n ids?: string[];\n}\n\nexport interface Subject {\n /** ID of identity assigned to the asset. */\n _id?: string;\n /** Type of identity assigned to the asset. Supported subject types include user IDs, account IDs, and app IDs. */\n subjectType?: SubjectTypeWithLiterals;\n /** Context of identity assigned to the asset. For example, a `subjectType` = `USER` will have `context` = `ACCOUNT`. */\n context?: SubjectContext;\n}\n\nexport enum SubjectType {\n UNKNOWN = 'UNKNOWN',\n ACCOUNT = 'ACCOUNT',\n USER = 'USER',\n USER_GROUP = 'USER_GROUP',\n MEMBER_GROUP = 'MEMBER_GROUP',\n VISITOR_GROUP = 'VISITOR_GROUP',\n EXTERNAL_APP = 'EXTERNAL_APP',\n ACCOUNT_GROUP = 'ACCOUNT_GROUP',\n WIX_APP = 'WIX_APP',\n}\n\n/** @enumType */\nexport type SubjectTypeWithLiterals =\n | SubjectType\n | 'UNKNOWN'\n | 'ACCOUNT'\n | 'USER'\n | 'USER_GROUP'\n | 'MEMBER_GROUP'\n | 'VISITOR_GROUP'\n | 'EXTERNAL_APP'\n | 'ACCOUNT_GROUP'\n | 'WIX_APP';\n\nexport interface SubjectContext {\n _id?: string;\n contextType?: SubjectContextTypeWithLiterals;\n}\n\nexport enum SubjectContextType {\n UNKNOWN_CTX = 'UNKNOWN_CTX',\n ORG_CTX = 'ORG_CTX',\n ACCOUNT_CTX = 'ACCOUNT_CTX',\n}\n\n/** @enumType */\nexport type SubjectContextTypeWithLiterals =\n | SubjectContextType\n | 'UNKNOWN_CTX'\n | 'ORG_CTX'\n | 'ACCOUNT_CTX';\n\nexport interface GetSiteContributorsRequest {\n /** The locale of the request. Defaults to en-us */\n locale?: string | null;\n}\n\nexport interface GetSiteContributorsResponse {\n users?: User[];\n teams?: Team[];\n invites?: SiteInvite[];\n policies?: Policy[];\n permissions?: string[];\n userId?: string;\n loggedInAccountId?: string;\n pendingOwner?: PendingOwner;\n contributorLimit?: ContributorLimit;\n predefinedRoles?: PredefinedRoles;\n}\n\nexport interface User {\n /** User ID. */\n _id?: string;\n /**\n * Deprecated.\n * @deprecated\n */\n roles?: string[];\n /** User's email address. */\n email?: string;\n /** User's name. */\n name?: Name;\n /** URL to user's profile image, when provided. */\n profileImage?: string | null;\n /** Date the user joined the team. */\n joinedTeamAt?: Date | null;\n /**\n * Deprecated.\n * @deprecated\n */\n policyIds?: string[];\n /** Resources the user can access. */\n assignments?: Assignment[];\n}\n\nexport interface Name {\n /** User's first name. */\n firstName?: string;\n /** User's last name. */\n lastName?: string;\n}\n\nexport interface Team {\n accountId?: string;\n accountInfo?: AccountInfo;\n policyIds?: string[];\n joinedAt?: Date | null;\n}\n\nexport interface AccountInfo {\n accountName?: string;\n accountImage?: string;\n isTeam?: boolean;\n}\n\nexport interface SiteInvite {\n /**\n * Invite ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Site ID the user is invited to as a collaborator.\n * @format GUID\n * @readonly\n */\n siteId?: string;\n /**\n * Email address where the invite was sent.\n * @format EMAIL\n */\n email?: string;\n /** Role IDs included in the invite. */\n policyIds?: string[];\n /**\n * Deprecated. Use `inviterAccountId`.\n * @readonly\n * @deprecated\n */\n inviterId?: string;\n /**\n * Invite Status.\n *\n * Supported values:\n * - **Pending:** The invite has been sent and is valid, waiting for the user's response.\n * - **Used:** The invite has been accepted.\n * - **Deleted:** The invite has been deleted or revoked.\n * - **Declined:** The user declined the invite.\n * - **Expired:** The invite has expired without being accepted.\n */\n status?: InviteStatusWithLiterals;\n /** Link to accept the invite. */\n acceptLink?: string;\n /**\n * Inviting account ID.\n * @format GUID\n * @readonly\n */\n inviterAccountId?: string;\n /**\n * Account ID that accepted the invite. Populated only once the invite is accepted.\n * @format GUID\n * @readonly\n */\n acceptedByAccountId?: string | null;\n /** Date the invite was created. */\n dateCreated?: Date | null;\n /**\n * User's Wix Bookings staff ID, if relevant.\n * @format GUID\n */\n staffId?: string | null;\n /** Invite expiration date */\n expirationDate?: Date | null;\n /**\n * Location ids included in the invite\n * @format GUID\n * @readonly\n * @maxSize 20\n */\n locationIds?: string[];\n}\n\n/** Invite status stating whether the invite was accepted, waiting to be accepted, deleted etc.. */\nexport enum InviteStatus {\n Pending = 'Pending',\n Used = 'Used',\n Deleted = 'Deleted',\n Declined = 'Declined',\n Expired = 'Expired',\n}\n\n/** @enumType */\nexport type InviteStatusWithLiterals =\n | InviteStatus\n | 'Pending'\n | 'Used'\n | 'Deleted'\n | 'Declined'\n | 'Expired';\n\nexport interface Policy {\n _id?: string;\n description?: string | null;\n name?: string | null;\n isCustom?: boolean;\n scopes?: string[];\n}\n\nexport interface PendingOwner {\n email?: string;\n expirationDate?: Date | null;\n acceptLink?: string;\n}\n\nexport interface ContributorLimit {\n contributorLimit?: number;\n}\n\nexport interface PredefinedRoles {\n roles?: PredefinedRole[];\n}\n\nexport interface PredefinedRole {\n titleKey?: string;\n roles?: Role[];\n title?: string | null;\n areaId?: string;\n}\n\nexport interface Role {\n _id?: string;\n deprecatedKey?: string;\n /** @deprecated */\n titleKey?: string;\n /** @deprecated */\n descriptionKey?: string;\n deprecated?: boolean;\n restrictFromLevel?: string;\n experiments?: string[];\n appDefIds?: string[];\n title?: string | null;\n description?: string | null;\n isCustom?: boolean;\n scopes?: string[];\n availableResourceTypes?: ResourceTypeWithLiterals[];\n availableConditions?: ConditionAttributeTypeWithLiterals[];\n limitToEditorTypes?: string[];\n}\n\nexport interface GetSiteContributorsV2Request {\n /** The locale of the request. Defaults to en-us. */\n locale?: string | null;\n /** The set of desired fields. */\n fields?: string[];\n}\n\nexport interface GetSiteContributorsV2Response {\n /** List of contributors of the given site. */\n contributors?: Contributor[];\n /** List of invites to contribute to the given site. */\n invites?: SiteInvite[];\n /** Quota information for contributors on the given site. */\n contributorsQuota?: ContributorsQuota;\n}\n\nexport interface ContributorsQuota extends ContributorsQuotaOptionsOneOf {\n /** Limited contributors quota details. */\n limitedOptions?: LimitedOptions;\n /** Type of contributors quota */\n type?: TypeWithLiterals;\n}\n\n/** @oneof */\nexport interface ContributorsQuotaOptionsOneOf {\n /** Limited contributors quota details. */\n limitedOptions?: LimitedOptions;\n}\n\n/** Enum to represent different types of contributors quota. */\nexport enum Type {\n UNKNOWN = 'UNKNOWN',\n LIMITED = 'LIMITED',\n UNLIMITED = 'UNLIMITED',\n}\n\n/** @enumType */\nexport type TypeWithLiterals = Type | 'UNKNOWN' | 'LIMITED' | 'UNLIMITED';\n\n/** Details for a limited contributors quota. */\nexport interface LimitedOptions {\n /** Maximum number of contributors allowed. */\n limit?: number;\n /** Number of accepted or pending invitations. */\n used?: number;\n}\n\nexport interface HandleSiteTransferRequest {\n originalOwnerAccountId?: string;\n newOwnerAccountId?: string;\n metaSiteId?: string;\n keepOriginalOwnerAsContributor?: boolean;\n}\n\nexport interface HandleSiteTransferResponse {}\n\nexport interface GetCurrentUserRolesRequest {\n /** The locale of the request. Defaults to en-us */\n locale?: string | null;\n}\n\nexport interface GetCurrentUserRolesResponse {\n roles?: LocalizedRole[];\n}\n\nexport interface LocalizedRole {\n name?: string;\n description?: string | null;\n}\n\nexport interface BulkGetUserRolesOnSiteRequest {\n /** @maxSize 5 */\n users?: UserSubject[];\n /** The locale of the request. Defaults to en-us */\n locale?: string | null;\n}\n\nexport interface UserSubject {\n userId?: string;\n accountId?: string;\n}\n\nexport interface BulkGetUserRolesOnSiteResponse {\n userRoles?: UserLocalizedRoles[];\n}\n\nexport interface UserLocalizedRoles {\n user?: UserSubject;\n roles?: LocalizedRole[];\n}\n\nexport interface BulkValidateEmailInviteEligibilityRequest {\n /**\n * List of emails to be checked for invite eligibility.\n * @minSize 1\n * @maxSize 10\n * @format EMAIL\n */\n emails?: string[];\n}\n\nexport interface BulkValidateEmailInviteEligibilityResponse {\n /** List of email invite eligibility results. */\n emailsEligibility?: EmailInviteEligibility[];\n}\n\nexport interface EmailInviteEligibility {\n /**\n * The email address being checked.\n * @format EMAIL\n */\n email?: string;\n /** Whether the email is eligible for an invite. */\n eligible?: boolean;\n}\n\nexport interface ChangeContributorRoleRequest {\n /**\n * Contributor's account ID.\n * @format GUID\n */\n accountId: string;\n /** New roles to assign to the contributor on the site. */\n newRoles: SiteRoleAssignment[];\n}\n\nexport interface SiteRoleAssignment {\n /** 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. */\n roleId?: string;\n /**\n * Assignment ID mapping the role to the contributor on the site.\n * @readonly\n */\n assignmentId?: string;\n}\n\nexport interface ChangeContributorRoleResponse {\n /** New roles assigned to the contributor on the site. */\n newAssignedRoles?: SiteRoleAssignment[];\n}\n\nexport interface ChangeContributorLocationRequest {\n /**\n * Contributor's account ID.\n * @format GUID\n */\n accountId: string;\n /**\n * New locations to assign to the contributor on the site.\n * @format GUID\n * @maxSize 20\n */\n newLocations: string[];\n}\n\nexport interface ChangeContributorLocationResponse {\n /**\n * New locations assigned to the contributor on the site.\n * @maxSize 20\n */\n newAssignedLocations?: SiteLocationAssignment[];\n}\n\nexport interface SiteLocationAssignment {\n /**\n * @format GUID\n * @maxSize 100\n */\n locationIds?: string[];\n /**\n * @readonly\n * @maxLength 20\n * @maxSize 999\n */\n assignmentIds?: string[];\n}\n\nexport interface QuerySiteContributorsRequest {\n filter?: QuerySiteContributorsFilter;\n}\n\nexport interface QuerySiteContributorsFilter {\n /**\n * 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.\n * @maxSize 20\n */\n policyIds?: string[];\n /**\n * Location IDs.\n * @format GUID\n * @maxSize 20\n */\n locationIds?: string[];\n}\n\nexport enum FieldSet {\n UNKNOWN = 'UNKNOWN',\n /** Include only `account_id` and `account_owner_id` fields. */\n META_DATA = 'META_DATA',\n}\n\n/** @enumType */\nexport type FieldSetWithLiterals = FieldSet | 'UNKNOWN' | 'META_DATA';\n\nexport interface QuerySiteContributorsResponse {\n /** List of site contributors. */\n contributors?: ContributorV2[];\n}\n\nexport interface ContributorV2 {\n /** Contributor's account ID. */\n accountId?: string | null;\n /** User ID of the owner of the account that the contributor has joined. */\n accountOwnerId?: string | null;\n}\n\nexport interface GetContributorsQuotaRequest {}\n\nexport interface GetContributorsQuotaResponse {\n /** Quota information for contributors on the given site. */\n contributorsQuota?: ContributorsQuota;\n}\n\nexport interface GetAppContributorsRequest {\n /** @format GUID */\n appId?: string;\n /** The locale of the request. Defaults to en-us. */\n locale?: string | null;\n}\n\nexport interface GetAppContributorsResponse {\n contributors?: Contributor[];\n invites?: AppInvite[];\n}\n\nexport interface AppInvite {\n /**\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * TODO: amitis - remove this comment after the next merge\n * @format EMAIL\n */\n destEmail?: string;\n /**\n * @readonly\n * @maxLength 20\n */\n status?: string;\n /**\n * @format WEB_URL\n * @readonly\n */\n acceptLink?: string;\n /** @maxLength 50 */\n invitePurpose?: string | null;\n /** @maxSize 10 */\n policies?: AssignedPolicy[];\n /** @readonly */\n expirationDate?: Date | null;\n /** @readonly */\n dateCreated?: Date | null;\n /** @readonly */\n dateUpdated?: Date | null;\n}\n\ntype ContributorNonNullablePaths =\n | `metaData._id`\n | `metaData.assignments`\n | `metaData.assignments.${number}.policy.policyId`\n | `metaData.assignments.${number}.assignmentId`\n | `metaData.assignments.${number}.subject._id`\n | `metaData.assignments.${number}.subject.subjectType`\n | `metaData.assignments.${number}.subject.context._id`\n | `metaData.assignments.${number}.subject.context.contextType`\n | `_id`;\n\n/**\n * returns a list of all the contributors + invites to be contributors of a given meta site ID taken from the\n * context.\n * @internal\n * @documentationMaturity preview\n * @permissionId site-users.view-users\n * @applicableIdentity APP\n * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.GetSiteContributorsV2\n */\nexport async function getSiteContributorsV2(\n options?: GetSiteContributorsV2Options\n): Promise<\n NonNullablePaths<\n GetSiteContributorsV2Response,\n | {\n [P in ContributorNonNullablePaths]: `contributors.${number}.${P}`;\n }[ContributorNonNullablePaths]\n | `invites`\n | `invites.${number}._id`\n | `invites.${number}.siteId`\n | `invites.${number}.email`\n | `invites.${number}.inviterId`\n | `invites.${number}.status`\n | `invites.${number}.acceptLink`\n | `invites.${number}.inviterAccountId`\n | `contributorsQuota.limitedOptions.limit`\n | `contributorsQuota.limitedOptions.used`\n | `contributorsQuota.type`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n locale: options?.locale,\n fields: options?.fields,\n });\n\n const reqOpts =\n ambassadorWixIdentityV1Contributor.getSiteContributorsV2(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n locale: '$[0].locale',\n fields: '$[0].fields',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSiteContributorsV2Options {\n /** The locale of the request. Defaults to en-us. */\n locale?: string | null;\n /** The set of desired fields. */\n fields?: string[];\n}\n\n/**\n * Overrides all the roles of a contributor for the specified site.\n * @param accountId - Contributor's account ID.\n * @public\n * @requiredField accountId\n * @requiredField options\n * @requiredField options.newRoles\n * @param options - Filter options. The `newRoles` field **must** be passed.\n * @permissionId SITE_ROLES.CHANGE_ROLE\n * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.ChangeRole\n */\nexport async function changeRole(\n accountId: string,\n options: NonNullablePaths<ChangeRoleOptions, `newRoles`>\n): Promise<\n NonNullablePaths<\n ChangeContributorRoleResponse,\n | `newAssignedRoles`\n | `newAssignedRoles.${number}.roleId`\n | `newAssignedRoles.${number}.assignmentId`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n accountId: accountId,\n newRoles: options?.newRoles,\n });\n\n const reqOpts = ambassadorWixIdentityV1Contributor.changeRole(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n accountId: '$[0]',\n newRoles: '$[1].newRoles',\n },\n singleArgumentUnchanged: false,\n },\n ['accountId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ChangeRoleOptions {\n /** New roles to assign to the contributor on the site. */\n newRoles: SiteRoleAssignment[];\n}\n\n/** @param accountId - Contributor's account ID.\n * @public\n * @documentationMaturity preview\n * @requiredField accountId\n * @requiredField options\n * @requiredField options.newLocations\n * @permissionId SITE_ROLES.CHANGE_LOCATION\n * @applicableIdentity APP\n * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.ChangeContributorLocation\n */\nexport async function changeContributorLocation(\n accountId: string,\n options: NonNullablePaths<ChangeContributorLocationOptions, `newLocations`>\n): Promise<\n NonNullablePaths<ChangeContributorLocationResponse, `newAssignedLocations`>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n accountId: accountId,\n newLocations: options?.newLocations,\n });\n\n const reqOpts =\n ambassadorWixIdentityV1Contributor.changeContributorLocation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n accountId: '$[0]',\n newLocations: '$[1].newLocations',\n },\n singleArgumentUnchanged: false,\n },\n ['accountId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ChangeContributorLocationOptions {\n /**\n * New locations to assign to the contributor on the site.\n * @format GUID\n * @maxSize 20\n */\n newLocations: string[];\n}\n\n/**\n * Retrieves a list of contributors for the specified site, given the provided filters.\n * @public\n * @param options - Filter options.\n * @permissionId site-users.view-users\n * @applicableIdentity APP\n * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.QuerySiteContributors\n */\nexport async function querySiteContributors(\n options?: QuerySiteContributorsOptions\n): Promise<NonNullablePaths<QuerySiteContributorsResponse, `contributors`>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n });\n\n const reqOpts =\n ambassadorWixIdentityV1Contributor.querySiteContributors(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { filter: '$[0].filter' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface QuerySiteContributorsOptions {\n filter?: QuerySiteContributorsFilter;\n}\n\n/**\n * returns the quota information for contributors on the given site.\n * @internal\n * @documentationMaturity preview\n * @permissionId site-users.view-users\n * @applicableIdentity APP\n * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.GetContributorsQuota\n */\nexport async function getContributorsQuota(): Promise<\n NonNullablePaths<\n GetContributorsQuotaResponse,\n | `contributorsQuota.limitedOptions.limit`\n | `contributorsQuota.limitedOptions.used`\n | `contributorsQuota.type`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixIdentityV1Contributor.getContributorsQuota(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/contributors/accept',\n destPath: '/contributors/accept',\n },\n {\n srcPath: '/roles-management-web',\n destPath: '',\n },\n {\n srcPath: '/team/accept',\n destPath: '/team/accept',\n },\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n {\n srcPath: '/app/accept',\n destPath: '/app/accept',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/roles-management-web',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n {\n srcPath: '/roles-management-web',\n destPath: '',\n },\n {\n srcPath: '/contributors/accept',\n destPath: '/contributors/accept',\n },\n {\n srcPath: '/team/accept',\n destPath: '/team/accept',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n ],\n 'platform.rise.ai': [\n {\n srcPath: '/v2/contributors',\n destPath: '/v2/contributors',\n },\n {\n srcPath: '/contributor/change/role',\n destPath: '/contributor/change/role',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/roles-management',\n destPath: '',\n },\n {\n srcPath: '/roles-management-web',\n destPath: '',\n },\n {\n srcPath: '/roles-management/roles',\n destPath: '/roles',\n },\n {\n srcPath: '/roles-management/team',\n destPath: '/team',\n },\n {\n srcPath: '/roles-management/v3/team',\n destPath: '/v3/team',\n },\n {\n srcPath: '/roles-management/v2/team',\n destPath: '/v2/team',\n },\n {\n srcPath: '/roles-management/contributor/change',\n destPath: '/contributor/change',\n },\n {\n srcPath: '/roles-management/v2/contributors',\n destPath: '/v2/contributors',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_user-management_contributors';\n\n/**\n * returns a list of all the contributors + invites to be contributors of a given meta site ID taken from the\n * context.\n */\nexport function getSiteContributorsV2(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSiteContributorsV2({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fields' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.identity.v1.contributor',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.roles.management.api.SiteRolesManagementService.GetSiteContributorsV2',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({\n protoPath: '/v2/contributors',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'contributors.joinedAt' },\n { path: 'invites.dateCreated' },\n { path: 'invites.expirationDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getSiteContributorsV2;\n}\n\n/** Overrides all the roles of a contributor for the specified site. */\nexport function changeRole(payload: object): RequestOptionsFactory<any> {\n function __changeRole({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.v1.contributor',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.roles.management.api.SiteRolesManagementService.ChangeRole',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({\n protoPath: '/contributor/change/role',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __changeRole;\n}\n\nexport function changeContributorLocation(\n payload: object\n): RequestOptionsFactory<any> {\n function __changeContributorLocation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.v1.contributor',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.roles.management.api.SiteRolesManagementService.ChangeContributorLocation',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({\n protoPath: '/contributor/change/locations',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __changeContributorLocation;\n}\n\n/** Retrieves a list of contributors for the specified site, given the provided filters. */\nexport function querySiteContributors(\n payload: object\n): RequestOptionsFactory<any> {\n function __querySiteContributors({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.v1.contributor',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.roles.management.api.SiteRolesManagementService.QuerySiteContributors',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({\n protoPath: '/v2/contributors/query',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __querySiteContributors;\n}\n\n/** returns the quota information for contributors on the given site. */\nexport function getContributorsQuota(\n payload: object\n): RequestOptionsFactory<any> {\n function __getContributorsQuota({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.v1.contributor',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.roles.management.api.SiteRolesManagementService.GetContributorsQuota',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({\n protoPath: '/v2/contributors/quota',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getContributorsQuota;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ChangeContributorLocationOptions,\n ChangeContributorLocationResponse,\n ChangeContributorRoleResponse,\n ChangeRoleOptions,\n GetContributorsQuotaResponse,\n GetSiteContributorsV2Options,\n GetSiteContributorsV2Response,\n QuerySiteContributorsOptions,\n QuerySiteContributorsResponse,\n changeContributorLocation as universalChangeContributorLocation,\n changeRole as universalChangeRole,\n getContributorsQuota as universalGetContributorsQuota,\n getSiteContributorsV2 as universalGetSiteContributorsV2,\n querySiteContributors as universalQuerySiteContributors,\n} from './identity-v1-contributor-contributors.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/user-management' };\n\n/** @internal */\nexport function getSiteContributorsV2(\n httpClient: HttpClient\n): GetSiteContributorsV2Signature {\n return (options?: GetSiteContributorsV2Options) =>\n universalGetSiteContributorsV2(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetSiteContributorsV2Signature {\n /**\n * returns a list of all the contributors + invites to be contributors of a given meta site ID taken from the\n * context.\n */\n (\n options?: GetSiteContributorsV2Options | undefined\n ): Promise<GetSiteContributorsV2Response>;\n}\n\nexport function changeRole(httpClient: HttpClient): ChangeRoleSignature {\n return (\n accountId: string,\n options: NonNullablePaths<ChangeRoleOptions, `newRoles`>\n ) =>\n universalChangeRole(\n accountId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ChangeRoleSignature {\n /**\n * Overrides all the roles of a contributor for the specified site.\n * @param - Contributor's account ID.\n * @param - Filter options. The `newRoles` field **must** be passed.\n */\n (\n accountId: string,\n options: ChangeRoleOptions\n ): Promise<ChangeContributorRoleResponse>;\n}\n\nexport function changeContributorLocation(\n httpClient: HttpClient\n): ChangeContributorLocationSignature {\n return (\n accountId: string,\n options: NonNullablePaths<ChangeContributorLocationOptions, `newLocations`>\n ) =>\n universalChangeContributorLocation(\n accountId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ChangeContributorLocationSignature {\n /** @param - Contributor's account ID. */\n (\n accountId: string,\n options: ChangeContributorLocationOptions\n ): Promise<ChangeContributorLocationResponse>;\n}\n\nexport function querySiteContributors(\n httpClient: HttpClient\n): QuerySiteContributorsSignature {\n return (options?: QuerySiteContributorsOptions) =>\n universalQuerySiteContributors(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QuerySiteContributorsSignature {\n /**\n * Retrieves a list of contributors for the specified site, given the provided filters.\n * @param - Filter options.\n */\n (\n options?: QuerySiteContributorsOptions | undefined\n ): Promise<QuerySiteContributorsResponse>;\n}\n\n/** @internal */\nexport function getContributorsQuota(\n httpClient: HttpClient\n): GetContributorsQuotaSignature {\n return () =>\n universalGetContributorsQuota(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetContributorsQuotaSignature {\n /**\n * returns the quota information for contributors on the given site.\n */\n (): Promise<GetContributorsQuotaResponse>;\n}\n\nexport {\n AccountInfo,\n AppInvite,\n AssignedPolicy,\n Assignment,\n BulkGetUserRolesOnSiteRequest,\n BulkGetUserRolesOnSiteResponse,\n BulkValidateEmailInviteEligibilityRequest,\n BulkValidateEmailInviteEligibilityResponse,\n ChangeContributorLocationOptions,\n ChangeContributorLocationRequest,\n ChangeContributorLocationResponse,\n ChangeContributorRoleRequest,\n ChangeContributorRoleResponse,\n ChangeRoleOptions,\n CompanionResource,\n Condition,\n ConditionAttributeType,\n Conditions,\n Contributor,\n ContributorLimit,\n ContributorV2,\n ContributorsQuota,\n ContributorsQuotaOptionsOneOf,\n EmailInviteEligibility,\n FieldSet,\n GetAppContributorsRequest,\n GetAppContributorsResponse,\n GetContributorsQuotaRequest,\n GetContributorsQuotaResponse,\n GetCurrentUserRolesRequest,\n GetCurrentUserRolesResponse,\n GetSiteContributorsRequest,\n GetSiteContributorsResponse,\n GetSiteContributorsV2Options,\n GetSiteContributorsV2Request,\n GetSiteContributorsV2Response,\n HandleSiteTransferRequest,\n HandleSiteTransferResponse,\n InviteStatus,\n LimitedOptions,\n LocalizedRole,\n LocationsRestriction,\n Name,\n PendingOwner,\n PersonMetaData,\n Policy,\n PredefinedRole,\n PredefinedRoles,\n QuerySiteContributorsFilter,\n QuerySiteContributorsOptions,\n QuerySiteContributorsRequest,\n QuerySiteContributorsResponse,\n Resource,\n ResourceType,\n Restriction,\n RestrictionRestrictionsOneOf,\n Role,\n SiteInvite,\n SiteLocationAssignment,\n SiteRestriction,\n SiteRoleAssignment,\n Subject,\n SubjectContext,\n SubjectContextType,\n SubjectType,\n Team,\n Type,\n User,\n UserLocalizedRoles,\n UserSubject,\n} from './identity-v1-contributor-contributors.universal.js';\n","import {\n getSiteContributorsV2 as publicGetSiteContributorsV2,\n changeRole as publicChangeRole,\n changeContributorLocation as publicChangeContributorLocation,\n querySiteContributors as publicQuerySiteContributors,\n getContributorsQuota as publicGetContributorsQuota,\n} from './identity-v1-contributor-contributors.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\n/** @internal */\nexport const getSiteContributorsV2: MaybeContext<\n BuildRESTFunction<typeof publicGetSiteContributorsV2> &\n typeof publicGetSiteContributorsV2\n> = /*#__PURE__*/ createRESTModule(publicGetSiteContributorsV2);\nexport const changeRole: MaybeContext<\n BuildRESTFunction<typeof publicChangeRole> & typeof publicChangeRole\n> = /*#__PURE__*/ createRESTModule(publicChangeRole);\nexport const changeContributorLocation: MaybeContext<\n BuildRESTFunction<typeof publicChangeContributorLocation> &\n typeof publicChangeContributorLocation\n> = /*#__PURE__*/ createRESTModule(publicChangeContributorLocation);\nexport const querySiteContributors: MaybeContext<\n BuildRESTFunction<typeof publicQuerySiteContributors> &\n typeof publicQuerySiteContributors\n> = /*#__PURE__*/ createRESTModule(publicQuerySiteContributors);\n/** @internal */\nexport const getContributorsQuota: MaybeContext<\n BuildRESTFunction<typeof publicGetContributorsQuota> &\n typeof publicGetContributorsQuota\n> = /*#__PURE__*/ createRESTModule(publicGetContributorsQuota);\n\nexport {\n ResourceType,\n ConditionAttributeType,\n SubjectType,\n SubjectContextType,\n InviteStatus,\n Type,\n FieldSet,\n} from './identity-v1-contributor-contributors.universal.js';\nexport {\n Contributor,\n PersonMetaData,\n Assignment,\n AssignedPolicy,\n Restriction,\n RestrictionRestrictionsOneOf,\n Resource,\n Conditions,\n Condition,\n SiteRestriction,\n CompanionResource,\n LocationsRestriction,\n Subject,\n SubjectContext,\n GetSiteContributorsRequest,\n GetSiteContributorsResponse,\n User,\n Name,\n Team,\n AccountInfo,\n SiteInvite,\n Policy,\n PendingOwner,\n ContributorLimit,\n PredefinedRoles,\n PredefinedRole,\n Role,\n GetSiteContributorsV2Request,\n GetSiteContributorsV2Response,\n ContributorsQuota,\n ContributorsQuotaOptionsOneOf,\n LimitedOptions,\n HandleSiteTransferRequest,\n HandleSiteTransferResponse,\n GetCurrentUserRolesRequest,\n GetCurrentUserRolesResponse,\n LocalizedRole,\n BulkGetUserRolesOnSiteRequest,\n UserSubject,\n BulkGetUserRolesOnSiteResponse,\n UserLocalizedRoles,\n BulkValidateEmailInviteEligibilityRequest,\n BulkValidateEmailInviteEligibilityResponse,\n EmailInviteEligibility,\n ChangeContributorRoleRequest,\n SiteRoleAssignment,\n ChangeContributorRoleResponse,\n ChangeContributorLocationRequest,\n ChangeContributorLocationResponse,\n SiteLocationAssignment,\n QuerySiteContributorsRequest,\n QuerySiteContributorsFilter,\n QuerySiteContributorsResponse,\n ContributorV2,\n GetContributorsQuotaRequest,\n GetContributorsQuotaResponse,\n GetAppContributorsRequest,\n GetAppContributorsResponse,\n AppInvite,\n GetSiteContributorsV2Options,\n ChangeRoleOptions,\n ChangeContributorLocationOptions,\n QuerySiteContributorsOptions,\n} from './identity-v1-contributor-contributors.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mCAAAA;AAAA,EAAA,kBAAAC;AAAA,EAAA,4BAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,6BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,kEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;A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AA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAaO,SAASC,sBACd,YAC+B;AAC/B,SAAO,MACLA;AAAA;AAAA,IAEE,EAAE,WAAW;AAAA,EACf;AACJ;;;ACjHA,IAAAC,uBAAiC;AAI1B,IAAMC,yBAGK,2DAAiBA,sBAA2B;AACvD,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,6BAGK,2DAAiBA,0BAA+B;AAC3D,IAAMC,yBAGK,2DAAiBA,sBAA2B;AAEvD,IAAMC,wBAGK,2DAAiBA,qBAA0B;","names":["changeContributorLocation","changeRole","getContributorsQuota","getSiteContributorsV2","querySiteContributors","import_rest_modules","payload","ResourceType","ConditionAttributeType","SubjectType","SubjectContextType","InviteStatus","Type","FieldSet","getSiteContributorsV2","sdkTransformError","changeRole","changeContributorLocation","querySiteContributors","getContributorsQuota","getSiteContributorsV2","changeRole","changeContributorLocation","querySiteContributors","getContributorsQuota","import_rest_modules","getSiteContributorsV2","changeRole","changeContributorLocation","querySiteContributors","getContributorsQuota"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/identity-v1-contributor-contributors.universal.ts","../../src/identity-v1-contributor-contributors.http.ts","../../src/identity-v1-contributor-contributors.public.ts","../../src/identity-v1-contributor-contributors.context.ts"],"sourcesContent":["export * from './src/identity-v1-contributor-contributors.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixIdentityV1Contributor from './identity-v1-contributor-contributors.http.js';\n\nexport interface Contributor {\n /** Contributor's metadata. */\n metaData?: PersonMetaData;\n /** Whether the contributor account is a team account. */\n isTeam?: boolean | null;\n /** Date that the contributor joined the site. */\n joinedAt?: Date | null;\n /** Email address that received the invite. */\n invitedEmail?: string | null;\n /** Whether the contributor account is a client account. */\n isClient?: boolean | null;\n /**\n * Contributor's user ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n}\n\nexport interface PersonMetaData {\n /** Contributor's account ID. */\n _id?: string;\n /** Contributor's full name. */\n fullName?: string | null;\n /** URL for contributor's profile image. */\n imageUrl?: string | null;\n /** Contributor's email address. */\n email?: string | null;\n /** Contributor's access to assets and their assigned role (`policy`) for that asset. */\n assignments?: Assignment[];\n}\n\nexport interface Assignment {\n /** Role assigned to the user. */\n policy?: AssignedPolicy;\n /** Unique ID for this specific assignment. */\n assignmentId?: string;\n /** Identity assigned to the asset in an assignment, referred to as subject. Supported subjects include user IDs, account IDs, and app IDs. */\n subject?: Subject;\n}\n\nexport interface AssignedPolicy {\n /** Role ID. */\n policyId?: string;\n /** Role title. */\n title?: string | null;\n /** Role description. */\n description?: string | null;\n}\n\nexport interface Restriction extends RestrictionRestrictionsOneOf {\n /**\n * Deprecated.\n * @deprecated\n */\n resource?: Resource;\n /** List of conditions restricting the user's access. Currently only folder conditions are supported. */\n conditions?: Conditions;\n /** Site where the assignment restrictions apply. */\n site?: SiteRestriction;\n /** Location where the assignment restrictions apply. */\n locations?: LocationsRestriction;\n}\n\n/** @oneof */\nexport interface RestrictionRestrictionsOneOf {\n /**\n * Deprecated.\n * @deprecated\n */\n resource?: Resource;\n /** List of conditions restricting the user's access. Currently only folder conditions are supported. */\n conditions?: Conditions;\n /** Site where the assignment restrictions apply. */\n site?: SiteRestriction;\n /** Location where the assignment restrictions apply. */\n locations?: LocationsRestriction;\n}\n\nexport interface Resource {\n /** Resource type. */\n resourceType?: ResourceTypeWithLiterals;\n /** Resource ID. */\n _id?: string;\n value?: string | null;\n}\n\nexport enum ResourceType {\n UNKNOWN_RESOURCE_TYPE = 'UNKNOWN_RESOURCE_TYPE',\n SITE = 'SITE',\n}\n\n/** @enumType */\nexport type ResourceTypeWithLiterals =\n | ResourceType\n | 'UNKNOWN_RESOURCE_TYPE'\n | 'SITE';\n\nexport interface Conditions {\n /** List of conditions. */\n conditions?: Condition[];\n}\n\nexport interface Condition {\n /** Condition type. */\n conditionType?: ConditionAttributeTypeWithLiterals;\n /** Condition ID. */\n _id?: string;\n /** Expected value of the condition. When `conditionType` = \"FOLDER\", this is the folder path. */\n value?: string | null;\n}\n\nexport enum ConditionAttributeType {\n UNKNOWN_CONDITION_TYPE = 'UNKNOWN_CONDITION_TYPE',\n FOLDER = 'FOLDER',\n}\n\n/** @enumType */\nexport type ConditionAttributeTypeWithLiterals =\n | ConditionAttributeType\n | 'UNKNOWN_CONDITION_TYPE'\n | 'FOLDER';\n\nexport interface SiteRestriction {\n /** Site ID. */\n _id?: string;\n /** Site name. */\n value?: string | null;\n}\n\nexport interface CompanionResource {\n /** Asset ID (referred to here as resource ID). */\n _id?: string;\n /** Asset type (referred to here as resource type). as predefined in the authorization system */\n resourceType?: string;\n}\n\nexport interface LocationsRestriction {\n /**\n * Location IDs.\n * @format GUID\n * @maxSize 20\n */\n ids?: string[];\n}\n\nexport interface Subject {\n /** ID of identity assigned to the asset. */\n _id?: string;\n /** Type of identity assigned to the asset. Supported subject types include user IDs, account IDs, and app IDs. */\n subjectType?: SubjectTypeWithLiterals;\n /** Context of identity assigned to the asset. For example, a `subjectType` = `USER` will have `context` = `ACCOUNT`. */\n context?: SubjectContext;\n}\n\nexport enum SubjectType {\n UNKNOWN = 'UNKNOWN',\n ACCOUNT = 'ACCOUNT',\n USER = 'USER',\n USER_GROUP = 'USER_GROUP',\n MEMBER_GROUP = 'MEMBER_GROUP',\n VISITOR_GROUP = 'VISITOR_GROUP',\n EXTERNAL_APP = 'EXTERNAL_APP',\n ACCOUNT_GROUP = 'ACCOUNT_GROUP',\n WIX_APP = 'WIX_APP',\n}\n\n/** @enumType */\nexport type SubjectTypeWithLiterals =\n | SubjectType\n | 'UNKNOWN'\n | 'ACCOUNT'\n | 'USER'\n | 'USER_GROUP'\n | 'MEMBER_GROUP'\n | 'VISITOR_GROUP'\n | 'EXTERNAL_APP'\n | 'ACCOUNT_GROUP'\n | 'WIX_APP';\n\nexport interface SubjectContext {\n _id?: string;\n contextType?: SubjectContextTypeWithLiterals;\n}\n\nexport enum SubjectContextType {\n UNKNOWN_CTX = 'UNKNOWN_CTX',\n ORG_CTX = 'ORG_CTX',\n ACCOUNT_CTX = 'ACCOUNT_CTX',\n}\n\n/** @enumType */\nexport type SubjectContextTypeWithLiterals =\n | SubjectContextType\n | 'UNKNOWN_CTX'\n | 'ORG_CTX'\n | 'ACCOUNT_CTX';\n\nexport interface GetSiteContributorsRequest {\n /** The locale of the request. Defaults to en-us */\n locale?: string | null;\n}\n\nexport interface GetSiteContributorsResponse {\n users?: User[];\n teams?: Team[];\n invites?: SiteInvite[];\n policies?: Policy[];\n permissions?: string[];\n userId?: string;\n loggedInAccountId?: string;\n pendingOwner?: PendingOwner;\n contributorLimit?: ContributorLimit;\n predefinedRoles?: PredefinedRoles;\n}\n\nexport interface User {\n /** User ID. */\n _id?: string;\n /**\n * Deprecated.\n * @deprecated\n */\n roles?: string[];\n /** User's email address. */\n email?: string;\n /** User's name. */\n name?: Name;\n /** URL to user's profile image, when provided. */\n profileImage?: string | null;\n /** Date the user joined the team. */\n joinedTeamAt?: Date | null;\n /**\n * Deprecated.\n * @deprecated\n */\n policyIds?: string[];\n /** Resources the user can access. */\n assignments?: Assignment[];\n}\n\nexport interface Name {\n /** User's first name. */\n firstName?: string;\n /** User's last name. */\n lastName?: string;\n}\n\nexport interface Team {\n accountId?: string;\n accountInfo?: AccountInfo;\n policyIds?: string[];\n joinedAt?: Date | null;\n}\n\nexport interface AccountInfo {\n accountName?: string;\n accountImage?: string;\n isTeam?: boolean;\n}\n\nexport interface SiteInvite {\n /**\n * Invite ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Site ID the user is invited to as a collaborator.\n * @format GUID\n * @readonly\n */\n siteId?: string;\n /**\n * Email address where the invite was sent.\n * @format EMAIL\n */\n email?: string;\n /** Role IDs included in the invite. */\n policyIds?: string[];\n /**\n * Deprecated. Use `inviterAccountId`.\n * @readonly\n * @deprecated\n */\n inviterId?: string;\n /**\n * Invite Status.\n *\n * Supported values:\n * - **Pending:** The invite has been sent and is valid, waiting for the user's response.\n * - **Used:** The invite has been accepted.\n * - **Deleted:** The invite has been deleted or revoked.\n * - **Declined:** The user declined the invite.\n * - **Expired:** The invite has expired without being accepted.\n */\n status?: InviteStatusWithLiterals;\n /** Link to accept the invite. */\n acceptLink?: string;\n /**\n * Inviting account ID.\n * @format GUID\n * @readonly\n */\n inviterAccountId?: string;\n /**\n * Account ID that accepted the invite. Populated only once the invite is accepted.\n * @format GUID\n * @readonly\n */\n acceptedByAccountId?: string | null;\n /** Date the invite was created. */\n dateCreated?: Date | null;\n /**\n * User's Wix Bookings staff ID, if relevant.\n * @format GUID\n */\n staffId?: string | null;\n /** Invite expiration date */\n expirationDate?: Date | null;\n /**\n * Location ids included in the invite\n * @format GUID\n * @readonly\n * @maxSize 20\n */\n locationIds?: string[];\n}\n\n/** Invite status stating whether the invite was accepted, waiting to be accepted, deleted etc.. */\nexport enum InviteStatus {\n Pending = 'Pending',\n Used = 'Used',\n Deleted = 'Deleted',\n Declined = 'Declined',\n Expired = 'Expired',\n}\n\n/** @enumType */\nexport type InviteStatusWithLiterals =\n | InviteStatus\n | 'Pending'\n | 'Used'\n | 'Deleted'\n | 'Declined'\n | 'Expired';\n\nexport interface Policy {\n _id?: string;\n description?: string | null;\n name?: string | null;\n isCustom?: boolean;\n scopes?: string[];\n}\n\nexport interface PendingOwner {\n email?: string;\n expirationDate?: Date | null;\n acceptLink?: string;\n}\n\nexport interface ContributorLimit {\n contributorLimit?: number;\n}\n\nexport interface PredefinedRoles {\n roles?: PredefinedRole[];\n}\n\nexport interface PredefinedRole {\n titleKey?: string;\n roles?: Role[];\n title?: string | null;\n areaId?: string;\n}\n\nexport interface Role {\n _id?: string;\n deprecatedKey?: string;\n /** @deprecated */\n titleKey?: string;\n /** @deprecated */\n descriptionKey?: string;\n deprecated?: boolean;\n restrictFromLevel?: string;\n experiments?: string[];\n appDefIds?: string[];\n title?: string | null;\n description?: string | null;\n isCustom?: boolean;\n scopes?: string[];\n availableResourceTypes?: ResourceTypeWithLiterals[];\n availableConditions?: ConditionAttributeTypeWithLiterals[];\n limitToEditorTypes?: string[];\n}\n\nexport interface GetSiteContributorsV2Request {\n /** The locale of the request. Defaults to en-us. */\n locale?: string | null;\n /** The set of desired fields. */\n fields?: string[];\n}\n\nexport interface GetSiteContributorsV2Response {\n /** List of contributors of the given site. */\n contributors?: Contributor[];\n /** List of invites to contribute to the given site. */\n invites?: SiteInvite[];\n /** Quota information for contributors on the given site. */\n contributorsQuota?: ContributorsQuota;\n /** Pending owner information for the site. */\n pendingOwner?: PendingOwner;\n}\n\nexport interface ContributorsQuota extends ContributorsQuotaOptionsOneOf {\n /** Limited contributors quota details. */\n limitedOptions?: LimitedOptions;\n /** Type of contributors quota */\n type?: TypeWithLiterals;\n}\n\n/** @oneof */\nexport interface ContributorsQuotaOptionsOneOf {\n /** Limited contributors quota details. */\n limitedOptions?: LimitedOptions;\n}\n\n/** Enum to represent different types of contributors quota. */\nexport enum Type {\n UNKNOWN = 'UNKNOWN',\n LIMITED = 'LIMITED',\n UNLIMITED = 'UNLIMITED',\n}\n\n/** @enumType */\nexport type TypeWithLiterals = Type | 'UNKNOWN' | 'LIMITED' | 'UNLIMITED';\n\n/** Details for a limited contributors quota. */\nexport interface LimitedOptions {\n /** Maximum number of contributors allowed. */\n limit?: number;\n /** Number of accepted or pending invitations. */\n used?: number;\n}\n\nexport interface HandleSiteTransferRequest {\n originalOwnerAccountId?: string;\n newOwnerAccountId?: string;\n metaSiteId?: string;\n keepOriginalOwnerAsContributor?: boolean;\n}\n\nexport interface HandleSiteTransferResponse {}\n\nexport interface GetCurrentUserRolesRequest {\n /** The locale of the request. Defaults to en-us */\n locale?: string | null;\n}\n\nexport interface GetCurrentUserRolesResponse {\n roles?: LocalizedRole[];\n}\n\nexport interface LocalizedRole {\n name?: string;\n description?: string | null;\n}\n\nexport interface BulkGetUserRolesOnSiteRequest {\n /** @maxSize 5 */\n users?: UserSubject[];\n /** The locale of the request. Defaults to en-us */\n locale?: string | null;\n}\n\nexport interface UserSubject {\n userId?: string;\n accountId?: string;\n}\n\nexport interface BulkGetUserRolesOnSiteResponse {\n userRoles?: UserLocalizedRoles[];\n}\n\nexport interface UserLocalizedRoles {\n user?: UserSubject;\n roles?: LocalizedRole[];\n}\n\nexport interface BulkValidateEmailInviteEligibilityRequest {\n /**\n * List of emails to be checked for invite eligibility.\n * @minSize 1\n * @maxSize 10\n * @format EMAIL\n */\n emails?: string[];\n}\n\nexport interface BulkValidateEmailInviteEligibilityResponse {\n /** List of email invite eligibility results. */\n emailsEligibility?: EmailInviteEligibility[];\n}\n\nexport interface EmailInviteEligibility {\n /**\n * The email address being checked.\n * @format EMAIL\n */\n email?: string;\n /** Whether the email is eligible for an invite. */\n eligible?: boolean;\n}\n\nexport interface ChangeContributorRoleRequest {\n /**\n * Contributor's account ID.\n * @format GUID\n */\n accountId: string;\n /** New roles to assign to the contributor on the site. */\n newRoles: SiteRoleAssignment[];\n}\n\nexport interface SiteRoleAssignment {\n /** 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. */\n roleId?: string;\n /**\n * Assignment ID mapping the role to the contributor on the site.\n * @readonly\n */\n assignmentId?: string;\n}\n\nexport interface ChangeContributorRoleResponse {\n /** New roles assigned to the contributor on the site. */\n newAssignedRoles?: SiteRoleAssignment[];\n}\n\nexport interface ChangeContributorLocationRequest {\n /**\n * Contributor's account ID.\n * @format GUID\n */\n accountId: string;\n /**\n * New locations to assign to the contributor on the site.\n * @format GUID\n * @maxSize 20\n */\n newLocations: string[];\n}\n\nexport interface ChangeContributorLocationResponse {\n /**\n * New locations assigned to the contributor on the site.\n * @maxSize 20\n */\n newAssignedLocations?: SiteLocationAssignment[];\n}\n\nexport interface SiteLocationAssignment {\n /**\n * @format GUID\n * @maxSize 100\n */\n locationIds?: string[];\n /**\n * @readonly\n * @maxLength 20\n * @maxSize 999\n */\n assignmentIds?: string[];\n}\n\nexport interface QuerySiteContributorsRequest {\n filter?: QuerySiteContributorsFilter;\n}\n\nexport interface QuerySiteContributorsFilter {\n /**\n * 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.\n * @maxSize 20\n */\n policyIds?: string[];\n /**\n * Location IDs.\n * @format GUID\n * @maxSize 20\n */\n locationIds?: string[];\n}\n\nexport enum FieldSet {\n UNKNOWN = 'UNKNOWN',\n /** Include only `account_id` and `account_owner_id` fields. */\n META_DATA = 'META_DATA',\n}\n\n/** @enumType */\nexport type FieldSetWithLiterals = FieldSet | 'UNKNOWN' | 'META_DATA';\n\nexport interface QuerySiteContributorsResponse {\n /** List of site contributors. */\n contributors?: ContributorV2[];\n}\n\nexport interface ContributorV2 {\n /** Contributor's account ID. */\n accountId?: string | null;\n /** User ID of the owner of the account that the contributor has joined. */\n accountOwnerId?: string | null;\n}\n\nexport interface GetContributorsQuotaRequest {}\n\nexport interface GetContributorsQuotaResponse {\n /** Quota information for contributors on the given site. */\n contributorsQuota?: ContributorsQuota;\n}\n\nexport interface GetAppContributorsRequest {\n /** @format GUID */\n appId?: string;\n /** The locale of the request. Defaults to en-us. */\n locale?: string | null;\n}\n\nexport interface GetAppContributorsResponse {\n contributors?: Contributor[];\n invites?: AppInvite[];\n}\n\nexport interface AppInvite {\n /**\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * TODO: amitis - remove this comment after the next merge\n * @format EMAIL\n */\n destEmail?: string;\n /**\n * @readonly\n * @maxLength 20\n */\n status?: string;\n /**\n * @format WEB_URL\n * @readonly\n */\n acceptLink?: string;\n /** @maxLength 50 */\n invitePurpose?: string | null;\n /** @maxSize 10 */\n policies?: AssignedPolicy[];\n /** @readonly */\n expirationDate?: Date | null;\n /** @readonly */\n dateCreated?: Date | null;\n /** @readonly */\n dateUpdated?: Date | null;\n}\n\ntype ContributorNonNullablePaths =\n | `metaData._id`\n | `metaData.assignments`\n | `metaData.assignments.${number}.policy.policyId`\n | `metaData.assignments.${number}.assignmentId`\n | `metaData.assignments.${number}.subject._id`\n | `metaData.assignments.${number}.subject.subjectType`\n | `metaData.assignments.${number}.subject.context._id`\n | `metaData.assignments.${number}.subject.context.contextType`\n | `_id`;\n\n/**\n * returns a list of all the contributors + invites to be contributors of a given meta site ID taken from the\n * context.\n * @internal\n * @documentationMaturity preview\n * @permissionId site-users.view-users\n * @applicableIdentity APP\n * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.GetSiteContributorsV2\n */\nexport async function getSiteContributorsV2(\n options?: GetSiteContributorsV2Options\n): Promise<\n NonNullablePaths<\n GetSiteContributorsV2Response,\n | {\n [P in ContributorNonNullablePaths]: `contributors.${number}.${P}`;\n }[ContributorNonNullablePaths]\n | `invites`\n | `invites.${number}._id`\n | `invites.${number}.siteId`\n | `invites.${number}.email`\n | `invites.${number}.inviterId`\n | `invites.${number}.status`\n | `invites.${number}.acceptLink`\n | `invites.${number}.inviterAccountId`\n | `contributorsQuota.limitedOptions.limit`\n | `contributorsQuota.limitedOptions.used`\n | `contributorsQuota.type`\n | `pendingOwner.email`\n | `pendingOwner.acceptLink`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n locale: options?.locale,\n fields: options?.fields,\n });\n\n const reqOpts =\n ambassadorWixIdentityV1Contributor.getSiteContributorsV2(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n locale: '$[0].locale',\n fields: '$[0].fields',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSiteContributorsV2Options {\n /** The locale of the request. Defaults to en-us. */\n locale?: string | null;\n /** The set of desired fields. */\n fields?: string[];\n}\n\n/**\n * Overrides all the roles of a contributor for the specified site.\n * @param accountId - Contributor's account ID.\n * @public\n * @requiredField accountId\n * @requiredField options\n * @requiredField options.newRoles\n * @param options - Filter options. The `newRoles` field **must** be passed.\n * @permissionId SITE_ROLES.CHANGE_ROLE\n * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.ChangeRole\n */\nexport async function changeRole(\n accountId: string,\n options: NonNullablePaths<ChangeRoleOptions, `newRoles`>\n): Promise<\n NonNullablePaths<\n ChangeContributorRoleResponse,\n | `newAssignedRoles`\n | `newAssignedRoles.${number}.roleId`\n | `newAssignedRoles.${number}.assignmentId`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n accountId: accountId,\n newRoles: options?.newRoles,\n });\n\n const reqOpts = ambassadorWixIdentityV1Contributor.changeRole(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n accountId: '$[0]',\n newRoles: '$[1].newRoles',\n },\n singleArgumentUnchanged: false,\n },\n ['accountId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ChangeRoleOptions {\n /** New roles to assign to the contributor on the site. */\n newRoles: SiteRoleAssignment[];\n}\n\n/** @param accountId - Contributor's account ID.\n * @public\n * @documentationMaturity preview\n * @requiredField accountId\n * @requiredField options\n * @requiredField options.newLocations\n * @permissionId SITE_ROLES.CHANGE_LOCATION\n * @applicableIdentity APP\n * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.ChangeContributorLocation\n */\nexport async function changeContributorLocation(\n accountId: string,\n options: NonNullablePaths<ChangeContributorLocationOptions, `newLocations`>\n): Promise<\n NonNullablePaths<ChangeContributorLocationResponse, `newAssignedLocations`>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n accountId: accountId,\n newLocations: options?.newLocations,\n });\n\n const reqOpts =\n ambassadorWixIdentityV1Contributor.changeContributorLocation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n accountId: '$[0]',\n newLocations: '$[1].newLocations',\n },\n singleArgumentUnchanged: false,\n },\n ['accountId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ChangeContributorLocationOptions {\n /**\n * New locations to assign to the contributor on the site.\n * @format GUID\n * @maxSize 20\n */\n newLocations: string[];\n}\n\n/**\n * Retrieves a list of contributors for the specified site, given the provided filters.\n * @public\n * @param options - Filter options.\n * @permissionId site-users.view-users\n * @applicableIdentity APP\n * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.QuerySiteContributors\n */\nexport async function querySiteContributors(\n options?: QuerySiteContributorsOptions\n): Promise<NonNullablePaths<QuerySiteContributorsResponse, `contributors`>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n });\n\n const reqOpts =\n ambassadorWixIdentityV1Contributor.querySiteContributors(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { filter: '$[0].filter' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface QuerySiteContributorsOptions {\n filter?: QuerySiteContributorsFilter;\n}\n\n/**\n * returns the quota information for contributors on the given site.\n * @internal\n * @documentationMaturity preview\n * @permissionId site-users.view-users\n * @applicableIdentity APP\n * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.GetContributorsQuota\n */\nexport async function getContributorsQuota(): Promise<\n NonNullablePaths<\n GetContributorsQuotaResponse,\n | `contributorsQuota.limitedOptions.limit`\n | `contributorsQuota.limitedOptions.used`\n | `contributorsQuota.type`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixIdentityV1Contributor.getContributorsQuota(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/contributors/accept',\n destPath: '/contributors/accept',\n },\n {\n srcPath: '/roles-management-web',\n destPath: '',\n },\n {\n srcPath: '/team/accept',\n destPath: '/team/accept',\n },\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n {\n srcPath: '/app/accept',\n destPath: '/app/accept',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/roles-management-web',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n {\n srcPath: '/roles-management-web',\n destPath: '',\n },\n {\n srcPath: '/contributors/accept',\n destPath: '/contributors/accept',\n },\n {\n srcPath: '/team/accept',\n destPath: '/team/accept',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n ],\n 'platform.rise.ai': [\n {\n srcPath: '/v2/contributors',\n destPath: '/v2/contributors',\n },\n {\n srcPath: '/contributor/change/role',\n destPath: '/contributor/change/role',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/roles-management',\n destPath: '',\n },\n {\n srcPath: '/roles-management-web',\n destPath: '',\n },\n {\n srcPath: '/roles-management/roles',\n destPath: '/roles',\n },\n {\n srcPath: '/roles-management/team',\n destPath: '/team',\n },\n {\n srcPath: '/roles-management/v3/team',\n destPath: '/v3/team',\n },\n {\n srcPath: '/roles-management/v2/team',\n destPath: '/v2/team',\n },\n {\n srcPath: '/roles-management/contributor/change',\n destPath: '/contributor/change',\n },\n {\n srcPath: '/roles-management/v2/contributors',\n destPath: '/v2/contributors',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_user-management_contributors';\n\n/**\n * returns a list of all the contributors + invites to be contributors of a given meta site ID taken from the\n * context.\n */\nexport function getSiteContributorsV2(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSiteContributorsV2({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fields' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.identity.v1.contributor',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.roles.management.api.SiteRolesManagementService.GetSiteContributorsV2',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({\n protoPath: '/v2/contributors',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'contributors.joinedAt' },\n { path: 'invites.dateCreated' },\n { path: 'invites.expirationDate' },\n { path: 'pendingOwner.expirationDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getSiteContributorsV2;\n}\n\n/** Overrides all the roles of a contributor for the specified site. */\nexport function changeRole(payload: object): RequestOptionsFactory<any> {\n function __changeRole({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.v1.contributor',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.roles.management.api.SiteRolesManagementService.ChangeRole',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({\n protoPath: '/contributor/change/role',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __changeRole;\n}\n\nexport function changeContributorLocation(\n payload: object\n): RequestOptionsFactory<any> {\n function __changeContributorLocation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.v1.contributor',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.roles.management.api.SiteRolesManagementService.ChangeContributorLocation',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({\n protoPath: '/contributor/change/locations',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __changeContributorLocation;\n}\n\n/** Retrieves a list of contributors for the specified site, given the provided filters. */\nexport function querySiteContributors(\n payload: object\n): RequestOptionsFactory<any> {\n function __querySiteContributors({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.v1.contributor',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.roles.management.api.SiteRolesManagementService.QuerySiteContributors',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({\n protoPath: '/v2/contributors/query',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __querySiteContributors;\n}\n\n/** returns the quota information for contributors on the given site. */\nexport function getContributorsQuota(\n payload: object\n): RequestOptionsFactory<any> {\n function __getContributorsQuota({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.v1.contributor',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.roles.management.api.SiteRolesManagementService.GetContributorsQuota',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({\n protoPath: '/v2/contributors/quota',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getContributorsQuota;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ChangeContributorLocationOptions,\n ChangeContributorLocationResponse,\n ChangeContributorRoleResponse,\n ChangeRoleOptions,\n GetContributorsQuotaResponse,\n GetSiteContributorsV2Options,\n GetSiteContributorsV2Response,\n QuerySiteContributorsOptions,\n QuerySiteContributorsResponse,\n changeContributorLocation as universalChangeContributorLocation,\n changeRole as universalChangeRole,\n getContributorsQuota as universalGetContributorsQuota,\n getSiteContributorsV2 as universalGetSiteContributorsV2,\n querySiteContributors as universalQuerySiteContributors,\n} from './identity-v1-contributor-contributors.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/user-management' };\n\ntype ContributorNonNullablePaths =\n | `metaData._id`\n | `metaData.assignments`\n | `metaData.assignments.${number}.policy.policyId`\n | `metaData.assignments.${number}.assignmentId`\n | `metaData.assignments.${number}.subject._id`\n | `metaData.assignments.${number}.subject.subjectType`\n | `metaData.assignments.${number}.subject.context._id`\n | `metaData.assignments.${number}.subject.context.contextType`\n | `_id`;\n\n/** @internal */\nexport function getSiteContributorsV2(\n httpClient: HttpClient\n): GetSiteContributorsV2Signature {\n return (options?: GetSiteContributorsV2Options) =>\n universalGetSiteContributorsV2(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetSiteContributorsV2Signature {\n /**\n * returns a list of all the contributors + invites to be contributors of a given meta site ID taken from the\n * context.\n */\n (options?: GetSiteContributorsV2Options): Promise<\n NonNullablePaths<\n GetSiteContributorsV2Response,\n | {\n [P in ContributorNonNullablePaths]: `contributors.${number}.${P}`;\n }[ContributorNonNullablePaths]\n | `invites`\n | `invites.${number}._id`\n | `invites.${number}.siteId`\n | `invites.${number}.email`\n | `invites.${number}.inviterId`\n | `invites.${number}.status`\n | `invites.${number}.acceptLink`\n | `invites.${number}.inviterAccountId`\n | `contributorsQuota.limitedOptions.limit`\n | `contributorsQuota.limitedOptions.used`\n | `contributorsQuota.type`\n | `pendingOwner.email`\n | `pendingOwner.acceptLink`\n >\n >;\n}\n\nexport function changeRole(httpClient: HttpClient): ChangeRoleSignature {\n return (\n accountId: string,\n options: NonNullablePaths<ChangeRoleOptions, `newRoles`>\n ) =>\n universalChangeRole(\n accountId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ChangeRoleSignature {\n /**\n * Overrides all the roles of a contributor for the specified site.\n * @param - Contributor's account ID.\n * @param - Filter options. The `newRoles` field **must** be passed.\n */\n (\n accountId: string,\n options: NonNullablePaths<ChangeRoleOptions, `newRoles`>\n ): Promise<\n NonNullablePaths<\n ChangeContributorRoleResponse,\n | `newAssignedRoles`\n | `newAssignedRoles.${number}.roleId`\n | `newAssignedRoles.${number}.assignmentId`\n >\n >;\n}\n\nexport function changeContributorLocation(\n httpClient: HttpClient\n): ChangeContributorLocationSignature {\n return (\n accountId: string,\n options: NonNullablePaths<ChangeContributorLocationOptions, `newLocations`>\n ) =>\n universalChangeContributorLocation(\n accountId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ChangeContributorLocationSignature {\n /** @param - Contributor's account ID. */\n (\n accountId: string,\n options: NonNullablePaths<ChangeContributorLocationOptions, `newLocations`>\n ): Promise<\n NonNullablePaths<ChangeContributorLocationResponse, `newAssignedLocations`>\n >;\n}\n\nexport function querySiteContributors(\n httpClient: HttpClient\n): QuerySiteContributorsSignature {\n return (options?: QuerySiteContributorsOptions) =>\n universalQuerySiteContributors(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QuerySiteContributorsSignature {\n /**\n * Retrieves a list of contributors for the specified site, given the provided filters.\n * @param - Filter options.\n */\n (options?: QuerySiteContributorsOptions): Promise<\n NonNullablePaths<QuerySiteContributorsResponse, `contributors`>\n >;\n}\n\n/** @internal */\nexport function getContributorsQuota(\n httpClient: HttpClient\n): GetContributorsQuotaSignature {\n return () =>\n universalGetContributorsQuota(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetContributorsQuotaSignature {\n /**\n * returns the quota information for contributors on the given site.\n */\n (): Promise<\n NonNullablePaths<\n GetContributorsQuotaResponse,\n | `contributorsQuota.limitedOptions.limit`\n | `contributorsQuota.limitedOptions.used`\n | `contributorsQuota.type`\n >\n >;\n}\n\nexport {\n AccountInfo,\n AppInvite,\n AssignedPolicy,\n Assignment,\n BulkGetUserRolesOnSiteRequest,\n BulkGetUserRolesOnSiteResponse,\n BulkValidateEmailInviteEligibilityRequest,\n BulkValidateEmailInviteEligibilityResponse,\n ChangeContributorLocationOptions,\n ChangeContributorLocationRequest,\n ChangeContributorLocationResponse,\n ChangeContributorRoleRequest,\n ChangeContributorRoleResponse,\n ChangeRoleOptions,\n CompanionResource,\n Condition,\n ConditionAttributeType,\n Conditions,\n Contributor,\n ContributorLimit,\n ContributorV2,\n ContributorsQuota,\n ContributorsQuotaOptionsOneOf,\n EmailInviteEligibility,\n FieldSet,\n GetAppContributorsRequest,\n GetAppContributorsResponse,\n GetContributorsQuotaRequest,\n GetContributorsQuotaResponse,\n GetCurrentUserRolesRequest,\n GetCurrentUserRolesResponse,\n GetSiteContributorsRequest,\n GetSiteContributorsResponse,\n GetSiteContributorsV2Options,\n GetSiteContributorsV2Request,\n GetSiteContributorsV2Response,\n HandleSiteTransferRequest,\n HandleSiteTransferResponse,\n InviteStatus,\n LimitedOptions,\n LocalizedRole,\n LocationsRestriction,\n Name,\n PendingOwner,\n PersonMetaData,\n Policy,\n PredefinedRole,\n PredefinedRoles,\n QuerySiteContributorsFilter,\n QuerySiteContributorsOptions,\n QuerySiteContributorsRequest,\n QuerySiteContributorsResponse,\n Resource,\n ResourceType,\n Restriction,\n RestrictionRestrictionsOneOf,\n Role,\n SiteInvite,\n SiteLocationAssignment,\n SiteRestriction,\n SiteRoleAssignment,\n Subject,\n SubjectContext,\n SubjectContextType,\n SubjectType,\n Team,\n Type,\n User,\n UserLocalizedRoles,\n UserSubject,\n} from './identity-v1-contributor-contributors.universal.js';\n","import {\n getSiteContributorsV2 as publicGetSiteContributorsV2,\n changeRole as publicChangeRole,\n changeContributorLocation as publicChangeContributorLocation,\n querySiteContributors as publicQuerySiteContributors,\n getContributorsQuota as publicGetContributorsQuota,\n} from './identity-v1-contributor-contributors.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\n/** @internal */\nexport const getSiteContributorsV2: MaybeContext<\n BuildRESTFunction<typeof publicGetSiteContributorsV2> &\n typeof publicGetSiteContributorsV2\n> = /*#__PURE__*/ createRESTModule(publicGetSiteContributorsV2);\nexport const changeRole: MaybeContext<\n BuildRESTFunction<typeof publicChangeRole> & typeof publicChangeRole\n> = /*#__PURE__*/ createRESTModule(publicChangeRole);\nexport const changeContributorLocation: MaybeContext<\n BuildRESTFunction<typeof publicChangeContributorLocation> &\n typeof publicChangeContributorLocation\n> = /*#__PURE__*/ createRESTModule(publicChangeContributorLocation);\nexport const querySiteContributors: MaybeContext<\n BuildRESTFunction<typeof publicQuerySiteContributors> &\n typeof publicQuerySiteContributors\n> = /*#__PURE__*/ createRESTModule(publicQuerySiteContributors);\n/** @internal */\nexport const getContributorsQuota: MaybeContext<\n BuildRESTFunction<typeof publicGetContributorsQuota> &\n typeof publicGetContributorsQuota\n> = /*#__PURE__*/ createRESTModule(publicGetContributorsQuota);\n\nexport {\n ResourceType,\n ConditionAttributeType,\n SubjectType,\n SubjectContextType,\n InviteStatus,\n Type,\n FieldSet,\n} from './identity-v1-contributor-contributors.universal.js';\nexport {\n Contributor,\n PersonMetaData,\n Assignment,\n AssignedPolicy,\n Restriction,\n RestrictionRestrictionsOneOf,\n Resource,\n Conditions,\n Condition,\n SiteRestriction,\n CompanionResource,\n LocationsRestriction,\n Subject,\n SubjectContext,\n GetSiteContributorsRequest,\n GetSiteContributorsResponse,\n User,\n Name,\n Team,\n AccountInfo,\n SiteInvite,\n Policy,\n PendingOwner,\n ContributorLimit,\n PredefinedRoles,\n PredefinedRole,\n Role,\n GetSiteContributorsV2Request,\n GetSiteContributorsV2Response,\n ContributorsQuota,\n ContributorsQuotaOptionsOneOf,\n LimitedOptions,\n HandleSiteTransferRequest,\n HandleSiteTransferResponse,\n GetCurrentUserRolesRequest,\n GetCurrentUserRolesResponse,\n LocalizedRole,\n BulkGetUserRolesOnSiteRequest,\n UserSubject,\n BulkGetUserRolesOnSiteResponse,\n UserLocalizedRoles,\n BulkValidateEmailInviteEligibilityRequest,\n BulkValidateEmailInviteEligibilityResponse,\n EmailInviteEligibility,\n ChangeContributorRoleRequest,\n SiteRoleAssignment,\n ChangeContributorRoleResponse,\n ChangeContributorLocationRequest,\n ChangeContributorLocationResponse,\n SiteLocationAssignment,\n QuerySiteContributorsRequest,\n QuerySiteContributorsFilter,\n QuerySiteContributorsResponse,\n ContributorV2,\n GetContributorsQuotaRequest,\n GetContributorsQuotaResponse,\n GetAppContributorsRequest,\n GetAppContributorsResponse,\n AppInvite,\n GetSiteContributorsV2Options,\n ChangeRoleOptions,\n ChangeContributorLocationOptions,\n QuerySiteContributorsOptions,\n} from './identity-v1-contributor-contributors.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mCAAAA;AAAA,EAAA,kBAAAC;AAAA,EAAA,4BAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,6BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,kEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;A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M;AAAA,EACR;AACF;;;AE97BO,SAASK,uBACd,YACgC;AAChC,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA8BO,SAASC,YAAW,YAA6C;AACtE,SAAO,CACL,WACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAqBO,SAASC,2BACd,YACoC;AACpC,SAAO,CACL,WACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAYO,SAASC,uBACd,YACgC;AAChC,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAaO,SAASC,sBACd,YAC+B;AAC/B,SAAO,MACLA;AAAA;AAAA,IAEE,EAAE,WAAW;AAAA,EACf;AACJ;;;ACvJA,IAAAC,uBAAiC;AAI1B,IAAMC,yBAGK,2DAAiBA,sBAA2B;AACvD,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,6BAGK,2DAAiBA,0BAA+B;AAC3D,IAAMC,yBAGK,2DAAiBA,sBAA2B;AAEvD,IAAMC,wBAGK,2DAAiBA,qBAA0B;","names":["changeContributorLocation","changeRole","getContributorsQuota","getSiteContributorsV2","querySiteContributors","import_rest_modules","payload","ResourceType","ConditionAttributeType","SubjectType","SubjectContextType","InviteStatus","Type","FieldSet","getSiteContributorsV2","sdkTransformError","changeRole","changeContributorLocation","querySiteContributors","getContributorsQuota","getSiteContributorsV2","changeRole","changeContributorLocation","querySiteContributors","getContributorsQuota","import_rest_modules","getSiteContributorsV2","changeRole","changeContributorLocation","querySiteContributors","getContributorsQuota"]}
|
|
@@ -347,6 +347,8 @@ interface GetSiteContributorsV2Response {
|
|
|
347
347
|
invites?: SiteInvite[];
|
|
348
348
|
/** Quota information for contributors on the given site. */
|
|
349
349
|
contributorsQuota?: ContributorsQuota;
|
|
350
|
+
/** Pending owner information for the site. */
|
|
351
|
+
pendingOwner?: PendingOwner;
|
|
350
352
|
}
|
|
351
353
|
interface ContributorsQuota extends ContributorsQuotaOptionsOneOf {
|
|
352
354
|
/** Limited contributors quota details. */
|
|
@@ -190,7 +190,8 @@ function getSiteContributorsV2(payload) {
|
|
|
190
190
|
paths: [
|
|
191
191
|
{ path: "contributors.joinedAt" },
|
|
192
192
|
{ path: "invites.dateCreated" },
|
|
193
|
-
{ path: "invites.expirationDate" }
|
|
193
|
+
{ path: "invites.expirationDate" },
|
|
194
|
+
{ path: "pendingOwner.expirationDate" }
|
|
194
195
|
]
|
|
195
196
|
}
|
|
196
197
|
])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.typings.ts","../../src/identity-v1-contributor-contributors.universal.ts","../../src/identity-v1-contributor-contributors.http.ts"],"sourcesContent":["export * from './src/identity-v1-contributor-contributors.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixIdentityV1Contributor from './identity-v1-contributor-contributors.http.js';\n\nexport interface Contributor {\n /** Contributor's metadata. */\n metaData?: PersonMetaData;\n /** Whether the contributor account is a team account. */\n isTeam?: boolean | null;\n /** Date that the contributor joined the site. */\n joinedAt?: Date | null;\n /** Email address that received the invite. */\n invitedEmail?: string | null;\n /** Whether the contributor account is a client account. */\n isClient?: boolean | null;\n /**\n * Contributor's user ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n}\n\nexport interface PersonMetaData {\n /** Contributor's account ID. */\n _id?: string;\n /** Contributor's full name. */\n fullName?: string | null;\n /** URL for contributor's profile image. */\n imageUrl?: string | null;\n /** Contributor's email address. */\n email?: string | null;\n /** Contributor's access to assets and their assigned role (`policy`) for that asset. */\n assignments?: Assignment[];\n}\n\nexport interface Assignment {\n /** Role assigned to the user. */\n policy?: AssignedPolicy;\n /** Unique ID for this specific assignment. */\n assignmentId?: string;\n /** Identity assigned to the asset in an assignment, referred to as subject. Supported subjects include user IDs, account IDs, and app IDs. */\n subject?: Subject;\n}\n\nexport interface AssignedPolicy {\n /** Role ID. */\n policyId?: string;\n /** Role title. */\n title?: string | null;\n /** Role description. */\n description?: string | null;\n}\n\nexport interface Restriction extends RestrictionRestrictionsOneOf {\n /**\n * Deprecated.\n * @deprecated\n */\n resource?: Resource;\n /** List of conditions restricting the user's access. Currently only folder conditions are supported. */\n conditions?: Conditions;\n /** Site where the assignment restrictions apply. */\n site?: SiteRestriction;\n /** Location where the assignment restrictions apply. */\n locations?: LocationsRestriction;\n}\n\n/** @oneof */\nexport interface RestrictionRestrictionsOneOf {\n /**\n * Deprecated.\n * @deprecated\n */\n resource?: Resource;\n /** List of conditions restricting the user's access. Currently only folder conditions are supported. */\n conditions?: Conditions;\n /** Site where the assignment restrictions apply. */\n site?: SiteRestriction;\n /** Location where the assignment restrictions apply. */\n locations?: LocationsRestriction;\n}\n\nexport interface Resource {\n /** Resource type. */\n resourceType?: ResourceTypeWithLiterals;\n /** Resource ID. */\n _id?: string;\n value?: string | null;\n}\n\nexport enum ResourceType {\n UNKNOWN_RESOURCE_TYPE = 'UNKNOWN_RESOURCE_TYPE',\n SITE = 'SITE',\n}\n\n/** @enumType */\nexport type ResourceTypeWithLiterals =\n | ResourceType\n | 'UNKNOWN_RESOURCE_TYPE'\n | 'SITE';\n\nexport interface Conditions {\n /** List of conditions. */\n conditions?: Condition[];\n}\n\nexport interface Condition {\n /** Condition type. */\n conditionType?: ConditionAttributeTypeWithLiterals;\n /** Condition ID. */\n _id?: string;\n /** Expected value of the condition. When `conditionType` = \"FOLDER\", this is the folder path. */\n value?: string | null;\n}\n\nexport enum ConditionAttributeType {\n UNKNOWN_CONDITION_TYPE = 'UNKNOWN_CONDITION_TYPE',\n FOLDER = 'FOLDER',\n}\n\n/** @enumType */\nexport type ConditionAttributeTypeWithLiterals =\n | ConditionAttributeType\n | 'UNKNOWN_CONDITION_TYPE'\n | 'FOLDER';\n\nexport interface SiteRestriction {\n /** Site ID. */\n _id?: string;\n /** Site name. */\n value?: string | null;\n}\n\nexport interface CompanionResource {\n /** Asset ID (referred to here as resource ID). */\n _id?: string;\n /** Asset type (referred to here as resource type). as predefined in the authorization system */\n resourceType?: string;\n}\n\nexport interface LocationsRestriction {\n /**\n * Location IDs.\n * @format GUID\n * @maxSize 20\n */\n ids?: string[];\n}\n\nexport interface Subject {\n /** ID of identity assigned to the asset. */\n _id?: string;\n /** Type of identity assigned to the asset. Supported subject types include user IDs, account IDs, and app IDs. */\n subjectType?: SubjectTypeWithLiterals;\n /** Context of identity assigned to the asset. For example, a `subjectType` = `USER` will have `context` = `ACCOUNT`. */\n context?: SubjectContext;\n}\n\nexport enum SubjectType {\n UNKNOWN = 'UNKNOWN',\n ACCOUNT = 'ACCOUNT',\n USER = 'USER',\n USER_GROUP = 'USER_GROUP',\n MEMBER_GROUP = 'MEMBER_GROUP',\n VISITOR_GROUP = 'VISITOR_GROUP',\n EXTERNAL_APP = 'EXTERNAL_APP',\n ACCOUNT_GROUP = 'ACCOUNT_GROUP',\n WIX_APP = 'WIX_APP',\n}\n\n/** @enumType */\nexport type SubjectTypeWithLiterals =\n | SubjectType\n | 'UNKNOWN'\n | 'ACCOUNT'\n | 'USER'\n | 'USER_GROUP'\n | 'MEMBER_GROUP'\n | 'VISITOR_GROUP'\n | 'EXTERNAL_APP'\n | 'ACCOUNT_GROUP'\n | 'WIX_APP';\n\nexport interface SubjectContext {\n _id?: string;\n contextType?: SubjectContextTypeWithLiterals;\n}\n\nexport enum SubjectContextType {\n UNKNOWN_CTX = 'UNKNOWN_CTX',\n ORG_CTX = 'ORG_CTX',\n ACCOUNT_CTX = 'ACCOUNT_CTX',\n}\n\n/** @enumType */\nexport type SubjectContextTypeWithLiterals =\n | SubjectContextType\n | 'UNKNOWN_CTX'\n | 'ORG_CTX'\n | 'ACCOUNT_CTX';\n\nexport interface GetSiteContributorsRequest {\n /** The locale of the request. Defaults to en-us */\n locale?: string | null;\n}\n\nexport interface GetSiteContributorsResponse {\n users?: User[];\n teams?: Team[];\n invites?: SiteInvite[];\n policies?: Policy[];\n permissions?: string[];\n userId?: string;\n loggedInAccountId?: string;\n pendingOwner?: PendingOwner;\n contributorLimit?: ContributorLimit;\n predefinedRoles?: PredefinedRoles;\n}\n\nexport interface User {\n /** User ID. */\n _id?: string;\n /**\n * Deprecated.\n * @deprecated\n */\n roles?: string[];\n /** User's email address. */\n email?: string;\n /** User's name. */\n name?: Name;\n /** URL to user's profile image, when provided. */\n profileImage?: string | null;\n /** Date the user joined the team. */\n joinedTeamAt?: Date | null;\n /**\n * Deprecated.\n * @deprecated\n */\n policyIds?: string[];\n /** Resources the user can access. */\n assignments?: Assignment[];\n}\n\nexport interface Name {\n /** User's first name. */\n firstName?: string;\n /** User's last name. */\n lastName?: string;\n}\n\nexport interface Team {\n accountId?: string;\n accountInfo?: AccountInfo;\n policyIds?: string[];\n joinedAt?: Date | null;\n}\n\nexport interface AccountInfo {\n accountName?: string;\n accountImage?: string;\n isTeam?: boolean;\n}\n\nexport interface SiteInvite {\n /**\n * Invite ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Site ID the user is invited to as a collaborator.\n * @format GUID\n * @readonly\n */\n siteId?: string;\n /**\n * Email address where the invite was sent.\n * @format EMAIL\n */\n email?: string;\n /** Role IDs included in the invite. */\n policyIds?: string[];\n /**\n * Deprecated. Use `inviterAccountId`.\n * @readonly\n * @deprecated\n */\n inviterId?: string;\n /**\n * Invite Status.\n *\n * Supported values:\n * - **Pending:** The invite has been sent and is valid, waiting for the user's response.\n * - **Used:** The invite has been accepted.\n * - **Deleted:** The invite has been deleted or revoked.\n * - **Declined:** The user declined the invite.\n * - **Expired:** The invite has expired without being accepted.\n */\n status?: InviteStatusWithLiterals;\n /** Link to accept the invite. */\n acceptLink?: string;\n /**\n * Inviting account ID.\n * @format GUID\n * @readonly\n */\n inviterAccountId?: string;\n /**\n * Account ID that accepted the invite. Populated only once the invite is accepted.\n * @format GUID\n * @readonly\n */\n acceptedByAccountId?: string | null;\n /** Date the invite was created. */\n dateCreated?: Date | null;\n /**\n * User's Wix Bookings staff ID, if relevant.\n * @format GUID\n */\n staffId?: string | null;\n /** Invite expiration date */\n expirationDate?: Date | null;\n /**\n * Location ids included in the invite\n * @format GUID\n * @readonly\n * @maxSize 20\n */\n locationIds?: string[];\n}\n\n/** Invite status stating whether the invite was accepted, waiting to be accepted, deleted etc.. */\nexport enum InviteStatus {\n Pending = 'Pending',\n Used = 'Used',\n Deleted = 'Deleted',\n Declined = 'Declined',\n Expired = 'Expired',\n}\n\n/** @enumType */\nexport type InviteStatusWithLiterals =\n | InviteStatus\n | 'Pending'\n | 'Used'\n | 'Deleted'\n | 'Declined'\n | 'Expired';\n\nexport interface Policy {\n _id?: string;\n description?: string | null;\n name?: string | null;\n isCustom?: boolean;\n scopes?: string[];\n}\n\nexport interface PendingOwner {\n email?: string;\n expirationDate?: Date | null;\n acceptLink?: string;\n}\n\nexport interface ContributorLimit {\n contributorLimit?: number;\n}\n\nexport interface PredefinedRoles {\n roles?: PredefinedRole[];\n}\n\nexport interface PredefinedRole {\n titleKey?: string;\n roles?: Role[];\n title?: string | null;\n areaId?: string;\n}\n\nexport interface Role {\n _id?: string;\n deprecatedKey?: string;\n /** @deprecated */\n titleKey?: string;\n /** @deprecated */\n descriptionKey?: string;\n deprecated?: boolean;\n restrictFromLevel?: string;\n experiments?: string[];\n appDefIds?: string[];\n title?: string | null;\n description?: string | null;\n isCustom?: boolean;\n scopes?: string[];\n availableResourceTypes?: ResourceTypeWithLiterals[];\n availableConditions?: ConditionAttributeTypeWithLiterals[];\n limitToEditorTypes?: string[];\n}\n\nexport interface GetSiteContributorsV2Request {\n /** The locale of the request. Defaults to en-us. */\n locale?: string | null;\n /** The set of desired fields. */\n fields?: string[];\n}\n\nexport interface GetSiteContributorsV2Response {\n /** List of contributors of the given site. */\n contributors?: Contributor[];\n /** List of invites to contribute to the given site. */\n invites?: SiteInvite[];\n /** Quota information for contributors on the given site. */\n contributorsQuota?: ContributorsQuota;\n}\n\nexport interface ContributorsQuota extends ContributorsQuotaOptionsOneOf {\n /** Limited contributors quota details. */\n limitedOptions?: LimitedOptions;\n /** Type of contributors quota */\n type?: TypeWithLiterals;\n}\n\n/** @oneof */\nexport interface ContributorsQuotaOptionsOneOf {\n /** Limited contributors quota details. */\n limitedOptions?: LimitedOptions;\n}\n\n/** Enum to represent different types of contributors quota. */\nexport enum Type {\n UNKNOWN = 'UNKNOWN',\n LIMITED = 'LIMITED',\n UNLIMITED = 'UNLIMITED',\n}\n\n/** @enumType */\nexport type TypeWithLiterals = Type | 'UNKNOWN' | 'LIMITED' | 'UNLIMITED';\n\n/** Details for a limited contributors quota. */\nexport interface LimitedOptions {\n /** Maximum number of contributors allowed. */\n limit?: number;\n /** Number of accepted or pending invitations. */\n used?: number;\n}\n\nexport interface HandleSiteTransferRequest {\n originalOwnerAccountId?: string;\n newOwnerAccountId?: string;\n metaSiteId?: string;\n keepOriginalOwnerAsContributor?: boolean;\n}\n\nexport interface HandleSiteTransferResponse {}\n\nexport interface GetCurrentUserRolesRequest {\n /** The locale of the request. Defaults to en-us */\n locale?: string | null;\n}\n\nexport interface GetCurrentUserRolesResponse {\n roles?: LocalizedRole[];\n}\n\nexport interface LocalizedRole {\n name?: string;\n description?: string | null;\n}\n\nexport interface BulkGetUserRolesOnSiteRequest {\n /** @maxSize 5 */\n users?: UserSubject[];\n /** The locale of the request. Defaults to en-us */\n locale?: string | null;\n}\n\nexport interface UserSubject {\n userId?: string;\n accountId?: string;\n}\n\nexport interface BulkGetUserRolesOnSiteResponse {\n userRoles?: UserLocalizedRoles[];\n}\n\nexport interface UserLocalizedRoles {\n user?: UserSubject;\n roles?: LocalizedRole[];\n}\n\nexport interface BulkValidateEmailInviteEligibilityRequest {\n /**\n * List of emails to be checked for invite eligibility.\n * @minSize 1\n * @maxSize 10\n * @format EMAIL\n */\n emails?: string[];\n}\n\nexport interface BulkValidateEmailInviteEligibilityResponse {\n /** List of email invite eligibility results. */\n emailsEligibility?: EmailInviteEligibility[];\n}\n\nexport interface EmailInviteEligibility {\n /**\n * The email address being checked.\n * @format EMAIL\n */\n email?: string;\n /** Whether the email is eligible for an invite. */\n eligible?: boolean;\n}\n\nexport interface ChangeContributorRoleRequest {\n /**\n * Contributor's account ID.\n * @format GUID\n */\n accountId: string;\n /** New roles to assign to the contributor on the site. */\n newRoles: SiteRoleAssignment[];\n}\n\nexport interface SiteRoleAssignment {\n /** 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. */\n roleId?: string;\n /**\n * Assignment ID mapping the role to the contributor on the site.\n * @readonly\n */\n assignmentId?: string;\n}\n\nexport interface ChangeContributorRoleResponse {\n /** New roles assigned to the contributor on the site. */\n newAssignedRoles?: SiteRoleAssignment[];\n}\n\nexport interface ChangeContributorLocationRequest {\n /**\n * Contributor's account ID.\n * @format GUID\n */\n accountId: string;\n /**\n * New locations to assign to the contributor on the site.\n * @format GUID\n * @maxSize 20\n */\n newLocations: string[];\n}\n\nexport interface ChangeContributorLocationResponse {\n /**\n * New locations assigned to the contributor on the site.\n * @maxSize 20\n */\n newAssignedLocations?: SiteLocationAssignment[];\n}\n\nexport interface SiteLocationAssignment {\n /**\n * @format GUID\n * @maxSize 100\n */\n locationIds?: string[];\n /**\n * @readonly\n * @maxLength 20\n * @maxSize 999\n */\n assignmentIds?: string[];\n}\n\nexport interface QuerySiteContributorsRequest {\n filter?: QuerySiteContributorsFilter;\n}\n\nexport interface QuerySiteContributorsFilter {\n /**\n * 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.\n * @maxSize 20\n */\n policyIds?: string[];\n /**\n * Location IDs.\n * @format GUID\n * @maxSize 20\n */\n locationIds?: string[];\n}\n\nexport enum FieldSet {\n UNKNOWN = 'UNKNOWN',\n /** Include only `account_id` and `account_owner_id` fields. */\n META_DATA = 'META_DATA',\n}\n\n/** @enumType */\nexport type FieldSetWithLiterals = FieldSet | 'UNKNOWN' | 'META_DATA';\n\nexport interface QuerySiteContributorsResponse {\n /** List of site contributors. */\n contributors?: ContributorV2[];\n}\n\nexport interface ContributorV2 {\n /** Contributor's account ID. */\n accountId?: string | null;\n /** User ID of the owner of the account that the contributor has joined. */\n accountOwnerId?: string | null;\n}\n\nexport interface GetContributorsQuotaRequest {}\n\nexport interface GetContributorsQuotaResponse {\n /** Quota information for contributors on the given site. */\n contributorsQuota?: ContributorsQuota;\n}\n\nexport interface GetAppContributorsRequest {\n /** @format GUID */\n appId?: string;\n /** The locale of the request. Defaults to en-us. */\n locale?: string | null;\n}\n\nexport interface GetAppContributorsResponse {\n contributors?: Contributor[];\n invites?: AppInvite[];\n}\n\nexport interface AppInvite {\n /**\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * TODO: amitis - remove this comment after the next merge\n * @format EMAIL\n */\n destEmail?: string;\n /**\n * @readonly\n * @maxLength 20\n */\n status?: string;\n /**\n * @format WEB_URL\n * @readonly\n */\n acceptLink?: string;\n /** @maxLength 50 */\n invitePurpose?: string | null;\n /** @maxSize 10 */\n policies?: AssignedPolicy[];\n /** @readonly */\n expirationDate?: Date | null;\n /** @readonly */\n dateCreated?: Date | null;\n /** @readonly */\n dateUpdated?: Date | null;\n}\n\ntype ContributorNonNullablePaths =\n | `metaData._id`\n | `metaData.assignments`\n | `metaData.assignments.${number}.policy.policyId`\n | `metaData.assignments.${number}.assignmentId`\n | `metaData.assignments.${number}.subject._id`\n | `metaData.assignments.${number}.subject.subjectType`\n | `metaData.assignments.${number}.subject.context._id`\n | `metaData.assignments.${number}.subject.context.contextType`\n | `_id`;\n\n/**\n * returns a list of all the contributors + invites to be contributors of a given meta site ID taken from the\n * context.\n * @internal\n * @documentationMaturity preview\n * @permissionId site-users.view-users\n * @applicableIdentity APP\n * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.GetSiteContributorsV2\n */\nexport async function getSiteContributorsV2(\n options?: GetSiteContributorsV2Options\n): Promise<\n NonNullablePaths<\n GetSiteContributorsV2Response,\n | {\n [P in ContributorNonNullablePaths]: `contributors.${number}.${P}`;\n }[ContributorNonNullablePaths]\n | `invites`\n | `invites.${number}._id`\n | `invites.${number}.siteId`\n | `invites.${number}.email`\n | `invites.${number}.inviterId`\n | `invites.${number}.status`\n | `invites.${number}.acceptLink`\n | `invites.${number}.inviterAccountId`\n | `contributorsQuota.limitedOptions.limit`\n | `contributorsQuota.limitedOptions.used`\n | `contributorsQuota.type`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n locale: options?.locale,\n fields: options?.fields,\n });\n\n const reqOpts =\n ambassadorWixIdentityV1Contributor.getSiteContributorsV2(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n locale: '$[0].locale',\n fields: '$[0].fields',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSiteContributorsV2Options {\n /** The locale of the request. Defaults to en-us. */\n locale?: string | null;\n /** The set of desired fields. */\n fields?: string[];\n}\n\n/**\n * Overrides all the roles of a contributor for the specified site.\n * @param accountId - Contributor's account ID.\n * @public\n * @requiredField accountId\n * @requiredField options\n * @requiredField options.newRoles\n * @param options - Filter options. The `newRoles` field **must** be passed.\n * @permissionId SITE_ROLES.CHANGE_ROLE\n * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.ChangeRole\n */\nexport async function changeRole(\n accountId: string,\n options: NonNullablePaths<ChangeRoleOptions, `newRoles`>\n): Promise<\n NonNullablePaths<\n ChangeContributorRoleResponse,\n | `newAssignedRoles`\n | `newAssignedRoles.${number}.roleId`\n | `newAssignedRoles.${number}.assignmentId`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n accountId: accountId,\n newRoles: options?.newRoles,\n });\n\n const reqOpts = ambassadorWixIdentityV1Contributor.changeRole(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n accountId: '$[0]',\n newRoles: '$[1].newRoles',\n },\n singleArgumentUnchanged: false,\n },\n ['accountId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ChangeRoleOptions {\n /** New roles to assign to the contributor on the site. */\n newRoles: SiteRoleAssignment[];\n}\n\n/** @param accountId - Contributor's account ID.\n * @public\n * @documentationMaturity preview\n * @requiredField accountId\n * @requiredField options\n * @requiredField options.newLocations\n * @permissionId SITE_ROLES.CHANGE_LOCATION\n * @applicableIdentity APP\n * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.ChangeContributorLocation\n */\nexport async function changeContributorLocation(\n accountId: string,\n options: NonNullablePaths<ChangeContributorLocationOptions, `newLocations`>\n): Promise<\n NonNullablePaths<ChangeContributorLocationResponse, `newAssignedLocations`>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n accountId: accountId,\n newLocations: options?.newLocations,\n });\n\n const reqOpts =\n ambassadorWixIdentityV1Contributor.changeContributorLocation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n accountId: '$[0]',\n newLocations: '$[1].newLocations',\n },\n singleArgumentUnchanged: false,\n },\n ['accountId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ChangeContributorLocationOptions {\n /**\n * New locations to assign to the contributor on the site.\n * @format GUID\n * @maxSize 20\n */\n newLocations: string[];\n}\n\n/**\n * Retrieves a list of contributors for the specified site, given the provided filters.\n * @public\n * @param options - Filter options.\n * @permissionId site-users.view-users\n * @applicableIdentity APP\n * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.QuerySiteContributors\n */\nexport async function querySiteContributors(\n options?: QuerySiteContributorsOptions\n): Promise<NonNullablePaths<QuerySiteContributorsResponse, `contributors`>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n });\n\n const reqOpts =\n ambassadorWixIdentityV1Contributor.querySiteContributors(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { filter: '$[0].filter' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface QuerySiteContributorsOptions {\n filter?: QuerySiteContributorsFilter;\n}\n\n/**\n * returns the quota information for contributors on the given site.\n * @internal\n * @documentationMaturity preview\n * @permissionId site-users.view-users\n * @applicableIdentity APP\n * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.GetContributorsQuota\n */\nexport async function getContributorsQuota(): Promise<\n NonNullablePaths<\n GetContributorsQuotaResponse,\n | `contributorsQuota.limitedOptions.limit`\n | `contributorsQuota.limitedOptions.used`\n | `contributorsQuota.type`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixIdentityV1Contributor.getContributorsQuota(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/contributors/accept',\n destPath: '/contributors/accept',\n },\n {\n srcPath: '/roles-management-web',\n destPath: '',\n },\n {\n srcPath: '/team/accept',\n destPath: '/team/accept',\n },\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n {\n srcPath: '/app/accept',\n destPath: '/app/accept',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/roles-management-web',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n {\n srcPath: '/roles-management-web',\n destPath: '',\n },\n {\n srcPath: '/contributors/accept',\n destPath: '/contributors/accept',\n },\n {\n srcPath: '/team/accept',\n destPath: '/team/accept',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n ],\n 'platform.rise.ai': [\n {\n srcPath: '/v2/contributors',\n destPath: '/v2/contributors',\n },\n {\n srcPath: '/contributor/change/role',\n destPath: '/contributor/change/role',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/roles-management',\n destPath: '',\n },\n {\n srcPath: '/roles-management-web',\n destPath: '',\n },\n {\n srcPath: '/roles-management/roles',\n destPath: '/roles',\n },\n {\n srcPath: '/roles-management/team',\n destPath: '/team',\n },\n {\n srcPath: '/roles-management/v3/team',\n destPath: '/v3/team',\n },\n {\n srcPath: '/roles-management/v2/team',\n destPath: '/v2/team',\n },\n {\n srcPath: '/roles-management/contributor/change',\n destPath: '/contributor/change',\n },\n {\n srcPath: '/roles-management/v2/contributors',\n destPath: '/v2/contributors',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_user-management_contributors';\n\n/**\n * returns a list of all the contributors + invites to be contributors of a given meta site ID taken from the\n * context.\n */\nexport function getSiteContributorsV2(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSiteContributorsV2({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fields' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.identity.v1.contributor',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.roles.management.api.SiteRolesManagementService.GetSiteContributorsV2',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({\n protoPath: '/v2/contributors',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'contributors.joinedAt' },\n { path: 'invites.dateCreated' },\n { path: 'invites.expirationDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getSiteContributorsV2;\n}\n\n/** Overrides all the roles of a contributor for the specified site. */\nexport function changeRole(payload: object): RequestOptionsFactory<any> {\n function __changeRole({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.v1.contributor',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.roles.management.api.SiteRolesManagementService.ChangeRole',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({\n protoPath: '/contributor/change/role',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __changeRole;\n}\n\nexport function changeContributorLocation(\n payload: object\n): RequestOptionsFactory<any> {\n function __changeContributorLocation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.v1.contributor',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.roles.management.api.SiteRolesManagementService.ChangeContributorLocation',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({\n protoPath: '/contributor/change/locations',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __changeContributorLocation;\n}\n\n/** Retrieves a list of contributors for the specified site, given the provided filters. */\nexport function querySiteContributors(\n payload: object\n): RequestOptionsFactory<any> {\n function __querySiteContributors({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.v1.contributor',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.roles.management.api.SiteRolesManagementService.QuerySiteContributors',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({\n protoPath: '/v2/contributors/query',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __querySiteContributors;\n}\n\n/** returns the quota information for contributors on the given site. */\nexport function getContributorsQuota(\n payload: object\n): RequestOptionsFactory<any> {\n function __getContributorsQuota({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.v1.contributor',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.roles.management.api.SiteRolesManagementService.GetContributorsQuota',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({\n protoPath: '/v2/contributors/quota',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getContributorsQuota;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mCAAAA;AAAA,EAAA,kBAAAC;AAAA,EAAA,4BAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,6BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,kEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SA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uBAAmB,uBAAAJ;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,CAAC;AAAA,QAC3B,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,IACH;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["changeContributorLocation","changeRole","getContributorsQuota","getSiteContributorsV2","querySiteContributors","import_rest_modules","payload","ResourceType","ConditionAttributeType","SubjectType","SubjectContextType","InviteStatus","Type","FieldSet","getSiteContributorsV2","sdkTransformError","changeRole","changeContributorLocation","querySiteContributors","getContributorsQuota"]}
|
|
1
|
+
{"version":3,"sources":["../../index.typings.ts","../../src/identity-v1-contributor-contributors.universal.ts","../../src/identity-v1-contributor-contributors.http.ts"],"sourcesContent":["export * from './src/identity-v1-contributor-contributors.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixIdentityV1Contributor from './identity-v1-contributor-contributors.http.js';\n\nexport interface Contributor {\n /** Contributor's metadata. */\n metaData?: PersonMetaData;\n /** Whether the contributor account is a team account. */\n isTeam?: boolean | null;\n /** Date that the contributor joined the site. */\n joinedAt?: Date | null;\n /** Email address that received the invite. */\n invitedEmail?: string | null;\n /** Whether the contributor account is a client account. */\n isClient?: boolean | null;\n /**\n * Contributor's user ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n}\n\nexport interface PersonMetaData {\n /** Contributor's account ID. */\n _id?: string;\n /** Contributor's full name. */\n fullName?: string | null;\n /** URL for contributor's profile image. */\n imageUrl?: string | null;\n /** Contributor's email address. */\n email?: string | null;\n /** Contributor's access to assets and their assigned role (`policy`) for that asset. */\n assignments?: Assignment[];\n}\n\nexport interface Assignment {\n /** Role assigned to the user. */\n policy?: AssignedPolicy;\n /** Unique ID for this specific assignment. */\n assignmentId?: string;\n /** Identity assigned to the asset in an assignment, referred to as subject. Supported subjects include user IDs, account IDs, and app IDs. */\n subject?: Subject;\n}\n\nexport interface AssignedPolicy {\n /** Role ID. */\n policyId?: string;\n /** Role title. */\n title?: string | null;\n /** Role description. */\n description?: string | null;\n}\n\nexport interface Restriction extends RestrictionRestrictionsOneOf {\n /**\n * Deprecated.\n * @deprecated\n */\n resource?: Resource;\n /** List of conditions restricting the user's access. Currently only folder conditions are supported. */\n conditions?: Conditions;\n /** Site where the assignment restrictions apply. */\n site?: SiteRestriction;\n /** Location where the assignment restrictions apply. */\n locations?: LocationsRestriction;\n}\n\n/** @oneof */\nexport interface RestrictionRestrictionsOneOf {\n /**\n * Deprecated.\n * @deprecated\n */\n resource?: Resource;\n /** List of conditions restricting the user's access. Currently only folder conditions are supported. */\n conditions?: Conditions;\n /** Site where the assignment restrictions apply. */\n site?: SiteRestriction;\n /** Location where the assignment restrictions apply. */\n locations?: LocationsRestriction;\n}\n\nexport interface Resource {\n /** Resource type. */\n resourceType?: ResourceTypeWithLiterals;\n /** Resource ID. */\n _id?: string;\n value?: string | null;\n}\n\nexport enum ResourceType {\n UNKNOWN_RESOURCE_TYPE = 'UNKNOWN_RESOURCE_TYPE',\n SITE = 'SITE',\n}\n\n/** @enumType */\nexport type ResourceTypeWithLiterals =\n | ResourceType\n | 'UNKNOWN_RESOURCE_TYPE'\n | 'SITE';\n\nexport interface Conditions {\n /** List of conditions. */\n conditions?: Condition[];\n}\n\nexport interface Condition {\n /** Condition type. */\n conditionType?: ConditionAttributeTypeWithLiterals;\n /** Condition ID. */\n _id?: string;\n /** Expected value of the condition. When `conditionType` = \"FOLDER\", this is the folder path. */\n value?: string | null;\n}\n\nexport enum ConditionAttributeType {\n UNKNOWN_CONDITION_TYPE = 'UNKNOWN_CONDITION_TYPE',\n FOLDER = 'FOLDER',\n}\n\n/** @enumType */\nexport type ConditionAttributeTypeWithLiterals =\n | ConditionAttributeType\n | 'UNKNOWN_CONDITION_TYPE'\n | 'FOLDER';\n\nexport interface SiteRestriction {\n /** Site ID. */\n _id?: string;\n /** Site name. */\n value?: string | null;\n}\n\nexport interface CompanionResource {\n /** Asset ID (referred to here as resource ID). */\n _id?: string;\n /** Asset type (referred to here as resource type). as predefined in the authorization system */\n resourceType?: string;\n}\n\nexport interface LocationsRestriction {\n /**\n * Location IDs.\n * @format GUID\n * @maxSize 20\n */\n ids?: string[];\n}\n\nexport interface Subject {\n /** ID of identity assigned to the asset. */\n _id?: string;\n /** Type of identity assigned to the asset. Supported subject types include user IDs, account IDs, and app IDs. */\n subjectType?: SubjectTypeWithLiterals;\n /** Context of identity assigned to the asset. For example, a `subjectType` = `USER` will have `context` = `ACCOUNT`. */\n context?: SubjectContext;\n}\n\nexport enum SubjectType {\n UNKNOWN = 'UNKNOWN',\n ACCOUNT = 'ACCOUNT',\n USER = 'USER',\n USER_GROUP = 'USER_GROUP',\n MEMBER_GROUP = 'MEMBER_GROUP',\n VISITOR_GROUP = 'VISITOR_GROUP',\n EXTERNAL_APP = 'EXTERNAL_APP',\n ACCOUNT_GROUP = 'ACCOUNT_GROUP',\n WIX_APP = 'WIX_APP',\n}\n\n/** @enumType */\nexport type SubjectTypeWithLiterals =\n | SubjectType\n | 'UNKNOWN'\n | 'ACCOUNT'\n | 'USER'\n | 'USER_GROUP'\n | 'MEMBER_GROUP'\n | 'VISITOR_GROUP'\n | 'EXTERNAL_APP'\n | 'ACCOUNT_GROUP'\n | 'WIX_APP';\n\nexport interface SubjectContext {\n _id?: string;\n contextType?: SubjectContextTypeWithLiterals;\n}\n\nexport enum SubjectContextType {\n UNKNOWN_CTX = 'UNKNOWN_CTX',\n ORG_CTX = 'ORG_CTX',\n ACCOUNT_CTX = 'ACCOUNT_CTX',\n}\n\n/** @enumType */\nexport type SubjectContextTypeWithLiterals =\n | SubjectContextType\n | 'UNKNOWN_CTX'\n | 'ORG_CTX'\n | 'ACCOUNT_CTX';\n\nexport interface GetSiteContributorsRequest {\n /** The locale of the request. Defaults to en-us */\n locale?: string | null;\n}\n\nexport interface GetSiteContributorsResponse {\n users?: User[];\n teams?: Team[];\n invites?: SiteInvite[];\n policies?: Policy[];\n permissions?: string[];\n userId?: string;\n loggedInAccountId?: string;\n pendingOwner?: PendingOwner;\n contributorLimit?: ContributorLimit;\n predefinedRoles?: PredefinedRoles;\n}\n\nexport interface User {\n /** User ID. */\n _id?: string;\n /**\n * Deprecated.\n * @deprecated\n */\n roles?: string[];\n /** User's email address. */\n email?: string;\n /** User's name. */\n name?: Name;\n /** URL to user's profile image, when provided. */\n profileImage?: string | null;\n /** Date the user joined the team. */\n joinedTeamAt?: Date | null;\n /**\n * Deprecated.\n * @deprecated\n */\n policyIds?: string[];\n /** Resources the user can access. */\n assignments?: Assignment[];\n}\n\nexport interface Name {\n /** User's first name. */\n firstName?: string;\n /** User's last name. */\n lastName?: string;\n}\n\nexport interface Team {\n accountId?: string;\n accountInfo?: AccountInfo;\n policyIds?: string[];\n joinedAt?: Date | null;\n}\n\nexport interface AccountInfo {\n accountName?: string;\n accountImage?: string;\n isTeam?: boolean;\n}\n\nexport interface SiteInvite {\n /**\n * Invite ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Site ID the user is invited to as a collaborator.\n * @format GUID\n * @readonly\n */\n siteId?: string;\n /**\n * Email address where the invite was sent.\n * @format EMAIL\n */\n email?: string;\n /** Role IDs included in the invite. */\n policyIds?: string[];\n /**\n * Deprecated. Use `inviterAccountId`.\n * @readonly\n * @deprecated\n */\n inviterId?: string;\n /**\n * Invite Status.\n *\n * Supported values:\n * - **Pending:** The invite has been sent and is valid, waiting for the user's response.\n * - **Used:** The invite has been accepted.\n * - **Deleted:** The invite has been deleted or revoked.\n * - **Declined:** The user declined the invite.\n * - **Expired:** The invite has expired without being accepted.\n */\n status?: InviteStatusWithLiterals;\n /** Link to accept the invite. */\n acceptLink?: string;\n /**\n * Inviting account ID.\n * @format GUID\n * @readonly\n */\n inviterAccountId?: string;\n /**\n * Account ID that accepted the invite. Populated only once the invite is accepted.\n * @format GUID\n * @readonly\n */\n acceptedByAccountId?: string | null;\n /** Date the invite was created. */\n dateCreated?: Date | null;\n /**\n * User's Wix Bookings staff ID, if relevant.\n * @format GUID\n */\n staffId?: string | null;\n /** Invite expiration date */\n expirationDate?: Date | null;\n /**\n * Location ids included in the invite\n * @format GUID\n * @readonly\n * @maxSize 20\n */\n locationIds?: string[];\n}\n\n/** Invite status stating whether the invite was accepted, waiting to be accepted, deleted etc.. */\nexport enum InviteStatus {\n Pending = 'Pending',\n Used = 'Used',\n Deleted = 'Deleted',\n Declined = 'Declined',\n Expired = 'Expired',\n}\n\n/** @enumType */\nexport type InviteStatusWithLiterals =\n | InviteStatus\n | 'Pending'\n | 'Used'\n | 'Deleted'\n | 'Declined'\n | 'Expired';\n\nexport interface Policy {\n _id?: string;\n description?: string | null;\n name?: string | null;\n isCustom?: boolean;\n scopes?: string[];\n}\n\nexport interface PendingOwner {\n email?: string;\n expirationDate?: Date | null;\n acceptLink?: string;\n}\n\nexport interface ContributorLimit {\n contributorLimit?: number;\n}\n\nexport interface PredefinedRoles {\n roles?: PredefinedRole[];\n}\n\nexport interface PredefinedRole {\n titleKey?: string;\n roles?: Role[];\n title?: string | null;\n areaId?: string;\n}\n\nexport interface Role {\n _id?: string;\n deprecatedKey?: string;\n /** @deprecated */\n titleKey?: string;\n /** @deprecated */\n descriptionKey?: string;\n deprecated?: boolean;\n restrictFromLevel?: string;\n experiments?: string[];\n appDefIds?: string[];\n title?: string | null;\n description?: string | null;\n isCustom?: boolean;\n scopes?: string[];\n availableResourceTypes?: ResourceTypeWithLiterals[];\n availableConditions?: ConditionAttributeTypeWithLiterals[];\n limitToEditorTypes?: string[];\n}\n\nexport interface GetSiteContributorsV2Request {\n /** The locale of the request. Defaults to en-us. */\n locale?: string | null;\n /** The set of desired fields. */\n fields?: string[];\n}\n\nexport interface GetSiteContributorsV2Response {\n /** List of contributors of the given site. */\n contributors?: Contributor[];\n /** List of invites to contribute to the given site. */\n invites?: SiteInvite[];\n /** Quota information for contributors on the given site. */\n contributorsQuota?: ContributorsQuota;\n /** Pending owner information for the site. */\n pendingOwner?: PendingOwner;\n}\n\nexport interface ContributorsQuota extends ContributorsQuotaOptionsOneOf {\n /** Limited contributors quota details. */\n limitedOptions?: LimitedOptions;\n /** Type of contributors quota */\n type?: TypeWithLiterals;\n}\n\n/** @oneof */\nexport interface ContributorsQuotaOptionsOneOf {\n /** Limited contributors quota details. */\n limitedOptions?: LimitedOptions;\n}\n\n/** Enum to represent different types of contributors quota. */\nexport enum Type {\n UNKNOWN = 'UNKNOWN',\n LIMITED = 'LIMITED',\n UNLIMITED = 'UNLIMITED',\n}\n\n/** @enumType */\nexport type TypeWithLiterals = Type | 'UNKNOWN' | 'LIMITED' | 'UNLIMITED';\n\n/** Details for a limited contributors quota. */\nexport interface LimitedOptions {\n /** Maximum number of contributors allowed. */\n limit?: number;\n /** Number of accepted or pending invitations. */\n used?: number;\n}\n\nexport interface HandleSiteTransferRequest {\n originalOwnerAccountId?: string;\n newOwnerAccountId?: string;\n metaSiteId?: string;\n keepOriginalOwnerAsContributor?: boolean;\n}\n\nexport interface HandleSiteTransferResponse {}\n\nexport interface GetCurrentUserRolesRequest {\n /** The locale of the request. Defaults to en-us */\n locale?: string | null;\n}\n\nexport interface GetCurrentUserRolesResponse {\n roles?: LocalizedRole[];\n}\n\nexport interface LocalizedRole {\n name?: string;\n description?: string | null;\n}\n\nexport interface BulkGetUserRolesOnSiteRequest {\n /** @maxSize 5 */\n users?: UserSubject[];\n /** The locale of the request. Defaults to en-us */\n locale?: string | null;\n}\n\nexport interface UserSubject {\n userId?: string;\n accountId?: string;\n}\n\nexport interface BulkGetUserRolesOnSiteResponse {\n userRoles?: UserLocalizedRoles[];\n}\n\nexport interface UserLocalizedRoles {\n user?: UserSubject;\n roles?: LocalizedRole[];\n}\n\nexport interface BulkValidateEmailInviteEligibilityRequest {\n /**\n * List of emails to be checked for invite eligibility.\n * @minSize 1\n * @maxSize 10\n * @format EMAIL\n */\n emails?: string[];\n}\n\nexport interface BulkValidateEmailInviteEligibilityResponse {\n /** List of email invite eligibility results. */\n emailsEligibility?: EmailInviteEligibility[];\n}\n\nexport interface EmailInviteEligibility {\n /**\n * The email address being checked.\n * @format EMAIL\n */\n email?: string;\n /** Whether the email is eligible for an invite. */\n eligible?: boolean;\n}\n\nexport interface ChangeContributorRoleRequest {\n /**\n * Contributor's account ID.\n * @format GUID\n */\n accountId: string;\n /** New roles to assign to the contributor on the site. */\n newRoles: SiteRoleAssignment[];\n}\n\nexport interface SiteRoleAssignment {\n /** 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. */\n roleId?: string;\n /**\n * Assignment ID mapping the role to the contributor on the site.\n * @readonly\n */\n assignmentId?: string;\n}\n\nexport interface ChangeContributorRoleResponse {\n /** New roles assigned to the contributor on the site. */\n newAssignedRoles?: SiteRoleAssignment[];\n}\n\nexport interface ChangeContributorLocationRequest {\n /**\n * Contributor's account ID.\n * @format GUID\n */\n accountId: string;\n /**\n * New locations to assign to the contributor on the site.\n * @format GUID\n * @maxSize 20\n */\n newLocations: string[];\n}\n\nexport interface ChangeContributorLocationResponse {\n /**\n * New locations assigned to the contributor on the site.\n * @maxSize 20\n */\n newAssignedLocations?: SiteLocationAssignment[];\n}\n\nexport interface SiteLocationAssignment {\n /**\n * @format GUID\n * @maxSize 100\n */\n locationIds?: string[];\n /**\n * @readonly\n * @maxLength 20\n * @maxSize 999\n */\n assignmentIds?: string[];\n}\n\nexport interface QuerySiteContributorsRequest {\n filter?: QuerySiteContributorsFilter;\n}\n\nexport interface QuerySiteContributorsFilter {\n /**\n * 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.\n * @maxSize 20\n */\n policyIds?: string[];\n /**\n * Location IDs.\n * @format GUID\n * @maxSize 20\n */\n locationIds?: string[];\n}\n\nexport enum FieldSet {\n UNKNOWN = 'UNKNOWN',\n /** Include only `account_id` and `account_owner_id` fields. */\n META_DATA = 'META_DATA',\n}\n\n/** @enumType */\nexport type FieldSetWithLiterals = FieldSet | 'UNKNOWN' | 'META_DATA';\n\nexport interface QuerySiteContributorsResponse {\n /** List of site contributors. */\n contributors?: ContributorV2[];\n}\n\nexport interface ContributorV2 {\n /** Contributor's account ID. */\n accountId?: string | null;\n /** User ID of the owner of the account that the contributor has joined. */\n accountOwnerId?: string | null;\n}\n\nexport interface GetContributorsQuotaRequest {}\n\nexport interface GetContributorsQuotaResponse {\n /** Quota information for contributors on the given site. */\n contributorsQuota?: ContributorsQuota;\n}\n\nexport interface GetAppContributorsRequest {\n /** @format GUID */\n appId?: string;\n /** The locale of the request. Defaults to en-us. */\n locale?: string | null;\n}\n\nexport interface GetAppContributorsResponse {\n contributors?: Contributor[];\n invites?: AppInvite[];\n}\n\nexport interface AppInvite {\n /**\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * TODO: amitis - remove this comment after the next merge\n * @format EMAIL\n */\n destEmail?: string;\n /**\n * @readonly\n * @maxLength 20\n */\n status?: string;\n /**\n * @format WEB_URL\n * @readonly\n */\n acceptLink?: string;\n /** @maxLength 50 */\n invitePurpose?: string | null;\n /** @maxSize 10 */\n policies?: AssignedPolicy[];\n /** @readonly */\n expirationDate?: Date | null;\n /** @readonly */\n dateCreated?: Date | null;\n /** @readonly */\n dateUpdated?: Date | null;\n}\n\ntype ContributorNonNullablePaths =\n | `metaData._id`\n | `metaData.assignments`\n | `metaData.assignments.${number}.policy.policyId`\n | `metaData.assignments.${number}.assignmentId`\n | `metaData.assignments.${number}.subject._id`\n | `metaData.assignments.${number}.subject.subjectType`\n | `metaData.assignments.${number}.subject.context._id`\n | `metaData.assignments.${number}.subject.context.contextType`\n | `_id`;\n\n/**\n * returns a list of all the contributors + invites to be contributors of a given meta site ID taken from the\n * context.\n * @internal\n * @documentationMaturity preview\n * @permissionId site-users.view-users\n * @applicableIdentity APP\n * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.GetSiteContributorsV2\n */\nexport async function getSiteContributorsV2(\n options?: GetSiteContributorsV2Options\n): Promise<\n NonNullablePaths<\n GetSiteContributorsV2Response,\n | {\n [P in ContributorNonNullablePaths]: `contributors.${number}.${P}`;\n }[ContributorNonNullablePaths]\n | `invites`\n | `invites.${number}._id`\n | `invites.${number}.siteId`\n | `invites.${number}.email`\n | `invites.${number}.inviterId`\n | `invites.${number}.status`\n | `invites.${number}.acceptLink`\n | `invites.${number}.inviterAccountId`\n | `contributorsQuota.limitedOptions.limit`\n | `contributorsQuota.limitedOptions.used`\n | `contributorsQuota.type`\n | `pendingOwner.email`\n | `pendingOwner.acceptLink`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n locale: options?.locale,\n fields: options?.fields,\n });\n\n const reqOpts =\n ambassadorWixIdentityV1Contributor.getSiteContributorsV2(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n locale: '$[0].locale',\n fields: '$[0].fields',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSiteContributorsV2Options {\n /** The locale of the request. Defaults to en-us. */\n locale?: string | null;\n /** The set of desired fields. */\n fields?: string[];\n}\n\n/**\n * Overrides all the roles of a contributor for the specified site.\n * @param accountId - Contributor's account ID.\n * @public\n * @requiredField accountId\n * @requiredField options\n * @requiredField options.newRoles\n * @param options - Filter options. The `newRoles` field **must** be passed.\n * @permissionId SITE_ROLES.CHANGE_ROLE\n * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.ChangeRole\n */\nexport async function changeRole(\n accountId: string,\n options: NonNullablePaths<ChangeRoleOptions, `newRoles`>\n): Promise<\n NonNullablePaths<\n ChangeContributorRoleResponse,\n | `newAssignedRoles`\n | `newAssignedRoles.${number}.roleId`\n | `newAssignedRoles.${number}.assignmentId`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n accountId: accountId,\n newRoles: options?.newRoles,\n });\n\n const reqOpts = ambassadorWixIdentityV1Contributor.changeRole(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n accountId: '$[0]',\n newRoles: '$[1].newRoles',\n },\n singleArgumentUnchanged: false,\n },\n ['accountId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ChangeRoleOptions {\n /** New roles to assign to the contributor on the site. */\n newRoles: SiteRoleAssignment[];\n}\n\n/** @param accountId - Contributor's account ID.\n * @public\n * @documentationMaturity preview\n * @requiredField accountId\n * @requiredField options\n * @requiredField options.newLocations\n * @permissionId SITE_ROLES.CHANGE_LOCATION\n * @applicableIdentity APP\n * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.ChangeContributorLocation\n */\nexport async function changeContributorLocation(\n accountId: string,\n options: NonNullablePaths<ChangeContributorLocationOptions, `newLocations`>\n): Promise<\n NonNullablePaths<ChangeContributorLocationResponse, `newAssignedLocations`>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n accountId: accountId,\n newLocations: options?.newLocations,\n });\n\n const reqOpts =\n ambassadorWixIdentityV1Contributor.changeContributorLocation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n accountId: '$[0]',\n newLocations: '$[1].newLocations',\n },\n singleArgumentUnchanged: false,\n },\n ['accountId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ChangeContributorLocationOptions {\n /**\n * New locations to assign to the contributor on the site.\n * @format GUID\n * @maxSize 20\n */\n newLocations: string[];\n}\n\n/**\n * Retrieves a list of contributors for the specified site, given the provided filters.\n * @public\n * @param options - Filter options.\n * @permissionId site-users.view-users\n * @applicableIdentity APP\n * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.QuerySiteContributors\n */\nexport async function querySiteContributors(\n options?: QuerySiteContributorsOptions\n): Promise<NonNullablePaths<QuerySiteContributorsResponse, `contributors`>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n });\n\n const reqOpts =\n ambassadorWixIdentityV1Contributor.querySiteContributors(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { filter: '$[0].filter' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface QuerySiteContributorsOptions {\n filter?: QuerySiteContributorsFilter;\n}\n\n/**\n * returns the quota information for contributors on the given site.\n * @internal\n * @documentationMaturity preview\n * @permissionId site-users.view-users\n * @applicableIdentity APP\n * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.GetContributorsQuota\n */\nexport async function getContributorsQuota(): Promise<\n NonNullablePaths<\n GetContributorsQuotaResponse,\n | `contributorsQuota.limitedOptions.limit`\n | `contributorsQuota.limitedOptions.used`\n | `contributorsQuota.type`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixIdentityV1Contributor.getContributorsQuota(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/contributors/accept',\n destPath: '/contributors/accept',\n },\n {\n srcPath: '/roles-management-web',\n destPath: '',\n },\n {\n srcPath: '/team/accept',\n destPath: '/team/accept',\n },\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n {\n srcPath: '/app/accept',\n destPath: '/app/accept',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/roles-management-web',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n {\n srcPath: '/roles-management-web',\n destPath: '',\n },\n {\n srcPath: '/contributors/accept',\n destPath: '/contributors/accept',\n },\n {\n srcPath: '/team/accept',\n destPath: '/team/accept',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/roles-management-web',\n destPath: '',\n },\n ],\n 'platform.rise.ai': [\n {\n srcPath: '/v2/contributors',\n destPath: '/v2/contributors',\n },\n {\n srcPath: '/contributor/change/role',\n destPath: '/contributor/change/role',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/roles-management',\n destPath: '',\n },\n {\n srcPath: '/roles-management-web',\n destPath: '',\n },\n {\n srcPath: '/roles-management/roles',\n destPath: '/roles',\n },\n {\n srcPath: '/roles-management/team',\n destPath: '/team',\n },\n {\n srcPath: '/roles-management/v3/team',\n destPath: '/v3/team',\n },\n {\n srcPath: '/roles-management/v2/team',\n destPath: '/v2/team',\n },\n {\n srcPath: '/roles-management/contributor/change',\n destPath: '/contributor/change',\n },\n {\n srcPath: '/roles-management/v2/contributors',\n destPath: '/v2/contributors',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_user-management_contributors';\n\n/**\n * returns a list of all the contributors + invites to be contributors of a given meta site ID taken from the\n * context.\n */\nexport function getSiteContributorsV2(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSiteContributorsV2({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fields' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.identity.v1.contributor',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.roles.management.api.SiteRolesManagementService.GetSiteContributorsV2',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({\n protoPath: '/v2/contributors',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'contributors.joinedAt' },\n { path: 'invites.dateCreated' },\n { path: 'invites.expirationDate' },\n { path: 'pendingOwner.expirationDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getSiteContributorsV2;\n}\n\n/** Overrides all the roles of a contributor for the specified site. */\nexport function changeRole(payload: object): RequestOptionsFactory<any> {\n function __changeRole({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.v1.contributor',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.roles.management.api.SiteRolesManagementService.ChangeRole',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({\n protoPath: '/contributor/change/role',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __changeRole;\n}\n\nexport function changeContributorLocation(\n payload: object\n): RequestOptionsFactory<any> {\n function __changeContributorLocation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.v1.contributor',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.roles.management.api.SiteRolesManagementService.ChangeContributorLocation',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({\n protoPath: '/contributor/change/locations',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __changeContributorLocation;\n}\n\n/** Retrieves a list of contributors for the specified site, given the provided filters. */\nexport function querySiteContributors(\n payload: object\n): RequestOptionsFactory<any> {\n function __querySiteContributors({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.v1.contributor',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.roles.management.api.SiteRolesManagementService.QuerySiteContributors',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({\n protoPath: '/v2/contributors/query',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __querySiteContributors;\n}\n\n/** returns the quota information for contributors on the given site. */\nexport function getContributorsQuota(\n payload: object\n): RequestOptionsFactory<any> {\n function __getContributorsQuota({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.v1.contributor',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.roles.management.api.SiteRolesManagementService.GetContributorsQuota',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({\n protoPath: '/v2/contributors/quota',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getContributorsQuota;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mCAAAA;AAAA,EAAA,kBAAAC;AAAA,EAAA,4BAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,6BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,kEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AA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YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAJ;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,CAAC;AAAA,QAC3B,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,IACH;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["changeContributorLocation","changeRole","getContributorsQuota","getSiteContributorsV2","querySiteContributors","import_rest_modules","payload","ResourceType","ConditionAttributeType","SubjectType","SubjectContextType","InviteStatus","Type","FieldSet","getSiteContributorsV2","sdkTransformError","changeRole","changeContributorLocation","querySiteContributors","getContributorsQuota"]}
|
package/build/cjs/meta.d.ts
CHANGED
|
@@ -157,6 +157,11 @@ declare enum InviteStatus {
|
|
|
157
157
|
}
|
|
158
158
|
/** @enumType */
|
|
159
159
|
type InviteStatusWithLiterals = InviteStatus | 'Pending' | 'Used' | 'Deleted' | 'Declined' | 'Expired';
|
|
160
|
+
interface PendingOwner {
|
|
161
|
+
email?: string;
|
|
162
|
+
expirationDate?: Date | null;
|
|
163
|
+
acceptLink?: string;
|
|
164
|
+
}
|
|
160
165
|
interface GetSiteContributorsV2Request {
|
|
161
166
|
/** The locale of the request. Defaults to en-us. */
|
|
162
167
|
locale?: string | null;
|
|
@@ -170,6 +175,8 @@ interface GetSiteContributorsV2Response {
|
|
|
170
175
|
invites?: SiteInvite[];
|
|
171
176
|
/** Quota information for contributors on the given site. */
|
|
172
177
|
contributorsQuota?: ContributorsQuota;
|
|
178
|
+
/** Pending owner information for the site. */
|
|
179
|
+
pendingOwner?: PendingOwner;
|
|
173
180
|
}
|
|
174
181
|
interface ContributorsQuota extends ContributorsQuotaOptionsOneOf {
|
|
175
182
|
/** Limited contributors quota details. */
|
package/build/cjs/meta.js
CHANGED
|
@@ -179,7 +179,8 @@ function getSiteContributorsV2(payload) {
|
|
|
179
179
|
paths: [
|
|
180
180
|
{ path: "contributors.joinedAt" },
|
|
181
181
|
{ path: "invites.dateCreated" },
|
|
182
|
-
{ path: "invites.expirationDate" }
|
|
182
|
+
{ path: "invites.expirationDate" },
|
|
183
|
+
{ path: "pendingOwner.expirationDate" }
|
|
183
184
|
]
|
|
184
185
|
}
|
|
185
186
|
])
|