@timardex/cluemart-server-shared 1.1.38 → 1.1.39

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.
@@ -1,10 +1,10 @@
1
1
  import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
2
- import { AdType, ReportChatUser, GoogleImportedMarket, PushTokenType, ResourceActivityType, VendorProductList, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameType, GameDocType, SchoolType, CouponType, CouponDataType, CouponParticipantUserType } from '@timardex/cluemart-shared';
2
+ import { AdType, BillingCatalogPriceHistoryEntry, BillingCatalogEntryType, EnumBillingPeriod, EnumUserLicence, BILLING_CATALOG_KEYS, ReportChatUser, GoogleImportedMarket, PushTokenType, ResourceActivityType, VendorProductList, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameType, GameDocType, SchoolType, CouponType, CouponDataType, CouponParticipantUserType } from '@timardex/cluemart-shared';
3
3
  import mongoose__default from 'mongoose';
4
- import { O as ObjectId } from '../Chat-Wn7yfc3v.mjs';
5
- export { C as ChatModel, N as NotificationModel, a as SchemaChatMessageReactionType, S as SchemaChatMessageReplyPreviewType, b as SchemaChatMessageSeenType, c as SchemaChatMessageType, e as SchemaChatType, f as SchemaCreateBulkNotificationInput, g as SchemaNotificationType, d as SchemaParticipantType } from '../Chat-Wn7yfc3v.mjs';
6
- import { S as SchemaOwnerType } from '../Affiliate-xCVhO2Cy.mjs';
7
- export { A as AffiliateModel, C as CategorySchema, c as ContactDetailsSchema, O as OwnerTypeSchema, k as RelationModel, j as RelationTypeSchema, R as ResourceImageTypeSchema, p as SchemaAffiliateResourceType, o as SchemaAffiliateReward, a as SchemaRelatedPostType, i as SchemaRelationType, m as SchemaUserActivityEvent, n as SchemaUserType, b as SocialMediaTypeSchema, U as UserModel, g as baseResourceFields, d as dateTimeSchema, l as locationGeoSchema, e as locationsSchema, f as relatedPostSchema, h as relationDatesSchema, r as resourceRelationsSchema, s as socialShareResourceSchema, t as termsAgreementSchema, u as userLicenseSchema } from '../Affiliate-xCVhO2Cy.mjs';
4
+ import { O as ObjectId } from '../index-zC8a3adw.mjs';
5
+ export { C as ChatModel, N as NotificationModel, a as SchemaChatMessageReactionType, S as SchemaChatMessageReplyPreviewType, b as SchemaChatMessageSeenType, c as SchemaChatMessageType, e as SchemaChatType, f as SchemaCreateBulkNotificationInput, g as SchemaNotificationType, d as SchemaParticipantType } from '../index-zC8a3adw.mjs';
6
+ import { S as SchemaOwnerType } from '../Affiliate-BLh0EcNI.mjs';
7
+ export { A as AffiliateModel, C as CategorySchema, c as ContactDetailsSchema, O as OwnerTypeSchema, k as RelationModel, j as RelationTypeSchema, R as ResourceImageTypeSchema, q as SchemaAffiliateResourceType, p as SchemaAffiliateReward, a as SchemaRelatedPostType, i as SchemaRelationType, o as SchemaStripeSubscription, m as SchemaUserActivityEvent, n as SchemaUserType, b as SocialMediaTypeSchema, U as UserModel, g as baseResourceFields, d as dateTimeSchema, l as locationGeoSchema, e as locationsSchema, f as relatedPostSchema, h as relationDatesSchema, r as resourceRelationsSchema, s as socialShareResourceSchema, t as termsAgreementSchema, u as userLicenseSchema } from '../Affiliate-BLh0EcNI.mjs';
8
8
  import '@timardex/cluemart-shared/types';
9
9
  import 'express';
10
10
 
@@ -14,6 +14,46 @@ declare const AdModel: mongoose__default.Model<AdType, {}, {}, {}, mongoose__def
14
14
  __v: number;
15
15
  }, any>;
16
16
 
