rcs-js 1.0.10 → 1.0.12

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.
Files changed (50) hide show
  1. package/Client.js +1 -1
  2. package/api/resources/company/client/Client.js +3 -3
  3. package/api/resources/send/client/Client.d.ts +0 -1
  4. package/api/resources/send/client/Client.js +3 -4
  5. package/api/resources/send/client/requests/Rcs.d.ts +9 -0
  6. package/api/resources/send/client/requests/SendMmsRequest.d.ts +3 -2
  7. package/api/resources/send/client/requests/SendSmsRequest.d.ts +2 -0
  8. package/api/resources/send/types/RcsFallback.d.ts +11 -0
  9. package/api/resources/send/types/RcsFallback.js +5 -0
  10. package/api/resources/send/types/index.d.ts +1 -0
  11. package/api/resources/send/types/index.js +1 -0
  12. package/api/types/Action.d.ts +3 -3
  13. package/dist/Client.js +1 -1
  14. package/dist/api/resources/company/client/Client.js +3 -3
  15. package/dist/api/resources/send/client/Client.d.ts +0 -1
  16. package/dist/api/resources/send/client/Client.js +3 -4
  17. package/dist/api/resources/send/client/requests/Rcs.d.ts +9 -0
  18. package/dist/api/resources/send/client/requests/SendMmsRequest.d.ts +3 -2
  19. package/dist/api/resources/send/client/requests/SendSmsRequest.d.ts +2 -0
  20. package/dist/api/resources/send/types/RcsFallback.d.ts +11 -0
  21. package/dist/api/resources/send/types/RcsFallback.js +5 -0
  22. package/dist/api/resources/send/types/index.d.ts +1 -0
  23. package/dist/api/resources/send/types/index.js +1 -0
  24. package/dist/api/types/Action.d.ts +3 -3
  25. package/dist/serialization/resources/send/client/requests/Rcs.d.ts +3 -0
  26. package/dist/serialization/resources/send/client/requests/Rcs.js +3 -0
  27. package/dist/serialization/resources/send/client/requests/SendMmsRequest.d.ts +2 -1
  28. package/dist/serialization/resources/send/client/requests/SendMmsRequest.js +2 -1
  29. package/dist/serialization/resources/send/client/requests/SendSmsRequest.d.ts +1 -0
  30. package/dist/serialization/resources/send/client/requests/SendSmsRequest.js +1 -0
  31. package/dist/serialization/resources/send/types/RcsFallback.d.ts +14 -0
  32. package/dist/serialization/resources/send/types/RcsFallback.js +35 -0
  33. package/dist/serialization/resources/send/types/index.d.ts +1 -0
  34. package/dist/serialization/resources/send/types/index.js +1 -0
  35. package/dist/version.d.ts +1 -1
  36. package/dist/version.js +1 -1
  37. package/package.json +1 -1
  38. package/reference.md +0 -1
  39. package/serialization/resources/send/client/requests/Rcs.d.ts +3 -0
  40. package/serialization/resources/send/client/requests/Rcs.js +3 -0
  41. package/serialization/resources/send/client/requests/SendMmsRequest.d.ts +2 -1
  42. package/serialization/resources/send/client/requests/SendMmsRequest.js +2 -1
  43. package/serialization/resources/send/client/requests/SendSmsRequest.d.ts +1 -0
  44. package/serialization/resources/send/client/requests/SendSmsRequest.js +1 -0
  45. package/serialization/resources/send/types/RcsFallback.d.ts +14 -0
  46. package/serialization/resources/send/types/RcsFallback.js +35 -0
  47. package/serialization/resources/send/types/index.d.ts +1 -0
  48. package/serialization/resources/send/types/index.js +1 -0
  49. package/version.d.ts +1 -1
  50. package/version.js +1 -1
