@dv4resi/dvss-backend-module-offering-im 0.0.7 → 0.0.8

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/index.d.ts CHANGED
@@ -1,5 +1,11 @@
1
- import { LoggerService } from '@dv4resi/dvss-backend-module-utility';
1
+ import { CONFIGURED_FOR_TYPE_ENUM, MEDIA_PROVIDER_ENUM, DAY_OF_WEEK, OFFERING_RESOURCE_TYPE, STATUS } from '@dv4resi/dvss-backend-module-datastore/dist/datastore/models';
2
+ import { LoggerService, GraphQLContext, AddAPIResponse } from '@dv4resi/dvss-backend-module-utility';
2
3
  import { HttpService } from '@nestjs/axios';
4
+ import { schema, CommonValidationDatabaseService as CommonValidationDatabaseService$1 } from '@dv4resi/dvss-backend-module-datastore';
5
+ import { ICapability } from '@dv4resi/dvss-backend-module-datastore/dist/datastore/models/capability.model';
6
+ import { MySql2Database } from 'drizzle-orm/mysql2';
7
+ import { CAPABILITY_INTEGRATION_STATUS_ENUM, CAPABILITY_RESOURCE_AVAILABLE_FOR_ENUM } from '@dv4resi/dvss-backend-module-datastore/dist/datastore/models/capability-integration.model';
8
+ import { CommonValidationDatabaseService } from '@dv4resi/dvss-backend-module-datastore/dist/datastore/util/common-validation.util';
3
9
 
4
10
  declare class AppModule$2 {
5
11
  }
@@ -41,17 +47,77 @@ declare class IntegrationRequestLoggerService {
41
47
  logResponse(logData: IIntegrationRequestLog): void;
42
48
  logError(logData: IIntegrationRequestLog): void;
43
49
  logIntegrationRequest(logData: IIntegrationRequestLog): void;
44
- private sanitizeHeaders;
45
50
  }
46
51
 
47
52
  declare class RateLimiterService {
48
53
  validateAndEnforceRateLimit(): Promise<void>;
49
54
  }
50
55
 
56
+ type IAddCapabilityIntegration = typeof schema.capabilityIntegration.$inferInsert & {
57
+ configuredFor?: {
58
+ configuredForId: bigint;
59
+ configuredForType: CONFIGURED_FOR_TYPE_ENUM;
60
+ };
61
+ };
62
+ type IUpdateCapabilityIntegration = Partial<typeof schema.capabilityIntegration.$inferInsert>;
63
+ type IAddCapIntegResourceMapping = typeof schema.capIntegResourceMapping.$inferInsert;
64
+
65
+ declare class IntegrationConfigurationDao {
66
+ private readonly conn;
67
+ private readonly logger;
68
+ private readonly fileName;
69
+ constructor(conn: MySql2Database<typeof schema>, logger: LoggerService);
70
+ addCapabilityIntegration(input: IAddCapabilityIntegration, loggedInUserId: bigint): Promise<{
71
+ id: bigint;
72
+ } | undefined>;
73
+ getCapability(request: {
74
+ capabilityId: bigint;
75
+ }, loggedInUserId: bigint): Promise<ICapability | undefined>;
76
+ getCapabilityProvider(request: {
77
+ capabilityProviderId: bigint;
78
+ }, loggedInUserId: bigint): Promise<typeof schema.capabilityProvider.$inferSelect | undefined>;
79
+ updateCapabilityIntegration(input: {
80
+ id: bigint;
81
+ updateData: IUpdateCapabilityIntegration;
82
+ }, loggedInUserId: bigint): Promise<{
83
+ status: boolean;
84
+ }>;
85
+ getCapabilityIntegration(input: {
86
+ capabilityIntegrationId: bigint;
87
+ }, loggedInUserId: bigint): Promise<typeof schema.capabilityIntegration.$inferSelect | undefined>;
88
+ }
89
+
90
+ declare class IntegrationUserManagementDao {
91
+ protected readonly conn: MySql2Database<typeof schema>;
92
+ constructor(conn: MySql2Database<typeof schema>);
93
+ }
94
+
51
95
  interface IGetCustomerRequest {
52
96
  email?: string;
53
97
  customerId?: string;
54
98
  }
