@dv4resi/dvss-backend-module-calendar-im 0.0.12 → 0.0.14
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 +18 -4
- package/dist/index.js +50 -13
- 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 { HttpService } from '@nestjs/axios';
|
|
2
2
|
import { LoggerService, GraphQLContext, IMedia, MASK_STRATEGY_ENUM, SecretProvider, AddAPIResponse } from '@dv4resi/dvss-backend-module-utility';
|
|
3
|
-
import { schema, CAPABILITY_PROVIDER_INTEGRATION_ENUM as CAPABILITY_PROVIDER_INTEGRATION_ENUM$1, SORTING_ORDER_ENUM, CommonValidationDatabaseService, RedisCacheStoreService } from '@dv4resi/dvss-backend-module-datastore';
|
|
3
|
+
import { schema, CAPABILITY_PROVIDER_INTEGRATION_ENUM as CAPABILITY_PROVIDER_INTEGRATION_ENUM$1, SORTING_ORDER_ENUM, BEHAVIOUR_TYPE_ENUM, CommonValidationDatabaseService, RedisCacheStoreService } from '@dv4resi/dvss-backend-module-datastore';
|
|
4
4
|
import { CONFIGURED_FOR_TYPE_ENUM, MEDIA_PROVIDER_ENUM, IAddUpdateAPIStatusResponseBigInt, DAY_OF_WEEK, OFFERING_RESOURCE_TYPE, STATUS, OFFERING_BOOKING_TIME_TYPE, IScheduleConfig } from '@dv4resi/dvss-backend-module-datastore/dist/datastore/models';
|
|
5
5
|
export { BEHAVIOUR_TYPE_ENUM, DAY_OF_WEEK, IScheduleConfig, OFFERING_BOOKING_TIME_TYPE, OFFERING_BOOKING_TYPE_ENUM, SCHEDULE_MONTHLY_UNIT, SCHEDULE_REPEAT_TYPE } from '@dv4resi/dvss-backend-module-datastore/dist/datastore/models';
|
|
6
6
|
import { CAPABILITY_INTEGRATION_STATUS_ENUM, CAPABILITY_RESOURCE_AVAILABLE_FOR_ENUM } from '@dv4resi/dvss-backend-module-datastore/dist/datastore/models/capability-integration.model';
|
|
@@ -1197,13 +1197,18 @@ interface IGetCustomerPayments {
|
|
|
1197
1197
|
records: ICustomerPaymentRecord[];
|
|
1198
1198
|
hasMorePage: boolean;
|
|
1199
1199
|
}
|
|
1200
|
+
interface IOperator {
|
|
1201
|
+
id: string;
|
|
1202
|
+
name: string;
|
|
1203
|
+
type: BEHAVIOUR_TYPE_ENUM;
|
|
1204
|
+
}
|
|
1200
1205
|
interface ICustomerPaymentRecord {
|
|
1201
1206
|
customerId: string;
|
|
1202
1207
|
date: string;
|
|
1203
1208
|
dueInExcess: number;
|
|
1204
1209
|
invoiceNumbers: string;
|
|
1205
1210
|
mode: string;
|
|
1206
|
-
operator
|
|
1211
|
+
operator?: IOperator;
|
|
1207
1212
|
paymentId: string;
|
|
1208
1213
|
paymentNumber: string;
|
|
1209
1214
|
referenceId: string;
|
|
@@ -1745,6 +1750,7 @@ interface IBookingEvent {
|
|
|
1745
1750
|
timeZone?: string;
|
|
1746
1751
|
seriesEndDateLabel?: string;
|
|
1747
1752
|
syncMetadata?: IEventSyncMetadata;
|
|
1753
|
+
transactionId?: string;
|
|
1748
1754
|
}
|
|
1749
1755
|
interface IEventSyncMetadata {
|
|
1750
1756
|
createdBy?: 'DVSS' | 'PROVIDER';
|
|
@@ -2410,6 +2416,7 @@ interface IMicrosoftAccessDetails {
|
|
|
2410
2416
|
interface IMicrosoftConfig {
|
|
2411
2417
|
platformConfig: IMicrosoftPlatformConfig;
|
|
2412
2418
|
integrationConfig: IMicrosoftIntegrationConfig;
|
|
2419
|
+
supportResourceSubscription?: boolean;
|
|
2413
2420
|
accessDetails?: IMicrosoftAccessDetails;
|
|
2414
2421
|
}
|
|
2415
2422
|
interface IMicrosoftTokenResponse {
|
|
@@ -2625,6 +2632,7 @@ declare class MicrosoftCalendarBookingService extends BaseCalendarBookingManagem
|
|
|
2625
2632
|
updateEventInstances(request: IUpdateEventInstancesRequest, integration: ICapabilityIntegration, loggedInUserId: bigint): Promise<IUpdateEventInstancesResponse>;
|
|
2626
2633
|
private chunkInstanceUpdates;
|
|
2627
2634
|
private deleteGraphEvent;
|
|
2635
|
+
private readHttpStatus;
|
|
2628
2636
|
private resolveSkipDatesIfAny;
|
|
2629
2637
|
private findOccurrenceInstanceId;
|
|
2630
2638
|
private listAllEvents;
|
|
@@ -2683,7 +2691,13 @@ declare const MICROSOFT_DEFAULT_GRAPH_BASE_URL = "https://graph.microsoft.com/v1
|
|
|
2683
2691
|
declare const MICROSOFT_DEFAULT_AUTH_URL = "https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token";
|
|
2684
2692
|
|
|
2685
2693
|
type MicrosoftIntegrationConfigInput = Pick<IMicrosoftIntegrationConfig, 'tenantId' | 'clientId' | 'clientSecret'>;
|
|
2686
|
-
|
|
2694
|
+
type ExistingMicrosoftConfig = {
|
|
2695
|
+
platformConfig?: Partial<IMicrosoftPlatformConfig>;
|
|
2696
|
+
integrationConfig?: Partial<IMicrosoftIntegrationConfig>;
|
|
2697
|
+
supportResourceSubscription?: boolean;
|
|
2698
|
+
accessDetails?: IMicrosoftConfig['accessDetails'];
|
|
2699
|
+
};
|
|
2700
|
+
declare function buildMicrosoftIntegrationConfig(integrationConfig: MicrosoftIntegrationConfigInput, existing?: ExistingMicrosoftConfig): IMicrosoftConfig;
|
|
2687
2701
|
|
|
2688
2702
|
declare const MICROSOFT_SECURE_STORAGE = "MICROSOFT_INTEGRATION_CONFIG_SECURE_STORAGE";
|
|
2689
2703
|
declare function getMicrosoftKmsKeyId(): string;
|
|
@@ -2807,4 +2821,4 @@ declare class CalendarIntegrationConfigurationAdapterFactory extends AdapterFact
|
|
|
2807
2821
|
constructor(microsoftCalendarIntegrationConfigurationHandler: MicrosoftCalendarIntegrationConfigurationHandler);
|
|
2808
2822
|
}
|
|
2809
2823
|
|
|
2810
|
-
export { type AccountConfig, type ActivityLogAuthor, AdapterFactoryService, BOOKABLE_ITEM_STATUS_ENUM, BOOKABLE_ITEM_TYPE_ENUM, BaseAccessManagement, BaseAccountingContactPersonManagement, BaseAccountingCreditNoteManagement, BaseAccountingCustomerPaymentManagement, BaseAccountingInvoiceManagement, BaseAccountingLOAManagement, BaseAccountingMiscellaneousManagement, BaseAccountingTaxManagement, BaseAuth, BaseCalendarBookingManagement, BaseCalendarResourceManagement, BaseCalendarWebhookManagement, BaseCreditBooking, BaseCustomerManagement, BaseDeviceManagement, BaseIntegrationConfiguration, BaseIntegrationResourceManagement, BaseMembershipCustomerManagement, BaseMembershipManagement, BasePackageManagement, BasePayment, BasePaymentMethodManagement, BasePaymentUserManagement, BaseWellnessManagement, CALENDAR_PROVIDER_ENUM, CREDIT_FILTER_BY_ENUM, CREDIT_NOTE_STATUS, CREDIT_STATUS_ENUM, CREDIT_TYPE_ENUM, CalendarAuthAdapterFactory, CalendarBookingAdapterFactory, CalendarIntegrationConfigurationAdapterFactory, AppModule$2 as CalendarIntegrationManager, CalendarResourceAdapterFactory, CalendarWebhookAdapterFactory, type CapabilityIntegrationCategory, type CustomerActivity, DOWNLOAD_CUSTOMER_ACCOUNTING_STATEMENT_FILTER_BY_ENUM, DOWNLOAD_CUSTOMER_ACCOUNTING_STATEMENT_STATUS_ENUM, type DigitalAsset, EVENT_INSTANCE_KIND, GET_CUSTOMER_CREDIT_NOTES_FILTER_BY, GET_CUSTOMER_CREDIT_NOTES_SORT_BY, GET_INVOICES_FILTER_BY_ENUM, GET_INVOICES_SORT_BY_ENUM, GET_PAYMENTS_FILTER_BY_ENUM, GET_PAYMENTS_FILTER_VALUE_ENUM, GET_PAYMENTS_SORTING_ENUM, GET_RECURRING_INVOICES_SORT_BY_ENUM, type GetCustomerActivitiesInput, type GetFolioActivitiesOptionsInput, HTTP_METHOD, type IAPIResponse, type IAcceptEventRequest, type IAccessProfile, type IAccessProfiles, type IAccountingAPIResponse, type IAccountingInvoice, type IAccountingListAPIPageContext, type IAccountingListAPIResponse, type IAccountingListAPISearchCriteria, type IAccounts, type IAddCapIntegResourceMapping, type IAddCapabilityIntegration, type IAddCapabilityIntegrationConfig, type IAddCapabilityIntegrationConfiguredFor, type IAddCapabilityIntegrationInput, type IAddCapabilityIntegrationMappingResponse, type IAddCustomerContactPersonRequest, type IAddCustomerRequest, type IAddItemToOrderItemConfig, type IAddItemToOrderRequest, type IAddItemToOrderResponse, type IAddPaymentToOrderRequest, type IAddResourceToIntegrationInput, type IAddResourceToIntegrationResponse, type IAddUpdateAccessGroupRequest, type IAdminCredentials, type IApiCallRequest, type IApplyCreditNoteForInvoicesRequest, type IAvailableDateWithSlots, type IAvailableTaxes, type IAvailableTimeSlot, type IBatchRefreshWebhookItem, type IBatchRefreshWebhookResult, type IBookableItem, type IBookableItemCategory, type IBookableItemMedia, type IBookableItemPrice, type IBookableItemPriceMeta, type IBookingEvent, type IBookingEventInstance, type IBookingEventRef, type IBookingItem, type IBookingItemResource, type IBookingManagementContext, ICalendarAuthHandler, ICalendarBookingHandler, type ICalendarInboundRecurrence, type ICalendarInboundSyncEvent, ICalendarIntegrationConfigurationHandler, ICalendarResourceHandler, ICalendarWebhookHandler, type ICalendarWebhookSubscription, type ICancelEventRequest, type ICapabilityIntegration, type ICapabilityIntegrationConfig, type ICapabilityIntegrationResourceMapping, type ICapabilityIntegrationResourceMappingRow, type IConfiguration, type ICreateCreditNoteForInvoiceRequest, type ICreateCustomerPaymentRequest, type ICreateEventRequest, type ICreateOrderRequest, type ICreateOrderResponse, type ICreateRecurringInvoiceLineItem, type ICreateRecurringInvoiceRequest, type ICreateRecurringInvoiceResponse, type ICreateRefundRequest, type ICredit, type ICreditNoteAppliedInvoice, type ICreditNoteOperator, type ICurrency, type ICustomer, type ICustomerAddionalDetails, type ICustomerContactPerson, type ICustomerContactPersonResponse, type ICustomerCreditNote, type ICustomerCreditNoteDetail, type ICustomerLastCheckIn, type ICustomerPaymentDetails, type ICustomerPaymentRecord, type ICustomerRole, type ICustomerStatusResponse, type IDeleteAPIResponse, type IDeleteCustomerContactPersonRequest, type IDeleteDeviceInput, type IDeleteDeviceResponse, type IDeleteEventRequest, type IDeleteWebhookRequest, type IDownloadCustomerAccountingStatementRequest, type IEventSyncMetadata, type IExcludedDateResult, type IFetchOfferingAvailabilityRequest, type IGetAccessProfilesResponse, type IGetAppointmentsRequest, type IGetAvailableDatesAndTimeSlotsResponse, type IGetBookableItemsFromCreditRequest, type IGetCalendarEventRequest, type IGetCapabilityIntegrationInput, type IGetCapabilityIntegrationResult, type IGetCapabilityIntegrationsFilterInput, type IGetCapabilityIntegrationsOptionsInput, type IGetCapabilityIntegrationsRequest, type IGetCapabilityIntegrationsResponse, type IGetCapabilityIntegrationsSortingInput, type IGetCategoriesRequest, type IGetCoursesRequest, type IGetCreateCustomerPayment, type IGetCreateCustomerPaymentInfo, type IGetCustomerAccessGroupsInput, type IGetCustomerAccessGroupsResponse, type IGetCustomerActivities, type IGetCustomerCreditNotesRequest, type IGetCustomerCreditNotesResponse, type IGetCustomerCreditsRequest, type IGetCustomerCreditsRequestFilters, type IGetCustomerCreditsRequestOptions, type IGetCustomerPayment, type IGetCustomerPaymentRefundInfo, type IGetCustomerPaymentRequest, type IGetCustomerPayments, type IGetCustomerPaymentsFilter, type IGetCustomerPaymentsOptions, type IGetCustomerPaymentsRequest, type IGetCustomerPaymentsSorting, type IGetCustomerRequest, type IGetDeviceKeyInput, type IGetDeviceKeyResponse, type IGetDevicesInput, type IGetDevicesResponse, type IGetEventInstancesRequest, type IGetEventsRequest, type IGetEventsResponse, type IGetInvoicesOptions, type IGetInvoicesRequest, type IGetOrderResponse, type IGetPractitionersRequest, type IGetRecurringInvoiceInput, type IGetRecurringInvoiceRequest, type IGetRecurringInvoicesOptions, type IGetRecurringInvoicesRequest, type IGetRefundCustomerPayment, type IGetResourcesRequest, type IGetResourcesResponse, type IGetSessionsRequest, type IGraphBatchRequest, type IGraphBatchRequestItem, type IGraphBatchResponse, type IGraphBatchResponseItem, type IIcon, type IInstanceUpdate, type IIntegrationConfigFieldMetadata, type IIntegrationConfigFieldMetadataMap, type IIntegrationConfigJson, type IIntegrationConfigStructureMetadata, type IIntegrationRequestContext, type IIntegrationRequestLog, type IInvoice, type IInvoiceCapabilityIntegration, type IInvoiceCapabilityIntegrationConfig, type IInvoiceIntegrationRequest, type IInvoiceResponse, type IInvoicesResponse, type IKey, type IListUsersInput, type IListUsersResponse, type IMarkCustomerContactPersonPrimaryRequest, type IMicrosoftAccessDetails, type IMicrosoftAccessToken, type IMicrosoftApiCallRequest, type IMicrosoftConfig, type IMicrosoftGraphAttendee, type IMicrosoftGraphBatchRequest, type IMicrosoftGraphBatchRequestItem, type IMicrosoftGraphBatchResponse, type IMicrosoftGraphBatchResponseItem, type IMicrosoftGraphDateTimeTimeZone, type IMicrosoftGraphErrorBody, type IMicrosoftGraphEvent, type IMicrosoftGraphEventBatchResponse, type IMicrosoftGraphEventsResponse, type IMicrosoftGraphRecurrence, type IMicrosoftGraphRecurrencePattern, type IMicrosoftGraphRecurrenceRange, type IMicrosoftGraphRoom, type IMicrosoftGraphRoomsResponse, type IMicrosoftGraphSubscription, type IMicrosoftIntegrationConfig, type IMicrosoftPlatformConfig, type IMicrosoftTokenResponse, INVOICE_STATUS_ENUM, type INonSensitiveStoredField, type IOfferingBookingOccurrence, type IOfferingResource, type IOfferingResourceMedia, type IOrderGuest, type IRecurringInvoices, type IRecurringInvoicesResponse, type IRefreshWebhookRequest, type IRefreshWebhookResponse, type IRefundCustomerPayment, type IRegisterDeviceInput, type IRegisterDeviceResponse, type IRegisterWebhookRequest, type IRegisterWebhookResponse, type IRemoveCapabilityIntegrationMappingInput, type IRemoveResourceFromIntegrationRequest, type IRemoveResourceFromIntegrationResponse, type IResource, type IResourceManagementContext, type ISecureStorageWriteOptions, type ISensitiveStoredField, type IStoredConfigField, type ISyncEventsRequest, type ISyncEventsResponse, type ISystemResponse, type ITransactionNumberSeries, type ITransactionNumberSeriesItem, type IUpdateAPIResponse, type IUpdateCapabilityIntegration, type IUpdateCapabilityIntegrationRequest, type IUpdateCapabilityIntegrationResponse, type IUpdateCapabilityIntegrationUpdateData, type IUpdateCustomerContactPersonRequest, type IUpdateCustomerPaymentRequest, type IUpdateCustomerRequest, type IUpdateDeviceCertificateInput, type IUpdateDeviceCertificateResponse, type IUpdateEventInstancesRequest, type IUpdateEventInstancesResponse, type IUpdateEventRequest, type IUpdateOfferingIntegrationResourceConfigurationInput, type IUpdateOfferingIntegrationResourceConfigurationResponse, type IUpdateOrderRequest, type IUpdateOrderResponse, type IUpdateRecurringInvoiceRequest, type IUpdateRecurringInvoiceResponse, type IUpdateRecurringInvoiceStatusRequest, type IUserAccessGroup, type IValidatedCapabilityIntegration, type IValidatedCapabilityIntegrationConfig, type IWebhookManagementContext, type IWellnessManagementRequestOptions, IntegrationBookingDao, IntegrationCommonDao, IntegrationConfigSecureStorageService, IntegrationConfigurationDao, AppModule$1 as IntegrationLibsModule, AppModule as IntegrationMicrosoftModule, IntegrationOnpremDeploymentDao, IntegrationRequestLoggerService, IntegrationResourceManagementDao, IntegrationServiceCommunicationTopicDao, IntegrationSubcapabilityDao, IntegrationUserManagementDao, IntegrationVisitorCredentialMappingDao, type InvoiceAccessDetails, MICROSOFT_CALENDAR_DELTA_DEFAULT_WINDOW_YEARS, MICROSOFT_CLIENT_CREDENTIALS_GRANT_TYPE, MICROSOFT_DEFAULT_ACCESS_TOKEN_TYPE, MICROSOFT_DEFAULT_AUTH_URL, MICROSOFT_DEFAULT_GRAPH_BASE_URL, MICROSOFT_DEFAULT_GRAPH_SCOPE, MICROSOFT_DEFAULT_HEADERS, MICROSOFT_GRAPH_PATHS, MICROSOFT_SECURE_STORAGE, MICROSOFT_TOKEN_HEADERS, MicrosoftApiClientService, MicrosoftAuthService, MicrosoftCalendarAuthHandler, MicrosoftCalendarBookingHandler, MicrosoftCalendarBookingService, MicrosoftCalendarIntegrationConfigurationHandler, MicrosoftCalendarResourceHandler, MicrosoftCalendarResourceService, MicrosoftCalendarWebhookHandler, MicrosoftCalendarWebhookService, type MicrosoftIntegrationConfigInput, MicrosoftIntegrationConfigurationService, type Note, type NoteAttachment, type NoteChangelog, type NoteChangelogRecord, type NoteResource, type NoteUserIdentity, RECURRING_INVOICE_STATUS, RECURRING_INVOICE_STATUS_ENUM, RateLimiterService, type ResourceAssetMapping, TRAFFIC_ROUTER_CONFIGURATION_STORE_KEY, TrafficGatewayService, type UserIdentity, buildMicrosoftIntegrationConfig, getMicrosoftKmsKeyId, looksLikeStoredSecureConfig };
|
|
2824
|
+
export { type AccountConfig, type ActivityLogAuthor, AdapterFactoryService, BOOKABLE_ITEM_STATUS_ENUM, BOOKABLE_ITEM_TYPE_ENUM, BaseAccessManagement, BaseAccountingContactPersonManagement, BaseAccountingCreditNoteManagement, BaseAccountingCustomerPaymentManagement, BaseAccountingInvoiceManagement, BaseAccountingLOAManagement, BaseAccountingMiscellaneousManagement, BaseAccountingTaxManagement, BaseAuth, BaseCalendarBookingManagement, BaseCalendarResourceManagement, BaseCalendarWebhookManagement, BaseCreditBooking, BaseCustomerManagement, BaseDeviceManagement, BaseIntegrationConfiguration, BaseIntegrationResourceManagement, BaseMembershipCustomerManagement, BaseMembershipManagement, BasePackageManagement, BasePayment, BasePaymentMethodManagement, BasePaymentUserManagement, BaseWellnessManagement, CALENDAR_PROVIDER_ENUM, CREDIT_FILTER_BY_ENUM, CREDIT_NOTE_STATUS, CREDIT_STATUS_ENUM, CREDIT_TYPE_ENUM, CalendarAuthAdapterFactory, CalendarBookingAdapterFactory, CalendarIntegrationConfigurationAdapterFactory, AppModule$2 as CalendarIntegrationManager, CalendarResourceAdapterFactory, CalendarWebhookAdapterFactory, type CapabilityIntegrationCategory, type CustomerActivity, DOWNLOAD_CUSTOMER_ACCOUNTING_STATEMENT_FILTER_BY_ENUM, DOWNLOAD_CUSTOMER_ACCOUNTING_STATEMENT_STATUS_ENUM, type DigitalAsset, EVENT_INSTANCE_KIND, GET_CUSTOMER_CREDIT_NOTES_FILTER_BY, GET_CUSTOMER_CREDIT_NOTES_SORT_BY, GET_INVOICES_FILTER_BY_ENUM, GET_INVOICES_SORT_BY_ENUM, GET_PAYMENTS_FILTER_BY_ENUM, GET_PAYMENTS_FILTER_VALUE_ENUM, GET_PAYMENTS_SORTING_ENUM, GET_RECURRING_INVOICES_SORT_BY_ENUM, type GetCustomerActivitiesInput, type GetFolioActivitiesOptionsInput, HTTP_METHOD, type IAPIResponse, type IAcceptEventRequest, type IAccessProfile, type IAccessProfiles, type IAccountingAPIResponse, type IAccountingInvoice, type IAccountingListAPIPageContext, type IAccountingListAPIResponse, type IAccountingListAPISearchCriteria, type IAccounts, type IAddCapIntegResourceMapping, type IAddCapabilityIntegration, type IAddCapabilityIntegrationConfig, type IAddCapabilityIntegrationConfiguredFor, type IAddCapabilityIntegrationInput, type IAddCapabilityIntegrationMappingResponse, type IAddCustomerContactPersonRequest, type IAddCustomerRequest, type IAddItemToOrderItemConfig, type IAddItemToOrderRequest, type IAddItemToOrderResponse, type IAddPaymentToOrderRequest, type IAddResourceToIntegrationInput, type IAddResourceToIntegrationResponse, type IAddUpdateAccessGroupRequest, type IAdminCredentials, type IApiCallRequest, type IApplyCreditNoteForInvoicesRequest, type IAvailableDateWithSlots, type IAvailableTaxes, type IAvailableTimeSlot, type IBatchRefreshWebhookItem, type IBatchRefreshWebhookResult, type IBookableItem, type IBookableItemCategory, type IBookableItemMedia, type IBookableItemPrice, type IBookableItemPriceMeta, type IBookingEvent, type IBookingEventInstance, type IBookingEventRef, type IBookingItem, type IBookingItemResource, type IBookingManagementContext, ICalendarAuthHandler, ICalendarBookingHandler, type ICalendarInboundRecurrence, type ICalendarInboundSyncEvent, ICalendarIntegrationConfigurationHandler, ICalendarResourceHandler, ICalendarWebhookHandler, type ICalendarWebhookSubscription, type ICancelEventRequest, type ICapabilityIntegration, type ICapabilityIntegrationConfig, type ICapabilityIntegrationResourceMapping, type ICapabilityIntegrationResourceMappingRow, type IConfiguration, type ICreateCreditNoteForInvoiceRequest, type ICreateCustomerPaymentRequest, type ICreateEventRequest, type ICreateOrderRequest, type ICreateOrderResponse, type ICreateRecurringInvoiceLineItem, type ICreateRecurringInvoiceRequest, type ICreateRecurringInvoiceResponse, type ICreateRefundRequest, type ICredit, type ICreditNoteAppliedInvoice, type ICreditNoteOperator, type ICurrency, type ICustomer, type ICustomerAddionalDetails, type ICustomerContactPerson, type ICustomerContactPersonResponse, type ICustomerCreditNote, type ICustomerCreditNoteDetail, type ICustomerLastCheckIn, type ICustomerPaymentDetails, type ICustomerPaymentRecord, type ICustomerRole, type ICustomerStatusResponse, type IDeleteAPIResponse, type IDeleteCustomerContactPersonRequest, type IDeleteDeviceInput, type IDeleteDeviceResponse, type IDeleteEventRequest, type IDeleteWebhookRequest, type IDownloadCustomerAccountingStatementRequest, type IEventSyncMetadata, type IExcludedDateResult, type IFetchOfferingAvailabilityRequest, type IGetAccessProfilesResponse, type IGetAppointmentsRequest, type IGetAvailableDatesAndTimeSlotsResponse, type IGetBookableItemsFromCreditRequest, type IGetCalendarEventRequest, type IGetCapabilityIntegrationInput, type IGetCapabilityIntegrationResult, type IGetCapabilityIntegrationsFilterInput, type IGetCapabilityIntegrationsOptionsInput, type IGetCapabilityIntegrationsRequest, type IGetCapabilityIntegrationsResponse, type IGetCapabilityIntegrationsSortingInput, type IGetCategoriesRequest, type IGetCoursesRequest, type IGetCreateCustomerPayment, type IGetCreateCustomerPaymentInfo, type IGetCustomerAccessGroupsInput, type IGetCustomerAccessGroupsResponse, type IGetCustomerActivities, type IGetCustomerCreditNotesRequest, type IGetCustomerCreditNotesResponse, type IGetCustomerCreditsRequest, type IGetCustomerCreditsRequestFilters, type IGetCustomerCreditsRequestOptions, type IGetCustomerPayment, type IGetCustomerPaymentRefundInfo, type IGetCustomerPaymentRequest, type IGetCustomerPayments, type IGetCustomerPaymentsFilter, type IGetCustomerPaymentsOptions, type IGetCustomerPaymentsRequest, type IGetCustomerPaymentsSorting, type IGetCustomerRequest, type IGetDeviceKeyInput, type IGetDeviceKeyResponse, type IGetDevicesInput, type IGetDevicesResponse, type IGetEventInstancesRequest, type IGetEventsRequest, type IGetEventsResponse, type IGetInvoicesOptions, type IGetInvoicesRequest, type IGetOrderResponse, type IGetPractitionersRequest, type IGetRecurringInvoiceInput, type IGetRecurringInvoiceRequest, type IGetRecurringInvoicesOptions, type IGetRecurringInvoicesRequest, type IGetRefundCustomerPayment, type IGetResourcesRequest, type IGetResourcesResponse, type IGetSessionsRequest, type IGraphBatchRequest, type IGraphBatchRequestItem, type IGraphBatchResponse, type IGraphBatchResponseItem, type IIcon, type IInstanceUpdate, type IIntegrationConfigFieldMetadata, type IIntegrationConfigFieldMetadataMap, type IIntegrationConfigJson, type IIntegrationConfigStructureMetadata, type IIntegrationRequestContext, type IIntegrationRequestLog, type IInvoice, type IInvoiceCapabilityIntegration, type IInvoiceCapabilityIntegrationConfig, type IInvoiceIntegrationRequest, type IInvoiceResponse, type IInvoicesResponse, type IKey, type IListUsersInput, type IListUsersResponse, type IMarkCustomerContactPersonPrimaryRequest, type IMicrosoftAccessDetails, type IMicrosoftAccessToken, type IMicrosoftApiCallRequest, type IMicrosoftConfig, type IMicrosoftGraphAttendee, type IMicrosoftGraphBatchRequest, type IMicrosoftGraphBatchRequestItem, type IMicrosoftGraphBatchResponse, type IMicrosoftGraphBatchResponseItem, type IMicrosoftGraphDateTimeTimeZone, type IMicrosoftGraphErrorBody, type IMicrosoftGraphEvent, type IMicrosoftGraphEventBatchResponse, type IMicrosoftGraphEventsResponse, type IMicrosoftGraphRecurrence, type IMicrosoftGraphRecurrencePattern, type IMicrosoftGraphRecurrenceRange, type IMicrosoftGraphRoom, type IMicrosoftGraphRoomsResponse, type IMicrosoftGraphSubscription, type IMicrosoftIntegrationConfig, type IMicrosoftPlatformConfig, type IMicrosoftTokenResponse, INVOICE_STATUS_ENUM, type INonSensitiveStoredField, type IOfferingBookingOccurrence, type IOfferingResource, type IOfferingResourceMedia, type IOperator, type IOrderGuest, type IRecurringInvoices, type IRecurringInvoicesResponse, type IRefreshWebhookRequest, type IRefreshWebhookResponse, type IRefundCustomerPayment, type IRegisterDeviceInput, type IRegisterDeviceResponse, type IRegisterWebhookRequest, type IRegisterWebhookResponse, type IRemoveCapabilityIntegrationMappingInput, type IRemoveResourceFromIntegrationRequest, type IRemoveResourceFromIntegrationResponse, type IResource, type IResourceManagementContext, type ISecureStorageWriteOptions, type ISensitiveStoredField, type IStoredConfigField, type ISyncEventsRequest, type ISyncEventsResponse, type ISystemResponse, type ITransactionNumberSeries, type ITransactionNumberSeriesItem, type IUpdateAPIResponse, type IUpdateCapabilityIntegration, type IUpdateCapabilityIntegrationRequest, type IUpdateCapabilityIntegrationResponse, type IUpdateCapabilityIntegrationUpdateData, type IUpdateCustomerContactPersonRequest, type IUpdateCustomerPaymentRequest, type IUpdateCustomerRequest, type IUpdateDeviceCertificateInput, type IUpdateDeviceCertificateResponse, type IUpdateEventInstancesRequest, type IUpdateEventInstancesResponse, type IUpdateEventRequest, type IUpdateOfferingIntegrationResourceConfigurationInput, type IUpdateOfferingIntegrationResourceConfigurationResponse, type IUpdateOrderRequest, type IUpdateOrderResponse, type IUpdateRecurringInvoiceRequest, type IUpdateRecurringInvoiceResponse, type IUpdateRecurringInvoiceStatusRequest, type IUserAccessGroup, type IValidatedCapabilityIntegration, type IValidatedCapabilityIntegrationConfig, type IWebhookManagementContext, type IWellnessManagementRequestOptions, IntegrationBookingDao, IntegrationCommonDao, IntegrationConfigSecureStorageService, IntegrationConfigurationDao, AppModule$1 as IntegrationLibsModule, AppModule as IntegrationMicrosoftModule, IntegrationOnpremDeploymentDao, IntegrationRequestLoggerService, IntegrationResourceManagementDao, IntegrationServiceCommunicationTopicDao, IntegrationSubcapabilityDao, IntegrationUserManagementDao, IntegrationVisitorCredentialMappingDao, type InvoiceAccessDetails, MICROSOFT_CALENDAR_DELTA_DEFAULT_WINDOW_YEARS, MICROSOFT_CLIENT_CREDENTIALS_GRANT_TYPE, MICROSOFT_DEFAULT_ACCESS_TOKEN_TYPE, MICROSOFT_DEFAULT_AUTH_URL, MICROSOFT_DEFAULT_GRAPH_BASE_URL, MICROSOFT_DEFAULT_GRAPH_SCOPE, MICROSOFT_DEFAULT_HEADERS, MICROSOFT_GRAPH_PATHS, MICROSOFT_SECURE_STORAGE, MICROSOFT_TOKEN_HEADERS, MicrosoftApiClientService, MicrosoftAuthService, MicrosoftCalendarAuthHandler, MicrosoftCalendarBookingHandler, MicrosoftCalendarBookingService, MicrosoftCalendarIntegrationConfigurationHandler, MicrosoftCalendarResourceHandler, MicrosoftCalendarResourceService, MicrosoftCalendarWebhookHandler, MicrosoftCalendarWebhookService, type MicrosoftIntegrationConfigInput, MicrosoftIntegrationConfigurationService, type Note, type NoteAttachment, type NoteChangelog, type NoteChangelogRecord, type NoteResource, type NoteUserIdentity, RECURRING_INVOICE_STATUS, RECURRING_INVOICE_STATUS_ENUM, RateLimiterService, type ResourceAssetMapping, TRAFFIC_ROUTER_CONFIGURATION_STORE_KEY, TrafficGatewayService, type UserIdentity, buildMicrosoftIntegrationConfig, getMicrosoftKmsKeyId, looksLikeStoredSecureConfig };
|
package/dist/index.js
CHANGED
|
@@ -3541,18 +3541,23 @@ var MICROSOFT_DEFAULT_AUTH_URL = "https://login.microsoftonline.com/{tenantId}/o
|
|
|
3541
3541
|
|
|
3542
3542
|
// ../../packages/dvss-integration-microsoft/src/common/build-microsoft-integration-config.ts
|
|
3543
3543
|
function buildMicrosoftIntegrationConfig(integrationConfig, existing) {
|
|
3544
|
-
const existingBaseUrl = existing?.platformConfig?.baseUrl.trim();
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3544
|
+
const existingBaseUrl = typeof existing?.platformConfig?.baseUrl === "string" ? existing.platformConfig.baseUrl.trim() : void 0;
|
|
3545
|
+
const platformConfig = {
|
|
3546
|
+
authUrl: MICROSOFT_DEFAULT_AUTH_URL.replace("{tenantId}", integrationConfig.tenantId),
|
|
3547
|
+
baseUrl: existingBaseUrl || MICROSOFT_DEFAULT_GRAPH_BASE_URL
|
|
3548
|
+
};
|
|
3549
|
+
const result = {
|
|
3550
|
+
platformConfig,
|
|
3550
3551
|
integrationConfig: {
|
|
3551
3552
|
tenantId: integrationConfig.tenantId,
|
|
3552
3553
|
clientId: integrationConfig.clientId,
|
|
3553
3554
|
clientSecret: integrationConfig.clientSecret
|
|
3554
3555
|
}
|
|
3555
3556
|
};
|
|
3557
|
+
if (typeof existing?.supportResourceSubscription === "boolean") {
|
|
3558
|
+
result.supportResourceSubscription = existing.supportResourceSubscription;
|
|
3559
|
+
}
|
|
3560
|
+
return result;
|
|
3556
3561
|
}
|
|
3557
3562
|
__name(buildMicrosoftIntegrationConfig, "buildMicrosoftIntegrationConfig");
|
|
3558
3563
|
|
|
@@ -3914,6 +3919,9 @@ function toGraphEvent(event, options) {
|
|
|
3914
3919
|
if (attendees.length > 0) {
|
|
3915
3920
|
graph.attendees = attendees;
|
|
3916
3921
|
}
|
|
3922
|
+
if (event.transactionId !== void 0 && event.transactionId !== "") {
|
|
3923
|
+
graph.transactionId = event.transactionId;
|
|
3924
|
+
}
|
|
3917
3925
|
return graph;
|
|
3918
3926
|
}
|
|
3919
3927
|
__name(toGraphEvent, "toGraphEvent");
|
|
@@ -4488,10 +4496,38 @@ exports.MicrosoftCalendarBookingService = class MicrosoftCalendarBookingService
|
|
|
4488
4496
|
async deleteGraphEvent(mailboxEmail, eventId, integration, loggedInUserId) {
|
|
4489
4497
|
this.assertMailbox(mailboxEmail);
|
|
4490
4498
|
this.assertEventId(eventId);
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4499
|
+
try {
|
|
4500
|
+
await this.microsoftApiClient.apiCall({
|
|
4501
|
+
apiMethod: HTTP_METHOD.DELETE,
|
|
4502
|
+
url: MICROSOFT_GRAPH_PATHS.userCalendarEvent(mailboxEmail, eventId)
|
|
4503
|
+
}, integration, loggedInUserId);
|
|
4504
|
+
} catch (error) {
|
|
4505
|
+
const status = this.readHttpStatus(error);
|
|
4506
|
+
if (status === 404) {
|
|
4507
|
+
this.logger.info(loggedInUserId, this.deleteGraphEvent.name, this.fileName, "Graph event already deleted (404) \u2014 treating cancel as success", {
|
|
4508
|
+
mailboxEmail,
|
|
4509
|
+
eventId
|
|
4510
|
+
});
|
|
4511
|
+
return;
|
|
4512
|
+
}
|
|
4513
|
+
if (status === 412) {
|
|
4514
|
+
const preconditionError = new Error(`Microsoft Graph precondition failed (412) deleting event ${eventId}`);
|
|
4515
|
+
preconditionError.status = 412;
|
|
4516
|
+
preconditionError.response = {
|
|
4517
|
+
status: 412
|
|
4518
|
+
};
|
|
4519
|
+
preconditionError.isGraphPreconditionFailed = true;
|
|
4520
|
+
throw preconditionError;
|
|
4521
|
+
}
|
|
4522
|
+
throw error;
|
|
4523
|
+
}
|
|
4524
|
+
}
|
|
4525
|
+
readHttpStatus(error) {
|
|
4526
|
+
const errorObject = error;
|
|
4527
|
+
if (errorObject.isGraphPreconditionFailed) {
|
|
4528
|
+
return 412;
|
|
4529
|
+
}
|
|
4530
|
+
return errorObject.response?.status ?? errorObject.status;
|
|
4495
4531
|
}
|
|
4496
4532
|
/**
|
|
4497
4533
|
* Graph always creates/updates a recurring series whole. For each date in
|
|
@@ -5074,9 +5110,10 @@ exports.MicrosoftIntegrationConfigurationService = class MicrosoftIntegrationCon
|
|
|
5074
5110
|
clientSecret: asString(incomingConfig.integrationConfig?.clientSecret) || asString(existingConfig.integrationConfig?.clientSecret) || ""
|
|
5075
5111
|
};
|
|
5076
5112
|
const platformConfig = incomingConfig.platformConfig ?? existingConfig.platformConfig;
|
|
5077
|
-
const mergedConfig = buildMicrosoftIntegrationConfig(mergedCredentials,
|
|
5078
|
-
platformConfig
|
|
5079
|
-
|
|
5113
|
+
const mergedConfig = buildMicrosoftIntegrationConfig(mergedCredentials, {
|
|
5114
|
+
platformConfig,
|
|
5115
|
+
supportResourceSubscription: typeof incomingConfig.supportResourceSubscription === "boolean" ? incomingConfig.supportResourceSubscription : existingConfig.supportResourceSubscription
|
|
5116
|
+
});
|
|
5080
5117
|
await this.microsoftAuthService.getAccessToken({
|
|
5081
5118
|
id: request.id,
|
|
5082
5119
|
config: mergedConfig,
|