17
+ declare const BILLING_CATALOG_COLLECTION_NAME = "billingCatalog";
18
+ type SchemaBillingCatalogPriceHistoryEntry = Omit<BillingCatalogPriceHistoryEntry, "changedBy"> & {
19
+ changedBy?: ObjectId | null;
20
+ };
21
+ type SchemaBillingCatalogEntry = Omit<BillingCatalogEntryType, "_id" | "priceHistory" | "updatedBy"> & {
22
+ _id: ObjectId;
23
+ priceHistory: SchemaBillingCatalogPriceHistoryEntry[];
24
+ updatedBy?: ObjectId | null;
25
+ };
26
+ declare const BillingCatalogModel: mongoose__default.Model<SchemaBillingCatalogEntry, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaBillingCatalogEntry, {}, {}> & Omit<BillingCatalogEntryType, "_id" | "priceHistory" | "updatedBy"> & {
27
+ _id: ObjectId;
28
+ priceHistory: SchemaBillingCatalogPriceHistoryEntry[];
29
+ updatedBy?: ObjectId | null;
30
+ } & Required<{
31
+ _id: mongoose__default.Types.ObjectId;
32
+ }> & {
33
+ __v: number;
34
+ }, any>;
35
+ /**
36
+ * Produces the four records used for an idempotent `$setOnInsert` catalogue
37
+ * initialisation. Stripe identifiers deliberately start empty and are attached
38
+ * only after Stripe successfully creates the matching Product and Price.
39
+ */
40
+ declare function buildInitialBillingCatalogEntries(now?: Date): {
41
+ active: boolean;
42
+ billingPeriod: EnumBillingPeriod;
43
+ currency: "nzd";
44
+ effectiveFrom: Date;
45
+ key: _timardex_cluemart_shared.BillingCatalogKey;
46
+ licenceType: EnumUserLicence.PRO_PLUS_VENDOR | EnumUserLicence.PRO_VENDOR;
47
+ priceHistory: never[];
48
+ revision: number;
49
+ stripePriceId: null;
50
+ stripeProductId: null;
51
+ taxInclusive: boolean;
52
+ unitAmount: number;
53
+ updatedBy: null;
54
+ }[];
55
+ declare function getBillingCatalogDefinition(key: (typeof BILLING_CATALOG_KEYS)[number]): _timardex_cluemart_shared.BillingCatalogDefinition;
56
+
17
57
  type SchemaChatReportType = Omit<ReportChatUser, "reporterUserId" | "reportedUserId" | "chatId"> & {
18
58
  reporterUserId: ObjectId;
19
59
  reportedUserId: ObjectId;
@@ -257,4 +297,4 @@ declare const CouponModel: mongoose__default.Model<CouponDocument, {}, {}, {}, m
257
297
  __v: number;
258
298
  }, any>;
259
299
 
260
- export { APP_SETTINGS_ID, AdModel, AppSettingModel, ChatReportModel, type CouponDocument, CouponModel, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, type SchemaChatReportType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, StallTypeSchema, UnregisteredVendorModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, refundPolicySchema, vendorProductTypeSchema };
300
+ export { APP_SETTINGS_ID, AdModel, AppSettingModel, BILLING_CATALOG_COLLECTION_NAME, BillingCatalogModel, ChatReportModel, type CouponDocument, CouponModel, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, type SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatReportType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, StallTypeSchema, UnregisteredVendorModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, buildInitialBillingCatalogEntries, getBillingCatalogDefinition, refundPolicySchema, vendorProductTypeSchema };
@@ -1,10 +1,10 @@
1
1
  import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
2
- import { AdType, ReportChatUser, GoogleImportedMarket, PushTokenType, ResourceActivityType, VendorProductList, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameType, GameDocType, SchoolType, CouponType, CouponDataType, CouponParticipantUserType } from '@timardex/cluemart-shared';
2
+ import { AdType, BillingCatalogPriceHistoryEntry, BillingCatalogEntryType, EnumBillingPeriod, EnumUserLicence, BILLING_CATALOG_KEYS, ReportChatUser, GoogleImportedMarket, PushTokenType, ResourceActivityType, VendorProductList, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameType, GameDocType, SchoolType, CouponType, CouponDataType, CouponParticipantUserType } from '@timardex/cluemart-shared';
3
3
  import mongoose__default from 'mongoose';
