@dv4resi/dvss-backend-module-offering-im 0.0.21 → 0.0.23
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 +276 -85
- package/dist/index.js +968 -335
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { LoggerService, GraphQLContext, IMedia, AddAPIResponse, BEHAVIOUR_TYPE_ENUM, ITrybeBookingData } from '@dv4resi/dvss-backend-module-utility';
|
|
2
|
+
import { OFFERING_BOOKING_TYPE_ENUM, OFFERING_BOOKING_TIME_TYPE } from '@dv4resi/dvss-backend-module-datastore/dist/datastore/models/offering-booking.model';
|
|
3
|
+
import { schema, CommonValidationDatabaseService, OPERATIONAL_STATUS_CATEGORY as OPERATIONAL_STATUS_CATEGORY$1 } from '@dv4resi/dvss-backend-module-datastore';
|
|
4
|
+
import { CONFIGURED_FOR_TYPE_ENUM, MEDIA_PROVIDER_ENUM, IAddUpdateAPIStatusResponseBigInt, DAY_OF_WEEK, OFFERING_RESOURCE_TYPE, STATUS, OPERATIONAL_STATUS_CATEGORY } from '@dv4resi/dvss-backend-module-datastore/dist/datastore/models';
|
|
4
5
|
import { CAPABILITY_PROVIDER_INTEGRATION_ENUM, CAPABILITY_CATEGORY_ENUM, ICapability } from '@dv4resi/dvss-backend-module-datastore/dist/datastore/models/capability.model';
|
|
5
|
-
import {
|
|
6
|
+
import { HttpService } from '@nestjs/axios';
|
|
6
7
|
import { MySql2Database } from 'drizzle-orm/mysql2';
|
|
7
8
|
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';
|
|
9
9
|
|
|
10
10
|
declare class AppModule$2 {
|
|
11
11
|
}
|
|
@@ -47,12 +47,81 @@ declare class IntegrationRequestLoggerService {
|
|
|
47
47
|
logResponse(logData: IIntegrationRequestLog): void;
|
|
48
48
|
logError(logData: IIntegrationRequestLog): void;
|
|
49
49
|
logIntegrationRequest(logData: IIntegrationRequestLog): void;
|
|
50
|
+
private sanitizeHeaders;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
declare class RateLimiterService {
|
|
53
54
|
validateAndEnforceRateLimit(): Promise<void>;
|
|
54
55
|
}
|
|
55
56
|
|
|
57
|
+
type IAddCapabilityIntegration = typeof schema.capabilityIntegration.$inferInsert & {
|
|
58
|
+
configuredFor?: {
|
|
59
|
+
configuredForId: bigint;
|
|
60
|
+
configuredForType: CONFIGURED_FOR_TYPE_ENUM;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
type IUpdateCapabilityIntegration = Partial<typeof schema.capabilityIntegration.$inferInsert>;
|
|
64
|
+
type IAddCapIntegResourceMapping = typeof schema.capIntegResourceMapping.$inferInsert;
|
|
65
|
+
interface IAddCapabilityIntegrationMappingResponse {
|
|
66
|
+
status: boolean;
|
|
67
|
+
ids: bigint[];
|
|
68
|
+
}
|
|
69
|
+
interface IRemoveCapabilityIntegrationMappingInput {
|
|
70
|
+
capabilityIntegrationId: bigint;
|
|
71
|
+
configuredForId: bigint;
|
|
72
|
+
configuredForType: CONFIGURED_FOR_TYPE_ENUM;
|
|
73
|
+
}
|
|
74
|
+
interface IDeleteAPIResponse {
|
|
75
|
+
status: boolean;
|
|
76
|
+
}
|
|
77
|
+
interface IUpdateAPIResponse {
|
|
78
|
+
status: boolean;
|
|
79
|
+
}
|
|
80
|
+
interface ICapabilityIntegrationResourceMappingRow {
|
|
81
|
+
id: bigint;
|
|
82
|
+
capabilityIntegrationId: bigint;
|
|
83
|
+
configuredForId: bigint;
|
|
84
|
+
configuredForType: CONFIGURED_FOR_TYPE_ENUM;
|
|
85
|
+
}
|
|
86
|
+
interface IGetCapabilityIntegrationInput {
|
|
87
|
+
projectId: number;
|
|
88
|
+
id?: bigint;
|
|
89
|
+
category?: CAPABILITY_CATEGORY_ENUM;
|
|
90
|
+
fetchBy?: {
|
|
91
|
+
configuredForId: string | bigint;
|
|
92
|
+
configuredForType: CONFIGURED_FOR_TYPE_ENUM;
|
|
93
|
+
category?: CAPABILITY_CATEGORY_ENUM;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
type IGetCapabilityIntegrationResult = typeof schema.capabilityIntegration.$inferSelect & {
|
|
97
|
+
provider?: CAPABILITY_PROVIDER_INTEGRATION_ENUM | null;
|
|
98
|
+
resourceMappingId?: bigint;
|
|
99
|
+
configuredForId?: bigint;
|
|
100
|
+
configuredForType?: typeof schema.capIntegResourceMapping.$inferSelect.configuredForType;
|
|
101
|
+
resourceMappingConfig?: typeof schema.capIntegResourceMapping.$inferSelect.config;
|
|
102
|
+
};
|
|
103
|
+
interface IOfferingBookingOccurrence$1 {
|
|
104
|
+
offeringBookingOccurrence: typeof schema.offeringBookingOccurrence.$inferSelect;
|
|
105
|
+
offering: typeof schema.offering.$inferSelect;
|
|
106
|
+
offeringIntentId: bigint;
|
|
107
|
+
}
|
|
108
|
+
type CapabilityIntegrationCategory = typeof schema.capabilityIntegration.$inferSelect.category;
|
|
109
|
+
|
|
110
|
+
declare class IntegrationBookingDao {
|
|
111
|
+
private readonly conn;
|
|
112
|
+
private readonly logger;
|
|
113
|
+
private readonly fileName;
|
|
114
|
+
constructor(conn: MySql2Database<typeof schema>, logger: LoggerService);
|
|
115
|
+
getOfferingBookingOccurrence(input: {
|
|
116
|
+
offeringBookingOccurrenceId: bigint;
|
|
117
|
+
loggedInUserId: bigint;
|
|
118
|
+
offeringBookingId?: bigint;
|
|
119
|
+
}): Promise<IOfferingBookingOccurrence$1 | undefined>;
|
|
120
|
+
getOfferingIntent(input: {
|
|
121
|
+
offeringIntentId: bigint;
|
|
122
|
+
}): Promise<typeof schema.offeringIntent.$inferSelect | undefined>;
|
|
123
|
+
}
|
|
124
|
+
|
|
56
125
|
declare class IntegrationCommonDao {
|
|
57
126
|
private readonly conn;
|
|
58
127
|
private readonly logger;
|
|
@@ -65,7 +134,10 @@ declare class IntegrationCommonDao {
|
|
|
65
134
|
}
|
|
66
135
|
|
|
67
136
|
declare enum INTEGRATION_PROVIDER_ENUM {
|
|
68
|
-
TRYBE = "TRYBE"
|
|
137
|
+
TRYBE = "TRYBE",
|
|
138
|
+
SUPREMA_BIOSTAR = "SUPREMA_BIOSTAR",
|
|
139
|
+
SALTO_PRO = "SALTO_PRO",
|
|
140
|
+
SCHINDLER = "SCHINDLER"
|
|
69
141
|
}
|
|
70
142
|
interface IPlatformConfig {
|
|
71
143
|
baseUrl?: string;
|
|
@@ -134,6 +206,14 @@ interface IUpdateCapabilityIntegrationUpdateData {
|
|
|
134
206
|
icon?: IIcon;
|
|
135
207
|
config?: IAddCapabilityIntegrationConfig;
|
|
136
208
|
parentId?: bigint;
|
|
209
|
+
propertyId?: number;
|
|
210
|
+
capabilityId?: bigint;
|
|
211
|
+
capabilityProviderId?: bigint;
|
|
212
|
+
subcategory?: string;
|
|
213
|
+
capabilityIntegrationResourceId?: bigint;
|
|
214
|
+
groupId?: bigint;
|
|
215
|
+
status?: CAPABILITY_INTEGRATION_STATUS_ENUM;
|
|
216
|
+
availableFor?: CAPABILITY_RESOURCE_AVAILABLE_FOR_ENUM;
|
|
137
217
|
}
|
|
138
218
|
interface IUpdateCapabilityIntegrationRequest {
|
|
139
219
|
id: bigint;
|
|
@@ -168,53 +248,6 @@ interface IGetCapabilityIntegrationsResponse {
|
|
|
168
248
|
records: ICapabilityIntegration[];
|
|
169
249
|
}
|
|
170
250
|
|
|
171
|
-
type IAddCapabilityIntegration = typeof schema.capabilityIntegration.$inferInsert & {
|
|
172
|
-
configuredFor?: {
|
|
173
|
-
configuredForId: bigint;
|
|
174
|
-
configuredForType: CONFIGURED_FOR_TYPE_ENUM;
|
|
175
|
-
};
|
|
176
|
-
};
|
|
177
|
-
type IUpdateCapabilityIntegration = Partial<typeof schema.capabilityIntegration.$inferInsert>;
|
|
178
|
-
type IAddCapIntegResourceMapping = typeof schema.capIntegResourceMapping.$inferInsert;
|
|
179
|
-
interface IAddCapabilityIntegrationMappingResponse {
|
|
180
|
-
status: boolean;
|
|
181
|
-
ids: bigint[];
|
|
182
|
-
}
|
|
183
|
-
interface IRemoveCapabilityIntegrationMappingInput {
|
|
184
|
-
capabilityIntegrationId: bigint;
|
|
185
|
-
configuredForId: bigint;
|
|
186
|
-
configuredForType: CONFIGURED_FOR_TYPE_ENUM;
|
|
187
|
-
}
|
|
188
|
-
interface IDeleteAPIResponse {
|
|
189
|
-
status: boolean;
|
|
190
|
-
}
|
|
191
|
-
interface IUpdateAPIResponse {
|
|
192
|
-
status: boolean;
|
|
193
|
-
}
|
|
194
|
-
interface ICapabilityIntegrationResourceMappingRow {
|
|
195
|
-
id: bigint;
|
|
196
|
-
capabilityIntegrationId: bigint;
|
|
197
|
-
configuredForId: bigint;
|
|
198
|
-
configuredForType: CONFIGURED_FOR_TYPE_ENUM;
|
|
199
|
-
}
|
|
200
|
-
interface IGetCapabilityIntegrationInput {
|
|
201
|
-
projectId: number;
|
|
202
|
-
id?: bigint;
|
|
203
|
-
category?: CAPABILITY_CATEGORY_ENUM;
|
|
204
|
-
fetchBy?: {
|
|
205
|
-
configuredForId: string | bigint;
|
|
206
|
-
configuredForType: CONFIGURED_FOR_TYPE_ENUM;
|
|
207
|
-
category?: CAPABILITY_CATEGORY_ENUM;
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
type IGetCapabilityIntegrationResult = typeof schema.capabilityIntegration.$inferSelect & {
|
|
211
|
-
provider?: CAPABILITY_PROVIDER_INTEGRATION_ENUM | null;
|
|
212
|
-
resourceMappingId?: bigint;
|
|
213
|
-
configuredForId?: bigint;
|
|
214
|
-
configuredForType?: typeof schema.capIntegResourceMapping.$inferSelect.configuredForType;
|
|
215
|
-
resourceMappingConfig?: typeof schema.capIntegResourceMapping.$inferSelect.config;
|
|
216
|
-
};
|
|
217
|
-
|
|
218
251
|
declare class IntegrationConfigurationDao {
|
|
219
252
|
private readonly conn;
|
|
220
253
|
private readonly logger;
|
|
@@ -253,6 +286,33 @@ declare class IntegrationConfigurationDao {
|
|
|
253
286
|
private applyFilters;
|
|
254
287
|
}
|
|
255
288
|
|
|
289
|
+
declare class IntegrationSubcapabilityDao {
|
|
290
|
+
private readonly conn;
|
|
291
|
+
private readonly logger;
|
|
292
|
+
private readonly fileName;
|
|
293
|
+
constructor(conn: MySql2Database<typeof schema>, logger: LoggerService);
|
|
294
|
+
getSubcapabilityId(input: {
|
|
295
|
+
capabilityId: bigint;
|
|
296
|
+
name: string;
|
|
297
|
+
}, loggedInUserId: bigint): Promise<bigint | undefined>;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
type IAddServiceCommunicationTopic = typeof schema.serviceCommunicationTopic.$inferInsert;
|
|
301
|
+
type IGetServiceCommunicationTopic = typeof schema.serviceCommunicationTopic.$inferSelect & {
|
|
302
|
+
subcapability: typeof schema.subcapability.$inferSelect;
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
declare class IntegrationServiceCommunicationTopicDao {
|
|
306
|
+
private readonly conn;
|
|
307
|
+
private readonly logger;
|
|
308
|
+
private readonly fileName;
|
|
309
|
+
constructor(conn: MySql2Database<typeof schema>, logger: LoggerService);
|
|
310
|
+
upsertTopic(input: IAddServiceCommunicationTopic, loggedInUserId?: bigint): Promise<{
|
|
311
|
+
status: boolean;
|
|
312
|
+
}>;
|
|
313
|
+
getServiceCommunicationTopics(integrationId: bigint, loggedInUserId?: bigint): Promise<IGetServiceCommunicationTopic[]>;
|
|
314
|
+
}
|
|
315
|
+
|
|
256
316
|
declare class IntegrationResourceManagementDao {
|
|
257
317
|
private readonly conn;
|
|
258
318
|
private readonly logger;
|
|
@@ -287,6 +347,22 @@ declare class IntegrationUserManagementDao {
|
|
|
287
347
|
constructor(conn: MySql2Database<typeof schema>);
|
|
288
348
|
}
|
|
289
349
|
|
|
350
|
+
type IAddOnpremDeployment = typeof schema.onPremDeployment.$inferInsert;
|
|
351
|
+
|
|
352
|
+
declare class IntegrationOnpremDeploymentDao {
|
|
353
|
+
private readonly conn;
|
|
354
|
+
private readonly logger;
|
|
355
|
+
private readonly fileName;
|
|
356
|
+
constructor(conn: MySql2Database<typeof schema>, logger: LoggerService);
|
|
357
|
+
addUpdateOnpremDeployment(input: IAddOnpremDeployment, loggedInUserId?: bigint): Promise<IAddUpdateAPIStatusResponseBigInt>;
|
|
358
|
+
private addOnpremDeployment;
|
|
359
|
+
private updateOnpremDeployment;
|
|
360
|
+
getOnpremDeployment(input: {
|
|
361
|
+
integrationId: bigint;
|
|
362
|
+
projectId: number;
|
|
363
|
+
}, loggedInUserId?: bigint): Promise<typeof schema.onPremDeployment.$inferSelect | undefined>;
|
|
364
|
+
}
|
|
365
|
+
|
|
290
366
|
interface IGetCustomerRequest {
|
|
291
367
|
email?: string;
|
|
292
368
|
customerId?: string;
|
|
@@ -684,10 +760,10 @@ declare abstract class BaseCreditBooking {
|
|
|
684
760
|
}
|
|
685
761
|
|
|
686
762
|
declare abstract class BaseCustomerManagement {
|
|
687
|
-
abstract createCustomer(request: IAddCustomerRequest, integration:
|
|
688
|
-
abstract searchCustomer(request: IGetCustomerRequest, integration:
|
|
689
|
-
abstract updateCustomer(customerId: string, request: IUpdateCustomerRequest, integration:
|
|
690
|
-
abstract deleteCustomer(customerId: string, integration:
|
|
763
|
+
abstract createCustomer(request: IAddCustomerRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ICustomer>;
|
|
764
|
+
abstract searchCustomer(request: IGetCustomerRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ICustomer | undefined>;
|
|
765
|
+
abstract updateCustomer(customerId: string, request: IUpdateCustomerRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<IAddUpdateCustomerResponseData>;
|
|
766
|
+
abstract deleteCustomer(customerId: string, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<IDeleteAPIResponse>;
|
|
691
767
|
}
|
|
692
768
|
|
|
693
769
|
declare abstract class BasePackageManagement {
|
|
@@ -771,7 +847,7 @@ declare class BaseIntegrationConfiguration {
|
|
|
771
847
|
protected readonly integrationConfigurationDao: IntegrationConfigurationDao;
|
|
772
848
|
protected readonly commonValidationDatabaseService: CommonValidationDatabaseService;
|
|
773
849
|
protected readonly logger: LoggerService;
|
|
774
|
-
protected readonly fileName
|
|
850
|
+
protected readonly fileName: string;
|
|
775
851
|
constructor(integrationConfigurationDao: IntegrationConfigurationDao, commonValidationDatabaseService: CommonValidationDatabaseService, logger: LoggerService);
|
|
776
852
|
private validateAddCapabilityIntegrationInput;
|
|
777
853
|
addCapabilityIntegration(input: IAddCapabilityIntegrationInput, context: GraphQLContext): Promise<AddAPIResponse>;
|
|
@@ -843,6 +919,89 @@ interface IGetTrybeResourcesCommonResponse<T> {
|
|
|
843
919
|
meta: ITrybeGetResourcesCommonMeta;
|
|
844
920
|
}
|
|
845
921
|
|
|
922
|
+
interface AddOfferingBookingItemResourceInput {
|
|
923
|
+
id: string | number | bigint;
|
|
924
|
+
type?: string;
|
|
925
|
+
}
|
|
926
|
+
interface AddOfferingBookingItemInput {
|
|
927
|
+
externalId?: string;
|
|
928
|
+
type?: string;
|
|
929
|
+
resources?: AddOfferingBookingItemResourceInput[];
|
|
930
|
+
}
|
|
931
|
+
interface ITrybeWebhookBookingMeta {
|
|
932
|
+
createdViaWebhook?: boolean;
|
|
933
|
+
externalId?: string;
|
|
934
|
+
orderRef?: string;
|
|
935
|
+
items?: Array<{
|
|
936
|
+
id: string;
|
|
937
|
+
externalId?: string;
|
|
938
|
+
type?: string;
|
|
939
|
+
name?: string;
|
|
940
|
+
totalPrice?: number;
|
|
941
|
+
}>;
|
|
942
|
+
payments?: unknown[];
|
|
943
|
+
totalCost?: number;
|
|
944
|
+
totalPaidOrAuthed?: number;
|
|
945
|
+
dueAmount?: number;
|
|
946
|
+
paymentStatus?: string;
|
|
947
|
+
}
|
|
948
|
+
interface AddOfferingBookingInput {
|
|
949
|
+
name: string;
|
|
950
|
+
description?: string;
|
|
951
|
+
offeringId: bigint;
|
|
952
|
+
offeringIntentId: bigint;
|
|
953
|
+
offeringJourneyId: bigint;
|
|
954
|
+
projectId: number;
|
|
955
|
+
propertyId: number;
|
|
956
|
+
bookingStartDateLabel: string;
|
|
957
|
+
bookingEndDateLabel?: string;
|
|
958
|
+
bookingStartTimeLabel?: string;
|
|
959
|
+
bookingEndTimeLabel?: string;
|
|
960
|
+
durationInMinutes?: number;
|
|
961
|
+
isFullDay?: boolean;
|
|
962
|
+
isRecurring?: boolean;
|
|
963
|
+
paxCount?: number;
|
|
964
|
+
meta?: ITrybeWebhookBookingMeta;
|
|
965
|
+
requestedForUserIdentityId?: bigint;
|
|
966
|
+
userBehaviorId?: bigint;
|
|
967
|
+
userBehaviorType?: BEHAVIOUR_TYPE_ENUM;
|
|
968
|
+
requestedForType?: string;
|
|
969
|
+
requestedForIds?: bigint[];
|
|
970
|
+
recipientType?: string;
|
|
971
|
+
recipientIds?: bigint[];
|
|
972
|
+
shouldNotifyUsers?: boolean;
|
|
973
|
+
bookingType: OFFERING_BOOKING_TYPE_ENUM;
|
|
974
|
+
items: AddOfferingBookingItemInput[];
|
|
975
|
+
preferences?: unknown[];
|
|
976
|
+
customFields?: unknown[];
|
|
977
|
+
assets?: unknown[];
|
|
978
|
+
tenantId?: bigint;
|
|
979
|
+
notes?: string | null;
|
|
980
|
+
schedule?: unknown;
|
|
981
|
+
offeringBookableItemSlotId?: bigint;
|
|
982
|
+
overrideDates?: string[];
|
|
983
|
+
paymentMethod?: unknown;
|
|
984
|
+
paymentStatus?: string;
|
|
985
|
+
invoiceStatus?: string;
|
|
986
|
+
locationId?: bigint;
|
|
987
|
+
bookingTimeType?: OFFERING_BOOKING_TIME_TYPE;
|
|
988
|
+
}
|
|
989
|
+
interface TrybeStatusUpdateInput {
|
|
990
|
+
offeringId: bigint;
|
|
991
|
+
offeringBookingOccurrenceIds: bigint[];
|
|
992
|
+
targetStatusCategory: OPERATIONAL_STATUS_CATEGORY;
|
|
993
|
+
note?: string;
|
|
994
|
+
}
|
|
995
|
+
type IOfferingIntent = typeof schema.offeringIntent.$inferSelect;
|
|
996
|
+
type IOfferingBookingOccurrence = typeof schema.offeringBookingOccurrence.$inferSelect;
|
|
997
|
+
type IOffering = typeof schema.offering.$inferSelect;
|
|
998
|
+
interface ITrybeStatusUpdate {
|
|
999
|
+
statusInput: TrybeStatusUpdateInput;
|
|
1000
|
+
occurrence: IOfferingBookingOccurrence;
|
|
1001
|
+
offering: IOffering;
|
|
1002
|
+
offeringIntent: IOfferingIntent;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
846
1005
|
interface ITrybeCredit {
|
|
847
1006
|
id: string;
|
|
848
1007
|
coupon_name: string;
|
|
@@ -1222,6 +1381,7 @@ interface ITrybeCreateOrderResponse extends ICreateOrderResponse {
|
|
|
1222
1381
|
subTotal: number;
|
|
1223
1382
|
totalTax: number;
|
|
1224
1383
|
discount: number;
|
|
1384
|
+
serviceCharge: number;
|
|
1225
1385
|
};
|
|
1226
1386
|
}
|
|
1227
1387
|
interface ITrybeGetOrderResponse extends IGetOrderResponse {
|
|
@@ -1422,13 +1582,13 @@ interface ITrybeSubmitOrderResponse {
|
|
|
1422
1582
|
net_total: number;
|
|
1423
1583
|
tip_amount: number;
|
|
1424
1584
|
tips: [];
|
|
1425
|
-
service_charge
|
|
1426
|
-
amount
|
|
1427
|
-
percentage
|
|
1585
|
+
service_charge?: {
|
|
1586
|
+
amount?: number;
|
|
1587
|
+
percentage?: number;
|
|
1428
1588
|
item_amounts: {
|
|
1429
|
-
item_id
|
|
1430
|
-
amount
|
|
1431
|
-
percentage
|
|
1589
|
+
item_id?: string;
|
|
1590
|
+
amount?: number;
|
|
1591
|
+
percentage?: number;
|
|
1432
1592
|
}[];
|
|
1433
1593
|
};
|
|
1434
1594
|
submit_payment_amount: number;
|
|
@@ -1443,7 +1603,12 @@ interface ITrybeSubmitOrderResponse {
|
|
|
1443
1603
|
unpaid: number;
|
|
1444
1604
|
};
|
|
1445
1605
|
total_paid_or_authed: number;
|
|
1446
|
-
taxes
|
|
1606
|
+
taxes?: {
|
|
1607
|
+
amount?: number;
|
|
1608
|
+
percentage?: number;
|
|
1609
|
+
name?: string;
|
|
1610
|
+
inclusive?: boolean;
|
|
1611
|
+
}[];
|
|
1447
1612
|
payments: [];
|
|
1448
1613
|
discounts: [];
|
|
1449
1614
|
applied_promo_code_id: null;
|
|
@@ -1468,17 +1633,6 @@ interface ITrybeResourceMappingConfiguration {
|
|
|
1468
1633
|
paymentType?: string;
|
|
1469
1634
|
}
|
|
1470
1635
|
|
|
1471
|
-
declare class TrybeCustomerManagement implements BaseCustomerManagement {
|
|
1472
|
-
private readonly logger;
|
|
1473
|
-
private readonly trafficGatewayService;
|
|
1474
|
-
private readonly fileName;
|
|
1475
|
-
constructor(logger: LoggerService, trafficGatewayService: TrafficGatewayService);
|
|
1476
|
-
createCustomer(request: IAddCustomerRequest, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<ITrybeCustomer>;
|
|
1477
|
-
searchCustomer(request: IGetCustomerRequest, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<ITrybeCustomer | undefined>;
|
|
1478
|
-
updateCustomer(customerId: string, request: IUpdateCustomerRequest, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<IAddUpdateCustomerResponseData>;
|
|
1479
|
-
deleteCustomer(customerId: string, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<IDeleteAPIResponse>;
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
1636
|
declare class TrybeAuthService implements BaseAuth {
|
|
1483
1637
|
private readonly trybeCustomerManagement;
|
|
1484
1638
|
private readonly logger;
|
|
@@ -1489,12 +1643,33 @@ declare class TrybeAuthService implements BaseAuth {
|
|
|
1489
1643
|
fetchAccessToken(integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<string>;
|
|
1490
1644
|
}
|
|
1491
1645
|
|
|
1646
|
+
declare class TrybeApiClientService {
|
|
1647
|
+
private readonly trybeAuthService;
|
|
1648
|
+
private readonly trafficGatewayService;
|
|
1649
|
+
constructor(trybeAuthService: TrybeAuthService, trafficGatewayService: TrafficGatewayService);
|
|
1650
|
+
executeRequest<TResponse, TBody = unknown>(request: {
|
|
1651
|
+
apiMethod: HTTP_METHOD;
|
|
1652
|
+
url: string;
|
|
1653
|
+
body?: TBody;
|
|
1654
|
+
}, integration: ICapabilityIntegration | Omit<ICapabilityIntegration, 'id'>, loggedInUserId: bigint): Promise<TResponse>;
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
declare class TrybeCustomerManagement implements BaseCustomerManagement {
|
|
1658
|
+
private readonly logger;
|
|
1659
|
+
private readonly trybeApiClientService;
|
|
1660
|
+
private readonly fileName;
|
|
1661
|
+
constructor(logger: LoggerService, trybeApiClientService: TrybeApiClientService);
|
|
1662
|
+
createCustomer(request: IAddCustomerRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ITrybeCustomer>;
|
|
1663
|
+
searchCustomer(request: IGetCustomerRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ITrybeCustomer | undefined>;
|
|
1664
|
+
updateCustomer(customerId: string, request: IUpdateCustomerRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<IAddUpdateCustomerResponseData>;
|
|
1665
|
+
deleteCustomer(customerId: string, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<IDeleteAPIResponse>;
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1492
1668
|
declare class TrybeCreditBooking implements BaseCreditBooking {
|
|
1493
1669
|
private readonly logger;
|
|
1494
|
-
private readonly
|
|
1495
|
-
private readonly trybeAuthService;
|
|
1670
|
+
private readonly trybeApiClientService;
|
|
1496
1671
|
private readonly fileName;
|
|
1497
|
-
constructor(logger: LoggerService,
|
|
1672
|
+
constructor(logger: LoggerService, trybeApiClientService: TrybeApiClientService);
|
|
1498
1673
|
fetchCustomerCredits(request: IGetCustomerCreditsRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<ISystemResponse<ICredit>>;
|
|
1499
1674
|
}
|
|
1500
1675
|
|
|
@@ -1508,9 +1683,9 @@ interface ISiteSystemResponse {
|
|
|
1508
1683
|
}
|
|
1509
1684
|
|
|
1510
1685
|
declare class TrybeIntegrationConfigurationService extends BaseIntegrationConfiguration {
|
|
1686
|
+
private readonly trybeApiClientService;
|
|
1511
1687
|
private readonly trybeAuthService;
|
|
1512
|
-
|
|
1513
|
-
constructor(integrationConfigurationDao: IntegrationConfigurationDao, commonValidationDatabaseService: CommonValidationDatabaseService$1, logger: LoggerService, trybeAuthService: TrybeAuthService, trafficGatewayService: TrafficGatewayService);
|
|
1688
|
+
constructor(integrationConfigurationDao: IntegrationConfigurationDao, commonValidationDatabaseService: CommonValidationDatabaseService, logger: LoggerService, trybeApiClientService: TrybeApiClientService, trybeAuthService: TrybeAuthService);
|
|
1514
1689
|
addCapabilityIntegration(input: IAddCapabilityIntegrationInput, context: GraphQLContext): Promise<AddAPIResponse>;
|
|
1515
1690
|
updateCapabilityIntegration(request: IUpdateCapabilityIntegrationRequest, integration?: ICapabilityIntegration, loggedInUserId?: bigint): Promise<IUpdateCapabilityIntegrationResponse>;
|
|
1516
1691
|
private validateCapabilityIntegrationConfiguredForInput;
|
|
@@ -1528,11 +1703,10 @@ declare class TrybeIntegrationResourceManagementService extends BaseIntegrationR
|
|
|
1528
1703
|
|
|
1529
1704
|
declare class TrybeWellnessManagement implements BaseWellnessManagement {
|
|
1530
1705
|
private readonly logger;
|
|
1531
|
-
private readonly
|
|
1532
|
-
private readonly trybeAuthService;
|
|
1706
|
+
private readonly trybeApiClientService;
|
|
1533
1707
|
private readonly integrationCommonDao;
|
|
1534
1708
|
private readonly fileName;
|
|
1535
|
-
constructor(logger: LoggerService,
|
|
1709
|
+
constructor(logger: LoggerService, trybeApiClientService: TrybeApiClientService, integrationCommonDao: IntegrationCommonDao);
|
|
1536
1710
|
fetchWellnessAppointmentSession(): Promise<void>;
|
|
1537
1711
|
checkWellnessAppointmentSessionAvailability(): Promise<void>;
|
|
1538
1712
|
createWellnessAppointmentSessionOrder(): Promise<void>;
|
|
@@ -1592,4 +1766,21 @@ declare const fetchAllPages: <T, TResponse extends {
|
|
|
1592
1766
|
};
|
|
1593
1767
|
}>(firstPageResponse: TResponse, shouldFetchAll: boolean, fetchPage: (page: number) => Promise<TResponse>) => Promise<T[]>;
|
|
1594
1768
|
|
|
1595
|
-
|
|
1769
|
+
declare class TrybeWebhookUtilService {
|
|
1770
|
+
private readonly integrationBookingDao;
|
|
1771
|
+
private readonly logger;
|
|
1772
|
+
private readonly fileName;
|
|
1773
|
+
constructor(integrationBookingDao: IntegrationBookingDao, logger: LoggerService);
|
|
1774
|
+
mapTrybeOrderToBookingInput(bookingData: ITrybeBookingData, userIdentityId: bigint, ids: {
|
|
1775
|
+
offeringId: bigint;
|
|
1776
|
+
projectId: number;
|
|
1777
|
+
propertyId: number;
|
|
1778
|
+
intentId: bigint;
|
|
1779
|
+
journeyId: bigint;
|
|
1780
|
+
propertyTimezone?: string;
|
|
1781
|
+
}): AddOfferingBookingInput;
|
|
1782
|
+
mapTrybeOrderToUpdateOfferingBookingStatusInput(offeringBookingOccurrenceId: bigint, offeringBookingId: bigint, targetStatusCategory: OPERATIONAL_STATUS_CATEGORY$1, note?: string): Promise<ITrybeStatusUpdate>;
|
|
1783
|
+
private mapTrybeItemTypeToEnum;
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
export { type AddOfferingBookingInput, type AddOfferingBookingItemInput, type AddOfferingBookingItemResourceInput, 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, type CapabilityIntegrationCategory, 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 IOfferingBookingOccurrence$1 as IOfferingBookingOccurrence, type IOfferingIntent, 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 ITrybeStatusUpdate, type ITrybeSubmitOrderResponse, type ITrybeUpdateOrderItemResponse, type ITrybeWebhookBookingMeta, 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, IntegrationBookingDao, IntegrationCommonDao, IntegrationConfigurationDao, AppModule as IntegrationLibsModule, IntegrationOnpremDeploymentDao, IntegrationRequestLoggerService, IntegrationResourceManagementDao, IntegrationServiceCommunicationTopicDao, IntegrationSubcapabilityDao, 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, TrybeApiClientService, TrybeAuthService, TrybeCreditBooking, TrybeCustomerManagement, TrybeIntegrationConfigurationService, TrybeIntegrationResourceManagementService, type TrybeOfferingTypeApi, type TrybeStatusUpdateInput, TrybeWebhookUtilService, TrybeWellnessManagement, convertKeysToCamelCase, extractTimeFromIsoString, fetchAllPages, formatDateForTrybe };
|