@doctocar/tooling 0.3.1-3 → 0.3.1-4

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.
Files changed (143) hide show
  1. package/dist/emails/enums/AWSSESEmailSenders.enum.d.ts +1 -1
  2. package/dist/emails/enums/AWSSESEmailSenders.enum.js +1 -1
  3. package/dist/emails/enums/AWSSESEmailsTemplatesNames.enum.d.ts +2 -3
  4. package/dist/emails/enums/AWSSESEmailsTemplatesNames.enum.js +3 -4
  5. package/dist/emails/maps/EmailTemplateDataMap.map.d.ts +3 -4
  6. package/dist/emails/types/customer/index.d.ts +0 -1
  7. package/dist/emails/types/customer/index.js +0 -1
  8. package/dist/emails/types/{company/CompanyVatRejectedEmailData.type.d.ts → entity/EntityVatVerificationFailedEmailData.type.d.ts} +1 -1
  9. package/dist/emails/types/entity/EntityVatVerificationSucceededEmailData.type.d.ts +3 -0
  10. package/dist/emails/types/entity/index.d.ts +2 -0
  11. package/dist/{notifications/pushNotifications/types/company → emails/types/entity}/index.js +2 -2
  12. package/dist/emails/types/index.d.ts +1 -1
  13. package/dist/emails/types/index.js +1 -1
  14. package/dist/errors/enums/cloudFunctions/customers/index.d.ts +0 -1
  15. package/dist/errors/enums/cloudFunctions/customers/index.js +0 -1
  16. package/dist/errors/enums/cloudFunctions/entities/CreateNewEntityErrorCodes.enum.d.ts +26 -0
  17. package/dist/errors/enums/cloudFunctions/entities/CreateNewEntityErrorCodes.enum.js +30 -0
  18. package/dist/errors/enums/cloudFunctions/entities/index.d.ts +1 -0
  19. package/dist/{emails/types/company → errors/enums/cloudFunctions/entities}/index.js +1 -2
  20. package/dist/errors/enums/cloudFunctions/index.d.ts +1 -0
  21. package/dist/errors/enums/cloudFunctions/index.js +1 -0
  22. package/dist/firebase/cloudFunctions/enums/OnCallCloudFunctionsNames.enum.d.ts +1 -1
  23. package/dist/firebase/cloudFunctions/enums/OnCallCloudFunctionsNames.enum.js +2 -1
  24. package/dist/firebase/cloudFunctions/maps/OnCallCloudFunctionsTypeMappings.map.d.ts +5 -5
  25. package/dist/firebase/cloudFunctions/types/entities/CreateNewEntityPayload.type.d.ts +16 -0
  26. package/dist/firebase/cloudFunctions/types/entities/CreateNewEntityRequestData.type.d.ts +3 -0
  27. package/dist/firebase/cloudFunctions/types/entities/CreateNewEntityResponseData.type.d.ts +3 -0
  28. package/dist/firebase/cloudFunctions/types/entities/index.d.ts +3 -0
  29. package/dist/firebase/cloudFunctions/types/entities/index.js +19 -0
  30. package/dist/firebase/cloudFunctions/types/index.d.ts +1 -0
  31. package/dist/firebase/cloudFunctions/types/index.js +1 -0
  32. package/dist/firebase/cloudFunctions/types/users/customers/index.d.ts +0 -2
  33. package/dist/firebase/cloudFunctions/types/users/customers/index.js +0 -2
  34. package/dist/firebase/firestore/enums/FirestoreCollections.enum.d.ts +2 -1
  35. package/dist/firebase/firestore/enums/FirestoreCollections.enum.js +1 -0
  36. package/dist/firebase/firestore/enums/entities/EntityRegistrationIdentifierVerificationSource.enum.d.ts +3 -0
  37. package/dist/firebase/firestore/enums/entities/EntityRegistrationIdentifierVerificationSource.enum.js +7 -0
  38. package/dist/firebase/firestore/enums/entities/EntityRegistrationIdentifierVerificationStatus.enum.d.ts +6 -0
  39. package/dist/firebase/firestore/enums/entities/EntityRegistrationIdentifierVerificationStatus.enum.js +10 -0
  40. package/dist/firebase/firestore/enums/entities/index.d.ts +2 -0
  41. package/dist/firebase/firestore/enums/entities/index.js +2 -0
  42. package/dist/firebase/firestore/maps/FirestoreCollectionDocumentTypeMap.d.ts +2 -1
  43. package/dist/firebase/firestore/types/company/FrenchCompanyRegistration.type.d.ts +1 -1
  44. package/dist/firebase/firestore/types/entities/EntityLegalDetails.type.d.ts +8 -1
  45. package/dist/firebase/firestore/types/entities/EntityLegalRepresentative.type.d.ts +2 -2
  46. package/dist/firebase/firestore/types/entities/index.d.ts +1 -1
  47. package/dist/firebase/firestore/types/entities/index.js +1 -1
  48. package/dist/firebase/firestore/types/entityUniqueKeys/FirestoreEntityUniqueKeyDocument.type.d.ts +6 -0
  49. package/dist/firebase/firestore/types/entityUniqueKeys/index.d.ts +1 -0
  50. package/dist/firebase/firestore/types/entityUniqueKeys/index.js +17 -0
  51. package/dist/firebase/firestore/types/index.d.ts +1 -0
  52. package/dist/firebase/firestore/types/index.js +1 -0
  53. package/dist/firebase/firestore/types/paymentProviders/stripes/StripeConnectAccountSummary.type.d.ts +1 -0
  54. package/dist/firebase/firestore/types/userDocument/FirestoreUserDocumentCustomerInfos.type.d.ts +0 -7
  55. package/dist/firebase/firestore/utils/stubs/company/frenchCompanyRegistrationStub.js +2 -2
  56. package/dist/firebase/firestore/utils/stubs/configs/firestoreNotificationEventsPublicConfigDocumentStub.js +25 -32
  57. package/dist/firebase/firestore/utils/stubs/entityUniqueKeys/firestoreEntityUniqueKeyDocumentStub.d.ts +2 -0
  58. package/dist/firebase/firestore/utils/stubs/entityUniqueKeys/firestoreEntityUniqueKeyDocumentStub.js +12 -0
  59. package/dist/firebase/firestore/utils/stubs/entityUniqueKeys/index.d.ts +1 -0
  60. package/dist/firebase/firestore/utils/stubs/entityUniqueKeys/index.js +17 -0
  61. package/dist/firebase/firestore/utils/stubs/index.d.ts +1 -0
  62. package/dist/firebase/firestore/utils/stubs/index.js +1 -0
  63. package/dist/gcp/pubsub/enums/PubSubTopics.enum.d.ts +2 -1
  64. package/dist/gcp/pubsub/enums/PubSubTopics.enum.js +1 -0
  65. package/dist/gcp/pubsub/maps/PubSubTopicMessageMap.map.d.ts +2 -1
  66. package/dist/gcp/pubsub/types/entities/PubSubEntityVatNumberVerificationRequestedMessage.type.d.ts +3 -0
  67. package/dist/gcp/pubsub/types/entities/index.d.ts +1 -0
  68. package/dist/gcp/pubsub/types/entities/index.js +17 -0
  69. package/dist/gcp/pubsub/types/index.d.ts +1 -0
  70. package/dist/gcp/pubsub/types/index.js +1 -0
  71. package/dist/gcp/pubsub/utils/stubs/entities/index.d.ts +1 -0
  72. package/dist/gcp/pubsub/utils/stubs/entities/index.js +17 -0
  73. package/dist/gcp/pubsub/utils/stubs/entities/pubSubEntityVatNumberVerificationRequestedMessageStub.d.ts +2 -0
  74. package/dist/gcp/pubsub/utils/stubs/entities/pubSubEntityVatNumberVerificationRequestedMessageStub.js +9 -0
  75. package/dist/gcp/pubsub/utils/stubs/index.d.ts +1 -0
  76. package/dist/gcp/pubsub/utils/stubs/index.js +1 -0
  77. package/dist/notifications/enums/CustomerNotificationEventType.d.ts +1 -2
  78. package/dist/notifications/enums/CustomerNotificationEventType.js +0 -1
  79. package/dist/notifications/enums/EntityNotificationEventType.d.ts +4 -0
  80. package/dist/notifications/enums/EntityNotificationEventType.js +8 -0
  81. package/dist/notifications/enums/index.d.ts +1 -1
  82. package/dist/notifications/enums/index.js +1 -1
  83. package/dist/notifications/pushNotifications/enums/EntityPushNotificationType.d.ts +4 -0
  84. package/dist/notifications/pushNotifications/enums/EntityPushNotificationType.js +8 -0
  85. package/dist/notifications/pushNotifications/enums/index.d.ts +1 -1
  86. package/dist/notifications/pushNotifications/enums/index.js +1 -1
  87. package/dist/notifications/pushNotifications/maps/EntityPushNotificationDataMap.d.ts +9 -0
  88. package/dist/notifications/pushNotifications/maps/EntityPushNotificationDataMap.js +6 -0
  89. package/dist/notifications/pushNotifications/maps/index.d.ts +1 -0
  90. package/dist/notifications/pushNotifications/maps/index.js +1 -0
  91. package/dist/notifications/pushNotifications/types/PushNotificationDataMap.type.d.ts +2 -3
  92. package/dist/notifications/pushNotifications/types/entity/EntityVatVerificationFailedPushNotificationData.type.d.ts +4 -0
  93. package/dist/notifications/pushNotifications/types/entity/EntityVatVerificationSucceededPushNotificationData.type.d.ts +4 -0
  94. package/dist/notifications/pushNotifications/types/entity/index.d.ts +2 -0
  95. package/dist/notifications/pushNotifications/types/entity/index.js +18 -0
  96. package/dist/notifications/pushNotifications/types/index.d.ts +1 -1
  97. package/dist/notifications/pushNotifications/types/index.js +1 -1
  98. package/dist/notifications/types/NotificationEvent.type.d.ts +2 -2
  99. package/dist/utils/regex/__tests__/isValidCompanyLegalName.util.test.js +5 -0
  100. package/dist/utils/vat/__tests__/extractVatNumberAndCountryCode.test.js +39 -0
  101. package/dist/utils/vat/__tests__/{validateVATFormat.util.test.js → validateVatNumberFormat.test.js} +3 -3
  102. package/dist/utils/vat/extractVatNumberAndCountryCode.d.ts +4 -0
  103. package/dist/utils/vat/{extractVATNumber.util.js → extractVatNumberAndCountryCode.js} +2 -2
  104. package/dist/utils/vat/index.d.ts +2 -2
  105. package/dist/utils/vat/index.js +2 -2
  106. package/dist/utils/vat/types/{ValidateVATFormatArgs.type.d.ts → ValidateVatNumberFormatArgs.type.d.ts} +1 -1
  107. package/dist/utils/vat/types/ValidateVatNumberFormatArgs.type.js +2 -0
  108. package/dist/utils/vat/types/index.d.ts +1 -1
  109. package/dist/utils/vat/types/index.js +1 -1
  110. package/dist/utils/vat/validateVatNumberFormat.d.ts +2 -0
  111. package/dist/utils/vat/{validateVATFormat.util.js → validateVatNumberFormat.js} +2 -2
  112. package/package.json +1 -1
  113. package/dist/emails/types/company/CompanyVatVerifiedEmailData.type.d.ts +0 -3
  114. package/dist/emails/types/company/index.d.ts +0 -2
  115. package/dist/emails/types/customer/CustomerWelcomeEmailData.type.d.ts +0 -1
  116. package/dist/errors/enums/cloudFunctions/customers/ProcessCustomerUserOnboardingErrorCodes.enum.d.ts +0 -22
  117. package/dist/errors/enums/cloudFunctions/customers/ProcessCustomerUserOnboardingErrorCodes.enum.js +0 -26
  118. package/dist/firebase/cloudFunctions/types/users/customers/ProcessCustomerUserOnboardingRequestData.type.d.ts +0 -15
  119. package/dist/firebase/cloudFunctions/types/users/customers/ProcessCustomerUserOnboardingResponseData.type.d.ts +0 -1
  120. package/dist/notifications/enums/CompanyNotificationEventType.d.ts +0 -4
  121. package/dist/notifications/enums/CompanyNotificationEventType.js +0 -8
  122. package/dist/notifications/pushNotifications/enums/CompanyPushNotificationType.d.ts +0 -4
  123. package/dist/notifications/pushNotifications/enums/CompanyPushNotificationType.js +0 -8
  124. package/dist/notifications/pushNotifications/maps/CompanyPushNotificationDataMap.d.ts +0 -6
  125. package/dist/notifications/pushNotifications/types/company/CompanyVatVerificationFailedPushNotificationData.type.d.ts +0 -4
  126. package/dist/notifications/pushNotifications/types/company/CompanyVatVerificationSucceededPushNotificationData.type.d.ts +0 -4
  127. package/dist/notifications/pushNotifications/types/company/index.d.ts +0 -2
  128. package/dist/utils/vat/__tests__/extractVATNumber.util.test.js +0 -39
  129. package/dist/utils/vat/extractVATNumber.util.d.ts +0 -4
  130. package/dist/utils/vat/validateVATFormat.util.d.ts +0 -2
  131. /package/dist/emails/types/{company/CompanyVatRejectedEmailData.type.js → entity/EntityVatVerificationFailedEmailData.type.js} +0 -0
  132. /package/dist/emails/types/{company/CompanyVatVerifiedEmailData.type.js → entity/EntityVatVerificationSucceededEmailData.type.js} +0 -0
  133. /package/dist/{emails/types/customer/CustomerWelcomeEmailData.type.js → firebase/cloudFunctions/types/entities/CreateNewEntityPayload.type.js} +0 -0
  134. /package/dist/firebase/cloudFunctions/types/{users/customers/ProcessCustomerUserOnboardingRequestData.type.js → entities/CreateNewEntityRequestData.type.js} +0 -0
  135. /package/dist/firebase/cloudFunctions/types/{users/customers/ProcessCustomerUserOnboardingResponseData.type.js → entities/CreateNewEntityResponseData.type.js} +0 -0
  136. /package/dist/firebase/firestore/types/entities/{EntityRegistration.enum.d.ts → EntityRegistration.type.d.ts} +0 -0
  137. /package/dist/firebase/firestore/types/entities/{EntityRegistration.enum.js → EntityRegistration.type.js} +0 -0
  138. /package/dist/{notifications/pushNotifications/maps/CompanyPushNotificationDataMap.js → firebase/firestore/types/entityUniqueKeys/FirestoreEntityUniqueKeyDocument.type.js} +0 -0
  139. /package/dist/{notifications/pushNotifications/types/company/CompanyVatVerificationFailedPushNotificationData.type.js → gcp/pubsub/types/entities/PubSubEntityVatNumberVerificationRequestedMessage.type.js} +0 -0
  140. /package/dist/notifications/pushNotifications/types/{company/CompanyVatVerificationSucceededPushNotificationData.type.js → entity/EntityVatVerificationFailedPushNotificationData.type.js} +0 -0
  141. /package/dist/{utils/vat/types/ValidateVATFormatArgs.type.js → notifications/pushNotifications/types/entity/EntityVatVerificationSucceededPushNotificationData.type.js} +0 -0
  142. /package/dist/utils/vat/__tests__/{extractVATNumber.util.test.d.ts → extractVatNumberAndCountryCode.test.d.ts} +0 -0
  143. /package/dist/utils/vat/__tests__/{validateVATFormat.util.test.d.ts → validateVatNumberFormat.test.d.ts} +0 -0