4
- import { O as ObjectId } from '../Chat-Wn7yfc3v.js';
5
- export { C as ChatModel, N as NotificationModel, a as SchemaChatMessageReactionType, S as SchemaChatMessageReplyPreviewType, b as SchemaChatMessageSeenType, c as SchemaChatMessageType, e as SchemaChatType, f as SchemaCreateBulkNotificationInput, g as SchemaNotificationType, d as SchemaParticipantType } from '../Chat-Wn7yfc3v.js';
6
- import { S as SchemaOwnerType } from '../Affiliate-CZKOOaz_.js';
7
- export { A as AffiliateModel, C as CategorySchema, c as ContactDetailsSchema, O as OwnerTypeSchema, k as RelationModel, j as RelationTypeSchema, R as ResourceImageTypeSchema, p as SchemaAffiliateResourceType, o as SchemaAffiliateReward, a as SchemaRelatedPostType, i as SchemaRelationType, m as SchemaUserActivityEvent, n as SchemaUserType, b as SocialMediaTypeSchema, U as UserModel, g as baseResourceFields, d as dateTimeSchema, l as locationGeoSchema, e as locationsSchema, f as relatedPostSchema, h as relationDatesSchema, r as resourceRelationsSchema, s as socialShareResourceSchema, t as termsAgreementSchema, u as userLicenseSchema } from '../Affiliate-CZKOOaz_.js';
4
+ import { O as ObjectId } from '../index-zC8a3adw.js';
5
+ export { C as ChatModel, N as NotificationModel, a as SchemaChatMessageReactionType, S as SchemaChatMessageReplyPreviewType, b as SchemaChatMessageSeenType, c as SchemaChatMessageType, e as SchemaChatType, f as SchemaCreateBulkNotificationInput, g as SchemaNotificationType, d as SchemaParticipantType } from '../index-zC8a3adw.js';
6
+ import { S as SchemaOwnerType } from '../Affiliate-CBp0M850.js';
7
+ export { A as AffiliateModel, C as CategorySchema, c as ContactDetailsSchema, O as OwnerTypeSchema, k as RelationModel, j as RelationTypeSchema, R as ResourceImageTypeSchema, q as SchemaAffiliateResourceType, p as SchemaAffiliateReward, a as SchemaRelatedPostType, i as SchemaRelationType, o as SchemaStripeSubscription, m as SchemaUserActivityEvent, n as SchemaUserType, b as SocialMediaTypeSchema, U as UserModel, g as baseResourceFields, d as dateTimeSchema, l as locationGeoSchema, e as locationsSchema, f as relatedPostSchema, h as relationDatesSchema, r as resourceRelationsSchema, s as socialShareResourceSchema, t as termsAgreementSchema, u as userLicenseSchema } from '../Affiliate-CBp0M850.js';
8
8
  import '@timardex/cluemart-shared/types';
9
9
  import 'express';
10
10
 
@@ -14,6 +14,46 @@ declare const AdModel: mongoose__default.Model<AdType, {}, {}, {}, mongoose__def
14
14
  __v: number;
15
15
  }, any>;
16
16
 