package/Client.js CHANGED
@@ -75,7 +75,7 @@ class PinnacleClient {
75
75
  const _response = yield core.fetcher({
76
76
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "rcs_functionality"),
77
77
  method: "GET",
78
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.10", "User-Agent": "rcs-js/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
78
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.12", "User-Agent": "rcs-js/1.0.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
79
79
  contentType: "application/json",
80
80
  queryParameters: _queryParams,
81
81
  requestType: "json",
@@ -76,7 +76,7 @@ class Company {
76
76
  const _response = yield core.fetcher({
77
77
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "company"),
78
78
  method: "GET",
79
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.10", "User-Agent": "rcs-js/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
79
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.12", "User-Agent": "rcs-js/1.0.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
80
80
  contentType: "application/json",
81
81
  queryParameters: _queryParams,
82
82
  requestType: "json",
@@ -166,7 +166,7 @@ class Company {
166
166
  const _response = yield core.fetcher({
167
167
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "company/register"),
168
168
  method: "POST",
169
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.10", "User-Agent": "rcs-js/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
169
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.12", "User-Agent": "rcs-js/1.0.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
170
170
  contentType: "application/json",
171
171
  requestType: "json",
172
172
  body: serializers.CompanyRegisterRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -233,7 +233,7 @@ class Company {
233
233
  const _response = yield core.fetcher({
234
234
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "company/update"),
235
235
  method: "POST",
236
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.10", "User-Agent": "rcs-js/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
236
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.12", "User-Agent": "rcs-js/1.0.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
237
237
  contentType: "application/json",
238
238
  requestType: "json",
239
239
  body: serializers.CompanyUpdateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -75,7 +75,6 @@ export declare class Send {
75
75
  * await client.send.mms({
76
76
  * to: "to",
77
77
  * from: "from",
78
- * text: "text",
79
78
  * mediaUrls: ["https://example.com/image1.jpg", "https://example.com/video.mp4"]
80
79
  * })
81
80
  */
@@ -74,7 +74,7 @@ class Send {
74
74
  const _response = yield core.fetcher({
75
75
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "send/rcs"),
76
76
  method: "POST",
77
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.10", "User-Agent": "rcs-js/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
77
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.12", "User-Agent": "rcs-js/1.0.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
78
78
  contentType: "application/json",
79
79
  requestType: "json",
80
80
  body: serializers.Rcs.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -146,7 +146,7 @@ class Send {
146
146
  const _response = yield core.fetcher({
147
147
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "send/sms"),
148
148
  method: "POST",
149
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.10", "User-Agent": "rcs-js/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
149
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.12", "User-Agent": "rcs-js/1.0.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
150
150
  contentType: "application/json",
151
151
  requestType: "json",
152
152
  body: serializers.SendSmsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -209,7 +209,6 @@ class Send {
209
209
  * await client.send.mms({
210
210
  * to: "to",
211
211
  * from: "from",
212
- * text: "text",
213
212
  * mediaUrls: ["https://example.com/image1.jpg", "https://example.com/video.mp4"]
214
213
  * })
215
214
  */
@@ -219,7 +218,7 @@ class Send {
219
218
  const _response = yield core.fetcher({
220
219
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "send/mms"),
221
220
  method: "POST",
222
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.10", "User-Agent": "rcs-js/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
221
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.12", "User-Agent": "rcs-js/1.0.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
223
222
  contentType: "application/json",
224
223
  requestType: "json",
225
224
  body: serializers.SendMmsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -3,6 +3,12 @@
3
3
  */
4
4
  import * as Pinnacle from "../../../../index";
5
5
  /**
6
+ * @example
7
+ * {
8
+ * from: "from",
9
+ * to: "to"
10
+ * }
11
+ *
6
12
  * @example
7
13
  * {
8
14
  * from: "from",
@@ -40,4 +46,7 @@ export interface Rcs {
40
46
  cards?: Pinnacle.Card[];
41
47
  /** Optional list of quick reply actions (max 10). */
42
48
  quickReplies?: Pinnacle.Action[];
49
+ fallback?: Pinnacle.RcsFallback;
50
+ /** Optional URL to receive a POST request when the message status changes. Read more about status callbacks [here](/api-reference/receive-msg-statuses). */
51
+ statusCallback?: string;
43
52
  }
@@ -6,7 +6,6 @@
6
6
  * {
7
7
  * to: "to",
8
8
  * from: "from",
9
- * text: "text",
10
9
  * mediaUrls: ["https://example.com/image1.jpg", "https://example.com/video.mp4"]
11
10
  * }
12
11
  */
@@ -16,7 +15,9 @@ export interface SendMmsRequest {
16
15
  /** The sender's phone number in E.164 format. Must be owned by the user. */
17
16
  from: string;
18
17
  /** The MMS message content (max 1600 characters). */
19
- text: string;
18
+ text?: string;
20
19
  /** The URLs of media to include. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported and have a size limit of 5 MB. 500 KB limit for other types. Up to 10 media URLs can be included. */
21
20
  mediaUrls: string[];
21
+ /** Optional URL to receive a POST request when the message status changes. Read more about status callbacks [here](/api-reference/receive-msg-statuses). */
22
+ statusCallback?: string;
22
23
  }
@@ -16,4 +16,6 @@ export interface SendSmsRequest {
16
16
  from: string;
17
17
  /** The SMS message content (max 1600 characters). */
18
18
  text: string;
19
+ /** Optional URL to receive a POST request when the message status changes. Read more about status callbacks [here](/api-reference/receive-msg-statuses). */
20
+ statusCallback?: string;
19
21
  }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface RcsFallback {
5
+ /** The sender's phone number in E.164 format. Must be owned by the user. */
6
+ from?: string;
7
+ /** The fallback message content (max 1600 characters). One of 'text' or 'mediaUrls' must be provided. */
8
+ text?: string;
9
+ /** The URLs of media to include. One of 'text' or 'mediaUrls' must be provided. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported and have a size limit of 5 MB. 500 KB limit for other types. Up to 10 media URLs can be included. */
10
+ mediaUrls?: string[];
11
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,4 @@
1
+ export * from "./RcsFallback";
1
2
  export * from "./SendRcsResponse";
2
3
  export * from "./SendSmsResponse";
3
4
  export * from "./SendMmsResponse";
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./RcsFallback"), exports);
17
18
  __exportStar(require("./SendRcsResponse"), exports);
18
19
  __exportStar(require("./SendSmsResponse"), exports);
19
20
  __exportStar(require("./SendMmsResponse"), exports);
@@ -9,11 +9,11 @@ export interface Action {
9
9
  type?: Pinnacle.ActionType;
10
10
  /** Optional payload associated with the action. This payload encodes the respective fields for the action type and is required. For 'openUrl', the payload is the URL to open. For 'call', the payload is the phone number to dial. For 'trigger', the payload is the predefined payload to send to the webhook. */
11
11
  payload?: string;
12
- /** Optional metadata. This is sent alongside the payload to the webhook. */
12
+ /** Optional metadata. Only used for type 'trigger' ignored for other action types. When the user presses the action, the metadata is sent to the webhook alongside the payload. */
13
13
  metadata?: string;
14
- /** Start time for events. Required for 'scheduleEvent'. */
14
+ /** Start time for events in ISO 8601 format. For example, '2022-01-01T12:00:00Z'. Required for 'scheduleEvent'. */
15
15
  eventStartTime?: string;
16
- /** End time for events. Required for 'scheduleEvent'. */
16
+ /** End time for events in ISO 8601 format. For example, '2022-01-01T12:00:00Z'. Required for 'scheduleEvent'. */
17
17
  eventEndTime?: string;
18
18
  /** Event title. Required for 'scheduleEvent'. */
19
19
  eventTitle?: string;
package/dist/Client.js CHANGED
@@ -75,7 +75,7 @@ class PinnacleClient {
75
75
  const _response = yield core.fetcher({
76
76
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "rcs_functionality"),
77
77
  method: "GET",
78
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.10", "User-Agent": "rcs-js/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
78
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.12", "User-Agent": "rcs-js/1.0.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
79
79
  contentType: "application/json",
80
80
  queryParameters: _queryParams,
81
81
  requestType: "json",
@@ -76,7 +76,7 @@ class Company {
76
76
  const _response = yield core.fetcher({
77
77
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "company"),
78
78
  method: "GET",
79
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.10", "User-Agent": "rcs-js/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
79
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.12", "User-Agent": "rcs-js/1.0.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
80
80
  contentType: "application/json",
81
81
  queryParameters: _queryParams,
82
82
  requestType: "json",
@@ -166,7 +166,7 @@ class Company {
166
166
  const _response = yield core.fetcher({
167
167
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "company/register"),
168
168
  method: "POST",
169
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.10", "User-Agent": "rcs-js/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
169
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.12", "User-Agent": "rcs-js/1.0.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
170
170
  contentType: "application/json",
171
171
  requestType: "json",
172
172
  body: serializers.CompanyRegisterRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -233,7 +233,7 @@ class Company {
233
233
  const _response = yield core.fetcher({
234
234
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "company/update"),
235
235
  method: "POST",
236
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.10", "User-Agent": "rcs-js/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
236
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.12", "User-Agent": "rcs-js/1.0.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
237
237
  contentType: "application/json",
238
238
  requestType: "json",
239
239
  body: serializers.CompanyUpdateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -75,7 +75,6 @@ export declare class Send {
75
75
  * await client.send.mms({
76
76
  * to: "to",
77
77
  * from: "from",
78
- * text: "text",
79
78
  * mediaUrls: ["https://example.com/image1.jpg", "https://example.com/video.mp4"]
80
79
  * })
81
80
  */
@@ -74,7 +74,7 @@ class Send {
74
74
  const _response = yield core.fetcher({
75
75
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "send/rcs"),
76
76
  method: "POST",
77
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.10", "User-Agent": "rcs-js/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
77
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.12", "User-Agent": "rcs-js/1.0.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
78
78
  contentType: "application/json",
79
79
  requestType: "json",
80
80
  body: serializers.Rcs.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -146,7 +146,7 @@ class Send {
146
146
  const _response = yield core.fetcher({
147
147
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "send/sms"),
148
148
  method: "POST",
149
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.10", "User-Agent": "rcs-js/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
149
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.12", "User-Agent": "rcs-js/1.0.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
150
150
  contentType: "application/json",
151
151
  requestType: "json",
152
152
  body: serializers.SendSmsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -209,7 +209,6 @@ class Send {
209
209
  * await client.send.mms({
210
210
  * to: "to",
211
211
  * from: "from",
212
- * text: "text",
213
212
  * mediaUrls: ["https://example.com/image1.jpg", "https://example.com/video.mp4"]
214
213
  * })
215
214
  */
@@ -219,7 +218,7 @@ class Send {
219
218
  const _response = yield core.fetcher({
220
219
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "send/mms"),
221
220
  method: "POST",
222
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.10", "User-Agent": "rcs-js/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
221
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.12", "User-Agent": "rcs-js/1.0.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
223
222
  contentType: "application/json",
224
223
  requestType: "json",
225
224
  body: serializers.SendMmsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -3,6 +3,12 @@
3
3
  */
4
4
  import * as Pinnacle from "../../../../index";
5
5
  /**
6
+ * @example
7
+ * {
8
+ * from: "from",
9
+ * to: "to"
10
+ * }
11
+ *
6
12
  * @example
7
13
  * {
8
14
  * from: "from",
@@ -40,4 +46,7 @@ export interface Rcs {
40
46
  cards?: Pinnacle.Card[];
41
47
  /** Optional list of quick reply actions (max 10). */
42
48
  quickReplies?: Pinnacle.Action[];
49
+ fallback?: Pinnacle.RcsFallback;
50
+ /** Optional URL to receive a POST request when the message status changes. Read more about status callbacks [here](/api-reference/receive-msg-statuses). */
51
+ statusCallback?: string;
43
52
  }
@@ -6,7 +6,6 @@
6
6
  * {
7
7
  * to: "to",
8
8
  * from: "from",
9
- * text: "text",
10
9
  * mediaUrls: ["https://example.com/image1.jpg", "https://example.com/video.mp4"]
11
10
  * }
12
11
  */
@@ -16,7 +15,9 @@ export interface SendMmsRequest {
16
15
  /** The sender's phone number in E.164 format. Must be owned by the user. */
17
16
  from: string;
18
17
  /** The MMS message content (max 1600 characters). */
19
- text: string;
18
+ text?: string;
20
19
  /** The URLs of media to include. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported and have a size limit of 5 MB. 500 KB limit for other types. Up to 10 media URLs can be included. */
21
20
  mediaUrls: string[];
21
+ /** Optional URL to receive a POST request when the message status changes. Read more about status callbacks [here](/api-reference/receive-msg-statuses). */
22
+ statusCallback?: string;
22
23
  }
@@ -16,4 +16,6 @@ export interface SendSmsRequest {
16
16
  from: string;
17
17
  /** The SMS message content (max 1600 characters). */
18
18
  text: string;
19
+ /** Optional URL to receive a POST request when the message status changes. Read more about status callbacks [here](/api-reference/receive-msg-statuses). */
20
+ statusCallback?: string;
19
21
  }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface RcsFallback {
5
+ /** The sender's phone number in E.164 format. Must be owned by the user. */
6
+ from?: string;
7
+ /** The fallback message content (max 1600 characters). One of 'text' or 'mediaUrls' must be provided. */
8
+ text?: string;
9
+ /** The URLs of media to include. One of 'text' or 'mediaUrls' must be provided. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported and have a size limit of 5 MB. 500 KB limit for other types. Up to 10 media URLs can be included. */
10
+ mediaUrls?: string[];
11
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,4 @@
1
+ export * from "./RcsFallback";
1
2
  export * from "./SendRcsResponse";
2
3
  export * from "./SendSmsResponse";
3
4
  export * from "./SendMmsResponse";
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./RcsFallback"), exports);
17
18
  __exportStar(require("./SendRcsResponse"), exports);
18
19
  __exportStar(require("./SendSmsResponse"), exports);
19
20
  __exportStar(require("./SendMmsResponse"), exports);
@@ -9,11 +9,11 @@ export interface Action {
9
9
  type?: Pinnacle.ActionType;
10
10
  /** Optional payload associated with the action. This payload encodes the respective fields for the action type and is required. For 'openUrl', the payload is the URL to open. For 'call', the payload is the phone number to dial. For 'trigger', the payload is the predefined payload to send to the webhook. */
11
11
  payload?: string;
12
- /** Optional metadata. This is sent alongside the payload to the webhook. */
12
+ /** Optional metadata. Only used for type 'trigger' ignored for other action types. When the user presses the action, the metadata is sent to the webhook alongside the payload. */
13
13
  metadata?: string;
14
- /** Start time for events. Required for 'scheduleEvent'. */
14
+ /** Start time for events in ISO 8601 format. For example, '2022-01-01T12:00:00Z'. Required for 'scheduleEvent'. */
15
15
  eventStartTime?: string;
16
- /** End time for events. Required for 'scheduleEvent'. */
16
+ /** End time for events in ISO 8601 format. For example, '2022-01-01T12:00:00Z'. Required for 'scheduleEvent'. */
17
17
  eventEndTime?: string;
18
18
  /** Event title. Required for 'scheduleEvent'. */
19
19
  eventTitle?: string;
@@ -6,6 +6,7 @@ import * as Pinnacle from "../../../../../api/index";
6
6
  import * as core from "../../../../../core";
7
7
  import { Card } from "../../../../types/Card";
8
8
  import { Action } from "../../../../types/Action";
9
+ import { RcsFallback } from "../../types/RcsFallback";
9
10
  export declare const Rcs: core.serialization.Schema<serializers.Rcs.Raw, Pinnacle.Rcs>;
10
11
  export declare namespace Rcs {
11
12
  interface Raw {
@@ -15,5 +16,7 @@ export declare namespace Rcs {
15
16
  mediaUrl?: string | null;
16
17
  cards?: Card.Raw[] | null;
17
18
  quickReplies?: Action.Raw[] | null;
19
+ fallback?: RcsFallback.Raw | null;
20
+ statusCallback?: string | null;
18
21
  }
19
22
  }
@@ -30,6 +30,7 @@ exports.Rcs = void 0;
30
30
  const core = __importStar(require("../../../../../core"));
31
31
  const Card_1 = require("../../../../types/Card");
32
32
  const Action_1 = require("../../../../types/Action");
33
+ const RcsFallback_1 = require("../../types/RcsFallback");
33
34
  exports.Rcs = core.serialization.object({
34
35
  from: core.serialization.string(),
35
36
  to: core.serialization.string(),
@@ -37,4 +38,6 @@ exports.Rcs = core.serialization.object({
37
38
  mediaUrl: core.serialization.string().optional(),
38
39
  cards: core.serialization.list(Card_1.Card).optional(),
39
40
  quickReplies: core.serialization.list(Action_1.Action).optional(),
41
+ fallback: RcsFallback_1.RcsFallback.optional(),
42
+ statusCallback: core.serialization.string().optional(),
40
43
  });
@@ -9,7 +9,8 @@ export declare namespace SendMmsRequest {
9
9
  interface Raw {
10
10
  to: string;
11
11
  from: string;
12
- text: string;
12
+ text?: string | null;
13
13
  mediaUrls: string[];
14
+ statusCallback?: string | null;
14
15
  }
15
16
  }
@@ -31,6 +31,7 @@ const core = __importStar(require("../../../../../core"));
31
31
  exports.SendMmsRequest = core.serialization.object({
32
32
  to: core.serialization.string(),
33
33
  from: core.serialization.string(),
34
- text: core.serialization.string(),
34
+ text: core.serialization.string().optional(),
35
35
  mediaUrls: core.serialization.list(core.serialization.string()),
36
+ statusCallback: core.serialization.string().optional(),
36
37
  });
@@ -10,5 +10,6 @@ export declare namespace SendSmsRequest {
10
10
  to: string;
11
11
  from: string;
12
12
  text: string;
13
+ statusCallback?: string | null;
13
14
  }
14
15
  }
@@ -32,4 +32,5 @@ exports.SendSmsRequest = core.serialization.object({
32
32
  to: core.serialization.string(),
33
33
  from: core.serialization.string(),
34
34
  text: core.serialization.string(),
35
+ statusCallback: core.serialization.string().optional(),
35
36
  });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Pinnacle from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ export declare const RcsFallback: core.serialization.ObjectSchema<serializers.RcsFallback.Raw, Pinnacle.RcsFallback>;
8
+ export declare namespace RcsFallback {
9
+ interface Raw {
10
+ from?: string | null;
11
+ text?: string | null;
12
+ mediaUrls?: string[] | null;
13
+ }
14
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.RcsFallback = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ exports.RcsFallback = core.serialization.object({
32
+ from: core.serialization.string().optional(),
33
+ text: core.serialization.string().optional(),
34
+ mediaUrls: core.serialization.list(core.serialization.string()).optional(),
35
+ });
@@ -1,3 +1,4 @@
1
+ export * from "./RcsFallback";
1
2
  export * from "./SendRcsResponse";
2
3
  export * from "./SendSmsResponse";
3
4
  export * from "./SendMmsResponse";
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./RcsFallback"), exports);
17
18
  __exportStar(require("./SendRcsResponse"), exports);
18
19
  __exportStar(require("./SendSmsResponse"), exports);
19
20
  __exportStar(require("./SendMmsResponse"), exports);
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.10";
1
+ export declare const SDK_VERSION = "1.0.12";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.0.10";
4
+ exports.SDK_VERSION = "1.0.12";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rcs-js",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "private": false,
5
5
  "repository": "https://github.com/pinnacle-dev/rcs-js",
6
6
  "main": "./index.js",
package/reference.md CHANGED
@@ -451,7 +451,6 @@ Send an MMS message with media attachments.
451
451
  await client.send.mms({
452
452
  to: "to",
453
453
  from: "from",
454
- text: "text",
455
454
  mediaUrls: ["https://example.com/image1.jpg", "https://example.com/video.mp4"],
456
455
  });
457
456
  ```
@@ -6,6 +6,7 @@ import * as Pinnacle from "../../../../../api/index";
6
6
  import * as core from "../../../../../core";
7
7
  import { Card } from "../../../../types/Card";
8
8
  import { Action } from "../../../../types/Action";
9
+ import { RcsFallback } from "../../types/RcsFallback";
9
10
  export declare const Rcs: core.serialization.Schema<serializers.Rcs.Raw, Pinnacle.Rcs>;
10
11
  export declare namespace Rcs {
11
12
  interface Raw {
@@ -15,5 +16,7 @@ export declare namespace Rcs {
15
16
  mediaUrl?: string | null;
16
17
  cards?: Card.Raw[] | null;
17
18
  quickReplies?: Action.Raw[] | null;
19
+ fallback?: RcsFallback.Raw | null;
20
+ statusCallback?: string | null;
18
21
  }
19
22
  }
@@ -30,6 +30,7 @@ exports.Rcs = void 0;
30
30
  const core = __importStar(require("../../../../../core"));
31
31
  const Card_1 = require("../../../../types/Card");
32
32
  const Action_1 = require("../../../../types/Action");
33
+ const RcsFallback_1 = require("../../types/RcsFallback");
33
34
  exports.Rcs = core.serialization.object({
34
35
  from: core.serialization.string(),
35
36
  to: core.serialization.string(),
@@ -37,4 +38,6 @@ exports.Rcs = core.serialization.object({
37
38
  mediaUrl: core.serialization.string().optional(),
38
39
  cards: core.serialization.list(Card_1.Card).optional(),
39
40
  quickReplies: core.serialization.list(Action_1.Action).optional(),
41
+ fallback: RcsFallback_1.RcsFallback.optional(),
42
+ statusCallback: core.serialization.string().optional(),
40
43
  });
@@ -9,7 +9,8 @@ export declare namespace SendMmsRequest {
9
9
  interface Raw {
10
10
  to: string;
11
11
  from: string;
12
- text: string;
12
+ text?: string | null;
13
13
  mediaUrls: string[];
14
+ statusCallback?: string | null;
14
15
  }
15
16
  }
@@ -31,6 +31,7 @@ const core = __importStar(require("../../../../../core"));
31
31
  exports.SendMmsRequest = core.serialization.object({
32
32
  to: core.serialization.string(),
33
33
  from: core.serialization.string(),
34
- text: core.serialization.string(),
34
+ text: core.serialization.string().optional(),
35
35
  mediaUrls: core.serialization.list(core.serialization.string()),
36
+ statusCallback: core.serialization.string().optional(),
36
37
  });
@@ -10,5 +10,6 @@ export declare namespace SendSmsRequest {
10
10
  to: string;
11
11
  from: string;
12
12
  text: string;
13
+ statusCallback?: string | null;
13
14
  }
14
15
  }
@@ -32,4 +32,5 @@ exports.SendSmsRequest = core.serialization.object({
32
32
  to: core.serialization.string(),
33
33
  from: core.serialization.string(),
34
34
  text: core.serialization.string(),
35
+ statusCallback: core.serialization.string().optional(),
35
36
  });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Pinnacle from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ export declare const RcsFallback: core.serialization.ObjectSchema<serializers.RcsFallback.Raw, Pinnacle.RcsFallback>;
8
+ export declare namespace RcsFallback {
9
+ interface Raw {
10
+ from?: string | null;
11
+ text?: string | null;
12
+ mediaUrls?: string[] | null;
13
+ }
14
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.RcsFallback = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ exports.RcsFallback = core.serialization.object({
32
+ from: core.serialization.string().optional(),
33
+ text: core.serialization.string().optional(),
34
+ mediaUrls: core.serialization.list(core.serialization.string()).optional(),
35
+ });
@@ -1,3 +1,4 @@
1
+ export * from "./RcsFallback";
1
2
  export * from "./SendRcsResponse";
2
3
  export * from "./SendSmsResponse";
3
4
  export * from "./SendMmsResponse";
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./RcsFallback"), exports);
17
18
  __exportStar(require("./SendRcsResponse"), exports);
18
19
  __exportStar(require("./SendSmsResponse"), exports);
19
20
  __exportStar(require("./SendMmsResponse"), exports);
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.10";
1
+ export declare const SDK_VERSION = "1.0.12";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.0.10";
4
+ exports.SDK_VERSION = "1.0.12";