pingram 1.0.36 → 1.0.37-alpha.1602

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 (37) hide show
  1. package/dist/generated/src/apis/AccountApi.d.ts +93 -5
  2. package/dist/generated/src/apis/AccountApi.js +212 -2
  3. package/dist/generated/src/apis/index.d.ts +1 -1
  4. package/dist/generated/src/models/AccountGetResponse.d.ts +7 -0
  5. package/dist/generated/src/models/AccountGetResponse.js +7 -2
  6. package/dist/generated/src/models/AccountGetResponseBillingAlerts.d.ts +44 -0
  7. package/dist/generated/src/models/AccountGetResponseBillingAlerts.js +58 -0
  8. package/dist/generated/src/models/AccountPatchRequest.d.ts +7 -0
  9. package/dist/generated/src/models/AccountPatchRequest.js +7 -2
  10. package/dist/generated/src/models/BillingEmail.d.ts +32 -0
  11. package/dist/generated/src/models/BillingEmail.js +48 -0
  12. package/dist/generated/src/models/BillingPostResponseBody.d.ts +7 -0
  13. package/dist/generated/src/models/BillingPostResponseBody.js +5 -0
  14. package/dist/generated/src/models/CancelSubscriptionRequest.d.ts +32 -0
  15. package/dist/generated/src/models/CancelSubscriptionRequest.js +48 -0
  16. package/dist/generated/src/models/PhoneVerifyStartResponse.d.ts +6 -0
  17. package/dist/generated/src/models/PhoneVerifyStartResponse.js +6 -2
  18. package/dist/generated/src/models/SenderPostBodySms.d.ts +2 -1
  19. package/dist/generated/src/models/SenderPostBodySmsAutoReply.d.ts +3 -2
  20. package/dist/generated/src/models/SlackConnectInviteResponse.d.ts +38 -0
  21. package/dist/generated/src/models/SlackConnectInviteResponse.js +54 -0
  22. package/dist/generated/src/models/UpdateBillingEmailRequest.d.ts +32 -0
  23. package/dist/generated/src/models/UpdateBillingEmailRequest.js +50 -0
  24. package/dist/generated/src/models/WebhookEndpoint.d.ts +2 -1
  25. package/dist/generated/src/models/WebhookEndpoint.js +1 -0
  26. package/dist/generated/src/models/WebhookEndpointUpsertRequest.d.ts +2 -1
  27. package/dist/generated/src/models/WebhookEndpointUpsertRequest.js +1 -0
  28. package/dist/generated/src/models/WebhookEndpointsResponseEndpointsInner.d.ts +2 -1
  29. package/dist/generated/src/models/WebhookEndpointsResponseEndpointsInner.js +1 -0
  30. package/dist/generated/src/models/WebhookEvent.d.ts +53 -1
  31. package/dist/generated/src/models/WebhookEvent.js +25 -2
  32. package/dist/generated/src/models/WebhookEventUsageValue.d.ts +38 -0
  33. package/dist/generated/src/models/WebhookEventUsageValue.js +54 -0
  34. package/dist/generated/src/models/index.d.ts +6 -0
  35. package/dist/generated/src/models/index.js +6 -0
  36. package/dist/src/client.js +1 -1
  37. package/package.json +1 -1