17
+ declare const BILLING_CATALOG_COLLECTION_NAME = "billingCatalog";
18
+ type SchemaBillingCatalogPriceHistoryEntry = Omit<BillingCatalogPriceHistoryEntry, "changedBy"> & {
19
+ changedBy?: ObjectId | null;
20
+ };
21
+ type SchemaBillingCatalogEntry = Omit<BillingCatalogEntryType, "_id" | "priceHistory" | "updatedBy"> & {
22
+ _id: ObjectId;
23
+ priceHistory: SchemaBillingCatalogPriceHistoryEntry[];
24
+ updatedBy?: ObjectId | null;
25
+ };
26
+ declare const BillingCatalogModel: mongoose__default.Model<SchemaBillingCatalogEntry, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaBillingCatalogEntry, {}, {}> & Omit<BillingCatalogEntryType, "_id" | "priceHistory" | "updatedBy"> & {
27
+ _id: ObjectId;
28
+ priceHistory: SchemaBillingCatalogPriceHistoryEntry[];
29
+ updatedBy?: ObjectId | null;
30
+ } & Required<{
31
+ _id: mongoose__default.Types.ObjectId;
32
+ }> & {
33
+ __v: number;
34
+ }, any>;
35
+ /**
36
+ * Produces the four records used for an idempotent `$setOnInsert` catalogue
37
+ * initialisation. Stripe identifiers deliberately start empty and are attached
38
+ * only after Stripe successfully creates the matching Product and Price.
39
+ */
40
+ declare function buildInitialBillingCatalogEntries(now?: Date): {
41
+ active: boolean;
42
+ billingPeriod: EnumBillingPeriod;
43
+ currency: "nzd";
44
+ effectiveFrom: Date;
45
+ key: _timardex_cluemart_shared.BillingCatalogKey;
46
+ licenceType: EnumUserLicence.PRO_PLUS_VENDOR | EnumUserLicence.PRO_VENDOR;
47
+ priceHistory: never[];
48
+ revision: number;
49
+ stripePriceId: null;
50
+ stripeProductId: null;
51
+ taxInclusive: boolean;
52
+ unitAmount: number;
53
+ updatedBy: null;
54
+ }[];
55
+ declare function getBillingCatalogDefinition(key: (typeof BILLING_CATALOG_KEYS)[number]): _timardex_cluemart_shared.BillingCatalogDefinition;
56
+
17
57
  type SchemaChatReportType = Omit<ReportChatUser, "reporterUserId" | "reportedUserId" | "chatId"> & {
18
58
  reporterUserId: ObjectId;
19
59
  reportedUserId: ObjectId;
@@ -257,4 +297,4 @@ declare const CouponModel: mongoose__default.Model<CouponDocument, {}, {}, {}, m
257
297
  __v: number;
258
298
  }, any>;
259
299
 
260
- export { APP_SETTINGS_ID, AdModel, AppSettingModel, ChatReportModel, type CouponDocument, CouponModel, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, type SchemaChatReportType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, StallTypeSchema, UnregisteredVendorModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, refundPolicySchema, vendorProductTypeSchema };
300
+ export { APP_SETTINGS_ID, AdModel, AppSettingModel, BILLING_CATALOG_COLLECTION_NAME, BillingCatalogModel, ChatReportModel, type CouponDocument, CouponModel, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, type SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatReportType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, StallTypeSchema, UnregisteredVendorModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, buildInitialBillingCatalogEntries, getBillingCatalogDefinition, refundPolicySchema, vendorProductTypeSchema };
@@ -3,6 +3,8 @@ import {
3
3
  AdModel,
4
4
  AffiliateModel,
5
5
  AppSettingModel,
6
+ BILLING_CATALOG_COLLECTION_NAME,
7
+ BillingCatalogModel,
6
8
  CategorySchema,
7
9
  ChatModel,
8
10
  ChatReportModel,
@@ -30,7 +32,9 @@ import {
30
32
  VendorModel,
31
33
  VerificationTokenModel,
32
34
  baseResourceFields,
35
+ buildInitialBillingCatalogEntries,
33
36
  dateTimeSchema,
37
+ getBillingCatalogDefinition,
34
38
  locationGeoSchema,
35
39
  locationsSchema,
36
40
  refundPolicySchema,
@@ -41,12 +45,14 @@ import {
41
45
  termsAgreementSchema,
42
46
  userLicenseSchema,
43
47
  vendorProductTypeSchema
44
- } from "../chunk-DJHOLZ3J.mjs";
48
+ } from "../chunk-6RUQHYTK.mjs";
45
49
  export {
46
50
  APP_SETTINGS_ID,
47
51
  AdModel,
48
52
  AffiliateModel,
49
53
  AppSettingModel,
54
+ BILLING_CATALOG_COLLECTION_NAME,
55
+ BillingCatalogModel,
50
56
  CategorySchema,
51
57
  ChatModel,
52
58
  ChatReportModel,
@@ -74,7 +80,9 @@ export {
74
80
  VendorModel,
75
81
  VerificationTokenModel,
76
82
  baseResourceFields,
83
+ buildInitialBillingCatalogEntries,
77
84
  dateTimeSchema,
85
+ getBillingCatalogDefinition,
78
86
  locationGeoSchema,
79
87
  locationsSchema,
80
88
  refundPolicySchema,