@doctocar/tooling 0.3.1-0 → 0.3.1-1

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 (32) hide show
  1. package/dist/errors/enums/cloudFunctions/customers/ProcessCustomerUserOnboardingErrorCodes.enum.d.ts +3 -1
  2. package/dist/errors/enums/cloudFunctions/customers/ProcessCustomerUserOnboardingErrorCodes.enum.js +3 -1
  3. package/dist/firebase/cloudFunctions/types/users/UpdateUserIdentityRequestData.type.d.ts +1 -0
  4. package/dist/firebase/cloudFunctions/types/users/customers/ProcessCustomerUserOnboardingRequestData.type.d.ts +11 -9
  5. package/dist/firebase/firestore/enums/agreements/MarketingConsentStatus.enum.d.ts +4 -0
  6. package/dist/firebase/firestore/enums/agreements/MarketingConsentStatus.enum.js +8 -0
  7. package/dist/firebase/firestore/enums/agreements/index.d.ts +1 -0
  8. package/dist/firebase/firestore/enums/agreements/index.js +17 -0
  9. package/dist/firebase/firestore/enums/index.d.ts +1 -0
  10. package/dist/firebase/firestore/enums/index.js +1 -0
  11. package/dist/firebase/firestore/types/{userDocument → agreements}/FirestoreUserAgreements.type.d.ts +6 -2
  12. package/dist/firebase/firestore/types/agreements/index.d.ts +1 -0
  13. package/dist/firebase/firestore/types/agreements/index.js +17 -0
  14. package/dist/firebase/firestore/types/entities/FirestoreEntityDocument.type.d.ts +1 -1
  15. package/dist/firebase/firestore/types/index.d.ts +1 -0
  16. package/dist/firebase/firestore/types/index.js +1 -0
  17. package/dist/firebase/firestore/types/userDocument/FirestoreUserDocument.type.d.ts +1 -1
  18. package/dist/firebase/firestore/types/userDocument/index.d.ts +0 -1
  19. package/dist/firebase/firestore/types/userDocument/index.js +0 -1
  20. package/dist/firebase/firestore/utils/stubs/configs/firestoreNotificationEventsPublicConfigDocumentStub.js +1 -1
  21. package/dist/notifications/enums/CustomerNotificationEventType.d.ts +1 -1
  22. package/dist/notifications/enums/CustomerNotificationEventType.js +1 -1
  23. package/package.json +1 -1
  24. package/dist/errors/enums/cloudFunctions/users/AcceptEntityInvitationErrorCodes.enum.d.ts +0 -11
  25. package/dist/errors/enums/cloudFunctions/users/AcceptEntityInvitationErrorCodes.enum.js +0 -15
  26. package/dist/firebase/cloudFunctions/types/users/AcceptEntityInvitationRequestData.type.d.ts +0 -4
  27. package/dist/firebase/cloudFunctions/types/users/AcceptEntityInvitationRequestData.type.js +0 -2
  28. package/dist/firebase/cloudFunctions/types/users/AcceptEntityInvitationResponseData.type.d.ts +0 -1
  29. package/dist/firebase/cloudFunctions/types/users/AcceptEntityInvitationResponseData.type.js +0 -2
  30. /package/dist/firebase/firestore/enums/vat/{VATVerificationStatus.enum.d.ts → VatVerificationStatus.enum.d.ts} +0 -0
  31. /package/dist/firebase/firestore/enums/vat/{VATVerificationStatus.enum.js → VatVerificationStatus.enum.js} +0 -0
  32. /package/dist/firebase/firestore/types/{userDocument → agreements}/FirestoreUserAgreements.type.js +0 -0
