@wix/auto_sdk_bookings_staff-member-settings 1.0.10 → 1.0.11

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.
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
2
  import { StaffMemberSettings, StaffMemberSettingsUpdatedEnvelope } from './index.typings.js';
3
- export { AccountDetails, ActionEvent, BaseEventMetadata, ContactInformation, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, GetStaffMemberSettingsRequest, GetStaffMemberSettingsResponse, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, RestoreInfo, UpdateStaffMemberSettingsRequest, UpdateStaffMemberSettingsResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
3
+ export { AccountInfo, ActionEvent, BaseEventMetadata, ContactInformation, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, GetStaffMemberSettingsRequest, GetStaffMemberSettingsResponse, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, RestoreInfo, UpdateStaffMemberSettingsRequest, UpdateStaffMemberSettingsResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
4
4
 
5
5
  declare function getStaffMemberSettings$1(httpClient: HttpClient): GetStaffMemberSettingsSignature;
6
6
  interface GetStaffMemberSettingsSignature {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.public.ts","../../src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.universal.ts","../../src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.http.ts","../../src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.context.ts"],"sourcesContent":["export * from './src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n StaffMemberSettings,\n StaffMemberSettingsUpdatedEnvelope,\n getStaffMemberSettings as universalGetStaffMemberSettings,\n updateStaffMemberSettings as universalUpdateStaffMemberSettings,\n} from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/bookings' };\n\nexport function getStaffMemberSettings(\n httpClient: HttpClient\n): GetStaffMemberSettingsSignature {\n return () =>\n universalGetStaffMemberSettings(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetStaffMemberSettingsSignature {\n /**\n * Retrieves the current privacy settings for staff member contact information.\n *\n * Use this method to check whether the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) are accessible in API responses and on the live site.\n * @returns Retrieved staff member settings.\n */\n (): Promise<StaffMemberSettings>;\n}\n\nexport function updateStaffMemberSettings(\n httpClient: HttpClient\n): UpdateStaffMemberSettingsSignature {\n return (\n staffMemberSettings: NonNullablePaths<StaffMemberSettings, `revision`, 2>\n ) =>\n universalUpdateStaffMemberSettings(\n staffMemberSettings,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateStaffMemberSettingsSignature {\n /**\n * Updates privacy settings for staff member contact information.\n *\n * Each time the settings are updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the settings.\n * This ensures you're working with the latest settings and prevents unintended overwrites.\n *\n * Changes to these settings take effect immediately and affect both API responses and live site display.\n * When you enable `contactInformation.publiclyAccessible`, the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) include actual contact information, and this information is displayed on the live site.\n * When you disable it, these fields are empty in API responses if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions, and contact information isn't displayed on the live site.\n *\n * Identities with appropriate permissions can access staff contact information in API responses regardless of this setting.\n * @param - Staff member settings to update, may be partial.\n * @returns Updated staff member settings.\n */\n (\n staffMemberSettings: NonNullablePaths<StaffMemberSettings, `revision`, 2>\n ): Promise<StaffMemberSettings>;\n}\n\nexport const onStaffMemberSettingsUpdated = EventDefinition(\n 'wix.bookings.staff_settings.v1.staff_member_settings_updated',\n true,\n (event: StaffMemberSettingsUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n { path: 'modifiedFields.createdDate' },\n { path: 'modifiedFields.updatedDate' },\n ],\n },\n ])\n )\n)<StaffMemberSettingsUpdatedEnvelope>();\n\nexport {\n AccountDetails,\n ActionEvent,\n BaseEventMetadata,\n ContactInformation,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n ExtendedFields,\n GetStaffMemberSettingsRequest,\n GetStaffMemberSettingsResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n RestoreInfo,\n StaffMemberSettings,\n StaffMemberSettingsUpdatedEnvelope,\n UpdateStaffMemberSettingsRequest,\n UpdateStaffMemberSettingsResponse,\n WebhookIdentityType,\n} from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.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 ambassadorWixBookingsStaffSettingsV1StaffMemberSettings from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.http.js';\n\n/**\n * Settings that control the visibility of staff members' contact information.\n *\n * These settings determine whether the `email` and `phone` fields are populated in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object).\n * When enabled, these fields contain staff contact information.\n * When disabled, these fields are empty if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions.\n * Identities with appropriate permissions may still access the information.\n *\n * This is a singleton resource. Each site has exactly one settings object,\n * automatically created when Wix Bookings is installed.\n */\nexport interface StaffMemberSettings {\n /**\n * ID of the staff member settings object. There is one settings object per site.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the `staffMemberSettings` object is updated.\n * To prevent conflicting changes, the current revision must be specified when updating the `staffMemberSettings` object.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the `staffMemberSettings` object was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the `staffMemberSettings` object was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Privacy settings for controlling staff member contact information visibility in API responses and on the live site. */\n contactInformation?: ContactInformation;\n /**\n * Custom field data for the staff member settings.\n * Extended fields must be configured in the app dashboard before they can be accessed with API calls.\n *\n * Learn more about extended fields at https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.\n */\n extendedFields?: ExtendedFields;\n}\n\n/**\n * Privacy settings for staff member contact information.\n *\n * These settings control whether staff members' email addresses and phone numbers\n * are populated in Staff Member objects returned by the Staff Members API.\n */\nexport interface ContactInformation {\n /**\n * Whether staff members' email addresses and phone numbers are accessible in API responses and on the live site.\n *\n * - `true`: The `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) contain actual contact information, and this information is displayed on the live site.\n * - `false`: These fields are empty in API responses if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions, and contact information isn't displayed on the live site.\n *\n * Identities with appropriate permissions can still access this information in API responses regardless of this setting.\n *\n * Default: `false`\n */\n publiclyAccessible?: boolean | null;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface GetStaffMemberSettingsRequest {}\n\nexport interface GetStaffMemberSettingsResponse {\n /** Retrieved staff member settings. */\n staffMemberSettings?: StaffMemberSettings;\n}\n\nexport interface UpdateStaffMemberSettingsRequest {\n /** Staff member settings to update, may be partial. */\n staffMemberSettings: StaffMemberSettings;\n}\n\nexport interface UpdateStaffMemberSettingsResponse {\n /** Updated staff member settings. */\n staffMemberSettings?: StaffMemberSettings;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountDetails {\n /**\n * ID of the account.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the site, if applicable.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface StaffMemberSettingsUpdatedEnvelope {\n entity: StaffMemberSettings;\n metadata: EventMetadata;\n /** @hidden */\n modifiedFields: Record<string, any>;\n}\n\n/**\n * Triggered when a `staffMemberSettings` object is updated.\n * @permissionId STAFF_MEMBERS_SETTINGS_READ\n * @webhook\n * @eventType wix.bookings.staff_settings.v1.staff_member_settings_updated\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onStaffMemberSettingsUpdated(\n handler: (event: StaffMemberSettingsUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves the current privacy settings for staff member contact information.\n *\n * Use this method to check whether the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) are accessible in API responses and on the live site.\n * @public\n * @documentationMaturity preview\n * @permissionId STAFF_MEMBERS_SETTINGS.READ\n * @applicableIdentity APP\n * @returns Retrieved staff member settings.\n * @fqn wix.bookings.staff.settings.v1.StaffMemberSettingsService.GetStaffMemberSettings\n */\nexport async function getStaffMemberSettings(): Promise<StaffMemberSettings> {\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 ambassadorWixBookingsStaffSettingsV1StaffMemberSettings.getStaffMemberSettings(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.staffMemberSettings!;\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\n/**\n * Updates privacy settings for staff member contact information.\n *\n * Each time the settings are updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the settings.\n * This ensures you're working with the latest settings and prevents unintended overwrites.\n *\n * Changes to these settings take effect immediately and affect both API responses and live site display.\n * When you enable `contactInformation.publiclyAccessible`, the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) include actual contact information, and this information is displayed on the live site.\n * When you disable it, these fields are empty in API responses if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions, and contact information isn't displayed on the live site.\n *\n * Identities with appropriate permissions can access staff contact information in API responses regardless of this setting.\n * @param staffMemberSettings - Staff member settings to update, may be partial.\n * @public\n * @documentationMaturity preview\n * @requiredField staffMemberSettings\n * @requiredField staffMemberSettings.revision\n * @permissionId STAFF_MEMBERS_SETTINGS.UPDATE\n * @applicableIdentity APP\n * @returns Updated staff member settings.\n * @fqn wix.bookings.staff.settings.v1.StaffMemberSettingsService.UpdateStaffMemberSettings\n */\nexport async function updateStaffMemberSettings(\n staffMemberSettings: NonNullablePaths<StaffMemberSettings, `revision`, 2>\n): Promise<StaffMemberSettings> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n staffMemberSettings: staffMemberSettings,\n });\n\n const reqOpts =\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettings.updateStaffMemberSettings(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.staffMemberSettings!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { staffMemberSettings: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['staffMemberSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveWixBookingsStaffSettingsV1StaffMemberSettingsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/staff-member-settings',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v1/staff-member-settings',\n destPath: '/v1/staff-member-settings',\n },\n ],\n _: [\n {\n srcPath: '/_api/staff-member-settings',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/staff-member-settings',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_staff-member-settings';\n\n/**\n * Retrieves the current privacy settings for staff member contact information.\n *\n * Use this method to check whether the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) are accessible in API responses and on the live site.\n */\nexport function getStaffMemberSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __getStaffMemberSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.staff_settings.v1.staff_member_settings',\n method: 'GET' as any,\n methodFqn:\n 'wix.bookings.staff.settings.v1.StaffMemberSettingsService.GetStaffMemberSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsStaffSettingsV1StaffMemberSettingsServiceUrl({\n protoPath: '/v1/staff-member-settings',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'staffMemberSettings.createdDate' },\n { path: 'staffMemberSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getStaffMemberSettings;\n}\n\n/**\n * Updates privacy settings for staff member contact information.\n *\n * Each time the settings are updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the settings.\n * This ensures you're working with the latest settings and prevents unintended overwrites.\n *\n * Changes to these settings take effect immediately and affect both API responses and live site display.\n * When you enable `contactInformation.publiclyAccessible`, the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) include actual contact information, and this information is displayed on the live site.\n * When you disable it, these fields are empty in API responses if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions, and contact information isn't displayed on the live site.\n *\n * Identities with appropriate permissions can access staff contact information in API responses regardless of this setting.\n */\nexport function updateStaffMemberSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateStaffMemberSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'staffMemberSettings.createdDate' },\n { path: 'staffMemberSettings.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.staff_settings.v1.staff_member_settings',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.bookings.staff.settings.v1.StaffMemberSettingsService.UpdateStaffMemberSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsStaffSettingsV1StaffMemberSettingsServiceUrl({\n protoPath: '/v1/staff-member-settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'staffMemberSettings.createdDate' },\n { path: 'staffMemberSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateStaffMemberSettings;\n}\n","import {\n getStaffMemberSettings as publicGetStaffMemberSettings,\n updateStaffMemberSettings as publicUpdateStaffMemberSettings,\n} from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onStaffMemberSettingsUpdated as publicOnStaffMemberSettingsUpdated } from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.public.js';\n\nexport const getStaffMemberSettings: MaybeContext<\n BuildRESTFunction<typeof publicGetStaffMemberSettings> &\n typeof publicGetStaffMemberSettings\n> = /*#__PURE__*/ createRESTModule(publicGetStaffMemberSettings);\nexport const updateStaffMemberSettings: MaybeContext<\n BuildRESTFunction<typeof publicUpdateStaffMemberSettings> &\n typeof publicUpdateStaffMemberSettings\n> = /*#__PURE__*/ createRESTModule(publicUpdateStaffMemberSettings);\n/**\n * Triggered when a `staffMemberSettings` object is updated.\n */\nexport const onStaffMemberSettingsUpdated: BuildEventDefinition<\n typeof publicOnStaffMemberSettingsUpdated\n> &\n typeof publicOnStaffMemberSettingsUpdated = createEventModule(\n publicOnStaffMemberSettingsUpdated\n);\n\nexport { WebhookIdentityType } from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.universal.js';\nexport {\n StaffMemberSettings,\n ContactInformation,\n ExtendedFields,\n GetStaffMemberSettingsRequest,\n GetStaffMemberSettingsResponse,\n UpdateStaffMemberSettingsRequest,\n UpdateStaffMemberSettingsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountDetails,\n BaseEventMetadata,\n EventMetadata,\n StaffMemberSettingsUpdatedEnvelope,\n} from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.universal.js';\nexport { WebhookIdentityTypeWithLiterals } from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,gCAAAA;AAAA,EAAA,oCAAAC;AAAA,EAAA,iCAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,+DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAA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ffMemberSettings","onStaffMemberSettingsUpdated","updateStaffMemberSettings","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","WebhookIdentityType","getStaffMemberSettings","sdkTransformError","updateStaffMemberSettings","getStaffMemberSettings","updateStaffMemberSettings","import_rest_modules","getStaffMemberSettings","updateStaffMemberSettings","onStaffMemberSettingsUpdated"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.public.ts","../../src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.universal.ts","../../src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.http.ts","../../src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.context.ts"],"sourcesContent":["export * from './src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n StaffMemberSettings,\n StaffMemberSettingsUpdatedEnvelope,\n getStaffMemberSettings as universalGetStaffMemberSettings,\n updateStaffMemberSettings as universalUpdateStaffMemberSettings,\n} from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/bookings' };\n\nexport function getStaffMemberSettings(\n httpClient: HttpClient\n): GetStaffMemberSettingsSignature {\n return () =>\n universalGetStaffMemberSettings(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetStaffMemberSettingsSignature {\n /**\n * Retrieves the current privacy settings for staff member contact information.\n *\n * Use this method to check whether the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) are accessible in API responses and on the live site.\n * @returns Retrieved staff member settings.\n */\n (): Promise<StaffMemberSettings>;\n}\n\nexport function updateStaffMemberSettings(\n httpClient: HttpClient\n): UpdateStaffMemberSettingsSignature {\n return (\n staffMemberSettings: NonNullablePaths<StaffMemberSettings, `revision`, 2>\n ) =>\n universalUpdateStaffMemberSettings(\n staffMemberSettings,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateStaffMemberSettingsSignature {\n /**\n * Updates privacy settings for staff member contact information.\n *\n * Each time the settings are updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the settings.\n * This ensures you're working with the latest settings and prevents unintended overwrites.\n *\n * Changes to these settings take effect immediately and affect both API responses and live site display.\n * When you enable `contactInformation.publiclyAccessible`, the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) include actual contact information, and this information is displayed on the live site.\n * When you disable it, these fields are empty in API responses if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions, and contact information isn't displayed on the live site.\n *\n * Identities with appropriate permissions can access staff contact information in API responses regardless of this setting.\n * @param - Staff member settings to update, may be partial.\n * @returns Updated staff member settings.\n */\n (\n staffMemberSettings: NonNullablePaths<StaffMemberSettings, `revision`, 2>\n ): Promise<StaffMemberSettings>;\n}\n\nexport const onStaffMemberSettingsUpdated = EventDefinition(\n 'wix.bookings.staff_settings.v1.staff_member_settings_updated',\n true,\n (event: StaffMemberSettingsUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n { path: 'modifiedFields.createdDate' },\n { path: 'modifiedFields.updatedDate' },\n ],\n },\n ])\n )\n)<StaffMemberSettingsUpdatedEnvelope>();\n\nexport {\n AccountInfo,\n ActionEvent,\n BaseEventMetadata,\n ContactInformation,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n ExtendedFields,\n GetStaffMemberSettingsRequest,\n GetStaffMemberSettingsResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n RestoreInfo,\n StaffMemberSettings,\n StaffMemberSettingsUpdatedEnvelope,\n UpdateStaffMemberSettingsRequest,\n UpdateStaffMemberSettingsResponse,\n WebhookIdentityType,\n} from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.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 ambassadorWixBookingsStaffSettingsV1StaffMemberSettings from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.http.js';\n\n/**\n * Settings that control the visibility of staff members' contact information.\n *\n * These settings determine whether the `email` and `phone` fields are populated in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object).\n * When enabled, these fields contain staff contact information.\n * When disabled, these fields are empty if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions.\n * Identities with appropriate permissions may still access the information.\n *\n * This is a singleton resource. Each site has exactly one settings object,\n * automatically created when Wix Bookings is installed.\n */\nexport interface StaffMemberSettings {\n /**\n * ID of the staff member settings object. There is one settings object per site.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the `staffMemberSettings` object is updated.\n * To prevent conflicting changes, the current revision must be specified when updating the `staffMemberSettings` object.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the `staffMemberSettings` object was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the `staffMemberSettings` object was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Privacy settings for controlling staff member contact information visibility in API responses and on the live site. */\n contactInformation?: ContactInformation;\n /**\n * Custom field data for the staff member settings.\n * Extended fields must be configured in the app dashboard before they can be accessed with API calls.\n *\n * Learn more about extended fields at https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.\n */\n extendedFields?: ExtendedFields;\n}\n\n/**\n * Privacy settings for staff member contact information.\n *\n * These settings control whether staff members' email addresses and phone numbers\n * are populated in Staff Member objects returned by the Staff Members API.\n */\nexport interface ContactInformation {\n /**\n * Whether staff members' email addresses and phone numbers are accessible in API responses and on the live site.\n *\n * - `true`: The `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) contain actual contact information, and this information is displayed on the live site.\n * - `false`: These fields are empty in API responses if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions, and contact information isn't displayed on the live site.\n *\n * Identities with appropriate permissions can still access this information in API responses regardless of this setting.\n *\n * Default: `false`\n */\n publiclyAccessible?: boolean | null;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface GetStaffMemberSettingsRequest {}\n\nexport interface GetStaffMemberSettingsResponse {\n /** Retrieved staff member settings. */\n staffMemberSettings?: StaffMemberSettings;\n}\n\nexport interface UpdateStaffMemberSettingsRequest {\n /** Staff member settings to update, may be partial. */\n staffMemberSettings: StaffMemberSettings;\n}\n\nexport interface UpdateStaffMemberSettingsResponse {\n /** Updated staff member settings. */\n staffMemberSettings?: StaffMemberSettings;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface StaffMemberSettingsUpdatedEnvelope {\n entity: StaffMemberSettings;\n metadata: EventMetadata;\n /** @hidden */\n modifiedFields: Record<string, any>;\n}\n\n/**\n * Triggered when a `staffMemberSettings` object is updated.\n * @permissionId STAFF_MEMBERS_SETTINGS_READ\n * @webhook\n * @eventType wix.bookings.staff_settings.v1.staff_member_settings_updated\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onStaffMemberSettingsUpdated(\n handler: (event: StaffMemberSettingsUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves the current privacy settings for staff member contact information.\n *\n * Use this method to check whether the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) are accessible in API responses and on the live site.\n * @public\n * @documentationMaturity preview\n * @permissionId STAFF_MEMBERS_SETTINGS.READ\n * @applicableIdentity APP\n * @returns Retrieved staff member settings.\n * @fqn wix.bookings.staff.settings.v1.StaffMemberSettingsService.GetStaffMemberSettings\n */\nexport async function getStaffMemberSettings(): Promise<StaffMemberSettings> {\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 ambassadorWixBookingsStaffSettingsV1StaffMemberSettings.getStaffMemberSettings(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.staffMemberSettings!;\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\n/**\n * Updates privacy settings for staff member contact information.\n *\n * Each time the settings are updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the settings.\n * This ensures you're working with the latest settings and prevents unintended overwrites.\n *\n * Changes to these settings take effect immediately and affect both API responses and live site display.\n * When you enable `contactInformation.publiclyAccessible`, the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) include actual contact information, and this information is displayed on the live site.\n * When you disable it, these fields are empty in API responses if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions, and contact information isn't displayed on the live site.\n *\n * Identities with appropriate permissions can access staff contact information in API responses regardless of this setting.\n * @param staffMemberSettings - Staff member settings to update, may be partial.\n * @public\n * @documentationMaturity preview\n * @requiredField staffMemberSettings\n * @requiredField staffMemberSettings.revision\n * @permissionId STAFF_MEMBERS_SETTINGS.UPDATE\n * @applicableIdentity APP\n * @returns Updated staff member settings.\n * @fqn wix.bookings.staff.settings.v1.StaffMemberSettingsService.UpdateStaffMemberSettings\n */\nexport async function updateStaffMemberSettings(\n staffMemberSettings: NonNullablePaths<StaffMemberSettings, `revision`, 2>\n): Promise<StaffMemberSettings> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n staffMemberSettings: staffMemberSettings,\n });\n\n const reqOpts =\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettings.updateStaffMemberSettings(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.staffMemberSettings!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { staffMemberSettings: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['staffMemberSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveWixBookingsStaffSettingsV1StaffMemberSettingsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/staff-member-settings',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v1/staff-member-settings',\n destPath: '/v1/staff-member-settings',\n },\n ],\n _: [\n {\n srcPath: '/_api/staff-member-settings',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/staff-member-settings',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_staff-member-settings';\n\n/**\n * Retrieves the current privacy settings for staff member contact information.\n *\n * Use this method to check whether the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) are accessible in API responses and on the live site.\n */\nexport function getStaffMemberSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __getStaffMemberSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.staff_settings.v1.staff_member_settings',\n method: 'GET' as any,\n methodFqn:\n 'wix.bookings.staff.settings.v1.StaffMemberSettingsService.GetStaffMemberSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsStaffSettingsV1StaffMemberSettingsServiceUrl({\n protoPath: '/v1/staff-member-settings',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'staffMemberSettings.createdDate' },\n { path: 'staffMemberSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getStaffMemberSettings;\n}\n\n/**\n * Updates privacy settings for staff member contact information.\n *\n * Each time the settings are updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the settings.\n * This ensures you're working with the latest settings and prevents unintended overwrites.\n *\n * Changes to these settings take effect immediately and affect both API responses and live site display.\n * When you enable `contactInformation.publiclyAccessible`, the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) include actual contact information, and this information is displayed on the live site.\n * When you disable it, these fields are empty in API responses if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions, and contact information isn't displayed on the live site.\n *\n * Identities with appropriate permissions can access staff contact information in API responses regardless of this setting.\n */\nexport function updateStaffMemberSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateStaffMemberSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'staffMemberSettings.createdDate' },\n { path: 'staffMemberSettings.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.staff_settings.v1.staff_member_settings',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.bookings.staff.settings.v1.StaffMemberSettingsService.UpdateStaffMemberSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsStaffSettingsV1StaffMemberSettingsServiceUrl({\n protoPath: '/v1/staff-member-settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'staffMemberSettings.createdDate' },\n { path: 'staffMemberSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateStaffMemberSettings;\n}\n","import {\n getStaffMemberSettings as publicGetStaffMemberSettings,\n updateStaffMemberSettings as publicUpdateStaffMemberSettings,\n} from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onStaffMemberSettingsUpdated as publicOnStaffMemberSettingsUpdated } from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.public.js';\n\nexport const getStaffMemberSettings: MaybeContext<\n BuildRESTFunction<typeof publicGetStaffMemberSettings> &\n typeof publicGetStaffMemberSettings\n> = /*#__PURE__*/ createRESTModule(publicGetStaffMemberSettings);\nexport const updateStaffMemberSettings: MaybeContext<\n BuildRESTFunction<typeof publicUpdateStaffMemberSettings> &\n typeof publicUpdateStaffMemberSettings\n> = /*#__PURE__*/ createRESTModule(publicUpdateStaffMemberSettings);\n/**\n * Triggered when a `staffMemberSettings` object is updated.\n */\nexport const onStaffMemberSettingsUpdated: BuildEventDefinition<\n typeof publicOnStaffMemberSettingsUpdated\n> &\n typeof publicOnStaffMemberSettingsUpdated = createEventModule(\n publicOnStaffMemberSettingsUpdated\n);\n\nexport { WebhookIdentityType } from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.universal.js';\nexport {\n StaffMemberSettings,\n ContactInformation,\n ExtendedFields,\n GetStaffMemberSettingsRequest,\n GetStaffMemberSettingsResponse,\n UpdateStaffMemberSettingsRequest,\n UpdateStaffMemberSettingsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n BaseEventMetadata,\n EventMetadata,\n StaffMemberSettingsUpdatedEnvelope,\n} from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.universal.js';\nexport { WebhookIdentityTypeWithLiterals } from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,gCAAAA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M,mCAA+B;AAAA,EAC1C;AAAA,EACA;AAAA,EACA,CAAC,cACC;AAAA,QACE,wCAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,6BAA6B;AAAA,UACrC,EAAE,MAAM,6BAA6B;AAAA,QACvC;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAsC;;;AGjFtC,IAAAC,uBAAiC;AACjC,sCAAkC;AAQ3B,IAAMC,0BAGK,2DAAiBA,uBAA4B;AACxD,IAAMC,6BAGK,2DAAiBA,0BAA+B;AAI3D,IAAMC,oCAGiC;AAAA,EAC5C;AACF;","names":["getStaffMemberSettings","onStaffMemberSettingsUpdated","updateStaffMemberSettings","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","WebhookIdentityType","getStaffMemberSettings","sdkTransformError","updateStaffMemberSettings","getStaffMemberSettings","updateStaffMemberSettings","import_rest_modules","getStaffMemberSettings","updateStaffMemberSettings","onStaffMemberSettingsUpdated"]}
@@ -222,19 +222,19 @@ declare enum WebhookIdentityType {
222
222
  }
223
223
  /** @enumType */
224
224
  type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
225
- interface AccountDetails {
225
+ interface AccountInfo {
226
226
  /**
227
- * ID of the account.
227
+ * ID of the Wix account associated with the event.
228
228
  * @format GUID
229
229
  */
230
230
  accountId?: string | null;
231
231
  /**
232
- * ID of the parent account.
232
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
233
233
  * @format GUID
234
234
  */
235
235
  parentAccountId?: string | null;
236
236
  /**
237
- * ID of the site, if applicable.
237
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
238
238
  * @format GUID
239
239
  */
240
240
  siteId?: string | null;
@@ -334,4 +334,4 @@ declare function getStaffMemberSettings(): Promise<StaffMemberSettings>;
334
334
  */
335
335
  declare function updateStaffMemberSettings(staffMemberSettings: NonNullablePaths<StaffMemberSettings, `revision`, 2>): Promise<StaffMemberSettings>;
336
336
 
337
- export { type AccountDetails, type ActionEvent, type BaseEventMetadata, type ContactInformation, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type GetStaffMemberSettingsRequest, type GetStaffMemberSettingsResponse, type IdentificationData, type IdentificationDataIdOneOf, type MessageEnvelope, type RestoreInfo, type StaffMemberSettings, type StaffMemberSettingsUpdatedEnvelope, type UpdateStaffMemberSettingsRequest, type UpdateStaffMemberSettingsResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, getStaffMemberSettings, onStaffMemberSettingsUpdated, updateStaffMemberSettings };
337
+ export { type AccountInfo, type ActionEvent, type BaseEventMetadata, type ContactInformation, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type GetStaffMemberSettingsRequest, type GetStaffMemberSettingsResponse, type IdentificationData, type IdentificationDataIdOneOf, type MessageEnvelope, type RestoreInfo, type StaffMemberSettings, type StaffMemberSettingsUpdatedEnvelope, type UpdateStaffMemberSettingsRequest, type UpdateStaffMemberSettingsResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, getStaffMemberSettings, onStaffMemberSettingsUpdated, updateStaffMemberSettings };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.typings.ts","../../src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.universal.ts","../../src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.http.ts"],"sourcesContent":["export * from './src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.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 ambassadorWixBookingsStaffSettingsV1StaffMemberSettings from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.http.js';\n\n/**\n * Settings that control the visibility of staff members' contact information.\n *\n * These settings determine whether the `email` and `phone` fields are populated in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object).\n * When enabled, these fields contain staff contact information.\n * When disabled, these fields are empty if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions.\n * Identities with appropriate permissions may still access the information.\n *\n * This is a singleton resource. Each site has exactly one settings object,\n * automatically created when Wix Bookings is installed.\n */\nexport interface StaffMemberSettings {\n /**\n * ID of the staff member settings object. There is one settings object per site.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the `staffMemberSettings` object is updated.\n * To prevent conflicting changes, the current revision must be specified when updating the `staffMemberSettings` object.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the `staffMemberSettings` object was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the `staffMemberSettings` object was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Privacy settings for controlling staff member contact information visibility in API responses and on the live site. */\n contactInformation?: ContactInformation;\n /**\n * Custom field data for the staff member settings.\n * Extended fields must be configured in the app dashboard before they can be accessed with API calls.\n *\n * Learn more about extended fields at https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.\n */\n extendedFields?: ExtendedFields;\n}\n\n/**\n * Privacy settings for staff member contact information.\n *\n * These settings control whether staff members' email addresses and phone numbers\n * are populated in Staff Member objects returned by the Staff Members API.\n */\nexport interface ContactInformation {\n /**\n * Whether staff members' email addresses and phone numbers are accessible in API responses and on the live site.\n *\n * - `true`: The `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) contain actual contact information, and this information is displayed on the live site.\n * - `false`: These fields are empty in API responses if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions, and contact information isn't displayed on the live site.\n *\n * Identities with appropriate permissions can still access this information in API responses regardless of this setting.\n *\n * Default: `false`\n */\n publiclyAccessible?: boolean | null;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface GetStaffMemberSettingsRequest {}\n\nexport interface GetStaffMemberSettingsResponse {\n /** Retrieved staff member settings. */\n staffMemberSettings?: StaffMemberSettings;\n}\n\nexport interface UpdateStaffMemberSettingsRequest {\n /** Staff member settings to update, may be partial. */\n staffMemberSettings: StaffMemberSettings;\n}\n\nexport interface UpdateStaffMemberSettingsResponse {\n /** Updated staff member settings. */\n staffMemberSettings?: StaffMemberSettings;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountDetails {\n /**\n * ID of the account.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the site, if applicable.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface StaffMemberSettingsUpdatedEnvelope {\n entity: StaffMemberSettings;\n metadata: EventMetadata;\n /** @hidden */\n modifiedFields: Record<string, any>;\n}\n\n/**\n * Triggered when a `staffMemberSettings` object is updated.\n * @permissionId STAFF_MEMBERS_SETTINGS_READ\n * @webhook\n * @eventType wix.bookings.staff_settings.v1.staff_member_settings_updated\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onStaffMemberSettingsUpdated(\n handler: (event: StaffMemberSettingsUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves the current privacy settings for staff member contact information.\n *\n * Use this method to check whether the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) are accessible in API responses and on the live site.\n * @public\n * @documentationMaturity preview\n * @permissionId STAFF_MEMBERS_SETTINGS.READ\n * @applicableIdentity APP\n * @returns Retrieved staff member settings.\n * @fqn wix.bookings.staff.settings.v1.StaffMemberSettingsService.GetStaffMemberSettings\n */\nexport async function getStaffMemberSettings(): Promise<StaffMemberSettings> {\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 ambassadorWixBookingsStaffSettingsV1StaffMemberSettings.getStaffMemberSettings(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.staffMemberSettings!;\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\n/**\n * Updates privacy settings for staff member contact information.\n *\n * Each time the settings are updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the settings.\n * This ensures you're working with the latest settings and prevents unintended overwrites.\n *\n * Changes to these settings take effect immediately and affect both API responses and live site display.\n * When you enable `contactInformation.publiclyAccessible`, the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) include actual contact information, and this information is displayed on the live site.\n * When you disable it, these fields are empty in API responses if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions, and contact information isn't displayed on the live site.\n *\n * Identities with appropriate permissions can access staff contact information in API responses regardless of this setting.\n * @param staffMemberSettings - Staff member settings to update, may be partial.\n * @public\n * @documentationMaturity preview\n * @requiredField staffMemberSettings\n * @requiredField staffMemberSettings.revision\n * @permissionId STAFF_MEMBERS_SETTINGS.UPDATE\n * @applicableIdentity APP\n * @returns Updated staff member settings.\n * @fqn wix.bookings.staff.settings.v1.StaffMemberSettingsService.UpdateStaffMemberSettings\n */\nexport async function updateStaffMemberSettings(\n staffMemberSettings: NonNullablePaths<StaffMemberSettings, `revision`, 2>\n): Promise<StaffMemberSettings> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n staffMemberSettings: staffMemberSettings,\n });\n\n const reqOpts =\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettings.updateStaffMemberSettings(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.staffMemberSettings!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { staffMemberSettings: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['staffMemberSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveWixBookingsStaffSettingsV1StaffMemberSettingsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/staff-member-settings',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v1/staff-member-settings',\n destPath: '/v1/staff-member-settings',\n },\n ],\n _: [\n {\n srcPath: '/_api/staff-member-settings',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/staff-member-settings',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_staff-member-settings';\n\n/**\n * Retrieves the current privacy settings for staff member contact information.\n *\n * Use this method to check whether the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) are accessible in API responses and on the live site.\n */\nexport function getStaffMemberSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __getStaffMemberSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.staff_settings.v1.staff_member_settings',\n method: 'GET' as any,\n methodFqn:\n 'wix.bookings.staff.settings.v1.StaffMemberSettingsService.GetStaffMemberSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsStaffSettingsV1StaffMemberSettingsServiceUrl({\n protoPath: '/v1/staff-member-settings',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'staffMemberSettings.createdDate' },\n { path: 'staffMemberSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getStaffMemberSettings;\n}\n\n/**\n * Updates privacy settings for staff member contact information.\n *\n * Each time the settings are updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the settings.\n * This ensures you're working with the latest settings and prevents unintended overwrites.\n *\n * Changes to these settings take effect immediately and affect both API responses and live site display.\n * When you enable `contactInformation.publiclyAccessible`, the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) include actual contact information, and this information is displayed on the live site.\n * When you disable it, these fields are empty in API responses if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions, and contact information isn't displayed on the live site.\n *\n * Identities with appropriate permissions can access staff contact information in API responses regardless of this setting.\n */\nexport function updateStaffMemberSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateStaffMemberSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'staffMemberSettings.createdDate' },\n { path: 'staffMemberSettings.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.staff_settings.v1.staff_member_settings',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.bookings.staff.settings.v1.StaffMemberSettingsService.UpdateStaffMemberSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsStaffSettingsV1StaffMemberSettingsServiceUrl({\n protoPath: '/v1/staff-member-settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'staffMemberSettings.createdDate' },\n { path: 'staffMemberSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateStaffMemberSettings;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,gCAAAA;AAAA,EAAA,iCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,+DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAA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;AAAA,IACtD;AAAA,EACF;AAEF,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI,GACtD;AAAA,EACN,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,qBAAqB,OAAO;AAAA,QACxD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,qBAAqB;AAAA,IACxB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["getStaffMemberSettings","updateStaffMemberSettings","import_timestamp","import_rest_modules","payload","WebhookIdentityType","getStaffMemberSettings","sdkTransformError","updateStaffMemberSettings"]}
1
+ {"version":3,"sources":["../../index.typings.ts","../../src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.universal.ts","../../src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.http.ts"],"sourcesContent":["export * from './src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.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 ambassadorWixBookingsStaffSettingsV1StaffMemberSettings from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.http.js';\n\n/**\n * Settings that control the visibility of staff members' contact information.\n *\n * These settings determine whether the `email` and `phone` fields are populated in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object).\n * When enabled, these fields contain staff contact information.\n * When disabled, these fields are empty if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions.\n * Identities with appropriate permissions may still access the information.\n *\n * This is a singleton resource. Each site has exactly one settings object,\n * automatically created when Wix Bookings is installed.\n */\nexport interface StaffMemberSettings {\n /**\n * ID of the staff member settings object. There is one settings object per site.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the `staffMemberSettings` object is updated.\n * To prevent conflicting changes, the current revision must be specified when updating the `staffMemberSettings` object.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the `staffMemberSettings` object was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the `staffMemberSettings` object was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Privacy settings for controlling staff member contact information visibility in API responses and on the live site. */\n contactInformation?: ContactInformation;\n /**\n * Custom field data for the staff member settings.\n * Extended fields must be configured in the app dashboard before they can be accessed with API calls.\n *\n * Learn more about extended fields at https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.\n */\n extendedFields?: ExtendedFields;\n}\n\n/**\n * Privacy settings for staff member contact information.\n *\n * These settings control whether staff members' email addresses and phone numbers\n * are populated in Staff Member objects returned by the Staff Members API.\n */\nexport interface ContactInformation {\n /**\n * Whether staff members' email addresses and phone numbers are accessible in API responses and on the live site.\n *\n * - `true`: The `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) contain actual contact information, and this information is displayed on the live site.\n * - `false`: These fields are empty in API responses if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions, and contact information isn't displayed on the live site.\n *\n * Identities with appropriate permissions can still access this information in API responses regardless of this setting.\n *\n * Default: `false`\n */\n publiclyAccessible?: boolean | null;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface GetStaffMemberSettingsRequest {}\n\nexport interface GetStaffMemberSettingsResponse {\n /** Retrieved staff member settings. */\n staffMemberSettings?: StaffMemberSettings;\n}\n\nexport interface UpdateStaffMemberSettingsRequest {\n /** Staff member settings to update, may be partial. */\n staffMemberSettings: StaffMemberSettings;\n}\n\nexport interface UpdateStaffMemberSettingsResponse {\n /** Updated staff member settings. */\n staffMemberSettings?: StaffMemberSettings;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface StaffMemberSettingsUpdatedEnvelope {\n entity: StaffMemberSettings;\n metadata: EventMetadata;\n /** @hidden */\n modifiedFields: Record<string, any>;\n}\n\n/**\n * Triggered when a `staffMemberSettings` object is updated.\n * @permissionId STAFF_MEMBERS_SETTINGS_READ\n * @webhook\n * @eventType wix.bookings.staff_settings.v1.staff_member_settings_updated\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onStaffMemberSettingsUpdated(\n handler: (event: StaffMemberSettingsUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves the current privacy settings for staff member contact information.\n *\n * Use this method to check whether the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) are accessible in API responses and on the live site.\n * @public\n * @documentationMaturity preview\n * @permissionId STAFF_MEMBERS_SETTINGS.READ\n * @applicableIdentity APP\n * @returns Retrieved staff member settings.\n * @fqn wix.bookings.staff.settings.v1.StaffMemberSettingsService.GetStaffMemberSettings\n */\nexport async function getStaffMemberSettings(): Promise<StaffMemberSettings> {\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 ambassadorWixBookingsStaffSettingsV1StaffMemberSettings.getStaffMemberSettings(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.staffMemberSettings!;\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\n/**\n * Updates privacy settings for staff member contact information.\n *\n * Each time the settings are updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the settings.\n * This ensures you're working with the latest settings and prevents unintended overwrites.\n *\n * Changes to these settings take effect immediately and affect both API responses and live site display.\n * When you enable `contactInformation.publiclyAccessible`, the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) include actual contact information, and this information is displayed on the live site.\n * When you disable it, these fields are empty in API responses if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions, and contact information isn't displayed on the live site.\n *\n * Identities with appropriate permissions can access staff contact information in API responses regardless of this setting.\n * @param staffMemberSettings - Staff member settings to update, may be partial.\n * @public\n * @documentationMaturity preview\n * @requiredField staffMemberSettings\n * @requiredField staffMemberSettings.revision\n * @permissionId STAFF_MEMBERS_SETTINGS.UPDATE\n * @applicableIdentity APP\n * @returns Updated staff member settings.\n * @fqn wix.bookings.staff.settings.v1.StaffMemberSettingsService.UpdateStaffMemberSettings\n */\nexport async function updateStaffMemberSettings(\n staffMemberSettings: NonNullablePaths<StaffMemberSettings, `revision`, 2>\n): Promise<StaffMemberSettings> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n staffMemberSettings: staffMemberSettings,\n });\n\n const reqOpts =\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettings.updateStaffMemberSettings(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.staffMemberSettings!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { staffMemberSettings: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['staffMemberSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveWixBookingsStaffSettingsV1StaffMemberSettingsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/staff-member-settings',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v1/staff-member-settings',\n destPath: '/v1/staff-member-settings',\n },\n ],\n _: [\n {\n srcPath: '/_api/staff-member-settings',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/staff-member-settings',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_staff-member-settings';\n\n/**\n * Retrieves the current privacy settings for staff member contact information.\n *\n * Use this method to check whether the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) are accessible in API responses and on the live site.\n */\nexport function getStaffMemberSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __getStaffMemberSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.staff_settings.v1.staff_member_settings',\n method: 'GET' as any,\n methodFqn:\n 'wix.bookings.staff.settings.v1.StaffMemberSettingsService.GetStaffMemberSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsStaffSettingsV1StaffMemberSettingsServiceUrl({\n protoPath: '/v1/staff-member-settings',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'staffMemberSettings.createdDate' },\n { path: 'staffMemberSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getStaffMemberSettings;\n}\n\n/**\n * Updates privacy settings for staff member contact information.\n *\n * Each time the settings are updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the settings.\n * This ensures you're working with the latest settings and prevents unintended overwrites.\n *\n * Changes to these settings take effect immediately and affect both API responses and live site display.\n * When you enable `contactInformation.publiclyAccessible`, the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) include actual contact information, and this information is displayed on the live site.\n * When you disable it, these fields are empty in API responses if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions, and contact information isn't displayed on the live site.\n *\n * Identities with appropriate permissions can access staff contact information in API responses regardless of this setting.\n */\nexport function updateStaffMemberSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateStaffMemberSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'staffMemberSettings.createdDate' },\n { path: 'staffMemberSettings.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.staff_settings.v1.staff_member_settings',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.bookings.staff.settings.v1.StaffMemberSettingsService.UpdateStaffMemberSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsStaffSettingsV1StaffMemberSettingsServiceUrl({\n protoPath: '/v1/staff-member-settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'staffMemberSettings.createdDate' },\n { path: 'staffMemberSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateStaffMemberSettings;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,gCAAAA;AAAA,EAAA,iCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,+DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAOd,SAAS,uBACd,SAC4B;AAC5B,WAAS,yBAAyB,EAAE,KAAK,GAAQ;AAC/C,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,+DAA+D;AAAA,QAClE,WAAW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R;AACF;","names":["getStaffMemberSettings","updateStaffMemberSettings","import_timestamp","import_rest_modules","payload","WebhookIdentityType","getStaffMemberSettings","sdkTransformError","updateStaffMemberSettings"]}
@@ -225,19 +225,19 @@ declare enum WebhookIdentityType {
225
225
  }
226
226
  /** @enumType */
227
227
  type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
228
- interface AccountDetails {
228
+ interface AccountInfo {
229
229
  /**
230
- * ID of the account.
230
+ * ID of the Wix account associated with the event.
231
231
  * @format GUID
232
232
  */
233
233
  accountId?: string | null;
234
234
  /**
235
- * ID of the parent account.
235
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
236
236
  * @format GUID
237
237
  */
238
238
  parentAccountId?: string | null;
239
239
  /**
240
- * ID of the site, if applicable.
240
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
241
241
  * @format GUID
242
242
  */
243
243
  siteId?: string | null;
@@ -256,4 +256,4 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
256
256
  declare function getStaffMemberSettings(): __PublicMethodMetaInfo<'GET', {}, GetStaffMemberSettingsRequest$1, GetStaffMemberSettingsRequest, GetStaffMemberSettingsResponse$1, GetStaffMemberSettingsResponse>;
257
257
  declare function updateStaffMemberSettings(): __PublicMethodMetaInfo<'PATCH', {}, UpdateStaffMemberSettingsRequest$1, UpdateStaffMemberSettingsRequest, UpdateStaffMemberSettingsResponse$1, UpdateStaffMemberSettingsResponse>;
258
258
 
259
- export { type AccountDetails as AccountDetailsOriginal, type ActionEvent as ActionEventOriginal, type ContactInformation as ContactInformationOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type ExtendedFields as ExtendedFieldsOriginal, type GetStaffMemberSettingsRequest as GetStaffMemberSettingsRequestOriginal, type GetStaffMemberSettingsResponse as GetStaffMemberSettingsResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type RestoreInfo as RestoreInfoOriginal, type StaffMemberSettings as StaffMemberSettingsOriginal, type UpdateStaffMemberSettingsRequest as UpdateStaffMemberSettingsRequestOriginal, type UpdateStaffMemberSettingsResponse as UpdateStaffMemberSettingsResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, getStaffMemberSettings, updateStaffMemberSettings };
259
+ export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type ContactInformation as ContactInformationOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type ExtendedFields as ExtendedFieldsOriginal, type GetStaffMemberSettingsRequest as GetStaffMemberSettingsRequestOriginal, type GetStaffMemberSettingsResponse as GetStaffMemberSettingsResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type RestoreInfo as RestoreInfoOriginal, type StaffMemberSettings as StaffMemberSettingsOriginal, type UpdateStaffMemberSettingsRequest as UpdateStaffMemberSettingsRequestOriginal, type UpdateStaffMemberSettingsResponse as UpdateStaffMemberSettingsResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, getStaffMemberSettings, updateStaffMemberSettings };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../meta.ts","../../src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.http.ts","../../src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.types.ts","../../src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.meta.ts"],"sourcesContent":["export * from './src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveWixBookingsStaffSettingsV1StaffMemberSettingsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/staff-member-settings',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v1/staff-member-settings',\n destPath: '/v1/staff-member-settings',\n },\n ],\n _: [\n {\n srcPath: '/_api/staff-member-settings',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/staff-member-settings',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_staff-member-settings';\n\n/**\n * Retrieves the current privacy settings for staff member contact information.\n *\n * Use this method to check whether the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) are accessible in API responses and on the live site.\n */\nexport function getStaffMemberSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __getStaffMemberSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.staff_settings.v1.staff_member_settings',\n method: 'GET' as any,\n methodFqn:\n 'wix.bookings.staff.settings.v1.StaffMemberSettingsService.GetStaffMemberSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsStaffSettingsV1StaffMemberSettingsServiceUrl({\n protoPath: '/v1/staff-member-settings',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'staffMemberSettings.createdDate' },\n { path: 'staffMemberSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getStaffMemberSettings;\n}\n\n/**\n * Updates privacy settings for staff member contact information.\n *\n * Each time the settings are updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the settings.\n * This ensures you're working with the latest settings and prevents unintended overwrites.\n *\n * Changes to these settings take effect immediately and affect both API responses and live site display.\n * When you enable `contactInformation.publiclyAccessible`, the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) include actual contact information, and this information is displayed on the live site.\n * When you disable it, these fields are empty in API responses if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions, and contact information isn't displayed on the live site.\n *\n * Identities with appropriate permissions can access staff contact information in API responses regardless of this setting.\n */\nexport function updateStaffMemberSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateStaffMemberSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'staffMemberSettings.createdDate' },\n { path: 'staffMemberSettings.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.staff_settings.v1.staff_member_settings',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.bookings.staff.settings.v1.StaffMemberSettingsService.UpdateStaffMemberSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsStaffSettingsV1StaffMemberSettingsServiceUrl({\n protoPath: '/v1/staff-member-settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'staffMemberSettings.createdDate' },\n { path: 'staffMemberSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateStaffMemberSettings;\n}\n","/**\n * Settings that control the visibility of staff members' contact information.\n *\n * These settings determine whether the `email` and `phone` fields are populated in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object).\n * When enabled, these fields contain staff contact information.\n * When disabled, these fields are empty if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions.\n * Identities with appropriate permissions may still access the information.\n *\n * This is a singleton resource. Each site has exactly one settings object,\n * automatically created when Wix Bookings is installed.\n */\nexport interface StaffMemberSettings {\n /**\n * ID of the staff member settings object. There is one settings object per site.\n * @format GUID\n * @readonly\n */\n id?: string | null;\n /**\n * Revision number, which increments by 1 each time the `staffMemberSettings` object is updated.\n * To prevent conflicting changes, the current revision must be specified when updating the `staffMemberSettings` object.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the `staffMemberSettings` object was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the `staffMemberSettings` object was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n updatedDate?: Date | null;\n /** Privacy settings for controlling staff member contact information visibility in API responses and on the live site. */\n contactInformation?: ContactInformation;\n /**\n * Custom field data for the staff member settings.\n * Extended fields must be configured in the app dashboard before they can be accessed with API calls.\n *\n * Learn more about extended fields at https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.\n */\n extendedFields?: ExtendedFields;\n}\n\n/**\n * Privacy settings for staff member contact information.\n *\n * These settings control whether staff members' email addresses and phone numbers\n * are populated in Staff Member objects returned by the Staff Members API.\n */\nexport interface ContactInformation {\n /**\n * Whether staff members' email addresses and phone numbers are accessible in API responses and on the live site.\n *\n * - `true`: The `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) contain actual contact information, and this information is displayed on the live site.\n * - `false`: These fields are empty in API responses if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions, and contact information isn't displayed on the live site.\n *\n * Identities with appropriate permissions can still access this information in API responses regardless of this setting.\n *\n * Default: `false`\n */\n publiclyAccessible?: boolean | null;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface GetStaffMemberSettingsRequest {}\n\nexport interface GetStaffMemberSettingsResponse {\n /** Retrieved staff member settings. */\n staffMemberSettings?: StaffMemberSettings;\n}\n\nexport interface UpdateStaffMemberSettingsRequest {\n /** Staff member settings to update, may be partial. */\n staffMemberSettings: StaffMemberSettings;\n}\n\nexport interface UpdateStaffMemberSettingsResponse {\n /** Updated staff member settings. */\n staffMemberSettings?: StaffMemberSettings;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountDetails {\n /**\n * ID of the account.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the site, if applicable.\n * @format GUID\n */\n siteId?: string | null;\n}\n","import * as ambassadorWixBookingsStaffSettingsV1StaffMemberSettings from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.http.js';\nimport * as ambassadorWixBookingsStaffSettingsV1StaffMemberSettingsTypes from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.types.js';\nimport * as ambassadorWixBookingsStaffSettingsV1StaffMemberSettingsUniversalTypes from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function getStaffMemberSettings(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettingsUniversalTypes.GetStaffMemberSettingsRequest,\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettingsTypes.GetStaffMemberSettingsRequest,\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettingsUniversalTypes.GetStaffMemberSettingsResponse,\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettingsTypes.GetStaffMemberSettingsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettings.getStaffMemberSettings(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/staff-member-settings',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateStaffMemberSettings(): __PublicMethodMetaInfo<\n 'PATCH',\n {},\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettingsUniversalTypes.UpdateStaffMemberSettingsRequest,\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettingsTypes.UpdateStaffMemberSettingsRequest,\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettingsUniversalTypes.UpdateStaffMemberSettingsResponse,\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettingsTypes.UpdateStaffMemberSettingsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettings.updateStaffMemberSettings(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v1/staff-member-settings',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n StaffMemberSettings as StaffMemberSettingsOriginal,\n ContactInformation as ContactInformationOriginal,\n ExtendedFields as ExtendedFieldsOriginal,\n GetStaffMemberSettingsRequest as GetStaffMemberSettingsRequestOriginal,\n GetStaffMemberSettingsResponse as GetStaffMemberSettingsResponseOriginal,\n UpdateStaffMemberSettingsRequest as UpdateStaffMemberSettingsRequestOriginal,\n UpdateStaffMemberSettingsResponse as UpdateStaffMemberSettingsResponseOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountDetails as AccountDetailsOriginal,\n} from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,gCAAAA;AAAA,EAAA,iCAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,uBAAqD;AACrD,I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;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,6BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACoD;AAAA,IACtD;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["getStaffMemberSettings","updateStaffMemberSettings","import_timestamp","import_rest_modules","payload","WebhookIdentityType","getStaffMemberSettings","updateStaffMemberSettings"]}
1
+ {"version":3,"sources":["../../meta.ts","../../src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.http.ts","../../src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.types.ts","../../src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.meta.ts"],"sourcesContent":["export * from './src/bookings-staff-settings-v1-staff-member-settings-staff-member-settings.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveWixBookingsStaffSettingsV1StaffMemberSettingsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/staff-member-settings',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/bookings/v1/staff-member-settings',\n destPath: '/v1/staff-member-settings',\n },\n ],\n _: [\n {\n srcPath: '/_api/staff-member-settings',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/staff-member-settings',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_staff-member-settings';\n\n/**\n * Retrieves the current privacy settings for staff member contact information.\n *\n * Use this method to check whether the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) are accessible in API responses and on the live site.\n */\nexport function getStaffMemberSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __getStaffMemberSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.bookings.staff_settings.v1.staff_member_settings',\n method: 'GET' as any,\n methodFqn:\n 'wix.bookings.staff.settings.v1.StaffMemberSettingsService.GetStaffMemberSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsStaffSettingsV1StaffMemberSettingsServiceUrl({\n protoPath: '/v1/staff-member-settings',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'staffMemberSettings.createdDate' },\n { path: 'staffMemberSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getStaffMemberSettings;\n}\n\n/**\n * Updates privacy settings for staff member contact information.\n *\n * Each time the settings are updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the settings.\n * This ensures you're working with the latest settings and prevents unintended overwrites.\n *\n * Changes to these settings take effect immediately and affect both API responses and live site display.\n * When you enable `contactInformation.publiclyAccessible`, the `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) include actual contact information, and this information is displayed on the live site.\n * When you disable it, these fields are empty in API responses if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions, and contact information isn't displayed on the live site.\n *\n * Identities with appropriate permissions can access staff contact information in API responses regardless of this setting.\n */\nexport function updateStaffMemberSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateStaffMemberSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'staffMemberSettings.createdDate' },\n { path: 'staffMemberSettings.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.bookings.staff_settings.v1.staff_member_settings',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.bookings.staff.settings.v1.StaffMemberSettingsService.UpdateStaffMemberSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBookingsStaffSettingsV1StaffMemberSettingsServiceUrl({\n protoPath: '/v1/staff-member-settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'staffMemberSettings.createdDate' },\n { path: 'staffMemberSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateStaffMemberSettings;\n}\n","/**\n * Settings that control the visibility of staff members' contact information.\n *\n * These settings determine whether the `email` and `phone` fields are populated in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object).\n * When enabled, these fields contain staff contact information.\n * When disabled, these fields are empty if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions.\n * Identities with appropriate permissions may still access the information.\n *\n * This is a singleton resource. Each site has exactly one settings object,\n * automatically created when Wix Bookings is installed.\n */\nexport interface StaffMemberSettings {\n /**\n * ID of the staff member settings object. There is one settings object per site.\n * @format GUID\n * @readonly\n */\n id?: string | null;\n /**\n * Revision number, which increments by 1 each time the `staffMemberSettings` object is updated.\n * To prevent conflicting changes, the current revision must be specified when updating the `staffMemberSettings` object.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the `staffMemberSettings` object was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the `staffMemberSettings` object was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n updatedDate?: Date | null;\n /** Privacy settings for controlling staff member contact information visibility in API responses and on the live site. */\n contactInformation?: ContactInformation;\n /**\n * Custom field data for the staff member settings.\n * Extended fields must be configured in the app dashboard before they can be accessed with API calls.\n *\n * Learn more about extended fields at https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.\n */\n extendedFields?: ExtendedFields;\n}\n\n/**\n * Privacy settings for staff member contact information.\n *\n * These settings control whether staff members' email addresses and phone numbers\n * are populated in Staff Member objects returned by the Staff Members API.\n */\nexport interface ContactInformation {\n /**\n * Whether staff members' email addresses and phone numbers are accessible in API responses and on the live site.\n *\n * - `true`: The `email` and `phone` fields in [staff member objects](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/staff-member-object) contain actual contact information, and this information is displayed on the live site.\n * - `false`: These fields are empty in API responses if the calling [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) doesn't have sufficient permissions, and contact information isn't displayed on the live site.\n *\n * Identities with appropriate permissions can still access this information in API responses regardless of this setting.\n *\n * Default: `false`\n */\n publiclyAccessible?: boolean | null;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface GetStaffMemberSettingsRequest {}\n\nexport interface GetStaffMemberSettingsResponse {\n /** Retrieved staff member settings. */\n staffMemberSettings?: StaffMemberSettings;\n}\n\nexport interface UpdateStaffMemberSettingsRequest {\n /** Staff member settings to update, may be partial. */\n staffMemberSettings: StaffMemberSettings;\n}\n\nexport interface UpdateStaffMemberSettingsResponse {\n /** Updated staff member settings. */\n staffMemberSettings?: StaffMemberSettings;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n","import * as ambassadorWixBookingsStaffSettingsV1StaffMemberSettings from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.http.js';\nimport * as ambassadorWixBookingsStaffSettingsV1StaffMemberSettingsTypes from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.types.js';\nimport * as ambassadorWixBookingsStaffSettingsV1StaffMemberSettingsUniversalTypes from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function getStaffMemberSettings(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettingsUniversalTypes.GetStaffMemberSettingsRequest,\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettingsTypes.GetStaffMemberSettingsRequest,\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettingsUniversalTypes.GetStaffMemberSettingsResponse,\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettingsTypes.GetStaffMemberSettingsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettings.getStaffMemberSettings(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/staff-member-settings',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateStaffMemberSettings(): __PublicMethodMetaInfo<\n 'PATCH',\n {},\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettingsUniversalTypes.UpdateStaffMemberSettingsRequest,\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettingsTypes.UpdateStaffMemberSettingsRequest,\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettingsUniversalTypes.UpdateStaffMemberSettingsResponse,\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettingsTypes.UpdateStaffMemberSettingsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBookingsStaffSettingsV1StaffMemberSettings.updateStaffMemberSettings(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v1/staff-member-settings',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n StaffMemberSettings as StaffMemberSettingsOriginal,\n ContactInformation as ContactInformationOriginal,\n ExtendedFields as ExtendedFieldsOriginal,\n GetStaffMemberSettingsRequest as GetStaffMemberSettingsRequestOriginal,\n GetStaffMemberSettingsResponse as GetStaffMemberSettingsResponseOriginal,\n UpdateStaffMemberSettingsRequest as UpdateStaffMemberSettingsRequestOriginal,\n UpdateStaffMemberSettingsResponse as UpdateStaffMemberSettingsResponseOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountInfo as AccountInfoOriginal,\n} from './bookings-staff-settings-v1-staff-member-settings-staff-member-settings.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,gCAAAA;AAAA,EAAA,iCAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,+DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAOd,SAAS,uBACd,SAC4B;AAC5B,WAAS,yBAAyB,EAAE,KAAK,GAAQ;AAC/C,UAA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,kCAAkC;AAAA,UAC5C;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACL;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ACoFO,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,aAAU;AACV,EAAAA,qBAAA,uBAAoB;AACpB,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,SAAM;AALI,SAAAA;AAAA,GAAA;;;ACjNL,SAASC,0BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACoD;AAAA,IACtD;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,6BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACoD;AAAA,IACtD;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["getStaffMemberSettings","updateStaffMemberSettings","import_timestamp","import_rest_modules","payload","WebhookIdentityType","getStaffMemberSettings","updateStaffMemberSettings"]}
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
2
  import { StaffMemberSettings, StaffMemberSettingsUpdatedEnvelope } from './index.typings.mjs';
3
- export { AccountDetails, ActionEvent, BaseEventMetadata, ContactInformation, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, GetStaffMemberSettingsRequest, GetStaffMemberSettingsResponse, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, RestoreInfo, UpdateStaffMemberSettingsRequest, UpdateStaffMemberSettingsResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
3
+ export { AccountInfo, ActionEvent, BaseEventMetadata, ContactInformation, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, GetStaffMemberSettingsRequest, GetStaffMemberSettingsResponse, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, RestoreInfo, UpdateStaffMemberSettingsRequest, UpdateStaffMemberSettingsResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
4
4
 
5
5
  declare function getStaffMemberSettings$1(httpClient: HttpClient): GetStaffMemberSettingsSignature;
6
6
  interface GetStaffMemberSettingsSignature {