pingram 1.0.34-alpha.1565 → 1.0.34-alpha.1567

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.
33
+ * @summary Create a webhook endpoint. Pingram POSTs signed JSON to the URL when one of the subscribed events happens. 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 http or https and should return 2xx.
34
34
  * @param {WebhookEndpointUpsertRequest} webhookEndpointUpsertRequest
35
35
  * @param {*} [options] Override http request option.
36
36
  * @throws {RequiredError}
@@ -38,38 +38,38 @@ export interface WebhooksApiInterface {
38
38
  */
39
39
  createWebhookRaw(requestParameters: CreateWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhookEndpoint>>;
40
40
  /**
41
- * Create a webhook.
41
+ * Create a webhook endpoint. Pingram POSTs signed JSON to the URL when one of the subscribed events happens. 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 http or https and should return 2xx.
42
42
  */
43
43
  createWebhook(webhookEndpointUpsertRequest: WebhookEndpointUpsertRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookEndpoint>;
44
44
  /**
45
45
  *
46
- * @summary Delete a webhook.
47
- * @param {string} endpointId Webhook endpoint id
46
+ * @summary Delete one webhook endpoint by id from list or create. That URL stops receiving its events. Other endpoints on the account are left as they are.
47
+ * @param {string} endpointId Id of the webhook endpoint, from list or create.
48
48
  * @param {*} [options] Override http request option.
49
49
  * @throws {RequiredError}
50
50
  * @memberof WebhooksApiInterface
51
51
  */
52
52
  deleteWebhookRaw(requestParameters: DeleteWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
53
53
  /**
54
- * Delete a webhook.
54
+ * Delete one webhook endpoint by id from list or create. That URL stops receiving its events. Other endpoints on the account are left as they are.
55
55
  */
56
56
  deleteWebhook(endpointId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
57
57
  /**
58
58
  *
59
- * @summary List webhooks for the current account.
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.
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 webhooks for the current account.
66
+ * List webhook endpoints on the current account, including each id, URL, subscribed events, and signing secret. Use the id with update or delete.
67
67
  */
68
68
  listWebhooks(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookEndpointsResponse>;
69
69
  /**
70
70
  *
71
- * @summary Update a webhook. The signing secret is preserved.
72
- * @param {string} endpointId Webhook endpoint id
71
+ * @summary Replace one webhook endpoint\'s URL and its full event subscription. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it. The URL must be http or https.
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.
75
75
  * @throws {RequiredError}
@@ -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
- * Update a webhook. The signing secret is preserved.
80
+ * Replace one webhook endpoint\'s URL and its full event subscription. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it. The URL must be http or https.
81
81
  */
82
82
  updateWebhook(endpointId: string, webhookEndpointUpsertRequest: WebhookEndpointUpsertRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookEndpoint>;
83
83
  }
@@ -86,35 +86,35 @@ export interface WebhooksApiInterface {
86
86
  */
87
87
  export declare class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface {
88
88
  /**
89
- * Create a webhook.
89
+ * Create a webhook endpoint. Pingram POSTs signed JSON to the URL when one of the subscribed events happens. 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 http or https and should return 2xx.
90
90
  */
91
91
  createWebhookRaw(requestParameters: CreateWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhookEndpoint>>;
92
92
  /**
93
- * Create a webhook.
93
+ * Create a webhook endpoint. Pingram POSTs signed JSON to the URL when one of the subscribed events happens. 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 http or https and should return 2xx.
94
94
  */
95
95
  createWebhook(webhookEndpointUpsertRequest: WebhookEndpointUpsertRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookEndpoint>;
96
96
  /**
97
- * Delete a webhook.
97
+ * Delete one webhook endpoint by id from list or create. That URL stops receiving its events. Other endpoints on the account are left as they are.
98
98
  */
99
99
  deleteWebhookRaw(requestParameters: DeleteWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
100
100
  /**
101
- * Delete a webhook.
101
+ * Delete one webhook endpoint by id from list or create. That URL stops receiving its events. Other endpoints on the account are left as they are.
102
102
  */
103
103
  deleteWebhook(endpointId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
104
104
  /**
105
- * List webhooks for the current account.
105
+ * List webhook endpoints on the current account, including each id, URL, subscribed events, and signing secret. Use the id with update or delete.
106
106
  */
107
107
  listWebhooksRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhookEndpointsResponse>>;
108
108
  /**
109
- * List webhooks for the current account.
109
+ * List webhook endpoints on the current account, including each id, URL, subscribed events, and signing secret. Use the id with update or delete.
110
110
  */
111
111
  listWebhooks(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookEndpointsResponse>;
112
112
  /**
113
- * Update a webhook. The signing secret is preserved.
113
+ * Replace one webhook endpoint\'s URL and its full event subscription. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it. The URL must be http or https.
114
114
  */
115
115
  updateWebhookRaw(requestParameters: UpdateWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhookEndpoint>>;
116
116
  /**
117
- * Update a webhook. The signing secret is preserved.
117
+ * Replace one webhook endpoint\'s URL and its full event subscription. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it. The URL must be http or https.
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.
57
+ * Create a webhook endpoint. Pingram POSTs signed JSON to the URL when one of the subscribed events happens. 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 http or https and should return 2xx.
58
58
  */
59
59
  async createWebhookRaw(requestParameters, initOverrides) {
60
60
  if (requestParameters['webhookEndpointUpsertRequest'] == null) {
@@ -102,14 +102,14 @@ 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.
105
+ * Create a webhook endpoint. Pingram POSTs signed JSON to the URL when one of the subscribed events happens. 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 http or https and should return 2xx.
106
106
  */
107
107
  async createWebhook(webhookEndpointUpsertRequest, initOverrides) {
108
108
  const response = await this.createWebhookRaw({ webhookEndpointUpsertRequest: webhookEndpointUpsertRequest }, initOverrides);
109
109
  return await response.value();
110
110
  }
111
111
  /**
112
- * Delete a webhook.
112
+ * Delete one webhook endpoint by id from list or create. That URL stops receiving its events. Other endpoints on the account are left as they are.
113
113
  */
114
114
  async deleteWebhookRaw(requestParameters, initOverrides) {
115
115
  if (requestParameters['endpointId'] == null) {
@@ -156,13 +156,13 @@ class WebhooksApi extends runtime.BaseAPI {
156
156
  return new runtime.VoidApiResponse(response);
157
157
  }
158
158
  /**
159
- * Delete a webhook.
159
+ * Delete one webhook endpoint by id from list or create. That URL stops receiving its events. Other endpoints on the account are left as they are.
160
160
  */
161
161
  async deleteWebhook(endpointId, initOverrides) {
162
162
  await this.deleteWebhookRaw({ endpointId: endpointId }, initOverrides);
163
163
  }
164
164
  /**
165
- * List webhooks for the current account.
165
+ * List webhook endpoints on the current account, including each id, URL, subscribed events, and signing secret. 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 webhooks for the current account.
208
+ * List webhook endpoints on the current account, including each id, URL, subscribed events, and signing secret. 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
- * Update a webhook. The signing secret is preserved.
215
+ * Replace one webhook endpoint\'s URL and its full event subscription. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it. The URL must be http or https.
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
- * Update a webhook. The signing secret is preserved.
267
+ * Replace one webhook endpoint\'s URL and its full event subscription. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it. The URL must be http or https.
268
268
  */
269
269
  async updateWebhook(endpointId, webhookEndpointUpsertRequest, initOverrides) {
270
270
  const response = await this.updateWebhookRaw({
@@ -22,19 +22,19 @@ export interface WebhookEndpoint {
22
22
  */
23
23
  id: string;
24
24
  /**
25
- * Destination URL that receives webhook event payloads.
25
+ * Destination URL that receives signed JSON event payloads.
26
26
  * @type {string}
27
27
  * @memberof WebhookEndpoint
28
28
  */
29
29
  webhook: string;
30
30
  /**
31
- * List of subscribed event types for this endpoint.
31
+ * Subscribed event types for this endpoint.
32
32
  * @type {Array<string>}
33
33
  * @memberof WebhookEndpoint
34
34
  */
35
35
  events: Array<WebhookEndpointEventsEnum>;
36
36
  /**
37
- * HMAC secret for verifying webhook signatures. Use this with your X-Pingram-Signature verification.
37
+ * HMAC secret for verifying X-Pingram-Signature. Returned on create and list; updates keep the same secret. Format: pingram_whsecret_...
38
38
  * @type {string}
39
39
  * @memberof WebhookEndpoint
40
40
  */
@@ -16,13 +16,13 @@
16
16
  */
17
17
  export interface WebhookEndpointUpsertRequest {
18
18
  /**
19
- * Destination URL that receives webhook event payloads. Must be a valid http(s) URL.
19
+ * Public http or https URL that accepts POST with a JSON event body. Return 2xx to acknowledge. Requests include X-Pingram-Id, X-Pingram-Signature (v1 HMAC-SHA256), and X-Pingram-Timestamp.
20
20
  * @type {string}
21
21
  * @memberof WebhookEndpointUpsertRequest
22
22
  */
23
23
  webhook: string;
24
24
  /**
25
- * List of event types that should be forwarded to the webhook URL.
25
+ * Full set of event types to deliver to this URL. Omitting an event on update unsubscribes it. Inbound SMS to the free shared number only works when that person has already received a text from this number. Inbound SMS to a dedicated number works normally.
26
26
  * @type {Array<string>}
27
27
  * @memberof WebhookEndpointUpsertRequest
28
28
  */
@@ -22,19 +22,19 @@ export interface WebhookEndpointsResponseEndpointsInner {
22
22
  */
23
23
  id: string;
24
24
  /**
25
- * Destination URL that receives webhook event payloads.
25
+ * Destination URL that receives signed JSON event payloads.
26
26
  * @type {string}
27
27
  * @memberof WebhookEndpointsResponseEndpointsInner
28
28
  */
29
29
  webhook: string;
30
30
  /**
31
- * List of subscribed event types for this endpoint.
31
+ * Subscribed event types for this endpoint.
32
32
  * @type {Array<string>}
33
33
  * @memberof WebhookEndpointsResponseEndpointsInner
34
34
  */
35
35
  events: Array<WebhookEndpointsResponseEndpointsInnerEventsEnum>;
36
36
  /**
37
- * HMAC secret for verifying webhook signatures. Use this with your X-Pingram-Signature verification.
37
+ * HMAC secret for verifying X-Pingram-Signature. Returned on create and list; updates keep the same secret. Format: pingram_whsecret_...
38
38
  * @type {string}
39
39
  * @memberof WebhookEndpointsResponseEndpointsInner
40
40
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pingram",
3
- "version": "1.0.34-alpha.1565",
3
+ "version": "1.0.34-alpha.1567",
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",