@doctocar/tooling 0.3.1-30 → 0.3.1-31

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 (48) hide show
  1. package/dist/errors/enums/cloudFunctions/entities/RedeemPromoCodeForEntityErrorCodes.enum.d.ts +1 -1
  2. package/dist/errors/enums/cloudFunctions/entities/RedeemPromoCodeForEntityErrorCodes.enum.js +1 -1
  3. package/dist/firebase/firestore/constants/index.d.ts +2 -2
  4. package/dist/firebase/firestore/constants/index.js +2 -2
  5. package/dist/firebase/firestore/constants/platformBalances/firestorePlatformBalancesSchemaVersion.enum.d.ts +1 -0
  6. package/dist/firebase/firestore/constants/platformBalances/firestorePlatformBalancesSchemaVersion.enum.js +4 -0
  7. package/dist/firebase/firestore/constants/platformBalances/index.d.ts +1 -0
  8. package/dist/firebase/firestore/constants/platformBalances/index.js +17 -0
  9. package/dist/firebase/firestore/constants/platformBalancesLedgerEntry/firestorePlatformBalancesLedgerEntrySchemaVersion.enum.d.ts +1 -0
  10. package/dist/firebase/firestore/constants/platformBalancesLedgerEntry/firestorePlatformBalancesLedgerEntrySchemaVersion.enum.js +4 -0
  11. package/dist/firebase/firestore/constants/platformBalancesLedgerEntry/index.d.ts +1 -0
  12. package/dist/firebase/firestore/constants/platformBalancesLedgerEntry/index.js +17 -0
  13. package/dist/firebase/firestore/enums/FirestoreCollections.enum.d.ts +2 -2
  14. package/dist/firebase/firestore/enums/FirestoreCollections.enum.js +2 -2
  15. package/dist/firebase/firestore/enums/index.d.ts +1 -1
  16. package/dist/firebase/firestore/enums/index.js +1 -1
  17. package/dist/firebase/firestore/enums/platformBalancesLedgerEntry/PlatformBalancesLedgerEntryContextReferenceType.enum.d.ts +6 -0
  18. package/dist/firebase/firestore/enums/platformBalancesLedgerEntry/PlatformBalancesLedgerEntryContextReferenceType.enum.js +10 -0
  19. package/dist/firebase/firestore/enums/platformBalancesLedgerEntry/PlatformBalancesLedgerEntryReason.enum.d.ts +10 -0
  20. package/dist/firebase/firestore/enums/platformBalancesLedgerEntry/PlatformBalancesLedgerEntryReason.enum.js +14 -0
  21. package/dist/firebase/firestore/enums/platformBalancesLedgerEntry/PlatformBalancesLedgerEntryType.enum.d.ts +4 -0
  22. package/dist/firebase/firestore/enums/platformBalancesLedgerEntry/PlatformBalancesLedgerEntryType.enum.js +8 -0
  23. package/dist/firebase/firestore/enums/platformBalancesLedgerEntry/index.d.ts +3 -0
  24. package/dist/firebase/firestore/enums/platformBalancesLedgerEntry/index.js +19 -0
  25. package/dist/firebase/firestore/maps/FirestoreCollectionDocumentTypeMap.d.ts +3 -3
  26. package/dist/firebase/firestore/types/entities/FirestoreEntityDocument.type.d.ts +1 -1
  27. package/dist/firebase/firestore/types/index.d.ts +2 -2
  28. package/dist/firebase/firestore/types/index.js +2 -2
  29. package/dist/firebase/firestore/types/platformBalances/FirestorePlatformBalancesDocument.type.d.ts +17 -0
  30. package/dist/firebase/firestore/types/platformBalances/FirestorePlatformBalancesDocument.type.js +2 -0
  31. package/dist/firebase/firestore/types/platformBalances/index.d.ts +1 -0
  32. package/dist/firebase/firestore/types/platformBalances/index.js +17 -0
  33. package/dist/firebase/firestore/types/platformBalancesLedgerEntryDocument/FirestorePlatformBalancesLedgerEntryDocument.type.d.ts +21 -0
  34. package/dist/firebase/firestore/types/platformBalancesLedgerEntryDocument/FirestorePlatformBalancesLedgerEntryDocument.type.js +2 -0
  35. package/dist/firebase/firestore/types/platformBalancesLedgerEntryDocument/index.d.ts +1 -0
  36. package/dist/firebase/firestore/types/platformBalancesLedgerEntryDocument/index.js +17 -0
  37. package/dist/firebase/firestore/utils/stubs/entities/firestoreEntityDocumentStub.js +1 -1
  38. package/dist/firebase/firestore/utils/stubs/index.d.ts +2 -2
  39. package/dist/firebase/firestore/utils/stubs/index.js +2 -2
  40. package/dist/firebase/firestore/utils/stubs/platformBalances/firestorePlatformBalancesDocumentStub.d.ts +2 -0
  41. package/dist/firebase/firestore/utils/stubs/platformBalances/firestorePlatformBalancesDocumentStub.js +24 -0
  42. package/dist/firebase/firestore/utils/stubs/platformBalances/index.d.ts +1 -0
  43. package/dist/firebase/firestore/utils/stubs/platformBalances/index.js +17 -0
  44. package/dist/firebase/firestore/utils/stubs/platformBalancesLedgerEntry/firestorePlatformBalancesLedgerEntryDocumentStub.d.ts +2 -0
  45. package/dist/firebase/firestore/utils/stubs/platformBalancesLedgerEntry/firestorePlatformBalancesLedgerEntryDocumentStub.js +27 -0
  46. package/dist/firebase/firestore/utils/stubs/platformBalancesLedgerEntry/index.d.ts +1 -0
  47. package/dist/firebase/firestore/utils/stubs/platformBalancesLedgerEntry/index.js +17 -0
  48. package/package.json +1 -1
