pingram 1.0.37-alpha.1620 → 1.0.37-alpha.1622

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.
@@ -29,7 +29,7 @@ export interface ListRequest {
29
29
  export interface LibraryApiInterface {
30
30
  /**
31
31
  *
32
- * @summary Create an upload slot in the account library. PUT the file to the returned uploadUrl with the same Content-Type, then use the returned url in emails and the editor.
32
+ * @summary Create an upload slot in the account library. contentType must be image/png, image/jpeg, image/gif, or image/webp. PUT the file to the returned uploadUrl with that Content-Type, then use the returned url in emails and the editor.
33
33
  * @param {string} useCase Library use-case
34
34
  * @param {CreateLibraryRequest} createLibraryRequest
35
35
  * @param {*} [options] Override http request option.
@@ -38,7 +38,7 @@ export interface LibraryApiInterface {
38
38
  */
39
39
  createRaw(requestParameters: CreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateLibraryResponse>>;
40
40
  /**
41
- * Create an upload slot in the account library. PUT the file to the returned uploadUrl with the same Content-Type, then use the returned url in emails and the editor.
41
+ * Create an upload slot in the account library. contentType must be image/png, image/jpeg, image/gif, or image/webp. PUT the file to the returned uploadUrl with that Content-Type, then use the returned url in emails and the editor.
42
42
  */
43
43
  create(useCase: string, createLibraryRequest: CreateLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateLibraryResponse>;
44
44
  /**
@@ -62,11 +62,11 @@ export interface LibraryApiInterface {
62
62
  */
63
63
  export declare class LibraryApi extends runtime.BaseAPI implements LibraryApiInterface {
64
64
  /**
65
- * Create an upload slot in the account library. PUT the file to the returned uploadUrl with the same Content-Type, then use the returned url in emails and the editor.
65
+ * Create an upload slot in the account library. contentType must be image/png, image/jpeg, image/gif, or image/webp. PUT the file to the returned uploadUrl with that Content-Type, then use the returned url in emails and the editor.
66
66
  */
67
67
  createRaw(requestParameters: CreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateLibraryResponse>>;
68
68
  /**
69
- * Create an upload slot in the account library. PUT the file to the returned uploadUrl with the same Content-Type, then use the returned url in emails and the editor.
69
+ * Create an upload slot in the account library. contentType must be image/png, image/jpeg, image/gif, or image/webp. PUT the file to the returned uploadUrl with that Content-Type, then use the returned url in emails and the editor.
70
70
  */
71
71
  create(useCase: string, createLibraryRequest: CreateLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateLibraryResponse>;
72
72
  /**
@@ -54,7 +54,7 @@ const index_1 = require("../models/index");
54
54
  */
55
55
  class LibraryApi extends runtime.BaseAPI {
56
56
  /**
57
- * Create an upload slot in the account library. PUT the file to the returned uploadUrl with the same Content-Type, then use the returned url in emails and the editor.
57
+ * Create an upload slot in the account library. contentType must be image/png, image/jpeg, image/gif, or image/webp. PUT the file to the returned uploadUrl with that Content-Type, then use the returned url in emails and the editor.
58
58
  */
59
59
  async createRaw(requestParameters, initOverrides) {
60
60
  if (requestParameters['useCase'] == null) {
@@ -106,7 +106,7 @@ class LibraryApi extends runtime.BaseAPI {
106
106
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CreateLibraryResponseFromJSON)(jsonValue));
107
107
  }
108
108
  /**
109
- * Create an upload slot in the account library. PUT the file to the returned uploadUrl with the same Content-Type, then use the returned url in emails and the editor.
109
+ * Create an upload slot in the account library. contentType must be image/png, image/jpeg, image/gif, or image/webp. PUT the file to the returned uploadUrl with that Content-Type, then use the returned url in emails and the editor.
110
110
  */
111
111
  async create(useCase, createLibraryRequest, initOverrides) {
112
112
  const response = await this.createRaw({ useCase: useCase, createLibraryRequest: createLibraryRequest }, initOverrides);
@@ -30,7 +30,7 @@ export interface UpdateWebhookRequest {
30
30
  export interface WebhooksApiInterface {
31
31
  /**
32
32
  *
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.
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 a public HTTPS URL and should return 2xx.
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. 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.
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 a public HTTPS URL and should return 2xx.
42
42
  */
43
43
  createWebhook(webhookEndpointUpsertRequest: WebhookEndpointUpsertRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookEndpoint>;
44
44
  /**
@@ -68,7 +68,7 @@ export interface WebhooksApiInterface {
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. 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.
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 a public HTTPS URL.
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. 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.
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 a public HTTPS URL.
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. 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.
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 a public HTTPS URL 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 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.
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 a public HTTPS URL and should return 2xx.
94
94
  */
95
95
  createWebhook(webhookEndpointUpsertRequest: WebhookEndpointUpsertRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookEndpoint>;
96
96
  /**
@@ -110,11 +110,11 @@ export declare class WebhooksApi extends runtime.BaseAPI implements WebhooksApiI
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. 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.
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 a public HTTPS URL.
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. 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.
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 a public HTTPS URL.
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. 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.
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 a public HTTPS URL and should return 2xx.
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. 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.
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 a public HTTPS URL and should return 2xx.
106
106
  */
107
107
  async createWebhook(webhookEndpointUpsertRequest, initOverrides) {
108
108
  const response = await this.createWebhookRaw({ webhookEndpointUpsertRequest: webhookEndpointUpsertRequest }, initOverrides);
@@ -212,7 +212,7 @@ class WebhooksApi extends runtime.BaseAPI {
212
212
  return await response.value();
213
213
  }
214
214
  /**
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.
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 a public HTTPS URL.
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. 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.
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 a public HTTPS URL.
268
268
  */
269
269
  async updateWebhook(endpointId, webhookEndpointUpsertRequest, initOverrides) {
270
270
  const response = await this.updateWebhookRaw({
@@ -22,7 +22,7 @@ export interface CreateLibraryRequest {
22
22
  */
23
23
  filename: string;
24
24
  /**
25
- * MIME type of the file that will be uploaded to the returned URL.
25
+ * Image MIME type. One of image/png, image/jpeg, image/gif, or image/webp.
26
26
  * @type {string}
27
27
  * @memberof CreateLibraryRequest
28
28
  */
@@ -16,7 +16,7 @@
16
16
  */
17
17
  export interface WebhookEndpointUpsertRequest {
18
18
  /**
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.
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
20
  * @type {string}
21
21
  * @memberof WebhookEndpointUpsertRequest
22
22
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pingram",
3
- "version": "1.0.37-alpha.1620",
3
+ "version": "1.0.37-alpha.1622",
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",