pingram 1.0.16-alpha.1267 → 1.0.16-alpha.1269

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.
@@ -16,13 +16,7 @@
16
16
  */
17
17
  export interface BillingPostRequestBody {
18
18
  /**
19
- * Price ID for the message tier (EMAIL, INAPP_WEB, WEB_PUSH, PUSH, SLACK)
20
- * @type {string}
21
- * @memberof BillingPostRequestBody
22
- */
23
- messagePriceId?: string;
24
- /**
25
- * Price ID for the budget tier (SMS, CALL)
19
+ * Price ID for a monthly budget tier (all channels).
26
20
  * @type {string}
27
21
  * @memberof BillingPostRequestBody
28
22
  */
@@ -36,7 +36,6 @@ function BillingPostRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
36
36
  return json;
37
37
  }
38
38
  return {
39
- messagePriceId: json['messagePriceId'] == null ? undefined : json['messagePriceId'],
40
39
  budgetPriceId: json['budgetPriceId'] == null ? undefined : json['budgetPriceId'],
41
40
  successUrl: json['successUrl'],
42
41
  cancelUrl: json['cancelUrl']
@@ -50,7 +49,6 @@ function BillingPostRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {
50
49
  return value;
51
50
  }
52
51
  return {
53
- messagePriceId: value['messagePriceId'],
54
52
  budgetPriceId: value['budgetPriceId'],
55
53
  successUrl: value['successUrl'],
56
54
  cancelUrl: value['cancelUrl']
@@ -63,6 +63,12 @@ export interface BillingPostResponseBody {
63
63
  * @memberof BillingPostResponseBody
64
64
  */
65
65
  callCap?: number;
66
+ /**
67
+ *
68
+ * @type {number}
69
+ * @memberof BillingPostResponseBody
70
+ */
71
+ billingVersion?: BillingPostResponseBodyBillingVersionEnum;
66
72
  /**
67
73
  * ISO date (YYYY-MM-DD) when the billing cycle resets.
68
74
  * @type {string}
@@ -108,6 +114,15 @@ export declare enum BillingPostResponseBodyOrganizationTypeEnum {
108
114
  FREE = "free",
109
115
  PAID = "paid"
110
116
  }
117
+ /**
118
+ * @export
119
+ * @enum {string}
120
+ */
121
+ export declare enum BillingPostResponseBodyBillingVersionEnum {
122
+ NUMBER_1 = 1,
123
+ NUMBER_2 = 2,
124
+ NUMBER_3 = 3
125
+ }
111
126
  /**
112
127
  * Check if a given object implements the BillingPostResponseBody interface.
113
128
  */
@@ -13,7 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.BillingPostResponseBodyOrganizationTypeEnum = void 0;
16
+ exports.BillingPostResponseBodyBillingVersionEnum = exports.BillingPostResponseBodyOrganizationTypeEnum = void 0;
17
17
  exports.instanceOfBillingPostResponseBody = instanceOfBillingPostResponseBody;
18
18
  exports.BillingPostResponseBodyFromJSON = BillingPostResponseBodyFromJSON;
19
19
  exports.BillingPostResponseBodyFromJSONTyped = BillingPostResponseBodyFromJSONTyped;
@@ -28,6 +28,16 @@ var BillingPostResponseBodyOrganizationTypeEnum;
28
28
  BillingPostResponseBodyOrganizationTypeEnum["FREE"] = "free";
29
29
  BillingPostResponseBodyOrganizationTypeEnum["PAID"] = "paid";
30
30
  })(BillingPostResponseBodyOrganizationTypeEnum || (exports.BillingPostResponseBodyOrganizationTypeEnum = BillingPostResponseBodyOrganizationTypeEnum = {}));
31
+ /**
32
+ * @export
33
+ * @enum {string}
34
+ */
35
+ var BillingPostResponseBodyBillingVersionEnum;
36
+ (function (BillingPostResponseBodyBillingVersionEnum) {
37
+ BillingPostResponseBodyBillingVersionEnum[BillingPostResponseBodyBillingVersionEnum["NUMBER_1"] = 1] = "NUMBER_1";
38
+ BillingPostResponseBodyBillingVersionEnum[BillingPostResponseBodyBillingVersionEnum["NUMBER_2"] = 2] = "NUMBER_2";
39
+ BillingPostResponseBodyBillingVersionEnum[BillingPostResponseBodyBillingVersionEnum["NUMBER_3"] = 3] = "NUMBER_3";
40
+ })(BillingPostResponseBodyBillingVersionEnum || (exports.BillingPostResponseBodyBillingVersionEnum = BillingPostResponseBodyBillingVersionEnum = {}));
31
41
  /**
32
42
  * Check if a given object implements the BillingPostResponseBody interface.
33
43
  */
@@ -70,6 +80,7 @@ function BillingPostResponseBodyFromJSONTyped(json, ignoreDiscriminator) {
70
80
  costCap: json['costCap'],
71
81
  smsCap: json['smsCap'] == null ? undefined : json['smsCap'],
72
82
  callCap: json['callCap'] == null ? undefined : json['callCap'],
83
+ billingVersion: json['billingVersion'] == null ? undefined : json['billingVersion'],
73
84
  anniversaryDate: json['anniversaryDate'],
74
85
  allowOverage: json['allowOverage'],
75
86
  createdAt: json['createdAt'],
@@ -94,6 +105,7 @@ function BillingPostResponseBodyToJSONTyped(value, ignoreDiscriminator = false)
94
105
  costCap: value['costCap'],
95
106
  smsCap: value['smsCap'],
96
107
  callCap: value['callCap'],
108
+ billingVersion: value['billingVersion'],
97
109
  anniversaryDate: value['anniversaryDate'],
98
110
  allowOverage: value['allowOverage'],
99
111
  createdAt: value['createdAt'],
@@ -63,6 +63,12 @@ export interface Organization {
63
63
  * @memberof Organization
64
64
  */
65
65
  callCap?: number;
66
+ /**
67
+ *
68
+ * @type {number}
69
+ * @memberof Organization
70
+ */
71
+ billingVersion?: OrganizationBillingVersionEnum;
66
72
  /**
67
73
  * ISO date (YYYY-MM-DD) when the billing cycle resets.
68
74
  * @type {string}
@@ -96,6 +102,15 @@ export declare enum OrganizationOrganizationTypeEnum {
96
102
  FREE = "free",
97
103
  PAID = "paid"
98
104
  }
105
+ /**
106
+ * @export
107
+ * @enum {string}
108
+ */
109
+ export declare enum OrganizationBillingVersionEnum {
110
+ NUMBER_1 = 1,
111
+ NUMBER_2 = 2,
112
+ NUMBER_3 = 3
113
+ }
99
114
  /**
100
115
  * Check if a given object implements the Organization interface.
101
116
  */
@@ -13,7 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.OrganizationOrganizationTypeEnum = void 0;
16
+ exports.OrganizationBillingVersionEnum = exports.OrganizationOrganizationTypeEnum = void 0;
17
17
  exports.instanceOfOrganization = instanceOfOrganization;
18
18
  exports.OrganizationFromJSON = OrganizationFromJSON;
19
19
  exports.OrganizationFromJSONTyped = OrganizationFromJSONTyped;
@@ -28,6 +28,16 @@ var OrganizationOrganizationTypeEnum;
28
28
  OrganizationOrganizationTypeEnum["FREE"] = "free";
29
29
  OrganizationOrganizationTypeEnum["PAID"] = "paid";
30
30
  })(OrganizationOrganizationTypeEnum || (exports.OrganizationOrganizationTypeEnum = OrganizationOrganizationTypeEnum = {}));
31
+ /**
32
+ * @export
33
+ * @enum {string}
34
+ */
35
+ var OrganizationBillingVersionEnum;
36
+ (function (OrganizationBillingVersionEnum) {
37
+ OrganizationBillingVersionEnum[OrganizationBillingVersionEnum["NUMBER_1"] = 1] = "NUMBER_1";
38
+ OrganizationBillingVersionEnum[OrganizationBillingVersionEnum["NUMBER_2"] = 2] = "NUMBER_2";
39
+ OrganizationBillingVersionEnum[OrganizationBillingVersionEnum["NUMBER_3"] = 3] = "NUMBER_3";
40
+ })(OrganizationBillingVersionEnum || (exports.OrganizationBillingVersionEnum = OrganizationBillingVersionEnum = {}));
31
41
  /**
32
42
  * Check if a given object implements the Organization interface.
33
43
  */
@@ -70,6 +80,7 @@ function OrganizationFromJSONTyped(json, ignoreDiscriminator) {
70
80
  costCap: json['costCap'],
71
81
  smsCap: json['smsCap'] == null ? undefined : json['smsCap'],
72
82
  callCap: json['callCap'] == null ? undefined : json['callCap'],
83
+ billingVersion: json['billingVersion'] == null ? undefined : json['billingVersion'],
73
84
  anniversaryDate: json['anniversaryDate'],
74
85
  allowOverage: json['allowOverage'],
75
86
  createdAt: json['createdAt'],
@@ -92,6 +103,7 @@ function OrganizationToJSONTyped(value, ignoreDiscriminator = false) {
92
103
  costCap: value['costCap'],
93
104
  smsCap: value['smsCap'],
94
105
  callCap: value['callCap'],
106
+ billingVersion: value['billingVersion'],
95
107
  anniversaryDate: value['anniversaryDate'],
96
108
  allowOverage: value['allowOverage'],
97
109
  createdAt: value['createdAt'],
@@ -9,6 +9,8 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { OrganizationUsageCosts } from './OrganizationUsageCosts';
13
+ import type { OrganizationUsageCounts } from './OrganizationUsageCounts';
12
14
  /**
13
15
  * Response for GET /account/organization/usage
14
16
  * @export
@@ -16,43 +18,17 @@
16
18
  */
17
19
  export interface OrganizationUsage {
18
20
  /**
19
- * Total message usage (EMAIL + INAPP_WEB + WEB_PUSH + PUSH + SLACK)
20
- * @type {number}
21
+ *
22
+ * @type {OrganizationUsageCosts}
21
23
  * @memberof OrganizationUsage
22
24
  */
23
- messageUsage: number;
25
+ costs?: OrganizationUsageCosts;
24
26
  /**
25
- * Total budget usage in USD (cost_SMS + cost_CALL + cost_NUMBER)
26
- * @type {number}
27
+ *
28
+ * @type {OrganizationUsageCounts}
27
29
  * @memberof OrganizationUsage
28
30
  */
29
- budgetUsage: number;
30
- /**
31
- * SMS cost in USD
32
- * @type {number}
33
- * @memberof OrganizationUsage
34
- */
35
- costSms: number;
36
- /**
37
- * Call cost in USD
38
- * @type {number}
39
- * @memberof OrganizationUsage
40
- */
41
- costCall: number;
42
- /**
43
- * Phone number rent in USD
44
- * @type {number}
45
- * @memberof OrganizationUsage
46
- */
47
- costNumber: number;
48
- /**
49
- * Per-channel usage breakdown
50
- * @type {{ [key: string]: number; }}
51
- * @memberof OrganizationUsage
52
- */
53
- channelUsages: {
54
- [key: string]: number;
55
- };
31
+ counts?: OrganizationUsageCounts;
56
32
  /**
57
33
  * Billing cycle start date (ISO string)
58
34
  * @type {string}
@@ -18,22 +18,12 @@ exports.OrganizationUsageFromJSON = OrganizationUsageFromJSON;
18
18
  exports.OrganizationUsageFromJSONTyped = OrganizationUsageFromJSONTyped;
19
19
  exports.OrganizationUsageToJSON = OrganizationUsageToJSON;
20
20
  exports.OrganizationUsageToJSONTyped = OrganizationUsageToJSONTyped;
21
+ const OrganizationUsageCosts_1 = require("./OrganizationUsageCosts");
22
+ const OrganizationUsageCounts_1 = require("./OrganizationUsageCounts");
21
23
  /**
22
24
  * Check if a given object implements the OrganizationUsage interface.
23
25
  */
24
26
  function instanceOfOrganizationUsage(value) {
25
- if (!('messageUsage' in value) || value['messageUsage'] === undefined)
26
- return false;
27
- if (!('budgetUsage' in value) || value['budgetUsage'] === undefined)
28
- return false;
29
- if (!('costSms' in value) || value['costSms'] === undefined)
30
- return false;
31
- if (!('costCall' in value) || value['costCall'] === undefined)
32
- return false;
33
- if (!('costNumber' in value) || value['costNumber'] === undefined)
34
- return false;
35
- if (!('channelUsages' in value) || value['channelUsages'] === undefined)
36
- return false;
37
27
  if (!('billingCycleStart' in value) ||
38
28
  value['billingCycleStart'] === undefined)
39
29
  return false;
@@ -49,12 +39,12 @@ function OrganizationUsageFromJSONTyped(json, ignoreDiscriminator) {
49
39
  return json;
50
40
  }
51
41
  return {
52
- messageUsage: json['messageUsage'],
53
- budgetUsage: json['budgetUsage'],
54
- costSms: json['costSms'],
55
- costCall: json['costCall'],
56
- costNumber: json['costNumber'],
57
- channelUsages: json['channelUsages'],
42
+ costs: json['costs'] == null
43
+ ? undefined
44
+ : (0, OrganizationUsageCosts_1.OrganizationUsageCostsFromJSON)(json['costs']),
45
+ counts: json['counts'] == null
46
+ ? undefined
47
+ : (0, OrganizationUsageCounts_1.OrganizationUsageCountsFromJSON)(json['counts']),
58
48
  billingCycleStart: json['billingCycleStart'],
59
49
  billingCycleEnd: json['billingCycleEnd']
60
50
  };
@@ -67,12 +57,8 @@ function OrganizationUsageToJSONTyped(value, ignoreDiscriminator = false) {
67
57
  return value;
68
58
  }
69
59
  return {
70
- messageUsage: value['messageUsage'],
71
- budgetUsage: value['budgetUsage'],
72
- costSms: value['costSms'],
73
- costCall: value['costCall'],
74
- costNumber: value['costNumber'],
75
- channelUsages: value['channelUsages'],
60
+ costs: (0, OrganizationUsageCosts_1.OrganizationUsageCostsToJSON)(value['costs']),
61
+ counts: (0, OrganizationUsageCounts_1.OrganizationUsageCountsToJSON)(value['counts']),
76
62
  billingCycleStart: value['billingCycleStart'],
77
63
  billingCycleEnd: value['billingCycleEnd']
78
64
  };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Pingram
3
+ * Internal API for notification delivery and management
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Total costs for the billing cycle (all channel costs + number rent)
14
+ * @export
15
+ * @interface OrganizationUsageCosts
16
+ */
17
+ export interface OrganizationUsageCosts {
18
+ [key: string]: number | any;
19
+ /**
20
+ *
21
+ * @type {number}
22
+ * @memberof OrganizationUsageCosts
23
+ */
24
+ NUMBER?: number;
25
+ }
26
+ /**
27
+ * Check if a given object implements the OrganizationUsageCosts interface.
28
+ */
29
+ export declare function instanceOfOrganizationUsageCosts(value: object): value is OrganizationUsageCosts;
30
+ export declare function OrganizationUsageCostsFromJSON(json: any): OrganizationUsageCosts;
31
+ export declare function OrganizationUsageCostsFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationUsageCosts;
32
+ export declare function OrganizationUsageCostsToJSON(json: any): OrganizationUsageCosts;
33
+ export declare function OrganizationUsageCostsToJSONTyped(value?: OrganizationUsageCosts | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Pingram
6
+ * Internal API for notification delivery and management
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfOrganizationUsageCosts = instanceOfOrganizationUsageCosts;
17
+ exports.OrganizationUsageCostsFromJSON = OrganizationUsageCostsFromJSON;
18
+ exports.OrganizationUsageCostsFromJSONTyped = OrganizationUsageCostsFromJSONTyped;
19
+ exports.OrganizationUsageCostsToJSON = OrganizationUsageCostsToJSON;
20
+ exports.OrganizationUsageCostsToJSONTyped = OrganizationUsageCostsToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the OrganizationUsageCosts interface.
23
+ */
24
+ function instanceOfOrganizationUsageCosts(value) {
25
+ return true;
26
+ }
27
+ function OrganizationUsageCostsFromJSON(json) {
28
+ return OrganizationUsageCostsFromJSONTyped(json, false);
29
+ }
30
+ function OrganizationUsageCostsFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ ...json,
36
+ NUMBER: json['NUMBER'] == null ? undefined : json['NUMBER']
37
+ };
38
+ }
39
+ function OrganizationUsageCostsToJSON(json) {
40
+ return OrganizationUsageCostsToJSONTyped(json, false);
41
+ }
42
+ function OrganizationUsageCostsToJSONTyped(value, ignoreDiscriminator = false) {
43
+ if (value == null) {
44
+ return value;
45
+ }
46
+ return {
47
+ ...value,
48
+ NUMBER: value['NUMBER']
49
+ };
50
+ }
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Pingram
3
+ * Internal API for notification delivery and management
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Per-channel usage breakdown
14
+ * @export
15
+ * @interface OrganizationUsageCounts
16
+ */
17
+ export interface OrganizationUsageCounts {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof OrganizationUsageCounts
22
+ */
23
+ EMAIL: number;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof OrganizationUsageCounts
28
+ */
29
+ INAPP_WEB: number;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof OrganizationUsageCounts
34
+ */
35
+ SMS: number;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof OrganizationUsageCounts
40
+ */
41
+ CALL: number;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof OrganizationUsageCounts
46
+ */
47
+ PUSH: number;
48
+ /**
49
+ *
50
+ * @type {number}
51
+ * @memberof OrganizationUsageCounts
52
+ */
53
+ WEB_PUSH: number;
54
+ /**
55
+ *
56
+ * @type {number}
57
+ * @memberof OrganizationUsageCounts
58
+ */
59
+ SLACK: number;
60
+ }
61
+ /**
62
+ * Check if a given object implements the OrganizationUsageCounts interface.
63
+ */
64
+ export declare function instanceOfOrganizationUsageCounts(value: object): value is OrganizationUsageCounts;
65
+ export declare function OrganizationUsageCountsFromJSON(json: any): OrganizationUsageCounts;
66
+ export declare function OrganizationUsageCountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationUsageCounts;
67
+ export declare function OrganizationUsageCountsToJSON(json: any): OrganizationUsageCounts;
68
+ export declare function OrganizationUsageCountsToJSONTyped(value?: OrganizationUsageCounts | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Pingram
6
+ * Internal API for notification delivery and management
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfOrganizationUsageCounts = instanceOfOrganizationUsageCounts;
17
+ exports.OrganizationUsageCountsFromJSON = OrganizationUsageCountsFromJSON;
18
+ exports.OrganizationUsageCountsFromJSONTyped = OrganizationUsageCountsFromJSONTyped;
19
+ exports.OrganizationUsageCountsToJSON = OrganizationUsageCountsToJSON;
20
+ exports.OrganizationUsageCountsToJSONTyped = OrganizationUsageCountsToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the OrganizationUsageCounts interface.
23
+ */
24
+ function instanceOfOrganizationUsageCounts(value) {
25
+ if (!('EMAIL' in value) || value['EMAIL'] === undefined)
26
+ return false;
27
+ if (!('INAPP_WEB' in value) || value['INAPP_WEB'] === undefined)
28
+ return false;
29
+ if (!('SMS' in value) || value['SMS'] === undefined)
30
+ return false;
31
+ if (!('CALL' in value) || value['CALL'] === undefined)
32
+ return false;
33
+ if (!('PUSH' in value) || value['PUSH'] === undefined)
34
+ return false;
35
+ if (!('WEB_PUSH' in value) || value['WEB_PUSH'] === undefined)
36
+ return false;
37
+ if (!('SLACK' in value) || value['SLACK'] === undefined)
38
+ return false;
39
+ return true;
40
+ }
41
+ function OrganizationUsageCountsFromJSON(json) {
42
+ return OrganizationUsageCountsFromJSONTyped(json, false);
43
+ }
44
+ function OrganizationUsageCountsFromJSONTyped(json, ignoreDiscriminator) {
45
+ if (json == null) {
46
+ return json;
47
+ }
48
+ return {
49
+ EMAIL: json['EMAIL'],
50
+ INAPP_WEB: json['INAPP_WEB'],
51
+ SMS: json['SMS'],
52
+ CALL: json['CALL'],
53
+ PUSH: json['PUSH'],
54
+ WEB_PUSH: json['WEB_PUSH'],
55
+ SLACK: json['SLACK']
56
+ };
57
+ }
58
+ function OrganizationUsageCountsToJSON(json) {
59
+ return OrganizationUsageCountsToJSONTyped(json, false);
60
+ }
61
+ function OrganizationUsageCountsToJSONTyped(value, ignoreDiscriminator = false) {
62
+ if (value == null) {
63
+ return value;
64
+ }
65
+ return {
66
+ EMAIL: value['EMAIL'],
67
+ INAPP_WEB: value['INAPP_WEB'],
68
+ SMS: value['SMS'],
69
+ CALL: value['CALL'],
70
+ PUSH: value['PUSH'],
71
+ WEB_PUSH: value['WEB_PUSH'],
72
+ SLACK: value['SLACK']
73
+ };
74
+ }
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { OrganizationUsageHistoryItemsInnerCounts } from './OrganizationUsageHistoryItemsInnerCounts';
12
13
  /**
13
14
  * Single usage item in historical response
14
15
  * @export
@@ -22,43 +23,11 @@ export interface OrganizationUsageHistoryItemsInner {
22
23
  */
23
24
  yearMonth: string;
24
25
  /**
25
- * Total message usage (EMAIL + INAPP_WEB + WEB_PUSH + PUSH + SLACK)
26
- * @type {number}
26
+ *
27
+ * @type {OrganizationUsageHistoryItemsInnerCounts}
27
28
  * @memberof OrganizationUsageHistoryItemsInner
28
29
  */
29
- messageUsage: number;
30
- /**
31
- * Total budget usage in USD (cost_SMS + cost_CALL + cost_NUMBER)
32
- * @type {number}
33
- * @memberof OrganizationUsageHistoryItemsInner
34
- */
35
- budgetUsage: number;
36
- /**
37
- * SMS cost in USD
38
- * @type {number}
39
- * @memberof OrganizationUsageHistoryItemsInner
40
- */
41
- costSms: number;
42
- /**
43
- * Call cost in USD
44
- * @type {number}
45
- * @memberof OrganizationUsageHistoryItemsInner
46
- */
47
- costCall: number;
48
- /**
49
- * Phone number rent in USD
50
- * @type {number}
51
- * @memberof OrganizationUsageHistoryItemsInner
52
- */
53
- costNumber: number;
54
- /**
55
- * Per-channel usage breakdown
56
- * @type {{ [key: string]: number; }}
57
- * @memberof OrganizationUsageHistoryItemsInner
58
- */
59
- channelUsages: {
60
- [key: string]: number;
61
- };
30
+ counts: OrganizationUsageHistoryItemsInnerCounts;
62
31
  }
63
32
  /**
64
33
  * Check if a given object implements the OrganizationUsageHistoryItemsInner interface.
@@ -18,23 +18,14 @@ exports.OrganizationUsageHistoryItemsInnerFromJSON = OrganizationUsageHistoryIte
18
18
  exports.OrganizationUsageHistoryItemsInnerFromJSONTyped = OrganizationUsageHistoryItemsInnerFromJSONTyped;
19
19
  exports.OrganizationUsageHistoryItemsInnerToJSON = OrganizationUsageHistoryItemsInnerToJSON;
20
20
  exports.OrganizationUsageHistoryItemsInnerToJSONTyped = OrganizationUsageHistoryItemsInnerToJSONTyped;
21
+ const OrganizationUsageHistoryItemsInnerCounts_1 = require("./OrganizationUsageHistoryItemsInnerCounts");
21
22
  /**
22
23
  * Check if a given object implements the OrganizationUsageHistoryItemsInner interface.
23
24
  */
24
25
  function instanceOfOrganizationUsageHistoryItemsInner(value) {
25
26
  if (!('yearMonth' in value) || value['yearMonth'] === undefined)
26
27
  return false;
27
- if (!('messageUsage' in value) || value['messageUsage'] === undefined)
28
- return false;
29
- if (!('budgetUsage' in value) || value['budgetUsage'] === undefined)
30
- return false;
31
- if (!('costSms' in value) || value['costSms'] === undefined)
32
- return false;
33
- if (!('costCall' in value) || value['costCall'] === undefined)
34
- return false;
35
- if (!('costNumber' in value) || value['costNumber'] === undefined)
36
- return false;
37
- if (!('channelUsages' in value) || value['channelUsages'] === undefined)
28
+ if (!('counts' in value) || value['counts'] === undefined)
38
29
  return false;
39
30
  return true;
40
31
  }
@@ -47,12 +38,7 @@ function OrganizationUsageHistoryItemsInnerFromJSONTyped(json, ignoreDiscriminat
47
38
  }
48
39
  return {
49
40
  yearMonth: json['yearMonth'],
50
- messageUsage: json['messageUsage'],
51
- budgetUsage: json['budgetUsage'],
52
- costSms: json['costSms'],
53
- costCall: json['costCall'],
54
- costNumber: json['costNumber'],
55
- channelUsages: json['channelUsages']
41
+ counts: (0, OrganizationUsageHistoryItemsInnerCounts_1.OrganizationUsageHistoryItemsInnerCountsFromJSON)(json['counts'])
56
42
  };
57
43
  }
58
44
  function OrganizationUsageHistoryItemsInnerToJSON(json) {
@@ -64,11 +50,6 @@ function OrganizationUsageHistoryItemsInnerToJSONTyped(value, ignoreDiscriminato
64
50
  }
65
51
  return {
66
52
  yearMonth: value['yearMonth'],
67
- messageUsage: value['messageUsage'],
68
- budgetUsage: value['budgetUsage'],
69
- costSms: value['costSms'],
70
- costCall: value['costCall'],
71
- costNumber: value['costNumber'],
72
- channelUsages: value['channelUsages']
53
+ counts: (0, OrganizationUsageHistoryItemsInnerCounts_1.OrganizationUsageHistoryItemsInnerCountsToJSON)(value['counts'])
73
54
  };
74
55
  }
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Pingram
3
+ * Internal API for notification delivery and management
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface OrganizationUsageHistoryItemsInnerCounts
16
+ */
17
+ export interface OrganizationUsageHistoryItemsInnerCounts {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof OrganizationUsageHistoryItemsInnerCounts
22
+ */
23
+ EMAIL: number;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof OrganizationUsageHistoryItemsInnerCounts
28
+ */
29
+ INAPP_WEB: number;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof OrganizationUsageHistoryItemsInnerCounts
34
+ */
35
+ SMS: number;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof OrganizationUsageHistoryItemsInnerCounts
40
+ */
41
+ CALL: number;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof OrganizationUsageHistoryItemsInnerCounts
46
+ */
47
+ PUSH: number;
48
+ /**
49
+ *
50
+ * @type {number}
51
+ * @memberof OrganizationUsageHistoryItemsInnerCounts
52
+ */
53
+ WEB_PUSH: number;
54
+ /**
55
+ *
56
+ * @type {number}
57
+ * @memberof OrganizationUsageHistoryItemsInnerCounts
58
+ */
59
+ SLACK: number;
60
+ }
61
+ /**
62
+ * Check if a given object implements the OrganizationUsageHistoryItemsInnerCounts interface.
63
+ */
64
+ export declare function instanceOfOrganizationUsageHistoryItemsInnerCounts(value: object): value is OrganizationUsageHistoryItemsInnerCounts;
65
+ export declare function OrganizationUsageHistoryItemsInnerCountsFromJSON(json: any): OrganizationUsageHistoryItemsInnerCounts;
66
+ export declare function OrganizationUsageHistoryItemsInnerCountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationUsageHistoryItemsInnerCounts;
67
+ export declare function OrganizationUsageHistoryItemsInnerCountsToJSON(json: any): OrganizationUsageHistoryItemsInnerCounts;
68
+ export declare function OrganizationUsageHistoryItemsInnerCountsToJSONTyped(value?: OrganizationUsageHistoryItemsInnerCounts | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Pingram
6
+ * Internal API for notification delivery and management
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfOrganizationUsageHistoryItemsInnerCounts = instanceOfOrganizationUsageHistoryItemsInnerCounts;
17
+ exports.OrganizationUsageHistoryItemsInnerCountsFromJSON = OrganizationUsageHistoryItemsInnerCountsFromJSON;
18
+ exports.OrganizationUsageHistoryItemsInnerCountsFromJSONTyped = OrganizationUsageHistoryItemsInnerCountsFromJSONTyped;
19
+ exports.OrganizationUsageHistoryItemsInnerCountsToJSON = OrganizationUsageHistoryItemsInnerCountsToJSON;
20
+ exports.OrganizationUsageHistoryItemsInnerCountsToJSONTyped = OrganizationUsageHistoryItemsInnerCountsToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the OrganizationUsageHistoryItemsInnerCounts interface.
23
+ */
24
+ function instanceOfOrganizationUsageHistoryItemsInnerCounts(value) {
25
+ if (!('EMAIL' in value) || value['EMAIL'] === undefined)
26
+ return false;
27
+ if (!('INAPP_WEB' in value) || value['INAPP_WEB'] === undefined)
28
+ return false;
29
+ if (!('SMS' in value) || value['SMS'] === undefined)
30
+ return false;
31
+ if (!('CALL' in value) || value['CALL'] === undefined)
32
+ return false;
33
+ if (!('PUSH' in value) || value['PUSH'] === undefined)
34
+ return false;
35
+ if (!('WEB_PUSH' in value) || value['WEB_PUSH'] === undefined)
36
+ return false;
37
+ if (!('SLACK' in value) || value['SLACK'] === undefined)
38
+ return false;
39
+ return true;
40
+ }
41
+ function OrganizationUsageHistoryItemsInnerCountsFromJSON(json) {
42
+ return OrganizationUsageHistoryItemsInnerCountsFromJSONTyped(json, false);
43
+ }
44
+ function OrganizationUsageHistoryItemsInnerCountsFromJSONTyped(json, ignoreDiscriminator) {
45
+ if (json == null) {
46
+ return json;
47
+ }
48
+ return {
49
+ EMAIL: json['EMAIL'],
50
+ INAPP_WEB: json['INAPP_WEB'],
51
+ SMS: json['SMS'],
52
+ CALL: json['CALL'],
53
+ PUSH: json['PUSH'],
54
+ WEB_PUSH: json['WEB_PUSH'],
55
+ SLACK: json['SLACK']
56
+ };
57
+ }
58
+ function OrganizationUsageHistoryItemsInnerCountsToJSON(json) {
59
+ return OrganizationUsageHistoryItemsInnerCountsToJSONTyped(json, false);
60
+ }
61
+ function OrganizationUsageHistoryItemsInnerCountsToJSONTyped(value, ignoreDiscriminator = false) {
62
+ if (value == null) {
63
+ return value;
64
+ }
65
+ return {
66
+ EMAIL: value['EMAIL'],
67
+ INAPP_WEB: value['INAPP_WEB'],
68
+ SMS: value['SMS'],
69
+ CALL: value['CALL'],
70
+ PUSH: value['PUSH'],
71
+ WEB_PUSH: value['WEB_PUSH'],
72
+ SLACK: value['SLACK']
73
+ };
74
+ }
@@ -148,8 +148,11 @@ export * from './OrderPhoneNumberRequest';
148
148
  export * from './OrderPhoneNumberResponse';
149
149
  export * from './Organization';
150
150
  export * from './OrganizationUsage';
151
+ export * from './OrganizationUsageCosts';
152
+ export * from './OrganizationUsageCounts';
151
153
  export * from './OrganizationUsageHistory';
152
154
  export * from './OrganizationUsageHistoryItemsInner';
155
+ export * from './OrganizationUsageHistoryItemsInnerCounts';
153
156
  export * from './PhoneVerifyConfirmRequest';
154
157
  export * from './PhoneVerifyConfirmResponse';
155
158
  export * from './PhoneVerifyStartRequest';
@@ -166,8 +166,11 @@ __exportStar(require("./OrderPhoneNumberRequest"), exports);
166
166
  __exportStar(require("./OrderPhoneNumberResponse"), exports);
167
167
  __exportStar(require("./Organization"), exports);
168
168
  __exportStar(require("./OrganizationUsage"), exports);
169
+ __exportStar(require("./OrganizationUsageCosts"), exports);
170
+ __exportStar(require("./OrganizationUsageCounts"), exports);
169
171
  __exportStar(require("./OrganizationUsageHistory"), exports);
170
172
  __exportStar(require("./OrganizationUsageHistoryItemsInner"), exports);
173
+ __exportStar(require("./OrganizationUsageHistoryItemsInnerCounts"), exports);
171
174
  __exportStar(require("./PhoneVerifyConfirmRequest"), exports);
172
175
  __exportStar(require("./PhoneVerifyConfirmResponse"), exports);
173
176
  __exportStar(require("./PhoneVerifyStartRequest"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pingram",
3
- "version": "1.0.16-alpha.1267",
3
+ "version": "1.0.16-alpha.1269",
4
4
  "description": "Official Node.js SDK for Pingram - Send notifications via Email, SMS, Push, In-App, and more",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",