99
+ interface IAddCustomerRequest {
100
+ site_id: string;
101
+ first_name?: string | null;
102
+ last_name?: string | null;
103
+ phone?: string | null;
104
+ dob?: string | null;
105
+ email?: string | null;
106
+ password?: string;
107
+ marketing_preference_ids?: string[];
108
+ external_ref?: string | null;
109
+ guestline_ref?: string;
110
+ preferred_locale?: string;
111
+ }
112
+ interface IUpdateCustomerRequest {
113
+ first_name?: string | null;
114
+ last_name?: string | null;
115
+ phone?: string | null;
116
+ dob?: string | null;
117
+ password?: string;
118
+ external_ref?: string | null;
119
+ preferred_locale?: string;
120
+ }
55
121
  interface ICustomer {
56
122
  id: string;
57
123
  first_name: string;
@@ -79,6 +145,10 @@ interface ICustomerLastCheckIn {
79
145
  checked_in_at: string;
80
146
  method: string;
81
147
  }
148
+ interface IAddUpdateCustomerResponseData {
149
+ id: string;
150
+ status: string;
151
+ }
82
152
 
83
153
  declare enum CREDIT_TYPE_ENUM {
84
154
  COUPON = "COUPON",
@@ -163,6 +233,35 @@ interface IValidatedCapabilityIntegration {
163
233
  projectId?: number;
164
234
  }
165
235
 
236
+ interface IAddCapabilityIntegrationConfig {
237
+ platformConfig: Record<string, unknown>;
238
+ integrationConfig: Record<string, unknown>;
239
+ }
240
+ interface IIcon {
241
+ provider: MEDIA_PROVIDER_ENUM;
242
+ meta: unknown;
243
+ }
244
+ interface IAddCapabilityIntegrationConfiguredFor {
245
+ configuredForId: bigint;
246
+ configuredForType: CONFIGURED_FOR_TYPE_ENUM;
247
+ }
248
+ interface IAddCapabilityIntegrationInput {
249
+ projectId: number;
250
+ propertyId?: number;
251
+ capabilityId: bigint;
252
+ capabilityProviderId: bigint;
253
+ config?: Record<string, unknown>;
254
+ nickname?: string;
255
+ subcategory?: string;
256
+ parentId?: bigint;
257
+ capabilityIntegrationResourceId?: bigint;
258
+ groupId?: bigint;
259
+ status: CAPABILITY_INTEGRATION_STATUS_ENUM;
260
+ icon?: IIcon;
261
+ availableFor: CAPABILITY_RESOURCE_AVAILABLE_FOR_ENUM;
262
+ configuredFor?: IAddCapabilityIntegrationConfiguredFor;
263
+ }
264
+
166
265
  declare enum BOOKABLE_ITEM_TYPE_ENUM {
167
266
  APPOINTMENT = "APPOINTMENT",
168
267
  SESSION = "SESSION",
@@ -172,15 +271,6 @@ declare enum BOOKABLE_ITEM_STATUS_ENUM {
172
271
  ACTIVE = "ACTIVE",
173
272
  INACTIVE = "INACTIVE"
174
273
  }
175
- declare enum DAY_OF_WEEK {
176
- MON = "MON",
177
- TUE = "TUE",
178
- WED = "WED",
179
- THU = "THU",
180
- FRI = "FRI",
181
- SAT = "SAT",
182
- SUN = "SUN"
183
- }
184
274
  interface IBookableItemPriceMeta {
185
275
  id?: bigint;
186
276
  externalId?: string;
@@ -215,7 +305,7 @@ interface IBookableItem {
215
305
  name: string;
216
306
  description?: string;
217
307
  type: BOOKABLE_ITEM_TYPE_ENUM;
218
- status: BOOKABLE_ITEM_STATUS_ENUM;
308
+ status?: BOOKABLE_ITEM_STATUS_ENUM;
219
309
  icon?: IBookableItemMedia;
220
310
  primaryAsset?: IBookableItemMedia;
221
311
  prices?: IBookableItemPrice[];
@@ -275,6 +365,102 @@ interface IAvailableDateWithSlots {
275
365
  interface IGetAvailableDatesAndTimeSlotsResponse {
276
366
  dates: IAvailableDateWithSlots[];
277
367
  }
368
+ interface IOrderGuest {
369
+ id: string;
370
+ name?: string;
371
+ }
372
+ interface IGetOrderResponse {
373
+ orderId: string;
374
+ guests: IOrderGuest[];
375
+ }
376
+ interface ICreateOrderRequest {
377
+ bookingStartTime: Date;
378
+ durationInMinutes?: number;
379
+ meta?: Record<string, unknown>;
380
+ bookableItems: Pick<IBookableItem, 'externalId' | 'type'>[];
381
+ offeringResources: Pick<IOfferingResource, 'externalId'>[];
382
+ currencyMultiplier: number;
383
+ customerId: string;
384
+ customerCreditId?: string;
385
+ }
386
+ interface ICreateOrderResponse {
387
+ externalBookingId: string;
388
+ items: (IBookableItem & {
389
+ totalPrice?: number;
390
+ })[];
391
+ }
392
+ interface IAddItemToOrderItemConfig {
393
+ offeringId: string;
394
+ offeringType: BOOKABLE_ITEM_TYPE_ENUM;
395
+ guestIds: string[];
396
+ practitionerIds: string[];
397
+ durationMinutes?: number;
398
+ timeIso?: string;
399
+ sessionId?: string;
400
+ }
401
+ interface IAddItemToOrderRequest {
402
+ orderId: string;
403
+ item: IAddItemToOrderItemConfig;
404
+ }
405
+ interface IAddItemToOrderResponse {
406
+ name?: string;
407
+ netTotal?: number;
408
+ }
409
+ interface IAddPaymentToOrderRequest {
410
+ orderId: string;
411
+ amount: number;
412
+ paymentTypeId: string;
413
+ }
414
+ interface IOfferingResourceMedia {
415
+ meta?: Record<string, unknown>;
416
+ provider?: string;
417
+ }
418
+ interface IOfferingResource {
419
+ id?: bigint;
420
+ externalId: string;
421
+ name: string;
422
+ description?: string;
423
+ type: OFFERING_RESOURCE_TYPE;
424
+ status: STATUS;
425
+ media?: IOfferingResourceMedia;
426
+ meta?: Record<string, unknown>;
427
+ bookableItems?: unknown[];
428
+ createdAt?: Date;
429
+ createdBy?: bigint;
430
+ deletedAt?: Date;
431
+ deletedBy?: bigint;
432
+ isCurrentlyUnavailable?: boolean;
433
+ occurrences?: unknown[];
434
+ offeringId?: bigint;
435
+ priceSummary?: string;
436
+ projectId?: number;
437
+ quantity?: number;
438
+ unavailability?: unknown[];
439
+ updatedAt?: Date;
440
+ updatedBy?: bigint;
441
+ }
442
+ interface IGetPractitionersRequest {
443
+ shouldFetchAllPractitioners: boolean;
444
+ options?: IWellnessManagementRequestOptions;
445
+ }
446
+ interface IUpdateOrderRequest {
447
+ orderId: string;
448
+ timezone: string;
449
+ item: {
450
+ externalId: string;
451
+ type: BOOKABLE_ITEM_TYPE_ENUM;
452
+ };
453
+ sessionId?: string;
454
+ durationInMinutes?: number;
455
+ bookingStartDateLabel?: string;
456
+ bookingStartTimeLabel?: string;
457
+ }
458
+ interface IUpdateOrderResponse {
459
+ success: boolean;
460
+ data?: {
461
+ id: string;
462
+ };
463
+ }
278
464
 
279
465
  interface ISystemResponse<T> {
280
466
  totalCount: number;
@@ -323,7 +509,11 @@ declare abstract class BaseWellnessManagement {
323
509
  abstract fetchBookableItemsFromCredit(request: IGetBookableItemsFromCreditRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ISystemResponse<IBookableItem>>;
324
510
  abstract fetchSessionAvailabilityForOffering(request: IFetchOfferingAvailabilityRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<IGetAvailableDatesAndTimeSlotsResponse>;
325
511
  abstract fetchAppointmentAvailabilityForOffering(request: IFetchOfferingAvailabilityRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<IGetAvailableDatesAndTimeSlotsResponse>;
326
- abstract fetchPractitioners(): Promise<void>;
512
+ abstract fetchPractitioners(request: IGetPractitionersRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ISystemResponse<IOfferingResource>>;
513
+ abstract createOrder(request: ICreateOrderRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ICreateOrderResponse>;
514
+ abstract getOrder(orderId: string, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<IGetOrderResponse>;
515
+ abstract cancelOrder(orderId: string, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<void>;
516
+ abstract updateOrder(request: IUpdateOrderRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<IUpdateOrderResponse>;
327
517
  abstract fetchWellnessAppointmentSession(): Promise<void>;
328
518
  abstract checkWellnessAppointmentSessionAvailability(): Promise<void>;
329
519
  abstract createWellnessAppointmentSessionOrder(): Promise<void>;
@@ -336,9 +526,9 @@ declare abstract class BaseCreditBooking {
336
526
  }
337
527
 
338
528
  declare abstract class BaseCustomerManagement {
339
- abstract createCustomer(): Promise<void>;
529
+ abstract createCustomer(request: IAddCustomerRequest, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<ICustomer>;
340
530
  abstract searchCustomer(request: IGetCustomerRequest, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<ICustomer | undefined>;
341
- abstract updateCustomer(): Promise<void>;
531
+ abstract updateCustomer(customerId: string, request: IUpdateCustomerRequest, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<IAddUpdateCustomerResponseData>;
342
532
  }
343
533
 
344
534
  declare abstract class BasePackageManagement {
@@ -418,6 +608,17 @@ declare abstract class BaseMembershipManagement {
418
608
  abstract getMembership(): Promise<void>;
419
609
  }
420
610
 
611
+ declare abstract class BaseIntegrationConfiguration {
612
+ private readonly integrationConfigurationDao;
613
+ protected readonly commonValidationDatabaseService: CommonValidationDatabaseService;
614
+ constructor(integrationConfigurationDao: IntegrationConfigurationDao, commonValidationDatabaseService: CommonValidationDatabaseService);
615
+ private validateAddCapabilityIntegrationInput;
616
+ addCapabilityIntegration(input: IAddCapabilityIntegrationInput, context: GraphQLContext): Promise<AddAPIResponse>;
617
+ updateCapabilityIntegration(id: bigint, updateData: IUpdateCapabilityIntegration, context: GraphQLContext): Promise<{
618
+ status: boolean;
619
+ }>;
620
+ }
621
+
421
622
  interface ITrybeCustomer extends ICustomer {
422
623
  avatar_id: string;
423
624
  labels: ITrybeCustomerLabels[];
@@ -742,15 +943,133 @@ interface ITrybeSessionAvailability {
742
943
  interface ITrybeSessionAvailabilityResponse {
743
944
  data: ITrybeSessionAvailability[];
744
945
  }
946
+ declare const TRYBE_OFFERING_TYPE_API: {
947
+ readonly APPOINTMENT: "appointment";
948
+ readonly SESSION: "session";
949
+ readonly COURSE: "course";
950
+ };
951
+ type TrybeOfferingTypeApi = (typeof TRYBE_OFFERING_TYPE_API)[keyof typeof TRYBE_OFFERING_TYPE_API];
952
+ interface ITrybeAddOrderResponse {
953
+ data: {
954
+ id: string;
955
+ };
956
+ }
957
+ interface ITrybeOrderGuest {
958
+ id: string;
959
+ name: string;
960
+ first_name: string;
961
+ last_name: string;
962
+ email: null;
963
+ intake_form_complete: boolean;
964
+ checked_in_at: null;
965
+ checked_out_at: null;
966
+ is_lead_booker: boolean;
967
+ customer_id: string;
968
+ }
969
+ interface ITrybeOrder {
970
+ id: string;
971
+ organisation_id: string;
972
+ order_ref: string;
973
+ site_id: string;
974
+ status: string;
975
+ stage: string;
976
+ customer_id: string;
977
+ email: string;
978
+ phone: null;
979
+ first_name: string;
980
+ last_name: string;
981
+ guests: ITrybeOrderGuest[];
982
+ booking_items?: Array<{
983
+ id: string;
984
+ }>;
985
+ }
986
+ interface ITrybeGetOrderResponseData {
987
+ data: ITrybeOrder;
988
+ }
989
+ interface ITrybeAddCustomerToOrderResponse {
990
+ data: {
991
+ id: string;
992
+ };
993
+ }
994
+ interface ITrybeAddOrderItemResponse {
995
+ data: {
996
+ id: string;
997
+ status: string;
998
+ booking_summary?: {
999
+ id: string;
1000
+ offering?: {
1001
+ id?: string;
1002
+ type?: string;
1003
+ name?: string;
1004
+ };
1005
+ };
1006
+ type_id?: string;
1007
+ type_name?: string;
1008
+ total_cost?: number;
1009
+ net_total?: number;
1010
+ };
1011
+ }
1012
+ interface ITrybeSubmitOrderResponse {
1013
+ data: {
1014
+ id: string;
1015
+ };
1016
+ }
1017
+ interface ITrybeCancelOrderResponse {
1018
+ data: {
1019
+ id: string;
1020
+ };
1021
+ }
1022
+ interface ITrybeAddPaymentToOrderResponse {
1023
+ order_id: string;
1024
+ status: string;
1025
+ }
1026
+ interface ITrybePractitioner {
1027
+ id: string;
1028
+ name: string;
1029
+ organisation_id: string;
1030
+ site_ids: string[];
1031
+ avatar: unknown;
1032
+ appointment_restrictions: unknown[];
1033
+ tag_ids: string[];
1034
+ tags: unknown[];
1035
+ zones: ITrybeZone[];
1036
+ can_offer_tags: unknown[];
1037
+ created_at: string;
1038
+ updated_at: string;
1039
+ }
1040
+ interface ITrybeZone {
1041
+ id: string;
1042
+ name: string;
1043
+ site_id: string;
1044
+ organisation_id: string;
1045
+ }
1046
+ interface ITrybeCreateOrderResponse extends ICreateOrderResponse {
1047
+ meta: {
1048
+ orderReference: string;
1049
+ };
1050
+ }
1051
+ interface ITrybeGetOrderResponse extends IGetOrderResponse {
1052
+ meta: {
1053
+ orderReference: string;
1054
+ };
1055
+ items: Array<{
1056
+ id: string;
1057
+ }>;
1058
+ }
1059
+ interface ITrybeUpdateOrderItemResponse {
1060
+ data: {
1061
+ id: string;
1062
+ };
1063
+ }
745
1064
 
746
1065
  declare class TrybeCustomerManagement implements BaseCustomerManagement {
747
1066
  private readonly logger;
748
1067
  private readonly trafficGatewayService;
749
1068
  private readonly fileName;
750
1069
  constructor(logger: LoggerService, trafficGatewayService: TrafficGatewayService);
751
- createCustomer(): Promise<void>;
1070
+ createCustomer(request: IAddCustomerRequest, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<ITrybeCustomer>;
752
1071
  searchCustomer(request: IGetCustomerRequest, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<ITrybeCustomer | undefined>;
753
- updateCustomer(): Promise<void>;
1072
+ updateCustomer(customerId: string, request: IUpdateCustomerRequest, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<IAddUpdateCustomerResponseData>;
754
1073
  }
755
1074
 
756
1075
  declare class TrybeAuthService implements BaseAuth {
@@ -758,7 +1077,8 @@ declare class TrybeAuthService implements BaseAuth {
758
1077
  private readonly logger;
759
1078
  private readonly fileName;
760
1079
  constructor(trybeCustomerManagement: TrybeCustomerManagement, logger: LoggerService);
761
- validateConfig(integration: ICapabilityIntegration, loggedInUserId: bigint): IValidatedCapabilityIntegration;
1080
+ validateConfig(integration: Omit<ICapabilityIntegration, 'id'>, loggedInUserId: bigint): IValidatedCapabilityIntegration;
1081
+ private isValidUrl;
762
1082
  testIntegration(integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<boolean>;
763
1083
  fetchAccessToken(integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<string>;
764
1084
  }
@@ -772,16 +1092,25 @@ declare class TrybeCreditBooking implements BaseCreditBooking {
772
1092
  fetchCustomerCredits(request: IGetCustomerCreditsRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ISystemResponse<ICredit>>;
773
1093
  }
774
1094
 
775
- declare function formatDateForTrybe(date: Date, isStartOfDay: boolean): string;
776
- declare function extractTimeFromIsoString(isoString: string): string;
777
- declare function convertKeysToCamelCase(object: unknown): unknown;
1095
+ interface ISiteSystemResponse {
1096
+ customPaymentTypes?: Array<{
1097
+ id: string;
1098
+ name: string;
1099
+ kind: string;
1100
+ }>;
1101
+ }
778
1102
 
779
- declare const fetchAllPages: <T, TResponse extends {
780
- data: T[];
781
- meta: {
782
- last_page: number;
783
- };
784
- }>(firstPageResponse: TResponse, shouldFetchAll: boolean, fetchPage: (page: number) => Promise<TResponse>) => Promise<T[]>;
1103
+ declare class TrybeIntegrationConfigurationService extends BaseIntegrationConfiguration {
1104
+ private readonly trybeAuthService;
1105
+ private readonly trafficGatewayService;
1106
+ constructor(integrationConfigurationDao: IntegrationConfigurationDao, commonValidationDatabaseService: CommonValidationDatabaseService$1, trybeAuthService: TrybeAuthService, trafficGatewayService: TrafficGatewayService);
1107
+ addCapabilityIntegration(input: IAddCapabilityIntegrationInput, context: GraphQLContext): Promise<AddAPIResponse>;
1108
+ updateCapabilityIntegration(id: bigint, updateData: IUpdateCapabilityIntegration, context: GraphQLContext): Promise<{
1109
+ status: boolean;
1110
+ }>;
1111
+ private validateCapabilityIntegrationConfiguredForInput;
1112
+ getSiteDetailedInformation(integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ISiteSystemResponse | undefined>;
1113
+ }
785
1114
 
786
1115
  declare class TrybeWellnessManagement implements BaseWellnessManagement {
787
1116
  private readonly logger;
@@ -789,19 +1118,41 @@ declare class TrybeWellnessManagement implements BaseWellnessManagement {
789
1118
  private readonly trybeAuthService;
790
1119
  private readonly fileName;
791
1120
  constructor(logger: LoggerService, trafficGatewayService: TrafficGatewayService, trybeAuthService: TrybeAuthService);
792
- fetchPractitioners(): Promise<void>;
793
1121
  fetchWellnessAppointmentSession(): Promise<void>;
794
1122
  checkWellnessAppointmentSessionAvailability(): Promise<void>;
795
1123
  createWellnessAppointmentSessionOrder(): Promise<void>;
796
1124
  addWellnessAppointmentSessionOrderItems(): Promise<void>;
797
1125
  confirmWellnessAppointmentSessionOrder(): Promise<void>;
1126
+ createOrder(request: ICreateOrderRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ITrybeCreateOrderResponse>;
1127
+ addCustomerToOrder(orderId: string, customerId: string, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<void>;
1128
+ getOrder(orderId: string, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ITrybeGetOrderResponse>;
1129
+ private mapOfferingTypeToTrybeApi;
1130
+ addItemToOrder(request: IAddItemToOrderRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<IAddItemToOrderResponse>;
1131
+ addCustomerCreditsToOrder(orderId: string, customerCreditId: string, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<void>;
1132
+ submitOrder(orderId: string, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<void>;
1133
+ cancelOrder(orderId: string, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<void>;
1134
+ updateOrder(request: IUpdateOrderRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<IUpdateOrderResponse>;
1135
+ updateOrderItem(orderId: string, itemId: string, request: IUpdateOrderRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ITrybeUpdateOrderItemResponse>;
1136
+ addPaymentToOrder(request: IAddPaymentToOrderRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<void>;
798
1137
  fetchAppointments(request: IGetAppointmentsRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ISystemResponse<IBookableItem>>;
799
1138
  fetchSessions(request: IGetSessionsRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ISystemResponse<IBookableItem>>;
800
1139
  fetchCourses(request: IGetCoursesRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ISystemResponse<IBookableItem>>;
1140
+ fetchPractitioners(request: IGetPractitionersRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ISystemResponse<IOfferingResource>>;
801
1141
  fetchCategories(request: IGetCategoriesRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ISystemResponse<IBookableItemCategory>>;
802
1142
  fetchBookableItemsFromCredit(request: IGetBookableItemsFromCreditRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ISystemResponse<IBookableItem>>;
803
1143
  fetchSessionAvailabilityForOffering(request: IFetchOfferingAvailabilityRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<IGetAvailableDatesAndTimeSlotsResponse>;
804
1144
  fetchAppointmentAvailabilityForOffering(request: IFetchOfferingAvailabilityRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<IGetAvailableDatesAndTimeSlotsResponse>;
805
1145
  }
806
1146
 
807
- export { BOOKABLE_ITEM_STATUS_ENUM, BOOKABLE_ITEM_TYPE_ENUM, BaseAccountingContactManagement, BaseAccountingCreditNoteManagement, BaseAccountingCustomerManagement, BaseAccountingCustomerPaymentManagement, BaseAccountingInvoiceManagement, BaseAccountingLOAManagement, BaseAccountingTaxManagement, BaseAuth, BaseCreditBooking, BaseCustomerManagement, BaseMembershipCustomerManagement, BaseMembershipManagement, BasePackageManagement, BasePayment, BasePaymentMethodManagement, BasePaymentUserManagement, BaseWellnessManagement, CREDIT_FILTER_BY_ENUM, CREDIT_STATUS_ENUM, CREDIT_TYPE_ENUM, DAY_OF_WEEK, HTTP_METHOD, type IApiCallRequest, type IAvailableDateWithSlots, type IAvailableTimeSlot, type IBookableItem, type IBookableItemCategory, type IBookableItemMedia, type IBookableItemPrice, type IBookableItemPriceMeta, type ICapabilityIntegration, type ICapabilityIntegrationConfig, type ICredit, type ICustomer, type ICustomerLastCheckIn, type IFetchOfferingAvailabilityRequest, type IGetAppointmentsRequest, type IGetAvailableDatesAndTimeSlotsResponse, type IGetBookableItemsFromCreditRequest, type IGetCategoriesRequest, type IGetCoursesRequest, type IGetCustomerCreditsRequest, type IGetCustomerCreditsRequestFilters, type IGetCustomerCreditsRequestOptions, type IGetCustomerRequest, type IGetSessionsRequest, type IGetTrybeResourcesCommonResponse, type IIntegrationRequestContext, INTEGRATION_PROVIDER_ENUM, type ISystemResponse, type ITrybeAppointment, type ITrybeAppointmentAvailabilityResponse, type ITrybeAppointmentPriceRule, type ITrybeAppointmentSlot, type ITrybeCategory, type ITrybeCouponCodeOffering, type ITrybeCouponCodeOfferingsData, type ITrybeCourse, type ITrybeCredit, type ITrybeCustomer, type ITrybeCustomerAvatar, type ITrybeCustomerLabels, type ITrybeCustomerResponse, type ITrybeGetAppointmentsResponse, type ITrybeGetCategoriesResponse, type ITrybeGetCouponCodeOfferingsResponse, type ITrybeGetCoursesResponse, type ITrybeGetCustomerByEmailResponse, type ITrybeGetCustomerCreditsResponse, type ITrybeGetResourcesCommonLink, type ITrybeGetResourcesCommonLinks, type ITrybeGetResourcesCommonMeta, type ITrybeGetSessionsResponse, type ITrybeImage, type ITrybeMeta, type ITrybeOffering, type ITrybePriceRule, type ITrybeSession, type ITrybeSessionAvailability, type ITrybeSessionAvailabilityResponse, type ITrybeSessionMeta, type ITrybeSessionPractitioner, type ITrybeSessionPriceRule, type ITrybeSessionRecurrenceGroup, type ITrybeSessionRoom, type ITrybeSessionStartTime, type IValidatedCapabilityIntegration, type IValidatedCapabilityIntegrationConfig, type IWellnessManagementRequestOptions, AppModule as IntegrationLibsModule, AppModule$1 as IntegrationTrybeModule, AppModule$2 as OfferingIntegrationManager, TRAFFIC_ROUTER_CONFIGURATION_STORE_KEY, TRYBE_OFFERING_TYPE_ENUM, TrafficGatewayService, TrybeAuthService, TrybeCreditBooking, TrybeCustomerManagement, TrybeWellnessManagement, convertKeysToCamelCase, extractTimeFromIsoString, fetchAllPages, formatDateForTrybe };
1147
+ declare function formatDateForTrybe(date: Date, isStartOfDay: boolean): string;
1148
+ declare function extractTimeFromIsoString(isoString: string): string;
1149
+ declare function convertKeysToCamelCase(object: unknown): unknown;
1150
+
1151
+ declare const fetchAllPages: <T, TResponse extends {
1152
+ data: T[];
1153
+ meta: {
1154
+ last_page: number;
1155
+ };
1156
+ }>(firstPageResponse: TResponse, shouldFetchAll: boolean, fetchPage: (page: number) => Promise<TResponse>) => Promise<T[]>;
1157
+
1158
+ export { BOOKABLE_ITEM_STATUS_ENUM, BOOKABLE_ITEM_TYPE_ENUM, BaseAccountingContactManagement, BaseAccountingCreditNoteManagement, BaseAccountingCustomerManagement, BaseAccountingCustomerPaymentManagement, BaseAccountingInvoiceManagement, BaseAccountingLOAManagement, BaseAccountingTaxManagement, BaseAuth, BaseCreditBooking, BaseCustomerManagement, BaseIntegrationConfiguration, BaseMembershipCustomerManagement, BaseMembershipManagement, BasePackageManagement, BasePayment, BasePaymentMethodManagement, BasePaymentUserManagement, BaseWellnessManagement, CREDIT_FILTER_BY_ENUM, CREDIT_STATUS_ENUM, CREDIT_TYPE_ENUM, HTTP_METHOD, type IAddCapIntegResourceMapping, type IAddCapabilityIntegration, type IAddCapabilityIntegrationConfig, type IAddCapabilityIntegrationConfiguredFor, type IAddCapabilityIntegrationInput, type IAddCustomerRequest, type IAddItemToOrderItemConfig, type IAddItemToOrderRequest, type IAddItemToOrderResponse, type IAddPaymentToOrderRequest, type IAddUpdateCustomerResponseData, type IApiCallRequest, type IAvailableDateWithSlots, type IAvailableTimeSlot, type IBookableItem, type IBookableItemCategory, type IBookableItemMedia, type IBookableItemPrice, type IBookableItemPriceMeta, type ICapabilityIntegration, type ICapabilityIntegrationConfig, type ICreateOrderRequest, type ICreateOrderResponse, type ICredit, type ICustomer, type ICustomerLastCheckIn, type IFetchOfferingAvailabilityRequest, type IGetAppointmentsRequest, type IGetAvailableDatesAndTimeSlotsResponse, type IGetBookableItemsFromCreditRequest, type IGetCategoriesRequest, type IGetCoursesRequest, type IGetCustomerCreditsRequest, type IGetCustomerCreditsRequestFilters, type IGetCustomerCreditsRequestOptions, type IGetCustomerRequest, type IGetOrderResponse, type IGetPractitionersRequest, type IGetSessionsRequest, type IGetTrybeResourcesCommonResponse, type IIcon, type IIntegrationRequestContext, type IIntegrationRequestLog, INTEGRATION_PROVIDER_ENUM, type IOfferingResource, type IOfferingResourceMedia, type IOrderGuest, type ISystemResponse, type ITrybeAddCustomerToOrderResponse, type ITrybeAddOrderItemResponse, type ITrybeAddOrderResponse, type ITrybeAddPaymentToOrderResponse, type ITrybeAppointment, type ITrybeAppointmentAvailabilityResponse, type ITrybeAppointmentPriceRule, type ITrybeAppointmentSlot, type ITrybeCancelOrderResponse, type ITrybeCategory, type ITrybeCouponCodeOffering, type ITrybeCouponCodeOfferingsData, type ITrybeCourse, type ITrybeCreateOrderResponse, type ITrybeCredit, type ITrybeCustomer, type ITrybeCustomerAvatar, type ITrybeCustomerLabels, type ITrybeCustomerResponse, type ITrybeGetAppointmentsResponse, type ITrybeGetCategoriesResponse, type ITrybeGetCouponCodeOfferingsResponse, type ITrybeGetCoursesResponse, type ITrybeGetCustomerByEmailResponse, type ITrybeGetCustomerCreditsResponse, type ITrybeGetOrderResponse, type ITrybeGetOrderResponseData, type ITrybeGetResourcesCommonLink, type ITrybeGetResourcesCommonLinks, type ITrybeGetResourcesCommonMeta, type ITrybeGetSessionsResponse, type ITrybeImage, type ITrybeMeta, type ITrybeOffering, type ITrybeOrder, type ITrybeOrderGuest, type ITrybePractitioner, type ITrybePriceRule, type ITrybeSession, type ITrybeSessionAvailability, type ITrybeSessionAvailabilityResponse, type ITrybeSessionMeta, type ITrybeSessionPractitioner, type ITrybeSessionPriceRule, type ITrybeSessionRecurrenceGroup, type ITrybeSessionRoom, type ITrybeSessionStartTime, type ITrybeSubmitOrderResponse, type ITrybeUpdateOrderItemResponse, type ITrybeZone, type IUpdateCapabilityIntegration, type IUpdateCustomerRequest, type IUpdateOrderRequest, type IUpdateOrderResponse, type IValidatedCapabilityIntegration, type IValidatedCapabilityIntegrationConfig, type IWellnessManagementRequestOptions, IntegrationConfigurationDao, AppModule as IntegrationLibsModule, IntegrationRequestLoggerService, AppModule$1 as IntegrationTrybeModule, IntegrationUserManagementDao, AppModule$2 as OfferingIntegrationManager, RateLimiterService, TRAFFIC_ROUTER_CONFIGURATION_STORE_KEY, TRYBE_OFFERING_TYPE_API, TRYBE_OFFERING_TYPE_ENUM, TrafficGatewayService, TrybeAuthService, TrybeCreditBooking, TrybeCustomerManagement, TrybeIntegrationConfigurationService, type TrybeOfferingTypeApi, TrybeWellnessManagement, convertKeysToCamelCase, extractTimeFromIsoString, fetchAllPages, formatDateForTrybe };