@@ -0,0 +1,32 @@
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
+ * GET/PATCH /account/billing-email response.
14
+ * @export
15
+ * @interface BillingEmail
16
+ */
17
+ export interface BillingEmail {
18
+ /**
19
+ * Address that receives invoices and receipts.
20
+ * @type {string}
21
+ * @memberof BillingEmail
22
+ */
23
+ email?: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the BillingEmail interface.
27
+ */
28
+ export declare function instanceOfBillingEmail(value: object): value is BillingEmail;
29
+ export declare function BillingEmailFromJSON(json: any): BillingEmail;
30
+ export declare function BillingEmailFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillingEmail;
31
+ export declare function BillingEmailToJSON(json: any): BillingEmail;
32
+ export declare function BillingEmailToJSONTyped(value?: BillingEmail | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,48 @@
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.instanceOfBillingEmail = instanceOfBillingEmail;
17
+ exports.BillingEmailFromJSON = BillingEmailFromJSON;
18
+ exports.BillingEmailFromJSONTyped = BillingEmailFromJSONTyped;
19
+ exports.BillingEmailToJSON = BillingEmailToJSON;
20
+ exports.BillingEmailToJSONTyped = BillingEmailToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the BillingEmail interface.
23
+ */
24
+ function instanceOfBillingEmail(value) {
25
+ return true;
26
+ }
27
+ function BillingEmailFromJSON(json) {
28
+ return BillingEmailFromJSONTyped(json, false);
29
+ }
30
+ function BillingEmailFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ email: json['email'] == null ? undefined : json['email']
36
+ };
37
+ }
38
+ function BillingEmailToJSON(json) {
39
+ return BillingEmailToJSONTyped(json, false);
40
+ }
41
+ function BillingEmailToJSONTyped(value, ignoreDiscriminator = false) {
42
+ if (value == null) {
43
+ return value;
44
+ }
45
+ return {
46
+ email: value['email']
47
+ };
48
+ }
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { AccountGetResponseBillingAlerts } from './AccountGetResponseBillingAlerts';
12
13
  /**
13
14
  * POST /billing response: account fields + optional Checkout session.
14
15
  * @export
@@ -123,6 +124,12 @@ export interface BillingPostResponseBody {
123
124
  * @memberof BillingPostResponseBody
124
125
  */
125
126
  autoUpgrade?: boolean;
127
+ /**
128
+ *
129
+ * @type {AccountGetResponseBillingAlerts}
130
+ * @memberof BillingPostResponseBody
131
+ */
132
+ billingAlerts?: AccountGetResponseBillingAlerts;
126
133
  /**
127
134
  *
128
135
  * @type {string}
@@ -19,6 +19,7 @@ exports.BillingPostResponseBodyFromJSON = BillingPostResponseBodyFromJSON;
19
19
  exports.BillingPostResponseBodyFromJSONTyped = BillingPostResponseBodyFromJSONTyped;
20
20
  exports.BillingPostResponseBodyToJSON = BillingPostResponseBodyToJSON;
21
21
  exports.BillingPostResponseBodyToJSONTyped = BillingPostResponseBodyToJSONTyped;
22
+ const AccountGetResponseBillingAlerts_1 = require("./AccountGetResponseBillingAlerts");
22
23
  /**
23
24
  * @export
24
25
  * @enum {string}
@@ -120,6 +121,9 @@ function BillingPostResponseBodyFromJSONTyped(json, ignoreDiscriminator) {
120
121
  ? undefined
121
122
  : json['pendingDowngradeAccountType'],
122
123
  autoUpgrade: json['autoUpgrade'] == null ? undefined : json['autoUpgrade'],
124
+ billingAlerts: json['billingAlerts'] == null
125
+ ? undefined
126
+ : (0, AccountGetResponseBillingAlerts_1.AccountGetResponseBillingAlertsFromJSON)(json['billingAlerts']),
123
127
  sessionId: json['sessionId'] == null ? undefined : json['sessionId'],
124
128
  url: json['url'] == null ? undefined : json['url']
125
129
  };
@@ -150,6 +154,7 @@ function BillingPostResponseBodyToJSONTyped(value, ignoreDiscriminator = false)
150
154
  pendingDowngradeCostCap: value['pendingDowngradeCostCap'],
151
155
  pendingDowngradeAccountType: value['pendingDowngradeAccountType'],
152
156
  autoUpgrade: value['autoUpgrade'],
157
+ billingAlerts: (0, AccountGetResponseBillingAlerts_1.AccountGetResponseBillingAlertsToJSON)(value['billingAlerts']),
153
158
  sessionId: value['sessionId'],
154
159
  url: value['url']
155
160
  };
@@ -0,0 +1,32 @@
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
+ * POST /account/subscription/cancel request.
14
+ * @export
15
+ * @interface CancelSubscriptionRequest
16
+ */
17
+ export interface CancelSubscriptionRequest {
18
+ /**
19
+ * Optional note about why you are canceling. Helps us improve the product.
20
+ * @type {string}
21
+ * @memberof CancelSubscriptionRequest
22
+ */
23
+ reason?: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the CancelSubscriptionRequest interface.
27
+ */
28
+ export declare function instanceOfCancelSubscriptionRequest(value: object): value is CancelSubscriptionRequest;
29
+ export declare function CancelSubscriptionRequestFromJSON(json: any): CancelSubscriptionRequest;
30
+ export declare function CancelSubscriptionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CancelSubscriptionRequest;
31
+ export declare function CancelSubscriptionRequestToJSON(json: any): CancelSubscriptionRequest;
32
+ export declare function CancelSubscriptionRequestToJSONTyped(value?: CancelSubscriptionRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,48 @@
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.instanceOfCancelSubscriptionRequest = instanceOfCancelSubscriptionRequest;
17
+ exports.CancelSubscriptionRequestFromJSON = CancelSubscriptionRequestFromJSON;
18
+ exports.CancelSubscriptionRequestFromJSONTyped = CancelSubscriptionRequestFromJSONTyped;
19
+ exports.CancelSubscriptionRequestToJSON = CancelSubscriptionRequestToJSON;
20
+ exports.CancelSubscriptionRequestToJSONTyped = CancelSubscriptionRequestToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the CancelSubscriptionRequest interface.
23
+ */
24
+ function instanceOfCancelSubscriptionRequest(value) {
25
+ return true;
26
+ }
27
+ function CancelSubscriptionRequestFromJSON(json) {
28
+ return CancelSubscriptionRequestFromJSONTyped(json, false);
29
+ }
30
+ function CancelSubscriptionRequestFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ reason: json['reason'] == null ? undefined : json['reason']
36
+ };
37
+ }
38
+ function CancelSubscriptionRequestToJSON(json) {
39
+ return CancelSubscriptionRequestToJSONTyped(json, false);
40
+ }
41
+ function CancelSubscriptionRequestToJSONTyped(value, ignoreDiscriminator = false) {
42
+ if (value == null) {
43
+ return value;
44
+ }
45
+ return {
46
+ reason: value['reason']
47
+ };
48
+ }
@@ -21,6 +21,12 @@ export interface PhoneVerifyStartResponse {
21
21
  * @memberof PhoneVerifyStartResponse
22
22
  */
23
23
  started: boolean;
24
+ /**
25
+ * Seconds until this signup can request another code for the same number.
26
+ * @type {number}
27
+ * @memberof PhoneVerifyStartResponse
28
+ */
29
+ resendAfterSeconds?: number;
24
30
  }