@@ -12,7 +12,7 @@ export declare enum RedeemPromoCodeForEntityErrorCodes {
12
12
  PROMO_CODE_MAX_REDEMPTIONS_REACHED = "PROMO_CODE_MAX_REDEMPTIONS_REACHED",
13
13
  PROMO_CODE_FIRST_ORDER_ONLY_NOT_ELIGIBLE = "PROMO_CODE_FIRST_ORDER_ONLY_NOT_ELIGIBLE",
14
14
  PROMO_CODE_ALREADY_REDEEMED_BY_ENTITY = "PROMO_CODE_ALREADY_REDEEMED_BY_ENTITY",
15
- CREDITS_DOCUMENT_NOT_FOUND = "CREDITS_DOCUMENT_NOT_FOUND",
15
+ PLATFORM_BALANCES_DOCUMENT_NOT_FOUND = "PLATFORM_BALANCES_DOCUMENT_NOT_FOUND",
16
16
  ERROR_CREDITING_ENTITY = "ERROR_CREDITING_ENTITY",
17
17
  ERROR_REDEEMING_PROMO_CODE = "ERROR_REDEEMING_PROMO_CODE"
18
18
  }
@@ -16,7 +16,7 @@ var RedeemPromoCodeForEntityErrorCodes;
16
16
  RedeemPromoCodeForEntityErrorCodes["PROMO_CODE_MAX_REDEMPTIONS_REACHED"] = "PROMO_CODE_MAX_REDEMPTIONS_REACHED";
17
17
  RedeemPromoCodeForEntityErrorCodes["PROMO_CODE_FIRST_ORDER_ONLY_NOT_ELIGIBLE"] = "PROMO_CODE_FIRST_ORDER_ONLY_NOT_ELIGIBLE";
18
18
  RedeemPromoCodeForEntityErrorCodes["PROMO_CODE_ALREADY_REDEEMED_BY_ENTITY"] = "PROMO_CODE_ALREADY_REDEEMED_BY_ENTITY";
19
- RedeemPromoCodeForEntityErrorCodes["CREDITS_DOCUMENT_NOT_FOUND"] = "CREDITS_DOCUMENT_NOT_FOUND";
19
+ RedeemPromoCodeForEntityErrorCodes["PLATFORM_BALANCES_DOCUMENT_NOT_FOUND"] = "PLATFORM_BALANCES_DOCUMENT_NOT_FOUND";
20
20
  RedeemPromoCodeForEntityErrorCodes["ERROR_CREDITING_ENTITY"] = "ERROR_CREDITING_ENTITY";
