pingram 1.0.13 → 1.0.14-alpha.1200

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.
@@ -23,7 +23,7 @@ export interface SendRequest {
23
23
  export interface SmsApiInterface {
24
24
  /**
25
25
  *
26
- * @summary Send an SMS notification directly without templates
26
+ * @summary Send an SMS or MMS notification directly without templates
27
27
  * @param {SendSmsRequest} sendSmsRequest
28
28
  * @param {*} [options] Override http request option.
29
29
  * @throws {RequiredError}
@@ -31,7 +31,7 @@ export interface SmsApiInterface {
31
31
  */
32
32
  sendRaw(requestParameters: SendRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SendSmsResponse>>;
33
33
  /**
34
- * Send an SMS notification directly without templates
34
+ * Send an SMS or MMS notification directly without templates
35
35
  */
36
36
  send(sendSmsRequest: SendSmsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SendSmsResponse>;
37
37
  }
@@ -40,11 +40,11 @@ export interface SmsApiInterface {
40
40
  */
41
41
  export declare class SmsApi extends runtime.BaseAPI implements SmsApiInterface {
42
42
  /**
43
- * Send an SMS notification directly without templates
43
+ * Send an SMS or MMS notification directly without templates
44
44
  */
45
45
  sendRaw(requestParameters: SendRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SendSmsResponse>>;
46
46
  /**
47
- * Send an SMS notification directly without templates
47
+ * Send an SMS or MMS notification directly without templates
48
48
  */
49
49
  send(sendSmsRequest: SendSmsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SendSmsResponse>;
50
50
  }
@@ -54,7 +54,7 @@ const index_1 = require("../models/index");
54
54
  */
55
55
  class SmsApi extends runtime.BaseAPI {
56
56
  /**
57
- * Send an SMS notification directly without templates
57
+ * Send an SMS or MMS notification directly without templates
58
58
  */
59
59
  async sendRaw(requestParameters, initOverrides) {
60
60
  if (requestParameters['sendSmsRequest'] == null) {
@@ -102,7 +102,7 @@ class SmsApi extends runtime.BaseAPI {
102
102
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SendSmsResponseFromJSON)(jsonValue));
103
103
  }
104
104
  /**
105
- * Send an SMS notification directly without templates
105
+ * Send an SMS or MMS notification directly without templates
106
106
  */
107
107
  async send(sendSmsRequest, initOverrides) {
108
108
  const response = await this.sendRaw({ sendSmsRequest: sendSmsRequest }, initOverrides);
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- * Request body for `POST /sms` (send SMS without a template).
13
+ * Request body for `POST /sms` (send SMS or MMS without a template).
14
14
  * @export
15
15
  * @interface SendSmsRequest
16
16
  */
@@ -28,11 +28,17 @@ export interface SendSmsRequest {
28
28
  */
29
29
  to: string;
30
30
  /**
31
- * The message of the SMS notification.
31
+ * The message of the SMS or MMS notification. Optional when `mediaUrls` is provided.
32
32
  * @type {string}
33
33
  * @memberof SendSmsRequest
34
34
  */
35
- message: string;
35
+ message?: string;
36
+ /**
37
+ * Public HTTPS URLs of media to attach (MMS).
38
+ * @type {Array<string>}
39
+ * @memberof SendSmsRequest
40
+ */
41
+ mediaUrls?: Array<string>;
36
42
  /**
37
43
  * The ISO 8601 datetime to schedule the SMS notification.
38
44
  * @type {string}
@@ -26,8 +26,6 @@ function instanceOfSendSmsRequest(value) {
26
26
  return false;
27
27
  if (!('to' in value) || value['to'] === undefined)
28
28
  return false;
29
- if (!('message' in value) || value['message'] === undefined)
30
- return false;
31
29
  return true;
32
30
  }
33
31
  function SendSmsRequestFromJSON(json) {
@@ -40,7 +38,8 @@ function SendSmsRequestFromJSONTyped(json, ignoreDiscriminator) {
40
38
  return {
41
39
  type: json['type'],
42
40
  to: json['to'],
43
- message: json['message'],
41
+ message: json['message'] == null ? undefined : json['message'],
42
+ mediaUrls: json['mediaUrls'] == null ? undefined : json['mediaUrls'],
44
43
  schedule: json['schedule'] == null ? undefined : json['schedule'],
45
44
  from: json['from'] == null ? undefined : json['from']
46
45
  };
@@ -56,6 +55,7 @@ function SendSmsRequestToJSONTyped(value, ignoreDiscriminator = false) {
56
55
  type: value['type'],
57
56
  to: value['to'],
58
57
  message: value['message'],
58
+ mediaUrls: value['mediaUrls'],
59
59
  schedule: value['schedule'],
60
60
  from: value['from']
61
61
  };
@@ -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.13';
11
+ const SDK_VERSION = '1.0.14';
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.13",
3
+ "version": "1.0.14-alpha.1200",
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",