@nimee/shared-types 1.0.101 → 1.0.103

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.
@@ -22,4 +22,6 @@ export interface IMarketPlace {
22
22
  descriptionForLandingPage?: string;
23
23
  subdomainChangeInfo?: object;
24
24
  subdomainName?: string;
25
+ isSellersManager: boolean;
26
+ hasCRM: boolean;
25
27
  }
@@ -0,0 +1,20 @@
1
+ /// <reference types="mongoose/types/pipelinestage" />
2
+ /// <reference types="mongoose/types/connection" />
3
+ /// <reference types="mongoose/types/cursor" />
4
+ /// <reference types="mongoose/types/document" />
5
+ /// <reference types="mongoose/types/error" />
6
+ /// <reference types="mongoose/types/mongooseoptions" />
7
+ /// <reference types="mongoose/types/schemaoptions" />
8
+ import mongoose from "mongoose";
9
+ export interface IEndUserCRMEventModel {
10
+ _id?: string | mongoose.Types.ObjectId;
11
+ name: string;
12
+ marketplace: string | mongoose.Types.ObjectId;
13
+ seller: string | mongoose.Types.ObjectId;
14
+ description: string;
15
+ endUser: string | mongoose.Types.ObjectId;
16
+ segment: string | mongoose.Types.ObjectId;
17
+ data: object;
18
+ email: string;
19
+ action: string;
20
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=endUserCRMEvent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endUserCRMEvent.js","sourceRoot":"","sources":["../../src/crm/endUserCRMEvent.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export * from "./endUserCRMEvent";
@@ -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("./endUserCRMEvent"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/crm/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC"}
package/dist/index.d.ts CHANGED
@@ -6,3 +6,4 @@ export * from "./send-notification";
6
6
  export * from "./analytics";
7
7
  export * from "./common";
8
8
  export * from "./user";
9
+ export * from "./crm";
package/dist/index.js CHANGED
@@ -23,4 +23,5 @@ __exportStar(require("./send-notification"), exports);
23
23
  __exportStar(require("./analytics"), exports);
24
24
  __exportStar(require("./common"), exports);
25
25
  __exportStar(require("./user"), exports);
26
+ __exportStar(require("./crm"), exports);
26
27
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2BAA2B;AAC3B,4CAA0B;AAC1B,8CAA4B;AAC5B,0CAAwB;AACxB,4CAA0B;AAC1B,sDAAoC;AACpC,8CAA4B;AAC5B,2CAAyB;AACzB,yCAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2BAA2B;AAC3B,4CAA0B;AAC1B,8CAA4B;AAC5B,0CAAwB;AACxB,4CAA0B;AAC1B,sDAAoC;AACpC,8CAA4B;AAC5B,2CAAyB;AACzB,yCAAuB;AACvB,wCAAsB"}
@@ -8,15 +8,15 @@
8
8
  import mongoose from "mongoose";
9
9
  import { IPaymentSeasonTicketIterationType } from "./seasonTicket";
10
10
  export interface IEndUserSeasonTicketModel {
11
- externalId: string;
12
- externalCode: string;
13
- paymentDate: Date;
14
- externalSubscriptionUrl: string;
15
- iterationsCompleted: number;
16
- iterationsLeft: number;
17
- iterationsSkipped: number;
18
- nextDate: Date;
19
- prevDate: Date;
11
+ externalId?: string;
12
+ externalCode?: string;
13
+ paymentDate?: Date;
14
+ externalSubscriptionUrl?: string;
15
+ iterationsCompleted?: number;
16
+ iterationsLeft?: number;
17
+ iterationsSkipped?: number;
18
+ nextDate?: Date;
19
+ prevDate?: Date;
20
20
  name: string;
21
21
  eventTransactionAllowed: number;
22
22
  eventTransactionUsed: number;
@@ -32,12 +32,12 @@ export interface IEndUserSeasonTicketModel {
32
32
  iterations: number;
33
33
  paymentIterationType: IPaymentSeasonTicketIterationType;
34
34
  purchaseToken: string;
35
- startDate: Date;
36
- endDate: Date;
35
+ startDate?: Date;
36
+ endDate?: Date;
37
37
  token?: string;
38
- externalSubStatus: number;
39
- currency: string;
40
- externalSubscriptionIdOfNimiId: string;
38
+ externalSubStatus?: number;
39
+ currency?: string;
40
+ externalSubscriptionIdOfNimiId?: string;
41
41
  }
42
42
  export declare enum ISeasonTicketStatusType {
43
43
  ACTIVE = "active",// the season ticket is active
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nimee/shared-types",
3
- "version": "1.0.101",
3
+ "version": "1.0.103",
4
4
  "description": "Types and interfaces that any service can access if needed",
5
5
  "main": "dist/index.js",
6
6
  "author": "dan goldberg",
@@ -13,7 +13,7 @@
13
13
  "prettier-format": "prettier --config .prettierrc 'src/**/*.ts' --write",
14
14
  "incVersionAndPublish": "npm version patch && npm run publish-it && npm run i-all-workspaces",
15
15
  "publish-it": "npm run build && npm publish --scope=nimee --access public",
16
- "i-all-workspaces": "version=${npm_package_version} npm i @nimee/shared-types@$version --workspace=@nimee/event --workspace=@nimee/user-event --workspace=@nimee/send-notification --workspace=@nimee/user --workspace=@nimee/payment --workspace=@nimee/analytics"
16
+ "i-all-workspaces": "version=${npm_package_version} npm i @nimee/shared-types@$version --workspace=@nimee/event --workspace=@nimee/user-event --workspace=@nimee/send-notification --workspace=@nimee/user --workspace=@nimee/payment --workspace=@nimee/analytics --workspace=@nimee/crm"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@typescript-eslint/eslint-plugin": "^5.18.0",
@@ -22,4 +22,6 @@ export interface IMarketPlace {
22
22
  descriptionForLandingPage?: string;
23
23
  subdomainChangeInfo?: object;
24
24
  subdomainName?: string;
25
+ isSellersManager: boolean;
26
+ hasCRM: boolean;
25
27
  }
@@ -0,0 +1,13 @@
1
+ import mongoose from "mongoose";
2
+ export interface IEndUserCRMEventModel {
3
+ _id?: string | mongoose.Types.ObjectId;
4
+ name: string;
5
+ marketplace: string | mongoose.Types.ObjectId;
6
+ seller: string | mongoose.Types.ObjectId;
7
+ description: string;
8
+ endUser: string | mongoose.Types.ObjectId;
9
+ segment: string | mongoose.Types.ObjectId;
10
+ data: object;
11
+ email: string;
12
+ action: string;
13
+ }
@@ -0,0 +1 @@
1
+ export * from "./endUserCRMEvent";
package/src/index.ts CHANGED
@@ -7,3 +7,4 @@ export * from "./send-notification";
7
7
  export * from "./analytics";
8
8
  export * from "./common";
9
9
  export * from "./user";
10
+ export * from "./crm";
@@ -1,15 +1,15 @@
1
1
  import mongoose from "mongoose";
2
2
  import { IPaymentSeasonTicketIterationType } from "./seasonTicket";
3
3
  export interface IEndUserSeasonTicketModel {
4
- externalId: string; // the id of the season ticket in the payment service
5
- externalCode: string; // the code of the season ticket in the payment service
6
- paymentDate: Date;
7
- externalSubscriptionUrl: string;
8
- iterationsCompleted: number;
9
- iterationsLeft: number;
10
- iterationsSkipped: number;
11
- nextDate: Date;
12
- prevDate: Date;
4
+ externalId?: string; // the id of the season ticket in the payment service
5
+ externalCode?: string; // the code of the season ticket in the payment service
6
+ paymentDate?: Date;
7
+ externalSubscriptionUrl?: string;
8
+ iterationsCompleted?: number;
9
+ iterationsLeft?: number;
10
+ iterationsSkipped?: number;
11
+ nextDate?: Date;
12
+ prevDate?: Date;
13
13
  name: string;
14
14
  eventTransactionAllowed: number; // how many events can be attended
15
15
  eventTransactionUsed: number; // how many events have been attended
@@ -25,13 +25,13 @@ export interface IEndUserSeasonTicketModel {
25
25
  iterations: number; // how many payment iterations are there: -1 means infinite
26
26
  paymentIterationType: IPaymentSeasonTicketIterationType; // daily, weekly, monthly, yearly
27
27
  purchaseToken: string; // the token used to purchase the season ticket
28
- startDate: Date; // the start date of the season ticket - if the seller wants one purchase to be valid for a certain period
29
- endDate: Date; // the end date of the season ticket - if the seller wants one purchase to be valid for a certain period
28
+ startDate?: Date; // the start date of the season ticket - if the seller wants one purchase to be valid for a certain period
29
+ endDate?: Date; // the end date of the season ticket - if the seller wants one purchase to be valid for a certain period
30
30
  // so when the end date is over the season ticket is no longer valid and the status should be expired
31
31
  token?: string; // the token generated when created this object and use to call createSubscription on the payment service
32
- externalSubStatus: number; // the status of the subscription in the payment service
33
- currency: string;
34
- externalSubscriptionIdOfNimiId: string;
32
+ externalSubStatus?: number; // the status of the subscription in the payment service
33
+ currency?: string;
34
+ externalSubscriptionIdOfNimiId?: string;
35
35
  }
36
36
  export enum ISeasonTicketStatusType {
37
37
  ACTIVE = "active", // the season ticket is active