21
21
  RedeemPromoCodeForEntityErrorCodes["ERROR_REDEEMING_PROMO_CODE"] = "ERROR_REDEEMING_PROMO_CODE";
22
22
  })(RedeemPromoCodeForEntityErrorCodes || (exports.RedeemPromoCodeForEntityErrorCodes = RedeemPromoCodeForEntityErrorCodes = {}));
@@ -9,6 +9,6 @@ export * from "./orderIdempotencyWindowInMs.constant";
9
9
  export * from "./maximumSlotCapacity.constant";
10
10
  export * from "./walletLedgerEntry";
11
11
  export * from "./wallets";
12
- export * from "./creditsLedgerEntry";
13
- export * from "./credits";
12
+ export * from "./platformBalancesLedgerEntry";
13
+ export * from "./platformBalances";
14
14
  export * from "./sandboxDocumentIdPrefix.constant";
@@ -25,6 +25,6 @@ __exportStar(require("./orderIdempotencyWindowInMs.constant"), exports);
25
25
  __exportStar(require("./maximumSlotCapacity.constant"), exports);
26
26
  __exportStar(require("./walletLedgerEntry"), exports);
27
27
  __exportStar(require("./wallets"), exports);
28
- __exportStar(require("./creditsLedgerEntry"), exports);
29
- __exportStar(require("./credits"), exports);
28
+ __exportStar(require("./platformBalancesLedgerEntry"), exports);
29
+ __exportStar(require("./platformBalances"), exports);
30
30
  __exportStar(require("./sandboxDocumentIdPrefix.constant"), exports);
@@ -0,0 +1 @@
1
+ export declare const FIRESTORE_PLATFORM_BALANCES_SCHEMA_VERSION: 1;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FIRESTORE_PLATFORM_BALANCES_SCHEMA_VERSION = void 0;
4
+ exports.FIRESTORE_PLATFORM_BALANCES_SCHEMA_VERSION = 1;
@@ -0,0 +1 @@
1
+ export * from "./firestorePlatformBalancesSchemaVersion.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("./firestorePlatformBalancesSchemaVersion.enum"), exports);
@@ -0,0 +1 @@
1
+ export declare const FIRESTORE_PLATFORM_BALANCES_LEDGER_ENTRY_SCHEMA_VERSION: 1;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FIRESTORE_PLATFORM_BALANCES_LEDGER_ENTRY_SCHEMA_VERSION = void 0;
4
+ exports.FIRESTORE_PLATFORM_BALANCES_LEDGER_ENTRY_SCHEMA_VERSION = 1;
@@ -0,0 +1 @@
1
+ export * from "./firestorePlatformBalancesLedgerEntrySchemaVersion.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("./firestorePlatformBalancesLedgerEntrySchemaVersion.enum"), exports);
@@ -31,8 +31,8 @@ export declare enum FirestoreCollections {
31
31
  WALLETS = "wallets",
32
32
  WALLETS_LEDGER_ENTRIES = "wallets_ledger_entries",
33
33
  WALLETS_WITHDRAWAL_INTENTS = "wallets_withdrawal_intents",
34
- CREDITS = "credits",
35
- CREDITS_LEDGER_ENTRIES = "credits_ledger_entries",
34
+ PLATFORM_BALANCES = "platform_balances",
35
+ PLATFORM_BALANCES_LEDGER_ENTRIES = "platform_balances_ledger_entries",
36
36
  FUNCTIONS_DEPLOYMENT_RUNS = "functions_deployment_runs",
37
37
  MARKETPLACE_FINANCIAL_REPORTS = "marketplace_financial_reports"
38
38
  }
@@ -35,8 +35,8 @@ var FirestoreCollections;
35
35
  FirestoreCollections["WALLETS"] = "wallets";
36
36
  FirestoreCollections["WALLETS_LEDGER_ENTRIES"] = "wallets_ledger_entries";
37
37
  FirestoreCollections["WALLETS_WITHDRAWAL_INTENTS"] = "wallets_withdrawal_intents";