25
31
  /**
26
32
  * Check if a given object implements the PhoneVerifyStartResponse interface.
@@ -34,7 +34,10 @@ function PhoneVerifyStartResponseFromJSONTyped(json, ignoreDiscriminator) {
34
34
  return json;
35
35
  }
36
36
  return {
37
- started: json['started']
37
+ started: json['started'],
38
+ resendAfterSeconds: json['resendAfterSeconds'] == null
39
+ ? undefined
40
+ : json['resendAfterSeconds']
38
41
  };
39
42
  }
40
43
  function PhoneVerifyStartResponseToJSON(json) {
@@ -45,6 +48,7 @@ function PhoneVerifyStartResponseToJSONTyped(value, ignoreDiscriminator = false)
45
48
  return value;
46
49
  }
47
50
  return {
48
- started: value['started']
51
+ started: value['started'],
52
+ resendAfterSeconds: value['resendAfterSeconds']
49
53
  };
50
54
  }
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import type { SenderPostBodySmsAutoReply } from './SenderPostBodySmsAutoReply';
13
13
  /**
14
- * Inline SMS content (message, autoReply, from, mediaUrls).
14
+ * Inline SMS content (message, from, mediaUrls).
15
15
  * @export
16
16
  * @interface SenderPostBodySms
17
17
  */
