@wix/auto_sdk_user-management_contributors 1.0.19 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/build/cjs/index.d.ts +32 -0
  2. package/build/{identity-v1-contributor-contributors.universal-B0tzR-hk.d.mts → cjs/index.typings.d.ts} +37 -1
  3. package/build/cjs/index.typings.js +473 -0
  4. package/build/cjs/index.typings.js.map +1 -0
  5. package/build/{internal → cjs}/meta.d.ts +2 -1
  6. package/build/es/index.d.mts +32 -0
  7. package/build/{identity-v1-contributor-contributors.universal-B0tzR-hk.d.ts → es/index.typings.d.mts} +37 -1
  8. package/build/es/index.typings.mjs +438 -0
  9. package/build/es/index.typings.mjs.map +1 -0
  10. package/build/{internal → es}/meta.d.mts +2 -1
  11. package/build/es/package.json +3 -0
  12. package/build/internal/{index.d.ts → cjs/index.d.ts} +2 -2
  13. package/build/internal/cjs/index.js.map +1 -0
  14. package/build/internal/{identity-v1-contributor-contributors.universal-DLzpcW8B.d.mts → cjs/index.typings.d.ts} +59 -1
  15. package/build/internal/cjs/index.typings.js +473 -0
  16. package/build/internal/cjs/index.typings.js.map +1 -0
  17. package/build/{meta.d.ts → internal/cjs/meta.d.ts} +2 -1
  18. package/build/internal/cjs/meta.js.map +1 -0
  19. package/build/internal/{index.d.mts → es/index.d.mts} +2 -2
  20. package/build/internal/es/index.mjs.map +1 -0
  21. package/build/internal/{identity-v1-contributor-contributors.universal-DLzpcW8B.d.ts → es/index.typings.d.mts} +59 -1
  22. package/build/internal/es/index.typings.mjs +438 -0
  23. package/build/internal/es/index.typings.mjs.map +1 -0
  24. package/build/{meta.d.mts → internal/es/meta.d.mts} +2 -1
  25. package/build/internal/es/meta.mjs.map +1 -0
  26. package/package.json +11 -11
  27. package/build/index.d.mts +0 -32
  28. package/build/index.d.ts +0 -32
  29. package/build/index.js.map +0 -1
  30. package/build/index.mjs.map +0 -1
  31. package/build/meta.js.map +0 -1
  32. package/build/meta.mjs.map +0 -1
  33. /package/build/{index.js → cjs/index.js} +0 -0
  34. /package/build/{internal → cjs}/index.js.map +0 -0
  35. /package/build/{internal → cjs}/meta.js +0 -0
  36. /package/build/{internal → cjs}/meta.js.map +0 -0
  37. /package/build/{index.mjs → es/index.mjs} +0 -0
  38. /package/build/{internal → es}/index.mjs.map +0 -0
  39. /package/build/{internal → es}/meta.mjs +0 -0
  40. /package/build/{internal → es}/meta.mjs.map +0 -0
  41. /package/build/internal/{index.js → cjs/index.js} +0 -0
  42. /package/build/{meta.js → internal/cjs/meta.js} +0 -0
  43. /package/build/internal/{index.mjs → es/index.mjs} +0 -0
  44. /package/build/{meta.mjs → internal/es/meta.mjs} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../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":["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,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;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,I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W;AAAA,EACf;AACJ;AAYO,SAASC,YAAW,YAA6C;AACtE,SAAO,CACL,WACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAcO,SAASC,2BACd,YACoC;AACpC,SAAO,CACL,WACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAUO,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;;;ACjHA,SAAS,wBAAwB;AAI1B,IAAMC,yBAGK,iCAAiBA,sBAA2B;AACvD,IAAMC,cAEK,iCAAiBA,WAAgB;AAC5C,IAAMC,6BAGK,iCAAiBA,0BAA+B;AAC3D,IAAMC,yBAGK,iCAAiBA,sBAA2B;AAEvD,IAAMC,wBAGK,iCAAiBA,qBAA0B;","names":["payload","ResourceType","ConditionAttributeType","SubjectType","SubjectContextType","InviteStatus","Type","FieldSet","getSiteContributorsV2","changeRole","changeContributorLocation","querySiteContributors","getContributorsQuota","getSiteContributorsV2","changeRole","changeContributorLocation","querySiteContributors","getContributorsQuota","getSiteContributorsV2","changeRole","changeContributorLocation","querySiteContributors","getContributorsQuota"]}