38
- FirestoreCollections["CREDITS"] = "credits";
39
- FirestoreCollections["CREDITS_LEDGER_ENTRIES"] = "credits_ledger_entries";
38
+ FirestoreCollections["PLATFORM_BALANCES"] = "platform_balances";
39
+ FirestoreCollections["PLATFORM_BALANCES_LEDGER_ENTRIES"] = "platform_balances_ledger_entries";
40
40
  FirestoreCollections["FUNCTIONS_DEPLOYMENT_RUNS"] = "functions_deployment_runs";
41
41
  FirestoreCollections["MARKETPLACE_FINANCIAL_REPORTS"] = "marketplace_financial_reports";
42
42
  })(FirestoreCollections || (exports.FirestoreCollections = FirestoreCollections = {}));
@@ -16,7 +16,7 @@ export * from "./operation";
16
16
  export * from "./promoCode";
17
17
  export * from "./walletLedgerEntry";
18
18
  export * from "./walletWithdrawalIntents";
19
- export * from "./creditsLedgerEntry";
19
+ export * from "./platformBalancesLedgerEntry";
20
20
  export * from "./ordersIssues";
21
21
  export * from "./marketplaceFinancialReports";
22
22
  export * from "./entities";
@@ -32,7 +32,7 @@ __exportStar(require("./operation"), exports);
32
32
  __exportStar(require("./promoCode"), exports);
33
33
  __exportStar(require("./walletLedgerEntry"), exports);
34
34
  __exportStar(require("./walletWithdrawalIntents"), exports);
35
- __exportStar(require("./creditsLedgerEntry"), exports);
35
+ __exportStar(require("./platformBalancesLedgerEntry"), exports);
36
36
  __exportStar(require("./ordersIssues"), exports);
37
37
  __exportStar(require("./marketplaceFinancialReports"), exports);
38
38
  __exportStar(require("./entities"), exports);
