pingram 1.0.40-alpha.1722 → 1.0.41-alpha.1723

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.
@@ -30,7 +30,7 @@ export interface UpdateWebhookRequest {
30
30
  export interface WebhooksApiInterface {
31
31
  /**
32
32
  *
33
- * @summary Create a webhook endpoint on a server outside Pingram. Pingram later POSTs signed JSON to that URL when one of the subscribed events happens. This call only saves the endpoint; it does not send a webhook and does not modify the destination server. The response includes id and a signing secret starting with pingram_whsecret_. Save it and verify the X-Pingram-Signature header. Updates keep this secret. At most 10 endpoints per account. The URL must be a public HTTPS URL and should return 2xx.
33
+ * @summary Create a webhook endpoint on a server outside Pingram. Pingram later POSTs signed JSON to that URL when one of the subscribed events happens. This call only saves the endpoint; it does not send a webhook and does not modify the destination server. The response includes id and a signing secret starting with pingram_whsecret_. Save it and verify the X-Pingram-Signature header. Updates keep this secret. At most 10 endpoints per account. The URL must be a public HTTPS URL and should return 2xx. Optional basic auth is sent as an Authorization header. Put it in basicAuth or in the URL, not both. The password is not returned.
34
34
  * @param {WebhookEndpointUpsertRequest} webhookEndpointUpsertRequest
35
35
  * @param {*} [options] Override http request option.
36
36
  * @throws {RequiredError}
@@ -38,7 +38,7 @@ export interface WebhooksApiInterface {
38
38
  */
39
39
  createWebhookRaw(requestParameters: CreateWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhookEndpoint>>;
40
40
  /**
41
- * Create a webhook endpoint on a server outside Pingram. Pingram later POSTs signed JSON to that URL when one of the subscribed events happens. This call only saves the endpoint; it does not send a webhook and does not modify the destination server. The response includes id and a signing secret starting with pingram_whsecret_. Save it and verify the X-Pingram-Signature header. Updates keep this secret. At most 10 endpoints per account. The URL must be a public HTTPS URL and should return 2xx.
41
+ * Create a webhook endpoint on a server outside Pingram. Pingram later POSTs signed JSON to that URL when one of the subscribed events happens. This call only saves the endpoint; it does not send a webhook and does not modify the destination server. The response includes id and a signing secret starting with pingram_whsecret_. Save it and verify the X-Pingram-Signature header. Updates keep this secret. At most 10 endpoints per account. The URL must be a public HTTPS URL and should return 2xx. Optional basic auth is sent as an Authorization header. Put it in basicAuth or in the URL, not both. The password is not returned.
42
42
  */
43
43
  createWebhook(webhookEndpointUpsertRequest: WebhookEndpointUpsertRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookEndpoint>;
44
44
  /**
@@ -56,19 +56,19 @@ export interface WebhooksApiInterface {
56
56
  deleteWebhook(endpointId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
57
57
  /**
58
58
  *
59
- * @summary List webhook endpoints on the current account, including each id, URL, subscribed events, and signing secret. Use the id with update or delete.
59
+ * @summary List webhook endpoints on the current account, including each id, URL, subscribed events, and signing secret. When basic auth is saved, username is returned and passwordSet is true. The password is not returned. Use the id with update or delete.
60
60
  * @param {*} [options] Override http request option.
61
61
  * @throws {RequiredError}
62
62
  * @memberof WebhooksApiInterface
63
63
  */
64
64
  listWebhooksRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhookEndpointsResponse>>;
65
65
  /**
66
- * List webhook endpoints on the current account, including each id, URL, subscribed events, and signing secret. Use the id with update or delete.
66
+ * List webhook endpoints on the current account, including each id, URL, subscribed events, and signing secret. When basic auth is saved, username is returned and passwordSet is true. The password is not returned. Use the id with update or delete.
67
67
  */
68
68
  listWebhooks(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookEndpointsResponse>;
69
69
  /**
70
70
  *
71
- * @summary Replace one webhook endpoint\'s URL and its full event subscription. The URL is a server outside Pingram. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it, and the previous URL stops receiving events. The previous URL and event list are not kept. The URL must be a public HTTPS URL.
71
+ * @summary Replace one webhook endpoint\'s URL and its full event subscription. The URL is a server outside Pingram. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it, and the previous URL stops receiving events. The previous URL and event list are not kept. The URL must be a public HTTPS URL. Omit basicAuth to keep stored credentials. null removes them. Omit the password to keep the stored password. The password is not returned.
72
72
  * @param {string} endpointId Id of the webhook endpoint, from list or create.
73
73
  * @param {WebhookEndpointUpsertRequest} webhookEndpointUpsertRequest
74
74
  * @param {*} [options] Override http request option.
@@ -77,7 +77,7 @@ export interface WebhooksApiInterface {
77
77
  */
78
78
  updateWebhookRaw(requestParameters: UpdateWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhookEndpoint>>;
79
79
  /**
80
- * Replace one webhook endpoint\'s URL and its full event subscription. The URL is a server outside Pingram. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it, and the previous URL stops receiving events. The previous URL and event list are not kept. The URL must be a public HTTPS URL.
80
+ * Replace one webhook endpoint\'s URL and its full event subscription. The URL is a server outside Pingram. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it, and the previous URL stops receiving events. The previous URL and event list are not kept. The URL must be a public HTTPS URL. Omit basicAuth to keep stored credentials. null removes them. Omit the password to keep the stored password. The password is not returned.
81
81
  */
82
82
  updateWebhook(endpointId: string, webhookEndpointUpsertRequest: WebhookEndpointUpsertRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookEndpoint>;
83
83
  }
@@ -86,11 +86,11 @@ export interface WebhooksApiInterface {
86
86
  */
87
87
  export declare class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface {
88
88
  /**
89
- * Create a webhook endpoint on a server outside Pingram. Pingram later POSTs signed JSON to that URL when one of the subscribed events happens. This call only saves the endpoint; it does not send a webhook and does not modify the destination server. The response includes id and a signing secret starting with pingram_whsecret_. Save it and verify the X-Pingram-Signature header. Updates keep this secret. At most 10 endpoints per account. The URL must be a public HTTPS URL and should return 2xx.
89
+ * Create a webhook endpoint on a server outside Pingram. Pingram later POSTs signed JSON to that URL when one of the subscribed events happens. This call only saves the endpoint; it does not send a webhook and does not modify the destination server. The response includes id and a signing secret starting with pingram_whsecret_. Save it and verify the X-Pingram-Signature header. Updates keep this secret. At most 10 endpoints per account. The URL must be a public HTTPS URL and should return 2xx. Optional basic auth is sent as an Authorization header. Put it in basicAuth or in the URL, not both. The password is not returned.
90
90
  */
91
91
  createWebhookRaw(requestParameters: CreateWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhookEndpoint>>;
92
92
  /**
93
- * Create a webhook endpoint on a server outside Pingram. Pingram later POSTs signed JSON to that URL when one of the subscribed events happens. This call only saves the endpoint; it does not send a webhook and does not modify the destination server. The response includes id and a signing secret starting with pingram_whsecret_. Save it and verify the X-Pingram-Signature header. Updates keep this secret. At most 10 endpoints per account. The URL must be a public HTTPS URL and should return 2xx.
93
+ * Create a webhook endpoint on a server outside Pingram. Pingram later POSTs signed JSON to that URL when one of the subscribed events happens. This call only saves the endpoint; it does not send a webhook and does not modify the destination server. The response includes id and a signing secret starting with pingram_whsecret_. Save it and verify the X-Pingram-Signature header. Updates keep this secret. At most 10 endpoints per account. The URL must be a public HTTPS URL and should return 2xx. Optional basic auth is sent as an Authorization header. Put it in basicAuth or in the URL, not both. The password is not returned.
94
94
  */
95
95
  createWebhook(webhookEndpointUpsertRequest: WebhookEndpointUpsertRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookEndpoint>;
96
96
  /**
@@ -102,19 +102,19 @@ export declare class WebhooksApi extends runtime.BaseAPI implements WebhooksApiI
102
102
  */
103
103
  deleteWebhook(endpointId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
104
104
  /**
105
- * List webhook endpoints on the current account, including each id, URL, subscribed events, and signing secret. Use the id with update or delete.
105
+ * List webhook endpoints on the current account, including each id, URL, subscribed events, and signing secret. When basic auth is saved, username is returned and passwordSet is true. The password is not returned. Use the id with update or delete.
106
106
  */
107
107
  listWebhooksRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhookEndpointsResponse>>;
108
108
  /**
109
- * List webhook endpoints on the current account, including each id, URL, subscribed events, and signing secret. Use the id with update or delete.
109
+ * List webhook endpoints on the current account, including each id, URL, subscribed events, and signing secret. When basic auth is saved, username is returned and passwordSet is true. The password is not returned. Use the id with update or delete.
110
110
  */
111
111
  listWebhooks(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookEndpointsResponse>;
112
112
  /**
113
- * Replace one webhook endpoint\'s URL and its full event subscription. The URL is a server outside Pingram. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it, and the previous URL stops receiving events. The previous URL and event list are not kept. The URL must be a public HTTPS URL.
113
+ * Replace one webhook endpoint\'s URL and its full event subscription. The URL is a server outside Pingram. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it, and the previous URL stops receiving events. The previous URL and event list are not kept. The URL must be a public HTTPS URL. Omit basicAuth to keep stored credentials. null removes them. Omit the password to keep the stored password. The password is not returned.
114
114
  */
115
115
  updateWebhookRaw(requestParameters: UpdateWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhookEndpoint>>;
116
116
  /**
117
- * Replace one webhook endpoint\'s URL and its full event subscription. The URL is a server outside Pingram. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it, and the previous URL stops receiving events. The previous URL and event list are not kept. The URL must be a public HTTPS URL.
117
+ * Replace one webhook endpoint\'s URL and its full event subscription. The URL is a server outside Pingram. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it, and the previous URL stops receiving events. The previous URL and event list are not kept. The URL must be a public HTTPS URL. Omit basicAuth to keep stored credentials. null removes them. Omit the password to keep the stored password. The password is not returned.
118
118
  */
119
119
  updateWebhook(endpointId: string, webhookEndpointUpsertRequest: WebhookEndpointUpsertRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookEndpoint>;
120
120
  }
@@ -54,7 +54,7 @@ const index_1 = require("../models/index");
54
54
  */
55
55
  class WebhooksApi extends runtime.BaseAPI {
56
56
  /**
57
- * Create a webhook endpoint on a server outside Pingram. Pingram later POSTs signed JSON to that URL when one of the subscribed events happens. This call only saves the endpoint; it does not send a webhook and does not modify the destination server. The response includes id and a signing secret starting with pingram_whsecret_. Save it and verify the X-Pingram-Signature header. Updates keep this secret. At most 10 endpoints per account. The URL must be a public HTTPS URL and should return 2xx.
57
+ * Create a webhook endpoint on a server outside Pingram. Pingram later POSTs signed JSON to that URL when one of the subscribed events happens. This call only saves the endpoint; it does not send a webhook and does not modify the destination server. The response includes id and a signing secret starting with pingram_whsecret_. Save it and verify the X-Pingram-Signature header. Updates keep this secret. At most 10 endpoints per account. The URL must be a public HTTPS URL and should return 2xx. Optional basic auth is sent as an Authorization header. Put it in basicAuth or in the URL, not both. The password is not returned.
58
58
  */
59
59
  async createWebhookRaw(requestParameters, initOverrides) {
60
60
  if (requestParameters['webhookEndpointUpsertRequest'] == null) {
@@ -102,7 +102,7 @@ class WebhooksApi extends runtime.BaseAPI {
102
102
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WebhookEndpointFromJSON)(jsonValue));
103
103
  }
104
104
  /**
105
- * Create a webhook endpoint on a server outside Pingram. Pingram later POSTs signed JSON to that URL when one of the subscribed events happens. This call only saves the endpoint; it does not send a webhook and does not modify the destination server. The response includes id and a signing secret starting with pingram_whsecret_. Save it and verify the X-Pingram-Signature header. Updates keep this secret. At most 10 endpoints per account. The URL must be a public HTTPS URL and should return 2xx.
105
+ * Create a webhook endpoint on a server outside Pingram. Pingram later POSTs signed JSON to that URL when one of the subscribed events happens. This call only saves the endpoint; it does not send a webhook and does not modify the destination server. The response includes id and a signing secret starting with pingram_whsecret_. Save it and verify the X-Pingram-Signature header. Updates keep this secret. At most 10 endpoints per account. The URL must be a public HTTPS URL and should return 2xx. Optional basic auth is sent as an Authorization header. Put it in basicAuth or in the URL, not both. The password is not returned.
106
106
  */
107
107
  async createWebhook(webhookEndpointUpsertRequest, initOverrides) {
108
108
  const response = await this.createWebhookRaw({ webhookEndpointUpsertRequest: webhookEndpointUpsertRequest }, initOverrides);
@@ -162,7 +162,7 @@ class WebhooksApi extends runtime.BaseAPI {
162
162
  await this.deleteWebhookRaw({ endpointId: endpointId }, initOverrides);
163
163
  }
164
164
  /**
165
- * List webhook endpoints on the current account, including each id, URL, subscribed events, and signing secret. Use the id with update or delete.
165
+ * List webhook endpoints on the current account, including each id, URL, subscribed events, and signing secret. When basic auth is saved, username is returned and passwordSet is true. The password is not returned. Use the id with update or delete.
166
166
  */
167
167
  async listWebhooksRaw(initOverrides) {
168
168
  const queryParameters = {};
@@ -205,14 +205,14 @@ class WebhooksApi extends runtime.BaseAPI {
205
205
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WebhookEndpointsResponseFromJSON)(jsonValue));
206
206
  }
207
207
  /**
208
- * List webhook endpoints on the current account, including each id, URL, subscribed events, and signing secret. Use the id with update or delete.
208
+ * List webhook endpoints on the current account, including each id, URL, subscribed events, and signing secret. When basic auth is saved, username is returned and passwordSet is true. The password is not returned. Use the id with update or delete.
209
209
  */
210
210
  async listWebhooks(initOverrides) {
211
211
  const response = await this.listWebhooksRaw(initOverrides);
212
212
  return await response.value();
213
213
  }
214
214
  /**
215
- * Replace one webhook endpoint\'s URL and its full event subscription. The URL is a server outside Pingram. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it, and the previous URL stops receiving events. The previous URL and event list are not kept. The URL must be a public HTTPS URL.
215
+ * Replace one webhook endpoint\'s URL and its full event subscription. The URL is a server outside Pingram. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it, and the previous URL stops receiving events. The previous URL and event list are not kept. The URL must be a public HTTPS URL. Omit basicAuth to keep stored credentials. null removes them. Omit the password to keep the stored password. The password is not returned.
216
216
  */
217
217
  async updateWebhookRaw(requestParameters, initOverrides) {
218
218
  if (requestParameters['endpointId'] == null) {
@@ -264,7 +264,7 @@ class WebhooksApi extends runtime.BaseAPI {
264
264
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WebhookEndpointFromJSON)(jsonValue));
265
265
  }
266
266
  /**
267
- * Replace one webhook endpoint\'s URL and its full event subscription. The URL is a server outside Pingram. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it, and the previous URL stops receiving events. The previous URL and event list are not kept. The URL must be a public HTTPS URL.
267
+ * Replace one webhook endpoint\'s URL and its full event subscription. The URL is a server outside Pingram. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it, and the previous URL stops receiving events. The previous URL and event list are not kept. The URL must be a public HTTPS URL. Omit basicAuth to keep stored credentials. null removes them. Omit the password to keep the stored password. The password is not returned.
268
268
  */
269
269
  async updateWebhook(endpointId, webhookEndpointUpsertRequest, initOverrides) {
270
270
  const response = await this.updateWebhookRaw({
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { WebhookEndpointBasicAuth } from './WebhookEndpointBasicAuth';
12
13
  /**
13
14
  * Destination URL that receives signed event payloads for a set of subscribed events.
14
15
  * @export
@@ -22,7 +23,7 @@ export interface WebhookEndpoint {
22
23
  */
23
24
  id: string;
24
25
  /**
25
- * Destination URL that receives signed JSON event payloads.
26
+ * Destination URL that receives signed JSON event payloads. Credentials are not included in this URL.
26
27
  * @type {string}
27
28
  * @memberof WebhookEndpoint
28
29
  */
@@ -39,6 +40,12 @@ export interface WebhookEndpoint {
39
40
  * @memberof WebhookEndpoint
40
41
  */
41
42
  secret: string;
43
+ /**
44
+ *
45
+ * @type {WebhookEndpointBasicAuth}
46
+ * @memberof WebhookEndpoint
47
+ */
48
+ basicAuth?: WebhookEndpointBasicAuth;
42
49
  }
43
50
  /**
44
51
  * @export
@@ -19,6 +19,7 @@ exports.WebhookEndpointFromJSON = WebhookEndpointFromJSON;
19
19
  exports.WebhookEndpointFromJSONTyped = WebhookEndpointFromJSONTyped;
20
20
  exports.WebhookEndpointToJSON = WebhookEndpointToJSON;
21
21
  exports.WebhookEndpointToJSONTyped = WebhookEndpointToJSONTyped;
22
+ const WebhookEndpointBasicAuth_1 = require("./WebhookEndpointBasicAuth");
22
23
  /**
23
24
  * @export
24
25
  */
@@ -74,7 +75,10 @@ function WebhookEndpointFromJSONTyped(json, ignoreDiscriminator) {
74
75
  id: json['id'],
75
76
  webhook: json['webhook'],
76
77
  events: json['events'],
77
- secret: json['secret']
78
+ secret: json['secret'],
79
+ basicAuth: json['basicAuth'] == null
80
+ ? undefined
81
+ : (0, WebhookEndpointBasicAuth_1.WebhookEndpointBasicAuthFromJSON)(json['basicAuth'])
78
82
  };
79
83
  }
80
84
  function WebhookEndpointToJSON(json) {
@@ -88,6 +92,7 @@ function WebhookEndpointToJSONTyped(value, ignoreDiscriminator = false) {
88
92
  id: value['id'],
89
93
  webhook: value['webhook'],
90
94
  events: value['events'],
91
- secret: value['secret']
95
+ secret: value['secret'],
96
+ basicAuth: (0, WebhookEndpointBasicAuth_1.WebhookEndpointBasicAuthToJSON)(value['basicAuth'])
92
97
  };
93
98
  }
@@ -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
+ * HTTP Basic credentials as returned by the API. The password is never included.
14
+ * @export
15
+ * @interface WebhookEndpointBasicAuth
16
+ */
17
+ export interface WebhookEndpointBasicAuth {
18
+ /**
19
+ * Username sent on the Authorization header.
20
+ * @type {string}
21
+ * @memberof WebhookEndpointBasicAuth
22
+ */
23
+ username: string;
24
+ /**
25
+ * True when a password is stored. The password itself is not returned.
26
+ * @type {boolean}
27
+ * @memberof WebhookEndpointBasicAuth
28
+ */
29
+ passwordSet: boolean;
30
+ }
31
+ /**
32
+ * Check if a given object implements the WebhookEndpointBasicAuth interface.
33
+ */
34
+ export declare function instanceOfWebhookEndpointBasicAuth(value: object): value is WebhookEndpointBasicAuth;
35
+ export declare function WebhookEndpointBasicAuthFromJSON(json: any): WebhookEndpointBasicAuth;
36
+ export declare function WebhookEndpointBasicAuthFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebhookEndpointBasicAuth;
37
+ export declare function WebhookEndpointBasicAuthToJSON(json: any): WebhookEndpointBasicAuth;
38
+ export declare function WebhookEndpointBasicAuthToJSONTyped(value?: WebhookEndpointBasicAuth | 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.instanceOfWebhookEndpointBasicAuth = instanceOfWebhookEndpointBasicAuth;
17
+ exports.WebhookEndpointBasicAuthFromJSON = WebhookEndpointBasicAuthFromJSON;
18
+ exports.WebhookEndpointBasicAuthFromJSONTyped = WebhookEndpointBasicAuthFromJSONTyped;
19
+ exports.WebhookEndpointBasicAuthToJSON = WebhookEndpointBasicAuthToJSON;
20
+ exports.WebhookEndpointBasicAuthToJSONTyped = WebhookEndpointBasicAuthToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the WebhookEndpointBasicAuth interface.
23
+ */
24
+ function instanceOfWebhookEndpointBasicAuth(value) {
25
+ if (!('username' in value) || value['username'] === undefined)
26
+ return false;
27
+ if (!('passwordSet' in value) || value['passwordSet'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function WebhookEndpointBasicAuthFromJSON(json) {
32
+ return WebhookEndpointBasicAuthFromJSONTyped(json, false);
33
+ }
34
+ function WebhookEndpointBasicAuthFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ username: json['username'],
40
+ passwordSet: json['passwordSet']
41
+ };
42
+ }
43
+ function WebhookEndpointBasicAuthToJSON(json) {
44
+ return WebhookEndpointBasicAuthToJSONTyped(json, false);
45
+ }
46
+ function WebhookEndpointBasicAuthToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ username: value['username'],
52
+ passwordSet: value['passwordSet']
53
+ };
54
+ }
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { WebhookEndpointUpsertRequestBasicAuth } from './WebhookEndpointUpsertRequestBasicAuth';
12
13
  /**
13
14
  * Request body for creating or updating an events webhook endpoint.
14
15
  * @export
@@ -16,7 +17,7 @@
16
17
  */
17
18
  export interface WebhookEndpointUpsertRequest {
18
19
  /**
19
- * Public HTTPS URL that accepts POST with a JSON event body. Return 2xx to acknowledge. Private, loopback, and link-local addresses are rejected. Requests include X-Pingram-Id, X-Pingram-Signature (v1 HMAC-SHA256), and X-Pingram-Timestamp.
20
+ * Public HTTPS URL that accepts POST with a JSON event body. Return 2xx to acknowledge. Private, loopback, and link-local addresses are rejected. Requests include X-Pingram-Id, X-Pingram-Signature (v1 HMAC-SHA256), and X-Pingram-Timestamp. A username and password in this URL are stored separately and removed from the saved URL.
20
21
  * @type {string}
21
22
  * @memberof WebhookEndpointUpsertRequest
22
23
  */
@@ -27,6 +28,12 @@ export interface WebhookEndpointUpsertRequest {
27
28
  * @memberof WebhookEndpointUpsertRequest
28
29
  */
29
30
  events: Array<WebhookEndpointUpsertRequestEventsEnum>;
31
+ /**
32
+ *
33
+ * @type {WebhookEndpointUpsertRequestBasicAuth}
34
+ * @memberof WebhookEndpointUpsertRequest
35
+ */
36
+ basicAuth?: WebhookEndpointUpsertRequestBasicAuth | null;
30
37
  }
31
38
  /**
32
39
  * @export
@@ -19,6 +19,7 @@ exports.WebhookEndpointUpsertRequestFromJSON = WebhookEndpointUpsertRequestFromJ
19
19
  exports.WebhookEndpointUpsertRequestFromJSONTyped = WebhookEndpointUpsertRequestFromJSONTyped;
20
20
  exports.WebhookEndpointUpsertRequestToJSON = WebhookEndpointUpsertRequestToJSON;
21
21
  exports.WebhookEndpointUpsertRequestToJSONTyped = WebhookEndpointUpsertRequestToJSONTyped;
22
+ const WebhookEndpointUpsertRequestBasicAuth_1 = require("./WebhookEndpointUpsertRequestBasicAuth");
22
23
  /**
23
24
  * @export
24
25
  */
@@ -68,7 +69,10 @@ function WebhookEndpointUpsertRequestFromJSONTyped(json, ignoreDiscriminator) {
68
69
  }
69
70
  return {
70
71
  webhook: json['webhook'],
71
- events: json['events']
72
+ events: json['events'],
73
+ basicAuth: json['basicAuth'] == null
74
+ ? undefined
75
+ : (0, WebhookEndpointUpsertRequestBasicAuth_1.WebhookEndpointUpsertRequestBasicAuthFromJSON)(json['basicAuth'])
72
76
  };
73
77
  }
74
78
  function WebhookEndpointUpsertRequestToJSON(json) {
@@ -80,6 +84,7 @@ function WebhookEndpointUpsertRequestToJSONTyped(value, ignoreDiscriminator = fa
80
84
  }
81
85
  return {
82
86
  webhook: value['webhook'],
83
- events: value['events']
87
+ events: value['events'],
88
+ basicAuth: (0, WebhookEndpointUpsertRequestBasicAuth_1.WebhookEndpointUpsertRequestBasicAuthToJSON)(value['basicAuth'])
84
89
  };
85
90
  }
@@ -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
+ * HTTP Basic credentials. Omit to leave stored credentials unchanged. null removes them. Do not also put credentials in the webhook URL. The password is write-only.
14
+ * @export
15
+ * @interface WebhookEndpointUpsertRequestBasicAuth
16
+ */
17
+ export interface WebhookEndpointUpsertRequestBasicAuth {
18
+ /**
19
+ * Username for the Authorization header.
20
+ * @type {string}
21
+ * @memberof WebhookEndpointUpsertRequestBasicAuth
22
+ */
23
+ username: string;
24
+ /**
25
+ * Password for the Authorization header. Required when setting basic auth. Omit on update to keep the stored password.
26
+ * @type {string}
27
+ * @memberof WebhookEndpointUpsertRequestBasicAuth
28
+ */
29
+ password?: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the WebhookEndpointUpsertRequestBasicAuth interface.
33
+ */
34
+ export declare function instanceOfWebhookEndpointUpsertRequestBasicAuth(value: object): value is WebhookEndpointUpsertRequestBasicAuth;
35
+ export declare function WebhookEndpointUpsertRequestBasicAuthFromJSON(json: any): WebhookEndpointUpsertRequestBasicAuth;
36
+ export declare function WebhookEndpointUpsertRequestBasicAuthFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebhookEndpointUpsertRequestBasicAuth;
37
+ export declare function WebhookEndpointUpsertRequestBasicAuthToJSON(json: any): WebhookEndpointUpsertRequestBasicAuth;
38
+ export declare function WebhookEndpointUpsertRequestBasicAuthToJSONTyped(value?: WebhookEndpointUpsertRequestBasicAuth | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,52 @@
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.instanceOfWebhookEndpointUpsertRequestBasicAuth = instanceOfWebhookEndpointUpsertRequestBasicAuth;
17
+ exports.WebhookEndpointUpsertRequestBasicAuthFromJSON = WebhookEndpointUpsertRequestBasicAuthFromJSON;
18
+ exports.WebhookEndpointUpsertRequestBasicAuthFromJSONTyped = WebhookEndpointUpsertRequestBasicAuthFromJSONTyped;
19
+ exports.WebhookEndpointUpsertRequestBasicAuthToJSON = WebhookEndpointUpsertRequestBasicAuthToJSON;
20
+ exports.WebhookEndpointUpsertRequestBasicAuthToJSONTyped = WebhookEndpointUpsertRequestBasicAuthToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the WebhookEndpointUpsertRequestBasicAuth interface.
23
+ */
24
+ function instanceOfWebhookEndpointUpsertRequestBasicAuth(value) {
25
+ if (!('username' in value) || value['username'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function WebhookEndpointUpsertRequestBasicAuthFromJSON(json) {
30
+ return WebhookEndpointUpsertRequestBasicAuthFromJSONTyped(json, false);
31
+ }
32
+ function WebhookEndpointUpsertRequestBasicAuthFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ username: json['username'],
38
+ password: json['password'] == null ? undefined : json['password']
39
+ };
40
+ }
41
+ function WebhookEndpointUpsertRequestBasicAuthToJSON(json) {
42
+ return WebhookEndpointUpsertRequestBasicAuthToJSONTyped(json, false);
43
+ }
44
+ function WebhookEndpointUpsertRequestBasicAuthToJSONTyped(value, ignoreDiscriminator = false) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ username: value['username'],
50
+ password: value['password']
51
+ };
52
+ }
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { WebhookEndpointBasicAuth } from './WebhookEndpointBasicAuth';
12
13
  /**
13
14
  * Destination URL that receives signed event payloads for a set of subscribed events.
14
15
  * @export
@@ -22,7 +23,7 @@ export interface WebhookEndpointsResponseEndpointsInner {
22
23
  */
23
24
  id: string;
24
25
  /**
25
- * Destination URL that receives signed JSON event payloads.
26
+ * Destination URL that receives signed JSON event payloads. Credentials are not included in this URL.
26
27
  * @type {string}
27
28
  * @memberof WebhookEndpointsResponseEndpointsInner
28
29
  */
@@ -39,6 +40,12 @@ export interface WebhookEndpointsResponseEndpointsInner {
39
40
  * @memberof WebhookEndpointsResponseEndpointsInner
40
41
  */
41
42
  secret: string;
43
+ /**
44
+ *
45
+ * @type {WebhookEndpointBasicAuth}
46
+ * @memberof WebhookEndpointsResponseEndpointsInner
47
+ */
48
+ basicAuth?: WebhookEndpointBasicAuth;
42
49
  }
43
50
  /**
44
51
  * @export
@@ -19,6 +19,7 @@ exports.WebhookEndpointsResponseEndpointsInnerFromJSON = WebhookEndpointsRespons
19
19
  exports.WebhookEndpointsResponseEndpointsInnerFromJSONTyped = WebhookEndpointsResponseEndpointsInnerFromJSONTyped;
20
20
  exports.WebhookEndpointsResponseEndpointsInnerToJSON = WebhookEndpointsResponseEndpointsInnerToJSON;
21
21
  exports.WebhookEndpointsResponseEndpointsInnerToJSONTyped = WebhookEndpointsResponseEndpointsInnerToJSONTyped;
22
+ const WebhookEndpointBasicAuth_1 = require("./WebhookEndpointBasicAuth");
22
23
  /**
23
24
  * @export
24
25
  */
@@ -74,7 +75,10 @@ function WebhookEndpointsResponseEndpointsInnerFromJSONTyped(json, ignoreDiscrim
74
75
  id: json['id'],
75
76
  webhook: json['webhook'],
76
77
  events: json['events'],
77
- secret: json['secret']
78
+ secret: json['secret'],
79
+ basicAuth: json['basicAuth'] == null
80
+ ? undefined
81
+ : (0, WebhookEndpointBasicAuth_1.WebhookEndpointBasicAuthFromJSON)(json['basicAuth'])
78
82
  };
79
83
  }
80
84
  function WebhookEndpointsResponseEndpointsInnerToJSON(json) {
@@ -88,6 +92,7 @@ function WebhookEndpointsResponseEndpointsInnerToJSONTyped(value, ignoreDiscrimi
88
92
  id: value['id'],
89
93
  webhook: value['webhook'],
90
94
  events: value['events'],
91
- secret: value['secret']
95
+ secret: value['secret'],
96
+ basicAuth: (0, WebhookEndpointBasicAuth_1.WebhookEndpointBasicAuthToJSON)(value['basicAuth'])
92
97
  };
93
98
  }
@@ -347,7 +347,9 @@ export * from './VoiceCallRequest';
347
347
  export * from './VoiceCallResponse';
348
348
  export * from './Weather';
349
349
  export * from './WebhookEndpoint';
350
+ export * from './WebhookEndpointBasicAuth';
350
351
  export * from './WebhookEndpointUpsertRequest';
352
+ export * from './WebhookEndpointUpsertRequestBasicAuth';
351
353
  export * from './WebhookEndpointsResponse';
352
354
  export * from './WebhookEndpointsResponseEndpointsInner';
353
355
  export * from './WebhookEvent';
@@ -365,7 +365,9 @@ __exportStar(require("./VoiceCallRequest"), exports);
365
365
  __exportStar(require("./VoiceCallResponse"), exports);
366
366
  __exportStar(require("./Weather"), exports);
367
367
  __exportStar(require("./WebhookEndpoint"), exports);
368
+ __exportStar(require("./WebhookEndpointBasicAuth"), exports);
368
369
  __exportStar(require("./WebhookEndpointUpsertRequest"), exports);
370
+ __exportStar(require("./WebhookEndpointUpsertRequestBasicAuth"), exports);
369
371
  __exportStar(require("./WebhookEndpointsResponse"), exports);
370
372
  __exportStar(require("./WebhookEndpointsResponseEndpointsInner"), exports);
371
373
  __exportStar(require("./WebhookEvent"), exports);
@@ -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.40';
11
+ const SDK_VERSION = '1.0.41';
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pingram",
3
- "version": "1.0.40-alpha.1722",
3
+ "version": "1.0.41-alpha.1723",
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",