@@ -1,10 +1,12 @@
1
1
  export declare enum ProcessCustomerUserOnboardingErrorCodes {
2
2
  REQUEST_DATA_VALIDATION_FAILED = "REQUEST_DATA_VALIDATION_FAILED",
3
3
  CONTEXT_VALIDATION_FAILED = "CONTEXT_VALIDATION_FAILED",
4
+ USER_DOCUMENT_MISSING_CONTACT_INFO = "processCustomerUserOnboardingErrorCodes/userDocumentMissingContactInfo",
5
+ INVALID_ENTITY_LEGAL_TYPE = "processCustomerUserOnboardingErrorCodes/invalidEntityLegalType",
6
+ USER_ALREADY_HAVE_AN_ENTITY = "processCustomerUserOnboardingErrorCodes/userAlreadyHaveAnEntity",
4
7
  ONBOARDING_ALREADY_COMPLETED = "processCustomerUserOnboardingErrorCodes/onboardingAlreadyCompleted",
5
8
  USER_DOCUMENT_MISSING_PHONE_NUMBER = "processCustomerUserOnboardingErrorCodes/userDocumentMissingPhoneNumber",
6
9
  MISSING_COMPANY_DETAILS = "processCustomerUserOnboardingErrorCodes/missingCompanyDetails",
7
- INVALID_CUSTOMER_ACCOUNT_TYPE = "processCustomerUserOnboardingErrorCodes/invalidCustomerAccountType",
8
10
  INVALID_LEGAL_REPRESENTATIVE_FIRST_NAME = "processCustomerUserOnboardingErrorCodes/invalidLegalRepresentativeFirstName",
9
11
  INVALID_LEGAL_REPRESENTATIVE_LAST_NAME = "processCustomerUserOnboardingErrorCodes/invalidLegalRepresentativeLastName",
10
12
  INVALID_BILLING_ADDRESS_PLACE_ID = "processCustomerUserOnboardingErrorCodes/invalidBillingAddressPlaceId",
@@ -5,10 +5,12 @@ var ProcessCustomerUserOnboardingErrorCodes;
5
5
  (function (ProcessCustomerUserOnboardingErrorCodes) {
6
6
  ProcessCustomerUserOnboardingErrorCodes["REQUEST_DATA_VALIDATION_FAILED"] = "REQUEST_DATA_VALIDATION_FAILED";
7
7
  ProcessCustomerUserOnboardingErrorCodes["CONTEXT_VALIDATION_FAILED"] = "CONTEXT_VALIDATION_FAILED";
8
+ ProcessCustomerUserOnboardingErrorCodes["USER_DOCUMENT_MISSING_CONTACT_INFO"] = "processCustomerUserOnboardingErrorCodes/userDocumentMissingContactInfo";
9
+ ProcessCustomerUserOnboardingErrorCodes["INVALID_ENTITY_LEGAL_TYPE"] = "processCustomerUserOnboardingErrorCodes/invalidEntityLegalType";
10
+ ProcessCustomerUserOnboardingErrorCodes["USER_ALREADY_HAVE_AN_ENTITY"] = "processCustomerUserOnboardingErrorCodes/userAlreadyHaveAnEntity";
8
11
  ProcessCustomerUserOnboardingErrorCodes["ONBOARDING_ALREADY_COMPLETED"] = "processCustomerUserOnboardingErrorCodes/onboardingAlreadyCompleted";
9
12
  ProcessCustomerUserOnboardingErrorCodes["USER_DOCUMENT_MISSING_PHONE_NUMBER"] = "processCustomerUserOnboardingErrorCodes/userDocumentMissingPhoneNumber";
10
13
  ProcessCustomerUserOnboardingErrorCodes["MISSING_COMPANY_DETAILS"] = "processCustomerUserOnboardingErrorCodes/missingCompanyDetails";
11
- ProcessCustomerUserOnboardingErrorCodes["INVALID_CUSTOMER_ACCOUNT_TYPE"] = "processCustomerUserOnboardingErrorCodes/invalidCustomerAccountType";
12
14
  ProcessCustomerUserOnboardingErrorCodes["INVALID_LEGAL_REPRESENTATIVE_FIRST_NAME"] = "processCustomerUserOnboardingErrorCodes/invalidLegalRepresentativeFirstName";
13
15
  ProcessCustomerUserOnboardingErrorCodes["INVALID_LEGAL_REPRESENTATIVE_LAST_NAME"] = "processCustomerUserOnboardingErrorCodes/invalidLegalRepresentativeLastName";
14
16
  ProcessCustomerUserOnboardingErrorCodes["INVALID_BILLING_ADDRESS_PLACE_ID"] = "processCustomerUserOnboardingErrorCodes/invalidBillingAddressPlaceId";
@@ -2,4 +2,5 @@ import { BaseOnCallRequestData } from "../BaseOncallRequestData";
2
2
  export type UpdateUserIdentityRequestData = {
3
3
  firstName: string;
4
4
  lastName: string;
5
+ marketingConsentIsChecked: boolean;
5
6
  } & BaseOnCallRequestData;
@@ -1,13 +1,15 @@
1
- import { type CustomerAccountTypes } from "../../../../firestore";
1
+ import type { EntityLegalType } from "../../../../firestore";
2
2
  import { BaseOnCallRequestData } from "../../BaseOncallRequestData";
3
- export type ProcessCustomerUserOnboardingRequestData = {
4
- customerAccountType: CustomerAccountTypes;
3
+ export type ProcessCustomerUserOnboardingRequestData = BaseOnCallRequestData & ({
4
+ entityLegalType: EntityLegalType.INDIVIDUAL;
5
+ } | {
6
+ entityLegalType: EntityLegalType.COMPANY;
7
+ companyLegalName: string;
8
+ companyLegalAddressPlaceId: string;
5
9
  legalRepresentativeFirstName: string;
6
10
  legalRepresentativeLastName: string;
7
- billingAddressPlaceId: string;
8
- companyLegalName?: string;
11
+ companyIsVATExempt: boolean;
9
12
  companyVATNumber?: string;
10
- companyIsVATExempt?: boolean;
11
- companyLegalAddressPlaceId?: string;
12
- marketingConsentIsChecked?: boolean;
13
- } & BaseOnCallRequestData;
13
+ billingAddressIsSameAsLegalAddress?: boolean;
14
+ billingAddressPlaceId?: string;
15
+ });
@@ -0,0 +1,4 @@
1
+ export declare enum MarketingConsentStatus {
2
+ GRANTED = "GRANTED",
3
+ REVOKED = "REVOKED"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MarketingConsentStatus = void 0;
4
+ var MarketingConsentStatus;
5
+ (function (MarketingConsentStatus) {
6
+ MarketingConsentStatus["GRANTED"] = "GRANTED";
7
+ MarketingConsentStatus["REVOKED"] = "REVOKED";
8
+ })(MarketingConsentStatus || (exports.MarketingConsentStatus = MarketingConsentStatus = {}));
@@ -0,0 +1 @@
1
+ export * from "./MarketingConsentStatus.enum";
@@ -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("./MarketingConsentStatus.enum"), exports);
@@ -22,3 +22,4 @@ export * from "./professionalUser";
22
22
  export * from "./marketplaceFinancialReports";
23
23
  export * from "./entities";
24
24
  export * from "./paymentProviders";
25
+ export * from "./agreements";
@@ -38,3 +38,4 @@ __exportStar(require("./professionalUser"), exports);
38
38
  __exportStar(require("./marketplaceFinancialReports"), exports);
39
39
  __exportStar(require("./entities"), exports);
40
40
  __exportStar(require("./paymentProviders"), exports);
41
+ __exportStar(require("./agreements"), exports);
@@ -1,13 +1,17 @@
1
+ import type { MarketingConsentStatus } from "../../enums";
2
+ import type { FirestoreTimestamp } from "../FirestoreTimestamp.type";
1
3
  import type { TermsAndPolicy } from "../legal";
2
4
  export type FirestoreUserAgreements = {
5
+ marketing?: {
6
+ status: MarketingConsentStatus;
7
+ updatedAt: FirestoreTimestamp;
8
+ };
3
9
  customer?: {
4
10
  privacyPolicy?: TermsAndPolicy;
5
11
  termsOfUse?: TermsAndPolicy;
6
- marketingConsent?: TermsAndPolicy;
7
12
  };
8
13
  serviceProvider?: {
9
14
  privacyPolicy?: TermsAndPolicy;
10
15
  termsOfUse?: TermsAndPolicy;
11
- marketingConsent?: TermsAndPolicy;
12
16
  };
13
17
  };
@@ -0,0 +1 @@
1
+ export * from "./FirestoreUserAgreements.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("./FirestoreUserAgreements.type"), exports);
@@ -10,7 +10,7 @@ export type FirestoreEntityDocument = {
10
10
  createdAt: FirestoreTimestamp;
11
11
  updatedAt: FirestoreTimestamp;
12
12
  createdByUserId: string;
13
- version: number;
13
+ version: 1;
14
14
  legalType: EntityLegalType;
15
15
  marketplaceRoles: Record<EntityMarketplaceRole, boolean>;
16
16
  legalRepresentative: EntityLegalRepresentative;
@@ -34,3 +34,4 @@ export * from "./functionsDeploymentRuns";
34
34
  export * from "./marketplaceFinancialReports";
35
35
  export * from "./entities";
36
36
  export * from "./paymentProviders";
37
+ export * from "./agreements";
@@ -50,3 +50,4 @@ __exportStar(require("./functionsDeploymentRuns"), exports);
50
50
  __exportStar(require("./marketplaceFinancialReports"), exports);
51
51
  __exportStar(require("./entities"), exports);
52
52
  __exportStar(require("./paymentProviders"), exports);
53
+ __exportStar(require("./agreements"), exports);
@@ -2,7 +2,7 @@ import type { SupportedLocaleCodes } from "../../../../enums";
2
2
  import { type PhoneNumberVerificationStatus } from "../../enums";
3
3
  import type { FirestoreTimestamp } from "../FirestoreTimestamp.type";
4
4
  import type { FirestoreImageVariantSet } from "../image";
5
- import type { FirestoreUserAgreements } from "./FirestoreUserAgreements.type";
5
+ import type { FirestoreUserAgreements } from "../agreements/FirestoreUserAgreements.type";
6
6
  import type { FirestoreUserDocumentCustomerInfos } from "./FirestoreUserDocumentCustomerInfos.type";
7
7
  import type { FirestoreUserDocumentProfessionalInfos } from "./FirestoreUserDocumentProfessionalInfos.type";
8
8
  export type FirestoreUserDocument = {
@@ -3,4 +3,3 @@ export * from "./FirestoreUserDocumentProfessionalInfos.type";
3
3
  export * from "./FirestoreUserDocumentCustomerInfos.type";
4
4
  export * from "./ProfessionalInfosNotificationsPreferences.type";
5
5
  export * from "./CustomerInfosNotificationsPreferences.type";
6
- export * from "./FirestoreUserAgreements.type";
@@ -19,4 +19,3 @@ __exportStar(require("./FirestoreUserDocumentProfessionalInfos.type"), exports);
19
19
  __exportStar(require("./FirestoreUserDocumentCustomerInfos.type"), exports);
20
20
  __exportStar(require("./ProfessionalInfosNotificationsPreferences.type"), exports);
21
21
  __exportStar(require("./CustomerInfosNotificationsPreferences.type"), exports);
22
- __exportStar(require("./FirestoreUserAgreements.type"), exports);
@@ -143,7 +143,7 @@ function firestoreNotificationEventsPublicConfigDocumentStub(overwrite = {}) {
143
143
  },
144
144
  deliveryRules: {},
145
145
  },
146
- [notifications_1.CustomerNotificationEventType.CUSTOMER_WELCOME]: {
146
+ [notifications_1.CustomerNotificationEventType.CUSTOMER_ONBOARDING_COMPLETED]: {
147
147
  enabled: false,
148
148
  userConfigurableChannels: {},
149
149
  defaultChannels: {
@@ -7,5 +7,5 @@ export declare enum CustomerNotificationEventType {
7
7
  CUSTOMER_ORDER_CANCELED = "CUSTOMER_ORDER_CANCELED",
8
8
  CUSTOMER_ORDER_NEW_MESSAGE_RECEIVED = "CUSTOMER_ORDER_NEW_MESSAGE_RECEIVED",
9
9
  CUSTOMER_ORDER_ISSUE_REPORTED_CONFIRMATION = "CUSTOMER_ORDER_ISSUE_REPORTED_CONFIRMATION",
10
- CUSTOMER_WELCOME = "CUSTOMER_WELCOME"
10
+ CUSTOMER_ONBOARDING_COMPLETED = "CUSTOMER_ONBOARDING_COMPLETED"
11
11
  }
@@ -11,5 +11,5 @@ 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_WELCOME"] = "CUSTOMER_WELCOME";
14
+ CustomerNotificationEventType["CUSTOMER_ONBOARDING_COMPLETED"] = "CUSTOMER_ONBOARDING_COMPLETED";
15
15
  })(CustomerNotificationEventType || (exports.CustomerNotificationEventType = CustomerNotificationEventType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doctocar/tooling",
3
- "version": "0.3.1-0",
3
+ "version": "0.3.1-1",
4
4
  "description": "A set of tools for DoctoCar projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,11 +0,0 @@
1
- export declare enum AcceptEntityInvitationErrorCodes {
2
- REQUEST_DATA_VALIDATION_FAILED = "REQUEST_DATA_VALIDATION_FAILED",
3
- CONTEXT_VALIDATION_FAILED = "CONTEXT_VALIDATION_FAILED",
4
- INVALID_INVITATION_CODE = "INVALID_INVITATION_CODE",
5
- INVITATION_ALREADY_USED = "INVITATION_ALREADY_USED",
6
- INVITATION_EXPIRED = "INVITATION_EXPIRED",
7
- USER_ALREADY_MEMBER_OF_ENTITY = "USER_ALREADY_MEMBER_OF_ENTITY",
8
- USER_ALREADY_HAS_ENTITY = "USER_ALREADY_HAS_ENTITY",
9
- EMAIL_MISMATCH = "EMAIL_MISMATCH",
10
- ENTITY_NOT_FOUND = "ENTITY_NOT_FOUND"
11
- }
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AcceptEntityInvitationErrorCodes = void 0;
4
- var AcceptEntityInvitationErrorCodes;
5
- (function (AcceptEntityInvitationErrorCodes) {
6
- AcceptEntityInvitationErrorCodes["REQUEST_DATA_VALIDATION_FAILED"] = "REQUEST_DATA_VALIDATION_FAILED";
7
- AcceptEntityInvitationErrorCodes["CONTEXT_VALIDATION_FAILED"] = "CONTEXT_VALIDATION_FAILED";
8
- AcceptEntityInvitationErrorCodes["INVALID_INVITATION_CODE"] = "INVALID_INVITATION_CODE";
9
- AcceptEntityInvitationErrorCodes["INVITATION_ALREADY_USED"] = "INVITATION_ALREADY_USED";
10
- AcceptEntityInvitationErrorCodes["INVITATION_EXPIRED"] = "INVITATION_EXPIRED";
11
- AcceptEntityInvitationErrorCodes["USER_ALREADY_MEMBER_OF_ENTITY"] = "USER_ALREADY_MEMBER_OF_ENTITY";
12
- AcceptEntityInvitationErrorCodes["USER_ALREADY_HAS_ENTITY"] = "USER_ALREADY_HAS_ENTITY";
13
- AcceptEntityInvitationErrorCodes["EMAIL_MISMATCH"] = "EMAIL_MISMATCH";
14
- AcceptEntityInvitationErrorCodes["ENTITY_NOT_FOUND"] = "ENTITY_NOT_FOUND";
15
- })(AcceptEntityInvitationErrorCodes || (exports.AcceptEntityInvitationErrorCodes = AcceptEntityInvitationErrorCodes = {}));
@@ -1,4 +0,0 @@
1
- import { BaseOnCallRequestData } from "../BaseOncallRequestData";
2
- export type AcceptEntityInvitationRequestData = {
3
- invitationCode: string;
4
- } & BaseOnCallRequestData;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export type AcceptEntityInvitationResponseData = void;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });