pingram 1.0.36-alpha.1600 → 1.0.37-alpha.1601
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.
- package/dist/generated/src/apis/AccountApi.d.ts +4 -4
- package/dist/generated/src/apis/AccountApi.js +2 -2
- package/dist/generated/src/models/AccountGetResponse.d.ts +7 -0
- package/dist/generated/src/models/AccountGetResponse.js +7 -2
- package/dist/generated/src/models/AccountGetResponseBillingAlerts.d.ts +44 -0
- package/dist/generated/src/models/AccountGetResponseBillingAlerts.js +58 -0
- package/dist/generated/src/models/AccountPatchRequest.d.ts +7 -0
- package/dist/generated/src/models/AccountPatchRequest.js +7 -2
- package/dist/generated/src/models/BillingPostResponseBody.d.ts +7 -0
- package/dist/generated/src/models/BillingPostResponseBody.js +5 -0
- package/dist/generated/src/models/WebhookEndpoint.d.ts +2 -1
- package/dist/generated/src/models/WebhookEndpoint.js +1 -0
- package/dist/generated/src/models/WebhookEndpointUpsertRequest.d.ts +2 -1
- package/dist/generated/src/models/WebhookEndpointUpsertRequest.js +1 -0
- package/dist/generated/src/models/WebhookEndpointsResponseEndpointsInner.d.ts +2 -1
- package/dist/generated/src/models/WebhookEndpointsResponseEndpointsInner.js +1 -0
- package/dist/generated/src/models/WebhookEvent.d.ts +53 -1
- package/dist/generated/src/models/WebhookEvent.js +25 -2
- package/dist/generated/src/models/WebhookEventUsageValue.d.ts +38 -0
- package/dist/generated/src/models/WebhookEventUsageValue.js +54 -0
- package/dist/generated/src/models/index.d.ts +2 -0
- package/dist/generated/src/models/index.js +2 -0
- package/dist/src/client.js +1 -1
- package/package.json +1 -1
|
@@ -218,7 +218,7 @@ export interface AccountApiInterface {
|
|
|
218
218
|
supabaseOAuth(supabaseOAuthRequest: SupabaseOAuthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupabaseOAuthResponse>;
|
|
219
219
|
/**
|
|
220
220
|
*
|
|
221
|
-
* @summary Update account billing preferences such as auto upgrade.
|
|
221
|
+
* @summary Update account billing preferences such as auto upgrade and usage email alerts.
|
|
222
222
|
* @param {AccountPatchRequest} accountPatchRequest
|
|
223
223
|
* @param {*} [options] Override http request option.
|
|
224
224
|
* @throws {RequiredError}
|
|
@@ -226,7 +226,7 @@ export interface AccountApiInterface {
|
|
|
226
226
|
*/
|
|
227
227
|
updateAccountSettingsRaw(requestParameters: UpdateAccountSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountGetResponse>>;
|
|
228
228
|
/**
|
|
229
|
-
* Update account billing preferences such as auto upgrade.
|
|
229
|
+
* Update account billing preferences such as auto upgrade and usage email alerts.
|
|
230
230
|
*/
|
|
231
231
|
updateAccountSettings(accountPatchRequest: AccountPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountGetResponse>;
|
|
232
232
|
/**
|
|
@@ -352,11 +352,11 @@ export declare class AccountApi extends runtime.BaseAPI implements AccountApiInt
|
|
|
352
352
|
*/
|
|
353
353
|
supabaseOAuth(supabaseOAuthRequest: SupabaseOAuthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupabaseOAuthResponse>;
|
|
354
354
|
/**
|
|
355
|
-
* Update account billing preferences such as auto upgrade.
|
|
355
|
+
* Update account billing preferences such as auto upgrade and usage email alerts.
|
|
356
356
|
*/
|
|
357
357
|
updateAccountSettingsRaw(requestParameters: UpdateAccountSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountGetResponse>>;
|
|
358
358
|
/**
|
|
359
|
-
* Update account billing preferences such as auto upgrade.
|
|
359
|
+
* Update account billing preferences such as auto upgrade and usage email alerts.
|
|
360
360
|
*/
|
|
361
361
|
updateAccountSettings(accountPatchRequest: AccountPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountGetResponse>;
|
|
362
362
|
/**
|
|
@@ -760,7 +760,7 @@ class AccountApi extends runtime.BaseAPI {
|
|
|
760
760
|
return await response.value();
|
|
761
761
|
}
|
|
762
762
|
/**
|
|
763
|
-
* Update account billing preferences such as auto upgrade.
|
|
763
|
+
* Update account billing preferences such as auto upgrade and usage email alerts.
|
|
764
764
|
*/
|
|
765
765
|
async updateAccountSettingsRaw(requestParameters, initOverrides) {
|
|
766
766
|
if (requestParameters['accountPatchRequest'] == null) {
|
|
@@ -808,7 +808,7 @@ class AccountApi extends runtime.BaseAPI {
|
|
|
808
808
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AccountGetResponseFromJSON)(jsonValue));
|
|
809
809
|
}
|
|
810
810
|
/**
|
|
811
|
-
* Update account billing preferences such as auto upgrade.
|
|
811
|
+
* Update account billing preferences such as auto upgrade and usage email alerts.
|
|
812
812
|
*/
|
|
813
813
|
async updateAccountSettings(accountPatchRequest, initOverrides) {
|
|
814
814
|
const response = await this.updateAccountSettingsRaw({ accountPatchRequest: accountPatchRequest }, initOverrides);
|
|
@@ -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
|
* GET /account response: public plan fields for the authenticated account.
|
|
14
15
|
* @export
|
|
@@ -123,6 +124,12 @@ export interface AccountGetResponse {
|
|
|
123
124
|
* @memberof AccountGetResponse
|
|
124
125
|
*/
|
|
125
126
|
autoUpgrade?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
*
|
|
129
|
+
* @type {AccountGetResponseBillingAlerts}
|
|
130
|
+
* @memberof AccountGetResponse
|
|
131
|
+
*/
|
|
132
|
+
billingAlerts?: AccountGetResponseBillingAlerts;
|
|
126
133
|
}
|
|
127
134
|
/**
|
|
128
135
|
* @export
|
|
@@ -19,6 +19,7 @@ exports.AccountGetResponseFromJSON = AccountGetResponseFromJSON;
|
|
|
19
19
|
exports.AccountGetResponseFromJSONTyped = AccountGetResponseFromJSONTyped;
|
|
20
20
|
exports.AccountGetResponseToJSON = AccountGetResponseToJSON;
|
|
21
21
|
exports.AccountGetResponseToJSONTyped = AccountGetResponseToJSONTyped;
|
|
22
|
+
const AccountGetResponseBillingAlerts_1 = require("./AccountGetResponseBillingAlerts");
|
|
22
23
|
/**
|
|
23
24
|
* @export
|
|
24
25
|
* @enum {string}
|
|
@@ -119,7 +120,10 @@ function AccountGetResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
119
120
|
pendingDowngradeAccountType: json['pendingDowngradeAccountType'] == null
|
|
120
121
|
? undefined
|
|
121
122
|
: json['pendingDowngradeAccountType'],
|
|
122
|
-
autoUpgrade: json['autoUpgrade'] == null ? undefined : json['autoUpgrade']
|
|
123
|
+
autoUpgrade: json['autoUpgrade'] == null ? undefined : json['autoUpgrade'],
|
|
124
|
+
billingAlerts: json['billingAlerts'] == null
|
|
125
|
+
? undefined
|
|
126
|
+
: (0, AccountGetResponseBillingAlerts_1.AccountGetResponseBillingAlertsFromJSON)(json['billingAlerts'])
|
|
123
127
|
};
|
|
124
128
|
}
|
|
125
129
|
function AccountGetResponseToJSON(json) {
|
|
@@ -147,6 +151,7 @@ function AccountGetResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
147
151
|
pendingDowngradeEffectiveDate: value['pendingDowngradeEffectiveDate'],
|
|
148
152
|
pendingDowngradeCostCap: value['pendingDowngradeCostCap'],
|
|
149
153
|
pendingDowngradeAccountType: value['pendingDowngradeAccountType'],
|
|
150
|
-
autoUpgrade: value['autoUpgrade']
|
|
154
|
+
autoUpgrade: value['autoUpgrade'],
|
|
155
|
+
billingAlerts: (0, AccountGetResponseBillingAlerts_1.AccountGetResponseBillingAlertsToJSON)(value['billingAlerts'])
|
|
151
156
|
};
|
|
152
157
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
* Email alerts for monthly usage. New accounts start enabled for the creator at 80% and 100%.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface AccountGetResponseBillingAlerts
|
|
16
|
+
*/
|
|
17
|
+
export interface AccountGetResponseBillingAlerts {
|
|
18
|
+
/**
|
|
19
|
+
* When false, saved addresses and thresholds are kept but no email is sent.
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
* @memberof AccountGetResponseBillingAlerts
|
|
22
|
+
*/
|
|
23
|
+
enabled: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Addresses that receive threshold emails. At most three.
|
|
26
|
+
* @type {Array<string>}
|
|
27
|
+
* @memberof AccountGetResponseBillingAlerts
|
|
28
|
+
*/
|
|
29
|
+
emails: Array<string>;
|
|
30
|
+
/**
|
|
31
|
+
* Percents to email, from 5 to 100 in steps of 5. At most two. At least one is required while enabled.
|
|
32
|
+
* @type {Array<number>}
|
|
33
|
+
* @memberof AccountGetResponseBillingAlerts
|
|
34
|
+
*/
|
|
35
|
+
thresholds: Array<number>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the AccountGetResponseBillingAlerts interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfAccountGetResponseBillingAlerts(value: object): value is AccountGetResponseBillingAlerts;
|
|
41
|
+
export declare function AccountGetResponseBillingAlertsFromJSON(json: any): AccountGetResponseBillingAlerts;
|
|
42
|
+
export declare function AccountGetResponseBillingAlertsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountGetResponseBillingAlerts;
|
|
43
|
+
export declare function AccountGetResponseBillingAlertsToJSON(json: any): AccountGetResponseBillingAlerts;
|
|
44
|
+
export declare function AccountGetResponseBillingAlertsToJSONTyped(value?: AccountGetResponseBillingAlerts | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,58 @@
|
|
|
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.instanceOfAccountGetResponseBillingAlerts = instanceOfAccountGetResponseBillingAlerts;
|
|
17
|
+
exports.AccountGetResponseBillingAlertsFromJSON = AccountGetResponseBillingAlertsFromJSON;
|
|
18
|
+
exports.AccountGetResponseBillingAlertsFromJSONTyped = AccountGetResponseBillingAlertsFromJSONTyped;
|
|
19
|
+
exports.AccountGetResponseBillingAlertsToJSON = AccountGetResponseBillingAlertsToJSON;
|
|
20
|
+
exports.AccountGetResponseBillingAlertsToJSONTyped = AccountGetResponseBillingAlertsToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the AccountGetResponseBillingAlerts interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfAccountGetResponseBillingAlerts(value) {
|
|
25
|
+
if (!('enabled' in value) || value['enabled'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('emails' in value) || value['emails'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('thresholds' in value) || value['thresholds'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
function AccountGetResponseBillingAlertsFromJSON(json) {
|
|
34
|
+
return AccountGetResponseBillingAlertsFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
function AccountGetResponseBillingAlertsFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
enabled: json['enabled'],
|
|
42
|
+
emails: json['emails'],
|
|
43
|
+
thresholds: json['thresholds']
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function AccountGetResponseBillingAlertsToJSON(json) {
|
|
47
|
+
return AccountGetResponseBillingAlertsToJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
function AccountGetResponseBillingAlertsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
50
|
+
if (value == null) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
enabled: value['enabled'],
|
|
55
|
+
emails: value['emails'],
|
|
56
|
+
thresholds: value['thresholds']
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -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
|
* PATCH /account request: billing preferences.
|
|
14
15
|
* @export
|
|
@@ -21,6 +22,12 @@ export interface AccountPatchRequest {
|
|
|
21
22
|
* @memberof AccountPatchRequest
|
|
22
23
|
*/
|
|
23
24
|
autoUpgrade?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {AccountGetResponseBillingAlerts}
|
|
28
|
+
* @memberof AccountPatchRequest
|
|
29
|
+
*/
|
|
30
|
+
billingAlerts?: AccountGetResponseBillingAlerts;
|
|
24
31
|
}
|
|
25
32
|
/**
|
|
26
33
|
* Check if a given object implements the AccountPatchRequest interface.
|
|
@@ -18,6 +18,7 @@ exports.AccountPatchRequestFromJSON = AccountPatchRequestFromJSON;
|
|
|
18
18
|
exports.AccountPatchRequestFromJSONTyped = AccountPatchRequestFromJSONTyped;
|
|
19
19
|
exports.AccountPatchRequestToJSON = AccountPatchRequestToJSON;
|
|
20
20
|
exports.AccountPatchRequestToJSONTyped = AccountPatchRequestToJSONTyped;
|
|
21
|
+
const AccountGetResponseBillingAlerts_1 = require("./AccountGetResponseBillingAlerts");
|
|
21
22
|
/**
|
|
22
23
|
* Check if a given object implements the AccountPatchRequest interface.
|
|
23
24
|
*/
|
|
@@ -32,7 +33,10 @@ function AccountPatchRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
32
33
|
return json;
|
|
33
34
|
}
|
|
34
35
|
return {
|
|
35
|
-
autoUpgrade: json['autoUpgrade'] == null ? undefined : json['autoUpgrade']
|
|
36
|
+
autoUpgrade: json['autoUpgrade'] == null ? undefined : json['autoUpgrade'],
|
|
37
|
+
billingAlerts: json['billingAlerts'] == null
|
|
38
|
+
? undefined
|
|
39
|
+
: (0, AccountGetResponseBillingAlerts_1.AccountGetResponseBillingAlertsFromJSON)(json['billingAlerts'])
|
|
36
40
|
};
|
|
37
41
|
}
|
|
38
42
|
function AccountPatchRequestToJSON(json) {
|
|
@@ -43,6 +47,7 @@ function AccountPatchRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
43
47
|
return value;
|
|
44
48
|
}
|
|
45
49
|
return {
|
|
46
|
-
autoUpgrade: value['autoUpgrade']
|
|
50
|
+
autoUpgrade: value['autoUpgrade'],
|
|
51
|
+
billingAlerts: (0, AccountGetResponseBillingAlerts_1.AccountGetResponseBillingAlertsToJSON)(value['billingAlerts'])
|
|
47
52
|
};
|
|
48
53
|
}
|
|
@@ -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
|
};
|
|
@@ -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
|
}
|
|
@@ -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
|
+
* Volume and spend for one channel in the current billing period.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface WebhookEventUsageValue
|
|
16
|
+
*/
|
|
17
|
+
export interface WebhookEventUsageValue {
|
|
18
|
+
/**
|
|
19
|
+
* Message count, or number-days for NUMBER.
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof WebhookEventUsageValue
|
|
22
|
+
*/
|
|
23
|
+
count: number;
|
|
24
|
+
/**
|
|
25
|
+
* Spend for this channel in the current billing period.
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof WebhookEventUsageValue
|
|
28
|
+
*/
|
|
29
|
+
cost: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the WebhookEventUsageValue interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfWebhookEventUsageValue(value: object): value is WebhookEventUsageValue;
|
|
35
|
+
export declare function WebhookEventUsageValueFromJSON(json: any): WebhookEventUsageValue;
|
|
36
|
+
export declare function WebhookEventUsageValueFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebhookEventUsageValue;
|
|
37
|
+
export declare function WebhookEventUsageValueToJSON(json: any): WebhookEventUsageValue;
|
|
38
|
+
export declare function WebhookEventUsageValueToJSONTyped(value?: WebhookEventUsageValue | 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.instanceOfWebhookEventUsageValue = instanceOfWebhookEventUsageValue;
|
|
17
|
+
exports.WebhookEventUsageValueFromJSON = WebhookEventUsageValueFromJSON;
|
|
18
|
+
exports.WebhookEventUsageValueFromJSONTyped = WebhookEventUsageValueFromJSONTyped;
|
|
19
|
+
exports.WebhookEventUsageValueToJSON = WebhookEventUsageValueToJSON;
|
|
20
|
+
exports.WebhookEventUsageValueToJSONTyped = WebhookEventUsageValueToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the WebhookEventUsageValue interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfWebhookEventUsageValue(value) {
|
|
25
|
+
if (!('count' in value) || value['count'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('cost' in value) || value['cost'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
function WebhookEventUsageValueFromJSON(json) {
|
|
32
|
+
return WebhookEventUsageValueFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
function WebhookEventUsageValueFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
count: json['count'],
|
|
40
|
+
cost: json['cost']
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function WebhookEventUsageValueToJSON(json) {
|
|
44
|
+
return WebhookEventUsageValueToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
function WebhookEventUsageValueToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
count: value['count'],
|
|
52
|
+
cost: value['cost']
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -3,6 +3,7 @@ export * from './AcceptInviteResponse';
|
|
|
3
3
|
export * from './AccountAddressesResponse';
|
|
4
4
|
export * from './AccountAddressesResponseAddressesInner';
|
|
5
5
|
export * from './AccountGetResponse';
|
|
6
|
+
export * from './AccountGetResponseBillingAlerts';
|
|
6
7
|
export * from './AccountPatchRequest';
|
|
7
8
|
export * from './AddressResponse';
|
|
8
9
|
export * from './ApiErrorBody';
|
|
@@ -299,4 +300,5 @@ export * from './WebhookEndpointUpsertRequest';
|
|
|
299
300
|
export * from './WebhookEndpointsResponse';
|
|
300
301
|
export * from './WebhookEndpointsResponseEndpointsInner';
|
|
301
302
|
export * from './WebhookEvent';
|
|
303
|
+
export * from './WebhookEventUsageValue';
|
|
302
304
|
export * from './WebhookResponse';
|
|
@@ -21,6 +21,7 @@ __exportStar(require("./AcceptInviteResponse"), exports);
|
|
|
21
21
|
__exportStar(require("./AccountAddressesResponse"), exports);
|
|
22
22
|
__exportStar(require("./AccountAddressesResponseAddressesInner"), exports);
|
|
23
23
|
__exportStar(require("./AccountGetResponse"), exports);
|
|
24
|
+
__exportStar(require("./AccountGetResponseBillingAlerts"), exports);
|
|
24
25
|
__exportStar(require("./AccountPatchRequest"), exports);
|
|
25
26
|
__exportStar(require("./AddressResponse"), exports);
|
|
26
27
|
__exportStar(require("./ApiErrorBody"), exports);
|
|
@@ -317,4 +318,5 @@ __exportStar(require("./WebhookEndpointUpsertRequest"), exports);
|
|
|
317
318
|
__exportStar(require("./WebhookEndpointsResponse"), exports);
|
|
318
319
|
__exportStar(require("./WebhookEndpointsResponseEndpointsInner"), exports);
|
|
319
320
|
__exportStar(require("./WebhookEvent"), exports);
|
|
321
|
+
__exportStar(require("./WebhookEventUsageValue"), exports);
|
|
320
322
|
__exportStar(require("./WebhookResponse"), exports);
|
package/dist/src/client.js
CHANGED
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
8
8
|
exports.Pingram = void 0;
|
|
9
9
|
const src_1 = require("../generated/src");
|
|
10
10
|
// SDK version for User-Agent header (injected at codegen time)
|
|
11
|
-
const SDK_VERSION = '1.0.
|
|
11
|
+
const SDK_VERSION = '1.0.37';
|
|
12
12
|
const USER_AGENT = `pingram-node/${SDK_VERSION}`;
|
|
13
13
|
const src_2 = require("../generated/src");
|
|
14
14
|
const src_3 = require("../generated/src");
|
package/package.json
CHANGED