@dv4resi/dvss-backend-module-offering-im 0.0.24 → 0.0.25
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 +298 -63
- package/dist/index.js +431 -90
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LoggerService, GraphQLContext, IMedia, AddAPIResponse, BEHAVIOUR_TYPE_ENUM, ITrybeBookingData } from '@dv4resi/dvss-backend-module-utility';
|
|
2
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';
|
|
3
|
+
import { schema, CAPABILITY_PROVIDER_INTEGRATION_ENUM as CAPABILITY_PROVIDER_INTEGRATION_ENUM$1, CommonValidationDatabaseService, OPERATIONAL_STATUS_CATEGORY as OPERATIONAL_STATUS_CATEGORY$1 } from '@dv4resi/dvss-backend-module-datastore';
|
|
4
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';
|
|
5
5
|
import { CAPABILITY_PROVIDER_INTEGRATION_ENUM, CAPABILITY_CATEGORY_ENUM, ICapability } from '@dv4resi/dvss-backend-module-datastore/dist/datastore/models/capability.model';
|
|
6
6
|
import { HttpService } from '@nestjs/axios';
|
|
@@ -59,7 +59,17 @@ type IAddCapabilityIntegration = typeof schema.capabilityIntegration.$inferInser
|
|
|
59
59
|
configuredForId: bigint;
|
|
60
60
|
configuredForType: CONFIGURED_FOR_TYPE_ENUM;
|
|
61
61
|
};
|
|
62
|
+
resourceMappings?: Array<{
|
|
63
|
+
configuredForId: bigint;
|
|
64
|
+
configuredForType: CONFIGURED_FOR_TYPE_ENUM;
|
|
65
|
+
config?: typeof schema.capIntegResourceMapping.$inferSelect.config;
|
|
66
|
+
}>;
|
|
62
67
|
};
|
|
68
|
+
interface ICapabilityIntegrationResourceMapping {
|
|
69
|
+
configuredForId: bigint;
|
|
70
|
+
configuredForType: CONFIGURED_FOR_TYPE_ENUM;
|
|
71
|
+
config?: typeof schema.capIntegResourceMapping.$inferSelect.config;
|
|
72
|
+
}
|
|
63
73
|
type IUpdateCapabilityIntegration = Partial<typeof schema.capabilityIntegration.$inferInsert>;
|
|
64
74
|
type IAddCapIntegResourceMapping = typeof schema.capIntegResourceMapping.$inferInsert;
|
|
65
75
|
interface IAddCapabilityIntegrationMappingResponse {
|
|
@@ -133,12 +143,6 @@ declare class IntegrationCommonDao {
|
|
|
133
143
|
}): Promise<string>;
|
|
134
144
|
}
|
|
135
145
|
|
|
136
|
-
declare enum INTEGRATION_PROVIDER_ENUM {
|
|
137
|
-
TRYBE = "TRYBE",
|
|
138
|
-
SUPREMA_BIOSTAR = "SUPREMA_BIOSTAR",
|
|
139
|
-
SALTO_PRO = "SALTO_PRO",
|
|
140
|
-
SCHINDLER = "SCHINDLER"
|
|
141
|
-
}
|
|
142
146
|
interface IPlatformConfig {
|
|
143
147
|
baseUrl?: string;
|
|
144
148
|
}
|
|
@@ -157,7 +161,7 @@ interface IValidatedCapabilityIntegrationConfig {
|
|
|
157
161
|
}
|
|
158
162
|
interface ICapabilityIntegration {
|
|
159
163
|
id: bigint;
|
|
160
|
-
provider?:
|
|
164
|
+
provider?: CAPABILITY_PROVIDER_INTEGRATION_ENUM$1 | null;
|
|
161
165
|
providerId?: bigint;
|
|
162
166
|
config?: ICapabilityIntegrationConfig;
|
|
163
167
|
capabilityId?: bigint;
|
|
@@ -165,7 +169,7 @@ interface ICapabilityIntegration {
|
|
|
165
169
|
}
|
|
166
170
|
interface IValidatedCapabilityIntegration {
|
|
167
171
|
id: bigint;
|
|
168
|
-
provider?:
|
|
172
|
+
provider?: CAPABILITY_PROVIDER_INTEGRATION_ENUM$1 | null;
|
|
169
173
|
providerId?: bigint;
|
|
170
174
|
config: IValidatedCapabilityIntegrationConfig;
|
|
171
175
|
capabilityId?: bigint;
|
|
@@ -200,6 +204,7 @@ interface IAddCapabilityIntegrationInput {
|
|
|
200
204
|
icon?: IIcon;
|
|
201
205
|
availableFor: CAPABILITY_RESOURCE_AVAILABLE_FOR_ENUM;
|
|
202
206
|
configuredFor?: IAddCapabilityIntegrationConfiguredFor;
|
|
207
|
+
resourceMappings?: ICapabilityIntegrationResourceMapping[];
|
|
203
208
|
}
|
|
204
209
|
interface IUpdateCapabilityIntegrationUpdateData {
|
|
205
210
|
nickname?: string;
|
|
@@ -214,6 +219,7 @@ interface IUpdateCapabilityIntegrationUpdateData {
|
|
|
214
219
|
groupId?: bigint;
|
|
215
220
|
status?: CAPABILITY_INTEGRATION_STATUS_ENUM;
|
|
216
221
|
availableFor?: CAPABILITY_RESOURCE_AVAILABLE_FOR_ENUM;
|
|
222
|
+
resourceMappings?: ICapabilityIntegrationResourceMapping[];
|
|
217
223
|
}
|
|
218
224
|
interface IUpdateCapabilityIntegrationRequest {
|
|
219
225
|
id: bigint;
|
|
@@ -248,11 +254,29 @@ interface IGetCapabilityIntegrationsResponse {
|
|
|
248
254
|
records: ICapabilityIntegration[];
|
|
249
255
|
}
|
|
250
256
|
|
|
251
|
-
|
|
257
|
+
type ISubCapability = typeof schema.subcapability.$inferSelect;
|
|
258
|
+
|
|
259
|
+
declare class IntegrationSubcapabilityDao {
|
|
252
260
|
private readonly conn;
|
|
253
261
|
private readonly logger;
|
|
254
262
|
private readonly fileName;
|
|
255
263
|
constructor(conn: MySql2Database<typeof schema>, logger: LoggerService);
|
|
264
|
+
getSubcapabilityId(input: {
|
|
265
|
+
capabilityId: bigint;
|
|
266
|
+
name: string;
|
|
267
|
+
}, loggedInUserId: bigint): Promise<bigint | undefined>;
|
|
268
|
+
getSubcapabilities(input: {
|
|
269
|
+
capabilityId: bigint;
|
|
270
|
+
}, loggedInUserId: bigint): Promise<ISubCapability[]>;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
declare class IntegrationConfigurationDao {
|
|
274
|
+
private readonly conn;
|
|
275
|
+
private readonly logger;
|
|
276
|
+
private readonly integrationSubcapabilityDao;
|
|
277
|
+
private readonly fileName;
|
|
278
|
+
private readonly integrationVisitorCredentialMappingDao;
|
|
279
|
+
constructor(conn: MySql2Database<typeof schema>, logger: LoggerService, integrationSubcapabilityDao: IntegrationSubcapabilityDao);
|
|
256
280
|
addCapabilityIntegration(input: IAddCapabilityIntegration, loggedInUserId: bigint): Promise<{
|
|
257
281
|
id: bigint;
|
|
258
282
|
} | undefined>;
|
|
@@ -265,6 +289,18 @@ declare class IntegrationConfigurationDao {
|
|
|
265
289
|
updateCapabilityIntegration(input: {
|
|
266
290
|
id: bigint;
|
|
267
291
|
updateData: IUpdateCapabilityIntegration;
|
|
292
|
+
projectId: number;
|
|
293
|
+
}, loggedInUserId: bigint): Promise<{
|
|
294
|
+
status: boolean;
|
|
295
|
+
}>;
|
|
296
|
+
syncCapabilityIntegrationResourceMappings(input: {
|
|
297
|
+
capabilityIntegrationId: bigint;
|
|
298
|
+
projectId: number;
|
|
299
|
+
resourceMappings: Array<{
|
|
300
|
+
configuredForId: bigint;
|
|
301
|
+
configuredForType: CONFIGURED_FOR_TYPE_ENUM;
|
|
302
|
+
config?: typeof schema.capIntegResourceMapping.$inferSelect.config;
|
|
303
|
+
}>;
|
|
268
304
|
}, loggedInUserId: bigint): Promise<{
|
|
269
305
|
status: boolean;
|
|
270
306
|
}>;
|
|
@@ -286,15 +322,18 @@ declare class IntegrationConfigurationDao {
|
|
|
286
322
|
private applyFilters;
|
|
287
323
|
}
|
|
288
324
|
|
|
289
|
-
declare class
|
|
290
|
-
private readonly
|
|
291
|
-
private readonly
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
325
|
+
declare class IntegrationVisitorCredentialMappingDao {
|
|
326
|
+
private readonly generateVisitorCredentialConfigKey;
|
|
327
|
+
private readonly capIntegResourceMappingOfficeVisitorType;
|
|
328
|
+
extractGenerateCredentialsForVisitorValue(config: unknown): boolean | undefined;
|
|
329
|
+
syncVisitorCredentialMapping(input: {
|
|
330
|
+
db: Pick<MySql2Database<typeof schema>, 'query' | 'insert' | 'update'>;
|
|
331
|
+
capabilityIntegrationId: bigint;
|
|
332
|
+
projectId: number;
|
|
333
|
+
isGenerateCredentialsForVisitorEnabled: boolean | undefined;
|
|
334
|
+
loggedInUserId: bigint;
|
|
335
|
+
createOnly: boolean;
|
|
336
|
+
}): Promise<void>;
|
|
298
337
|
}
|
|
299
338
|
|
|
300
339
|
type IAddServiceCommunicationTopic = typeof schema.serviceCommunicationTopic.$inferInsert;
|
|
@@ -363,62 +402,107 @@ declare class IntegrationOnpremDeploymentDao {
|
|
|
363
402
|
}, loggedInUserId?: bigint): Promise<typeof schema.onPremDeployment.$inferSelect | undefined>;
|
|
364
403
|
}
|
|
365
404
|
|
|
405
|
+
declare enum SUBSCRIPTION_STATE {
|
|
406
|
+
SUBSCRIBED = "subscribed",
|
|
407
|
+
UNSUBSCRIBED = "unsubscribed"
|
|
408
|
+
}
|
|
409
|
+
|
|
366
410
|
interface IGetCustomerRequest {
|
|
367
411
|
email?: string;
|
|
368
412
|
customerId?: string;
|
|
369
413
|
}
|
|
370
414
|
interface IAddCustomerRequest {
|
|
371
|
-
site_id: string;
|
|
372
415
|
first_name?: string | null;
|
|
373
416
|
last_name?: string | null;
|
|
374
|
-
phone?: string | null;
|
|
375
|
-
dob?: string | null;
|
|
376
417
|
email?: string | null;
|
|
377
|
-
password?: string;
|
|
378
|
-
marketing_preference_ids?: string[];
|
|
379
|
-
external_ref?: string | null;
|
|
380
|
-
guestline_ref?: string;
|
|
381
|
-
preferred_locale?: string;
|
|
382
418
|
}
|
|
383
419
|
interface IUpdateCustomerRequest {
|
|
384
420
|
first_name?: string | null;
|
|
385
421
|
last_name?: string | null;
|
|
386
|
-
phone?: string | null;
|
|
387
|
-
dob?: string | null;
|
|
388
|
-
password?: string;
|
|
389
|
-
external_ref?: string | null;
|
|
390
|
-
preferred_locale?: string;
|
|
391
422
|
}
|
|
392
423
|
interface ICustomer {
|
|
393
424
|
id: string;
|
|
394
|
-
first_name: string;
|
|
395
|
-
last_name: string;
|
|
396
|
-
full_name: string;
|
|
397
|
-
phone: string;
|
|
398
|
-
has_password: boolean;
|
|
399
|
-
dob: string;
|
|
400
|
-
brand_id: string;
|
|
401
|
-
site_id: string;
|
|
402
|
-
stripe_id: string;
|
|
403
|
-
express_stripe_id: string;
|
|
404
|
-
email: string;
|
|
405
|
-
preferred_locale: string;
|
|
406
|
-
locked_at: string;
|
|
407
|
-
created_at: string;
|
|
408
|
-
updated_at: string;
|
|
409
|
-
deleted_at: string;
|
|
410
|
-
last_active_at: string;
|
|
411
|
-
email_verified_at: string;
|
|
412
|
-
last_check_in: ICustomerLastCheckIn;
|
|
413
|
-
external_ref: string;
|
|
414
425
|
}
|
|
415
426
|
interface ICustomerLastCheckIn {
|
|
416
427
|
checked_in_at: string;
|
|
417
428
|
method: string;
|
|
418
429
|
}
|
|
419
|
-
interface
|
|
430
|
+
interface IAdminCredentials {
|
|
431
|
+
grantType: string;
|
|
432
|
+
scope: string;
|
|
433
|
+
username: string;
|
|
434
|
+
password: string;
|
|
435
|
+
clientId: string;
|
|
436
|
+
clientSecret: string;
|
|
437
|
+
apiKey: string;
|
|
438
|
+
}
|
|
439
|
+
interface IConfiguration {
|
|
440
|
+
baseUrl: string;
|
|
441
|
+
siteId: string;
|
|
442
|
+
identityServerUrl: string;
|
|
443
|
+
roleIds: string[];
|
|
444
|
+
accessGroupIds?: string[];
|
|
445
|
+
credentials: IAdminCredentials;
|
|
446
|
+
}
|
|
447
|
+
interface IListUsersInput {
|
|
448
|
+
include_pod_info?: boolean;
|
|
449
|
+
member_of_pods?: any;
|
|
450
|
+
filter?: string;
|
|
451
|
+
orderBy?: string;
|
|
452
|
+
skip?: number;
|
|
453
|
+
top?: number;
|
|
454
|
+
count?: number;
|
|
455
|
+
}
|
|
456
|
+
interface IListUsersResponse {
|
|
457
|
+
items: ICustomerManagement[];
|
|
458
|
+
next_page_link: string;
|
|
459
|
+
count: number;
|
|
460
|
+
}
|
|
461
|
+
interface IAddUpdateAccessGroupRequest {
|
|
462
|
+
access: string;
|
|
463
|
+
}
|
|
464
|
+
interface IUserAccessGroup {
|
|
420
465
|
id: string;
|
|
421
|
-
|
|
466
|
+
first_name: string;
|
|
467
|
+
last_name: string;
|
|
468
|
+
}
|
|
469
|
+
interface IGetCustomerAccessGroupsInput {
|
|
470
|
+
customerId: string;
|
|
471
|
+
}
|
|
472
|
+
interface IGetCustomerAccessGroupsResponse {
|
|
473
|
+
count: number;
|
|
474
|
+
next_page_link: string;
|
|
475
|
+
}
|
|
476
|
+
interface ICustomerAddionalDetails {
|
|
477
|
+
email: string;
|
|
478
|
+
image_url: string;
|
|
479
|
+
tag_number: string;
|
|
480
|
+
is_managed_by_current_site: boolean;
|
|
481
|
+
has_profile: boolean;
|
|
482
|
+
id: string;
|
|
483
|
+
first_name: string;
|
|
484
|
+
last_name: string;
|
|
485
|
+
site_user_id?: string;
|
|
486
|
+
}
|
|
487
|
+
interface ICustomerRole {
|
|
488
|
+
id: string;
|
|
489
|
+
customer_reference: string;
|
|
490
|
+
code: string;
|
|
491
|
+
parent_id: string;
|
|
492
|
+
is_hierarchical: boolean;
|
|
493
|
+
}
|
|
494
|
+
interface ICustomerManagement extends ICustomer {
|
|
495
|
+
user: ICustomerAddionalDetails;
|
|
496
|
+
roles: ICustomerRole[];
|
|
497
|
+
alias: string;
|
|
498
|
+
toggle_easy_office_mode: boolean;
|
|
499
|
+
toggle_manual_office_mode: boolean;
|
|
500
|
+
remote_access: boolean;
|
|
501
|
+
blocked: boolean;
|
|
502
|
+
tag_owned_by_this_site: boolean;
|
|
503
|
+
subscription_state: SUBSCRIPTION_STATE;
|
|
504
|
+
override_privacy_mode: boolean;
|
|
505
|
+
use_pin: boolean;
|
|
422
506
|
}
|
|
423
507
|
|
|
424
508
|
declare enum CREDIT_TYPE_ENUM {
|
|
@@ -701,6 +785,76 @@ interface ISystemResponse<T> {
|
|
|
701
785
|
records: T[];
|
|
702
786
|
}
|
|
703
787
|
|
|
788
|
+
interface IRegisterDeviceInput {
|
|
789
|
+
device_name?: string;
|
|
790
|
+
device_uid: string;
|
|
791
|
+
public_key: string;
|
|
792
|
+
}
|
|
793
|
+
interface IKey {
|
|
794
|
+
id: string;
|
|
795
|
+
key_id: string;
|
|
796
|
+
expiry_date: string;
|
|
797
|
+
registration_date: string;
|
|
798
|
+
}
|
|
799
|
+
interface IRegisterDeviceResponse {
|
|
800
|
+
certificate?: string;
|
|
801
|
+
id: string;
|
|
802
|
+
device_name: string;
|
|
803
|
+
device_uid: string;
|
|
804
|
+
mkey: IKey;
|
|
805
|
+
}
|
|
806
|
+
interface IDeleteDeviceInput {
|
|
807
|
+
deviceKey: string;
|
|
808
|
+
userId: string;
|
|
809
|
+
}
|
|
810
|
+
interface IDeleteDeviceResponse {
|
|
811
|
+
id: string;
|
|
812
|
+
key_identifier: string;
|
|
813
|
+
key_id: string;
|
|
814
|
+
type: string;
|
|
815
|
+
expiry_date: string;
|
|
816
|
+
registration_date: string;
|
|
817
|
+
blocked: boolean;
|
|
818
|
+
offline_access: boolean;
|
|
819
|
+
key_uid: string;
|
|
820
|
+
}
|
|
821
|
+
interface IGetDevicesInput {
|
|
822
|
+
filter?: string;
|
|
823
|
+
orderby?: string;
|
|
824
|
+
skip?: number;
|
|
825
|
+
top?: number;
|
|
826
|
+
count?: boolean;
|
|
827
|
+
}
|
|
828
|
+
interface IGetDevicesResponse {
|
|
829
|
+
items: IRegisterDeviceResponse[];
|
|
830
|
+
count: number;
|
|
831
|
+
}
|
|
832
|
+
interface IUpdateDeviceCertificateInput {
|
|
833
|
+
publicKey: string;
|
|
834
|
+
deviceId: string;
|
|
835
|
+
}
|
|
836
|
+
type IUpdateDeviceCertificateResponse = IRegisterDeviceResponse;
|
|
837
|
+
interface IGetDeviceKeyInput {
|
|
838
|
+
deviceId: string;
|
|
839
|
+
}
|
|
840
|
+
interface IGetDeviceKeyResponse {
|
|
841
|
+
mkey_data: string;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
interface IAccessProfile {
|
|
845
|
+
id: string;
|
|
846
|
+
customer_reference?: string;
|
|
847
|
+
lock_count?: number;
|
|
848
|
+
user_count?: number;
|
|
849
|
+
floor_count?: number;
|
|
850
|
+
}
|
|
851
|
+
type IAccessProfiles = IAccessProfile[];
|
|
852
|
+
interface IGetAccessProfilesResponse {
|
|
853
|
+
count?: number | null;
|
|
854
|
+
next_page_link?: string | null;
|
|
855
|
+
items?: IAccessProfiles;
|
|
856
|
+
}
|
|
857
|
+
|
|
704
858
|
interface IApiCallRequest<TBody = unknown> {
|
|
705
859
|
apiMethod: HTTP_METHOD;
|
|
706
860
|
url: string;
|
|
@@ -760,10 +914,20 @@ declare abstract class BaseCreditBooking {
|
|
|
760
914
|
}
|
|
761
915
|
|
|
762
916
|
declare abstract class BaseCustomerManagement {
|
|
763
|
-
abstract createCustomer(request: IAddCustomerRequest, integration:
|
|
764
|
-
abstract searchCustomer(request: IGetCustomerRequest, integration:
|
|
765
|
-
abstract updateCustomer(customerId: string, request: IUpdateCustomerRequest, integration:
|
|
766
|
-
abstract deleteCustomer(customerId: string, integration:
|
|
917
|
+
abstract createCustomer(request: IAddCustomerRequest, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<ICustomer>;
|
|
918
|
+
abstract searchCustomer(request: IGetCustomerRequest, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<ICustomer | undefined>;
|
|
919
|
+
abstract updateCustomer(customerId: string, request: IUpdateCustomerRequest, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<ICustomer>;
|
|
920
|
+
abstract deleteCustomer(customerId: string, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<IDeleteAPIResponse>;
|
|
921
|
+
abstract init(configuration: IConfiguration, credentials?: IAdminCredentials): Promise<void>;
|
|
922
|
+
abstract fetchPage(url: string, loggedInUserId: bigint, items: ICustomerManagement[]): Promise<ICustomerManagement[]>;
|
|
923
|
+
abstract listCustomers(request: IListUsersInput, loggedInUserId: bigint): Promise<IListUsersResponse>;
|
|
924
|
+
abstract getCustomer(request: ICustomer, userId: string, loggedInUserId: bigint): Promise<ICustomerManagement>;
|
|
925
|
+
abstract getCustomerByEmail(request: IGetCustomerRequest, loggedInUserId: bigint): Promise<ICustomerAddionalDetails>;
|
|
926
|
+
abstract addCustomerToAccessGroup(request: IAddUpdateAccessGroupRequest, userId: string, loggedInUserId: bigint): Promise<IUserAccessGroup>;
|
|
927
|
+
abstract removeCustomerFromAccessGroup(request: IAddUpdateAccessGroupRequest, userId: string, loggedInUserId: bigint): Promise<IUserAccessGroup>;
|
|
928
|
+
abstract resendInviteToCustomer(request: ICustomer, loggedInUserId: bigint): Promise<boolean>;
|
|
929
|
+
abstract addCustomerToExistingSite(request: ICustomer, loggedInUserId: bigint): Promise<ICustomerManagement>;
|
|
930
|
+
abstract getCustomerAccessGroups(request: IGetCustomerAccessGroupsInput, loggedInUserId: bigint): Promise<IGetCustomerAccessGroupsResponse>;
|
|
767
931
|
}
|
|
768
932
|
|
|
769
933
|
declare abstract class BasePackageManagement {
|
|
@@ -867,10 +1031,51 @@ declare abstract class BaseIntegrationResourceManagement {
|
|
|
867
1031
|
updateOfferingIntegrationResourceConfiguration(input: IUpdateOfferingIntegrationResourceConfigurationInput, context: GraphQLContext): Promise<IUpdateOfferingIntegrationResourceConfigurationResponse>;
|
|
868
1032
|
}
|
|
869
1033
|
|
|
1034
|
+
declare abstract class BaseDeviceManagement {
|
|
1035
|
+
abstract init(configuration: IConfiguration, credentials?: IAdminCredentials): Promise<void>;
|
|
1036
|
+
abstract registerAcsDevice(request: IRegisterDeviceInput, loggedInUserId: bigint): Promise<IRegisterDeviceResponse>;
|
|
1037
|
+
abstract deregisterAcsDevice(request: IDeleteDeviceInput, loggedInUserId: bigint): Promise<IDeleteDeviceResponse>;
|
|
1038
|
+
abstract getDevices(request: IGetDevicesInput, loggedInUserId: bigint): Promise<IGetDevicesResponse>;
|
|
1039
|
+
abstract updateDeviceCertificate(request: IUpdateDeviceCertificateInput, loggedInUserId: bigint): Promise<IUpdateDeviceCertificateResponse>;
|
|
1040
|
+
abstract getDeviceKey(request: IGetDeviceKeyInput, loggedInUserId: bigint): Promise<IGetDeviceKeyResponse>;
|
|
1041
|
+
abstract getDevice(request: IGetDeviceKeyInput, loggedInUserId: bigint): Promise<IRegisterDeviceResponse>;
|
|
1042
|
+
abstract getSiteUserDeviceKeys(request: {
|
|
1043
|
+
userId: string;
|
|
1044
|
+
}, loggedInUserId: bigint): Promise<Array<{
|
|
1045
|
+
id: string;
|
|
1046
|
+
key_uid: string;
|
|
1047
|
+
}>>;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
declare abstract class BaseAccessManagement {
|
|
1051
|
+
abstract init(configuration: IConfiguration, credentials?: IAdminCredentials): Promise<void>;
|
|
1052
|
+
abstract getAccessProfiles(request?: IGetDevicesInput, loggedInUserId?: bigint): Promise<IGetAccessProfilesResponse>;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
870
1055
|
interface ITrybeCustomer extends ICustomer {
|
|
871
1056
|
avatar_id: string;
|
|
872
1057
|
labels: ITrybeCustomerLabels[];
|
|
873
1058
|
avatar: ITrybeCustomerAvatar;
|
|
1059
|
+
first_name: string;
|
|
1060
|
+
last_name: string;
|
|
1061
|
+
full_name: string;
|
|
1062
|
+
phone: string;
|
|
1063
|
+
has_password: boolean;
|
|
1064
|
+
dob: string;
|
|
1065
|
+
brand_id: string;
|
|
1066
|
+
site_id: string;
|
|
1067
|
+
stripe_id: string;
|
|
1068
|
+
express_stripe_id: string;
|
|
1069
|
+
email: string;
|
|
1070
|
+
preferred_locale: string;
|
|
1071
|
+
locked_at: string;
|
|
1072
|
+
created_at: string;
|
|
1073
|
+
updated_at: string;
|
|
1074
|
+
deleted_at: string;
|
|
1075
|
+
last_active_at: string;
|
|
1076
|
+
email_verified_at: string;
|
|
1077
|
+
last_check_in: ICustomerLastCheckIn;
|
|
1078
|
+
external_ref: string;
|
|
874
1079
|
}
|
|
875
1080
|
interface ITrybeCustomerLabels {
|
|
876
1081
|
id: string;
|
|
@@ -891,6 +1096,26 @@ interface ITrybeCustomerResponse {
|
|
|
891
1096
|
interface ITrybeGetCustomerByEmailResponse {
|
|
892
1097
|
data?: ITrybeCustomer[];
|
|
893
1098
|
}
|
|
1099
|
+
interface IAddTrybeCustomerRequest extends IAddCustomerRequest {
|
|
1100
|
+
site_id: string;
|
|
1101
|
+
phone?: string | null;
|
|
1102
|
+
dob?: string | null;
|
|
1103
|
+
password?: string;
|
|
1104
|
+
marketing_preference_ids?: string[];
|
|
1105
|
+
external_ref?: string | null;
|
|
1106
|
+
guestline_ref?: string;
|
|
1107
|
+
preferred_locale?: string;
|
|
1108
|
+
}
|
|
1109
|
+
interface IUpdateTrybeCustomerRequest extends IUpdateCustomerRequest {
|
|
1110
|
+
phone?: string | null;
|
|
1111
|
+
dob?: string | null;
|
|
1112
|
+
password?: string;
|
|
1113
|
+
external_ref?: string | null;
|
|
1114
|
+
preferred_locale?: string;
|
|
1115
|
+
}
|
|
1116
|
+
interface IAddUpdateTrybeCustomerResponseData extends ICustomer {
|
|
1117
|
+
status: string;
|
|
1118
|
+
}
|
|
894
1119
|
|
|
895
1120
|
interface ITrybeGetResourcesCommonLinks {
|
|
896
1121
|
first: string;
|
|
@@ -1659,10 +1884,20 @@ declare class TrybeCustomerManagement implements BaseCustomerManagement {
|
|
|
1659
1884
|
private readonly trybeApiClientService;
|
|
1660
1885
|
private readonly fileName;
|
|
1661
1886
|
constructor(logger: LoggerService, trybeApiClientService: TrybeApiClientService);
|
|
1662
|
-
createCustomer(request:
|
|
1663
|
-
searchCustomer(request: IGetCustomerRequest, integration:
|
|
1664
|
-
updateCustomer(customerId: string, request:
|
|
1665
|
-
deleteCustomer(customerId: string, integration:
|
|
1887
|
+
createCustomer(request: IAddTrybeCustomerRequest, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<ITrybeCustomer>;
|
|
1888
|
+
searchCustomer(request: IGetCustomerRequest, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<ITrybeCustomer | undefined>;
|
|
1889
|
+
updateCustomer(customerId: string, request: IUpdateTrybeCustomerRequest, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<IAddUpdateTrybeCustomerResponseData>;
|
|
1890
|
+
deleteCustomer(customerId: string, integration: IValidatedCapabilityIntegration, loggedInUserId: bigint): Promise<IDeleteAPIResponse>;
|
|
1891
|
+
init(configuration: IConfiguration, credentials?: IAdminCredentials): Promise<void>;
|
|
1892
|
+
fetchPage(url: string, loggedInUserId: bigint, items: ICustomerManagement[]): Promise<ICustomerManagement[]>;
|
|
1893
|
+
listCustomers(request: IListUsersInput, loggedInUserId: bigint): Promise<IListUsersResponse>;
|
|
1894
|
+
getCustomer(request: ICustomerManagement, userId: string, loggedInUserId: bigint): Promise<ICustomerManagement>;
|
|
1895
|
+
getCustomerByEmail(request: IGetCustomerRequest, loggedInUserId: bigint): Promise<ICustomerAddionalDetails>;
|
|
1896
|
+
addCustomerToAccessGroup(request: IAddUpdateAccessGroupRequest, userId: string, loggedInUserId: bigint): Promise<IUserAccessGroup>;
|
|
1897
|
+
removeCustomerFromAccessGroup(request: IAddUpdateAccessGroupRequest, userId: string, loggedInUserId: bigint): Promise<IUserAccessGroup>;
|
|
1898
|
+
resendInviteToCustomer(request: ICustomer, loggedInUserId: bigint): Promise<boolean>;
|
|
1899
|
+
addCustomerToExistingSite(request: ICustomer, loggedInUserId: bigint): Promise<ICustomerManagement>;
|
|
1900
|
+
getCustomerAccessGroups(request: IGetCustomerAccessGroupsInput, loggedInUserId: bigint): Promise<IGetCustomerAccessGroupsResponse>;
|
|
1666
1901
|
}
|
|
1667
1902
|
|
|
1668
1903
|
declare class TrybeCreditBooking implements BaseCreditBooking {
|
|
@@ -1783,4 +2018,4 @@ declare class TrybeWebhookUtilService {
|
|
|
1783
2018
|
private mapTrybeItemTypeToEnum;
|
|
1784
2019
|
}
|
|
1785
2020
|
|
|
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
|
|
2021
|
+
export { type AddOfferingBookingInput, type AddOfferingBookingItemInput, type AddOfferingBookingItemResourceInput, BOOKABLE_ITEM_STATUS_ENUM, BOOKABLE_ITEM_TYPE_ENUM, BaseAccessManagement, BaseAccountingContactManagement, BaseAccountingCreditNoteManagement, BaseAccountingCustomerManagement, BaseAccountingCustomerPaymentManagement, BaseAccountingInvoiceManagement, BaseAccountingLOAManagement, BaseAccountingTaxManagement, BaseAuth, BaseCreditBooking, BaseCustomerManagement, BaseDeviceManagement, BaseIntegrationConfiguration, BaseIntegrationResourceManagement, BaseMembershipCustomerManagement, BaseMembershipManagement, BasePackageManagement, BasePayment, BasePaymentMethodManagement, BasePaymentUserManagement, BaseWellnessManagement, CREDIT_FILTER_BY_ENUM, CREDIT_STATUS_ENUM, CREDIT_TYPE_ENUM, type CapabilityIntegrationCategory, HTTP_METHOD, type IAccessProfile, type IAccessProfiles, 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 IAddTrybeCustomerRequest, type IAddUpdateAccessGroupRequest, type IAddUpdateTrybeCustomerResponseData, type IAdminCredentials, type IApiCallRequest, type IAvailableDateWithSlots, type IAvailableTimeSlot, type IBookableItem, type IBookableItemCategory, type IBookableItemMedia, type IBookableItemPrice, type IBookableItemPriceMeta, type ICapabilityIntegration, type ICapabilityIntegrationConfig, type ICapabilityIntegrationResourceMapping, type ICapabilityIntegrationResourceMappingRow, type IConfiguration, type ICreateOrderRequest, type ICreateOrderResponse, type ICredit, type ICustomer, type ICustomerAddionalDetails, type ICustomerLastCheckIn, type ICustomerManagement, type ICustomerRole, type IDeleteAPIResponse, type IDeleteDeviceInput, type IDeleteDeviceResponse, type IFetchOfferingAvailabilityRequest, type IGetAccessProfilesResponse, 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 IGetCustomerAccessGroupsInput, type IGetCustomerAccessGroupsResponse, type IGetCustomerCreditsRequest, type IGetCustomerCreditsRequestFilters, type IGetCustomerCreditsRequestOptions, type IGetCustomerRequest, type IGetDeviceKeyInput, type IGetDeviceKeyResponse, type IGetDevicesInput, type IGetDevicesResponse, type IGetOrderResponse, type IGetPractitionersRequest, type IGetSessionsRequest, type IGetTrybeResourcesCommonResponse, type IIcon, type IIntegrationRequestContext, type IIntegrationRequestLog, type IKey, type IListUsersInput, type IListUsersResponse, type IOfferingBookingOccurrence$1 as IOfferingBookingOccurrence, type IOfferingIntent, type IOfferingResource, type IOfferingResourceMedia, type IOrderGuest, type IRegisterDeviceInput, type IRegisterDeviceResponse, 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 IUpdateDeviceCertificateInput, type IUpdateDeviceCertificateResponse, type IUpdateOfferingIntegrationResourceConfigurationInput, type IUpdateOfferingIntegrationResourceConfigurationResponse, type IUpdateOrderRequest, type IUpdateOrderResponse, type IUpdateTrybeCustomerRequest, type IUserAccessGroup, type IValidatedCapabilityIntegration, type IValidatedCapabilityIntegrationConfig, type IWellnessManagementRequestOptions, IntegrationBookingDao, IntegrationCommonDao, IntegrationConfigurationDao, AppModule as IntegrationLibsModule, IntegrationOnpremDeploymentDao, IntegrationRequestLoggerService, IntegrationResourceManagementDao, IntegrationServiceCommunicationTopicDao, IntegrationSubcapabilityDao, AppModule$1 as IntegrationTrybeModule, IntegrationUserManagementDao, IntegrationVisitorCredentialMappingDao, 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 };
|