@@ -1,3 +1,5 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
1
3
  interface Contributor {
2
4
  /** Contributor's metadata. */
3
5
  metaData?: PersonMetaData;
@@ -506,6 +508,8 @@ declare enum FieldSet {
506
508
  /** Include only `account_id` and `account_owner_id` fields. */
507
509
  META_DATA = "META_DATA"
508
510
  }
511
+ /** @enumType */
512
+ type FieldSetWithLiterals = FieldSet | 'UNKNOWN' | 'META_DATA';
509
513
  interface QuerySiteContributorsResponse {
510
514
  /** List of site contributors. */
511
515
  contributors?: ContributorV2[];
@@ -564,16 +568,52 @@ interface AppInvite {
564
568
  /** @readonly */
565
569
  dateUpdated?: Date | null;
566
570
  }
571
+ type ContributorNonNullablePaths = `metaData._id` | `metaData.assignments` | `metaData.assignments.${number}.policy.policyId` | `metaData.assignments.${number}.assignmentId` | `metaData.assignments.${number}.subject._id` | `metaData.assignments.${number}.subject.subjectType` | `metaData.assignments.${number}.subject.context._id` | `metaData.assignments.${number}.subject.context.contextType` | `_id`;
572
+ /**
573
+ * returns a list of all the contributors + invites to be contributors of a given meta site ID taken from the
574
+ * context.
575
+ * @internal
576
+ * @documentationMaturity preview
577
+ * @permissionId site-users.view-users
578
+ * @applicableIdentity APP
579
+ * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.GetSiteContributorsV2
580
+ */
581
+ declare function getSiteContributorsV2(options?: GetSiteContributorsV2Options): Promise<NonNullablePaths<GetSiteContributorsV2Response, {
582
+ [P in ContributorNonNullablePaths]: `contributors.${number}.${P}`;
583
+ }[ContributorNonNullablePaths] | `invites` | `invites.${number}._id` | `invites.${number}.siteId` | `invites.${number}.email` | `invites.${number}.inviterId` | `invites.${number}.status` | `invites.${number}.acceptLink` | `invites.${number}.inviterAccountId` | `contributorsQuota.limitedOptions.limit` | `contributorsQuota.limitedOptions.used` | `contributorsQuota.type`>>;
567
584
  interface GetSiteContributorsV2Options {
568
585
  /** The locale of the request. Defaults to en-us. */
569
586
  locale?: string | null;
570
587
  /** The set of desired fields. */
571
588
  fields?: string[];
572
589
  }
590
+ /**
591
+ * Overrides all the roles of a contributor for the specified site.
592
+ * @param accountId - Contributor's account ID.
593
+ * @public
594
+ * @requiredField accountId
595
+ * @requiredField options
596
+ * @requiredField options.newRoles
597
+ * @param options - Filter options. The `newRoles` field **must** be passed.
598
+ * @permissionId SITE_ROLES.CHANGE_ROLE
599
+ * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.ChangeRole
600
+ */
601
+ declare function changeRole(accountId: string, options: NonNullablePaths<ChangeRoleOptions, `newRoles`>): Promise<NonNullablePaths<ChangeContributorRoleResponse, `newAssignedRoles` | `newAssignedRoles.${number}.roleId` | `newAssignedRoles.${number}.assignmentId`>>;
573
602
  interface ChangeRoleOptions {
574
603
  /** New roles to assign to the contributor on the site. */
575
604
  newRoles: SiteRoleAssignment[];
576
605
  }
606
+ /** @param accountId - Contributor's account ID.
607
+ * @public
608
+ * @documentationMaturity preview
609
+ * @requiredField accountId
610
+ * @requiredField options
611
+ * @requiredField options.newLocations
612
+ * @permissionId SITE_ROLES.CHANGE_LOCATION
613
+ * @applicableIdentity APP
614
+ * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.ChangeContributorLocation
615
+ */
616
+ declare function changeContributorLocation(accountId: string, options: NonNullablePaths<ChangeContributorLocationOptions, `newLocations`>): Promise<NonNullablePaths<ChangeContributorLocationResponse, `newAssignedLocations`>>;
577
617
  interface ChangeContributorLocationOptions {
578
618
  /**
579
619
  * New locations to assign to the contributor on the site.
@@ -582,8 +622,26 @@ interface ChangeContributorLocationOptions {
582
622
  */
583
623
  newLocations: string[];
584
624
  }
625
+ /**
626
+ * Retrieves a list of contributors for the specified site, given the provided filters.
627
+ * @public
628
+ * @param options - Filter options.
629
+ * @permissionId site-users.view-users
630
+ * @applicableIdentity APP
631
+ * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.QuerySiteContributors
632
+ */
633
+ declare function querySiteContributors(options?: QuerySiteContributorsOptions): Promise<NonNullablePaths<QuerySiteContributorsResponse, `contributors`>>;
585
634
  interface QuerySiteContributorsOptions {
586
635
  filter?: QuerySiteContributorsFilter;
587
636
  }
637
+ /**
638
+ * returns the quota information for contributors on the given site.
639
+ * @internal
640
+ * @documentationMaturity preview
641
+ * @permissionId site-users.view-users
642
+ * @applicableIdentity APP
643
+ * @fqn com.wixpress.roles.management.api.SiteRolesManagementService.GetContributorsQuota
644
+ */
645
+ declare function getContributorsQuota(): Promise<NonNullablePaths<GetContributorsQuotaResponse, `contributorsQuota.limitedOptions.limit` | `contributorsQuota.limitedOptions.used` | `contributorsQuota.type`>>;
588
646
 
589
- export { type UserSubject as $, type Assignment as A, type ContributorLimit as B, type ChangeRoleOptions as C, type PredefinedRoles as D, type PredefinedRole as E, FieldSet as F, type GetSiteContributorsV2Options as G, type Role as H, InviteStatus as I, type GetSiteContributorsV2Request as J, type ContributorsQuota as K, type LocationsRestriction as L, type ContributorsQuotaOptionsOneOf as M, type Name as N, type LimitedOptions as O, type PersonMetaData as P, type QuerySiteContributorsOptions as Q, ResourceType as R, SubjectType as S, Type as T, type User as U, type HandleSiteTransferRequest as V, type HandleSiteTransferResponse as W, type GetCurrentUserRolesRequest as X, type GetCurrentUserRolesResponse as Y, type LocalizedRole as Z, type BulkGetUserRolesOnSiteRequest as _, type GetSiteContributorsV2Response as a, type BulkGetUserRolesOnSiteResponse as a0, type UserLocalizedRoles as a1, type BulkValidateEmailInviteEligibilityRequest as a2, type BulkValidateEmailInviteEligibilityResponse as a3, type EmailInviteEligibility as a4, type ChangeContributorRoleRequest as a5, type SiteRoleAssignment as a6, type ChangeContributorLocationRequest as a7, type SiteLocationAssignment as a8, type QuerySiteContributorsRequest as a9, type QuerySiteContributorsFilter as aa, type ContributorV2 as ab, type GetContributorsQuotaRequest as ac, type GetAppContributorsRequest as ad, type GetAppContributorsResponse as ae, type AppInvite as af, type ChangeContributorRoleResponse as b, type ChangeContributorLocationOptions as c, type ChangeContributorLocationResponse as d, type QuerySiteContributorsResponse as e, type GetContributorsQuotaResponse as f, ConditionAttributeType as g, SubjectContextType as h, type Contributor as i, type AssignedPolicy as j, type Restriction as k, type RestrictionRestrictionsOneOf as l, type Resource as m, type Conditions as n, type Condition as o, type SiteRestriction as p, type CompanionResource as q, type Subject as r, type SubjectContext as s, type GetSiteContributorsRequest as t, type GetSiteContributorsResponse as u, type Team as v, type AccountInfo as w, type SiteInvite as x, type Policy as y, type PendingOwner as z };
647
+ export { type AccountInfo, type AppInvite, type AssignedPolicy, type Assignment, type BulkGetUserRolesOnSiteRequest, type BulkGetUserRolesOnSiteResponse, type BulkValidateEmailInviteEligibilityRequest, type BulkValidateEmailInviteEligibilityResponse, type ChangeContributorLocationOptions, type ChangeContributorLocationRequest, type ChangeContributorLocationResponse, type ChangeContributorRoleRequest, type ChangeContributorRoleResponse, type ChangeRoleOptions, type CompanionResource, type Condition, ConditionAttributeType, type ConditionAttributeTypeWithLiterals, type Conditions, type Contributor, type ContributorLimit, type ContributorV2, type ContributorsQuota, type ContributorsQuotaOptionsOneOf, type EmailInviteEligibility, FieldSet, type FieldSetWithLiterals, type GetAppContributorsRequest, type GetAppContributorsResponse, type GetContributorsQuotaRequest, type GetContributorsQuotaResponse, type GetCurrentUserRolesRequest, type GetCurrentUserRolesResponse, type GetSiteContributorsRequest, type GetSiteContributorsResponse, type GetSiteContributorsV2Options, type GetSiteContributorsV2Request, type GetSiteContributorsV2Response, type HandleSiteTransferRequest, type HandleSiteTransferResponse, InviteStatus, type InviteStatusWithLiterals, type LimitedOptions, type LocalizedRole, type LocationsRestriction, type Name, type PendingOwner, type PersonMetaData, type Policy, type PredefinedRole, type PredefinedRoles, type QuerySiteContributorsFilter, type QuerySiteContributorsOptions, type QuerySiteContributorsRequest, type QuerySiteContributorsResponse, type Resource, ResourceType, type ResourceTypeWithLiterals, type Restriction, type RestrictionRestrictionsOneOf, type Role, type SiteInvite, type SiteLocationAssignment, type SiteRestriction, type SiteRoleAssignment, type Subject, type SubjectContext, SubjectContextType, type SubjectContextTypeWithLiterals, SubjectType, type SubjectTypeWithLiterals, type Team, Type, type TypeWithLiterals, type User, type UserLocalizedRoles, type UserSubject, changeContributorLocation, changeRole, getContributorsQuota, getSiteContributorsV2, querySiteContributors };
@@ -0,0 +1,438 @@
1
+ // src/identity-v1-contributor-contributors.universal.ts
2
+ import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
3
+ import {
4
+ renameKeysFromSDKRequestToRESTRequest,
5
+ renameKeysFromRESTResponseToSDKResponse
6
+ } from "@wix/sdk-runtime/rename-all-nested-keys";
7
+
8
+ // src/identity-v1-contributor-contributors.http.ts
9
+ import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
10
+ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
11
+ import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
12
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
13
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
14
+ function resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl(opts) {
15
+ const domainToMappings = {
16
+ "manage._base_domain_": [
17
+ {
18
+ srcPath: "/contributors/accept",
19
+ destPath: "/contributors/accept"
20
+ },
21
+ {
22
+ srcPath: "/roles-management-web",
23
+ destPath: ""
24
+ },
25
+ {
26
+ srcPath: "/team/accept",
27
+ destPath: "/team/accept"
28
+ },
29
+ {
30
+ srcPath: "/_api/roles-management-web",
31
+ destPath: ""
32
+ },
33
+ {
34
+ srcPath: "/app/accept",
35
+ destPath: "/app/accept"
36
+ }
37
+ ],
38
+ "api._api_base_domain_": [
39
+ {
40
+ srcPath: "/roles-management-web",
41
+ destPath: ""
42
+ }
43
+ ],
44
+ "editor._base_domain_": [
45
+ {
46
+ srcPath: "/_api/roles-management-web",
47
+ destPath: ""
48
+ }
49
+ ],
50
+ "blocks._base_domain_": [
51
+ {
52
+ srcPath: "/_api/roles-management-web",
53
+ destPath: ""
54
+ }
55
+ ],
56
+ "create.editorx": [
57
+ {
58
+ srcPath: "/_api/roles-management-web",
59
+ destPath: ""
60
+ }
61
+ ],
62
+ "www._base_domain_": [
63
+ {
64
+ srcPath: "/_api/roles-management-web",
65
+ destPath: ""
66
+ },
67
+ {
68
+ srcPath: "/roles-management-web",
69
+ destPath: ""
70
+ },
71
+ {
72
+ srcPath: "/contributors/accept",
73
+ destPath: "/contributors/accept"
74
+ },
75
+ {
76
+ srcPath: "/team/accept",
77
+ destPath: "/team/accept"
78
+ }
79
+ ],
80
+ "dev._base_domain_": [
81
+ {
82
+ srcPath: "/_api/roles-management-web",
83
+ destPath: ""
84
+ }
85
+ ],
86
+ "platform.rise.ai": [
87
+ {
88
+ srcPath: "/v2/contributors",
89
+ destPath: "/v2/contributors"
90
+ },
91
+ {
92
+ srcPath: "/contributor/change/role",
93
+ destPath: "/contributor/change/role"
94
+ }
95
+ ],
96
+ "www.wixapis.com": [
97
+ {
98
+ srcPath: "/roles-management",
99
+ destPath: ""
100
+ },
101
+ {
102
+ srcPath: "/roles-management-web",
103
+ destPath: ""
104
+ },
105
+ {
106
+ srcPath: "/roles-management/roles",
107
+ destPath: "/roles"
108
+ },
109
+ {
110
+ srcPath: "/roles-management/team",
111
+ destPath: "/team"
112
+ },
113
+ {
114
+ srcPath: "/roles-management/v3/team",
115
+ destPath: "/v3/team"
116
+ },
117
+ {
118
+ srcPath: "/roles-management/v2/team",
119
+ destPath: "/v2/team"
120
+ },
121
+ {
122
+ srcPath: "/roles-management/contributor/change",
123
+ destPath: "/contributor/change"
124
+ },
125
+ {
126
+ srcPath: "/roles-management/v2/contributors",
127
+ destPath: "/v2/contributors"
128
+ }
129
+ ]
130
+ };
131
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
132
+ }
133
+ var PACKAGE_NAME = "@wix/auto_sdk_user-management_contributors";
134
+ function getSiteContributorsV2(payload) {
135
+ function __getSiteContributorsV2({ host }) {
136
+ const serializedData = transformPaths(payload, [
137
+ {
138
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
139
+ paths: [{ path: "fields" }]
140
+ }
141
+ ]);
142
+ const metadata = {
143
+ entityFqdn: "wix.identity.v1.contributor",
144
+ method: "GET",
145
+ methodFqn: "com.wixpress.roles.management.api.SiteRolesManagementService.GetSiteContributorsV2",
146
+ packageName: PACKAGE_NAME,
147
+ url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({
148
+ protoPath: "/v2/contributors",
149
+ data: serializedData,
150
+ host
151
+ }),
152
+ params: toURLSearchParams(serializedData),
153
+ transformResponse: (payload2) => transformPaths(payload2, [
154
+ {
155
+ transformFn: transformRESTTimestampToSDKTimestamp,
156
+ paths: [
157
+ { path: "contributors.joinedAt" },
158
+ { path: "invites.dateCreated" },
159
+ { path: "invites.expirationDate" }
160
+ ]
161
+ }
162
+ ])
163
+ };
164
+ return metadata;
165
+ }
166
+ return __getSiteContributorsV2;
167
+ }
168
+ function changeRole(payload) {
169
+ function __changeRole({ host }) {
170
+ const metadata = {
171
+ entityFqdn: "wix.identity.v1.contributor",
172
+ method: "PUT",
173
+ methodFqn: "com.wixpress.roles.management.api.SiteRolesManagementService.ChangeRole",
174
+ packageName: PACKAGE_NAME,
175
+ url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({
176
+ protoPath: "/contributor/change/role",
177
+ data: payload,
178
+ host
179
+ }),
180
+ data: payload
181
+ };
182
+ return metadata;
183
+ }
184
+ return __changeRole;
185
+ }
186
+ function changeContributorLocation(payload) {
187
+ function __changeContributorLocation({ host }) {
188
+ const metadata = {
189
+ entityFqdn: "wix.identity.v1.contributor",
190
+ method: "PUT",
191
+ methodFqn: "com.wixpress.roles.management.api.SiteRolesManagementService.ChangeContributorLocation",
192
+ packageName: PACKAGE_NAME,
193
+ url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({
194
+ protoPath: "/contributor/change/locations",
195
+ data: payload,
196
+ host
197
+ }),
198
+ data: payload
199
+ };
200
+ return metadata;
201
+ }
202
+ return __changeContributorLocation;
203
+ }
204
+ function querySiteContributors(payload) {
205
+ function __querySiteContributors({ host }) {
206
+ const metadata = {
207
+ entityFqdn: "wix.identity.v1.contributor",
208
+ method: "GET",
209
+ methodFqn: "com.wixpress.roles.management.api.SiteRolesManagementService.QuerySiteContributors",
210
+ packageName: PACKAGE_NAME,
211
+ url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({
212
+ protoPath: "/v2/contributors/query",
213
+ data: payload,
214
+ host
215
+ }),
216
+ params: toURLSearchParams(payload)
217
+ };
218
+ return metadata;
219
+ }
220
+ return __querySiteContributors;
221
+ }
222
+ function getContributorsQuota(payload) {
223
+ function __getContributorsQuota({ host }) {
224
+ const metadata = {
225
+ entityFqdn: "wix.identity.v1.contributor",
226
+ method: "GET",
227
+ methodFqn: "com.wixpress.roles.management.api.SiteRolesManagementService.GetContributorsQuota",
228
+ packageName: PACKAGE_NAME,
229
+ url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({
230
+ protoPath: "/v2/contributors/quota",
231
+ data: payload,
232
+ host
233
+ }),
234
+ params: toURLSearchParams(payload)
235
+ };
236
+ return metadata;
237
+ }
238
+ return __getContributorsQuota;
239
+ }
240
+
241
+ // src/identity-v1-contributor-contributors.universal.ts
242
+ var ResourceType = /* @__PURE__ */ ((ResourceType2) => {
243
+ ResourceType2["UNKNOWN_RESOURCE_TYPE"] = "UNKNOWN_RESOURCE_TYPE";
244
+ ResourceType2["SITE"] = "SITE";
245
+ return ResourceType2;
246
+ })(ResourceType || {});
247
+ var ConditionAttributeType = /* @__PURE__ */ ((ConditionAttributeType2) => {
248
+ ConditionAttributeType2["UNKNOWN_CONDITION_TYPE"] = "UNKNOWN_CONDITION_TYPE";
249
+ ConditionAttributeType2["FOLDER"] = "FOLDER";
250
+ return ConditionAttributeType2;
251
+ })(ConditionAttributeType || {});
252
+ var SubjectType = /* @__PURE__ */ ((SubjectType2) => {
253
+ SubjectType2["UNKNOWN"] = "UNKNOWN";
254
+ SubjectType2["ACCOUNT"] = "ACCOUNT";
255
+ SubjectType2["USER"] = "USER";
256
+ SubjectType2["USER_GROUP"] = "USER_GROUP";
257
+ SubjectType2["MEMBER_GROUP"] = "MEMBER_GROUP";
258
+ SubjectType2["VISITOR_GROUP"] = "VISITOR_GROUP";
259
+ SubjectType2["EXTERNAL_APP"] = "EXTERNAL_APP";
260
+ SubjectType2["ACCOUNT_GROUP"] = "ACCOUNT_GROUP";
261
+ SubjectType2["WIX_APP"] = "WIX_APP";
262
+ return SubjectType2;
263
+ })(SubjectType || {});
264
+ var SubjectContextType = /* @__PURE__ */ ((SubjectContextType2) => {
265
+ SubjectContextType2["UNKNOWN_CTX"] = "UNKNOWN_CTX";
266
+ SubjectContextType2["ORG_CTX"] = "ORG_CTX";
267
+ SubjectContextType2["ACCOUNT_CTX"] = "ACCOUNT_CTX";
268
+ return SubjectContextType2;
269
+ })(SubjectContextType || {});
270
+ var InviteStatus = /* @__PURE__ */ ((InviteStatus2) => {
271
+ InviteStatus2["Pending"] = "Pending";
272
+ InviteStatus2["Used"] = "Used";
273
+ InviteStatus2["Deleted"] = "Deleted";
274
+ InviteStatus2["Declined"] = "Declined";
275
+ InviteStatus2["Expired"] = "Expired";
276
+ return InviteStatus2;
277
+ })(InviteStatus || {});
278
+ var Type = /* @__PURE__ */ ((Type2) => {
279
+ Type2["UNKNOWN"] = "UNKNOWN";
280
+ Type2["LIMITED"] = "LIMITED";
281
+ Type2["UNLIMITED"] = "UNLIMITED";
282
+ return Type2;
283
+ })(Type || {});
284
+ var FieldSet = /* @__PURE__ */ ((FieldSet2) => {
285
+ FieldSet2["UNKNOWN"] = "UNKNOWN";
286
+ FieldSet2["META_DATA"] = "META_DATA";
287
+ return FieldSet2;
288
+ })(FieldSet || {});
289
+ async function getSiteContributorsV22(options) {
290
+ const { httpClient, sideEffects } = arguments[1];
291
+ const payload = renameKeysFromSDKRequestToRESTRequest({
292
+ locale: options?.locale,
293
+ fields: options?.fields
294
+ });
295
+ const reqOpts = getSiteContributorsV2(payload);
296
+ sideEffects?.onSiteCall?.();
297
+ try {
298
+ const result = await httpClient.request(reqOpts);
299
+ sideEffects?.onSuccess?.(result);
300
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
301
+ } catch (err) {
302
+ const transformedError = sdkTransformError(
303
+ err,
304
+ {
305
+ spreadPathsToArguments: {},
306
+ explicitPathsToArguments: {
307
+ locale: "$[0].locale",
308
+ fields: "$[0].fields"
309
+ },
310
+ singleArgumentUnchanged: false
311
+ },
312
+ ["options"]
313
+ );
314
+ sideEffects?.onError?.(err);
315
+ throw transformedError;
316
+ }
317
+ }
318
+ async function changeRole2(accountId, options) {
319
+ const { httpClient, sideEffects } = arguments[2];
320
+ const payload = renameKeysFromSDKRequestToRESTRequest({
321
+ accountId,
322
+ newRoles: options?.newRoles
323
+ });
324
+ const reqOpts = changeRole(payload);
325
+ sideEffects?.onSiteCall?.();
326
+ try {
327
+ const result = await httpClient.request(reqOpts);
328
+ sideEffects?.onSuccess?.(result);
329
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
330
+ } catch (err) {
331
+ const transformedError = sdkTransformError(
332
+ err,
333
+ {
334
+ spreadPathsToArguments: {},
335
+ explicitPathsToArguments: {
336
+ accountId: "$[0]",
337
+ newRoles: "$[1].newRoles"
338
+ },
339
+ singleArgumentUnchanged: false
340
+ },
341
+ ["accountId", "options"]
342
+ );
343
+ sideEffects?.onError?.(err);
344
+ throw transformedError;
345
+ }
346
+ }
347
+ async function changeContributorLocation2(accountId, options) {
348
+ const { httpClient, sideEffects } = arguments[2];
349
+ const payload = renameKeysFromSDKRequestToRESTRequest({
350
+ accountId,
351
+ newLocations: options?.newLocations
352
+ });
353
+ const reqOpts = changeContributorLocation(payload);
354
+ sideEffects?.onSiteCall?.();
355
+ try {
356
+ const result = await httpClient.request(reqOpts);
357
+ sideEffects?.onSuccess?.(result);
358
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
359
+ } catch (err) {
360
+ const transformedError = sdkTransformError(
361
+ err,
362
+ {
363
+ spreadPathsToArguments: {},
364
+ explicitPathsToArguments: {
365
+ accountId: "$[0]",
366
+ newLocations: "$[1].newLocations"
367
+ },
368
+ singleArgumentUnchanged: false
369
+ },
370
+ ["accountId", "options"]
371
+ );
372
+ sideEffects?.onError?.(err);
373
+ throw transformedError;
374
+ }
375
+ }
376
+ async function querySiteContributors2(options) {
377
+ const { httpClient, sideEffects } = arguments[1];
378
+ const payload = renameKeysFromSDKRequestToRESTRequest({
379
+ filter: options?.filter
380
+ });
381
+ const reqOpts = querySiteContributors(payload);
382
+ sideEffects?.onSiteCall?.();
383
+ try {
384
+ const result = await httpClient.request(reqOpts);
385
+ sideEffects?.onSuccess?.(result);
386
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
387
+ } catch (err) {
388
+ const transformedError = sdkTransformError(
389
+ err,
390
+ {
391
+ spreadPathsToArguments: {},
392
+ explicitPathsToArguments: { filter: "$[0].filter" },
393
+ singleArgumentUnchanged: false
394
+ },
395
+ ["options"]
396
+ );
397
+ sideEffects?.onError?.(err);
398
+ throw transformedError;
399
+ }
400
+ }
401
+ async function getContributorsQuota2() {
402
+ const { httpClient, sideEffects } = arguments[0];
403
+ const payload = renameKeysFromSDKRequestToRESTRequest({});
404
+ const reqOpts = getContributorsQuota(payload);
405
+ sideEffects?.onSiteCall?.();
406
+ try {
407
+ const result = await httpClient.request(reqOpts);
408
+ sideEffects?.onSuccess?.(result);
409
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
410
+ } catch (err) {
411
+ const transformedError = sdkTransformError(
412
+ err,
413
+ {
414
+ spreadPathsToArguments: {},
415
+ explicitPathsToArguments: {},
416
+ singleArgumentUnchanged: false
417
+ },
418
+ []
419
+ );
420
+ sideEffects?.onError?.(err);
421
+ throw transformedError;
422
+ }
423
+ }
424
+ export {
425
+ ConditionAttributeType,
426
+ FieldSet,
427
+ InviteStatus,
428
+ ResourceType,
429
+ SubjectContextType,
430
+ SubjectType,
431
+ Type,
432
+ changeContributorLocation2 as changeContributorLocation,
433
+ changeRole2 as changeRole,
434
+ getContributorsQuota2 as getContributorsQuota,
435
+ getSiteContributorsV22 as getSiteContributorsV2,
436
+ querySiteContributors2 as querySiteContributors
437
+ };
438
+ //# sourceMappingURL=index.typings.mjs.map