@wix/auto_sdk_staff-pay_pay-models 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +5 -34
- package/build/cjs/index.js +0 -118
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +7 -46
- package/build/cjs/index.typings.js +0 -102
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +5 -16
- package/build/cjs/meta.js +0 -88
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +5 -34
- package/build/es/index.mjs +0 -116
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +7 -46
- package/build/es/index.typings.mjs +0 -100
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +5 -16
- package/build/es/meta.mjs +0 -86
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +5 -34
- package/build/internal/cjs/index.typings.d.ts +7 -46
- package/build/internal/cjs/meta.d.ts +5 -16
- package/build/internal/es/index.d.mts +5 -34
- package/build/internal/es/index.typings.d.mts +7 -46
- package/build/internal/es/meta.d.mts +5 -16
- package/package.json +2 -2
package/build/cjs/meta.js
CHANGED
|
@@ -29,12 +29,10 @@ __export(meta_exports, {
|
|
|
29
29
|
TaxBasisOriginal: () => TaxBasis,
|
|
30
30
|
WebhookIdentityTypeOriginal: () => WebhookIdentityType,
|
|
31
31
|
archivePayModel: () => archivePayModel2,
|
|
32
|
-
bulkDeletePayModels: () => bulkDeletePayModels2,
|
|
33
32
|
createPayModel: () => createPayModel2,
|
|
34
33
|
deletePayModel: () => deletePayModel2,
|
|
35
34
|
getPayModel: () => getPayModel2,
|
|
36
35
|
queryPayModels: () => queryPayModels2,
|
|
37
|
-
unarchivePayModel: () => unarchivePayModel2,
|
|
38
36
|
updatePayModel: () => updatePayModel2
|
|
39
37
|
});
|
|
40
38
|
module.exports = __toCommonJS(meta_exports);
|
|
@@ -252,54 +250,6 @@ function archivePayModel(payload) {
|
|
|
252
250
|
}
|
|
253
251
|
return __archivePayModel;
|
|
254
252
|
}
|
|
255
|
-
function unarchivePayModel(payload) {
|
|
256
|
-
function __unarchivePayModel({ host }) {
|
|
257
|
-
const metadata = {
|
|
258
|
-
entityFqdn: "wix.staff.pay.v1.pay_model",
|
|
259
|
-
method: "POST",
|
|
260
|
-
methodFqn: "wix.staff.pay.v1.PayModelsService.UnarchivePayModel",
|
|
261
|
-
packageName: PACKAGE_NAME,
|
|
262
|
-
migrationOptions: {
|
|
263
|
-
optInTransformResponse: true
|
|
264
|
-
},
|
|
265
|
-
url: resolveWixStaffPayV1PayModelsServiceUrl({
|
|
266
|
-
protoPath: "/v1/pay-models/{payModelId}/unarchive",
|
|
267
|
-
data: payload,
|
|
268
|
-
host
|
|
269
|
-
}),
|
|
270
|
-
data: payload,
|
|
271
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
272
|
-
{
|
|
273
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
274
|
-
paths: TRANSFORM_PATHS_0
|
|
275
|
-
}
|
|
276
|
-
])
|
|
277
|
-
};
|
|
278
|
-
return metadata;
|
|
279
|
-
}
|
|
280
|
-
return __unarchivePayModel;
|
|
281
|
-
}
|
|
282
|
-
function bulkDeletePayModels(payload) {
|
|
283
|
-
function __bulkDeletePayModels({ host }) {
|
|
284
|
-
const metadata = {
|
|
285
|
-
entityFqdn: "wix.staff.pay.v1.pay_model",
|
|
286
|
-
method: "POST",
|
|
287
|
-
methodFqn: "wix.staff.pay.v1.PayModelsService.BulkDeletePayModels",
|
|
288
|
-
packageName: PACKAGE_NAME,
|
|
289
|
-
migrationOptions: {
|
|
290
|
-
optInTransformResponse: true
|
|
291
|
-
},
|
|
292
|
-
url: resolveWixStaffPayV1PayModelsServiceUrl({
|
|
293
|
-
protoPath: "/v1/bulk/pay-models/delete",
|
|
294
|
-
data: payload,
|
|
295
|
-
host
|
|
296
|
-
}),
|
|
297
|
-
data: payload
|
|
298
|
-
};
|
|
299
|
-
return metadata;
|
|
300
|
-
}
|
|
301
|
-
return __bulkDeletePayModels;
|
|
302
|
-
}
|
|
303
253
|
|
|
304
254
|
// src/staff-pay-v1-pay-model-pay-models.types.ts
|
|
305
255
|
var ComponentType = /* @__PURE__ */ ((ComponentType2) => {
|
|
@@ -464,42 +414,6 @@ function archivePayModel2() {
|
|
|
464
414
|
__originalResponseType: null
|
|
465
415
|
};
|
|
466
416
|
}
|
|
467
|
-
function unarchivePayModel2() {
|
|
468
|
-
const payload = { payModelId: ":payModelId" };
|
|
469
|
-
const getRequestOptions = unarchivePayModel(payload);
|
|
470
|
-
const getUrl = (context) => {
|
|
471
|
-
const { url } = getRequestOptions(context);
|
|
472
|
-
return url;
|
|
473
|
-
};
|
|
474
|
-
return {
|
|
475
|
-
getUrl,
|
|
476
|
-
httpMethod: "POST",
|
|
477
|
-
path: "/v1/pay-models/{payModelId}/unarchive",
|
|
478
|
-
pathParams: { payModelId: "payModelId" },
|
|
479
|
-
__requestType: null,
|
|
480
|
-
__originalRequestType: null,
|
|
481
|
-
__responseType: null,
|
|
482
|
-
__originalResponseType: null
|
|
483
|
-
};
|
|
484
|
-
}
|
|
485
|
-
function bulkDeletePayModels2() {
|
|
486
|
-
const payload = {};
|
|
487
|
-
const getRequestOptions = bulkDeletePayModels(payload);
|
|
488
|
-
const getUrl = (context) => {
|
|
489
|
-
const { url } = getRequestOptions(context);
|
|
490
|
-
return url;
|
|
491
|
-
};
|
|
492
|
-
return {
|
|
493
|
-
getUrl,
|
|
494
|
-
httpMethod: "POST",
|
|
495
|
-
path: "/v1/bulk/pay-models/delete",
|
|
496
|
-
pathParams: {},
|
|
497
|
-
__requestType: null,
|
|
498
|
-
__originalRequestType: null,
|
|
499
|
-
__responseType: null,
|
|
500
|
-
__originalResponseType: null
|
|
501
|
-
};
|
|
502
|
-
}
|
|
503
417
|
// Annotate the CommonJS export names for ESM import in node:
|
|
504
418
|
0 && (module.exports = {
|
|
505
419
|
AttendeeCountBasisOriginal,
|
|
@@ -511,12 +425,10 @@ function bulkDeletePayModels2() {
|
|
|
511
425
|
TaxBasisOriginal,
|
|
512
426
|
WebhookIdentityTypeOriginal,
|
|
513
427
|
archivePayModel,
|
|
514
|
-
bulkDeletePayModels,
|
|
515
428
|
createPayModel,
|
|
516
429
|
deletePayModel,
|
|
517
430
|
getPayModel,
|
|
518
431
|
queryPayModels,
|
|
519
|
-
unarchivePayModel,
|
|
520
432
|
updatePayModel
|
|
521
433
|
});
|
|
522
434
|
//# sourceMappingURL=meta.js.map
|
package/build/cjs/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../meta.ts","../../src/staff-pay-v1-pay-model-pay-models.http.ts","../../src/staff-pay-v1-pay-model-pay-models.types.ts","../../src/staff-pay-v1-pay-model-pay-models.meta.ts"],"sourcesContent":["export * from './src/staff-pay-v1-pay-model-pay-models.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nconst TRANSFORM_PATHS_0 = [\n { path: 'payModel.createdDate' },\n { path: 'payModel.updatedDate' },\n { path: 'payModel.archivedDate' },\n];\nconst TRANSFORM_PATHS_1 = [{ path: 'fieldMask' }];\nconst TRANSFORM_PATHS_2 = [\n { path: 'payModels.createdDate' },\n { path: 'payModels.updatedDate' },\n { path: 'payModels.archivedDate' },\n];\n\nfunction resolveWixStaffPayV1PayModelsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/pay-model',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_staff-pay_pay-models';\n\n/**\n * Creates a pay model.\n *\n * Components that don't have an ID get one, and tiers are sorted. A pay model is always created unarchived. To pay a\n * staff member with the pay model, add pay terms that point to it in their staff pay profile.\n */\nexport function createPayModel(payload: object): RequestOptionsFactory<any> {\n function __createPayModel({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.staff.pay.v1.pay_model',\n method: 'POST' as any,\n methodFqn: 'wix.staff.pay.v1.PayModelsService.CreatePayModel',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixStaffPayV1PayModelsServiceUrl({\n protoPath: '/v1/pay-models',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createPayModel;\n}\n\n/** Retrieves a pay model. */\nexport function getPayModel(payload: object): RequestOptionsFactory<any> {\n function __getPayModel({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.staff.pay.v1.pay_model',\n method: 'GET' as any,\n methodFqn: 'wix.staff.pay.v1.PayModelsService.GetPayModel',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixStaffPayV1PayModelsServiceUrl({\n protoPath: '/v1/pay-models/{payModelId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getPayModel;\n}\n\n/**\n * Updates a pay model.\n *\n * Each time the pay model is updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the pay model.\n * This ensures you're working with the latest pay model and prevents unintended overwrites.\n *\n * Updating `components` replaces the whole list. Send each existing component's `id` back, so personal rates and pay\n * lines stay linked to it. Changes apply to staff pays calculated after the update, and the staff pays of the staff\n * members paid with the pay model are marked stale.\n *\n * An archived pay model can't be updated until it's unarchived with Unarchive Pay Model.\n */\nexport function updatePayModel(payload: object): RequestOptionsFactory<any> {\n function __updatePayModel({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: TRANSFORM_PATHS_1,\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.staff.pay.v1.pay_model',\n method: 'PATCH' as any,\n methodFqn: 'wix.staff.pay.v1.PayModelsService.UpdatePayModel',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixStaffPayV1PayModelsServiceUrl({\n protoPath: '/v1/pay-models/{payModel.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updatePayModel;\n}\n\n/**\n * Deletes a pay model.\n *\n * A pay model that any pay terms use, past, current or upcoming, can't be deleted. Archive it instead, with Archive\n * Pay Model.\n *\n * To delete multiple pay models in a single API call, call Bulk Delete Pay Models.\n */\nexport function deletePayModel(payload: object): RequestOptionsFactory<any> {\n function __deletePayModel({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.staff.pay.v1.pay_model',\n method: 'DELETE' as any,\n methodFqn: 'wix.staff.pay.v1.PayModelsService.DeletePayModel',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixStaffPayV1PayModelsServiceUrl({\n protoPath: '/v1/pay-models/{payModelId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deletePayModel;\n}\n\n/**\n * Retrieves a list of up to 100 pay models, given the provided paging, filtering, and sorting.\n *\n * Query Pay Models runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `cursorPaging.limit` is `50`\n *\n * Archived pay models are returned too. To leave them out, for example in lists and pickers, filter on\n * `{\"archivedDate\": {\"$exists\": false}}`.\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n */\nexport function queryPayModels(payload: object): RequestOptionsFactory<any> {\n function __queryPayModels({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.staff.pay.v1.pay_model',\n method: 'GET' as any,\n methodFqn: 'wix.staff.pay.v1.PayModelsService.QueryPayModels',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixStaffPayV1PayModelsServiceUrl({\n protoPath: '/v1/pay-models/query',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_2,\n },\n ]),\n fallback: [\n {\n method: 'POST' as any,\n url: resolveWixStaffPayV1PayModelsServiceUrl({\n protoPath: '/v1/pay-models/query',\n data: payload,\n host,\n }),\n data: payload,\n },\n ],\n };\n\n return metadata;\n }\n\n return __queryPayModels;\n}\n\n/**\n * Archives a pay model. Sets `archivedDate`.\n *\n * Use it for a pay model that's no longer offered but that pay terms used, so it can't be deleted. Pay terms that use\n * the pay model keep it, and it can still be retrieved. An archived pay model can't be updated.\n *\n * Archiving an archived pay model returns it unchanged. To make it available again, call Unarchive Pay Model.\n */\nexport function archivePayModel(payload: object): RequestOptionsFactory<any> {\n function __archivePayModel({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.staff.pay.v1.pay_model',\n method: 'POST' as any,\n methodFqn: 'wix.staff.pay.v1.PayModelsService.ArchivePayModel',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixStaffPayV1PayModelsServiceUrl({\n protoPath: '/v1/pay-models/{payModelId}/archive',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __archivePayModel;\n}\n\n/**\n * Unarchives a pay model. Clears `archivedDate`, so the pay model can be updated and offered again.\n *\n * Unarchiving a pay model that isn't archived returns it unchanged.\n */\nexport function unarchivePayModel(payload: object): RequestOptionsFactory<any> {\n function __unarchivePayModel({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.staff.pay.v1.pay_model',\n method: 'POST' as any,\n methodFqn: 'wix.staff.pay.v1.PayModelsService.UnarchivePayModel',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixStaffPayV1PayModelsServiceUrl({\n protoPath: '/v1/pay-models/{payModelId}/unarchive',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __unarchivePayModel;\n}\n\n/**\n * Deletes multiple pay models.\n *\n * Each pay model is deleted on its own: one that pay terms use isn't deleted and its result fails with\n * `PAY_MODEL_IN_USE`, while the others are still deleted.\n *\n * To delete a single pay model, call Delete Pay Model.\n */\nexport function bulkDeletePayModels(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkDeletePayModels({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.staff.pay.v1.pay_model',\n method: 'POST' as any,\n methodFqn: 'wix.staff.pay.v1.PayModelsService.BulkDeletePayModels',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixStaffPayV1PayModelsServiceUrl({\n protoPath: '/v1/bulk/pay-models/delete',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeletePayModels;\n}\n","/**\n * A pay model is a reusable way to pay staff: a list of pay components, such as an hourly wage, session rates and a\n * tip share, whose results are combined into a staff member's gross pay for a pay period. A pay model holds no people\n * and no dates: staff members are paid with it through the pay terms in their staff pay profile.\n *\n * Monetary amounts are decimal strings in the site's pay currency, set in the staff pay settings. Percentages are\n * decimal strings between `0` and `100`.\n */\nexport interface PayModel {\n /**\n * Pay model ID.\n * @format GUID\n * @readonly\n */\n id?: string | null;\n /**\n * Revision number, which increments by 1 each time the pay model is updated.\n * To prevent conflicting changes,\n * the current revision must be passed when updating the pay model.\n *\n * Ignored when creating a pay model.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the pay model was created.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the pay model was last updated.\n * @readonly\n */\n updatedDate?: Date | null;\n /**\n * Pay model name. For example, `Group fitness instructor`.\n * @maxLength 100\n */\n name?: string;\n /**\n * Description of the pay model.\n * @maxLength 500\n */\n description?: string | null;\n /**\n * Pay components. Each component produces pay lines for a pay period.\n *\n * The session rates are the `FLAT_PER_SESSION`, `BASE_PLUS_PER_HEAD`, `ATTENDANCE_TIERS`, `PER_COURSE` and\n * `SERVICE_COMMISSION` components. Each service is paid by 1 session rate at most, so a session or a sale is never\n * paid twice. A rate with `serviceIds` pays only those services. At most 1 rate has no `serviceIds`: it pays every\n * service that no other rate lists, including services added later.\n *\n * A `PER_COURSE` rate pays course sessions only, and has its own default: at most 1 `PER_COURSE` rate has no\n * `serviceIds`, and it pays every course that no rate lists. A course is paid by the rate that lists it, else by that\n * per-course rate, else by the rate without `serviceIds`.\n *\n * Components get an ID when they're first saved. Send each component's `id` back when updating, so personal rates and\n * pay lines stay linked to it.\n * @maxSize 20\n */\n components?: PayComponent[];\n /**\n * How the component results are combined into gross pay.\n *\n * Default: `SUM`\n */\n combinator?: Combinator;\n /**\n * Date and time the pay model was archived.\n *\n * Returned only when the pay model is archived. An archived pay model can't be updated and isn't offered for new pay\n * terms, but pay terms that already use it keep it, so it can still be retrieved. Set by Archive Pay Model and cleared\n * by Unarchive Pay Model.\n * @readonly\n */\n archivedDate?: Date | null;\n /**\n * Custom field data for the pay model object.\n *\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n}\n\n/** A single pay component of a pay model. */\nexport interface PayComponent extends PayComponentOptionsOneOf {\n /** Fixed amount per pay period. */\n salaryOptions?: SalaryOptions;\n /** Rate per paid hour worked, from Time Clock timecards. */\n hourlyOptions?: HourlyOptions;\n /** Flat amount per session taught. */\n flatPerSessionOptions?: FlatPerSessionOptions;\n /** Amount per attendee, with an optional base amount that covers the first attendees. */\n basePlusPerHeadOptions?: BasePlusPerHeadOptions;\n /** Flat amount per session, by attendance tier. */\n attendanceTiersOptions?: AttendanceTiersOptions;\n /** Percentage of service revenue. */\n serviceCommissionOptions?: ServiceCommissionOptions;\n /** Share of tips. */\n tipsOptions?: TipsOptions;\n /** Percentage of product sales. Not calculated yet. */\n productCommissionOptions?: ProductCommissionOptions;\n /** Commission on pricing plan sales, such as memberships and packages. Not calculated yet. */\n planSaleCommissionOptions?: PlanSaleCommissionOptions;\n /**\n * Flat amount per course taught, spread evenly across the course's sessions.\n * @internal\n */\n perCourseOptions?: PerCourseOptions;\n /**\n * Component ID. Assigned when the component is first saved. Send it back when updating, to keep the same component\n * so personal rates and pay lines stay linked to it.\n * @format GUID\n */\n id?: string | null;\n /**\n * Component name. For example, `Class pay`.\n * @maxLength 100\n */\n name?: string;\n /** Component type. Must match the options that are specified. */\n type?: ComponentTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface PayComponentOptionsOneOf {\n /** Fixed amount per pay period. */\n salaryOptions?: SalaryOptions;\n /** Rate per paid hour worked, from Time Clock timecards. */\n hourlyOptions?: HourlyOptions;\n /** Flat amount per session taught. */\n flatPerSessionOptions?: FlatPerSessionOptions;\n /** Amount per attendee, with an optional base amount that covers the first attendees. */\n basePlusPerHeadOptions?: BasePlusPerHeadOptions;\n /** Flat amount per session, by attendance tier. */\n attendanceTiersOptions?: AttendanceTiersOptions;\n /** Percentage of service revenue. */\n serviceCommissionOptions?: ServiceCommissionOptions;\n /** Share of tips. */\n tipsOptions?: TipsOptions;\n /** Percentage of product sales. Not calculated yet. */\n productCommissionOptions?: ProductCommissionOptions;\n /** Commission on pricing plan sales, such as memberships and packages. Not calculated yet. */\n planSaleCommissionOptions?: PlanSaleCommissionOptions;\n /**\n * Flat amount per course taught, spread evenly across the course's sessions.\n * @internal\n */\n perCourseOptions?: PerCourseOptions;\n}\n\n/** Pay component type. */\nexport enum ComponentType {\n /** Fixed amount per pay period. */\n SALARY = 'SALARY',\n /** Rate per paid hour worked, from Time Clock timecards. */\n HOURLY = 'HOURLY',\n /** Flat amount per session taught. */\n FLAT_PER_SESSION = 'FLAT_PER_SESSION',\n /** Amount per attendee, with an optional base amount that covers the first attendees. */\n BASE_PLUS_PER_HEAD = 'BASE_PLUS_PER_HEAD',\n /** Flat amount per session, by attendance tier. */\n ATTENDANCE_TIERS = 'ATTENDANCE_TIERS',\n /** Percentage of service revenue. */\n SERVICE_COMMISSION = 'SERVICE_COMMISSION',\n /** Share of tips. */\n TIPS = 'TIPS',\n /** Percentage of product sales. Not calculated yet: pays nothing until product sales are read. */\n PRODUCT_COMMISSION = 'PRODUCT_COMMISSION',\n /**\n * Commission on pricing plan sales, such as memberships and packages. Not calculated yet: pays nothing until\n * pricing plan sales are read.\n */\n PLAN_SALE_COMMISSION = 'PLAN_SALE_COMMISSION',\n /**\n * Flat amount per course taught, spread evenly across the course's sessions.\n * @documentationMaturity preview\n * @internal\n */\n PER_COURSE = 'PER_COURSE',\n}\n\n/** @enumType */\nexport type ComponentTypeWithLiterals =\n | ComponentType\n | 'SALARY'\n | 'HOURLY'\n | 'FLAT_PER_SESSION'\n | 'BASE_PLUS_PER_HEAD'\n | 'ATTENDANCE_TIERS'\n | 'SERVICE_COMMISSION'\n | 'TIPS'\n | 'PRODUCT_COMMISSION'\n | 'PLAN_SALE_COMMISSION';\n\nexport interface SalaryOptions {\n /**\n * Amount per pay period.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n amountPerPeriod?: string;\n /**\n * Deprecated: ignored. A salary is always prorated by the days employed in the period, based on the profile's\n * employment dates, so no salary is paid after the last day of work.\n */\n prorateByDaysEmployed?: boolean;\n}\n\nexport interface HourlyOptions {\n /**\n * Rate per paid hour. Unpaid breaks aren't paid.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n rate?: string;\n /**\n * Whether the overtime rules in the staff pay settings apply to the hours of this component.\n *\n * Default: `false`\n */\n overtimeEligible?: boolean;\n /**\n * Whether to pay only for clocked time outside sessions the staff member taught that a session rate of the pay model\n * covers, so a session isn't paid twice by an hourly component and a session rate. Time in a session no session rate\n * covers is still paid hourly.\n *\n * Default: `false`\n */\n excludeSessionTime?: boolean;\n}\n\nexport interface FlatPerSessionOptions {\n /**\n * Amount per session taught.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n amount?: string;\n /**\n * Services this rate pays. See `payModel.components` for how session rates share the services.\n * @maxSize 1000\n * @format GUID\n */\n serviceIds?: string[];\n /**\n * Not used: a session that the business cancelled is never paid, whatever this says. Kept so existing clients\n * still work.\n *\n * Default: `false`\n */\n zeroWhenCancelled?: boolean;\n}\n\n/**\n * Pay per attendee of a session. A session pays `baseAmount`, plus `amountPerAdditionalAttendee` for each attendee\n * above `includedAttendees`. Without a base amount and with `0` included attendees, every attendee is paid.\n */\nexport interface BasePlusPerHeadOptions {\n /**\n * Amount paid for each session, which covers its first `includedAttendees` attendees. When not set or `0`, there's no\n * base amount.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n baseAmount?: string | null;\n /**\n * Number of attendees who aren't paid per attendee: the ones the base amount covers. `0` pays every attendee.\n * @max 10000\n */\n includedAttendees?: number;\n /**\n * Amount per attendee above `includedAttendees`.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n amountPerAdditionalAttendee?: string;\n /**\n * Which attendees are counted.\n *\n * Default: `CHECKED_IN`\n */\n countBasis?: AttendeeCountBasisWithLiterals;\n /**\n * Services this rate pays. See `payModel.components` for how session rates share the services.\n * @maxSize 1000\n * @format GUID\n */\n serviceIds?: string[];\n /**\n * Not used: a session that the business cancelled is never paid, whatever this says. Kept so existing clients\n * still work.\n *\n * Default: `false`\n */\n zeroWhenCancelled?: boolean;\n /**\n * Whether free visits are left out of the attendees counted. A free visit is a booking nothing was paid for, such as\n * a free service or a complimentary visit.\n *\n * Default: `false`\n */\n excludeFreeVisits?: boolean;\n /**\n * More amounts per additional attendee, for bigger sessions. Each attendee above `includedAttendees` is paid the\n * amount of the highest tier whose `fromAttendee` they reach, and `amountPerAdditionalAttendee` below the first tier.\n * Every `fromAttendee` must be above `includedAttendees`, and 2 tiers can't share one.\n * @internal\n * @maxSize 20\n */\n extraAttendeeTiers?: ExtraAttendeeTier[];\n /**\n * Most a session can pay under this rate, whatever its attendance. A staff member's personal rate applies first.\n * Must be at least `baseAmount`, when there's one. When not set, there's no maximum.\n * @internal\n * @decimalValue options { gte:0, maxScale:2 }\n */\n maxAmountPerSession?: string | null;\n}\n\n/** Which attendees of a session are counted. */\nexport enum AttendeeCountBasis {\n /** All booked attendees. */\n BOOKED = 'BOOKED',\n /** Only checked-in attendees. */\n CHECKED_IN = 'CHECKED_IN',\n /** Checked-in attendees and no-shows (bookings that weren't cancelled). */\n CHECKED_IN_AND_NO_SHOWS = 'CHECKED_IN_AND_NO_SHOWS',\n}\n\n/** @enumType */\nexport type AttendeeCountBasisWithLiterals =\n | AttendeeCountBasis\n | 'BOOKED'\n | 'CHECKED_IN'\n | 'CHECKED_IN_AND_NO_SHOWS';\n\n/** An amount per attendee, from 1 attendee number on. Attendees are numbered from 1 in each session. */\nexport interface ExtraAttendeeTier {\n /**\n * Attendee number the tier starts at. Attendees from this number on are paid `amountPerAttendee`.\n * @min 1\n * @max 10000\n */\n fromAttendee?: number;\n /**\n * Amount per attendee in this tier.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n amountPerAttendee?: string;\n}\n\nexport interface AttendanceTiersOptions {\n /**\n * Tiers, sorted by `minAttendees` when saved. A session is paid at the highest tier whose `minAttendees` it reaches.\n * 2 tiers can't share a `minAttendees`.\n * @maxSize 20\n */\n tiers?: AttendanceTier[];\n /**\n * Which attendees are counted.\n *\n * Default: `CHECKED_IN`\n */\n countBasis?: AttendeeCountBasisWithLiterals;\n /**\n * Services this rate pays. See `payModel.components` for how session rates share the services.\n * @maxSize 1000\n * @format GUID\n */\n serviceIds?: string[];\n /**\n * Not used: a session that the business cancelled is never paid, whatever this says. Kept so existing clients\n * still work.\n *\n * Default: `false`\n */\n zeroWhenCancelled?: boolean;\n /**\n * Whether free visits are left out of the attendees counted. A free visit is a booking nothing was paid for, such as\n * a free service or a complimentary visit.\n *\n * Default: `false`\n */\n excludeFreeVisits?: boolean;\n}\n\nexport interface AttendanceTier {\n /**\n * Minimum number of attendees for this tier.\n * @max 10000\n */\n minAttendees?: number;\n /**\n * Flat amount per session.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n value?: string;\n}\n\nexport interface ServiceCommissionOptions {\n /**\n * Commission percentage of service revenue. With `tiers`, the percentage paid below the first tier.\n * @decimalValue options { gte:0, lte:100, maxScale:2 }\n */\n percent?: string;\n /**\n * Services this rate pays. See `payModel.components` for how session rates share the services.\n * @maxSize 1000\n * @format GUID\n */\n serviceIds?: string[];\n /**\n * Sliding-scale tiers on the period's service sales, sorted by `minSales`. A higher tier raises the percentage once\n * the period's sales reach its `minSales`. When empty, every sale is paid at `percent`.\n * @maxSize 20\n */\n tiers?: CommissionTier[];\n /**\n * How `tiers` apply to the period's sales.\n *\n * Default: `ENTIRE_AMOUNT`\n */\n tierMode?: CommissionTierModeWithLiterals;\n /** How service sales are counted. */\n revenueRules?: RevenueRules;\n /**\n * Cost taken off each sale's price before the commission percentage applies. When not set, nothing is taken off.\n * @internal\n */\n costDeduction?: CostDeduction;\n}\n\n/** A sliding-scale commission tier. */\nexport interface CommissionTier {\n /**\n * Period sales from which this tier applies.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n minSales?: string;\n /**\n * Commission percentage of this tier.\n * @decimalValue options { gte:0, lte:100, maxScale:2 }\n */\n percent?: string;\n}\n\n/** How sliding-scale tiers apply to a period's sales. */\nexport enum CommissionTierMode {\n /** All of the period's sales are paid at the percentage of the highest tier reached. */\n ENTIRE_AMOUNT = 'ENTIRE_AMOUNT',\n /** Each part of the period's sales is paid at the percentage of the tier it falls in. */\n PORTION_IN_TIER = 'PORTION_IN_TIER',\n}\n\n/** @enumType */\nexport type CommissionTierModeWithLiterals =\n | CommissionTierMode\n | 'ENTIRE_AMOUNT'\n | 'PORTION_IN_TIER';\n\n/**\n * How revenue is counted by a component that pays on revenue. A session's revenue adds up what each of its bookings is\n * worth: the price of a booking paid in money, the price per session of a pricing plan with a set number of sessions, or\n * the site's value of a visit on an unlimited plan. A free visit adds nothing. Refunds completed by the end of the pay\n * period are subtracted (a later refund doesn't change an earlier period's pay), and a course booking's price is split\n * evenly across the course sessions it covers.\n */\nexport interface RevenueRules {\n /**\n * Whether a booking paid in money counts at its price before or after discounts.\n *\n * Default: `AFTER_DISCOUNTS`\n */\n discountBasis?: DiscountBasisWithLiterals;\n /**\n * Whether a booking's tax counts in its revenue. Applies to prices that include tax, as on sites that show prices with\n * VAT: `BEFORE_TAX` takes the booking's tax off its price, and its discounts and refunds in the same proportion. A price\n * that doesn't include tax counts as it is either way.\n *\n * Default: `BEFORE_TAX`\n */\n taxBasis?: TaxBasisWithLiterals;\n}\n\n/** Whether revenue is taken before or after discounts. */\nexport enum DiscountBasis {\n /** Price before discounts. */\n BEFORE_DISCOUNTS = 'BEFORE_DISCOUNTS',\n /** Price paid, after discounts. */\n AFTER_DISCOUNTS = 'AFTER_DISCOUNTS',\n}\n\n/** @enumType */\nexport type DiscountBasisWithLiterals =\n | DiscountBasis\n | 'BEFORE_DISCOUNTS'\n | 'AFTER_DISCOUNTS';\n\n/** Whether revenue includes the tax in a price. */\nexport enum TaxBasis {\n /** Price without tax. */\n BEFORE_TAX = 'BEFORE_TAX',\n /** Price with the tax it includes. */\n WITH_TAX = 'WITH_TAX',\n}\n\n/** @enumType */\nexport type TaxBasisWithLiterals = TaxBasis | 'BEFORE_TAX' | 'WITH_TAX';\n\n/**\n * A cost taken off each sale's price before commission, such as the products a service uses or a fee. A sale is never\n * counted below 0. Sliding-scale tiers measure the period's sales after the cost is taken off.\n */\nexport interface CostDeduction extends CostDeductionKindOneOf {\n /**\n * Fixed amount taken off each sale.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n amountPerSale?: string;\n /**\n * Percentage of each sale's price taken off.\n * @decimalValue options { gte:0, lte:100, maxScale:2 }\n */\n percent?: string;\n}\n\n/** @oneof */\nexport interface CostDeductionKindOneOf {\n /**\n * Fixed amount taken off each sale.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n amountPerSale?: string;\n /**\n * Percentage of each sale's price taken off.\n * @decimalValue options { gte:0, lte:100, maxScale:2 }\n */\n percent?: string;\n}\n\nexport interface TipsOptions {\n /**\n * Percentage of the staff member's tip distributions that's passed on to them.\n *\n * Default: `100`\n * @decimalValue options { gte:0, lte:100, maxScale:2 }\n */\n sharePercent?: string | null;\n /**\n * Card processing fee percentage deducted from tips paid by card before they're shared. Tips paid offline, for\n * example in cash, have no fee taken off. A tip whose payment method isn't known has the fee taken off all of it.\n *\n * Default: `0`\n * @decimalValue options { gte:0, lte:100, maxScale:2 }\n */\n cardFeePercent?: string | null;\n}\n\nexport interface ProductCommissionOptions {\n /**\n * Commission percentage of product sales, after discounts.\n * @decimalValue options { gte:0, lte:100, maxScale:2 }\n */\n percent?: string;\n /**\n * Products this component applies to. When empty, applies to all products.\n * @maxSize 1000\n * @format GUID\n */\n productIds?: string[];\n}\n\nexport interface PlanSaleCommissionOptions {\n /**\n * Commission percentage of each plan order's price.\n *\n * Default: `0`\n * @decimalValue options { gte:0, lte:100, maxScale:2 }\n */\n percent?: string | null;\n /**\n * Flat amount per plan order, added to the percentage.\n *\n * Default: `0`\n * @decimalValue options { gte:0, maxScale:2 }\n */\n amountPerOrder?: string | null;\n /**\n * Plans this component applies to. When empty, applies to all plans.\n * @maxSize 1000\n * @format GUID\n */\n planIds?: string[];\n}\n\n/**\n * A flat amount per Bookings course. Each session of the course pays the amount divided by the course's sessions, to\n * whoever taught that session, so a substitute is paid for the sessions they taught. Cancelled sessions don't count\n * towards the course's sessions and pay nothing.\n */\nexport interface PerCourseOptions {\n /**\n * Amount per course.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n amount?: string;\n /**\n * Course services this rate pays. When empty, pays every course no other rate lists. See `payModel.components` for\n * how session rates share the services. Service IDs aren't checked to be courses: a listed service that isn't a\n * course is paid nothing by this rate.\n * @maxSize 1000\n * @format GUID\n */\n serviceIds?: string[];\n}\n\n/** How component results are combined into gross pay. */\nexport interface Combinator extends CombinatorOptionsOneOf {\n /** Pay the greater of a set of components. */\n greaterOfOptions?: GreaterOfOptions;\n /** Combinator type. Must match the options that are specified. */\n type?: CombinatorTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface CombinatorOptionsOneOf {\n /** Pay the greater of a set of components. */\n greaterOfOptions?: GreaterOfOptions;\n}\n\n/** Combinator type. */\nexport enum CombinatorType {\n /** Add all component results together. */\n SUM = 'SUM',\n /** Pay only the greatest result among `greaterOfOptions.componentIds`. All other components are added. */\n GREATER_OF = 'GREATER_OF',\n}\n\n/** @enumType */\nexport type CombinatorTypeWithLiterals = CombinatorType | 'SUM' | 'GREATER_OF';\n\nexport interface GreaterOfOptions {\n /**\n * IDs of the components that compete, for example a salary component and a commission component.\n * @minSize 2\n * @maxSize 20\n * @format GUID\n */\n componentIds?: string[];\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 CreatePayModelRequest {\n /** Pay model to create. */\n payModel: PayModel;\n}\n\nexport interface CreatePayModelResponse {\n /** Created pay model. */\n payModel?: PayModel;\n}\n\nexport interface GetPayModelRequest {\n /**\n * ID of the pay model to retrieve.\n * @format GUID\n */\n payModelId: string;\n}\n\nexport interface GetPayModelResponse {\n /** Retrieved pay model. */\n payModel?: PayModel;\n}\n\nexport interface UpdatePayModelRequest {\n /** Pay model to update. May be partial. */\n payModel: PayModel;\n /**\n * Set of fields to update.\n *\n * Fields that aren't included in `fieldMask.paths` are ignored.\n * @internal\n */\n fieldMask?: string[];\n}\n\nexport interface UpdatePayModelResponse {\n /** Updated pay model. */\n payModel?: PayModel;\n}\n\nexport interface DeletePayModelRequest {\n /**\n * ID of the pay model to delete.\n * @format GUID\n */\n payModelId: string;\n}\n\nexport interface DeletePayModelResponse {}\n\nexport interface QueryPayModelsRequest {\n /** Query options. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryPayModelsResponse {\n /** Retrieved pay models. */\n payModels?: PayModel[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface ArchivePayModelRequest {\n /**\n * ID of the pay model to archive.\n * @format GUID\n */\n payModelId: string;\n}\n\nexport interface ArchivePayModelResponse {\n /** Archived pay model. */\n payModel?: PayModel;\n}\n\nexport interface UnarchivePayModelRequest {\n /**\n * ID of the pay model to unarchive.\n * @format GUID\n */\n payModelId: string;\n}\n\nexport interface UnarchivePayModelResponse {\n /** Unarchived pay model. */\n payModel?: PayModel;\n}\n\nexport interface BulkDeletePayModelsRequest {\n /**\n * IDs of the pay models to delete.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n payModelIds: string[];\n}\n\nexport interface BulkDeletePayModelsResponse {\n /**\n * Results, 1 per requested pay model.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkPayModelResult[];\n /** Metadata about the bulk delete operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed.\n * @format GUID\n */\n id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action for this item was successful. When `false`, the `error` field is returned. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkPayModelResult {\n /** Metadata about the deletion of this pay model. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /**\n * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity\n * @internal\n */\n triggeredByUndelete?: boolean | null;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntityAsJson?: string;\n /**\n * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard\n * wont populate it / have any reference to it in the API.\n * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed,\n * the developer should send only the new (current) entity.\n * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big\n * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.\n * @internal\n * @deprecated\n */\n previousEntityAsJson?: string | null;\n /**\n * Map of fully qualified field paths to their previous values for fields that changed.\n * For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format)\n * @internal\n */\n modifiedFields?: Record<string, any>;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface EntityDeletedEvent {\n /**\n * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled\n * @internal\n */\n movedToTrash?: boolean | null;\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type CreatePayModelApplicationErrors =\n | {\n code?: 'INVALID_COMBINATOR';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_ATTENDEE_TIERS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_COMPONENT_ID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SERVICE_IN_TWO_RATES';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'TWO_DEFAULT_RATES';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MAX_BELOW_BASE';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type UpdatePayModelApplicationErrors =\n | {\n code?: 'INVALID_COMBINATOR';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_ATTENDEE_TIERS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_COMPONENT_ID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SERVICE_IN_TWO_RATES';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'TWO_DEFAULT_RATES';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MAX_BELOW_BASE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PAY_MODEL_ARCHIVED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type DeletePayModelApplicationErrors = {\n code?: 'PAY_MODEL_IN_USE';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type BulkDeletePayModelsApplicationErrors = {\n code?: 'PAY_MODEL_IN_USE';\n description?: string;\n data?: Record<string, any>;\n};\n","import * as ambassadorWixStaffPayV1PayModel from './staff-pay-v1-pay-model-pay-models.http.js';\nimport * as ambassadorWixStaffPayV1PayModelTypes from './staff-pay-v1-pay-model-pay-models.types.js';\nimport * as ambassadorWixStaffPayV1PayModelUniversalTypes from './staff-pay-v1-pay-model-pay-models.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function createPayModel(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixStaffPayV1PayModelUniversalTypes.CreatePayModelRequest,\n ambassadorWixStaffPayV1PayModelTypes.CreatePayModelRequest,\n ambassadorWixStaffPayV1PayModelUniversalTypes.CreatePayModelResponse,\n ambassadorWixStaffPayV1PayModelTypes.CreatePayModelResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixStaffPayV1PayModel.createPayModel(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/pay-models',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getPayModel(): __PublicMethodMetaInfo<\n 'GET',\n { payModelId: string },\n ambassadorWixStaffPayV1PayModelUniversalTypes.GetPayModelRequest,\n ambassadorWixStaffPayV1PayModelTypes.GetPayModelRequest,\n ambassadorWixStaffPayV1PayModelUniversalTypes.GetPayModelResponse,\n ambassadorWixStaffPayV1PayModelTypes.GetPayModelResponse\n> {\n const payload = { payModelId: ':payModelId' } as any;\n\n const getRequestOptions =\n ambassadorWixStaffPayV1PayModel.getPayModel(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/pay-models/{payModelId}',\n pathParams: { payModelId: 'payModelId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updatePayModel(): __PublicMethodMetaInfo<\n 'PATCH',\n { payModelId: string },\n ambassadorWixStaffPayV1PayModelUniversalTypes.UpdatePayModelRequest,\n ambassadorWixStaffPayV1PayModelTypes.UpdatePayModelRequest,\n ambassadorWixStaffPayV1PayModelUniversalTypes.UpdatePayModelResponse,\n ambassadorWixStaffPayV1PayModelTypes.UpdatePayModelResponse\n> {\n const payload = { payModel: { id: ':payModelId' } } as any;\n\n const getRequestOptions =\n ambassadorWixStaffPayV1PayModel.updatePayModel(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v1/pay-models/{payModel.id}',\n pathParams: { payModelId: 'payModelId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deletePayModel(): __PublicMethodMetaInfo<\n 'DELETE',\n { payModelId: string },\n ambassadorWixStaffPayV1PayModelUniversalTypes.DeletePayModelRequest,\n ambassadorWixStaffPayV1PayModelTypes.DeletePayModelRequest,\n ambassadorWixStaffPayV1PayModelUniversalTypes.DeletePayModelResponse,\n ambassadorWixStaffPayV1PayModelTypes.DeletePayModelResponse\n> {\n const payload = { payModelId: ':payModelId' } as any;\n\n const getRequestOptions =\n ambassadorWixStaffPayV1PayModel.deletePayModel(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/pay-models/{payModelId}',\n pathParams: { payModelId: 'payModelId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function queryPayModels(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixStaffPayV1PayModelUniversalTypes.QueryPayModelsRequest,\n ambassadorWixStaffPayV1PayModelTypes.QueryPayModelsRequest,\n ambassadorWixStaffPayV1PayModelUniversalTypes.QueryPayModelsResponse,\n ambassadorWixStaffPayV1PayModelTypes.QueryPayModelsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixStaffPayV1PayModel.queryPayModels(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/pay-models/query',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function archivePayModel(): __PublicMethodMetaInfo<\n 'POST',\n { payModelId: string },\n ambassadorWixStaffPayV1PayModelUniversalTypes.ArchivePayModelRequest,\n ambassadorWixStaffPayV1PayModelTypes.ArchivePayModelRequest,\n ambassadorWixStaffPayV1PayModelUniversalTypes.ArchivePayModelResponse,\n ambassadorWixStaffPayV1PayModelTypes.ArchivePayModelResponse\n> {\n const payload = { payModelId: ':payModelId' } as any;\n\n const getRequestOptions =\n ambassadorWixStaffPayV1PayModel.archivePayModel(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/pay-models/{payModelId}/archive',\n pathParams: { payModelId: 'payModelId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function unarchivePayModel(): __PublicMethodMetaInfo<\n 'POST',\n { payModelId: string },\n ambassadorWixStaffPayV1PayModelUniversalTypes.UnarchivePayModelRequest,\n ambassadorWixStaffPayV1PayModelTypes.UnarchivePayModelRequest,\n ambassadorWixStaffPayV1PayModelUniversalTypes.UnarchivePayModelResponse,\n ambassadorWixStaffPayV1PayModelTypes.UnarchivePayModelResponse\n> {\n const payload = { payModelId: ':payModelId' } as any;\n\n const getRequestOptions =\n ambassadorWixStaffPayV1PayModel.unarchivePayModel(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/pay-models/{payModelId}/unarchive',\n pathParams: { payModelId: 'payModelId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function bulkDeletePayModels(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixStaffPayV1PayModelUniversalTypes.BulkDeletePayModelsRequest,\n ambassadorWixStaffPayV1PayModelTypes.BulkDeletePayModelsRequest,\n ambassadorWixStaffPayV1PayModelUniversalTypes.BulkDeletePayModelsResponse,\n ambassadorWixStaffPayV1PayModelTypes.BulkDeletePayModelsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixStaffPayV1PayModel.bulkDeletePayModels(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/bulk/pay-models/delete',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n PayModel as PayModelOriginal,\n PayComponent as PayComponentOriginal,\n PayComponentOptionsOneOf as PayComponentOptionsOneOfOriginal,\n ComponentType as ComponentTypeOriginal,\n ComponentTypeWithLiterals as ComponentTypeWithLiteralsOriginal,\n SalaryOptions as SalaryOptionsOriginal,\n HourlyOptions as HourlyOptionsOriginal,\n FlatPerSessionOptions as FlatPerSessionOptionsOriginal,\n BasePlusPerHeadOptions as BasePlusPerHeadOptionsOriginal,\n AttendeeCountBasis as AttendeeCountBasisOriginal,\n AttendeeCountBasisWithLiterals as AttendeeCountBasisWithLiteralsOriginal,\n ExtraAttendeeTier as ExtraAttendeeTierOriginal,\n AttendanceTiersOptions as AttendanceTiersOptionsOriginal,\n AttendanceTier as AttendanceTierOriginal,\n ServiceCommissionOptions as ServiceCommissionOptionsOriginal,\n CommissionTier as CommissionTierOriginal,\n CommissionTierMode as CommissionTierModeOriginal,\n CommissionTierModeWithLiterals as CommissionTierModeWithLiteralsOriginal,\n RevenueRules as RevenueRulesOriginal,\n DiscountBasis as DiscountBasisOriginal,\n DiscountBasisWithLiterals as DiscountBasisWithLiteralsOriginal,\n TaxBasis as TaxBasisOriginal,\n TaxBasisWithLiterals as TaxBasisWithLiteralsOriginal,\n CostDeduction as CostDeductionOriginal,\n CostDeductionKindOneOf as CostDeductionKindOneOfOriginal,\n TipsOptions as TipsOptionsOriginal,\n ProductCommissionOptions as ProductCommissionOptionsOriginal,\n PlanSaleCommissionOptions as PlanSaleCommissionOptionsOriginal,\n PerCourseOptions as PerCourseOptionsOriginal,\n Combinator as CombinatorOriginal,\n CombinatorOptionsOneOf as CombinatorOptionsOneOfOriginal,\n CombinatorType as CombinatorTypeOriginal,\n CombinatorTypeWithLiterals as CombinatorTypeWithLiteralsOriginal,\n GreaterOfOptions as GreaterOfOptionsOriginal,\n ExtendedFields as ExtendedFieldsOriginal,\n CreatePayModelRequest as CreatePayModelRequestOriginal,\n CreatePayModelResponse as CreatePayModelResponseOriginal,\n GetPayModelRequest as GetPayModelRequestOriginal,\n GetPayModelResponse as GetPayModelResponseOriginal,\n UpdatePayModelRequest as UpdatePayModelRequestOriginal,\n UpdatePayModelResponse as UpdatePayModelResponseOriginal,\n DeletePayModelRequest as DeletePayModelRequestOriginal,\n DeletePayModelResponse as DeletePayModelResponseOriginal,\n QueryPayModelsRequest as QueryPayModelsRequestOriginal,\n CursorQuery as CursorQueryOriginal,\n CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal,\n Sorting as SortingOriginal,\n SortOrder as SortOrderOriginal,\n SortOrderWithLiterals as SortOrderWithLiteralsOriginal,\n CursorPaging as CursorPagingOriginal,\n QueryPayModelsResponse as QueryPayModelsResponseOriginal,\n CursorPagingMetadata as CursorPagingMetadataOriginal,\n Cursors as CursorsOriginal,\n ArchivePayModelRequest as ArchivePayModelRequestOriginal,\n ArchivePayModelResponse as ArchivePayModelResponseOriginal,\n UnarchivePayModelRequest as UnarchivePayModelRequestOriginal,\n UnarchivePayModelResponse as UnarchivePayModelResponseOriginal,\n BulkDeletePayModelsRequest as BulkDeletePayModelsRequestOriginal,\n BulkDeletePayModelsResponse as BulkDeletePayModelsResponseOriginal,\n ItemMetadata as ItemMetadataOriginal,\n ApplicationError as ApplicationErrorOriginal,\n BulkPayModelResult as BulkPayModelResultOriginal,\n BulkActionMetadata as BulkActionMetadataOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountInfo as AccountInfoOriginal,\n CreatePayModelApplicationErrors as CreatePayModelApplicationErrorsOriginal,\n UpdatePayModelApplicationErrors as UpdatePayModelApplicationErrorsOriginal,\n DeletePayModelApplicationErrors as DeletePayModelApplicationErrorsOriginal,\n BulkDeletePayModelsApplicationErrors as BulkDeletePayModelsApplicationErrorsOriginal,\n} from './staff-pay-v1-pay-model-pay-models.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAAA;AAAA,EAAA,2BAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,mBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,uBAAuB;AAAA,EAC/B,EAAE,MAAM,uBAAuB;AAAA,EAC/B,EAAE,MAAM,wBAAwB;AAClC;AACA,IAAM,oBAAoB,CAAC,EAAE,MAAM,YAAY,CAAC;AAChD,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,wBAAwB;AAAA,EAChC,EAAE,MAAM,wBAAwB;AAAA,EAChC,EAAE,MAAM,yBAAyB;AACnC;AAEA,SAAS,wCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAA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EO,SAASC,mBAOd;AACA,QAAM,UAAU,EAAE,YAAY,cAAc;AAE5C,QAAM,oBAC4B,gBAAgB,OAAO;AAEzD,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,YAAY,aAAa;AAAA,IACvC,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,qBAOd;AACA,QAAM,UAAU,EAAE,YAAY,cAAc;AAE5C,QAAM,oBAC4B,kBAAkB,OAAO;AAE3D,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,YAAY,aAAa;AAAA,IACvC,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,uBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC4B,oBAAoB,OAAO;AAE7D,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["archivePayModel","bulkDeletePayModels","createPayModel","deletePayModel","getPayModel","queryPayModels","unarchivePayModel","updatePayModel","import_timestamp","import_rest_modules","payload","ComponentType","AttendeeCountBasis","CommissionTierMode","DiscountBasis","TaxBasis","CombinatorType","SortOrder","WebhookIdentityType","createPayModel","getPayModel","updatePayModel","deletePayModel","queryPayModels","archivePayModel","unarchivePayModel","bulkDeletePayModels"]}
|
|
1
|
+
{"version":3,"sources":["../../meta.ts","../../src/staff-pay-v1-pay-model-pay-models.http.ts","../../src/staff-pay-v1-pay-model-pay-models.types.ts","../../src/staff-pay-v1-pay-model-pay-models.meta.ts"],"sourcesContent":["export * from './src/staff-pay-v1-pay-model-pay-models.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nconst TRANSFORM_PATHS_0 = [\n { path: 'payModel.createdDate' },\n { path: 'payModel.updatedDate' },\n { path: 'payModel.archivedDate' },\n];\nconst TRANSFORM_PATHS_1 = [{ path: 'fieldMask' }];\nconst TRANSFORM_PATHS_2 = [\n { path: 'payModels.createdDate' },\n { path: 'payModels.updatedDate' },\n { path: 'payModels.archivedDate' },\n];\n\nfunction resolveWixStaffPayV1PayModelsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/pay-model',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_staff-pay_pay-models';\n\n/**\n * Creates a pay model.\n *\n * Components that don't have an ID get one, and tiers are sorted. A pay model is always created unarchived. To pay a\n * staff member with the pay model, add pay terms that point to it in their staff pay profile.\n */\nexport function createPayModel(payload: object): RequestOptionsFactory<any> {\n function __createPayModel({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.staff.pay.v1.pay_model',\n method: 'POST' as any,\n methodFqn: 'wix.staff.pay.v1.PayModelsService.CreatePayModel',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixStaffPayV1PayModelsServiceUrl({\n protoPath: '/v1/pay-models',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createPayModel;\n}\n\n/** Retrieves a pay model. */\nexport function getPayModel(payload: object): RequestOptionsFactory<any> {\n function __getPayModel({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.staff.pay.v1.pay_model',\n method: 'GET' as any,\n methodFqn: 'wix.staff.pay.v1.PayModelsService.GetPayModel',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixStaffPayV1PayModelsServiceUrl({\n protoPath: '/v1/pay-models/{payModelId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getPayModel;\n}\n\n/**\n * Updates a pay model.\n *\n * Each time the pay model is updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the pay model.\n * This ensures you're working with the latest pay model and prevents unintended overwrites.\n *\n * Updating `components` replaces the whole list. Send each existing component's `id` back, so personal rates and pay\n * lines stay linked to it. Changes apply to staff pays calculated after the update, and the staff pays of the staff\n * members paid with the pay model are marked stale.\n *\n * An archived pay model can't be updated.\n */\nexport function updatePayModel(payload: object): RequestOptionsFactory<any> {\n function __updatePayModel({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: TRANSFORM_PATHS_1,\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.staff.pay.v1.pay_model',\n method: 'PATCH' as any,\n methodFqn: 'wix.staff.pay.v1.PayModelsService.UpdatePayModel',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixStaffPayV1PayModelsServiceUrl({\n protoPath: '/v1/pay-models/{payModel.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updatePayModel;\n}\n\n/**\n * Deletes a pay model.\n *\n * A pay model that any pay terms use, past, current or upcoming, can't be deleted. Archive it instead, with Archive\n * Pay Model.\n */\nexport function deletePayModel(payload: object): RequestOptionsFactory<any> {\n function __deletePayModel({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.staff.pay.v1.pay_model',\n method: 'DELETE' as any,\n methodFqn: 'wix.staff.pay.v1.PayModelsService.DeletePayModel',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixStaffPayV1PayModelsServiceUrl({\n protoPath: '/v1/pay-models/{payModelId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deletePayModel;\n}\n\n/**\n * Retrieves a list of up to 100 pay models, given the provided paging, filtering, and sorting.\n *\n * Query Pay Models runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `cursorPaging.limit` is `50`\n *\n * Archived pay models are returned too. To leave them out, for example in lists and pickers, filter on\n * `{\"archivedDate\": {\"$exists\": false}}`.\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n */\nexport function queryPayModels(payload: object): RequestOptionsFactory<any> {\n function __queryPayModels({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.staff.pay.v1.pay_model',\n method: 'GET' as any,\n methodFqn: 'wix.staff.pay.v1.PayModelsService.QueryPayModels',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixStaffPayV1PayModelsServiceUrl({\n protoPath: '/v1/pay-models/query',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_2,\n },\n ]),\n fallback: [\n {\n method: 'POST' as any,\n url: resolveWixStaffPayV1PayModelsServiceUrl({\n protoPath: '/v1/pay-models/query',\n data: payload,\n host,\n }),\n data: payload,\n },\n ],\n };\n\n return metadata;\n }\n\n return __queryPayModels;\n}\n\n/**\n * Archives a pay model. Sets `archivedDate`.\n *\n * Use it for a pay model that's no longer offered but that pay terms used, so it can't be deleted. Pay terms that use\n * the pay model keep it, and it can still be retrieved. An archived pay model can't be updated.\n *\n * Archiving an archived pay model returns it unchanged.\n */\nexport function archivePayModel(payload: object): RequestOptionsFactory<any> {\n function __archivePayModel({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.staff.pay.v1.pay_model',\n method: 'POST' as any,\n methodFqn: 'wix.staff.pay.v1.PayModelsService.ArchivePayModel',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixStaffPayV1PayModelsServiceUrl({\n protoPath: '/v1/pay-models/{payModelId}/archive',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __archivePayModel;\n}\n","/**\n * A pay model is a reusable way to pay staff: a list of pay components, such as an hourly wage, session rates and a\n * tip share, whose results are combined into a staff member's gross pay for a pay period. A pay model holds no people\n * and no dates: staff members are paid with it through the pay terms in their staff pay profile.\n *\n * Monetary amounts are decimal strings in the site's pay currency, set in the staff pay settings. Percentages are\n * decimal strings between `0` and `100`.\n */\nexport interface PayModel {\n /**\n * Pay model ID.\n * @format GUID\n * @readonly\n */\n id?: string | null;\n /**\n * Revision number, which increments by 1 each time the pay model is updated.\n * To prevent conflicting changes,\n * the current revision must be passed when updating the pay model.\n *\n * Ignored when creating a pay model.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the pay model was created.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the pay model was last updated.\n * @readonly\n */\n updatedDate?: Date | null;\n /**\n * Pay model name. For example, `Group fitness instructor`.\n * @maxLength 100\n */\n name?: string;\n /**\n * Description of the pay model.\n * @maxLength 500\n */\n description?: string | null;\n /**\n * Pay components. Each component produces pay lines for a pay period.\n *\n * The session rates are the `FLAT_PER_SESSION`, `BASE_PLUS_PER_HEAD`, `ATTENDANCE_TIERS`, `PER_COURSE` and\n * `SERVICE_COMMISSION` components. Each service is paid by 1 session rate at most, so a session or a sale is never\n * paid twice. A rate with `serviceIds` pays only those services. At most 1 rate has no `serviceIds`: it pays every\n * service that no other rate lists, including services added later.\n *\n * A `PER_COURSE` rate pays course sessions only, and has its own default: at most 1 `PER_COURSE` rate has no\n * `serviceIds`, and it pays every course that no rate lists. A course is paid by the rate that lists it, else by that\n * per-course rate, else by the rate without `serviceIds`.\n *\n * Components get an ID when they're first saved. Send each component's `id` back when updating, so personal rates and\n * pay lines stay linked to it.\n * @maxSize 20\n */\n components?: PayComponent[];\n /**\n * How the component results are combined into gross pay.\n *\n * Default: `SUM`\n */\n combinator?: Combinator;\n /**\n * Date and time the pay model was archived.\n *\n * Returned only when the pay model is archived. An archived pay model can't be updated and isn't offered for new pay\n * terms, but pay terms that already use it keep it, so it can still be retrieved. Set by Archive Pay Model.\n * @readonly\n */\n archivedDate?: Date | null;\n /**\n * Custom field data for the pay model object.\n *\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n}\n\n/** A single pay component of a pay model. */\nexport interface PayComponent extends PayComponentOptionsOneOf {\n /** Fixed amount per pay period. */\n salaryOptions?: SalaryOptions;\n /** Rate per paid hour worked, from Time Clock timecards. */\n hourlyOptions?: HourlyOptions;\n /** Flat amount per session taught. */\n flatPerSessionOptions?: FlatPerSessionOptions;\n /** Amount per attendee, with an optional base amount that covers the first attendees. */\n basePlusPerHeadOptions?: BasePlusPerHeadOptions;\n /** Flat amount per session, by attendance tier. */\n attendanceTiersOptions?: AttendanceTiersOptions;\n /** Percentage of service revenue. */\n serviceCommissionOptions?: ServiceCommissionOptions;\n /** Share of tips. */\n tipsOptions?: TipsOptions;\n /** Percentage of product sales. Not calculated yet. */\n productCommissionOptions?: ProductCommissionOptions;\n /** Commission on pricing plan sales, such as memberships and packages. Not calculated yet. */\n planSaleCommissionOptions?: PlanSaleCommissionOptions;\n /**\n * Flat amount per course taught, spread evenly across the course's sessions.\n * @internal\n */\n perCourseOptions?: PerCourseOptions;\n /**\n * Component ID. Assigned when the component is first saved. Send it back when updating, to keep the same component\n * so personal rates and pay lines stay linked to it.\n * @format GUID\n */\n id?: string | null;\n /**\n * Component name. For example, `Class pay`.\n * @maxLength 100\n */\n name?: string;\n /** Component type. Must match the options that are specified. */\n type?: ComponentTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface PayComponentOptionsOneOf {\n /** Fixed amount per pay period. */\n salaryOptions?: SalaryOptions;\n /** Rate per paid hour worked, from Time Clock timecards. */\n hourlyOptions?: HourlyOptions;\n /** Flat amount per session taught. */\n flatPerSessionOptions?: FlatPerSessionOptions;\n /** Amount per attendee, with an optional base amount that covers the first attendees. */\n basePlusPerHeadOptions?: BasePlusPerHeadOptions;\n /** Flat amount per session, by attendance tier. */\n attendanceTiersOptions?: AttendanceTiersOptions;\n /** Percentage of service revenue. */\n serviceCommissionOptions?: ServiceCommissionOptions;\n /** Share of tips. */\n tipsOptions?: TipsOptions;\n /** Percentage of product sales. Not calculated yet. */\n productCommissionOptions?: ProductCommissionOptions;\n /** Commission on pricing plan sales, such as memberships and packages. Not calculated yet. */\n planSaleCommissionOptions?: PlanSaleCommissionOptions;\n /**\n * Flat amount per course taught, spread evenly across the course's sessions.\n * @internal\n */\n perCourseOptions?: PerCourseOptions;\n}\n\n/** Pay component type. */\nexport enum ComponentType {\n /** Fixed amount per pay period. */\n SALARY = 'SALARY',\n /** Rate per paid hour worked, from Time Clock timecards. */\n HOURLY = 'HOURLY',\n /** Flat amount per session taught. */\n FLAT_PER_SESSION = 'FLAT_PER_SESSION',\n /** Amount per attendee, with an optional base amount that covers the first attendees. */\n BASE_PLUS_PER_HEAD = 'BASE_PLUS_PER_HEAD',\n /** Flat amount per session, by attendance tier. */\n ATTENDANCE_TIERS = 'ATTENDANCE_TIERS',\n /** Percentage of service revenue. */\n SERVICE_COMMISSION = 'SERVICE_COMMISSION',\n /** Share of tips. */\n TIPS = 'TIPS',\n /** Percentage of product sales. Not calculated yet: pays nothing until product sales are read. */\n PRODUCT_COMMISSION = 'PRODUCT_COMMISSION',\n /**\n * Commission on pricing plan sales, such as memberships and packages. Not calculated yet: pays nothing until\n * pricing plan sales are read.\n */\n PLAN_SALE_COMMISSION = 'PLAN_SALE_COMMISSION',\n /**\n * Flat amount per course taught, spread evenly across the course's sessions.\n * @documentationMaturity preview\n * @internal\n */\n PER_COURSE = 'PER_COURSE',\n}\n\n/** @enumType */\nexport type ComponentTypeWithLiterals =\n | ComponentType\n | 'SALARY'\n | 'HOURLY'\n | 'FLAT_PER_SESSION'\n | 'BASE_PLUS_PER_HEAD'\n | 'ATTENDANCE_TIERS'\n | 'SERVICE_COMMISSION'\n | 'TIPS'\n | 'PRODUCT_COMMISSION'\n | 'PLAN_SALE_COMMISSION';\n\nexport interface SalaryOptions {\n /**\n * Amount per pay period.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n amountPerPeriod?: string;\n /**\n * Deprecated: ignored. A salary is always prorated by the days employed in the period, based on the profile's\n * employment dates, so no salary is paid after the last day of work.\n */\n prorateByDaysEmployed?: boolean;\n}\n\nexport interface HourlyOptions {\n /**\n * Rate per paid hour. Unpaid breaks aren't paid.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n rate?: string;\n /**\n * Whether the overtime rules in the staff pay settings apply to the hours of this component.\n *\n * Default: `false`\n */\n overtimeEligible?: boolean;\n /**\n * Whether to pay only for clocked time outside sessions the staff member taught that a session rate of the pay model\n * covers, so a session isn't paid twice by an hourly component and a session rate. Time in a session no session rate\n * covers is still paid hourly.\n *\n * Default: `false`\n */\n excludeSessionTime?: boolean;\n}\n\nexport interface FlatPerSessionOptions {\n /**\n * Amount per session taught.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n amount?: string;\n /**\n * Services this rate pays. See `payModel.components` for how session rates share the services.\n * @maxSize 1000\n * @format GUID\n */\n serviceIds?: string[];\n /**\n * Not used: a session that the business cancelled is never paid, whatever this says. Kept so existing clients\n * still work.\n *\n * Default: `false`\n */\n zeroWhenCancelled?: boolean;\n}\n\n/**\n * Pay per attendee of a session. A session pays `baseAmount`, plus `amountPerAdditionalAttendee` for each attendee\n * above `includedAttendees`. Without a base amount and with `0` included attendees, every attendee is paid.\n */\nexport interface BasePlusPerHeadOptions {\n /**\n * Amount paid for each session, which covers its first `includedAttendees` attendees. When not set or `0`, there's no\n * base amount.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n baseAmount?: string | null;\n /**\n * Number of attendees who aren't paid per attendee: the ones the base amount covers. `0` pays every attendee.\n * @max 10000\n */\n includedAttendees?: number;\n /**\n * Amount per attendee above `includedAttendees`.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n amountPerAdditionalAttendee?: string;\n /**\n * Which attendees are counted.\n *\n * Default: `CHECKED_IN`\n */\n countBasis?: AttendeeCountBasisWithLiterals;\n /**\n * Services this rate pays. See `payModel.components` for how session rates share the services.\n * @maxSize 1000\n * @format GUID\n */\n serviceIds?: string[];\n /**\n * Not used: a session that the business cancelled is never paid, whatever this says. Kept so existing clients\n * still work.\n *\n * Default: `false`\n */\n zeroWhenCancelled?: boolean;\n /**\n * Whether free visits are left out of the attendees counted. A free visit is a booking nothing was paid for, such as\n * a free service or a complimentary visit.\n *\n * Default: `false`\n */\n excludeFreeVisits?: boolean;\n /**\n * More amounts per additional attendee, for bigger sessions. Each attendee above `includedAttendees` is paid the\n * amount of the highest tier whose `fromAttendee` they reach, and `amountPerAdditionalAttendee` below the first tier.\n * Every `fromAttendee` must be above `includedAttendees`, and 2 tiers can't share one.\n * @internal\n * @maxSize 20\n */\n extraAttendeeTiers?: ExtraAttendeeTier[];\n /**\n * Most a session can pay under this rate, whatever its attendance. A staff member's personal rate applies first.\n * Must be at least `baseAmount`, when there's one. When not set, there's no maximum.\n * @internal\n * @decimalValue options { gte:0, maxScale:2 }\n */\n maxAmountPerSession?: string | null;\n}\n\n/** Which attendees of a session are counted. */\nexport enum AttendeeCountBasis {\n /** All booked attendees. */\n BOOKED = 'BOOKED',\n /** Only checked-in attendees. */\n CHECKED_IN = 'CHECKED_IN',\n /** Checked-in attendees and no-shows (bookings that weren't cancelled). */\n CHECKED_IN_AND_NO_SHOWS = 'CHECKED_IN_AND_NO_SHOWS',\n}\n\n/** @enumType */\nexport type AttendeeCountBasisWithLiterals =\n | AttendeeCountBasis\n | 'BOOKED'\n | 'CHECKED_IN'\n | 'CHECKED_IN_AND_NO_SHOWS';\n\n/** An amount per attendee, from 1 attendee number on. Attendees are numbered from 1 in each session. */\nexport interface ExtraAttendeeTier {\n /**\n * Attendee number the tier starts at. Attendees from this number on are paid `amountPerAttendee`.\n * @min 1\n * @max 10000\n */\n fromAttendee?: number;\n /**\n * Amount per attendee in this tier.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n amountPerAttendee?: string;\n}\n\nexport interface AttendanceTiersOptions {\n /**\n * Tiers, sorted by `minAttendees` when saved. A session is paid at the highest tier whose `minAttendees` it reaches.\n * 2 tiers can't share a `minAttendees`.\n * @maxSize 20\n */\n tiers?: AttendanceTier[];\n /**\n * Which attendees are counted.\n *\n * Default: `CHECKED_IN`\n */\n countBasis?: AttendeeCountBasisWithLiterals;\n /**\n * Services this rate pays. See `payModel.components` for how session rates share the services.\n * @maxSize 1000\n * @format GUID\n */\n serviceIds?: string[];\n /**\n * Not used: a session that the business cancelled is never paid, whatever this says. Kept so existing clients\n * still work.\n *\n * Default: `false`\n */\n zeroWhenCancelled?: boolean;\n /**\n * Whether free visits are left out of the attendees counted. A free visit is a booking nothing was paid for, such as\n * a free service or a complimentary visit.\n *\n * Default: `false`\n */\n excludeFreeVisits?: boolean;\n}\n\nexport interface AttendanceTier {\n /**\n * Minimum number of attendees for this tier.\n * @max 10000\n */\n minAttendees?: number;\n /**\n * Flat amount per session.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n value?: string;\n}\n\nexport interface ServiceCommissionOptions {\n /**\n * Commission percentage of service revenue. With `tiers`, the percentage paid below the first tier.\n * @decimalValue options { gte:0, lte:100, maxScale:2 }\n */\n percent?: string;\n /**\n * Services this rate pays. See `payModel.components` for how session rates share the services.\n * @maxSize 1000\n * @format GUID\n */\n serviceIds?: string[];\n /**\n * Sliding-scale tiers on the period's service sales, sorted by `minSales`. A higher tier raises the percentage once\n * the period's sales reach its `minSales`. When empty, every sale is paid at `percent`.\n * @maxSize 20\n */\n tiers?: CommissionTier[];\n /**\n * How `tiers` apply to the period's sales.\n *\n * Default: `ENTIRE_AMOUNT`\n */\n tierMode?: CommissionTierModeWithLiterals;\n /** How service sales are counted. */\n revenueRules?: RevenueRules;\n /**\n * Cost taken off each sale's price before the commission percentage applies. When not set, nothing is taken off.\n * @internal\n */\n costDeduction?: CostDeduction;\n}\n\n/** A sliding-scale commission tier. */\nexport interface CommissionTier {\n /**\n * Period sales from which this tier applies.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n minSales?: string;\n /**\n * Commission percentage of this tier.\n * @decimalValue options { gte:0, lte:100, maxScale:2 }\n */\n percent?: string;\n}\n\n/** How sliding-scale tiers apply to a period's sales. */\nexport enum CommissionTierMode {\n /** All of the period's sales are paid at the percentage of the highest tier reached. */\n ENTIRE_AMOUNT = 'ENTIRE_AMOUNT',\n /** Each part of the period's sales is paid at the percentage of the tier it falls in. */\n PORTION_IN_TIER = 'PORTION_IN_TIER',\n}\n\n/** @enumType */\nexport type CommissionTierModeWithLiterals =\n | CommissionTierMode\n | 'ENTIRE_AMOUNT'\n | 'PORTION_IN_TIER';\n\n/**\n * How revenue is counted by a component that pays on revenue. A session's revenue adds up what each of its bookings is\n * worth: the price of a booking paid in money, the price per session of a pricing plan with a set number of sessions, or\n * the site's value of a visit on an unlimited plan. A free visit adds nothing. Refunds completed by the end of the pay\n * period are subtracted (a later refund doesn't change an earlier period's pay), and a course booking's price is split\n * evenly across the course sessions it covers.\n */\nexport interface RevenueRules {\n /**\n * Whether a booking paid in money counts at its price before or after discounts.\n *\n * Default: `AFTER_DISCOUNTS`\n */\n discountBasis?: DiscountBasisWithLiterals;\n /**\n * Whether a booking's tax counts in its revenue. Applies to prices that include tax, as on sites that show prices with\n * VAT: `BEFORE_TAX` takes the booking's tax off its price, and its discounts and refunds in the same proportion. A price\n * that doesn't include tax counts as it is either way.\n *\n * Default: `BEFORE_TAX`\n */\n taxBasis?: TaxBasisWithLiterals;\n}\n\n/** Whether revenue is taken before or after discounts. */\nexport enum DiscountBasis {\n /** Price before discounts. */\n BEFORE_DISCOUNTS = 'BEFORE_DISCOUNTS',\n /** Price paid, after discounts. */\n AFTER_DISCOUNTS = 'AFTER_DISCOUNTS',\n}\n\n/** @enumType */\nexport type DiscountBasisWithLiterals =\n | DiscountBasis\n | 'BEFORE_DISCOUNTS'\n | 'AFTER_DISCOUNTS';\n\n/** Whether revenue includes the tax in a price. */\nexport enum TaxBasis {\n /** Price without tax. */\n BEFORE_TAX = 'BEFORE_TAX',\n /** Price with the tax it includes. */\n WITH_TAX = 'WITH_TAX',\n}\n\n/** @enumType */\nexport type TaxBasisWithLiterals = TaxBasis | 'BEFORE_TAX' | 'WITH_TAX';\n\n/**\n * A cost taken off each sale's price before commission, such as the products a service uses or a fee. A sale is never\n * counted below 0. Sliding-scale tiers measure the period's sales after the cost is taken off.\n */\nexport interface CostDeduction extends CostDeductionKindOneOf {\n /**\n * Fixed amount taken off each sale.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n amountPerSale?: string;\n /**\n * Percentage of each sale's price taken off.\n * @decimalValue options { gte:0, lte:100, maxScale:2 }\n */\n percent?: string;\n}\n\n/** @oneof */\nexport interface CostDeductionKindOneOf {\n /**\n * Fixed amount taken off each sale.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n amountPerSale?: string;\n /**\n * Percentage of each sale's price taken off.\n * @decimalValue options { gte:0, lte:100, maxScale:2 }\n */\n percent?: string;\n}\n\nexport interface TipsOptions {\n /**\n * Percentage of the staff member's tip distributions that's passed on to them.\n *\n * Default: `100`\n * @decimalValue options { gte:0, lte:100, maxScale:2 }\n */\n sharePercent?: string | null;\n /**\n * Card processing fee percentage deducted from tips paid by card before they're shared. Tips paid offline, for\n * example in cash, have no fee taken off. A tip whose payment method isn't known has the fee taken off all of it.\n *\n * Default: `0`\n * @decimalValue options { gte:0, lte:100, maxScale:2 }\n */\n cardFeePercent?: string | null;\n}\n\nexport interface ProductCommissionOptions {\n /**\n * Commission percentage of product sales, after discounts.\n * @decimalValue options { gte:0, lte:100, maxScale:2 }\n */\n percent?: string;\n /**\n * Products this component applies to. When empty, applies to all products.\n * @maxSize 1000\n * @format GUID\n */\n productIds?: string[];\n}\n\nexport interface PlanSaleCommissionOptions {\n /**\n * Commission percentage of each plan order's price.\n *\n * Default: `0`\n * @decimalValue options { gte:0, lte:100, maxScale:2 }\n */\n percent?: string | null;\n /**\n * Flat amount per plan order, added to the percentage.\n *\n * Default: `0`\n * @decimalValue options { gte:0, maxScale:2 }\n */\n amountPerOrder?: string | null;\n /**\n * Plans this component applies to. When empty, applies to all plans.\n * @maxSize 1000\n * @format GUID\n */\n planIds?: string[];\n}\n\n/**\n * A flat amount per Bookings course. Each session of the course pays the amount divided by the course's sessions, to\n * whoever taught that session, so a substitute is paid for the sessions they taught. Cancelled sessions don't count\n * towards the course's sessions and pay nothing.\n */\nexport interface PerCourseOptions {\n /**\n * Amount per course.\n * @decimalValue options { gte:0, maxScale:2 }\n */\n amount?: string;\n /**\n * Course services this rate pays. When empty, pays every course no other rate lists. See `payModel.components` for\n * how session rates share the services. Service IDs aren't checked to be courses: a listed service that isn't a\n * course is paid nothing by this rate.\n * @maxSize 1000\n * @format GUID\n */\n serviceIds?: string[];\n}\n\n/** How component results are combined into gross pay. */\nexport interface Combinator extends CombinatorOptionsOneOf {\n /** Pay the greater of a set of components. */\n greaterOfOptions?: GreaterOfOptions;\n /** Combinator type. Must match the options that are specified. */\n type?: CombinatorTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface CombinatorOptionsOneOf {\n /** Pay the greater of a set of components. */\n greaterOfOptions?: GreaterOfOptions;\n}\n\n/** Combinator type. */\nexport enum CombinatorType {\n /** Add all component results together. */\n SUM = 'SUM',\n /** Pay only the greatest result among `greaterOfOptions.componentIds`. All other components are added. */\n GREATER_OF = 'GREATER_OF',\n}\n\n/** @enumType */\nexport type CombinatorTypeWithLiterals = CombinatorType | 'SUM' | 'GREATER_OF';\n\nexport interface GreaterOfOptions {\n /**\n * IDs of the components that compete, for example a salary component and a commission component.\n * @minSize 2\n * @maxSize 20\n * @format GUID\n */\n componentIds?: string[];\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 CreatePayModelRequest {\n /** Pay model to create. */\n payModel: PayModel;\n}\n\nexport interface CreatePayModelResponse {\n /** Created pay model. */\n payModel?: PayModel;\n}\n\nexport interface GetPayModelRequest {\n /**\n * ID of the pay model to retrieve.\n * @format GUID\n */\n payModelId: string;\n}\n\nexport interface GetPayModelResponse {\n /** Retrieved pay model. */\n payModel?: PayModel;\n}\n\nexport interface UpdatePayModelRequest {\n /** Pay model to update. May be partial. */\n payModel: PayModel;\n /**\n * Set of fields to update.\n *\n * Fields that aren't included in `fieldMask.paths` are ignored.\n * @internal\n */\n fieldMask?: string[];\n}\n\nexport interface UpdatePayModelResponse {\n /** Updated pay model. */\n payModel?: PayModel;\n}\n\nexport interface DeletePayModelRequest {\n /**\n * ID of the pay model to delete.\n * @format GUID\n */\n payModelId: string;\n}\n\nexport interface DeletePayModelResponse {}\n\nexport interface QueryPayModelsRequest {\n /** Query options. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryPayModelsResponse {\n /** Retrieved pay models. */\n payModels?: PayModel[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface ArchivePayModelRequest {\n /**\n * ID of the pay model to archive.\n * @format GUID\n */\n payModelId: string;\n}\n\nexport interface ArchivePayModelResponse {\n /** Archived pay model. */\n payModel?: PayModel;\n}\n\nexport interface UnarchivePayModelRequest {\n /**\n * ID of the pay model to unarchive.\n * @format GUID\n */\n payModelId?: string;\n}\n\nexport interface UnarchivePayModelResponse {\n /** Unarchived pay model. */\n payModel?: PayModel;\n}\n\nexport interface BulkDeletePayModelsRequest {\n /**\n * IDs of the pay models to delete.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n payModelIds?: string[];\n}\n\nexport interface BulkDeletePayModelsResponse {\n /**\n * Results, 1 per requested pay model.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkPayModelResult[];\n /** Metadata about the bulk delete operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed.\n * @format GUID\n */\n id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action for this item was successful. When `false`, the `error` field is returned. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkPayModelResult {\n /** Metadata about the deletion of this pay model. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /**\n * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity\n * @internal\n */\n triggeredByUndelete?: boolean | null;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntityAsJson?: string;\n /**\n * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard\n * wont populate it / have any reference to it in the API.\n * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed,\n * the developer should send only the new (current) entity.\n * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big\n * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.\n * @internal\n * @deprecated\n */\n previousEntityAsJson?: string | null;\n /**\n * Map of fully qualified field paths to their previous values for fields that changed.\n * For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format)\n * @internal\n */\n modifiedFields?: Record<string, any>;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface EntityDeletedEvent {\n /**\n * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled\n * @internal\n */\n movedToTrash?: boolean | null;\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type CreatePayModelApplicationErrors =\n | {\n code?: 'INVALID_COMBINATOR';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_ATTENDEE_TIERS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_COMPONENT_ID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SERVICE_IN_TWO_RATES';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'TWO_DEFAULT_RATES';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MAX_BELOW_BASE';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type UpdatePayModelApplicationErrors =\n | {\n code?: 'INVALID_COMBINATOR';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_ATTENDEE_TIERS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_COMPONENT_ID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SERVICE_IN_TWO_RATES';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'TWO_DEFAULT_RATES';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MAX_BELOW_BASE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PAY_MODEL_ARCHIVED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type DeletePayModelApplicationErrors = {\n code?: 'PAY_MODEL_IN_USE';\n description?: string;\n data?: Record<string, any>;\n};\n","import * as ambassadorWixStaffPayV1PayModel from './staff-pay-v1-pay-model-pay-models.http.js';\nimport * as ambassadorWixStaffPayV1PayModelTypes from './staff-pay-v1-pay-model-pay-models.types.js';\nimport * as ambassadorWixStaffPayV1PayModelUniversalTypes from './staff-pay-v1-pay-model-pay-models.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function createPayModel(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixStaffPayV1PayModelUniversalTypes.CreatePayModelRequest,\n ambassadorWixStaffPayV1PayModelTypes.CreatePayModelRequest,\n ambassadorWixStaffPayV1PayModelUniversalTypes.CreatePayModelResponse,\n ambassadorWixStaffPayV1PayModelTypes.CreatePayModelResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixStaffPayV1PayModel.createPayModel(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/pay-models',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getPayModel(): __PublicMethodMetaInfo<\n 'GET',\n { payModelId: string },\n ambassadorWixStaffPayV1PayModelUniversalTypes.GetPayModelRequest,\n ambassadorWixStaffPayV1PayModelTypes.GetPayModelRequest,\n ambassadorWixStaffPayV1PayModelUniversalTypes.GetPayModelResponse,\n ambassadorWixStaffPayV1PayModelTypes.GetPayModelResponse\n> {\n const payload = { payModelId: ':payModelId' } as any;\n\n const getRequestOptions =\n ambassadorWixStaffPayV1PayModel.getPayModel(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/pay-models/{payModelId}',\n pathParams: { payModelId: 'payModelId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updatePayModel(): __PublicMethodMetaInfo<\n 'PATCH',\n { payModelId: string },\n ambassadorWixStaffPayV1PayModelUniversalTypes.UpdatePayModelRequest,\n ambassadorWixStaffPayV1PayModelTypes.UpdatePayModelRequest,\n ambassadorWixStaffPayV1PayModelUniversalTypes.UpdatePayModelResponse,\n ambassadorWixStaffPayV1PayModelTypes.UpdatePayModelResponse\n> {\n const payload = { payModel: { id: ':payModelId' } } as any;\n\n const getRequestOptions =\n ambassadorWixStaffPayV1PayModel.updatePayModel(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v1/pay-models/{payModel.id}',\n pathParams: { payModelId: 'payModelId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deletePayModel(): __PublicMethodMetaInfo<\n 'DELETE',\n { payModelId: string },\n ambassadorWixStaffPayV1PayModelUniversalTypes.DeletePayModelRequest,\n ambassadorWixStaffPayV1PayModelTypes.DeletePayModelRequest,\n ambassadorWixStaffPayV1PayModelUniversalTypes.DeletePayModelResponse,\n ambassadorWixStaffPayV1PayModelTypes.DeletePayModelResponse\n> {\n const payload = { payModelId: ':payModelId' } as any;\n\n const getRequestOptions =\n ambassadorWixStaffPayV1PayModel.deletePayModel(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/pay-models/{payModelId}',\n pathParams: { payModelId: 'payModelId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function queryPayModels(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixStaffPayV1PayModelUniversalTypes.QueryPayModelsRequest,\n ambassadorWixStaffPayV1PayModelTypes.QueryPayModelsRequest,\n ambassadorWixStaffPayV1PayModelUniversalTypes.QueryPayModelsResponse,\n ambassadorWixStaffPayV1PayModelTypes.QueryPayModelsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixStaffPayV1PayModel.queryPayModels(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/pay-models/query',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function archivePayModel(): __PublicMethodMetaInfo<\n 'POST',\n { payModelId: string },\n ambassadorWixStaffPayV1PayModelUniversalTypes.ArchivePayModelRequest,\n ambassadorWixStaffPayV1PayModelTypes.ArchivePayModelRequest,\n ambassadorWixStaffPayV1PayModelUniversalTypes.ArchivePayModelResponse,\n ambassadorWixStaffPayV1PayModelTypes.ArchivePayModelResponse\n> {\n const payload = { payModelId: ':payModelId' } as any;\n\n const getRequestOptions =\n ambassadorWixStaffPayV1PayModel.archivePayModel(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/pay-models/{payModelId}/archive',\n pathParams: { payModelId: 'payModelId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n PayModel as PayModelOriginal,\n PayComponent as PayComponentOriginal,\n PayComponentOptionsOneOf as PayComponentOptionsOneOfOriginal,\n ComponentType as ComponentTypeOriginal,\n ComponentTypeWithLiterals as ComponentTypeWithLiteralsOriginal,\n SalaryOptions as SalaryOptionsOriginal,\n HourlyOptions as HourlyOptionsOriginal,\n FlatPerSessionOptions as FlatPerSessionOptionsOriginal,\n BasePlusPerHeadOptions as BasePlusPerHeadOptionsOriginal,\n AttendeeCountBasis as AttendeeCountBasisOriginal,\n AttendeeCountBasisWithLiterals as AttendeeCountBasisWithLiteralsOriginal,\n ExtraAttendeeTier as ExtraAttendeeTierOriginal,\n AttendanceTiersOptions as AttendanceTiersOptionsOriginal,\n AttendanceTier as AttendanceTierOriginal,\n ServiceCommissionOptions as ServiceCommissionOptionsOriginal,\n CommissionTier as CommissionTierOriginal,\n CommissionTierMode as CommissionTierModeOriginal,\n CommissionTierModeWithLiterals as CommissionTierModeWithLiteralsOriginal,\n RevenueRules as RevenueRulesOriginal,\n DiscountBasis as DiscountBasisOriginal,\n DiscountBasisWithLiterals as DiscountBasisWithLiteralsOriginal,\n TaxBasis as TaxBasisOriginal,\n TaxBasisWithLiterals as TaxBasisWithLiteralsOriginal,\n CostDeduction as CostDeductionOriginal,\n CostDeductionKindOneOf as CostDeductionKindOneOfOriginal,\n TipsOptions as TipsOptionsOriginal,\n ProductCommissionOptions as ProductCommissionOptionsOriginal,\n PlanSaleCommissionOptions as PlanSaleCommissionOptionsOriginal,\n PerCourseOptions as PerCourseOptionsOriginal,\n Combinator as CombinatorOriginal,\n CombinatorOptionsOneOf as CombinatorOptionsOneOfOriginal,\n CombinatorType as CombinatorTypeOriginal,\n CombinatorTypeWithLiterals as CombinatorTypeWithLiteralsOriginal,\n GreaterOfOptions as GreaterOfOptionsOriginal,\n ExtendedFields as ExtendedFieldsOriginal,\n CreatePayModelRequest as CreatePayModelRequestOriginal,\n CreatePayModelResponse as CreatePayModelResponseOriginal,\n GetPayModelRequest as GetPayModelRequestOriginal,\n GetPayModelResponse as GetPayModelResponseOriginal,\n UpdatePayModelRequest as UpdatePayModelRequestOriginal,\n UpdatePayModelResponse as UpdatePayModelResponseOriginal,\n DeletePayModelRequest as DeletePayModelRequestOriginal,\n DeletePayModelResponse as DeletePayModelResponseOriginal,\n QueryPayModelsRequest as QueryPayModelsRequestOriginal,\n CursorQuery as CursorQueryOriginal,\n CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal,\n Sorting as SortingOriginal,\n SortOrder as SortOrderOriginal,\n SortOrderWithLiterals as SortOrderWithLiteralsOriginal,\n CursorPaging as CursorPagingOriginal,\n QueryPayModelsResponse as QueryPayModelsResponseOriginal,\n CursorPagingMetadata as CursorPagingMetadataOriginal,\n Cursors as CursorsOriginal,\n ArchivePayModelRequest as ArchivePayModelRequestOriginal,\n ArchivePayModelResponse as ArchivePayModelResponseOriginal,\n UnarchivePayModelRequest as UnarchivePayModelRequestOriginal,\n UnarchivePayModelResponse as UnarchivePayModelResponseOriginal,\n BulkDeletePayModelsRequest as BulkDeletePayModelsRequestOriginal,\n BulkDeletePayModelsResponse as BulkDeletePayModelsResponseOriginal,\n ItemMetadata as ItemMetadataOriginal,\n ApplicationError as ApplicationErrorOriginal,\n BulkPayModelResult as BulkPayModelResultOriginal,\n BulkActionMetadata as BulkActionMetadataOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountInfo as AccountInfoOriginal,\n CreatePayModelApplicationErrors as CreatePayModelApplicationErrorsOriginal,\n UpdatePayModelApplicationErrors as UpdatePayModelApplicationErrorsOriginal,\n DeletePayModelApplicationErrors as DeletePayModelApplicationErrorsOriginal,\n} from './staff-pay-v1-pay-model-pay-models.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAAA;AAAA,EAAA,sBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,mBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,uBAAuB;AAAA,EAC/B,EAAE,MAAM,uBAAuB;AAAA,EAC/B,EAAE,MAAM,wBAAwB;AAClC;AACA,IAAM,oBAAoB,CAAC,EAAE,MAAM,YAAY,CAAC;AAChD,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,wBAAwB;AAAA,EAChC,EAAE,MAAM,wBAAwB;AAAA,EAChC,EAAE,MAAM,yBAAyB;AACnC;AAEA,SAAS,wCACP,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;AAQd,SAAS,eAAe,SAA6C;AAC1E,WAAS,iBAAiB,EAAE,KAAK,GAAQ;AACvC,UAAM,qBAAi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M;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,mBAOd;AACA,QAAM,UAAU,EAAE,YAAY,cAAc;AAE5C,QAAM,oBAC4B,gBAAgB,OAAO;AAEzD,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,YAAY,aAAa;AAAA,IACvC,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["archivePayModel","createPayModel","deletePayModel","getPayModel","queryPayModels","updatePayModel","import_timestamp","import_rest_modules","payload","ComponentType","AttendeeCountBasis","CommissionTierMode","DiscountBasis","TaxBasis","CombinatorType","SortOrder","WebhookIdentityType","createPayModel","getPayModel","updatePayModel","deletePayModel","queryPayModels","archivePayModel"]}
|
package/build/es/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { PayModel, CreatePayModelApplicationErrors, UpdatePayModel, UpdatePayModelApplicationErrors, DeletePayModelApplicationErrors, ArchivePayModelResponse,
|
|
3
|
-
export { AccountInfo, ActionEvent, ApplicationError, ArchivePayModelRequest, AttendanceTier, AttendanceTiersOptions, AttendeeCountBasis, AttendeeCountBasisWithLiterals, BasePlusPerHeadOptions, BulkActionMetadata, BulkDeletePayModelsRequest, BulkPayModelResult, Combinator, CombinatorOptionsOneOf, CombinatorType, CombinatorTypeWithLiterals, CommissionTier, CommissionTierMode, CommissionTierModeWithLiterals, CommonQueryWithEntityContext, ComponentType, ComponentTypeWithLiterals, CostDeduction, CostDeductionKindOneOf, CreatePayModelRequest, CreatePayModelResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeletePayModelRequest, DeletePayModelResponse, DiscountBasis, DiscountBasisWithLiterals, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExtendedFields, ExtraAttendeeTier, FlatPerSessionOptions, GetPayModelRequest, GetPayModelResponse, GreaterOfOptions, HourlyOptions, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, MessageEnvelope, PayComponent, PayComponentOptionsOneOf, PayModelQuerySpec, PayModelsQueryResult, PerCourseOptions, PlanSaleCommissionOptions, ProductCommissionOptions, QueryPayModelsRequest, QueryPayModelsResponse, RestoreInfo, RevenueRules, SalaryOptions, ServiceCommissionOptions, SortOrder, SortOrderWithLiterals, Sorting, TaxBasis, TaxBasisWithLiterals, TipsOptions, UnarchivePayModelRequest, UpdatePayModelRequest, UpdatePayModelResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.mjs';
|
|
2
|
+
import { PayModel, CreatePayModelApplicationErrors, UpdatePayModel, UpdatePayModelApplicationErrors, DeletePayModelApplicationErrors, ArchivePayModelResponse, PayModelsQueryBuilder, PayModelQuery, typedQueryPayModels } from './index.typings.mjs';
|
|
3
|
+
export { AccountInfo, ActionEvent, ApplicationError, ArchivePayModelRequest, AttendanceTier, AttendanceTiersOptions, AttendeeCountBasis, AttendeeCountBasisWithLiterals, BasePlusPerHeadOptions, BulkActionMetadata, BulkDeletePayModelsRequest, BulkDeletePayModelsResponse, BulkPayModelResult, Combinator, CombinatorOptionsOneOf, CombinatorType, CombinatorTypeWithLiterals, CommissionTier, CommissionTierMode, CommissionTierModeWithLiterals, CommonQueryWithEntityContext, ComponentType, ComponentTypeWithLiterals, CostDeduction, CostDeductionKindOneOf, CreatePayModelRequest, CreatePayModelResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeletePayModelRequest, DeletePayModelResponse, DiscountBasis, DiscountBasisWithLiterals, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExtendedFields, ExtraAttendeeTier, FlatPerSessionOptions, GetPayModelRequest, GetPayModelResponse, GreaterOfOptions, HourlyOptions, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, MessageEnvelope, PayComponent, PayComponentOptionsOneOf, PayModelQuerySpec, PayModelsQueryResult, PerCourseOptions, PlanSaleCommissionOptions, ProductCommissionOptions, QueryPayModelsRequest, QueryPayModelsResponse, RestoreInfo, RevenueRules, SalaryOptions, ServiceCommissionOptions, SortOrder, SortOrderWithLiterals, Sorting, TaxBasis, TaxBasisWithLiterals, TipsOptions, UnarchivePayModelRequest, UnarchivePayModelResponse, UpdatePayModelRequest, UpdatePayModelResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.mjs';
|
|
4
4
|
|
|
5
5
|
declare function createPayModel$1(httpClient: HttpClient): CreatePayModelSignature;
|
|
6
6
|
interface CreatePayModelSignature {
|
|
@@ -38,7 +38,7 @@ interface UpdatePayModelSignature {
|
|
|
38
38
|
* lines stay linked to it. Changes apply to staff pays calculated after the update, and the staff pays of the staff
|
|
39
39
|
* members paid with the pay model are marked stale.
|
|
40
40
|
*
|
|
41
|
-
* An archived pay model can't be updated
|
|
41
|
+
* An archived pay model can't be updated.
|
|
42
42
|
* @param - Pay model ID.
|
|
43
43
|
* @returns Updated pay model.
|
|
44
44
|
*/
|
|
@@ -53,8 +53,6 @@ interface DeletePayModelSignature {
|
|
|
53
53
|
*
|
|
54
54
|
* A pay model that any pay terms use, past, current or upcoming, can't be deleted. Archive it instead, with Archive
|
|
55
55
|
* Pay Model.
|
|
56
|
-
*
|
|
57
|
-
* To delete multiple pay models in a single API call, call Bulk Delete Pay Models.
|
|
58
56
|
* @param - ID of the pay model to delete.
|
|
59
57
|
*/
|
|
60
58
|
(payModelId: string): Promise<void & {
|
|
@@ -69,36 +67,11 @@ interface ArchivePayModelSignature {
|
|
|
69
67
|
* Use it for a pay model that's no longer offered but that pay terms used, so it can't be deleted. Pay terms that use
|
|
70
68
|
* the pay model keep it, and it can still be retrieved. An archived pay model can't be updated.
|
|
71
69
|
*
|
|
72
|
-
* Archiving an archived pay model returns it unchanged.
|
|
70
|
+
* Archiving an archived pay model returns it unchanged.
|
|
73
71
|
* @param - ID of the pay model to archive.
|
|
74
72
|
*/
|
|
75
73
|
(payModelId: string): Promise<NonNullablePaths<ArchivePayModelResponse, `payModel.name` | `payModel.components` | `payModel.components.${number}.salaryOptions.amountPerPeriod` | `payModel.components.${number}.salaryOptions.prorateByDaysEmployed` | `payModel.components.${number}.hourlyOptions.rate` | `payModel.components.${number}.hourlyOptions.overtimeEligible` | `payModel.components.${number}.hourlyOptions.excludeSessionTime` | `payModel.components.${number}.flatPerSessionOptions.amount` | `payModel.components.${number}.flatPerSessionOptions.zeroWhenCancelled` | `payModel.components.${number}.basePlusPerHeadOptions.includedAttendees` | `payModel.components.${number}.basePlusPerHeadOptions.amountPerAdditionalAttendee` | `payModel.components.${number}.basePlusPerHeadOptions.countBasis` | `payModel.components.${number}.basePlusPerHeadOptions.zeroWhenCancelled` | `payModel.components.${number}.basePlusPerHeadOptions.excludeFreeVisits` | `payModel.components.${number}.attendanceTiersOptions.countBasis` | `payModel.components.${number}.attendanceTiersOptions.zeroWhenCancelled` | `payModel.components.${number}.attendanceTiersOptions.excludeFreeVisits` | `payModel.components.${number}.serviceCommissionOptions.percent` | `payModel.components.${number}.serviceCommissionOptions.tierMode` | `payModel.components.${number}.serviceCommissionOptions.revenueRules.discountBasis` | `payModel.components.${number}.serviceCommissionOptions.revenueRules.taxBasis` | `payModel.components.${number}.productCommissionOptions.percent` | `payModel.components.${number}.name` | `payModel.components.${number}.type` | `payModel.combinator.greaterOfOptions.componentIds` | `payModel.combinator.type`, 5>>;
|
|
76
74
|
}
|
|
77
|
-
declare function unarchivePayModel$1(httpClient: HttpClient): UnarchivePayModelSignature;
|
|
78
|
-
interface UnarchivePayModelSignature {
|
|
79
|
-
/**
|
|
80
|
-
* Unarchives a pay model. Clears `archivedDate`, so the pay model can be updated and offered again.
|
|
81
|
-
*
|
|
82
|
-
* Unarchiving a pay model that isn't archived returns it unchanged.
|
|
83
|
-
* @param - ID of the pay model to unarchive.
|
|
84
|
-
*/
|
|
85
|
-
(payModelId: string): Promise<NonNullablePaths<UnarchivePayModelResponse, `payModel.name` | `payModel.components` | `payModel.components.${number}.salaryOptions.amountPerPeriod` | `payModel.components.${number}.salaryOptions.prorateByDaysEmployed` | `payModel.components.${number}.hourlyOptions.rate` | `payModel.components.${number}.hourlyOptions.overtimeEligible` | `payModel.components.${number}.hourlyOptions.excludeSessionTime` | `payModel.components.${number}.flatPerSessionOptions.amount` | `payModel.components.${number}.flatPerSessionOptions.zeroWhenCancelled` | `payModel.components.${number}.basePlusPerHeadOptions.includedAttendees` | `payModel.components.${number}.basePlusPerHeadOptions.amountPerAdditionalAttendee` | `payModel.components.${number}.basePlusPerHeadOptions.countBasis` | `payModel.components.${number}.basePlusPerHeadOptions.zeroWhenCancelled` | `payModel.components.${number}.basePlusPerHeadOptions.excludeFreeVisits` | `payModel.components.${number}.attendanceTiersOptions.countBasis` | `payModel.components.${number}.attendanceTiersOptions.zeroWhenCancelled` | `payModel.components.${number}.attendanceTiersOptions.excludeFreeVisits` | `payModel.components.${number}.serviceCommissionOptions.percent` | `payModel.components.${number}.serviceCommissionOptions.tierMode` | `payModel.components.${number}.serviceCommissionOptions.revenueRules.discountBasis` | `payModel.components.${number}.serviceCommissionOptions.revenueRules.taxBasis` | `payModel.components.${number}.productCommissionOptions.percent` | `payModel.components.${number}.name` | `payModel.components.${number}.type` | `payModel.combinator.greaterOfOptions.componentIds` | `payModel.combinator.type`, 5>>;
|
|
86
|
-
}
|
|
87
|
-
declare function bulkDeletePayModels$1(httpClient: HttpClient): BulkDeletePayModelsSignature;
|
|
88
|
-
interface BulkDeletePayModelsSignature {
|
|
89
|
-
/**
|
|
90
|
-
* Deletes multiple pay models.
|
|
91
|
-
*
|
|
92
|
-
* Each pay model is deleted on its own: one that pay terms use isn't deleted and its result fails with
|
|
93
|
-
* `PAY_MODEL_IN_USE`, while the others are still deleted.
|
|
94
|
-
*
|
|
95
|
-
* To delete a single pay model, call Delete Pay Model.
|
|
96
|
-
* @param - IDs of the pay models to delete.
|
|
97
|
-
*/
|
|
98
|
-
(payModelIds: string[]): Promise<NonNullablePaths<BulkDeletePayModelsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4> & {
|
|
99
|
-
__applicationErrorsType?: BulkDeletePayModelsApplicationErrors;
|
|
100
|
-
}>;
|
|
101
|
-
}
|
|
102
75
|
|
|
103
76
|
declare function customQueryPayModels(httpClient: HttpClient): {
|
|
104
77
|
(): PayModelsQueryBuilder;
|
|
@@ -109,8 +82,6 @@ declare const getPayModel: MaybeContext<BuildRESTFunction<typeof getPayModel$1>
|
|
|
109
82
|
declare const updatePayModel: MaybeContext<BuildRESTFunction<typeof updatePayModel$1> & typeof updatePayModel$1>;
|
|
110
83
|
declare const deletePayModel: MaybeContext<BuildRESTFunction<typeof deletePayModel$1> & typeof deletePayModel$1>;
|
|
111
84
|
declare const archivePayModel: MaybeContext<BuildRESTFunction<typeof archivePayModel$1> & typeof archivePayModel$1>;
|
|
112
|
-
declare const unarchivePayModel: MaybeContext<BuildRESTFunction<typeof unarchivePayModel$1> & typeof unarchivePayModel$1>;
|
|
113
|
-
declare const bulkDeletePayModels: MaybeContext<BuildRESTFunction<typeof bulkDeletePayModels$1> & typeof bulkDeletePayModels$1>;
|
|
114
85
|
declare const queryPayModels: MaybeContext<BuildRESTFunction<typeof customQueryPayModels> & typeof customQueryPayModels>;
|
|
115
86
|
|
|
116
|
-
export { ArchivePayModelResponse,
|
|
87
|
+
export { ArchivePayModelResponse, CreatePayModelApplicationErrors, DeletePayModelApplicationErrors, PayModel, PayModelQuery, PayModelsQueryBuilder, UpdatePayModel, UpdatePayModelApplicationErrors, archivePayModel, createPayModel, deletePayModel, getPayModel, queryPayModels, updatePayModel };
|