@wix/auto_sdk_bookings_staff-member-settings 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js +3 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +2 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.mjs +3 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +2 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.js +3 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +2 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.mjs +3 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +2 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.js
CHANGED
|
@@ -216,7 +216,9 @@ var onStaffMemberSettingsUpdated = (0, import_sdk_types.EventDefinition)(
|
|
|
216
216
|
paths: [
|
|
217
217
|
{ path: "entity.createdDate" },
|
|
218
218
|
{ path: "entity.updatedDate" },
|
|
219
|
-
{ path: "metadata.eventTime" }
|
|
219
|
+
{ path: "metadata.eventTime" },
|
|
220
|
+
{ path: "modifiedFields.createdDate" },
|
|
221
|
+
{ path: "modifiedFields.updatedDate" }
|
|
220
222
|
]
|
|
221
223
|
}
|
|
222
224
|
])
|
package/build/cjs/index.js.map
CHANGED
|
@@ -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-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-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 ],\n },\n ])\n )\n)<StaffMemberSettingsUpdatedEnvelope>();\n\nexport {\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-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-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 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}\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-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-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 };\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-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-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 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,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;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,YAAQ,uCAAkB,OAAO;AAAA,MACjC,mBAAmB,CAACC,iBAClB,uCAAeA,UAAS;AAAA,QACtB;AAAA,UACE,aAAa;AAAA,UACb,OAAO;AAAA,YACL,EAAE,MAAM,kCAAkC;AAAA,YAC1C,EAAE,MAAM,kCAAkC;AAAA,UAC5C;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACL;AAEA,WAAO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AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAsC;;;AG/EtC,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"]}
|
|
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-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-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 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-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-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 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-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-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 };\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-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-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 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,oB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C;;;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"]}
|
|
@@ -269,6 +269,8 @@ interface EventMetadata extends BaseEventMetadata {
|
|
|
269
269
|
interface StaffMemberSettingsUpdatedEnvelope {
|
|
270
270
|
entity: StaffMemberSettings;
|
|
271
271
|
metadata: EventMetadata;
|
|
272
|
+
/** @hidden */
|
|
273
|
+
modifiedFields: Record<string, any>;
|
|
272
274
|
}
|
|
273
275
|
/**
|
|
274
276
|
* Triggered when a `staffMemberSettings` object is updated.
|
|
@@ -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-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-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 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}\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-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-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 };\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-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-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;AA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AAA,MAC3B;AAAA,MACA,CAAC;AAAA,IACH;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAwBA,eAAsBC,2BACpB,qBAC8B;AAE9B,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UACoD;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-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-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 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-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-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 };\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-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-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.updated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AAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,CAAC;AAAA,QAC3B,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,IACH;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAwBA,eAAsBC,2BACpB,qBAC8B;AAE9B,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UACoD;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"]}
|
package/build/es/index.mjs
CHANGED
|
@@ -190,7 +190,9 @@ var onStaffMemberSettingsUpdated = EventDefinition(
|
|
|
190
190
|
paths: [
|
|
191
191
|
{ path: "entity.createdDate" },
|
|
192
192
|
{ path: "entity.updatedDate" },
|
|
193
|
-
{ path: "metadata.eventTime" }
|
|
193
|
+
{ path: "metadata.eventTime" },
|
|
194
|
+
{ path: "modifiedFields.createdDate" },
|
|
195
|
+
{ path: "modifiedFields.updatedDate" }
|
|
194
196
|
]
|
|
195
197
|
}
|
|
196
198
|
])
|
package/build/es/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../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":["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-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-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 ],\n },\n ])\n )\n)<StaffMemberSettingsUpdatedEnvelope>();\n\nexport {\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-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-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 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}\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-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-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 };\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-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-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 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,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,wCAAAC,6CAA4C;AACrD,SAAS,kBAAAC,uBAAsB;AAC/B,SAAS,uBAAqD;;;ACH9D,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,+DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,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;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,QAAQ,kBAAkB,OAA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;AAYO,SAASC,2BACd,YACoC;AACpC,SAAO,CACL,wBAEAA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAuBO,IAAM,+BAA+B;AAAA,EAC1C;AAAA,EACA;AAAA,EACA,CAAC,UACCC;AAAA,IACEC,gBAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAaC;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAsC;;;AG/EtC,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAQ3B,IAAMC,0BAGK,iCAAiBA,uBAA4B;AACxD,IAAMC,6BAGK,iCAAiBA,0BAA+B;AAI3D,IAAMC,gCAGiC;AAAA,EAC5C;AACF;","names":["renameKeysFromRESTResponseToSDKResponse","transformRESTTimestampToSDKTimestamp","transformPaths","payload","WebhookIdentityType","getStaffMemberSettings","updateStaffMemberSettings","getStaffMemberSettings","updateStaffMemberSettings","renameKeysFromRESTResponseToSDKResponse","transformPaths","transformRESTTimestampToSDKTimestamp","getStaffMemberSettings","updateStaffMemberSettings","onStaffMemberSettingsUpdated"]}
|
|
1
|
+
{"version":3,"sources":["../../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":["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-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-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 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-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-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 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-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-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 };\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-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-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 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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BAA6B;AAAA,UACrC,EAAE,MAAM,6BAA6B;AAAA,QACvC;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAsC;;;AGjFtC,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAQ3B,IAAMC,0BAGK,iCAAiBA,uBAA4B;AACxD,IAAMC,6BAGK,iCAAiBA,0BAA+B;AAI3D,IAAMC,gCAGiC;AAAA,EAC5C;AACF;","names":["renameKeysFromRESTResponseToSDKResponse","transformRESTTimestampToSDKTimestamp","transformPaths","payload","WebhookIdentityType","getStaffMemberSettings","updateStaffMemberSettings","getStaffMemberSettings","updateStaffMemberSettings","renameKeysFromRESTResponseToSDKResponse","transformPaths","transformRESTTimestampToSDKTimestamp","getStaffMemberSettings","updateStaffMemberSettings","onStaffMemberSettingsUpdated"]}
|
|
@@ -269,6 +269,8 @@ interface EventMetadata extends BaseEventMetadata {
|
|
|
269
269
|
interface StaffMemberSettingsUpdatedEnvelope {
|
|
270
270
|
entity: StaffMemberSettings;
|
|
271
271
|
metadata: EventMetadata;
|
|
272
|
+
/** @hidden */
|
|
273
|
+
modifiedFields: Record<string, any>;
|
|
272
274
|
}
|
|
273
275
|
/**
|
|
274
276
|
* Triggered when a `staffMemberSettings` object is updated.
|