@scryme/sdk 9.69.0 → 9.71.0
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/dist/{base-CSVOv3Nr.d.mts → base-B5jgRLyM.d.mts} +53 -2
- package/dist/{base-CSVOv3Nr.d.ts → base-B5jgRLyM.d.ts} +53 -2
- package/dist/{chunk-SYGBIPUK.mjs → chunk-Z6VKSRBE.mjs} +96 -1
- package/dist/client.d.mts +56 -6
- package/dist/client.d.ts +56 -6
- package/dist/client.js +66 -1
- package/dist/client.mjs +1 -1
- package/dist/index.d.mts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js +99 -3
- package/dist/index.mjs +5 -3
- package/dist/server.d.mts +36 -2
- package/dist/server.d.ts +36 -2
- package/dist/server.js +64 -1
- package/dist/server.mjs +1 -1
- package/package.json +1 -1
package/dist/server.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
2
|
-
import { G as ProductResponseDto, K as ServiceCatalogResponseDto,
|
|
2
|
+
import { G as ProductResponseDto, K as ServiceCatalogResponseDto, cT as CartItemDto, bc as CartResponseDto, aj as CustomerResponseDto, dV as CustomerSessionDto, ga as RawAPI, d0 as CatalogModule, eA as InventoryModule, fs as OrdersModule, cO as CRMModule, fA as POSModule, bU as AccountingModule, f0 as LoyaltyModule, fl as MembersModule, cm as AdminModule, i7 as WebhooksModule, h0 as ServicesModule, bb as CartControllerGetCartParams, be as AddToCartDto, bf as RemoveFromCartDto, bd as CartControllerClearCartParams, aE as OrderResponseDto, an as UpdateCustomerDto, ao as AddressDto, ak as RegisterCustomerDto, dT as CustomerAuthResponseDto, a5 as CreateBookingDto, gy as ServiceBookingItemDto, h2 as ServicesUpdateBookingStatusBodyStatus, a7 as CompleteBookingDto, af as RequestOtpDto, ag as VerifyOtpDto, ah as PublicBookingDto, cz as AuthModule, s as AuthExchangeToken201 } from './base-B5jgRLyM.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Configuration options for the isolated ScrymeServerSDK.
|
|
@@ -66,6 +66,8 @@ declare class ScrymeServerSDK<TProduct = ProductResponseDto, TService = ServiceC
|
|
|
66
66
|
members: MembersModule;
|
|
67
67
|
/** Global setup parameters, organization definitions, audit trails, and tier limit submodule. */
|
|
68
68
|
admin: AdminModule;
|
|
69
|
+
/** Webhook registration, management, listing, and deletion submodule. */
|
|
70
|
+
webhooks: WebhooksModule;
|
|
69
71
|
/** Scheduling operations, break/shift management, staff schedules, and resource utilization submodule. */
|
|
70
72
|
services: ServicesModule;
|
|
71
73
|
/**
|
|
@@ -182,7 +184,7 @@ declare class ScrymeServerSDK<TProduct = ProductResponseDto, TService = ServiceC
|
|
|
182
184
|
};
|
|
183
185
|
/**
|
|
184
186
|
* Server Bookings & Appointment Submodule.
|
|
185
|
-
* Enables booking creation, history audits, cancellations, and secure completion workflows.
|
|
187
|
+
* Enables booking creation, history audits, cancellations, recurrence series management, public OTP flows, and secure completion workflows.
|
|
186
188
|
*/
|
|
187
189
|
bookings: {
|
|
188
190
|
/**
|
|
@@ -199,17 +201,49 @@ declare class ScrymeServerSDK<TProduct = ProductResponseDto, TService = ServiceC
|
|
|
199
201
|
* Lists the full history of booking reservations inside the organization.
|
|
200
202
|
*/
|
|
201
203
|
list(): Promise<AxiosResponse<ServiceBookingItemDto[]>>;
|
|
204
|
+
/**
|
|
205
|
+
* Updates the status of an active booking reservation.
|
|
206
|
+
* @param id Booking database identifier.
|
|
207
|
+
* @param status Target status enum value (e.g. CONFIRMED, CANCELLED, IN_PROGRESS).
|
|
208
|
+
*/
|
|
209
|
+
updateStatus(id: string, status: ServicesUpdateBookingStatusBodyStatus | string): Promise<AxiosResponse<void>>;
|
|
202
210
|
/**
|
|
203
211
|
* Cancels an active reservation, marking its status as CANCELLED.
|
|
204
212
|
* @param id Booking database identifier.
|
|
205
213
|
*/
|
|
206
214
|
cancel(id: string): Promise<AxiosResponse<void>>;
|
|
215
|
+
/**
|
|
216
|
+
* Cancels an entire recurring booking series by its recurrence ID.
|
|
217
|
+
* @param recurrenceId Recurrence series identifier.
|
|
218
|
+
*/
|
|
219
|
+
cancelSeries(recurrenceId: string): Promise<AxiosResponse<void>>;
|
|
207
220
|
/**
|
|
208
221
|
* Securely completes a booking reservation (including post-service audits and QC reports).
|
|
209
222
|
* @param id Booking database identifier.
|
|
210
223
|
* @param dto Completion data.
|
|
211
224
|
*/
|
|
212
225
|
complete(id: string, dto: CompleteBookingDto & Record<string, any>): Promise<AxiosResponse<void>>;
|
|
226
|
+
/**
|
|
227
|
+
* Calculates available booking slots for a service on a specified date.
|
|
228
|
+
* @param serviceId Service database identifier.
|
|
229
|
+
* @param date Target date string in YYYY-MM-DD format.
|
|
230
|
+
*/
|
|
231
|
+
getAvailability(serviceId: string, date?: string): Promise<AxiosResponse<any>>;
|
|
232
|
+
/**
|
|
233
|
+
* Requests an OTP code for public guest booking flows.
|
|
234
|
+
* @param dto Contact details.
|
|
235
|
+
*/
|
|
236
|
+
requestOtp(dto: RequestOtpDto): Promise<AxiosResponse<any>>;
|
|
237
|
+
/**
|
|
238
|
+
* Verifies an OTP code for public guest booking flows.
|
|
239
|
+
* @param dto OTP code and contact.
|
|
240
|
+
*/
|
|
241
|
+
verifyOtp(dto: VerifyOtpDto): Promise<AxiosResponse<any>>;
|
|
242
|
+
/**
|
|
243
|
+
* Creates a public booking using a verification ID.
|
|
244
|
+
* @param dto Public booking parameters.
|
|
245
|
+
*/
|
|
246
|
+
createPublicBooking(dto: PublicBookingDto): Promise<AxiosResponse<any>>;
|
|
213
247
|
};
|
|
214
248
|
/**
|
|
215
249
|
* Server Authentication & Customer Session Submodule.
|
package/dist/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
2
|
-
import { G as ProductResponseDto, K as ServiceCatalogResponseDto,
|
|
2
|
+
import { G as ProductResponseDto, K as ServiceCatalogResponseDto, cT as CartItemDto, bc as CartResponseDto, aj as CustomerResponseDto, dV as CustomerSessionDto, ga as RawAPI, d0 as CatalogModule, eA as InventoryModule, fs as OrdersModule, cO as CRMModule, fA as POSModule, bU as AccountingModule, f0 as LoyaltyModule, fl as MembersModule, cm as AdminModule, i7 as WebhooksModule, h0 as ServicesModule, bb as CartControllerGetCartParams, be as AddToCartDto, bf as RemoveFromCartDto, bd as CartControllerClearCartParams, aE as OrderResponseDto, an as UpdateCustomerDto, ao as AddressDto, ak as RegisterCustomerDto, dT as CustomerAuthResponseDto, a5 as CreateBookingDto, gy as ServiceBookingItemDto, h2 as ServicesUpdateBookingStatusBodyStatus, a7 as CompleteBookingDto, af as RequestOtpDto, ag as VerifyOtpDto, ah as PublicBookingDto, cz as AuthModule, s as AuthExchangeToken201 } from './base-B5jgRLyM.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Configuration options for the isolated ScrymeServerSDK.
|
|
@@ -66,6 +66,8 @@ declare class ScrymeServerSDK<TProduct = ProductResponseDto, TService = ServiceC
|
|
|
66
66
|
members: MembersModule;
|
|
67
67
|
/** Global setup parameters, organization definitions, audit trails, and tier limit submodule. */
|
|
68
68
|
admin: AdminModule;
|
|
69
|
+
/** Webhook registration, management, listing, and deletion submodule. */
|
|
70
|
+
webhooks: WebhooksModule;
|
|
69
71
|
/** Scheduling operations, break/shift management, staff schedules, and resource utilization submodule. */
|
|
70
72
|
services: ServicesModule;
|
|
71
73
|
/**
|
|
@@ -182,7 +184,7 @@ declare class ScrymeServerSDK<TProduct = ProductResponseDto, TService = ServiceC
|
|
|
182
184
|
};
|
|
183
185
|
/**
|
|
184
186
|
* Server Bookings & Appointment Submodule.
|
|
185
|
-
* Enables booking creation, history audits, cancellations, and secure completion workflows.
|
|
187
|
+
* Enables booking creation, history audits, cancellations, recurrence series management, public OTP flows, and secure completion workflows.
|
|
186
188
|
*/
|
|
187
189
|
bookings: {
|
|
188
190
|
/**
|
|
@@ -199,17 +201,49 @@ declare class ScrymeServerSDK<TProduct = ProductResponseDto, TService = ServiceC
|
|
|
199
201
|
* Lists the full history of booking reservations inside the organization.
|
|
200
202
|
*/
|
|
201
203
|
list(): Promise<AxiosResponse<ServiceBookingItemDto[]>>;
|
|
204
|
+
/**
|
|
205
|
+
* Updates the status of an active booking reservation.
|
|
206
|
+
* @param id Booking database identifier.
|
|
207
|
+
* @param status Target status enum value (e.g. CONFIRMED, CANCELLED, IN_PROGRESS).
|
|
208
|
+
*/
|
|
209
|
+
updateStatus(id: string, status: ServicesUpdateBookingStatusBodyStatus | string): Promise<AxiosResponse<void>>;
|
|
202
210
|
/**
|
|
203
211
|
* Cancels an active reservation, marking its status as CANCELLED.
|
|
204
212
|
* @param id Booking database identifier.
|
|
205
213
|
*/
|
|
206
214
|
cancel(id: string): Promise<AxiosResponse<void>>;
|
|
215
|
+
/**
|
|
216
|
+
* Cancels an entire recurring booking series by its recurrence ID.
|
|
217
|
+
* @param recurrenceId Recurrence series identifier.
|
|
218
|
+
*/
|
|
219
|
+
cancelSeries(recurrenceId: string): Promise<AxiosResponse<void>>;
|
|
207
220
|
/**
|
|
208
221
|
* Securely completes a booking reservation (including post-service audits and QC reports).
|
|
209
222
|
* @param id Booking database identifier.
|
|
210
223
|
* @param dto Completion data.
|
|
211
224
|
*/
|
|
212
225
|
complete(id: string, dto: CompleteBookingDto & Record<string, any>): Promise<AxiosResponse<void>>;
|
|
226
|
+
/**
|
|
227
|
+
* Calculates available booking slots for a service on a specified date.
|
|
228
|
+
* @param serviceId Service database identifier.
|
|
229
|
+
* @param date Target date string in YYYY-MM-DD format.
|
|
230
|
+
*/
|
|
231
|
+
getAvailability(serviceId: string, date?: string): Promise<AxiosResponse<any>>;
|
|
232
|
+
/**
|
|
233
|
+
* Requests an OTP code for public guest booking flows.
|
|
234
|
+
* @param dto Contact details.
|
|
235
|
+
*/
|
|
236
|
+
requestOtp(dto: RequestOtpDto): Promise<AxiosResponse<any>>;
|
|
237
|
+
/**
|
|
238
|
+
* Verifies an OTP code for public guest booking flows.
|
|
239
|
+
* @param dto OTP code and contact.
|
|
240
|
+
*/
|
|
241
|
+
verifyOtp(dto: VerifyOtpDto): Promise<AxiosResponse<any>>;
|
|
242
|
+
/**
|
|
243
|
+
* Creates a public booking using a verification ID.
|
|
244
|
+
* @param dto Public booking parameters.
|
|
245
|
+
*/
|
|
246
|
+
createPublicBooking(dto: PublicBookingDto): Promise<AxiosResponse<any>>;
|
|
213
247
|
};
|
|
214
248
|
/**
|
|
215
249
|
* Server Authentication & Customer Session Submodule.
|
package/dist/server.js
CHANGED
|
@@ -785,6 +785,15 @@ var getScrymeV3API = (axiosInstance = import_axios.default) => {
|
|
|
785
785
|
options
|
|
786
786
|
);
|
|
787
787
|
};
|
|
788
|
+
const servicesGetAvailability = (orgSlug, id, params, options) => {
|
|
789
|
+
return axiosInstance.get(
|
|
790
|
+
`/v3/${orgSlug}/services/${id}/availability`,
|
|
791
|
+
{
|
|
792
|
+
...options,
|
|
793
|
+
params: { ...params, ...options?.params }
|
|
794
|
+
}
|
|
795
|
+
);
|
|
796
|
+
};
|
|
788
797
|
const servicesDeleteService = (orgSlug, id, options) => {
|
|
789
798
|
return axiosInstance.post(
|
|
790
799
|
`/v3/${orgSlug}/services/${id}/delete`,
|
|
@@ -852,6 +861,13 @@ var getScrymeV3API = (axiosInstance = import_axios.default) => {
|
|
|
852
861
|
options
|
|
853
862
|
);
|
|
854
863
|
};
|
|
864
|
+
const servicesCancelBookingSeries = (orgSlug, recurrenceId, options) => {
|
|
865
|
+
return axiosInstance.post(
|
|
866
|
+
`/v3/${orgSlug}/services/bookings/recurrence/${recurrenceId}/cancel`,
|
|
867
|
+
void 0,
|
|
868
|
+
options
|
|
869
|
+
);
|
|
870
|
+
};
|
|
855
871
|
const servicesCreateShift = (orgSlug, memberId, servicesCreateShiftBody, options) => {
|
|
856
872
|
return axiosInstance.post(
|
|
857
873
|
`/v3/${orgSlug}/services/staff/${memberId}/shifts`,
|
|
@@ -1929,7 +1945,14 @@ var getScrymeV3API = (axiosInstance = import_axios.default) => {
|
|
|
1929
1945
|
}
|
|
1930
1946
|
);
|
|
1931
1947
|
};
|
|
1932
|
-
|
|
1948
|
+
const paymentsCheckout = (orgSlug, checkoutDto, options) => {
|
|
1949
|
+
return axiosInstance.post(
|
|
1950
|
+
`/v3/${orgSlug}/payments/checkout`,
|
|
1951
|
+
checkoutDto,
|
|
1952
|
+
options
|
|
1953
|
+
);
|
|
1954
|
+
};
|
|
1955
|
+
return { inventoryVerifyIntegrity, inventoryFixIntegrity, inventoryGetInventory, inventoryTraceBatch, inventorySplitBatch, inventoryMergeBatches, inventoryCreateAssembly, inventoryCompleteAssembly, inventoryRequestAdjustment, inventoryGetAdjustments, inventoryApproveAdjustment, inventoryRejectAdjustment, inventoryGetLeadTime, inventoryGetWasteAnalysis, inventoryCheckB2BAvailability, inventoryUnpackBatch, inventoryScanUnpackBatch, inventoryQuickStockInquiry, expenseControllerCreateExpense, expenseControllerGetExpenses, expenseControllerGetExpenseCategories, expenseControllerGetExpense, pettyCashControllerCreateFund, pettyCashControllerGetFunds, pettyCashControllerGetFund, pettyCashControllerTopUpFund, pettyCashControllerGetFundTransactions, utilityAccountControllerCreateAccount, utilityAccountControllerGetAccounts, utilityAccountControllerGetAccount, accountingInitialize, accountingGetProfitLoss, accountingGetBalanceSheet, accountingGetCashFlow, accountingGetTaxSummary, invoiceControllerCreateInvoice, invoiceControllerGetInvoices, invoiceControllerGetInvoice, invoiceControllerUpdateInvoice, invoiceControllerDeleteInvoice, invoiceControllerFinalizeInvoice, invoiceControllerGetTemplates, invoiceControllerCreateTemplate, invoiceControllerGetConfig, invoiceControllerUpdateConfig, publicInvoiceControllerDownloadInvoice, publicInvoiceControllerDownloadInvoiceByTransaction, publicInvoiceControllerDownloadReceipt, publicInvoiceControllerGeneratePublicLink, authExchangeToken, authControllerHandleOAuth2, adminControllerGetStats, adminControllerListOrganizations, adminControllerCreateOrganization, adminControllerGetOrganizationDetails, adminControllerUpdateOrganization, adminControllerDeleteOrganization, adminControllerListMembers, adminControllerListUsers, adminControllerBanUser, adminControllerUnbanUser, adminControllerListConnectedApps, adminControllerListSystemLogs, adminControllerListGlobalSettings, adminControllerSetGlobalSetting, adminControllerDeleteGlobalSetting, adminControllerListTiers, adminControllerDefineTier, adminControllerDeleteTier, adminControllerGetOrganizationSubscription, adminControllerUpdateOrganizationSubscription, adminControllerListSystemPayments, adminControllerRecordCustomPayment, adminControllerListIntegrationDefinitions, adminControllerCreateIntegrationDefinition, adminControllerUpdateIntegrationDefinition, adminControllerDeleteIntegrationDefinition, adminControllerListActiveOrganizationIntegrations, webhooksCreate, webhooksList, webhooksDelete, windmillCallbackControllerHandleCallback, windmillCallbackControllerHandleApprovalCallback, windmillCallbackControllerHandleBakeryDisposalCallback, windmillCallbackControllerHandleOutcomeCallback, catalogGetProducts, catalogCreateProduct, catalogGetProduct, catalogGetServices, catalogUpdateProduct, catalogUpdateSupplierVariant, catalogGetPriceChangeRequests, catalogReviewPriceChangeRequest, catalogCreateReview, catalogUpdateReview, catalogDeleteReview, servicesCreateCategory, servicesGetCategories, servicesUpdateCategory, servicesDeleteCategory, servicesCreateService, servicesGetServices, servicesGetCurrentMemberShifts, servicesGetShifts, servicesGetService, servicesUpdateService, servicesGetAvailability, servicesDeleteService, servicesCreateResource, servicesGetResources, servicesUpdateResource, servicesDeleteResource, servicesCreateBooking, servicesGetBookings, servicesGetBooking, servicesUpdateBookingStatus, servicesCompleteBooking, servicesCancelBookingSeries, servicesCreateShift, servicesGetStaffShifts, servicesAddBreak, servicesRegisterCustomerApp, servicesGetUtilization, servicesGetPerformance, servicesGetFunnel, publicServicesListServices, publicServicesGetCategories, publicServicesGetService, publicServicesGetAvailability, publicServicesRequestOtp, publicServicesVerifyOtp, publicServicesCreatePublicBooking, customersGetCustomers, customersRegister, customerRegister, customersLogin, customersRefreshSession, customersGetCurrentSession, customersGetSessions, customersRevokeAllSessions, customersRevokeSession, customersUpdate, customersGetCustomerById, customersDelete, customersGetAddresses, customersAddAddress, businessAccountControllerCreate, businessAccountControllerGetOne, crmControllerCreateRecord, crmControllerGetRecord, crmControllerUpdateRecord, crmControllerCreateNote, crmControllerGetRecordNotes, crmControllerCreateActivity, crmControllerGetTimeline, crmControllerCreateObject, crmControllerListObjects, crmControllerCreateField, crmControllerListFields, crmControllerCreateRelationship, crmControllerListRelationships, crmControllerCreateAssociation, crmControllerListRecordAssociations, loyaltyRedeemReward, loyaltyGetCustomerStatus, loyaltyValidateVoucher, ordersCreateOrder, ordersGetOrders, ordersUpdateStatus, ordersRequestB2BQuote, ordersConvertQuoteToOrder, paymentsControllerHandleStkCallback, pOSProvision, pOSLogin, pOSGetMe, pOSProcessSale, pOSSync, pOSGetTransactions, pOSRegisterPettyCash, pOSGetPettyCashFunds, pOSGetPettyCashTransactions, membersControllerGetMembers, membersControllerCreateMember, membersControllerGetMember, membersControllerUpdateMember, membersControllerDeleteMember, membersControllerGetMemberActivity, membersControllerUpdateStatus, membersControllerAdminCheckOut, terminalMembersControllerLogin, invitationsList, invitationsCreate, invitationsRevoke, invitationsAccept, roleManagementControllerGetCustomRoles, roleManagementControllerCreateCustomRole, roleManagementControllerUpdateCustomRole, roleManagementControllerDeleteCustomRole, roleManagementControllerGetPermissionSets, roleManagementControllerCreatePermissionSet, roleManagementControllerGetRoleGroups, roleManagementControllerCreateRoleGroup, roleManagementControllerAssignRoles, roleManagementControllerRemoveRoles, departmentsList, departmentsCreate, departmentsGet, departmentsUpdate, departmentsDelete, departmentsAddMember, departmentsRemoveMember, attendanceControllerGetLogs, attendanceControllerCheckIn, attendanceControllerCheckOut, attendanceControllerGetMyStatus, attendanceControllerGetStatus, announcementControllerBroadcastAnnouncement, cartControllerGetCart, cartControllerClearCart, cartControllerAddToCart, cartControllerRemoveFromCart, favoritesControllerGetFavorites, favoritesControllerAddFavorite, favoritesControllerRemoveFavorite, stockingGetPurchases, stockingCreatePurchase, stockingReceivePurchase, stockingGetTransfers, stockingCreateTransfer, stockingShipTransfer, stockingReceiveTransfer, stockingGetRequests, stockingGetPendingDispatch, stockingDispatchOrders, stockingGetActiveDeliveries, stockingReconcilePod, stockingGetPhysicalReconciliations, stockingSubmitPhysicalReconciliation, stockingGetReconciliationReport, stockingGetPartners, stockingCreatePartner, stockingGetPartner, stockingUpdatePartner, stockingAdjustPartnerWallet, standalonePosControllerCreateSetupKey, standalonePosControllerActivateDevice, standalonePosControllerValidateKey, standalonePosControllerLinkOrganization, b2BGetCatalog, b2BGetInvoices, b2BGetOrders, b2BCreateOrder, b2BCreateQuote, crmIntegrationsGetAuthUrl, crmIntegrationsHandleCallback, crmIntegrationsHandleWebhook, crmIntegrationsReplyToActivity, unitsGetUnits, strapiCreateConnection, strapiListConnections, strapiGetConnection, strapiUpdateConnection, strapiDeleteConnection, strapiTriggerSync, strapiEnqueueSync, strapiGetWebhookLogs, strapiGetSyncLogs, strapiExchangeCustomerToken, strapiRegisterCustomer, strapiReceiveWebhook, analyticsControllerGetDashboardAnalytics, analyticsControllerGetResourceUtilization, paymentsCheckout };
|
|
1933
1956
|
};
|
|
1934
1957
|
|
|
1935
1958
|
// src/base.ts
|
|
@@ -1967,6 +1990,7 @@ var methodsWithOrgSlugSet = /* @__PURE__ */ new Set([
|
|
|
1967
1990
|
"webhooksCreate",
|
|
1968
1991
|
"webhooksList",
|
|
1969
1992
|
"webhooksDelete",
|
|
1993
|
+
"paymentsCheckout",
|
|
1970
1994
|
"catalogGetProducts",
|
|
1971
1995
|
"catalogGetProduct",
|
|
1972
1996
|
"catalogCreateProduct",
|
|
@@ -1996,8 +2020,10 @@ var methodsWithOrgSlugSet = /* @__PURE__ */ new Set([
|
|
|
1996
2020
|
"servicesCreateBooking",
|
|
1997
2021
|
"servicesGetBookings",
|
|
1998
2022
|
"servicesGetBooking",
|
|
2023
|
+
"servicesGetAvailability",
|
|
1999
2024
|
"servicesUpdateBookingStatus",
|
|
2000
2025
|
"servicesCompleteBooking",
|
|
2026
|
+
"servicesCancelBookingSeries",
|
|
2001
2027
|
"servicesCreateShift",
|
|
2002
2028
|
"servicesGetStaffShifts",
|
|
2003
2029
|
"servicesAddBreak",
|
|
@@ -2183,8 +2209,14 @@ var ordersMapping = {
|
|
|
2183
2209
|
clearCart: "cartControllerClearCart",
|
|
2184
2210
|
addToCart: "cartControllerAddToCart",
|
|
2185
2211
|
removeFromCart: "cartControllerRemoveFromCart",
|
|
2212
|
+
checkout: "paymentsCheckout",
|
|
2186
2213
|
handleStkCallback: "paymentsControllerHandleStkCallback"
|
|
2187
2214
|
};
|
|
2215
|
+
var webhooksMapping = {
|
|
2216
|
+
create: "webhooksCreate",
|
|
2217
|
+
list: "webhooksList",
|
|
2218
|
+
delete: "webhooksDelete"
|
|
2219
|
+
};
|
|
2188
2220
|
var crmMapping = {
|
|
2189
2221
|
createRecord: "crmControllerCreateRecord",
|
|
2190
2222
|
getRecord: "crmControllerGetRecord",
|
|
@@ -2342,8 +2374,10 @@ var servicesMapping = {
|
|
|
2342
2374
|
createBookingAdmin: "servicesCreateBooking",
|
|
2343
2375
|
getBookings: "servicesGetBookings",
|
|
2344
2376
|
getBookingAdmin: "servicesGetBooking",
|
|
2377
|
+
getAvailabilityAdmin: "servicesGetAvailability",
|
|
2345
2378
|
updateBookingStatus: "servicesUpdateBookingStatus",
|
|
2346
2379
|
completeBooking: "servicesCompleteBooking",
|
|
2380
|
+
cancelBookingSeries: "servicesCancelBookingSeries",
|
|
2347
2381
|
createShift: "servicesCreateShift",
|
|
2348
2382
|
getStaffShifts: "servicesGetStaffShifts",
|
|
2349
2383
|
addBreak: "servicesAddBreak",
|
|
@@ -2681,6 +2715,7 @@ var ScrymeServerSDK = class {
|
|
|
2681
2715
|
this.loyalty = buildModule(this.api, config.orgSlug, loyaltyMapping);
|
|
2682
2716
|
this.members = buildModule(this.api, config.orgSlug, membersMapping);
|
|
2683
2717
|
this.admin = buildModule(this.api, config.orgSlug, adminMapping);
|
|
2718
|
+
this.webhooks = buildModule(this.api, config.orgSlug, webhooksMapping);
|
|
2684
2719
|
this.services = buildModule(this.api, config.orgSlug, servicesMapping);
|
|
2685
2720
|
this.cart = {
|
|
2686
2721
|
get: async (params) => {
|
|
@@ -2763,6 +2798,16 @@ var ScrymeServerSDK = class {
|
|
|
2763
2798
|
};
|
|
2764
2799
|
},
|
|
2765
2800
|
checkout: async (params) => {
|
|
2801
|
+
if (params.phoneNumber) {
|
|
2802
|
+
const res = await this.orders.checkout({
|
|
2803
|
+
cartId: params.cartId,
|
|
2804
|
+
sessionId: params.sessionId,
|
|
2805
|
+
phoneNumber: params.phoneNumber,
|
|
2806
|
+
locationId: params.locationId,
|
|
2807
|
+
notes: params.notes
|
|
2808
|
+
});
|
|
2809
|
+
return res?.data || res;
|
|
2810
|
+
}
|
|
2766
2811
|
if (!params.customerId)
|
|
2767
2812
|
throw new Error("customerId is required for server checkout.");
|
|
2768
2813
|
const items = await this.cart.getItems({
|
|
@@ -2881,11 +2926,29 @@ var ScrymeServerSDK = class {
|
|
|
2881
2926
|
list: async () => {
|
|
2882
2927
|
return this.catalog.getBookings();
|
|
2883
2928
|
},
|
|
2929
|
+
updateStatus: async (id, status) => {
|
|
2930
|
+
return this.catalog.updateBookingStatus(id, status);
|
|
2931
|
+
},
|
|
2884
2932
|
cancel: async (id) => {
|
|
2885
2933
|
return this.catalog.updateBookingStatus(id, "CANCELLED");
|
|
2886
2934
|
},
|
|
2935
|
+
cancelSeries: async (recurrenceId) => {
|
|
2936
|
+
return this.api.servicesCancelBookingSeries(config.orgSlug, recurrenceId);
|
|
2937
|
+
},
|
|
2887
2938
|
complete: async (id, dto) => {
|
|
2888
2939
|
return this.catalog.completeBooking(id, dto);
|
|
2940
|
+
},
|
|
2941
|
+
getAvailability: async (serviceId, date) => {
|
|
2942
|
+
return this.api.publicServicesGetAvailability(config.orgSlug, serviceId, date ? { date } : void 0);
|
|
2943
|
+
},
|
|
2944
|
+
requestOtp: async (dto) => {
|
|
2945
|
+
return this.api.publicServicesRequestOtp(config.orgSlug, dto);
|
|
2946
|
+
},
|
|
2947
|
+
verifyOtp: async (dto) => {
|
|
2948
|
+
return this.api.publicServicesVerifyOtp(config.orgSlug, dto);
|
|
2949
|
+
},
|
|
2950
|
+
createPublicBooking: async (dto) => {
|
|
2951
|
+
return this.api.publicServicesCreatePublicBooking(config.orgSlug, dto);
|
|
2889
2952
|
}
|
|
2890
2953
|
};
|
|
2891
2954
|
const baseAuth = buildModule(this.api, config.orgSlug, authMapping);
|
package/dist/server.mjs
CHANGED