@sellout/models 0.0.255 → 0.0.257

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.
@@ -44,6 +44,9 @@ const query = (0, graphql_tag_1.default) `
44
44
  }
45
45
  __typename
46
46
  }
47
+ metrics {
48
+ lifeTimeValue
49
+ }
47
50
  __typename
48
51
  }
49
52
  }
@@ -1 +1 @@
1
- {"version":3,"file":"userProfilesAdmin.query.js","sourceRoot":"","sources":["../../../src/graphql/queries/userProfilesAdmin.query.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,KAAK,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2ChB,CAAC;AAEF,kBAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"userProfilesAdmin.query.js","sourceRoot":"","sources":["../../../src/graphql/queries/userProfilesAdmin.query.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,KAAK,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8ChB,CAAC;AAEF,kBAAe,KAAK,CAAC"}
@@ -23,3 +23,29 @@ export interface IUserProfileGraphQL extends IUserProfile {
23
23
  stripeCustomer: IStripeCustomer;
24
24
  analytics: IAnalytics;
25
25
  }
26
+ export interface IUserMetric {
27
+ _id?: string;
28
+ orgId: string;
29
+ lifeTimeValue: number;
30
+ yearToDateValue: number;
31
+ lifeTimeTicketsPurchased: number;
32
+ yearToDateTicketsPurchased: number;
33
+ lifeTimeUpgradesPurchased: number;
34
+ yearToDateUpgradesPurchased: number;
35
+ lifeTimeOrdersPurchased: number;
36
+ yearToDateOrdersPurchased: number;
37
+ createdAt: number;
38
+ }
39
+ export default interface IUserProfile {
40
+ _id?: string;
41
+ userId: string;
42
+ authyId?: string;
43
+ stripeCustomerId?: string;
44
+ imageUrl?: string;
45
+ metrics?: IUserMetric[];
46
+ orgIds?: string[];
47
+ eventIds?: string[];
48
+ venueIds?: string[];
49
+ artistIds?: string[];
50
+ address?: IAddress;
51
+ }
@@ -58,6 +58,56 @@ declare const _default: {
58
58
  required: boolean;
59
59
  default: never[];
60
60
  }[];
61
+ metrics: {
62
+ orgId: {
63
+ type: StringConstructor;
64
+ required: boolean;
65
+ };
66
+ lifeTimeValue: {
67
+ type: NumberConstructor;
68
+ required: boolean;
69
+ default: number;
70
+ };
71
+ yearToDateValue: {
72
+ type: NumberConstructor;
73
+ required: boolean;
74
+ default: number;
75
+ };
76
+ lifeTimeTicketsPurchased: {
77
+ type: NumberConstructor;
78
+ required: boolean;
79
+ default: number;
80
+ };
81
+ yearToDateTicketsPurchased: {
82
+ type: NumberConstructor;
83
+ required: boolean;
84
+ default: number;
85
+ };
86
+ lifeTimeUpgradesPurchased: {
87
+ type: NumberConstructor;
88
+ required: boolean;
89
+ default: number;
90
+ };
91
+ yearToDateUpgradesPurchased: {
92
+ type: NumberConstructor;
93
+ required: boolean;
94
+ default: number;
95
+ };
96
+ lifeTimeOrdersPurchased: {
97
+ type: NumberConstructor;
98
+ required: boolean;
99
+ default: number;
100
+ };
101
+ yearToDateOrdersPurchased: {
102
+ type: NumberConstructor;
103
+ required: boolean;
104
+ default: number;
105
+ };
106
+ createdAt: {
107
+ type: NumberConstructor;
108
+ required: boolean;
109
+ };
110
+ }[];
61
111
  address: {
62
112
  address1: {
63
113
  type: StringConstructor;
@@ -5,6 +5,56 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const shortid_1 = __importDefault(require("shortid"));
7
7
  const Address_1 = __importDefault(require("./Address"));
8
+ const Metrics = {
9
+ orgId: {
10
+ type: String,
11
+ required: true,
12
+ },
13
+ lifeTimeValue: {
14
+ type: Number,
15
+ required: false,
16
+ default: 0,
17
+ },
18
+ yearToDateValue: {
19
+ type: Number,
20
+ required: false,
21
+ default: 0,
22
+ },
23
+ lifeTimeTicketsPurchased: {
24
+ type: Number,
25
+ required: false,
26
+ default: 0,
27
+ },
28
+ yearToDateTicketsPurchased: {
29
+ type: Number,
30
+ required: false,
31
+ default: 0,
32
+ },
33
+ lifeTimeUpgradesPurchased: {
34
+ type: Number,
35
+ required: false,
36
+ default: 0,
37
+ },
38
+ yearToDateUpgradesPurchased: {
39
+ type: Number,
40
+ required: false,
41
+ default: 0,
42
+ },
43
+ lifeTimeOrdersPurchased: {
44
+ type: Number,
45
+ required: false,
46
+ default: 0,
47
+ },
48
+ yearToDateOrdersPurchased: {
49
+ type: Number,
50
+ required: false,
51
+ default: 0,
52
+ },
53
+ createdAt: {
54
+ type: Number,
55
+ required: true,
56
+ },
57
+ };
8
58
  exports.default = {
9
59
  _id: {
10
60
  type: String,
@@ -65,6 +115,7 @@ exports.default = {
65
115
  required: false,
66
116
  default: [],
67
117
  }],
118
+ metrics: [Metrics],
68
119
  address: Address_1.default,
69
120
  };
70
121
  //# sourceMappingURL=UserProfile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserProfile.js","sourceRoot":"","sources":["../../src/schemas/UserProfile.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8B;AAC9B,wDAAgC;AAEhC,kBAAe;IACb,GAAG,EAAE;QACH,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,iBAAO,CAAC,QAAQ;KAC1B;IACD,MAAM,EAAE;QACN,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf;IACD,SAAS,EAAE;QACT,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;KAChB;IACD,KAAK,EAAE;QACL,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;KAChB;IACD,WAAW,EAAE;QACX,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;KAChB;IACD,OAAO,EAAE;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M;QACZ,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,IAAI;KACd;IACD,MAAM,EAAE,CAAC;YACP,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE;SACZ,CAAC;IACF,QAAQ,EAAE,CAAC;YACT,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE;SACZ,CAAC;IACF,QAAQ,EAAE,CAAC;YACT,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE;SACZ,CAAC;IACF,SAAS,EAAE,CAAC;YACV,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE;SACZ,CAAC;IACF,OAAO,EAAC,CAAC,OAAO,CAAC;IACjB,OAAO,EAAE,iBAAO;CACjB,CAAC"}
@@ -39550,6 +39550,238 @@ $root.orderSheetEmailRequest = (function() {
39550
39550
  return orderSheetEmailRequest;
39551
39551
  })();
39552
39552
 
39553
+ $root.customerSheetEmailRequest = (function() {
39554
+
39555
+ /**
39556
+ * Properties of a customerSheetEmailRequest.
39557
+ * @exports IcustomerSheetEmailRequest
39558
+ * @interface IcustomerSheetEmailRequest
39559
+ * @property {string|null} [toAddress] customerSheetEmailRequest toAddress
39560
+ * @property {string|null} [orgName] customerSheetEmailRequest orgName
39561
+ * @property {string|null} [url] customerSheetEmailRequest url
39562
+ */
39563
+
39564
+ /**
39565
+ * Constructs a new customerSheetEmailRequest.
39566
+ * @exports customerSheetEmailRequest
39567
+ * @classdesc Represents a customerSheetEmailRequest.
39568
+ * @implements IcustomerSheetEmailRequest
39569
+ * @constructor
39570
+ * @param {IcustomerSheetEmailRequest=} [properties] Properties to set
39571
+ */
39572
+ function customerSheetEmailRequest(properties) {
39573
+ if (properties)
39574
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
39575
+ if (properties[keys[i]] != null)
39576
+ this[keys[i]] = properties[keys[i]];
39577
+ }
39578
+
39579
+ /**
39580
+ * customerSheetEmailRequest toAddress.
39581
+ * @member {string} toAddress
39582
+ * @memberof customerSheetEmailRequest
39583
+ * @instance
39584
+ */
39585
+ customerSheetEmailRequest.prototype.toAddress = "";
39586
+
39587
+ /**
39588
+ * customerSheetEmailRequest orgName.
39589
+ * @member {string} orgName
39590
+ * @memberof customerSheetEmailRequest
39591
+ * @instance
39592
+ */
39593
+ customerSheetEmailRequest.prototype.orgName = "";
39594
+
39595
+ /**
39596
+ * customerSheetEmailRequest url.
39597
+ * @member {string} url
39598
+ * @memberof customerSheetEmailRequest
39599
+ * @instance
39600
+ */
39601
+ customerSheetEmailRequest.prototype.url = "";
39602
+
39603
+ /**
39604
+ * Creates a new customerSheetEmailRequest instance using the specified properties.
39605
+ * @function create
39606
+ * @memberof customerSheetEmailRequest
39607
+ * @static
39608
+ * @param {IcustomerSheetEmailRequest=} [properties] Properties to set
39609
+ * @returns {customerSheetEmailRequest} customerSheetEmailRequest instance
39610
+ */
39611
+ customerSheetEmailRequest.create = function create(properties) {
39612
+ return new customerSheetEmailRequest(properties);
39613
+ };
39614
+
39615
+ /**
39616
+ * Encodes the specified customerSheetEmailRequest message. Does not implicitly {@link customerSheetEmailRequest.verify|verify} messages.
39617
+ * @function encode
39618
+ * @memberof customerSheetEmailRequest
39619
+ * @static
39620
+ * @param {IcustomerSheetEmailRequest} message customerSheetEmailRequest message or plain object to encode
39621
+ * @param {$protobuf.Writer} [writer] Writer to encode to
39622
+ * @returns {$protobuf.Writer} Writer
39623
+ */
39624
+ customerSheetEmailRequest.encode = function encode(message, writer) {
39625
+ if (!writer)
39626
+ writer = $Writer.create();
39627
+ if (message.toAddress != null && Object.hasOwnProperty.call(message, "toAddress"))
39628
+ writer.uint32(/* id 0, wireType 2 =*/2).string(message.toAddress);
39629
+ if (message.orgName != null && Object.hasOwnProperty.call(message, "orgName"))
39630
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.orgName);
39631
+ if (message.url != null && Object.hasOwnProperty.call(message, "url"))
39632
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.url);
39633
+ return writer;
39634
+ };
39635
+
39636
+ /**
39637
+ * Encodes the specified customerSheetEmailRequest message, length delimited. Does not implicitly {@link customerSheetEmailRequest.verify|verify} messages.
39638
+ * @function encodeDelimited
39639
+ * @memberof customerSheetEmailRequest
39640
+ * @static
39641
+ * @param {IcustomerSheetEmailRequest} message customerSheetEmailRequest message or plain object to encode
39642
+ * @param {$protobuf.Writer} [writer] Writer to encode to
39643
+ * @returns {$protobuf.Writer} Writer
39644
+ */
39645
+ customerSheetEmailRequest.encodeDelimited = function encodeDelimited(message, writer) {
39646
+ return this.encode(message, writer).ldelim();
39647
+ };
39648
+
39649
+ /**
39650
+ * Decodes a customerSheetEmailRequest message from the specified reader or buffer.
39651
+ * @function decode
39652
+ * @memberof customerSheetEmailRequest
39653
+ * @static
39654
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
39655
+ * @param {number} [length] Message length if known beforehand
39656
+ * @returns {customerSheetEmailRequest} customerSheetEmailRequest
39657
+ * @throws {Error} If the payload is not a reader or valid buffer
39658
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
39659
+ */
39660
+ customerSheetEmailRequest.decode = function decode(reader, length) {
39661
+ if (!(reader instanceof $Reader))
39662
+ reader = $Reader.create(reader);
39663
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.customerSheetEmailRequest();
39664
+ while (reader.pos < end) {
39665
+ var tag = reader.uint32();
39666
+ switch (tag >>> 3) {
39667
+ case 0:
39668
+ message.toAddress = reader.string();
39669
+ break;
39670
+ case 1:
39671
+ message.orgName = reader.string();
39672
+ break;
39673
+ case 2:
39674
+ message.url = reader.string();
39675
+ break;
39676
+ default:
39677
+ reader.skipType(tag & 7);
39678
+ break;
39679
+ }
39680
+ }
39681
+ return message;
39682
+ };
39683
+
39684
+ /**
39685
+ * Decodes a customerSheetEmailRequest message from the specified reader or buffer, length delimited.
39686
+ * @function decodeDelimited
39687
+ * @memberof customerSheetEmailRequest
39688
+ * @static
39689
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
39690
+ * @returns {customerSheetEmailRequest} customerSheetEmailRequest
39691
+ * @throws {Error} If the payload is not a reader or valid buffer
39692
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
39693
+ */
39694
+ customerSheetEmailRequest.decodeDelimited = function decodeDelimited(reader) {
39695
+ if (!(reader instanceof $Reader))
39696
+ reader = new $Reader(reader);
39697
+ return this.decode(reader, reader.uint32());
39698
+ };
39699
+
39700
+ /**
39701
+ * Verifies a customerSheetEmailRequest message.
39702
+ * @function verify
39703
+ * @memberof customerSheetEmailRequest
39704
+ * @static
39705
+ * @param {Object.<string,*>} message Plain object to verify
39706
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
39707
+ */
39708
+ customerSheetEmailRequest.verify = function verify(message) {
39709
+ if (typeof message !== "object" || message === null)
39710
+ return "object expected";
39711
+ if (message.toAddress != null && message.hasOwnProperty("toAddress"))
39712
+ if (!$util.isString(message.toAddress))
39713
+ return "toAddress: string expected";
39714
+ if (message.orgName != null && message.hasOwnProperty("orgName"))
39715
+ if (!$util.isString(message.orgName))
39716
+ return "orgName: string expected";
39717
+ if (message.url != null && message.hasOwnProperty("url"))
39718
+ if (!$util.isString(message.url))
39719
+ return "url: string expected";
39720
+ return null;
39721
+ };
39722
+
39723
+ /**
39724
+ * Creates a customerSheetEmailRequest message from a plain object. Also converts values to their respective internal types.
39725
+ * @function fromObject
39726
+ * @memberof customerSheetEmailRequest
39727
+ * @static
39728
+ * @param {Object.<string,*>} object Plain object
39729
+ * @returns {customerSheetEmailRequest} customerSheetEmailRequest
39730
+ */
39731
+ customerSheetEmailRequest.fromObject = function fromObject(object) {
39732
+ if (object instanceof $root.customerSheetEmailRequest)
39733
+ return object;
39734
+ var message = new $root.customerSheetEmailRequest();
39735
+ if (object.toAddress != null)
39736
+ message.toAddress = String(object.toAddress);
39737
+ if (object.orgName != null)
39738
+ message.orgName = String(object.orgName);
39739
+ if (object.url != null)
39740
+ message.url = String(object.url);
39741
+ return message;
39742
+ };
39743
+
39744
+ /**
39745
+ * Creates a plain object from a customerSheetEmailRequest message. Also converts values to other types if specified.
39746
+ * @function toObject
39747
+ * @memberof customerSheetEmailRequest
39748
+ * @static
39749
+ * @param {customerSheetEmailRequest} message customerSheetEmailRequest
39750
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
39751
+ * @returns {Object.<string,*>} Plain object
39752
+ */
39753
+ customerSheetEmailRequest.toObject = function toObject(message, options) {
39754
+ if (!options)
39755
+ options = {};
39756
+ var object = {};
39757
+ if (options.defaults) {
39758
+ object.toAddress = "";
39759
+ object.orgName = "";
39760
+ object.url = "";
39761
+ }
39762
+ if (message.toAddress != null && message.hasOwnProperty("toAddress"))
39763
+ object.toAddress = message.toAddress;
39764
+ if (message.orgName != null && message.hasOwnProperty("orgName"))
39765
+ object.orgName = message.orgName;
39766
+ if (message.url != null && message.hasOwnProperty("url"))
39767
+ object.url = message.url;
39768
+ return object;
39769
+ };
39770
+
39771
+ /**
39772
+ * Converts this customerSheetEmailRequest to JSON.
39773
+ * @function toJSON
39774
+ * @memberof customerSheetEmailRequest
39775
+ * @instance
39776
+ * @returns {Object.<string,*>} JSON object
39777
+ */
39778
+ customerSheetEmailRequest.prototype.toJSON = function toJSON() {
39779
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
39780
+ };
39781
+
39782
+ return customerSheetEmailRequest;
39783
+ })();
39784
+
39553
39785
  $root.dayIdsTimeObj = (function() {
39554
39786
 
39555
39787
  /**
@@ -45605,6 +45837,39 @@ $root.EmailService = (function() {
45605
45837
  * @variation 2
45606
45838
  */
45607
45839
 
45840
+ /**
45841
+ * Callback as used by {@link EmailService#customerSheetEmail}.
45842
+ * @memberof EmailService
45843
+ * @typedef customerSheetEmailCallback
45844
+ * @type {function}
45845
+ * @param {Error|null} error Error, if any
45846
+ * @param {google.protobuf.Empty} [response] Empty
45847
+ */
45848
+
45849
+ /**
45850
+ * Calls customerSheetEmail.
45851
+ * @function customerSheetEmail
45852
+ * @memberof EmailService
45853
+ * @instance
45854
+ * @param {IcustomerSheetEmailRequest} request customerSheetEmailRequest message or plain object
45855
+ * @param {EmailService.customerSheetEmailCallback} callback Node-style callback called with the error, if any, and Empty
45856
+ * @returns {undefined}
45857
+ * @variation 1
45858
+ */
45859
+ Object.defineProperty(EmailService.prototype.customerSheetEmail = function customerSheetEmail(request, callback) {
45860
+ return this.rpcCall(customerSheetEmail, $root.customerSheetEmailRequest, $root.google.protobuf.Empty, request, callback);
45861
+ }, "name", { value: "customerSheetEmail" });
45862
+
45863
+ /**
45864
+ * Calls customerSheetEmail.
45865
+ * @function customerSheetEmail
45866
+ * @memberof EmailService
45867
+ * @instance
45868
+ * @param {IcustomerSheetEmailRequest} request customerSheetEmailRequest message or plain object
45869
+ * @returns {Promise<google.protobuf.Empty>} Promise
45870
+ * @variation 2
45871
+ */
45872
+
45608
45873
  return EmailService;
45609
45874
  })();
45610
45875
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellout/models",
3
- "version": "0.0.255",
3
+ "version": "0.0.257",
4
4
  "description": "Sellout.io models",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,7 +17,7 @@
17
17
  "license": "MIT",
18
18
  "dependencies": {
19
19
  "@hapi/joi": "^16.1.7",
20
- "@sellout/utils": "^0.0.234",
20
+ "@sellout/utils": "^0.0.257",
21
21
  "@types/hapi__joi": "^16.0.1",
22
22
  "@types/shortid": "^0.0.29",
23
23
  "apollo-link-debounce": "^2.1.0",
@@ -31,5 +31,5 @@
31
31
  "protobufjs": "^6.11.2",
32
32
  "typescript": "^4.4.2"
33
33
  },
34
- "gitHead": "3f511af2f251c3a11a4d356d54765460f3fe9373"
34
+ "gitHead": "1b9fb19e805fbc07141cb97af6ad6e2fbbf1fada"
35
35
  }
@@ -40,6 +40,9 @@ const query = gql`
40
40
  }