@@ -2,7 +2,6 @@ import type { SupportedLocaleCodes } from "../../../../enums";
2
2
  import type { CustomerAccountTypes } from "../../enums";
3
3
  import type { CustomerCompanyDetails, LegalAddress } from "../company";
4
4
  import type { FirestoreTimestamp } from "../FirestoreTimestamp.type";
5
- import type { FirestoreImageVariantSet } from "../image";
6
5
  import type { TermsAndPolicy } from "../legal";
7
6
  import type { CustomerInfosNotificationsPreferences } from "./CustomerInfosNotificationsPreferences.type";
8
7
  export type FirestoreUserDocumentCustomerInfos = {
@@ -10,12 +9,6 @@ export type FirestoreUserDocumentCustomerInfos = {
10
9
  stripe?: {
11
10
  customerId?: string;
12
11
  };
13
- profile?: {
14
- photo?: {
15
- storagePaths: FirestoreImageVariantSet;
16
- updatedAt: FirestoreTimestamp;
17
- };
18
- };
19
12
  preferredCommunicationLanguageLocale: SupportedLocaleCodes;
20
13
  termsOfUse?: TermsAndPolicy;
21
14
  privacyPolicy?: TermsAndPolicy;
@@ -5,8 +5,8 @@ const enums_1 = require("../../../../../enums");
5
5
  function frenchCompanyRegistrationStub(overwrite = {}) {
6
6
  return {
7
7
  shareCapitalInEuros: 1_000,
8
- siren: "123456789",
9
- siretPrincipal: "12345678901234",
8
+ siren: "732829320",
9
+ siretPrincipal: "73282932000074",
10
10
  rcsCity: enums_1.FrenchRcsCities.PARIS,
11
11
  rneDepartment: enums_1.FrenchDepartments.PARIS,
12
12
  rna: "W123004320",
@@ -13,6 +13,7 @@ function firestoreNotificationEventsPublicConfigDocumentStub(overwrite = {}) {
13
13
  },
14
14
  data: {
15
15
  events: {
16
+ // Customer
16
17
  [notifications_1.CustomerNotificationEventType.CUSTOMER_ORDER_UPCOMING_REMINDER]: {
17
18
  enabled: true,
18
19
  userConfigurableChannels: {},
@@ -73,7 +74,7 @@ function firestoreNotificationEventsPublicConfigDocumentStub(overwrite = {}) {
73
74
  },
74
75
  deliveryRules: {},
75
76
  },
76
- [notifications_1.ProfessionalNotificationEventType.PROFESSIONAL_ORDER_UPCOMING_REMINDER]: {
77
+ [notifications_1.CustomerNotificationEventType.CUSTOMER_ORDER_REVIEW_REQUESTED]: {
77
78
  enabled: true,
78
79
  userConfigurableChannels: {},
79
80
  defaultChannels: {
@@ -83,7 +84,7 @@ function firestoreNotificationEventsPublicConfigDocumentStub(overwrite = {}) {
83
84
  },
84
85
  deliveryRules: {},
85
86
  },
86
- [notifications_1.ProfessionalNotificationEventType.PROFESSIONAL_ORDER_CANCELED]: {
87
+ [notifications_1.CustomerNotificationEventType.CUSTOMER_ORDER_ISSUE_REPORTED_CONFIRMATION]: {
87
88
  enabled: true,
88
89
  userConfigurableChannels: {},
89
90
  defaultChannels: {
@@ -93,7 +94,8 @@ function firestoreNotificationEventsPublicConfigDocumentStub(overwrite = {}) {
93
94
  },
94
95
  deliveryRules: {},
95
96
  },
96
- [notifications_1.ProfessionalNotificationEventType.PROFESSIONAL_ORDER_NEW_MESSAGE_RECEIVED]: {
97
+ // Professional
98
+ [notifications_1.ProfessionalNotificationEventType.PROFESSIONAL_ORDER_UPCOMING_REMINDER]: {
97
99
  enabled: true,
98
100
  userConfigurableChannels: {},
99
101
  defaultChannels: {
@@ -103,7 +105,7 @@ function firestoreNotificationEventsPublicConfigDocumentStub(overwrite = {}) {
103
105
  },
104
106
  deliveryRules: {},
105
107
  },
106
- [notifications_1.ProfessionalNotificationEventType.PROFESSIONAL_NEW_ORDER_RECEIVED]: {
108
+ [notifications_1.ProfessionalNotificationEventType.PROFESSIONAL_ORDER_CANCELED]: {
107
109
  enabled: true,
108
110
  userConfigurableChannels: {},
109
111
  defaultChannels: {
@@ -113,7 +115,7 @@ function firestoreNotificationEventsPublicConfigDocumentStub(overwrite = {}) {
113
115
  },
114
116
  deliveryRules: {},
115
117
  },
116
- [notifications_1.ProfessionalNotificationEventType.PROFESSIONAL_ORDER_COMPLETED_BY_PROFESSIONAL]: {
118
+ [notifications_1.ProfessionalNotificationEventType.PROFESSIONAL_ORDER_NEW_MESSAGE_RECEIVED]: {
117
119
  enabled: true,
118
120
  userConfigurableChannels: {},
119
121
  defaultChannels: {
@@ -123,8 +125,8 @@ function firestoreNotificationEventsPublicConfigDocumentStub(overwrite = {}) {
123
125
  },
124
126
  deliveryRules: {},
125
127
  },
126
- [notifications_1.CustomerNotificationEventType.CUSTOMER_ORDER_ISSUE_REPORTED_CONFIRMATION]: {
127
- enabled: false,
128
+ [notifications_1.ProfessionalNotificationEventType.PROFESSIONAL_NEW_ORDER_RECEIVED]: {
129
+ enabled: true,
128
130
  userConfigurableChannels: {},
129
131
  defaultChannels: {
130
132
  email: false,
@@ -133,8 +135,8 @@ function firestoreNotificationEventsPublicConfigDocumentStub(overwrite = {}) {
133
135
  },
134
136
  deliveryRules: {},
135
137
  },
136
- [notifications_1.ProfessionalNotificationEventType.PROFESSIONAL_ORDER_ISSUE_REPORTED_CONFIRMATION]: {
137
- enabled: false,
138
+ [notifications_1.ProfessionalNotificationEventType.PROFESSIONAL_ORDER_COMPLETED_BY_PROFESSIONAL]: {
139
+ enabled: true,
138
140
  userConfigurableChannels: {},
139
141
  defaultChannels: {
140
142
  email: false,
@@ -143,8 +145,8 @@ function firestoreNotificationEventsPublicConfigDocumentStub(overwrite = {}) {
143
145
  },
144
146
  deliveryRules: {},
145
147
  },
146
- [notifications_1.CustomerNotificationEventType.CUSTOMER_ONBOARDING_COMPLETED]: {
147
- enabled: false,
148
+ [notifications_1.ProfessionalNotificationEventType.PROFESSIONAL_ORDER_ISSUE_REPORTED_CONFIRMATION]: {
149
+ enabled: true,
148
150
  userConfigurableChannels: {},
149
151
  defaultChannels: {
150
152
  email: false,
@@ -154,17 +156,7 @@ function firestoreNotificationEventsPublicConfigDocumentStub(overwrite = {}) {
154
156
  deliveryRules: {},
155
157
  },
156
158
  [notifications_1.ProfessionalNotificationEventType.PROFESSIONAL_WELCOME]: {
157
- enabled: false,
158
- userConfigurableChannels: {},
159
- defaultChannels: {
160
- email: false,
161
- push: false,
162
- sms: false,
163
- },
164
- deliveryRules: {},
165
- },
166
- [notifications_1.CompanyNotificationEventType.COMPANY_VAT_VERIFICATION_FAILED]: {
167
- enabled: false,
159
+ enabled: true,
168
160
  userConfigurableChannels: {},
169
161
  defaultChannels: {
170
162
  email: false,
@@ -173,8 +165,8 @@ function firestoreNotificationEventsPublicConfigDocumentStub(overwrite = {}) {
173
165
  },
174
166
  deliveryRules: {},
175
167
  },
176
- [notifications_1.CompanyNotificationEventType.COMPANY_VAT_VERIFICATION_SUCCEEDED]: {
177
- enabled: false,
168
+ [notifications_1.ProfessionalNotificationEventType.PROFESSIONAL_IS_NOW_BOOKABLE]: {
169
+ enabled: true,
178
170
  userConfigurableChannels: {},
179
171
  defaultChannels: {
180
172
  email: false,
@@ -183,8 +175,8 @@ function firestoreNotificationEventsPublicConfigDocumentStub(overwrite = {}) {
183
175
  },
184
176
  deliveryRules: {},
185
177
  },
186
- [notifications_1.ProfessionalNotificationEventType.PROFESSIONAL_IS_NOW_BOOKABLE]: {
187
- enabled: false,
178
+ [notifications_1.ProfessionalNotificationEventType.PROFESSIONAL_IS_NOT_BOOKABLE_ANYMORE]: {
179
+ enabled: true,
188
180
  userConfigurableChannels: {},
189
181
  defaultChannels: {
190
182
  email: false,
@@ -193,8 +185,8 @@ function firestoreNotificationEventsPublicConfigDocumentStub(overwrite = {}) {
193
185
  },
194
186
  deliveryRules: {},
195
187
  },
196
- [notifications_1.ProfessionalNotificationEventType.PROFESSIONAL_IS_NOT_BOOKABLE_ANYMORE]: {
197
- enabled: false,
188
+ [notifications_1.ProfessionalNotificationEventType.PROFESSIONAL_ONBOARDING_COMPLETED]: {
189
+ enabled: true,
198
190
  userConfigurableChannels: {},
199
191
  defaultChannels: {
200
192
  email: false,
@@ -203,8 +195,9 @@ function firestoreNotificationEventsPublicConfigDocumentStub(overwrite = {}) {
203
195
  },
204
196
  deliveryRules: {},
205
197
  },
206
- [notifications_1.ProfessionalNotificationEventType.PROFESSIONAL_ONBOARDING_COMPLETED]: {
207
- enabled: false,
198
+ // Entity
199
+ [notifications_1.EntityNotificationEventType.ENTITY_VAT_VERIFICATION_FAILED]: {
200
+ enabled: true,
208
201
  userConfigurableChannels: {},
209
202
  defaultChannels: {
210
203
  email: false,
@@ -213,8 +206,8 @@ function firestoreNotificationEventsPublicConfigDocumentStub(overwrite = {}) {
213
206
  },
214
207
  deliveryRules: {},
215
208
  },
216
- [notifications_1.CustomerNotificationEventType.CUSTOMER_ORDER_REVIEW_REQUESTED]: {
217
- enabled: false,
209
+ [notifications_1.EntityNotificationEventType.ENTITY_VAT_VERIFICATION_SUCCEEDED]: {
210
+ enabled: true,
218
211
  userConfigurableChannels: {},
219
212
  defaultChannels: {
220
213
  email: false,
@@ -0,0 +1,2 @@
1
+ import type { FirestoreEntityUniqueKeyDocument } from "../../../types";
2
+ export declare function firestoreEntityUniqueKeyDocumentStub(overwrite?: Partial<FirestoreEntityUniqueKeyDocument>): FirestoreEntityUniqueKeyDocument;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.firestoreEntityUniqueKeyDocumentStub = firestoreEntityUniqueKeyDocumentStub;
4
+ const firestoreTimestampStub_1 = require("../firestoreTimestampStub");
5
+ function firestoreEntityUniqueKeyDocumentStub(overwrite = {}) {
6
+ return {
7
+ createdAt: (0, firestoreTimestampStub_1.firestoreTimestampStub)(),
8
+ updatedAt: (0, firestoreTimestampStub_1.firestoreTimestampStub)(),
9
+ entityId: "some-entity-id",
10
+ ...overwrite,
11
+ };
12
+ }
@@ -0,0 +1 @@
1
+ export * from "./firestoreEntityUniqueKeyDocumentStub";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./firestoreEntityUniqueKeyDocumentStub"), exports);
@@ -26,3 +26,4 @@ export * from "./functionsDeploymentRuns";
26
26
  export * from "./marketplaceFinancialReports";
27
27
  export * from "./entities";
28
28
  export * from "./entityMembers";
29
+ export * from "./entityUniqueKeys";
@@ -42,3 +42,4 @@ __exportStar(require("./functionsDeploymentRuns"), exports);
42
42
  __exportStar(require("./marketplaceFinancialReports"), exports);
43
43
  __exportStar(require("./entities"), exports);
44
44
  __exportStar(require("./entityMembers"), exports);
45
+ __exportStar(require("./entityUniqueKeys"), exports);
@@ -20,5 +20,6 @@ export declare enum PubSubTopics {
20
20
  FIRESTORE_USER_METRICS = "firestore-user-metrics",
21
21
  AUTO_CANCEL_EXPIRED_CONFIRMED_ORDER = "auto-cancel-expired-confirmed-order",
22
22
  DEFAULT_DLQ = "default-dead-letter-queue",
23
- NOTIFICATION_EVENT = "notification-event"
23
+ NOTIFICATION_EVENT = "notification-event",
24
+ ENTITY_VAT_NUMBER_VERIFICATION_REQUESTED = "entity-vat-number-verification-requested"
24
25
  }
@@ -25,4 +25,5 @@ var PubSubTopics;
25
25
  PubSubTopics["AUTO_CANCEL_EXPIRED_CONFIRMED_ORDER"] = "auto-cancel-expired-confirmed-order";
26
26
  PubSubTopics["DEFAULT_DLQ"] = "default-dead-letter-queue";
27
27
  PubSubTopics["NOTIFICATION_EVENT"] = "notification-event";
28
+ PubSubTopics["ENTITY_VAT_NUMBER_VERIFICATION_REQUESTED"] = "entity-vat-number-verification-requested";
28
29
  })(PubSubTopics || (exports.PubSubTopics = PubSubTopics = {}));
@@ -1,5 +1,5 @@
1
1
  import type { PubSubTopics } from "../enums";
2
- import type { PubSubAutoCancelConfirmedOrderMessage, PubSubAutoCompleteOrderAfterIssueReportingWindowMessage, PubSubBillingAlertsMessage, PubSubDefaultDlqMessage, PubSubFirestoreUserMetricsMessage, PubSubNotificationEventMessage, PubSubOrderCompletedMessage, PubSubOrderInvoicesReadyMessage, PubSubOrderIssueReportedMessage, PubSubOrderIssueStateRecomputeRequestedMessage, PubSubOrderOperationalStateShouldUpdateMessage, PubSubOrderPaymentCanceledMessage, PubSubOrderPaymentFailedMessage, PubSubOrderPaymentSucceededMessage, PubSubOrderStartedMessage, PubSubProcessWalletWithdrawalRequestMessage, PubSubServicesCompletedMessage, PubSubStripeConnectedAccountBalanceAvailableUpdatedMessage, PubSubStripeConnectedAccountUpdatedMessage, PubSubUserOrderReminderMessage, PubSubWalletWithdrawalFailedMessage, PubSubWalletWithdrawalSucceededMessage } from "../types";
2
+ import type { PubSubAutoCancelConfirmedOrderMessage, PubSubAutoCompleteOrderAfterIssueReportingWindowMessage, PubSubBillingAlertsMessage, PubSubDefaultDlqMessage, PubSubEntityVatNumberVerificationRequestedMessage, PubSubFirestoreUserMetricsMessage, PubSubNotificationEventMessage, PubSubOrderCompletedMessage, PubSubOrderInvoicesReadyMessage, PubSubOrderIssueReportedMessage, PubSubOrderIssueStateRecomputeRequestedMessage, PubSubOrderOperationalStateShouldUpdateMessage, PubSubOrderPaymentCanceledMessage, PubSubOrderPaymentFailedMessage, PubSubOrderPaymentSucceededMessage, PubSubOrderStartedMessage, PubSubProcessWalletWithdrawalRequestMessage, PubSubServicesCompletedMessage, PubSubStripeConnectedAccountBalanceAvailableUpdatedMessage, PubSubStripeConnectedAccountUpdatedMessage, PubSubUserOrderReminderMessage, PubSubWalletWithdrawalFailedMessage, PubSubWalletWithdrawalSucceededMessage } from "../types";
3
3
  type PubSubTopicMessageMapBase = {
4
4
  [PubSubTopics.BILLING_ALERTS]: PubSubBillingAlertsMessage;
5
5
  [PubSubTopics.STRIPE_CONNECTED_ACCOUNT_UPDATED]: PubSubStripeConnectedAccountUpdatedMessage;
@@ -23,6 +23,7 @@ type PubSubTopicMessageMapBase = {
23
23
  [PubSubTopics.ORDER_ISSUE_REPORTED]: PubSubOrderIssueReportedMessage;
24
24
  [PubSubTopics.ORDER_ISSUES_STATE_RECOMPUTE_REQUESTED]: PubSubOrderIssueStateRecomputeRequestedMessage;
25
25
  [PubSubTopics.DEFAULT_DLQ]: PubSubDefaultDlqMessage;
26
+ [PubSubTopics.ENTITY_VAT_NUMBER_VERIFICATION_REQUESTED]: PubSubEntityVatNumberVerificationRequestedMessage;
26
27
  };
27
28
  export type PubSubTopicMessageMap = {
28
29
  [K in PubSubTopics]: PubSubTopicMessageMapBase[K];
@@ -0,0 +1,3 @@
1
+ export type PubSubEntityVatNumberVerificationRequestedMessage = {
2
+ entityDocumentId: string;
3
+ };
@@ -0,0 +1 @@
1
+ export * from "./PubSubEntityVatNumberVerificationRequestedMessage.type";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./PubSubEntityVatNumberVerificationRequestedMessage.type"), exports);
@@ -5,3 +5,4 @@ export * from "./PubSubNotificationEventMessage.type";
5
5
  export * from "./orders";
6
6
  export * from "./wallets";
7
7
  export * from "./stripe";
8
+ export * from "./entities";
@@ -21,3 +21,4 @@ __exportStar(require("./PubSubNotificationEventMessage.type"), exports);
21
21
  __exportStar(require("./orders"), exports);
22
22
  __exportStar(require("./wallets"), exports);
23
23
  __exportStar(require("./stripe"), exports);
24
+ __exportStar(require("./entities"), exports);
@@ -0,0 +1 @@
1
+ export * from "./pubSubEntityVatNumberVerificationRequestedMessageStub";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./pubSubEntityVatNumberVerificationRequestedMessageStub"), exports);
@@ -0,0 +1,2 @@
1
+ import type { PubSubEntityVatNumberVerificationRequestedMessage } from "../../../types";
2
+ export declare function pubSubEntityVatNumberVerificationRequestedMessageStub(overwrite?: Partial<PubSubEntityVatNumberVerificationRequestedMessage>): PubSubEntityVatNumberVerificationRequestedMessage;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pubSubEntityVatNumberVerificationRequestedMessageStub = pubSubEntityVatNumberVerificationRequestedMessageStub;
4
+ function pubSubEntityVatNumberVerificationRequestedMessageStub(overwrite = {}) {
5
+ return {
6
+ entityDocumentId: "entity-document-id",
7
+ ...overwrite,
8
+ };
9
+ }
@@ -13,3 +13,4 @@ export * from "./pubSubStripeConnectedAccountBalanceAvailableUpdatedMessageStub"
13
13
  export * from "./wallets";
14
14
  export * from "./pubSubOrderIssueReportedMessageStub";
15
15
  export * from "./pubSubOrderIssueStateRecomputeRequestedMessageStub";
16
+ export * from "./entities";
@@ -29,3 +29,4 @@ __exportStar(require("./pubSubStripeConnectedAccountBalanceAvailableUpdatedMessa
29
29
  __exportStar(require("./wallets"), exports);
30
30
  __exportStar(require("./pubSubOrderIssueReportedMessageStub"), exports);
31
31
  __exportStar(require("./pubSubOrderIssueStateRecomputeRequestedMessageStub"), exports);
32
+ __exportStar(require("./entities"), exports);
@@ -6,6 +6,5 @@ export declare enum CustomerNotificationEventType {
6
6
  CUSTOMER_ORDER_COMPLETED_BY_PROFESSIONAL = "CUSTOMER_ORDER_COMPLETED_BY_PROFESSIONAL",
7
7
  CUSTOMER_ORDER_CANCELED = "CUSTOMER_ORDER_CANCELED",
8
8
  CUSTOMER_ORDER_NEW_MESSAGE_RECEIVED = "CUSTOMER_ORDER_NEW_MESSAGE_RECEIVED",
9
- CUSTOMER_ORDER_ISSUE_REPORTED_CONFIRMATION = "CUSTOMER_ORDER_ISSUE_REPORTED_CONFIRMATION",
10
- CUSTOMER_ONBOARDING_COMPLETED = "CUSTOMER_ONBOARDING_COMPLETED"
9
+ CUSTOMER_ORDER_ISSUE_REPORTED_CONFIRMATION = "CUSTOMER_ORDER_ISSUE_REPORTED_CONFIRMATION"
11
10
  }
@@ -11,5 +11,4 @@ var CustomerNotificationEventType;
11
11
  CustomerNotificationEventType["CUSTOMER_ORDER_CANCELED"] = "CUSTOMER_ORDER_CANCELED";
12
12
  CustomerNotificationEventType["CUSTOMER_ORDER_NEW_MESSAGE_RECEIVED"] = "CUSTOMER_ORDER_NEW_MESSAGE_RECEIVED";
13
13
  CustomerNotificationEventType["CUSTOMER_ORDER_ISSUE_REPORTED_CONFIRMATION"] = "CUSTOMER_ORDER_ISSUE_REPORTED_CONFIRMATION";
14
- CustomerNotificationEventType["CUSTOMER_ONBOARDING_COMPLETED"] = "CUSTOMER_ONBOARDING_COMPLETED";
15
14
  })(CustomerNotificationEventType || (exports.CustomerNotificationEventType = CustomerNotificationEventType = {}));
@@ -0,0 +1,4 @@
1
+ export declare enum EntityNotificationEventType {
2
+ ENTITY_VAT_VERIFICATION_FAILED = "ENTITY_VAT_VERIFICATION_FAILED",
3
+ ENTITY_VAT_VERIFICATION_SUCCEEDED = "ENTITY_VAT_VERIFICATION_SUCCEEDED"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EntityNotificationEventType = void 0;
4
+ var EntityNotificationEventType;
5
+ (function (EntityNotificationEventType) {
6
+ EntityNotificationEventType["ENTITY_VAT_VERIFICATION_FAILED"] = "ENTITY_VAT_VERIFICATION_FAILED";
7
+ EntityNotificationEventType["ENTITY_VAT_VERIFICATION_SUCCEEDED"] = "ENTITY_VAT_VERIFICATION_SUCCEEDED";
8
+ })(EntityNotificationEventType || (exports.EntityNotificationEventType = EntityNotificationEventType = {}));
@@ -1,3 +1,3 @@
1
1
  export * from "./CustomerNotificationEventType";
2
2
  export * from "./ProfessionalNotificationEventType";
3
- export * from "./CompanyNotificationEventType";
3
+ export * from "./EntityNotificationEventType";
@@ -16,4 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./CustomerNotificationEventType"), exports);
18
18
  __exportStar(require("./ProfessionalNotificationEventType"), exports);
19
- __exportStar(require("./CompanyNotificationEventType"), exports);
19
+ __exportStar(require("./EntityNotificationEventType"), exports);
@@ -0,0 +1,4 @@
1
+ export declare enum EntityPushNotificationType {
2
+ ENTITY_VAT_VERIFICATION_FAILED = "ENTITY_VAT_VERIFICATION_FAILED",
3
+ ENTITY_VAT_VERIFICATION_SUCCEEDED = "ENTITY_VAT_VERIFICATION_SUCCEEDED"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EntityPushNotificationType = void 0;
4
+ var EntityPushNotificationType;
5
+ (function (EntityPushNotificationType) {
6
+ EntityPushNotificationType["ENTITY_VAT_VERIFICATION_FAILED"] = "ENTITY_VAT_VERIFICATION_FAILED";
7
+ EntityPushNotificationType["ENTITY_VAT_VERIFICATION_SUCCEEDED"] = "ENTITY_VAT_VERIFICATION_SUCCEEDED";
8
+ })(EntityPushNotificationType || (exports.EntityPushNotificationType = EntityPushNotificationType = {}));
@@ -1,3 +1,3 @@
1
1
  export * from "./CustomerPushNotificationType";
2
2
  export * from "./ProfessionalPushNotificationType";
3
- export * from "./CompanyPushNotificationType";
3
+ export * from "./EntityPushNotificationType";
@@ -16,4 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./CustomerPushNotificationType"), exports);
18
18
  __exportStar(require("./ProfessionalPushNotificationType"), exports);
19
- __exportStar(require("./CompanyPushNotificationType"), exports);
19
+ __exportStar(require("./EntityPushNotificationType"), exports);
@@ -0,0 +1,9 @@
1
+ import type { EntityPushNotificationType } from "../enums";
2
+ import type { EntityVatVerificationFailedPushNotificationData, EntityVatVerificationSucceededPushNotificationData } from "../types";
3
+ export type EntityPushNotificationDataMapBase = {
4
+ [EntityPushNotificationType.ENTITY_VAT_VERIFICATION_FAILED]: EntityVatVerificationFailedPushNotificationData;
5
+ [EntityPushNotificationType.ENTITY_VAT_VERIFICATION_SUCCEEDED]: EntityVatVerificationSucceededPushNotificationData;
6
+ };
7
+ export type EntityPushNotificationDataMap = {
8
+ [K in EntityPushNotificationType]: EntityPushNotificationDataMapBase[K];
9
+ };
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // type MissingKeys = Exclude<
4
+ // EntityPushNotificationType,
5
+ // keyof EntityPushNotificationDataMapBase
6
+ // >;
@@ -1,2 +1,3 @@
1
1
  export * from "./CustomerPushNotificationDataMap";
2
2
  export * from "./ProfessionalPushNotificationDataMap";
3
+ export * from "./EntityPushNotificationDataMap";
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./CustomerPushNotificationDataMap"), exports);
18
18
  __exportStar(require("./ProfessionalPushNotificationDataMap"), exports);
19
+ __exportStar(require("./EntityPushNotificationDataMap"), exports);
@@ -1,3 +1,2 @@
1
- import type { CustomerPushNotificationDataMap, ProfessionalPushNotificationDataMap } from "../maps";
2
- import type { CompanyPushNotificationDataMap } from "../maps/CompanyPushNotificationDataMap";
3
- export type PushNotificationDataMap = CustomerPushNotificationDataMap & ProfessionalPushNotificationDataMap & CompanyPushNotificationDataMap;
1
+ import type { CustomerPushNotificationDataMap, EntityPushNotificationDataMap, ProfessionalPushNotificationDataMap } from "../maps";
2
+ export type PushNotificationDataMap = CustomerPushNotificationDataMap & ProfessionalPushNotificationDataMap & EntityPushNotificationDataMap;
@@ -0,0 +1,4 @@
1
+ import type { EntityPushNotificationType } from "../../enums";
2
+ export type EntityVatVerificationFailedPushNotificationData = {
3
+ type: EntityPushNotificationType.ENTITY_VAT_VERIFICATION_FAILED;
4
+ };
@@ -0,0 +1,4 @@
1
+ import type { EntityPushNotificationType } from "../../enums";
2
+ export type EntityVatVerificationSucceededPushNotificationData = {
3
+ type: EntityPushNotificationType.ENTITY_VAT_VERIFICATION_SUCCEEDED;
4
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./EntityVatVerificationFailedPushNotificationData.type";
2
+ export * from "./EntityVatVerificationSucceededPushNotificationData.type";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./EntityVatVerificationFailedPushNotificationData.type"), exports);
18
+ __exportStar(require("./EntityVatVerificationSucceededPushNotificationData.type"), exports);
@@ -1,4 +1,4 @@
1
1
  export * from "./customer";
2
2
  export * from "./professional";
3
+ export * from "./entity";
3
4
  export * from "./PushNotificationDataMap.type";
4
- export * from "./company";
@@ -16,5 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./customer"), exports);
18
18
  __exportStar(require("./professional"), exports);
19
+ __exportStar(require("./entity"), exports);
19
20
  __exportStar(require("./PushNotificationDataMap.type"), exports);
20
- __exportStar(require("./company"), exports);
@@ -1,2 +1,2 @@
1
- import { type CompanyNotificationEventType, type CustomerNotificationEventType, type ProfessionalNotificationEventType } from "../enums";
2
- export type NotificationEvent = CustomerNotificationEventType | ProfessionalNotificationEventType | CompanyNotificationEventType;
1
+ import { type CustomerNotificationEventType, type EntityNotificationEventType, type ProfessionalNotificationEventType } from "../enums";
2
+ export type NotificationEvent = CustomerNotificationEventType | ProfessionalNotificationEventType | EntityNotificationEventType;
@@ -97,6 +97,11 @@ const cases = [
97
97
  input: "123456",
98
98
  expected: true,
99
99
  },
100
+ {
101
+ name: "John Doe",
102
+ input: "John Doe",
103
+ expected: true,
104
+ },
100
105
  {
101
106
  name: "contains newline character",
102
107
  input: "Company\nName",
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const extractVatNumberAndCountryCode_1 = require("../extractVatNumberAndCountryCode");
4
+ describe("extractVatNumberAndCountryCode", () => {
5
+ test("should extract country code and VAT number correctly", () => {
6
+ expect((0, extractVatNumberAndCountryCode_1.extractVatNumberAndCountryCode)("FR123456789")).toEqual({
7
+ countryISOCode: "FR",
8
+ vatNumber: "123456789",
9
+ });
10
+ expect((0, extractVatNumberAndCountryCode_1.extractVatNumberAndCountryCode)("DE987654321")).toEqual({
11
+ countryISOCode: "DE",
12
+ vatNumber: "987654321",
13
+ });
14
+ expect((0, extractVatNumberAndCountryCode_1.extractVatNumberAndCountryCode)("IT12345678901")).toEqual({
15
+ countryISOCode: "IT",
16
+ vatNumber: "12345678901",
17
+ });
18
+ });
19
+ test("should return null for invalid VAT number formats", () => {
20
+ expect((0, extractVatNumberAndCountryCode_1.extractVatNumberAndCountryCode)("123456789")).toBeNull();
21
+ expect((0, extractVatNumberAndCountryCode_1.extractVatNumberAndCountryCode)("FR")).toBeNull();
22
+ expect((0, extractVatNumberAndCountryCode_1.extractVatNumberAndCountryCode)("fr123456789")).toBeNull();
23
+ expect((0, extractVatNumberAndCountryCode_1.extractVatNumberAndCountryCode)("F123456789")).toBeNull();
24
+ expect((0, extractVatNumberAndCountryCode_1.extractVatNumberAndCountryCode)("FR-123456789")).toBeNull();
25
+ });
26
+ test("should handle edge cases", () => {
27
+ expect((0, extractVatNumberAndCountryCode_1.extractVatNumberAndCountryCode)("GBGD123")).toEqual({
28
+ countryISOCode: "GB",
29
+ vatNumber: "GD123",
30
+ });
31
+ expect((0, extractVatNumberAndCountryCode_1.extractVatNumberAndCountryCode)("ESX1234567")).toEqual({
32
+ countryISOCode: "ES",
33
+ vatNumber: "X1234567",
34
+ });
35
+ expect((0, extractVatNumberAndCountryCode_1.extractVatNumberAndCountryCode)("")).toBeNull();
36
+ expect((0, extractVatNumberAndCountryCode_1.extractVatNumberAndCountryCode)(" ")).toBeNull();
37
+ expect((0, extractVatNumberAndCountryCode_1.extractVatNumberAndCountryCode)("FR 123456789")).toBeNull();
38
+ });
39
+ });
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  /* eslint-disable @typescript-eslint/no-explicit-any */
4
- const validateVATFormat_util_1 = require("../validateVATFormat.util");
4
+ const validateVatNumberFormat_1 = require("../validateVatNumberFormat");
5
5
  const france = [
6
6
  {
7
7
  name: "🇫🇷 FR valid simple digits",
@@ -319,9 +319,9 @@ const allCases = [
319
319
  ...portugal,
320
320
  ...belgium,
321
321
  ];
322
- describe("validateVATFormat", () => {
322
+ describe("validateVatNumberFormat", () => {
323
323
  test.each(allCases)("should match the result for $name", ({ countryCode, vatNumber, result }) => {
324
- expect((0, validateVATFormat_util_1.validateVATFormat)({
324
+ expect((0, validateVatNumberFormat_1.validateVatNumberFormat)({
325
325
  vatNumber,
326
326
  countryCode,
327
327
  })).toBe(result);