pingram 1.0.37-alpha.1618 → 1.0.37

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.
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { GetLogsResponse, LogQueryPostBody, LogsGetResponse, LogsQueryResponse, LogsQueryResultResponse, LogsRetentionResponse, LogsTailResponse, MessageResponse } from '../models/index';
13
+ import type { GetLogsResponse, LogQueryPostBody, LogsGetResponse, LogsQueryResponse, LogsQueryResultResponse, LogsRetentionResponse, LogsTailResponse } from '../models/index';
14
14
  export interface GetLogsRequest {
15
15
  limit?: number;
16
16
  cursor?: string;
@@ -21,9 +21,6 @@ export interface GetLogsByTrackingIdsRequest {
21
21
  export interface GetLogsQueryResultRequest {
22
22
  queryId: string;
23
23
  }
24
- export interface RetryInboundRequest {
25
- trackingId: string;
26
- }
27
24
  export interface StartLogsQueryRequest {
28
25
  logQueryPostBody: LogQueryPostBody;
29
26
  }
@@ -86,19 +83,6 @@ export interface LogsApiInterface {
86
83
  * Get results from a log query started with Start Log Query. Poll until status is Complete.
87
84
  */
88
85
  getLogsQueryResult(queryId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LogsQueryResultResponse>;
89
- /**
90
- *
91
- * @summary Resend the EMAIL_INBOUND webhook for one inbound email. Uses the original tracking ID and does not count another email. Refused when the message is older than 30 days.
92
- * @param {string} trackingId Tracking ID of the inbound email
93
- * @param {*} [options] Override http request option.
94
- * @throws {RequiredError}
95
- * @memberof LogsApiInterface
96
- */
97
- retryInboundRaw(requestParameters: RetryInboundRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MessageResponse>>;
98
- /**
99
- * Resend the EMAIL_INBOUND webhook for one inbound email. Uses the original tracking ID and does not count another email. Refused when the message is older than 30 days.
100
- */
101
- retryInbound(trackingId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MessageResponse>;
102
86
  /**
103
87
  *
104
88
  * @summary Start an asynchronous log search over a date range. Returns a `queryId`; poll with Get Log Query Results until status is Complete.
@@ -161,14 +145,6 @@ export declare class LogsApi extends runtime.BaseAPI implements LogsApiInterface
161
145
  * Get results from a log query started with Start Log Query. Poll until status is Complete.
162
146
  */
163
147
  getLogsQueryResult(queryId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LogsQueryResultResponse>;
164
- /**
165
- * Resend the EMAIL_INBOUND webhook for one inbound email. Uses the original tracking ID and does not count another email. Refused when the message is older than 30 days.
166
- */
167
- retryInboundRaw(requestParameters: RetryInboundRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MessageResponse>>;
168
- /**
169
- * Resend the EMAIL_INBOUND webhook for one inbound email. Uses the original tracking ID and does not count another email. Refused when the message is older than 30 days.
170
- */
171
- retryInbound(trackingId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MessageResponse>;
172
148
  /**
173
149
  * Start an asynchronous log search over a date range. Returns a `queryId`; poll with Get Log Query Results until status is Complete.
174
150
  */
@@ -267,60 +267,6 @@ class LogsApi extends runtime.BaseAPI {
267
267
  const response = await this.getLogsQueryResultRaw({ queryId: queryId }, initOverrides);
268
268
  return await response.value();
269
269
  }
270
- /**
271
- * Resend the EMAIL_INBOUND webhook for one inbound email. Uses the original tracking ID and does not count another email. Refused when the message is older than 30 days.
272
- */
273
- async retryInboundRaw(requestParameters, initOverrides) {
274
- if (requestParameters['trackingId'] == null) {
275
- throw new runtime.RequiredError('trackingId', 'Required parameter "trackingId" was null or undefined when calling retryInbound().');
276
- }
277
- const queryParameters = {};
278
- const headerParameters = {};
279
- if (this.configuration &&
280
- (this.configuration.username !== undefined ||
281
- this.configuration.password !== undefined)) {
282
- headerParameters['Authorization'] =
283
- 'Basic ' +
284
- btoa(this.configuration.username + ':' + this.configuration.password);
285
- }
286
- if (this.configuration &&
287
- (this.configuration.username !== undefined ||
288
- this.configuration.password !== undefined)) {
289
- headerParameters['Authorization'] =
290
- 'Basic ' +
291
- btoa(this.configuration.username + ':' + this.configuration.password);
292
- }
293
- if (this.configuration && this.configuration.accessToken) {
294
- const token = this.configuration.accessToken;
295
- const tokenString = await token('apiKey', []);
296
- if (tokenString) {
297
- headerParameters['Authorization'] = `Bearer ${tokenString}`;
298
- }
299
- }
300
- if (this.configuration &&
301
- (this.configuration.username !== undefined ||
302
- this.configuration.password !== undefined)) {
303
- headerParameters['Authorization'] =
304
- 'Basic ' +
305
- btoa(this.configuration.username + ':' + this.configuration.password);
306
- }
307
- let urlPath = `/logs/retry/{trackingId}`;
308
- urlPath = urlPath.replace(`{${'trackingId'}}`, encodeURIComponent(String(requestParameters['trackingId'])));
309
- const response = await this.request({
310
- path: urlPath,
311
- method: 'POST',
312
- headers: headerParameters,
313
- query: queryParameters
314
- }, initOverrides);
315
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.MessageResponseFromJSON)(jsonValue));
316
- }
317
- /**
318
- * Resend the EMAIL_INBOUND webhook for one inbound email. Uses the original tracking ID and does not count another email. Refused when the message is older than 30 days.
319
- */
320
- async retryInbound(trackingId, initOverrides) {
321
- const response = await this.retryInboundRaw({ trackingId: trackingId }, initOverrides);
322
- return await response.value();
323
- }
324
270
  /**
325
271
  * Start an asynchronous log search over a date range. Returns a `queryId`; poll with Get Log Query Results until status is Complete.
326
272
  */
@@ -30,7 +30,7 @@ export type { CreateAPIKeyRequest, RevokeAPIKeyRequest, KeysApiInterface } from
30
30
  export { KeysApi } from './KeysApi';
31
31
  export type { CreateRequest as LibraryApi_CreateRequest, ListRequest as LibraryApi_ListRequest, LibraryApiInterface } from './LibraryApi';
32
32
  export { LibraryApi } from './LibraryApi';
33
- export type { GetLogsRequest, GetLogsByTrackingIdsRequest, GetLogsQueryResultRequest, RetryInboundRequest, StartLogsQueryRequest, LogsApiInterface } from './LogsApi';
33
+ export type { GetLogsRequest, GetLogsByTrackingIdsRequest, GetLogsQueryResultRequest, StartLogsQueryRequest, LogsApiInterface } from './LogsApi';
34
34
  export { LogsApi } from './LogsApi';
35
35
  export type { GetAutoJoinRequest, InviteMemberRequest, ListMembersRequest, RemoveMemberRequest, SetAutoJoinRequest, UpdateRequest as MembersApi_UpdateRequest, MembersApiInterface } from './MembersApi';
36
36
  export { MembersApi } from './MembersApi';
@@ -42,7 +42,7 @@ export interface GetLogsResponseMessagesInner {
42
42
  */
43
43
  epochMs: number;
44
44
  /**
45
- * Address that received the mail. Same value as `matched.email` on the EMAIL_INBOUND webhook, including when that address was only in Cc or Bcc.
45
+ *
46
46
  * @type {string}
47
47
  * @memberof GetLogsResponseMessagesInner
48
48
  */
@@ -66,19 +66,19 @@ export interface GetLogsResponseMessagesInner {
66
66
  */
67
67
  subject?: string;
68
68
  /**
69
- * Original To header addresses. Not the address that received the mail.
69
+ *
70
70
  * @type {Array<string>}
71
71
  * @memberof GetLogsResponseMessagesInner
72
72
  */
73
73
  to?: Array<string>;
74
74
  /**
75
- * Original Cc header addresses.
75
+ *
76
76
  * @type {Array<string>}
77
77
  * @memberof GetLogsResponseMessagesInner
78
78
  */
79
79
  cc?: Array<string>;
80
80
  /**
81
- * Bcc header addresses still on the delivered message. Usually omitted, because the Bcc header is removed before delivery.
81
+ *
82
82
  * @type {Array<string>}
83
83
  * @memberof GetLogsResponseMessagesInner
84
84
  */
@@ -16,43 +16,29 @@
16
16
  */
17
17
  export interface GetLogsResponseMessagesInnerAttachmentsInner {
18
18
  /**
19
- * Original filename from the message.
19
+ *
20
20
  * @type {string}
21
21
  * @memberof GetLogsResponseMessagesInnerAttachmentsInner
22
22
  */
23
23
  filename: string;
24
24
  /**
25
- * MIME type of the file.
25
+ *
26
26
  * @type {string}
27
27
  * @memberof GetLogsResponseMessagesInnerAttachmentsInner
28
28
  */
29
29
  contentType: string;
30
30
  /**
31
- * Size in bytes. This response does not include the file bytes.
31
+ *
32
32
  * @type {number}
33
33
  * @memberof GetLogsResponseMessagesInnerAttachmentsInner
34
34
  */
35
35
  size: number;
36
36
  /**
37
- * Content-ID with angle brackets removed, so it matches `cid:` references in `bodyHtml`. Omitted when the part has no Content-ID.
37
+ *
38
38
  * @type {string}
39
39
  * @memberof GetLogsResponseMessagesInnerAttachmentsInner
40
40
  */
41
41
  contentId?: string;
42
- /**
43
- * `inline` when the HTML body references this file; `attachment` when it is a separate file. Omitted when the message does not say which.
44
- * @type {string}
45
- * @memberof GetLogsResponseMessagesInnerAttachmentsInner
46
- */
47
- contentDisposition?: GetLogsResponseMessagesInnerAttachmentsInnerContentDispositionEnum;
48
- }
49
- /**
50
- * @export
51
- * @enum {string}
52
- */
53
- export declare enum GetLogsResponseMessagesInnerAttachmentsInnerContentDispositionEnum {
54
- INLINE = "inline",
55
- ATTACHMENT = "attachment"
56
42
  }
57
43
  /**
58
44
  * Check if a given object implements the GetLogsResponseMessagesInnerAttachmentsInner interface.
@@ -13,21 +13,11 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.GetLogsResponseMessagesInnerAttachmentsInnerContentDispositionEnum = void 0;
17
16
  exports.instanceOfGetLogsResponseMessagesInnerAttachmentsInner = instanceOfGetLogsResponseMessagesInnerAttachmentsInner;
18
17
  exports.GetLogsResponseMessagesInnerAttachmentsInnerFromJSON = GetLogsResponseMessagesInnerAttachmentsInnerFromJSON;
19
18
  exports.GetLogsResponseMessagesInnerAttachmentsInnerFromJSONTyped = GetLogsResponseMessagesInnerAttachmentsInnerFromJSONTyped;
20
19
  exports.GetLogsResponseMessagesInnerAttachmentsInnerToJSON = GetLogsResponseMessagesInnerAttachmentsInnerToJSON;
21
20
  exports.GetLogsResponseMessagesInnerAttachmentsInnerToJSONTyped = GetLogsResponseMessagesInnerAttachmentsInnerToJSONTyped;
22
- /**
23
- * @export
24
- * @enum {string}
25
- */
26
- var GetLogsResponseMessagesInnerAttachmentsInnerContentDispositionEnum;
27
- (function (GetLogsResponseMessagesInnerAttachmentsInnerContentDispositionEnum) {
28
- GetLogsResponseMessagesInnerAttachmentsInnerContentDispositionEnum["INLINE"] = "inline";
29
- GetLogsResponseMessagesInnerAttachmentsInnerContentDispositionEnum["ATTACHMENT"] = "attachment";
30
- })(GetLogsResponseMessagesInnerAttachmentsInnerContentDispositionEnum || (exports.GetLogsResponseMessagesInnerAttachmentsInnerContentDispositionEnum = GetLogsResponseMessagesInnerAttachmentsInnerContentDispositionEnum = {}));
31
21
  /**
32
22
  * Check if a given object implements the GetLogsResponseMessagesInnerAttachmentsInner interface.
33
23
  */
@@ -51,10 +41,7 @@ function GetLogsResponseMessagesInnerAttachmentsInnerFromJSONTyped(json, ignoreD
51
41
  filename: json['filename'],
52
42
  contentType: json['contentType'],
53
43
  size: json['size'],
54
- contentId: json['contentId'] == null ? undefined : json['contentId'],
55
- contentDisposition: json['contentDisposition'] == null
56
- ? undefined
57
- : json['contentDisposition']
44
+ contentId: json['contentId'] == null ? undefined : json['contentId']
58
45
  };
59
46
  }
60
47
  function GetLogsResponseMessagesInnerAttachmentsInnerToJSON(json) {
@@ -68,7 +55,6 @@ function GetLogsResponseMessagesInnerAttachmentsInnerToJSONTyped(value, ignoreDi
68
55
  filename: value['filename'],
69
56
  contentType: value['contentType'],
70
57
  size: value['size'],
71
- contentId: value['contentId'],
72
- contentDisposition: value['contentDisposition']
58
+ contentId: value['contentId']
73
59
  };
74
60
  }
@@ -334,139 +334,115 @@ export interface LogsGetResponseLogsInner {
334
334
  */
335
335
  email_clicked_webhook_res?: string;
336
336
  /**
337
- * When the message was accepted, ISO 8601. Log order and the 30-day resend window use this time.
337
+ *
338
338
  * @type {string}
339
339
  * @memberof LogsGetResponseLogsInner
340
340
  */
341
341
  email_inbound_at?: string;
342
342
  /**
343
- * Sender email address.
343
+ *
344
344
  * @type {string}
345
345
  * @memberof LogsGetResponseLogsInner
346
346
  */
347
347
  email_inbound_from?: string;
348
348
  /**
349
- * Sender display name, when the From header includes one.
349
+ *
350
350
  * @type {string}
351
351
  * @memberof LogsGetResponseLogsInner
352
352
  */
353
353
  email_inbound_from_name?: string;
354
354
  /**
355
- * Comma-separated To header addresses. This is the header, not necessarily the Pingram inbox.
355
+ *
356
356
  * @type {string}
357
357
  * @memberof LogsGetResponseLogsInner
358
358
  */
359
359
  email_inbound_to?: string;
360
360
  /**
361
- * Comma-separated CC header addresses.
361
+ *
362
362
  * @type {string}
363
363
  * @memberof LogsGetResponseLogsInner
364
364
  */
365
365
  email_inbound_cc?: string;
366
366
  /**
367
- * Comma-separated BCC header addresses. Often empty because that header is stripped before delivery.
367
+ *
368
368
  * @type {string}
369
369
  * @memberof LogsGetResponseLogsInner
370
370
  */
371
371
  email_inbound_bcc?: string;
372
372
  /**
373
- * Reply-To header address.
373
+ *
374
374
  * @type {string}
375
375
  * @memberof LogsGetResponseLogsInner
376
376
  */
377
377
  email_inbound_reply_to?: string;
378
378
  /**
379
- * Address that received the mail. Same value as `matched.email` on the EMAIL_INBOUND webhook, including when that address was only in Cc or Bcc.
379
+ *
380
380
  * @type {string}
381
381
  * @memberof LogsGetResponseLogsInner
382
382
  */
383
383
  email_inbound_inbox?: string;
384
384
  /**
385
- * Display name of `email_inbound_inbox` when the headers include one. Same value as `matched.name`. Omitted when that address has no display name.
386
- * @type {string}
387
- * @memberof LogsGetResponseLogsInner
388
- */
389
- email_inbound_to_name?: string;
390
- /**
391
- * Sender Date header, ISO 8601. Omitted when that header is missing or invalid.
392
- * @type {string}
393
- * @memberof LogsGetResponseLogsInner
394
- */
395
- email_inbound_sent_at?: string;
396
- /**
397
- * Key used to resend this inbound email for 30 days.
398
- * @type {string}
399
- * @memberof LogsGetResponseLogsInner
400
- */
401
- email_inbound_retry_key?: string;
402
- /**
403
- * User id from the original notification when this mail is a reply to one.
404
- * @type {string}
405
- * @memberof LogsGetResponseLogsInner
406
- */
407
- email_inbound_user_id?: string;
408
- /**
409
- * Subject line.
385
+ *
410
386
  * @type {string}
411
387
  * @memberof LogsGetResponseLogsInner
412
388
  */
413
389
  email_inbound_subject?: string;
414
390
  /**
415
- * Plain-text body.
391
+ *
416
392
  * @type {string}
417
393
  * @memberof LogsGetResponseLogsInner
418
394
  */
419
395
  email_inbound_body_text?: string;
420
396
  /**
421
- * HTML body. Inline images use `cid:` values that match attachment content IDs on the webhook payload.
397
+ *
422
398
  * @type {string}
423
399
  * @memberof LogsGetResponseLogsInner
424
400
  */
425
401
  email_inbound_body_html?: string;
426
402
  /**
427
- * True when the message includes at least one attachment.
403
+ *
428
404
  * @type {boolean}
429
405
  * @memberof LogsGetResponseLogsInner
430
406
  */
431
407
  email_inbound_has_attachments?: boolean;
432
408
  /**
433
- * Number of attachments. File bytes are not stored on this log.
409
+ *
434
410
  * @type {number}
435
411
  * @memberof LogsGetResponseLogsInner
436
412
  */
437
413
  email_inbound_attachment_count?: number;
438
414
  /**
439
- * Message-ID header. Use it to thread later replies.
415
+ *
440
416
  * @type {string}
441
417
  * @memberof LogsGetResponseLogsInner
442
418
  */
443
419
  email_inbound_message_id?: string;
444
420
  /**
445
- * In-Reply-To header: the Message-ID this mail replies to.
421
+ *
446
422
  * @type {string}
447
423
  * @memberof LogsGetResponseLogsInner
448
424
  */
449
425
  email_inbound_in_reply_to?: string;
450
426
  /**
451
- * References header: the chain of Message-IDs in the thread.
427
+ *
452
428
  * @type {string}
453
429
  * @memberof LogsGetResponseLogsInner
454
430
  */
455
431
  email_inbound_references?: string;
456
432
  /**
457
- * True when an EMAIL_INBOUND webhook endpoint returned a 2xx response.
433
+ *
458
434
  * @type {boolean}
459
435
  * @memberof LogsGetResponseLogsInner
460
436
  */
461
437
  email_inbound_webhook_delivered?: boolean;
462
438
  /**
463
- * JSON delivery result for each EMAIL_INBOUND endpoint.
439
+ *
464
440
  * @type {string}
465
441
  * @memberof LogsGetResponseLogsInner
466
442
  */
467
443
  email_inbound_webhook_res?: string;
468
444
  /**
469
- * How the inbox was matched: `reply` for a reply to a sent notification, `builtin` for a Pingram inbox, or `custom` for a custom domain.
445
+ *
470
446
  * @type {string}
471
447
  * @memberof LogsGetResponseLogsInner
472
448
  */
@@ -537,18 +537,6 @@ function LogsGetResponseLogsInnerFromJSONTyped(json, ignoreDiscriminator) {
537
537
  email_inbound_inbox: json['email_inbound_inbox'] == null
538
538
  ? undefined
539
539
  : json['email_inbound_inbox'],
540
- email_inbound_to_name: json['email_inbound_to_name'] == null
541
- ? undefined
542
- : json['email_inbound_to_name'],
543
- email_inbound_sent_at: json['email_inbound_sent_at'] == null
544
- ? undefined
545
- : json['email_inbound_sent_at'],
546
- email_inbound_retry_key: json['email_inbound_retry_key'] == null
547
- ? undefined
548
- : json['email_inbound_retry_key'],
549
- email_inbound_user_id: json['email_inbound_user_id'] == null
550
- ? undefined
551
- : json['email_inbound_user_id'],
552
540
  email_inbound_subject: json['email_inbound_subject'] == null
553
541
  ? undefined
554
542
  : json['email_inbound_subject'],
@@ -857,10 +845,6 @@ function LogsGetResponseLogsInnerToJSONTyped(value, ignoreDiscriminator = false)
857
845
  email_inbound_bcc: value['email_inbound_bcc'],
858
846
  email_inbound_reply_to: value['email_inbound_reply_to'],
859
847
  email_inbound_inbox: value['email_inbound_inbox'],
860
- email_inbound_to_name: value['email_inbound_to_name'],
861
- email_inbound_sent_at: value['email_inbound_sent_at'],
862
- email_inbound_retry_key: value['email_inbound_retry_key'],
863
- email_inbound_user_id: value['email_inbound_user_id'],
864
848
  email_inbound_subject: value['email_inbound_subject'],
865
849
  email_inbound_body_text: value['email_inbound_body_text'],
866
850
  email_inbound_body_html: value['email_inbound_body_html'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pingram",
3
- "version": "1.0.37-alpha.1618",
3
+ "version": "1.0.37",
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",