@@ -0,0 +1,6 @@
1
+ export declare enum PlatformBalancesLedgerEntryContextReferenceType {
2
+ ORDER = "order",
3
+ PROMO_CODE = "promo_code",
4
+ REFERRAL = "referral",
5
+ SUPPORT = "support"
6
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PlatformBalancesLedgerEntryContextReferenceType = void 0;
4
+ var PlatformBalancesLedgerEntryContextReferenceType;
5
+ (function (PlatformBalancesLedgerEntryContextReferenceType) {
6
+ PlatformBalancesLedgerEntryContextReferenceType["ORDER"] = "order";
7
+ PlatformBalancesLedgerEntryContextReferenceType["PROMO_CODE"] = "promo_code";
8
+ PlatformBalancesLedgerEntryContextReferenceType["REFERRAL"] = "referral";
9
+ PlatformBalancesLedgerEntryContextReferenceType["SUPPORT"] = "support";
10
+ })(PlatformBalancesLedgerEntryContextReferenceType || (exports.PlatformBalancesLedgerEntryContextReferenceType = PlatformBalancesLedgerEntryContextReferenceType = {}));
@@ -0,0 +1,10 @@
1
+ export declare enum PlatformBalancesLedgerEntryReason {
2
+ REFERRAL_REWARD = "referral_reward",
3
+ PROMO_REWARD = "promo_reward",
4
+ CASHBACK = "cashback",
5
+ BOOKING_USAGE = "booking_usage",
6
+ BOOKING_REFUND = "booking_refund",
7
+ MANUAL_ADJUSTMENT = "manual_adjustment",
8
+ CUSTOMER_SUPPORT_COMPENSATION = "customer_support_compensation",
9
+ EXPIRED = "expired"
10
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PlatformBalancesLedgerEntryReason = void 0;
4
+ var PlatformBalancesLedgerEntryReason;
5
+ (function (PlatformBalancesLedgerEntryReason) {
6
+ PlatformBalancesLedgerEntryReason["REFERRAL_REWARD"] = "referral_reward";
7
+ PlatformBalancesLedgerEntryReason["PROMO_REWARD"] = "promo_reward";
8
+ PlatformBalancesLedgerEntryReason["CASHBACK"] = "cashback";
9
+ PlatformBalancesLedgerEntryReason["BOOKING_USAGE"] = "booking_usage";
10
+ PlatformBalancesLedgerEntryReason["BOOKING_REFUND"] = "booking_refund";
11
+ PlatformBalancesLedgerEntryReason["MANUAL_ADJUSTMENT"] = "manual_adjustment";
12
+ PlatformBalancesLedgerEntryReason["CUSTOMER_SUPPORT_COMPENSATION"] = "customer_support_compensation";
13
+ PlatformBalancesLedgerEntryReason["EXPIRED"] = "expired";
14
+ })(PlatformBalancesLedgerEntryReason || (exports.PlatformBalancesLedgerEntryReason = PlatformBalancesLedgerEntryReason = {}));
@@ -0,0 +1,4 @@
1
+ export declare enum PlatformBalancesLedgerEntryType {
2
+ CREDIT = "credit",
3
+ DEBIT = "debit"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PlatformBalancesLedgerEntryType = void 0;
4
+ var PlatformBalancesLedgerEntryType;
5
+ (function (PlatformBalancesLedgerEntryType) {
6
+ PlatformBalancesLedgerEntryType["CREDIT"] = "credit";
7
+ PlatformBalancesLedgerEntryType["DEBIT"] = "debit";
8
+ })(PlatformBalancesLedgerEntryType || (exports.PlatformBalancesLedgerEntryType = PlatformBalancesLedgerEntryType = {}));
@@ -0,0 +1,3 @@
1
+ export * from "./PlatformBalancesLedgerEntryType.enum";
2
+ export * from "./PlatformBalancesLedgerEntryReason.enum";
3
+ export * from "./PlatformBalancesLedgerEntryContextReferenceType.enum";
@@ -0,0 +1,19 @@
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("./PlatformBalancesLedgerEntryType.enum"), exports);
18
+ __exportStar(require("./PlatformBalancesLedgerEntryReason.enum"), exports);
19
+ __exportStar(require("./PlatformBalancesLedgerEntryContextReferenceType.enum"), exports);
@@ -1,5 +1,5 @@
1
1
  import { FirestoreCollections } from "../enums";
2
- import type { FirestoreBookedSlotDocument, FirestoreDailyMetricsDocument, FirestoreDebugPublicConfigDocument, FirestoreDeviceTokenDocument, FirestoreEmailsBlacklistDocument, FirestoreEmailsSoftBounceDocument, FirestoreEntityDocument, FirestoreEntityMemberDocument, FirestoreEntityMemberInviteDocument, FirestoreEntityUniqueKeyDocument, FirestoreFunctionsDeploymentRunsDocument, FirestoreGlobalMetricsDocument, FirestoreInvoiceCounterDocument, FirestoreMarketplaceFinancialReportsDocument, FirestoreMessageDocument, FirestoreNotificationEventDeliveryStateDocument, FirestoreNotificationEventsPublicConfigDocument, FirestoreOnTaskExecutionStateDocument, FirestoreOrderDocument, FirestoreOrderIssueDocument, FirestoreOrderReviewDocument, FirestoreOrdersPublicConfigDocument, FirestorePaymentIntentDocument, FirestorePlatformPublicConfigDocument, FirestorePricingPublicConfigDocument, FirestoreServiceProviderUserPublicDocument, FirestorePromoCodeDocument, FirestorePromoCodeRedemptionDocument, FirestoreRateLimitDocument, FirestoreServicesPublicConfigDocument, FirestoreSlotDocument, FirestoreUserDocument, FirestoreUserUploadRateLimitDocument, FirestoreVehicleDocument, FirestoreCreditsDocument, FirestoreCreditsLedgerEntryDocument, FirestoreWalletsDocument, FirestoreWalletsLedgerEntryDocument, FirestoreWalletsWithdrawalIntentsDocument } from "../types";
2
+ import type { FirestoreBookedSlotDocument, FirestoreDailyMetricsDocument, FirestoreDebugPublicConfigDocument, FirestoreDeviceTokenDocument, FirestoreEmailsBlacklistDocument, FirestoreEmailsSoftBounceDocument, FirestoreEntityDocument, FirestoreEntityMemberDocument, FirestoreEntityMemberInviteDocument, FirestoreEntityUniqueKeyDocument, FirestoreFunctionsDeploymentRunsDocument, FirestoreGlobalMetricsDocument, FirestoreInvoiceCounterDocument, FirestoreMarketplaceFinancialReportsDocument, FirestoreMessageDocument, FirestoreNotificationEventDeliveryStateDocument, FirestoreNotificationEventsPublicConfigDocument, FirestoreOnTaskExecutionStateDocument, FirestoreOrderDocument, FirestoreOrderIssueDocument, FirestoreOrderReviewDocument, FirestoreOrdersPublicConfigDocument, FirestorePaymentIntentDocument, FirestorePlatformPublicConfigDocument, FirestorePricingPublicConfigDocument, FirestoreServiceProviderUserPublicDocument, FirestorePromoCodeDocument, FirestorePromoCodeRedemptionDocument, FirestoreRateLimitDocument, FirestoreServicesPublicConfigDocument, FirestoreSlotDocument, FirestoreUserDocument, FirestoreUserUploadRateLimitDocument, FirestoreVehicleDocument, FirestorePlatformBalancesDocument, FirestorePlatformBalancesLedgerEntryDocument, FirestoreWalletsDocument, FirestoreWalletsLedgerEntryDocument, FirestoreWalletsWithdrawalIntentsDocument } from "../types";
3
3
  type FirestoreCollectionDocumentTypeMapBase = {
4
4
  [FirestoreCollections.USERS]: FirestoreUserDocument;
5
5
  [FirestoreCollections.DEVICE_TOKENS]: FirestoreDeviceTokenDocument;
@@ -7,8 +7,8 @@ type FirestoreCollectionDocumentTypeMapBase = {
7
7
  [FirestoreCollections.WALLETS]: FirestoreWalletsDocument;
8
8
  [FirestoreCollections.WALLETS_LEDGER_ENTRIES]: FirestoreWalletsLedgerEntryDocument;
9
9
  [FirestoreCollections.WALLETS_WITHDRAWAL_INTENTS]: FirestoreWalletsWithdrawalIntentsDocument;
10
- [FirestoreCollections.CREDITS]: FirestoreCreditsDocument;
11
- [FirestoreCollections.CREDITS_LEDGER_ENTRIES]: FirestoreCreditsLedgerEntryDocument;
10
+ [FirestoreCollections.PLATFORM_BALANCES]: FirestorePlatformBalancesDocument;
11
+ [FirestoreCollections.PLATFORM_BALANCES_LEDGER_ENTRIES]: FirestorePlatformBalancesLedgerEntryDocument;
12
12
  [FirestoreCollections.SLOTS]: FirestoreSlotDocument;
13
13
  [FirestoreCollections.BOOKED_SLOTS]: FirestoreBookedSlotDocument;
14
14
  [FirestoreCollections.MESSAGES]: FirestoreMessageDocument;
@@ -92,7 +92,7 @@ export type FirestoreEntityDocument = {
92
92
  wallets: {
93
93
  byCurrency: Partial<Record<SupportedIsoCurrency, string>>;
94
94
  };
95
- credits: {
95
+ platformBalances: {
96
96
  byCurrency: Partial<Record<SupportedIsoCurrency, string>>;
97
97
  };
98
98
  paymentProviders?: {
@@ -30,8 +30,8 @@ export * from "./notificationEvent";
30
30
  export * from "./wallets";
31
31
  export * from "./walletsLedgerEntryDocument";
32
32
  export * from "./walletsWithdrawalIntents";
33
- export * from "./credits";
34
- export * from "./creditsLedgerEntryDocument";
33
+ export * from "./platformBalances";
34
+ export * from "./platformBalancesLedgerEntryDocument";
35
35
  export * from "./functionsDeploymentRuns";
36
36
  export * from "./marketplaceFinancialReports";
37
37
  export * from "./entities";
@@ -46,8 +46,8 @@ __exportStar(require("./notificationEvent"), exports);
46
46
  __exportStar(require("./wallets"), exports);
47
47
  __exportStar(require("./walletsLedgerEntryDocument"), exports);
48
48
  __exportStar(require("./walletsWithdrawalIntents"), exports);
49
- __exportStar(require("./credits"), exports);
50
- __exportStar(require("./creditsLedgerEntryDocument"), exports);
49
+ __exportStar(require("./platformBalances"), exports);
50
+ __exportStar(require("./platformBalancesLedgerEntryDocument"), exports);
51
51
  __exportStar(require("./functionsDeploymentRuns"), exports);
52
52
  __exportStar(require("./marketplaceFinancialReports"), exports);
53
53
  __exportStar(require("./entities"), exports);
@@ -0,0 +1,17 @@
1
+ import type { SupportedIsoCurrency } from "../../../../enums";
2
+ import type { FirestoreTimestamp } from "../FirestoreTimestamp.type";
3
+ export type FirestorePlatformBalancesDocument = {
4
+ schemaVersion: number;
5
+ ownerEntityId: string;
6
+ currency: SupportedIsoCurrency;
7
+ balances: {
8
+ availableInCents: number;
9
+ pendingInCents: number;
10
+ lifetimeEarnedInCents: number;
11
+ lifetimeSpentInCents: number;
12
+ updatedAt: FirestoreTimestamp;
13
+ };
14
+ createdAt: FirestoreTimestamp;
15
+ updatedAt: FirestoreTimestamp;
16
+ isTest: boolean;
17
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./FirestorePlatformBalancesDocument.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("./FirestorePlatformBalancesDocument.type"), exports);
@@ -0,0 +1,21 @@
1
+ import type { SupportedIsoCurrency } from "../../../../enums";
2
+ import type { PlatformBalancesLedgerEntryContextReferenceType, PlatformBalancesLedgerEntryReason, PlatformBalancesLedgerEntryType } from "../../enums";
3
+ import type { FirestoreTimestamp } from "../FirestoreTimestamp.type";
4
+ export type FirestorePlatformBalancesLedgerEntryDocument = {
5
+ createdAt: FirestoreTimestamp;
6
+ effectiveAt: FirestoreTimestamp;
7
+ schemaVersion: number;
8
+ platformBalancesDocumentId: string;
9
+ type: PlatformBalancesLedgerEntryType;
10
+ reason: PlatformBalancesLedgerEntryReason;
11
+ amountInCents: number;
12
+ balanceBeforeInCents: number;
13
+ balanceAfterInCents: number;
14
+ currency: SupportedIsoCurrency;
15
+ context?: {
16
+ referenceId: string;
17
+ referenceType: PlatformBalancesLedgerEntryContextReferenceType;
18
+ metadata?: Record<string, string | number | boolean>;
19
+ };
20
+ isTest: boolean;
21
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./FirestorePlatformBalancesLedgerEntryDocument.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("./FirestorePlatformBalancesLedgerEntryDocument.type"), exports);
@@ -11,7 +11,7 @@ function firestoreEntityDocumentStub(overwrite = {}) {
11
11
  wallets: {
12
12
  byCurrency: {},
13
13
  },
14
- credits: {
14
+ platformBalances: {
15
15
  byCurrency: {},
16
16
  },
17
17
  createdAt: (0, firestoreTimestampStub_1.firestoreTimestampStub)(),
@@ -22,8 +22,8 @@ export * from "./ordersReviews";
22
22
  export * from "./walletsLedgerEntry";
23
23
  export * from "./wallets";
24
24
  export * from "./walletsWithdrawalIntents";
25
- export * from "./creditsLedgerEntry";
26
- export * from "./credits";
25
+ export * from "./platformBalancesLedgerEntry";
26
+ export * from "./platformBalances";
27
27
  export * from "./functionsDeploymentRuns";
28
28
  export * from "./marketplaceFinancialReports";
29
29
  export * from "./entities";
@@ -38,8 +38,8 @@ __exportStar(require("./ordersReviews"), exports);
38
38
  __exportStar(require("./walletsLedgerEntry"), exports);
39
39
  __exportStar(require("./wallets"), exports);
40
40
  __exportStar(require("./walletsWithdrawalIntents"), exports);
41
- __exportStar(require("./creditsLedgerEntry"), exports);
42
- __exportStar(require("./credits"), exports);
41
+ __exportStar(require("./platformBalancesLedgerEntry"), exports);
42
+ __exportStar(require("./platformBalances"), exports);
43
43
  __exportStar(require("./functionsDeploymentRuns"), exports);
44
44
  __exportStar(require("./marketplaceFinancialReports"), exports);
45
45
  __exportStar(require("./entities"), exports);
@@ -0,0 +1,2 @@
1
+ import type { FirestorePlatformBalancesDocument } from "../../../types";
2
+ export declare function firestorePlatformBalancesDocumentStub(overwrite?: Partial<FirestorePlatformBalancesDocument>): FirestorePlatformBalancesDocument;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.firestorePlatformBalancesDocumentStub = firestorePlatformBalancesDocumentStub;
4
+ const enums_1 = require("../../../../../enums");
5
+ const constants_1 = require("../../../constants");
6
+ const firestoreTimestampStub_1 = require("../firestoreTimestampStub");
7
+ function firestorePlatformBalancesDocumentStub(overwrite = {}) {
8
+ return {
9
+ schemaVersion: constants_1.FIRESTORE_PLATFORM_BALANCES_SCHEMA_VERSION,
10
+ ownerEntityId: "entity-12345",
11
+ currency: enums_1.SupportedIsoCurrency.EUR,
12
+ balances: {
13
+ availableInCents: 5_000,
14
+ pendingInCents: 1_000,
15
+ lifetimeEarnedInCents: 10_000,
16
+ lifetimeSpentInCents: 2_000,
17
+ updatedAt: (0, firestoreTimestampStub_1.firestoreTimestampStub)(),
18
+ },
19
+ createdAt: (0, firestoreTimestampStub_1.firestoreTimestampStub)(),
20
+ updatedAt: (0, firestoreTimestampStub_1.firestoreTimestampStub)(),
21
+ isTest: true,
22
+ ...overwrite,
23
+ };
24
+ }
@@ -0,0 +1 @@
1
+ export * from "./firestorePlatformBalancesDocumentStub";
@@ -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("./firestorePlatformBalancesDocumentStub"), exports);
@@ -0,0 +1,2 @@
1
+ import type { FirestorePlatformBalancesLedgerEntryDocument } from "../../../types";
2
+ export declare function firestorePlatformBalancesLedgerEntryDocumentStub(overwrite?: Partial<FirestorePlatformBalancesLedgerEntryDocument>): FirestorePlatformBalancesLedgerEntryDocument;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.firestorePlatformBalancesLedgerEntryDocumentStub = firestorePlatformBalancesLedgerEntryDocumentStub;
4
+ const enums_1 = require("../../../../../enums");
5
+ const constants_1 = require("../../../constants");
6
+ const enums_2 = require("../../../enums");
7
+ const firestoreTimestampStub_1 = require("../firestoreTimestampStub");
8
+ function firestorePlatformBalancesLedgerEntryDocumentStub(overwrite = {}) {
9
+ return {
10
+ createdAt: (0, firestoreTimestampStub_1.firestoreTimestampStub)(),
11
+ effectiveAt: (0, firestoreTimestampStub_1.firestoreTimestampStub)(),
12
+ schemaVersion: constants_1.FIRESTORE_PLATFORM_BALANCES_LEDGER_ENTRY_SCHEMA_VERSION,
13
+ platformBalancesDocumentId: "platform-balances-12345",
14
+ type: enums_2.PlatformBalancesLedgerEntryType.CREDIT,
15
+ reason: enums_2.PlatformBalancesLedgerEntryReason.REFERRAL_REWARD,
16
+ amountInCents: 1_000,
17
+ balanceBeforeInCents: 5_000,
18
+ balanceAfterInCents: 6_000,
19
+ currency: enums_1.SupportedIsoCurrency.EUR,
20
+ context: {
21
+ referenceId: "referral-12345",
22
+ referenceType: enums_2.PlatformBalancesLedgerEntryContextReferenceType.REFERRAL,
23
+ },
24
+ isTest: true,
25
+ ...overwrite,
26
+ };
27
+ }
@@ -0,0 +1 @@
1
+ export * from "./firestorePlatformBalancesLedgerEntryDocumentStub";
@@ -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("./firestorePlatformBalancesLedgerEntryDocumentStub"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doctocar/tooling",
3
- "version": "0.3.1-30",
3
+ "version": "0.3.1-31",
4
4
  "description": "A set of tools for DoctoCar projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",