@dv4resi/dvss-backend-module-offering-im 0.0.7 → 0.0.9
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 +589 -58
- package/dist/index.js +2953 -211
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import {
|
|
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 { CAPABILITY_PROVIDER_INTEGRATION_ENUM, CAPABILITY_CATEGORY_ENUM, ICapability } from '@dv4resi/dvss-backend-module-datastore/dist/datastore/models/capability.model';
|
|
5
|
+
import { schema, CommonValidationDatabaseService as CommonValidationDatabaseService$1 } from '@dv4resi/dvss-backend-module-datastore';
|
|
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,261 @@ 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
|
+
interface IAddCapabilityIntegrationMappingResponse {
|
|
65
|
+
status: boolean;
|
|
66
|
+
ids: bigint[];
|
|
67
|
+
}
|
|
68
|
+
interface IRemoveCapabilityIntegrationMappingInput {
|
|
69
|
+
capabilityIntegrationId: bigint;
|
|
70
|
+
configuredForId: bigint;
|
|
71
|
+
configuredForType: CONFIGURED_FOR_TYPE_ENUM;
|
|
72
|
+
}
|
|
73
|
+
interface IDeleteAPIResponse {
|
|
74
|
+
status: boolean;
|
|
75
|
+
}
|
|
76
|
+
interface IUpdateAPIResponse {
|
|
77
|
+
status: boolean;
|
|
78
|
+
}
|
|
79
|
+
interface ICapabilityIntegrationResourceMappingRow {
|
|
80
|
+
id: bigint;
|
|
81
|
+
capabilityIntegrationId: bigint;
|
|
82
|
+
configuredForId: bigint;
|
|
83
|
+
configuredForType: CONFIGURED_FOR_TYPE_ENUM;
|
|
84
|
+
}
|
|
85
|
+
interface IGetCapabilityIntegrationInput {
|
|
86
|
+
projectId: number;
|
|
87
|
+
id?: bigint;
|
|
88
|
+
category?: CAPABILITY_CATEGORY_ENUM;
|
|
89
|
+
fetchBy?: {
|
|
90
|
+
configuredForId: string | bigint;
|
|
91
|
+
configuredForType: CONFIGURED_FOR_TYPE_ENUM;
|
|
92
|
+
category?: CAPABILITY_CATEGORY_ENUM;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
type IGetCapabilityIntegrationResult = typeof schema.capabilityIntegration.$inferSelect & {
|
|
96
|
+
provider?: CAPABILITY_PROVIDER_INTEGRATION_ENUM | null;
|
|
97
|
+
resourceMappingId?: bigint;
|
|
98
|
+
configuredForId?: bigint;
|
|
99
|
+
configuredForType?: typeof schema.capIntegResourceMapping.$inferSelect.configuredForType;
|
|
100
|
+
resourceMappingConfig?: typeof schema.capIntegResourceMapping.$inferSelect.config;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
declare enum INTEGRATION_PROVIDER_ENUM {
|
|
104
|
+
TRYBE = "TRYBE"
|
|
105
|
+
}
|
|
106
|
+
interface IPlatformConfig {
|
|
107
|
+
baseUrl?: string;
|
|
108
|
+
}
|
|
109
|
+
interface IIntegrationConfig {
|
|
110
|
+
siteId?: string;
|
|
111
|
+
apiKey?: string;
|
|
112
|
+
organisationId?: string;
|
|
113
|
+
}
|
|
114
|
+
interface ICapabilityIntegrationConfig {
|
|
115
|
+
platformConfig?: IPlatformConfig;
|
|
116
|
+
integrationConfig?: IIntegrationConfig;
|
|
117
|
+
}
|
|
118
|
+
interface IValidatedCapabilityIntegrationConfig {
|
|
119
|
+
platformConfig: Required<IPlatformConfig>;
|
|
120
|
+
integrationConfig: Required<IIntegrationConfig>;
|
|
121
|
+
}
|
|
122
|
+
interface ICapabilityIntegration {
|
|
123
|
+
id: bigint;
|
|
124
|
+
provider?: INTEGRATION_PROVIDER_ENUM | null;
|
|
125
|
+
providerId?: bigint;
|
|
126
|
+
config?: ICapabilityIntegrationConfig;
|
|
127
|
+
capabilityId?: bigint;
|
|
128
|
+
projectId?: number;
|
|
129
|
+
}
|
|
130
|
+
interface IValidatedCapabilityIntegration {
|
|
131
|
+
id: bigint;
|
|
132
|
+
provider?: INTEGRATION_PROVIDER_ENUM | null;
|
|
133
|
+
providerId?: bigint;
|
|
134
|
+
config: IValidatedCapabilityIntegrationConfig;
|
|
135
|
+
capabilityId?: bigint;
|
|
136
|
+
headers?: Record<string, string>;
|
|
137
|
+
projectId?: number;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
interface IAddCapabilityIntegrationConfig {
|
|
141
|
+
platformConfig: Record<string, unknown>;
|
|
142
|
+
integrationConfig: Record<string, unknown>;
|
|
143
|
+
}
|
|
144
|
+
interface IIcon {
|
|
145
|
+
provider: MEDIA_PROVIDER_ENUM;
|
|
146
|
+
meta: unknown;
|
|
147
|
+
}
|
|
148
|
+
interface IAddCapabilityIntegrationConfiguredFor {
|
|
149
|
+
configuredForId: bigint;
|
|
150
|
+
configuredForType: CONFIGURED_FOR_TYPE_ENUM;
|
|
151
|
+
}
|
|
152
|
+
interface IAddCapabilityIntegrationInput {
|
|
153
|
+
projectId: number;
|
|
154
|
+
propertyId?: number;
|
|
155
|
+
capabilityId: bigint;
|
|
156
|
+
capabilityProviderId: bigint;
|
|
157
|
+
config?: Record<string, unknown>;
|
|
158
|
+
nickname?: string;
|
|
159
|
+
subcategory?: string;
|
|
160
|
+
parentId?: bigint;
|
|
161
|
+
capabilityIntegrationResourceId?: bigint;
|
|
162
|
+
groupId?: bigint;
|
|
163
|
+
status: CAPABILITY_INTEGRATION_STATUS_ENUM;
|
|
164
|
+
icon?: IIcon;
|
|
165
|
+
availableFor: CAPABILITY_RESOURCE_AVAILABLE_FOR_ENUM;
|
|
166
|
+
configuredFor?: IAddCapabilityIntegrationConfiguredFor;
|
|
167
|
+
}
|
|
168
|
+
interface IUpdateCapabilityIntegrationUpdateData {
|
|
169
|
+
nickname?: string;
|
|
170
|
+
icon?: IIcon;
|
|
171
|
+
config?: IAddCapabilityIntegrationConfig;
|
|
172
|
+
parentId?: bigint;
|
|
173
|
+
}
|
|
174
|
+
interface IUpdateCapabilityIntegrationRequest {
|
|
175
|
+
id: bigint;
|
|
176
|
+
updateData: IUpdateCapabilityIntegrationUpdateData;
|
|
177
|
+
}
|
|
178
|
+
interface IUpdateCapabilityIntegrationResponse {
|
|
179
|
+
status: boolean;
|
|
180
|
+
}
|
|
181
|
+
interface IGetCapabilityIntegrationsFilterInput {
|
|
182
|
+
by: string;
|
|
183
|
+
values?: string[];
|
|
184
|
+
}
|
|
185
|
+
interface IGetCapabilityIntegrationsSortingInput {
|
|
186
|
+
by: string;
|
|
187
|
+
order: string;
|
|
188
|
+
}
|
|
189
|
+
interface IGetCapabilityIntegrationsOptionsInput {
|
|
190
|
+
count?: number;
|
|
191
|
+
page?: number;
|
|
192
|
+
filters?: IGetCapabilityIntegrationsFilterInput[];
|
|
193
|
+
sorting?: IGetCapabilityIntegrationsSortingInput;
|
|
194
|
+
search?: string;
|
|
195
|
+
}
|
|
196
|
+
interface IGetCapabilityIntegrationsRequest {
|
|
197
|
+
projectId: number;
|
|
198
|
+
category?: string;
|
|
199
|
+
propertyId?: number;
|
|
200
|
+
options?: IGetCapabilityIntegrationsOptionsInput;
|
|
201
|
+
}
|
|
202
|
+
interface IGetCapabilityIntegrationsResponse {
|
|
203
|
+
totalCount: number;
|
|
204
|
+
records: ICapabilityIntegration[];
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
declare class IntegrationConfigurationDao {
|
|
208
|
+
private readonly conn;
|
|
209
|
+
private readonly logger;
|
|
210
|
+
private readonly fileName;
|
|
211
|
+
constructor(conn: MySql2Database<typeof schema>, logger: LoggerService);
|
|
212
|
+
addCapabilityIntegration(input: IAddCapabilityIntegration, loggedInUserId: bigint): Promise<{
|
|
213
|
+
id: bigint;
|
|
214
|
+
} | undefined>;
|
|
215
|
+
getCapability(request: {
|
|
216
|
+
capabilityId: bigint;
|
|
217
|
+
}, loggedInUserId: bigint): Promise<ICapability | undefined>;
|
|
218
|
+
getCapabilityProvider(request: {
|
|
219
|
+
capabilityProviderId: bigint;
|
|
220
|
+
}, loggedInUserId: bigint): Promise<typeof schema.capabilityProvider.$inferSelect | undefined>;
|
|
221
|
+
updateCapabilityIntegration(input: {
|
|
222
|
+
id: bigint;
|
|
223
|
+
updateData: IUpdateCapabilityIntegration;
|
|
224
|
+
}, loggedInUserId: bigint): Promise<{
|
|
225
|
+
status: boolean;
|
|
226
|
+
}>;
|
|
227
|
+
getCapabilityIntegration(input: {
|
|
228
|
+
capabilityIntegrationId: bigint;
|
|
229
|
+
}, loggedInUserId: bigint): Promise<typeof schema.capabilityIntegration.$inferSelect | undefined>;
|
|
230
|
+
getCapabilityIntegrationById(request: {
|
|
231
|
+
id: bigint;
|
|
232
|
+
projectId: number;
|
|
233
|
+
category?: CAPABILITY_CATEGORY_ENUM;
|
|
234
|
+
}, loggedInUserId: bigint): Promise<IGetCapabilityIntegrationResult | undefined>;
|
|
235
|
+
getCapabilityIntegrationByProvider(request: {
|
|
236
|
+
projectId: number;
|
|
237
|
+
category?: CAPABILITY_CATEGORY_ENUM;
|
|
238
|
+
configuredForType: CONFIGURED_FOR_TYPE_ENUM;
|
|
239
|
+
configuredForId: bigint;
|
|
240
|
+
}, loggedInUserId: bigint): Promise<IGetCapabilityIntegrationResult | undefined>;
|
|
241
|
+
getCapabilityIntegrations(input: IGetCapabilityIntegrationsRequest, loggedInUserId: bigint): Promise<IGetCapabilityIntegrationsResponse>;
|
|
242
|
+
private applyFilters;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
declare class IntegrationUserManagementDao {
|
|
246
|
+
protected readonly conn: MySql2Database<typeof schema>;
|
|
247
|
+
constructor(conn: MySql2Database<typeof schema>);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
declare class IntegrationResourceManagementDao {
|
|
251
|
+
private readonly conn;
|
|
252
|
+
private readonly logger;
|
|
253
|
+
private readonly fileName;
|
|
254
|
+
constructor(conn: MySql2Database<typeof schema>, logger: LoggerService);
|
|
255
|
+
addCapabilityIntegrationMapping(input: {
|
|
256
|
+
projectId: number;
|
|
257
|
+
capabilityIntegrationId: bigint;
|
|
258
|
+
configuredForId: bigint;
|
|
259
|
+
configuredForType: CONFIGURED_FOR_TYPE_ENUM;
|
|
260
|
+
config?: Record<string, unknown>;
|
|
261
|
+
}, context: GraphQLContext): Promise<IAddCapabilityIntegrationMappingResponse>;
|
|
262
|
+
checkMappingExists(input: {
|
|
263
|
+
capabilityIntegrationId: bigint;
|
|
264
|
+
configuredForId: bigint;
|
|
265
|
+
configuredForType: CONFIGURED_FOR_TYPE_ENUM;
|
|
266
|
+
}, loggedInUserId: bigint): Promise<boolean>;
|
|
267
|
+
removeCapabilityIntegrationMapping(input: {
|
|
268
|
+
capabilityIntegrationId: bigint;
|
|
269
|
+
configuredForId: bigint;
|
|
270
|
+
configuredForType: CONFIGURED_FOR_TYPE_ENUM;
|
|
271
|
+
}, context: GraphQLContext): Promise<IDeleteAPIResponse>;
|
|
272
|
+
getCapabilityIntegrationResourceMappingById(id: bigint, loggedInUserId: bigint): Promise<ICapabilityIntegrationResourceMappingRow | undefined>;
|
|
273
|
+
updateCapabilityIntegrationConfiguration(input: {
|
|
274
|
+
id: bigint;
|
|
275
|
+
config: Record<string, unknown>;
|
|
276
|
+
}, context: GraphQLContext): Promise<IUpdateAPIResponse>;
|
|
277
|
+
}
|
|
278
|
+
|
|
51
279
|
interface IGetCustomerRequest {
|
|
52
280
|
email?: string;
|
|
53
281
|
customerId?: string;
|
|
54
282
|
}
|
|
283
|
+
interface IAddCustomerRequest {
|
|
284
|
+
site_id: string;
|
|
285
|
+
first_name?: string | null;
|
|
286
|
+
last_name?: string | null;
|
|
287
|
+
phone?: string | null;
|
|
288
|
+
dob?: string | null;
|
|
289
|
+
email?: string | null;
|
|
290
|
+
password?: string;
|
|
291
|
+
marketing_preference_ids?: string[];
|
|
292
|
+
external_ref?: string | null;
|
|
293
|
+
guestline_ref?: string;
|
|
294
|
+
preferred_locale?: string;
|
|
295
|
+
}
|
|
296
|
+
interface IUpdateCustomerRequest {
|
|
297
|
+
first_name?: string | null;
|
|
298
|
+
last_name?: string | null;
|
|
299
|
+
phone?: string | null;
|
|
300
|
+
dob?: string | null;
|
|
301
|
+
password?: string;
|
|
302
|
+
external_ref?: string | null;
|
|
303
|
+
preferred_locale?: string;
|
|
304
|
+
}
|
|
55
305
|
interface ICustomer {
|
|
56
306
|
id: string;
|
|
57
307
|
first_name: string;
|
|
@@ -79,6 +329,10 @@ interface ICustomerLastCheckIn {
|
|
|
79
329
|
checked_in_at: string;
|
|
80
330
|
method: string;
|
|
81
331
|
}
|
|
332
|
+
interface IAddUpdateCustomerResponseData {
|
|
333
|
+
id: string;
|
|
334
|
+
status: string;
|
|
335
|
+
}
|
|
82
336
|
|
|
83
337
|
declare enum CREDIT_TYPE_ENUM {
|
|
84
338
|
COUPON = "COUPON",
|
|
@@ -126,41 +380,29 @@ interface IGetCustomerCreditsRequest {
|
|
|
126
380
|
options?: IGetCustomerCreditsRequestOptions;
|
|
127
381
|
}
|
|
128
382
|
|
|
129
|
-
|
|
130
|
-
|
|
383
|
+
interface IAddResourceToIntegrationInput {
|
|
384
|
+
projectId: number;
|
|
385
|
+
offeringId: bigint;
|
|
386
|
+
capabilityIntegrationId: bigint;
|
|
387
|
+
config?: Record<string, unknown>;
|
|
131
388
|
}
|
|
132
|
-
interface
|
|
133
|
-
|
|
389
|
+
interface IAddResourceToIntegrationResponse {
|
|
390
|
+
status: boolean;
|
|
391
|
+
ids: bigint[];
|
|
134
392
|
}
|
|
135
|
-
interface
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
organisationId?: string;
|
|
139
|
-
}
|
|
140
|
-
interface ICapabilityIntegrationConfig {
|
|
141
|
-
platformConfig?: IPlatformConfig;
|
|
142
|
-
integrationConfig?: IIntegrationConfig;
|
|
393
|
+
interface IRemoveResourceFromIntegrationRequest {
|
|
394
|
+
offeringId: bigint;
|
|
395
|
+
capabilityIntegrationId: bigint;
|
|
143
396
|
}
|
|
144
|
-
interface
|
|
145
|
-
|
|
146
|
-
integrationConfig: Required<IIntegrationConfig>;
|
|
397
|
+
interface IRemoveResourceFromIntegrationResponse {
|
|
398
|
+
status: boolean;
|
|
147
399
|
}
|
|
148
|
-
interface
|
|
400
|
+
interface IUpdateOfferingIntegrationResourceConfigurationInput {
|
|
149
401
|
id: bigint;
|
|
150
|
-
|
|
151
|
-
providerId?: bigint;
|
|
152
|
-
config?: ICapabilityIntegrationConfig;
|
|
153
|
-
capabilityId?: bigint;
|
|
154
|
-
projectId?: number;
|
|
402
|
+
config: Record<string, unknown>;
|
|
155
403
|
}
|
|
156
|
-
interface
|
|
157
|
-
|
|
158
|
-
provider?: INTEGRATION_PROVIDER_ENUM | null;
|
|
159
|
-
providerId?: bigint;
|
|
160
|
-
config: IValidatedCapabilityIntegrationConfig;
|
|
161
|
-
capabilityId?: bigint;
|
|
162
|
-
headers?: Record<string, string>;
|
|
163
|
-
projectId?: number;
|
|
404
|
+
interface IUpdateOfferingIntegrationResourceConfigurationResponse {
|
|
405
|
+
status: boolean;
|
|
164
406
|
}
|
|
165
407
|
|
|
166
408
|
declare enum BOOKABLE_ITEM_TYPE_ENUM {
|
|
@@ -172,15 +414,6 @@ declare enum BOOKABLE_ITEM_STATUS_ENUM {
|
|
|
172
414
|
ACTIVE = "ACTIVE",
|
|
173
415
|
INACTIVE = "INACTIVE"
|
|
174
416
|
}
|
|
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
417
|
interface IBookableItemPriceMeta {
|
|
185
418
|
id?: bigint;
|
|
186
419
|
externalId?: string;
|
|
@@ -215,7 +448,7 @@ interface IBookableItem {
|
|
|
215
448
|
name: string;
|
|
216
449
|
description?: string;
|
|
217
450
|
type: BOOKABLE_ITEM_TYPE_ENUM;
|
|
218
|
-
status
|
|
451
|
+
status?: BOOKABLE_ITEM_STATUS_ENUM;
|
|
219
452
|
icon?: IBookableItemMedia;
|
|
220
453
|
primaryAsset?: IBookableItemMedia;
|
|
221
454
|
prices?: IBookableItemPrice[];
|
|
@@ -275,6 +508,102 @@ interface IAvailableDateWithSlots {
|
|
|
275
508
|
interface IGetAvailableDatesAndTimeSlotsResponse {
|
|
276
509
|
dates: IAvailableDateWithSlots[];
|
|
277
510
|
}
|
|
511
|
+
interface IOrderGuest {
|
|
512
|
+
id: string;
|
|
513
|
+
name?: string;
|
|
514
|
+
}
|
|
515
|
+
interface IGetOrderResponse {
|
|
516
|
+
orderId: string;
|
|
517
|
+
guests: IOrderGuest[];
|
|
518
|
+
}
|
|
519
|
+
interface ICreateOrderRequest {
|
|
520
|
+
bookingStartTime: Date;
|
|
521
|
+
durationInMinutes?: number;
|
|
522
|
+
meta?: Record<string, unknown>;
|
|
523
|
+
bookableItems: Pick<IBookableItem, 'externalId' | 'type'>[];
|
|
524
|
+
offeringResources: Pick<IOfferingResource, 'externalId'>[];
|
|
525
|
+
currencyMultiplier: number;
|
|
526
|
+
customerId: string;
|
|
527
|
+
customerCreditId?: string;
|
|
528
|
+
}
|
|
529
|
+
interface ICreateOrderResponse {
|
|
530
|
+
externalBookingId: string;
|
|
531
|
+
items: (IBookableItem & {
|
|
532
|
+
totalPrice?: number;
|
|
533
|
+
})[];
|
|
534
|
+
}
|
|
535
|
+
interface IAddItemToOrderItemConfig {
|
|
536
|
+
offeringId: string;
|
|
537
|
+
offeringType: BOOKABLE_ITEM_TYPE_ENUM;
|
|
538
|
+
guestIds: string[];
|
|
539
|
+
practitionerIds: string[];
|
|
540
|
+
durationMinutes?: number;
|
|
541
|
+
timeIso?: string;
|
|
542
|
+
sessionId?: string;
|
|
543
|
+
}
|
|
544
|
+
interface IAddItemToOrderRequest {
|
|
545
|
+
orderId: string;
|
|
546
|
+
item: IAddItemToOrderItemConfig;
|
|
547
|
+
}
|
|
548
|
+
interface IAddItemToOrderResponse {
|
|
549
|
+
name?: string;
|
|
550
|
+
netTotal?: number;
|
|
551
|
+
}
|
|
552
|
+
interface IAddPaymentToOrderRequest {
|
|
553
|
+
orderId: string;
|
|
554
|
+
amount: number;
|
|
555
|
+
paymentTypeId: string;
|
|
556
|
+
}
|
|
557
|
+
interface IOfferingResourceMedia {
|
|
558
|
+
meta?: Record<string, unknown>;
|
|
559
|
+
provider?: string;
|
|
560
|
+
}
|
|
561
|
+
interface IOfferingResource {
|
|
562
|
+
id?: bigint;
|
|
563
|
+
externalId: string;
|
|
564
|
+
name: string;
|
|
565
|
+
description?: string;
|
|
566
|
+
type: OFFERING_RESOURCE_TYPE;
|
|
567
|
+
status: STATUS;
|
|
568
|
+
media?: IOfferingResourceMedia;
|
|
569
|
+
meta?: Record<string, unknown>;
|
|
570
|
+
bookableItems?: unknown[];
|
|
571
|
+
createdAt?: Date;
|
|
572
|
+
createdBy?: bigint;
|
|
573
|
+
deletedAt?: Date;
|
|
574
|
+
deletedBy?: bigint;
|
|
575
|
+
isCurrentlyUnavailable?: boolean;
|
|
576
|
+
occurrences?: unknown[];
|
|
577
|
+
offeringId?: bigint;
|
|
578
|
+
priceSummary?: string;
|
|
579
|
+
projectId?: number;
|
|
580
|
+
quantity?: number;
|
|
581
|
+
unavailability?: unknown[];
|
|
582
|
+
updatedAt?: Date;
|
|
583
|
+
updatedBy?: bigint;
|
|
584
|
+
}
|
|
585
|
+
interface IGetPractitionersRequest {
|
|
586
|
+
shouldFetchAllPractitioners: boolean;
|
|
587
|
+
options?: IWellnessManagementRequestOptions;
|
|
588
|
+
}
|
|
589
|
+
interface IUpdateOrderRequest {
|
|
590
|
+
orderId: string;
|
|
591
|
+
timezone: string;
|
|
592
|
+
item: {
|
|
593
|
+
externalId: string;
|
|
594
|
+
type: BOOKABLE_ITEM_TYPE_ENUM;
|
|
595
|
+
};
|
|
596
|
+
sessionId?: string;
|
|
597
|
+
durationInMinutes?: number;
|
|
598
|
+
bookingStartDateLabel?: string;
|
|
599
|
+
bookingStartTimeLabel?: string;
|
|
600
|
+
}
|
|
601
|
+
interface IUpdateOrderResponse {
|
|
602
|
+
success: boolean;
|
|
603
|
+
data?: {
|
|
604
|
+
id: string;
|
|
605
|
+
};
|
|
606
|
+
}
|
|
278
607
|
|
|
279
608
|
interface ISystemResponse<T> {
|
|
280
609
|
totalCount: number;
|
|
@@ -323,7 +652,11 @@ declare abstract class BaseWellnessManagement {
|
|
|
323
652
|
abstract fetchBookableItemsFromCredit(request: IGetBookableItemsFromCreditRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ISystemResponse<IBookableItem>>;
|
|
324
653
|
abstract fetchSessionAvailabilityForOffering(request: IFetchOfferingAvailabilityRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<IGetAvailableDatesAndTimeSlotsResponse>;
|
|
325
654
|
abstract fetchAppointmentAvailabilityForOffering(request: IFetchOfferingAvailabilityRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<IGetAvailableDatesAndTimeSlotsResponse>;
|
|
326
|
-
abstract fetchPractitioners(): Promise<
|
|
655
|
+
abstract fetchPractitioners(request: IGetPractitionersRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ISystemResponse<IOfferingResource>>;
|
|
656
|
+
abstract createOrder(request: ICreateOrderRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ICreateOrderResponse>;
|
|
657
|
+
abstract getOrder(orderId: string, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<IGetOrderResponse>;
|
|
658
|
+
abstract cancelOrder(orderId: string, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<void>;
|
|
659
|
+
abstract updateOrder(request: IUpdateOrderRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<IUpdateOrderResponse>;
|
|
327
660
|
abstract fetchWellnessAppointmentSession(): Promise<void>;
|
|
328
661
|
abstract checkWellnessAppointmentSessionAvailability(): Promise<void>;
|
|
329
662
|
abstract createWellnessAppointmentSessionOrder(): Promise<void>;
|
|
@@ -336,9 +669,10 @@ declare abstract class BaseCreditBooking {
|
|
|
336
669
|
}
|
|
337
670
|
|
|
338
671
|
declare abstract class BaseCustomerManagement {
|
|
339
|
-
abstract createCustomer(): Promise<
|
|
672
|
+
abstract createCustomer(request: IAddCustomerRequest, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<ICustomer>;
|
|
340
673
|
abstract searchCustomer(request: IGetCustomerRequest, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<ICustomer | undefined>;
|
|
341
|
-
abstract updateCustomer(): Promise<
|
|
674
|
+
abstract updateCustomer(customerId: string, request: IUpdateCustomerRequest, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<IAddUpdateCustomerResponseData>;
|
|
675
|
+
abstract deleteCustomer(customerId: string, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<IDeleteAPIResponse>;
|
|
342
676
|
}
|
|
343
677
|
|
|
344
678
|
declare abstract class BasePackageManagement {
|
|
@@ -418,6 +752,30 @@ declare abstract class BaseMembershipManagement {
|
|
|
418
752
|
abstract getMembership(): Promise<void>;
|
|
419
753
|
}
|
|
420
754
|
|
|
755
|
+
declare class BaseIntegrationConfiguration {
|
|
756
|
+
protected readonly integrationConfigurationDao: IntegrationConfigurationDao;
|
|
757
|
+
protected readonly commonValidationDatabaseService: CommonValidationDatabaseService;
|
|
758
|
+
protected readonly logger: LoggerService;
|
|
759
|
+
protected readonly fileName = "integration-configuration.base.ts";
|
|
760
|
+
constructor(integrationConfigurationDao: IntegrationConfigurationDao, commonValidationDatabaseService: CommonValidationDatabaseService, logger: LoggerService);
|
|
761
|
+
private validateAddCapabilityIntegrationInput;
|
|
762
|
+
addCapabilityIntegration(input: IAddCapabilityIntegrationInput, context: GraphQLContext): Promise<AddAPIResponse>;
|
|
763
|
+
updateCapabilityIntegration(request: IUpdateCapabilityIntegrationRequest, integration?: ICapabilityIntegration, loggedInUserId?: bigint): Promise<IUpdateCapabilityIntegrationResponse>;
|
|
764
|
+
protected validateIconAndNickName(updateData: IUpdateCapabilityIntegrationRequest['updateData'], loggedInUserId: bigint): void;
|
|
765
|
+
getCapabilityIntegrations(request: IGetCapabilityIntegrationsRequest, loggedInUserId: bigint): Promise<IGetCapabilityIntegrationsResponse>;
|
|
766
|
+
getCapabilityIntegration(input: IGetCapabilityIntegrationInput, context: GraphQLContext): Promise<IGetCapabilityIntegrationResult>;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
declare abstract class BaseIntegrationResourceManagement {
|
|
770
|
+
protected readonly integrationResourceManagementDao: IntegrationResourceManagementDao;
|
|
771
|
+
protected readonly logger: LoggerService;
|
|
772
|
+
private readonly fileName;
|
|
773
|
+
constructor(integrationResourceManagementDao: IntegrationResourceManagementDao, logger: LoggerService);
|
|
774
|
+
addResourceToIntegration(input: IAddResourceToIntegrationInput, context: GraphQLContext): Promise<IAddResourceToIntegrationResponse>;
|
|
775
|
+
removeResourceFromIntegration(request: IRemoveResourceFromIntegrationRequest, context: GraphQLContext): Promise<IRemoveResourceFromIntegrationResponse>;
|
|
776
|
+
updateOfferingIntegrationResourceConfiguration(input: IUpdateOfferingIntegrationResourceConfigurationInput, context: GraphQLContext): Promise<IUpdateOfferingIntegrationResourceConfigurationResponse>;
|
|
777
|
+
}
|
|
778
|
+
|
|
421
779
|
interface ITrybeCustomer extends ICustomer {
|
|
422
780
|
avatar_id: string;
|
|
423
781
|
labels: ITrybeCustomerLabels[];
|
|
@@ -742,15 +1100,150 @@ interface ITrybeSessionAvailability {
|
|
|
742
1100
|
interface ITrybeSessionAvailabilityResponse {
|
|
743
1101
|
data: ITrybeSessionAvailability[];
|
|
744
1102
|
}
|
|
1103
|
+
declare const TRYBE_OFFERING_TYPE_API: {
|
|
1104
|
+
readonly APPOINTMENT: "appointment";
|
|
1105
|
+
readonly SESSION: "session";
|
|
1106
|
+
readonly COURSE: "course";
|
|
1107
|
+
};
|
|
1108
|
+
type TrybeOfferingTypeApi = (typeof TRYBE_OFFERING_TYPE_API)[keyof typeof TRYBE_OFFERING_TYPE_API];
|
|
1109
|
+
interface ITrybeAddOrderResponse {
|
|
1110
|
+
data: {
|
|
1111
|
+
id: string;
|
|
1112
|
+
};
|
|
1113
|
+
}
|
|
1114
|
+
interface ITrybeOrderGuest {
|
|
1115
|
+
id: string;
|
|
1116
|
+
name: string;
|
|
1117
|
+
first_name: string;
|
|
1118
|
+
last_name: string;
|
|
1119
|
+
email: null;
|
|
1120
|
+
intake_form_complete: boolean;
|
|
1121
|
+
checked_in_at: null;
|
|
1122
|
+
checked_out_at: null;
|
|
1123
|
+
is_lead_booker: boolean;
|
|
1124
|
+
customer_id: string;
|
|
1125
|
+
}
|
|
1126
|
+
interface ITrybeOrder {
|
|
1127
|
+
id: string;
|
|
1128
|
+
organisation_id: string;
|
|
1129
|
+
order_ref: string;
|
|
1130
|
+
site_id: string;
|
|
1131
|
+
status: string;
|
|
1132
|
+
stage: string;
|
|
1133
|
+
customer_id: string;
|
|
1134
|
+
email: string;
|
|
1135
|
+
phone: null;
|
|
1136
|
+
first_name: string;
|
|
1137
|
+
last_name: string;
|
|
1138
|
+
guests: ITrybeOrderGuest[];
|
|
1139
|
+
booking_items?: Array<{
|
|
1140
|
+
id: string;
|
|
1141
|
+
}>;
|
|
1142
|
+
}
|
|
1143
|
+
interface ITrybeGetOrderResponseData {
|
|
1144
|
+
data: ITrybeOrder;
|
|
1145
|
+
}
|
|
1146
|
+
interface ITrybeAddCustomerToOrderResponse {
|
|
1147
|
+
data: {
|
|
1148
|
+
id: string;
|
|
1149
|
+
};
|
|
1150
|
+
}
|
|
1151
|
+
interface ITrybeAddOrderItemResponse {
|
|
1152
|
+
data: {
|
|
1153
|
+
id: string;
|
|
1154
|
+
status: string;
|
|
1155
|
+
booking_summary?: {
|
|
1156
|
+
id: string;
|
|
1157
|
+
offering?: {
|
|
1158
|
+
id?: string;
|
|
1159
|
+
type?: string;
|
|
1160
|
+
name?: string;
|
|
1161
|
+
};
|
|
1162
|
+
};
|
|
1163
|
+
type_id?: string;
|
|
1164
|
+
type_name?: string;
|
|
1165
|
+
total_cost?: number;
|
|
1166
|
+
net_total?: number;
|
|
1167
|
+
};
|
|
1168
|
+
}
|
|
1169
|
+
interface ITrybeSubmitOrderResponse {
|
|
1170
|
+
data: {
|
|
1171
|
+
id: string;
|
|
1172
|
+
};
|
|
1173
|
+
}
|
|
1174
|
+
interface ITrybeCancelOrderResponse {
|
|
1175
|
+
data: {
|
|
1176
|
+
id: string;
|
|
1177
|
+
};
|
|
1178
|
+
}
|
|
1179
|
+
interface ITrybeAddPaymentToOrderResponse {
|
|
1180
|
+
order_id: string;
|
|
1181
|
+
status: string;
|
|
1182
|
+
}
|
|
1183
|
+
interface ITrybePractitioner {
|
|
1184
|
+
id: string;
|
|
1185
|
+
name: string;
|
|
1186
|
+
organisation_id: string;
|
|
1187
|
+
site_ids: string[];
|
|
1188
|
+
avatar: unknown;
|
|
1189
|
+
appointment_restrictions: unknown[];
|
|
1190
|
+
tag_ids: string[];
|
|
1191
|
+
tags: unknown[];
|
|
1192
|
+
zones: ITrybeZone[];
|
|
1193
|
+
can_offer_tags: unknown[];
|
|
1194
|
+
created_at: string;
|
|
1195
|
+
updated_at: string;
|
|
1196
|
+
}
|
|
1197
|
+
interface ITrybeZone {
|
|
1198
|
+
id: string;
|
|
1199
|
+
name: string;
|
|
1200
|
+
site_id: string;
|
|
1201
|
+
organisation_id: string;
|
|
1202
|
+
}
|
|
1203
|
+
interface ITrybeCreateOrderResponse extends ICreateOrderResponse {
|
|
1204
|
+
meta: {
|
|
1205
|
+
orderReference: string;
|
|
1206
|
+
};
|
|
1207
|
+
}
|
|
1208
|
+
interface ITrybeGetOrderResponse extends IGetOrderResponse {
|
|
1209
|
+
meta: {
|
|
1210
|
+
orderReference: string;
|
|
1211
|
+
};
|
|
1212
|
+
items: Array<{
|
|
1213
|
+
id: string;
|
|
1214
|
+
}>;
|
|
1215
|
+
}
|
|
1216
|
+
interface ITrybeUpdateOrderItemResponse {
|
|
1217
|
+
data: {
|
|
1218
|
+
id: string;
|
|
1219
|
+
};
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
declare enum TRYBE_SUPPORTED_JOURNEYS_ENUM {
|
|
1223
|
+
APPOINTMENT = "APPOINTMENT",
|
|
1224
|
+
SESSION = "SESSION",
|
|
1225
|
+
COURSE = "COURSE"
|
|
1226
|
+
}
|
|
1227
|
+
declare enum TRYBE_CATALOGING_BY_ENUM {
|
|
1228
|
+
PEOPLE_RESOURCE = "PEOPLE_RESOURCE"
|
|
1229
|
+
}
|
|
1230
|
+
interface ITrybeResourceMappingConfiguration {
|
|
1231
|
+
supportedJourneys?: TRYBE_SUPPORTED_JOURNEYS_ENUM[];
|
|
1232
|
+
catalogingBy?: TRYBE_CATALOGING_BY_ENUM;
|
|
1233
|
+
externalCmsUrl?: string;
|
|
1234
|
+
isExternalCmsIntegrationEnabled?: boolean;
|
|
1235
|
+
paymentType?: string;
|
|
1236
|
+
}
|
|
745
1237
|
|
|
746
1238
|
declare class TrybeCustomerManagement implements BaseCustomerManagement {
|
|
747
1239
|
private readonly logger;
|
|
748
1240
|
private readonly trafficGatewayService;
|
|
749
1241
|
private readonly fileName;
|
|
750
1242
|
constructor(logger: LoggerService, trafficGatewayService: TrafficGatewayService);
|
|
751
|
-
createCustomer(): Promise<
|
|
1243
|
+
createCustomer(request: IAddCustomerRequest, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<ITrybeCustomer>;
|
|
752
1244
|
searchCustomer(request: IGetCustomerRequest, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<ITrybeCustomer | undefined>;
|
|
753
|
-
updateCustomer(): Promise<
|
|
1245
|
+
updateCustomer(customerId: string, request: IUpdateCustomerRequest, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<IAddUpdateCustomerResponseData>;
|
|
1246
|
+
deleteCustomer(customerId: string, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<IDeleteAPIResponse>;
|
|
754
1247
|
}
|
|
755
1248
|
|
|
756
1249
|
declare class TrybeAuthService implements BaseAuth {
|
|
@@ -758,7 +1251,7 @@ declare class TrybeAuthService implements BaseAuth {
|
|
|
758
1251
|
private readonly logger;
|
|
759
1252
|
private readonly fileName;
|
|
760
1253
|
constructor(trybeCustomerManagement: TrybeCustomerManagement, logger: LoggerService);
|
|
761
|
-
validateConfig(integration: ICapabilityIntegration, loggedInUserId: bigint): IValidatedCapabilityIntegration;
|
|
1254
|
+
validateConfig(integration: Omit<ICapabilityIntegration, 'id'>, loggedInUserId: bigint): IValidatedCapabilityIntegration;
|
|
762
1255
|
testIntegration(integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<boolean>;
|
|
763
1256
|
fetchAccessToken(integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<string>;
|
|
764
1257
|
}
|
|
@@ -772,16 +1265,32 @@ declare class TrybeCreditBooking implements BaseCreditBooking {
|
|
|
772
1265
|
fetchCustomerCredits(request: IGetCustomerCreditsRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ISystemResponse<ICredit>>;
|
|
773
1266
|
}
|
|
774
1267
|
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
1268
|
+
interface ISiteSystemResponse {
|
|
1269
|
+
customPaymentTypes?: Array<{
|
|
1270
|
+
id: string;
|
|
1271
|
+
name: string;
|
|
1272
|
+
kind: string;
|
|
1273
|
+
}>;
|
|
1274
|
+
}
|
|
778
1275
|
|
|
779
|
-
declare
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
1276
|
+
declare class TrybeIntegrationConfigurationService extends BaseIntegrationConfiguration {
|
|
1277
|
+
private readonly trybeAuthService;
|
|
1278
|
+
private readonly trafficGatewayService;
|
|
1279
|
+
constructor(integrationConfigurationDao: IntegrationConfigurationDao, commonValidationDatabaseService: CommonValidationDatabaseService$1, logger: LoggerService, trybeAuthService: TrybeAuthService, trafficGatewayService: TrafficGatewayService);
|
|
1280
|
+
addCapabilityIntegration(input: IAddCapabilityIntegrationInput, context: GraphQLContext): Promise<AddAPIResponse>;
|
|
1281
|
+
updateCapabilityIntegration(request: IUpdateCapabilityIntegrationRequest, integration?: ICapabilityIntegration, loggedInUserId?: bigint): Promise<IUpdateCapabilityIntegrationResponse>;
|
|
1282
|
+
private validateCapabilityIntegrationConfiguredForInput;
|
|
1283
|
+
getSiteDetailedInformation(integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ISiteSystemResponse | undefined>;
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
declare const OFFERING_INTEGRATION_MAPPING_ALREADY_EXISTS = "OFFERING_INTEGRATION_MAPPING_ALREADY_EXISTS";
|
|
1287
|
+
declare class TrybeIntegrationResourceManagementService extends BaseIntegrationResourceManagement {
|
|
1288
|
+
constructor(logger: LoggerService, integrationResourceManagementDao: IntegrationResourceManagementDao);
|
|
1289
|
+
validateResourceMappingConfig(config: Record<string, unknown>): void;
|
|
1290
|
+
addResourceToIntegration(input: IAddResourceToIntegrationInput, context: GraphQLContext): Promise<IAddResourceToIntegrationResponse>;
|
|
1291
|
+
removeResourceFromIntegration(request: IRemoveResourceFromIntegrationRequest, context: GraphQLContext): Promise<IRemoveResourceFromIntegrationResponse>;
|
|
1292
|
+
updateOfferingIntegrationResourceConfiguration(input: IUpdateOfferingIntegrationResourceConfigurationInput, context: GraphQLContext): Promise<IUpdateOfferingIntegrationResourceConfigurationResponse>;
|
|
1293
|
+
}
|
|
785
1294
|
|
|
786
1295
|
declare class TrybeWellnessManagement implements BaseWellnessManagement {
|
|
787
1296
|
private readonly logger;
|
|
@@ -789,19 +1298,41 @@ declare class TrybeWellnessManagement implements BaseWellnessManagement {
|
|
|
789
1298
|
private readonly trybeAuthService;
|
|
790
1299
|
private readonly fileName;
|
|
791
1300
|
constructor(logger: LoggerService, trafficGatewayService: TrafficGatewayService, trybeAuthService: TrybeAuthService);
|
|
792
|
-
fetchPractitioners(): Promise<void>;
|
|
793
1301
|
fetchWellnessAppointmentSession(): Promise<void>;
|
|
794
1302
|
checkWellnessAppointmentSessionAvailability(): Promise<void>;
|
|
795
1303
|
createWellnessAppointmentSessionOrder(): Promise<void>;
|
|
796
1304
|
addWellnessAppointmentSessionOrderItems(): Promise<void>;
|
|
797
1305
|
confirmWellnessAppointmentSessionOrder(): Promise<void>;
|
|
1306
|
+
createOrder(request: ICreateOrderRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ITrybeCreateOrderResponse>;
|
|
1307
|
+
addCustomerToOrder(orderId: string, customerId: string, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<void>;
|
|
1308
|
+
getOrder(orderId: string, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ITrybeGetOrderResponse>;
|
|
1309
|
+
private mapOfferingTypeToTrybeApi;
|
|
1310
|
+
addItemToOrder(request: IAddItemToOrderRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<IAddItemToOrderResponse>;
|
|
1311
|
+
addCustomerCreditsToOrder(orderId: string, customerCreditId: string, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<void>;
|
|
1312
|
+
submitOrder(orderId: string, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<void>;
|
|
1313
|
+
cancelOrder(orderId: string, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<void>;
|
|
1314
|
+
updateOrder(request: IUpdateOrderRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<IUpdateOrderResponse>;
|
|
1315
|
+
updateOrderItem(orderId: string, itemId: string, request: IUpdateOrderRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ITrybeUpdateOrderItemResponse>;
|
|
1316
|
+
addPaymentToOrder(request: IAddPaymentToOrderRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<void>;
|
|
798
1317
|
fetchAppointments(request: IGetAppointmentsRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ISystemResponse<IBookableItem>>;
|
|
799
1318
|
fetchSessions(request: IGetSessionsRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ISystemResponse<IBookableItem>>;
|
|
800
1319
|
fetchCourses(request: IGetCoursesRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ISystemResponse<IBookableItem>>;
|
|
1320
|
+
fetchPractitioners(request: IGetPractitionersRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ISystemResponse<IOfferingResource>>;
|
|
801
1321
|
fetchCategories(request: IGetCategoriesRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ISystemResponse<IBookableItemCategory>>;
|
|
802
1322
|
fetchBookableItemsFromCredit(request: IGetBookableItemsFromCreditRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ISystemResponse<IBookableItem>>;
|
|
803
1323
|
fetchSessionAvailabilityForOffering(request: IFetchOfferingAvailabilityRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<IGetAvailableDatesAndTimeSlotsResponse>;
|
|
804
1324
|
fetchAppointmentAvailabilityForOffering(request: IFetchOfferingAvailabilityRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<IGetAvailableDatesAndTimeSlotsResponse>;
|
|
805
1325
|
}
|
|
806
1326
|
|
|
807
|
-
|
|
1327
|
+
declare function formatDateForTrybe(date: Date, isStartOfDay: boolean): string;
|
|
1328
|
+
declare function extractTimeFromIsoString(isoString: string): string;
|
|
1329
|
+
declare function convertKeysToCamelCase(object: unknown): unknown;
|
|
1330
|
+
|
|
1331
|
+
declare const fetchAllPages: <T, TResponse extends {
|
|
1332
|
+
data: T[];
|
|
1333
|
+
meta: {
|
|
1334
|
+
last_page: number;
|
|
1335
|
+
};
|
|
1336
|
+
}>(firstPageResponse: TResponse, shouldFetchAll: boolean, fetchPage: (page: number) => Promise<TResponse>) => Promise<T[]>;
|
|
1337
|
+
|
|
1338
|
+
export { BOOKABLE_ITEM_STATUS_ENUM, BOOKABLE_ITEM_TYPE_ENUM, BaseAccountingContactManagement, BaseAccountingCreditNoteManagement, BaseAccountingCustomerManagement, BaseAccountingCustomerPaymentManagement, BaseAccountingInvoiceManagement, BaseAccountingLOAManagement, BaseAccountingTaxManagement, BaseAuth, BaseCreditBooking, BaseCustomerManagement, BaseIntegrationConfiguration, BaseIntegrationResourceManagement, 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 IAddCapabilityIntegrationMappingResponse, type IAddCustomerRequest, type IAddItemToOrderItemConfig, type IAddItemToOrderRequest, type IAddItemToOrderResponse, type IAddPaymentToOrderRequest, type IAddResourceToIntegrationInput, type IAddResourceToIntegrationResponse, type IAddUpdateCustomerResponseData, type IApiCallRequest, type IAvailableDateWithSlots, type IAvailableTimeSlot, type IBookableItem, type IBookableItemCategory, type IBookableItemMedia, type IBookableItemPrice, type IBookableItemPriceMeta, type ICapabilityIntegration, type ICapabilityIntegrationConfig, type ICapabilityIntegrationResourceMappingRow, type ICreateOrderRequest, type ICreateOrderResponse, type ICredit, type ICustomer, type ICustomerLastCheckIn, type IDeleteAPIResponse, type IFetchOfferingAvailabilityRequest, type IGetAppointmentsRequest, type IGetAvailableDatesAndTimeSlotsResponse, type IGetBookableItemsFromCreditRequest, type IGetCapabilityIntegrationInput, type IGetCapabilityIntegrationResult, type IGetCapabilityIntegrationsFilterInput, type IGetCapabilityIntegrationsOptionsInput, type IGetCapabilityIntegrationsRequest, type IGetCapabilityIntegrationsResponse, type IGetCapabilityIntegrationsSortingInput, 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 IRemoveCapabilityIntegrationMappingInput, type IRemoveResourceFromIntegrationRequest, type IRemoveResourceFromIntegrationResponse, 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 ITrybeResourceMappingConfiguration, 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 IUpdateAPIResponse, type IUpdateCapabilityIntegration, type IUpdateCapabilityIntegrationRequest, type IUpdateCapabilityIntegrationResponse, type IUpdateCapabilityIntegrationUpdateData, type IUpdateCustomerRequest, type IUpdateOfferingIntegrationResourceConfigurationInput, type IUpdateOfferingIntegrationResourceConfigurationResponse, type IUpdateOrderRequest, type IUpdateOrderResponse, type IValidatedCapabilityIntegration, type IValidatedCapabilityIntegrationConfig, type IWellnessManagementRequestOptions, IntegrationConfigurationDao, AppModule as IntegrationLibsModule, IntegrationRequestLoggerService, IntegrationResourceManagementDao, AppModule$1 as IntegrationTrybeModule, IntegrationUserManagementDao, OFFERING_INTEGRATION_MAPPING_ALREADY_EXISTS, AppModule$2 as OfferingIntegrationManager, RateLimiterService, TRAFFIC_ROUTER_CONFIGURATION_STORE_KEY, TRYBE_CATALOGING_BY_ENUM, TRYBE_OFFERING_TYPE_API, TRYBE_OFFERING_TYPE_ENUM, TRYBE_SUPPORTED_JOURNEYS_ENUM, TrafficGatewayService, TrybeAuthService, TrybeCreditBooking, TrybeCustomerManagement, TrybeIntegrationConfigurationService, TrybeIntegrationResourceManagementService, type TrybeOfferingTypeApi, TrybeWellnessManagement, convertKeysToCamelCase, extractTimeFromIsoString, fetchAllPages, formatDateForTrybe };
|