41
41
  __typename
42
42
  }
43
+ metrics {
44
+ lifeTimeValue
45
+ }
43
46
  __typename
44
47
  }
45
48
  }
@@ -3,6 +3,7 @@ import IAnalytics from "./IAnalytics";
3
3
  import IStripeCustomer from './IStripeCustomer';
4
4
  import IUser from "./IUser";
5
5
 
6
+
6
7
  export default interface IUserProfile {
7
8
  _id?: string;
8
9
  userId: string;
@@ -26,3 +27,35 @@ export interface IUserProfileGraphQL extends IUserProfile {
26
27
  stripeCustomer: IStripeCustomer;
27
28
  analytics: IAnalytics;
28
29
  }
30
+
31
+
32
+
33
+
34
+ export interface IUserMetric {
35
+ _id?: string;
36
+ orgId: string;
37
+ lifeTimeValue: number;
38
+ yearToDateValue: number;
39
+ lifeTimeTicketsPurchased: number;
40
+ yearToDateTicketsPurchased: number;
41
+ lifeTimeUpgradesPurchased: number;
42
+ yearToDateUpgradesPurchased: number;
43
+ lifeTimeOrdersPurchased: number;
44
+ yearToDateOrdersPurchased: number;
45
+ createdAt: number;
46
+ }
47
+
48
+ export default interface IUserProfile {
49
+ _id?: string;
50
+ userId: string;
51
+ authyId?: string;
52
+ stripeCustomerId?: string;
53
+ imageUrl?: string;
54
+ metrics?: IUserMetric[];
55
+ orgIds?: string[];
56
+ eventIds?: string[];
57
+ venueIds?: string[];
58
+ artistIds?: string[];
59
+ address?: IAddress;
60
+ }
61
+
@@ -65,6 +65,12 @@ message orderSheetEmailRequest {
65
65
  string orgName = 1;
66
66
  string url = 2;
67
67
  }
68
+
69
+ message customerSheetEmailRequest {
70
+ string toAddress = 0;
71
+ string orgName = 1;
72
+ string url = 2;
73
+ }
68
74
  message dayIdsTimeObj {
69
75
  int32 startsAt = 0;
70
76
  int32 endsAt = 1;
@@ -290,4 +296,6 @@ service EmailService {
290
296
  rpc orderSheetEmail (orderSheetEmailRequest) returns (google.protobuf.Empty) {}
291
297
  rpc orderQRCodeEmailOnDay (QueueOrderQRCodeEmailRequest) returns (google.protobuf.Empty) {}
292
298
  rpc salesReportEmail (salesReportEmailRequest) returns (google.protobuf.Empty) {}
299
+ rpc customerSheetEmail (customerSheetEmailRequest) returns (google.protobuf.Empty) {}
300
+
293
301
  }
@@ -1,6 +1,57 @@
1
1
  import shortid from 'shortid';
2
2
  import Address from './Address';
3
3
 
4
+ const Metrics = {
5
+ orgId: {
6
+ type: String,
7
+ required: true,
8
+ },
9
+ lifeTimeValue: {
10
+ type: Number,
11
+ required: false,
12
+ default: 0,
13
+ },
14
+ yearToDateValue: {
15
+ type: Number,
16
+ required: false,
17
+ default: 0,
18
+ },
19
+ lifeTimeTicketsPurchased: {
20
+ type: Number,
21
+ required: false,
22
+ default: 0,
23
+ },
24
+ yearToDateTicketsPurchased: {
25
+ type: Number,
26
+ required: false,
27
+ default: 0,
28
+ },
29
+ lifeTimeUpgradesPurchased: {
30
+ type: Number,
31
+ required: false,
32
+ default: 0,
33
+ },
34
+ yearToDateUpgradesPurchased: {
35
+ type: Number,
36
+ required: false,
37
+ default: 0,
38
+ },
39
+ lifeTimeOrdersPurchased: {
40
+ type: Number,
41
+ required: false,
42
+ default: 0,
43
+ },
44
+ yearToDateOrdersPurchased: {
45
+ type: Number,
46
+ required: false,
47
+ default: 0,
48
+ },
49
+ createdAt: {
50
+ type: Number,
51
+ required: true,
52
+ },
53
+ };
54
+
4
55
  export default {
5
56
  _id: {
6
57
  type: String,
@@ -61,5 +112,6 @@ export default {
61
112
  required: false,
62
113
  default: [],
63
114
  }],
115
+ metrics:[Metrics],
64
116
  address: Address,
65
117
  };
package/tsconfig.json CHANGED
@@ -11,6 +11,7 @@
11
11
  "sourceMap": true,
12
12
  "strictNullChecks": true,
13
13
  "noUnusedLocals": true,
14
+ "skipLibCheck": true,
14
15
  "paths": {},
15
16
  "types": [
16
17
  "node",