@@ -32,6 +32,7 @@ export interface SenderPostBodySms {
32
32
  *
33
33
  * @type {SenderPostBodySmsAutoReply}
34
34
  * @memberof SenderPostBodySms
35
+ * @deprecated
35
36
  */
36
37
  autoReply?: SenderPostBodySmsAutoReply;
37
38
  /**
@@ -10,15 +10,16 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- *
13
+ * @deprecated Ignored. SMS auto-reply is no longer available. Replacing with SMS_INBOUND: handle that webhook and send your own reply.
14
14
  * @export
15
15
  * @interface SenderPostBodySmsAutoReply
16
16
  */
17
17
  export interface SenderPostBodySmsAutoReply {
18
18
  /**
19
- * Auto-reply message to send when user texts in.
19
+ * @deprecated Ignored. SMS auto-reply is no longer available. Replacing with SMS_INBOUND: handle that webhook and send your own reply.
20
20
  * @type {string}
21
21
  * @memberof SenderPostBodySmsAutoReply
22
+ * @deprecated
22
23
  */
23
24
  message: string;
24
25
  }
@@ -0,0 +1,38 @@
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 SlackConnectInviteResponse
16
+ */
17
+ export interface SlackConnectInviteResponse {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof SlackConnectInviteResponse
22
+ */
23
+ channelId: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof SlackConnectInviteResponse
28
+ */
29
+ channelName: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the SlackConnectInviteResponse interface.
33
+ */
34
+ export declare function instanceOfSlackConnectInviteResponse(value: object): value is SlackConnectInviteResponse;
35
+ export declare function SlackConnectInviteResponseFromJSON(json: any): SlackConnectInviteResponse;
36
+ export declare function SlackConnectInviteResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SlackConnectInviteResponse;
37
+ export declare function SlackConnectInviteResponseToJSON(json: any): SlackConnectInviteResponse;
38
+ export declare function SlackConnectInviteResponseToJSONTyped(value?: SlackConnectInviteResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,54 @@
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.instanceOfSlackConnectInviteResponse = instanceOfSlackConnectInviteResponse;
17
+ exports.SlackConnectInviteResponseFromJSON = SlackConnectInviteResponseFromJSON;
18
+ exports.SlackConnectInviteResponseFromJSONTyped = SlackConnectInviteResponseFromJSONTyped;
19
+ exports.SlackConnectInviteResponseToJSON = SlackConnectInviteResponseToJSON;
20
+ exports.SlackConnectInviteResponseToJSONTyped = SlackConnectInviteResponseToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the SlackConnectInviteResponse interface.
23
+ */
24
+ function instanceOfSlackConnectInviteResponse(value) {
25
+ if (!('channelId' in value) || value['channelId'] === undefined)
26
+ return false;
27
+ if (!('channelName' in value) || value['channelName'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function SlackConnectInviteResponseFromJSON(json) {
32
+ return SlackConnectInviteResponseFromJSONTyped(json, false);
33
+ }
34
+ function SlackConnectInviteResponseFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ channelId: json['channelId'],
40
+ channelName: json['channelName']
41
+ };
42
+ }
43
+ function SlackConnectInviteResponseToJSON(json) {
44
+ return SlackConnectInviteResponseToJSONTyped(json, false);
45
+ }
46
+ function SlackConnectInviteResponseToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ channelId: value['channelId'],
52
+ channelName: value['channelName']
53
+ };
54
+ }
@@ -0,0 +1,32 @@
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
+ * PATCH /account/billing-email request.
14
+ * @export
15
+ * @interface UpdateBillingEmailRequest
16
+ */
17
+ export interface UpdateBillingEmailRequest {
18
+ /**
19
+ * Address that receives invoices and receipts.
20
+ * @type {string}
21
+ * @memberof UpdateBillingEmailRequest
22
+ */
23
+ email: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the UpdateBillingEmailRequest interface.
27
+ */
28
+ export declare function instanceOfUpdateBillingEmailRequest(value: object): value is UpdateBillingEmailRequest;
29
+ export declare function UpdateBillingEmailRequestFromJSON(json: any): UpdateBillingEmailRequest;
30
+ export declare function UpdateBillingEmailRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateBillingEmailRequest;
31
+ export declare function UpdateBillingEmailRequestToJSON(json: any): UpdateBillingEmailRequest;
32
+ export declare function UpdateBillingEmailRequestToJSONTyped(value?: UpdateBillingEmailRequest | 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.instanceOfUpdateBillingEmailRequest = instanceOfUpdateBillingEmailRequest;
17
+ exports.UpdateBillingEmailRequestFromJSON = UpdateBillingEmailRequestFromJSON;
18
+ exports.UpdateBillingEmailRequestFromJSONTyped = UpdateBillingEmailRequestFromJSONTyped;
19
+ exports.UpdateBillingEmailRequestToJSON = UpdateBillingEmailRequestToJSON;
20
+ exports.UpdateBillingEmailRequestToJSONTyped = UpdateBillingEmailRequestToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the UpdateBillingEmailRequest interface.
23
+ */
24
+ function instanceOfUpdateBillingEmailRequest(value) {
25
+ if (!('email' in value) || value['email'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function UpdateBillingEmailRequestFromJSON(json) {
30
+ return UpdateBillingEmailRequestFromJSONTyped(json, false);
31
+ }
32
+ function UpdateBillingEmailRequestFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ email: json['email']
38
+ };
39
+ }
40
+ function UpdateBillingEmailRequestToJSON(json) {
41
+ return UpdateBillingEmailRequestToJSONTyped(json, false);
42
+ }
43
+ function UpdateBillingEmailRequestToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ email: value['email']
49
+ };
50
+ }
@@ -65,7 +65,8 @@ export declare enum WebhookEndpointEventsEnum {
65
65
  WEB_PUSH_FAILED = "WEB_PUSH_FAILED",
66
66
  WEB_PUSH_UNSUBSCRIBE = "WEB_PUSH_UNSUBSCRIBE",
67
67
  SLACK_FAILED = "SLACK_FAILED",
68
- SLACK_UNSUBSCRIBE = "SLACK_UNSUBSCRIBE"
68
+ SLACK_UNSUBSCRIBE = "SLACK_UNSUBSCRIBE",
69
+ ACCOUNT_USAGE = "ACCOUNT_USAGE"
69
70
  }
70
71
  /**
71
72
  * Check if a given object implements the WebhookEndpoint interface.
@@ -46,6 +46,7 @@ var WebhookEndpointEventsEnum;
46
46
  WebhookEndpointEventsEnum["WEB_PUSH_UNSUBSCRIBE"] = "WEB_PUSH_UNSUBSCRIBE";
47
47
  WebhookEndpointEventsEnum["SLACK_FAILED"] = "SLACK_FAILED";
48
48
  WebhookEndpointEventsEnum["SLACK_UNSUBSCRIBE"] = "SLACK_UNSUBSCRIBE";
49
+ WebhookEndpointEventsEnum["ACCOUNT_USAGE"] = "ACCOUNT_USAGE";
49
50
  })(WebhookEndpointEventsEnum || (exports.WebhookEndpointEventsEnum = WebhookEndpointEventsEnum = {}));
50
51
  /**
51
52
  * Check if a given object implements the WebhookEndpoint interface.
@@ -53,7 +53,8 @@ export declare enum WebhookEndpointUpsertRequestEventsEnum {
53
53
  WEB_PUSH_FAILED = "WEB_PUSH_FAILED",
54
54
  WEB_PUSH_UNSUBSCRIBE = "WEB_PUSH_UNSUBSCRIBE",
55
55
  SLACK_FAILED = "SLACK_FAILED",
56
- SLACK_UNSUBSCRIBE = "SLACK_UNSUBSCRIBE"
56
+ SLACK_UNSUBSCRIBE = "SLACK_UNSUBSCRIBE",
57
+ ACCOUNT_USAGE = "ACCOUNT_USAGE"
57
58
  }
58
59
  /**
59
60
  * Check if a given object implements the WebhookEndpointUpsertRequest interface.
@@ -46,6 +46,7 @@ var WebhookEndpointUpsertRequestEventsEnum;
46
46
  WebhookEndpointUpsertRequestEventsEnum["WEB_PUSH_UNSUBSCRIBE"] = "WEB_PUSH_UNSUBSCRIBE";
47
47
  WebhookEndpointUpsertRequestEventsEnum["SLACK_FAILED"] = "SLACK_FAILED";
48
48
  WebhookEndpointUpsertRequestEventsEnum["SLACK_UNSUBSCRIBE"] = "SLACK_UNSUBSCRIBE";
49
+ WebhookEndpointUpsertRequestEventsEnum["ACCOUNT_USAGE"] = "ACCOUNT_USAGE";
49
50
  })(WebhookEndpointUpsertRequestEventsEnum || (exports.WebhookEndpointUpsertRequestEventsEnum = WebhookEndpointUpsertRequestEventsEnum = {}));
50
51
  /**
51
52
  * Check if a given object implements the WebhookEndpointUpsertRequest interface.
@@ -65,7 +65,8 @@ export declare enum WebhookEndpointsResponseEndpointsInnerEventsEnum {
65
65
  WEB_PUSH_FAILED = "WEB_PUSH_FAILED",
66
66
  WEB_PUSH_UNSUBSCRIBE = "WEB_PUSH_UNSUBSCRIBE",
67
67
  SLACK_FAILED = "SLACK_FAILED",
68
- SLACK_UNSUBSCRIBE = "SLACK_UNSUBSCRIBE"
68
+ SLACK_UNSUBSCRIBE = "SLACK_UNSUBSCRIBE",
69
+ ACCOUNT_USAGE = "ACCOUNT_USAGE"
69
70
  }
70
71
  /**
71
72
  * Check if a given object implements the WebhookEndpointsResponseEndpointsInner interface.
@@ -46,6 +46,7 @@ var WebhookEndpointsResponseEndpointsInnerEventsEnum;
46
46
  WebhookEndpointsResponseEndpointsInnerEventsEnum["WEB_PUSH_UNSUBSCRIBE"] = "WEB_PUSH_UNSUBSCRIBE";
47
47
  WebhookEndpointsResponseEndpointsInnerEventsEnum["SLACK_FAILED"] = "SLACK_FAILED";
48
48
  WebhookEndpointsResponseEndpointsInnerEventsEnum["SLACK_UNSUBSCRIBE"] = "SLACK_UNSUBSCRIBE";
49
+ WebhookEndpointsResponseEndpointsInnerEventsEnum["ACCOUNT_USAGE"] = "ACCOUNT_USAGE";
49
50
  })(WebhookEndpointsResponseEndpointsInnerEventsEnum || (exports.WebhookEndpointsResponseEndpointsInnerEventsEnum = WebhookEndpointsResponseEndpointsInnerEventsEnum = {}));
50
51
  /**
51
52
  * Check if a given object implements the WebhookEndpointsResponseEndpointsInner interface.
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { WebhookEventUsageValue } from './WebhookEventUsageValue';
12
13
  import type { ChannelsEnum } from './ChannelsEnum';
13
14
  /**
14
15
  * Webhook event payload sent to customer endpoints. Use this type with SDK webhook verification methods (e.g., verify from 'pingram/webhooks').
@@ -66,6 +67,56 @@ export interface WebhookEvent {
66
67
  clickedLinkTags?: {
67
68
  [key: string]: Array<string>;
68
69
  };
70
+ /**
71
+ * Account id, for ACCOUNT_USAGE.
72
+ * @type {string}
73
+ * @memberof WebhookEvent
74
+ */
75
+ accountId?: string;
76
+ /**
77
+ * Billing period start (YYYY-MM-DD), for ACCOUNT_USAGE.
78
+ * @type {string}
79
+ * @memberof WebhookEvent
80
+ */
81
+ yearMonthDay?: string;
82
+ /**
83
+ * Date the monthly budget resets (YYYY-MM-DD), for ACCOUNT_USAGE.
84
+ * @type {string}
85
+ * @memberof WebhookEvent
86
+ */
87
+ resetsOn?: string;
88
+ /**
89
+ * Whole percent of the monthly budget used, for ACCOUNT_USAGE.
90
+ * @type {number}
91
+ * @memberof WebhookEvent
92
+ */
93
+ percent?: number;
94
+ /**
95
+ * Amount spent against the monthly budget, for ACCOUNT_USAGE.
96
+ * @type {number}
97
+ * @memberof WebhookEvent
98
+ */
99
+ spent?: number;
100
+ /**
101
+ * Monthly budget the percent was measured against, for ACCOUNT_USAGE.
102
+ * @type {number}
103
+ * @memberof WebhookEvent
104
+ */
105
+ costCap?: number;
106
+ /**
107
+ * Whether the account raises its budget automatically, for ACCOUNT_USAGE.
108
+ * @type {boolean}
109
+ * @memberof WebhookEvent
110
+ */
111
+ autoUpgrade?: boolean;
112
+ /**
113
+ * Per-channel volume and cost for the current period, for ACCOUNT_USAGE.
114
+ * @type {{ [key: string]: WebhookEventUsageValue; }}
115
+ * @memberof WebhookEvent
116
+ */
117
+ usage?: {
118
+ [key: string]: WebhookEventUsageValue;
119
+ };
69
120
  }
70
121
  /**
71
122
  * @export
@@ -92,7 +143,8 @@ export declare enum WebhookEventEventTypeEnum {
92
143
  WEB_PUSH_FAILED = "WEB_PUSH_FAILED",
93
144
  WEB_PUSH_UNSUBSCRIBE = "WEB_PUSH_UNSUBSCRIBE",
94
145
  SLACK_FAILED = "SLACK_FAILED",
95
- SLACK_UNSUBSCRIBE = "SLACK_UNSUBSCRIBE"
146
+ SLACK_UNSUBSCRIBE = "SLACK_UNSUBSCRIBE",
147
+ ACCOUNT_USAGE = "ACCOUNT_USAGE"
96
148
  }
97
149
  /**
98
150
  * Check if a given object implements the WebhookEvent interface.
@@ -19,6 +19,8 @@ exports.WebhookEventFromJSON = WebhookEventFromJSON;
19
19
  exports.WebhookEventFromJSONTyped = WebhookEventFromJSONTyped;
20
20
  exports.WebhookEventToJSON = WebhookEventToJSON;
21
21
  exports.WebhookEventToJSONTyped = WebhookEventToJSONTyped;
22
+ const runtime_1 = require("../runtime");
23
+ const WebhookEventUsageValue_1 = require("./WebhookEventUsageValue");
22
24
  const ChannelsEnum_1 = require("./ChannelsEnum");
23
25
  /**
24
26
  * @export
@@ -47,6 +49,7 @@ var WebhookEventEventTypeEnum;
47
49
  WebhookEventEventTypeEnum["WEB_PUSH_UNSUBSCRIBE"] = "WEB_PUSH_UNSUBSCRIBE";
48
50
  WebhookEventEventTypeEnum["SLACK_FAILED"] = "SLACK_FAILED";
49
51
  WebhookEventEventTypeEnum["SLACK_UNSUBSCRIBE"] = "SLACK_UNSUBSCRIBE";
52
+ WebhookEventEventTypeEnum["ACCOUNT_USAGE"] = "ACCOUNT_USAGE";
50
53
  })(WebhookEventEventTypeEnum || (exports.WebhookEventEventTypeEnum = WebhookEventEventTypeEnum = {}));
51
54
  /**
52
55
  * Check if a given object implements the WebhookEvent interface.
@@ -79,7 +82,17 @@ function WebhookEventFromJSONTyped(json, ignoreDiscriminator) {
79
82
  trackingId: json['trackingId'],
80
83
  failureCode: json['failureCode'] == null ? undefined : json['failureCode'],
81
84
  clickedLink: json['clickedLink'] == null ? undefined : json['clickedLink'],
82
- clickedLinkTags: json['clickedLinkTags'] == null ? undefined : json['clickedLinkTags']
85
+ clickedLinkTags: json['clickedLinkTags'] == null ? undefined : json['clickedLinkTags'],
86
+ accountId: json['accountId'] == null ? undefined : json['accountId'],
87
+ yearMonthDay: json['yearMonthDay'] == null ? undefined : json['yearMonthDay'],
88
+ resetsOn: json['resetsOn'] == null ? undefined : json['resetsOn'],
89
+ percent: json['percent'] == null ? undefined : json['percent'],
90
+ spent: json['spent'] == null ? undefined : json['spent'],
91
+ costCap: json['costCap'] == null ? undefined : json['costCap'],
92
+ autoUpgrade: json['autoUpgrade'] == null ? undefined : json['autoUpgrade'],
93
+ usage: json['usage'] == null
94
+ ? undefined
95
+ : (0, runtime_1.mapValues)(json['usage'], WebhookEventUsageValue_1.WebhookEventUsageValueFromJSON)
83
96
  };
84
97
  }
85
98
  function WebhookEventToJSON(json) {
@@ -97,6 +110,16 @@ function WebhookEventToJSONTyped(value, ignoreDiscriminator = false) {
97
110
  trackingId: value['trackingId'],
98
111
  failureCode: value['failureCode'],
99
112
  clickedLink: value['clickedLink'],
100
- clickedLinkTags: value['clickedLinkTags']
113
+ clickedLinkTags: value['clickedLinkTags'],
114
+ accountId: value['accountId'],
115
+ yearMonthDay: value['yearMonthDay'],
116
+ resetsOn: value['resetsOn'],
117
+ percent: value['percent'],
118
+ spent: value['spent'],
119
+ costCap: value['costCap'],
120
+ autoUpgrade: value['autoUpgrade'],
121
+ usage: value['usage'] == null
122
+ ? undefined
123
+ : (0, runtime_1.mapValues)(value['usage'], WebhookEventUsageValue_1.WebhookEventUsageValueToJSON)
101
124
  };
102
125
  }