rcs-js 2.0.3 → 2.0.5-rc.1

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 (141) hide show
  1. package/README.md +36 -1
  2. package/dist/cjs/Client.d.ts +3 -0
  3. package/dist/cjs/Client.js +25 -20
  4. package/dist/cjs/api/resources/audiences/client/Client.d.ts +129 -0
  5. package/dist/cjs/api/resources/audiences/client/Client.js +385 -0
  6. package/dist/cjs/api/resources/audiences/client/index.d.ts +2 -0
  7. package/dist/cjs/api/resources/audiences/client/index.js +17 -0
  8. package/dist/cjs/api/resources/audiences/client/requests/AudiencesDeleteRequest.d.ts +13 -0
  9. package/dist/cjs/api/resources/audiences/client/requests/AudiencesDeleteRequest.js +5 -0
  10. package/dist/cjs/api/resources/audiences/client/requests/AudiencesGetRequest.d.ts +22 -0
  11. package/dist/cjs/api/resources/audiences/client/requests/AudiencesGetRequest.js +5 -0
  12. package/dist/cjs/api/resources/audiences/client/requests/CreateAudienceParams.d.ts +31 -0
  13. package/dist/cjs/api/resources/audiences/client/requests/CreateAudienceParams.js +5 -0
  14. package/dist/cjs/api/resources/audiences/client/requests/UpdateAudienceParams.d.ts +19 -0
  15. package/dist/cjs/api/resources/audiences/client/requests/UpdateAudienceParams.js +5 -0
  16. package/dist/cjs/api/resources/audiences/client/requests/index.d.ts +4 -0
  17. package/dist/cjs/api/resources/audiences/client/requests/index.js +2 -0
  18. package/dist/cjs/api/resources/audiences/index.d.ts +3 -0
  19. package/dist/cjs/api/resources/audiences/index.js +19 -0
  20. package/dist/cjs/api/resources/audiences/resources/contacts/client/Client.d.ts +80 -0
  21. package/dist/cjs/api/resources/audiences/resources/contacts/client/Client.js +220 -0
  22. package/dist/cjs/api/resources/audiences/resources/contacts/client/index.d.ts +2 -0
  23. package/dist/cjs/api/resources/audiences/resources/contacts/client/index.js +17 -0
  24. package/dist/cjs/api/resources/audiences/resources/contacts/client/requests/AddContactsParams.d.ts +16 -0
  25. package/dist/cjs/api/resources/audiences/resources/contacts/client/requests/AddContactsParams.js +5 -0
  26. package/dist/cjs/api/resources/audiences/resources/contacts/client/requests/RemoveContactsParams.d.ts +16 -0
  27. package/dist/cjs/api/resources/audiences/resources/contacts/client/requests/RemoveContactsParams.js +5 -0
  28. package/dist/cjs/api/resources/audiences/resources/contacts/client/requests/index.d.ts +2 -0
  29. package/dist/cjs/api/resources/audiences/resources/contacts/client/requests/index.js +2 -0
  30. package/dist/cjs/api/resources/audiences/resources/contacts/index.d.ts +1 -0
  31. package/dist/cjs/api/resources/audiences/resources/contacts/index.js +17 -0
  32. package/dist/cjs/api/resources/audiences/resources/index.d.ts +2 -0
  33. package/dist/cjs/api/resources/audiences/resources/index.js +41 -0
  34. package/dist/cjs/api/resources/audiences/types/AudiencesGetResponse.d.ts +11 -0
  35. package/dist/cjs/api/resources/audiences/types/AudiencesGetResponse.js +5 -0
  36. package/dist/cjs/api/resources/audiences/types/index.d.ts +1 -0
  37. package/dist/cjs/api/resources/audiences/types/index.js +17 -0
  38. package/dist/cjs/api/resources/index.d.ts +3 -0
  39. package/dist/cjs/api/resources/index.js +4 -1
  40. package/dist/cjs/api/resources/messages/resources/index.d.ts +1 -0
  41. package/dist/cjs/api/resources/messages/resources/index.js +1 -0
  42. package/dist/cjs/api/resources/messages/resources/rcs/client/Client.d.ts +33 -0
  43. package/dist/cjs/api/resources/messages/resources/rcs/client/Client.js +90 -0
  44. package/dist/cjs/api/resources/messages/resources/rcs/client/index.d.ts +1 -0
  45. package/dist/cjs/api/resources/messages/resources/rcs/client/index.js +15 -0
  46. package/dist/cjs/api/resources/messages/resources/rcs/client/requests/SendTypingIndicatorSchema.d.ts +38 -0
  47. package/dist/cjs/api/resources/messages/resources/rcs/client/requests/SendTypingIndicatorSchema.js +5 -0
  48. package/dist/cjs/api/resources/messages/resources/rcs/client/requests/index.d.ts +1 -0
  49. package/dist/cjs/api/resources/messages/resources/rcs/client/requests/index.js +2 -0
  50. package/dist/cjs/api/types/AudienceCountOnly.d.ts +17 -0
  51. package/dist/cjs/api/types/AudienceCountOnly.js +5 -0
  52. package/dist/cjs/api/types/AudienceWithPagination.d.ts +17 -0
  53. package/dist/cjs/api/types/AudienceWithPagination.js +5 -0
  54. package/dist/cjs/api/types/DeleteAudienceResponse.d.ts +7 -0
  55. package/dist/cjs/api/types/DeleteAudienceResponse.js +5 -0
  56. package/dist/cjs/api/types/Options.d.ts +21 -0
  57. package/dist/cjs/api/types/Options.js +5 -0
  58. package/dist/cjs/api/types/Pagination.d.ts +13 -0
  59. package/dist/cjs/api/types/Pagination.js +5 -0
  60. package/dist/cjs/api/types/RcsButtonOpenUrl.d.ts +31 -2
  61. package/dist/cjs/api/types/RcsButtonOpenUrl.js +9 -0
  62. package/dist/cjs/api/types/RcsButtonSendLocation.d.ts +8 -2
  63. package/dist/cjs/api/types/RichCardsMessage.d.ts +51 -1
  64. package/dist/cjs/api/types/RichCardsMessage.js +18 -0
  65. package/dist/cjs/api/types/SendTypingIndicatorResponse.d.ts +22 -0
  66. package/dist/cjs/api/types/SendTypingIndicatorResponse.js +5 -0
  67. package/dist/cjs/api/types/index.d.ts +6 -0
  68. package/dist/cjs/api/types/index.js +6 -0
  69. package/dist/cjs/version.d.ts +1 -1
  70. package/dist/cjs/version.js +1 -1
  71. package/dist/esm/Client.d.mts +3 -0
  72. package/dist/esm/Client.mjs +7 -2
  73. package/dist/esm/api/resources/audiences/client/Client.d.mts +129 -0
  74. package/dist/esm/api/resources/audiences/client/Client.mjs +348 -0
  75. package/dist/esm/api/resources/audiences/client/index.d.mts +2 -0
  76. package/dist/esm/api/resources/audiences/client/index.mjs +1 -0
  77. package/dist/esm/api/resources/audiences/client/requests/AudiencesDeleteRequest.d.mts +13 -0
  78. package/dist/esm/api/resources/audiences/client/requests/AudiencesDeleteRequest.mjs +4 -0
  79. package/dist/esm/api/resources/audiences/client/requests/AudiencesGetRequest.d.mts +22 -0
  80. package/dist/esm/api/resources/audiences/client/requests/AudiencesGetRequest.mjs +4 -0
  81. package/dist/esm/api/resources/audiences/client/requests/CreateAudienceParams.d.mts +31 -0
  82. package/dist/esm/api/resources/audiences/client/requests/CreateAudienceParams.mjs +4 -0
  83. package/dist/esm/api/resources/audiences/client/requests/UpdateAudienceParams.d.mts +19 -0
  84. package/dist/esm/api/resources/audiences/client/requests/UpdateAudienceParams.mjs +4 -0
  85. package/dist/esm/api/resources/audiences/client/requests/index.d.mts +4 -0
  86. package/dist/esm/api/resources/audiences/client/requests/index.mjs +1 -0
  87. package/dist/esm/api/resources/audiences/index.d.mts +3 -0
  88. package/dist/esm/api/resources/audiences/index.mjs +3 -0
  89. package/dist/esm/api/resources/audiences/resources/contacts/client/Client.d.mts +80 -0
  90. package/dist/esm/api/resources/audiences/resources/contacts/client/Client.mjs +183 -0
  91. package/dist/esm/api/resources/audiences/resources/contacts/client/index.d.mts +2 -0
  92. package/dist/esm/api/resources/audiences/resources/contacts/client/index.mjs +1 -0
  93. package/dist/esm/api/resources/audiences/resources/contacts/client/requests/AddContactsParams.d.mts +16 -0
  94. package/dist/esm/api/resources/audiences/resources/contacts/client/requests/AddContactsParams.mjs +4 -0
  95. package/dist/esm/api/resources/audiences/resources/contacts/client/requests/RemoveContactsParams.d.mts +16 -0
  96. package/dist/esm/api/resources/audiences/resources/contacts/client/requests/RemoveContactsParams.mjs +4 -0
  97. package/dist/esm/api/resources/audiences/resources/contacts/client/requests/index.d.mts +2 -0
  98. package/dist/esm/api/resources/audiences/resources/contacts/client/requests/index.mjs +1 -0
  99. package/dist/esm/api/resources/audiences/resources/contacts/index.d.mts +1 -0
  100. package/dist/esm/api/resources/audiences/resources/contacts/index.mjs +1 -0
  101. package/dist/esm/api/resources/audiences/resources/index.d.mts +2 -0
  102. package/dist/esm/api/resources/audiences/resources/index.mjs +2 -0
  103. package/dist/esm/api/resources/audiences/types/AudiencesGetResponse.d.mts +11 -0
  104. package/dist/esm/api/resources/audiences/types/AudiencesGetResponse.mjs +4 -0
  105. package/dist/esm/api/resources/audiences/types/index.d.mts +1 -0
  106. package/dist/esm/api/resources/audiences/types/index.mjs +1 -0
  107. package/dist/esm/api/resources/index.d.mts +3 -0
  108. package/dist/esm/api/resources/index.mjs +3 -0
  109. package/dist/esm/api/resources/messages/resources/index.d.mts +1 -0
  110. package/dist/esm/api/resources/messages/resources/index.mjs +1 -0
  111. package/dist/esm/api/resources/messages/resources/rcs/client/Client.d.mts +33 -0
  112. package/dist/esm/api/resources/messages/resources/rcs/client/Client.mjs +90 -0
  113. package/dist/esm/api/resources/messages/resources/rcs/client/index.d.mts +1 -0
  114. package/dist/esm/api/resources/messages/resources/rcs/client/index.mjs +1 -1
  115. package/dist/esm/api/resources/messages/resources/rcs/client/requests/SendTypingIndicatorSchema.d.mts +38 -0
  116. package/dist/esm/api/resources/messages/resources/rcs/client/requests/SendTypingIndicatorSchema.mjs +4 -0
  117. package/dist/esm/api/resources/messages/resources/rcs/client/requests/index.d.mts +1 -0
  118. package/dist/esm/api/resources/messages/resources/rcs/client/requests/index.mjs +1 -0
  119. package/dist/esm/api/types/AudienceCountOnly.d.mts +17 -0
  120. package/dist/esm/api/types/AudienceCountOnly.mjs +4 -0
  121. package/dist/esm/api/types/AudienceWithPagination.d.mts +17 -0
  122. package/dist/esm/api/types/AudienceWithPagination.mjs +4 -0
  123. package/dist/esm/api/types/DeleteAudienceResponse.d.mts +7 -0
  124. package/dist/esm/api/types/DeleteAudienceResponse.mjs +4 -0
  125. package/dist/esm/api/types/Options.d.mts +21 -0
  126. package/dist/esm/api/types/Options.mjs +4 -0
  127. package/dist/esm/api/types/Pagination.d.mts +13 -0
  128. package/dist/esm/api/types/Pagination.mjs +4 -0
  129. package/dist/esm/api/types/RcsButtonOpenUrl.d.mts +31 -2
  130. package/dist/esm/api/types/RcsButtonOpenUrl.mjs +8 -1
  131. package/dist/esm/api/types/RcsButtonSendLocation.d.mts +8 -2
  132. package/dist/esm/api/types/RichCardsMessage.d.mts +51 -1
  133. package/dist/esm/api/types/RichCardsMessage.mjs +17 -1
  134. package/dist/esm/api/types/SendTypingIndicatorResponse.d.mts +22 -0
  135. package/dist/esm/api/types/SendTypingIndicatorResponse.mjs +4 -0
  136. package/dist/esm/api/types/index.d.mts +6 -0
  137. package/dist/esm/api/types/index.mjs +6 -0
  138. package/dist/esm/version.d.mts +1 -1
  139. package/dist/esm/version.mjs +1 -1
  140. package/package.json +2 -2
  141. package/reference.md +487 -0
@@ -0,0 +1,38 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * agentId: "agent_pinnacle",
8
+ * to: "+14154746461",
9
+ * options: {
10
+ * test_mode: false
11
+ * }
12
+ * }
13
+ */
14
+ export interface SendTypingIndicatorSchema {
15
+ /**
16
+ * The unique identifier of the RCS agent sending the typing indicator. <br>
17
+ *
18
+ * Format: `agent_` followed by alphanumeric characters (e.g., `agent_pinnacle`).
19
+ */
20
+ agentId: string;
21
+ /**
22
+ * The recipient's phone number in E.164 format. <br>
23
+ *
24
+ * Must include country code with a leading plus sign (e.g., `+14155551234`).
25
+ */
26
+ to: string;
27
+ /** Configure how your typing indicator is sent. */
28
+ options?: SendTypingIndicatorSchema.Options;
29
+ }
30
+ export declare namespace SendTypingIndicatorSchema {
31
+ /**
32
+ * Configure how your typing indicator is sent.
33
+ */
34
+ interface Options {
35
+ /** Send via the test agent to whitelisted test devices. Useful for development and debugging. */
36
+ test_mode?: boolean;
37
+ }
38
+ }
@@ -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 });
@@ -0,0 +1 @@
1
+ export { type SendTypingIndicatorSchema } from "./SendTypingIndicatorSchema.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface AudienceCountOnly {
5
+ /** Audience public ID. This identifier is a string that always begins with the prefix `aud_`, for example: `aud_abc123`. */
6
+ id: string;
7
+ /** Audience name. */
8
+ name: string;
9
+ /** Audience description. */
10
+ description: string;
11
+ /**
12
+ * Total number of contacts in audience.
13
+ *
14
+ * Use the [Get Audience](/api-reference/audiences/get) endpoint with the pagination parameters to get the audience with its contacts.
15
+ */
16
+ contactCount: number;
17
+ }
@@ -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 });
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Pinnacle from "../index.js";
5
+ export interface AudienceWithPagination {
6
+ /** Audience public ID. This identifier is a string that always begins with the prefix `aud_`, for example: `aud_abc123`. */
7
+ id: string;
8
+ /** Audience name. */
9
+ name: string;
10
+ /** Audience description. */
11
+ description: string;
12
+ /** Array of contact objects (paginated). */
13
+ contacts: Pinnacle.Contact[];
14
+ /** Total number of contacts in audience. */
15
+ contactCount: number;
16
+ pagination: Pinnacle.Pagination;
17
+ }
@@ -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 });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface DeleteAudienceResponse {
5
+ /** Indicates successful deletion. */
6
+ success: boolean;
7
+ }
@@ -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 });
@@ -0,0 +1,21 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Pinnacle from "../index.js";
5
+ /**
6
+ * Configure how your RCS message is sent and tracked.
7
+ */
8
+ export interface Options {
9
+ schedule?: Pinnacle.MessageSchedule;
10
+ /** Send via the test agent to whitelisted test devices. Useful for development and debugging. */
11
+ test_mode?: boolean;
12
+ tracking?: Pinnacle.Tracking;
13
+ /** Media files and card media will be transcoded to a supported RCS format. This adds a small delay to sending the message. Ignored for rich text messages. */
14
+ transcode?: boolean;
15
+ /**
16
+ * Validate your message for any unsupported files. <br>
17
+ *
18
+ * If failed, errors will be thrown and the message will not send.
19
+ */
20
+ validate?: boolean;
21
+ }
@@ -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 });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface Pagination {
5
+ /** Current page number (1-indexed). */
6
+ page: number;
7
+ /** Items per page (max 100, default 50). */
8
+ limit: number;
9
+ /** Total number of contacts in the audience. */
10
+ total: number;
11
+ /** Whether more pages exist. */
12
+ hasMore: boolean;
13
+ }
@@ -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 });
@@ -5,10 +5,39 @@
5
5
  * Button that opens a URL when tapped by the recipient.
6
6
  */
7
7
  export interface RcsButtonOpenUrl {
8
- /** Optional additional data to attach to this button. */
9
- metadata?: string;
8
+ /**
9
+ * Controls how the URL is displayed when the button is tapped.
10
+ *
11
+ * **Default behavior:** If not specified, the URL opens in the device's default browser. If you're sending deeplinks, you should use this mode as it will open the deeplink in the native app if it is installed.
12
+ *
13
+ * **Available modes in order of size:**
14
+ * - `HALF` — Half-screen webview overlay
15
+ * - `TALL` — Tall webview overlay
16
+ * - `FULL` — Full-screen webview
17
+ */
18
+ webviewMode?: RcsButtonOpenUrl.WebviewMode;
10
19
  /** The URL to open when the button is tapped. Must be a valid HTTP or HTTPS URL. */
11
20
  payload: string;
12
21
  /** Display text for the button. */
13
22
  title: string;
23
+ /** Optional additional data to attach to this button. */
24
+ metadata?: string;
25
+ }
26
+ export declare namespace RcsButtonOpenUrl {
27
+ /**
28
+ * Controls how the URL is displayed when the button is tapped.
29
+ *
30
+ * **Default behavior:** If not specified, the URL opens in the device's default browser. If you're sending deeplinks, you should use this mode as it will open the deeplink in the native app if it is installed.
31
+ *
32
+ * **Available modes in order of size:**
33
+ * - `HALF` — Half-screen webview overlay
34
+ * - `TALL` — Tall webview overlay
35
+ * - `FULL` — Full-screen webview
36
+ */
37
+ type WebviewMode = "HALF" | "TALL" | "FULL";
38
+ const WebviewMode: {
39
+ readonly Half: "HALF";
40
+ readonly Tall: "TALL";
41
+ readonly Full: "FULL";
42
+ };
14
43
  }
@@ -3,3 +3,12 @@
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.RcsButtonOpenUrl = void 0;
7
+ var RcsButtonOpenUrl;
8
+ (function (RcsButtonOpenUrl) {
9
+ RcsButtonOpenUrl.WebviewMode = {
10
+ Half: "HALF",
11
+ Tall: "TALL",
12
+ Full: "FULL",
13
+ };
14
+ })(RcsButtonOpenUrl || (exports.RcsButtonOpenUrl = RcsButtonOpenUrl = {}));
@@ -5,12 +5,18 @@
5
5
  * Button that shares a specific location with the recipient when tapped.
6
6
  */
7
7
  export interface RcsButtonSendLocation {
8
+ /**
9
+ * Optional name or label for the location that will be displayed in the map app (e.g., "Central Park", "Home Office").
10
+ *
11
+ * If not provided, the button title will be used as the location name.
12
+ */
13
+ name?: string;
8
14
  /** Geographic coordinates of the location to share. */
9
15
  latLong: RcsButtonSendLocation.LatLong;
10
- /** Optional additional data to attach to this button. */
11
- metadata?: string;
12
16
  /** Display text for the button. */
13
17
  title: string;
18
+ /** Optional additional data to attach to this button. */
19
+ metadata?: string;
14
20
  }
15
21
  export declare namespace RcsButtonSendLocation {
16
22
  /**
@@ -2,5 +2,55 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Pinnacle from "../index.js";
5
- export interface RichCardsMessage extends Pinnacle.RcsBase, Pinnacle.RcsCards {
5
+ export interface RichCardsMessage extends Pinnacle.RcsCards {
6
+ options?: RichCardsMessage.Options;
7
+ /** Your RCS agent ID which must be prefixed with 'agent_'. */
8
+ from: string;
9
+ /** Recipient's phone number in E.164 format. */
10
+ to: string;
11
+ }
12
+ export declare namespace RichCardsMessage {
13
+ interface Options extends Pinnacle.Options {
14
+ /**
15
+ * Configure standalone card layout options for enhanced visual presentation.
16
+ *
17
+ * > **⚠️ Important Restriction**
18
+ * >
19
+ * > This option is **only valid for single card messages**. Using it with multiple cards will cause the request to fail with a validation error.
20
+ */
21
+ standalone_card?: Options.StandaloneCard;
22
+ }
23
+ namespace Options {
24
+ /**
25
+ * Configure standalone card layout options for enhanced visual presentation.
26
+ *
27
+ * > **⚠️ Important Restriction**
28
+ * >
29
+ * > This option is **only valid for single card messages**. Using it with multiple cards will cause the request to fail with a validation error.
30
+ */
31
+ interface StandaloneCard {
32
+ /** The orientation of the standalone card. */
33
+ orientation?: StandaloneCard.Orientation;
34
+ /** The alignment of the image in the standalone card. This field is ignored if orientation is VERTICAL. */
35
+ image_alignment?: StandaloneCard.ImageAlignment;
36
+ }
37
+ namespace StandaloneCard {
38
+ /**
39
+ * The orientation of the standalone card.
40
+ */
41
+ type Orientation = "HORIZONTAL" | "VERTICAL";
42
+ const Orientation: {
43
+ readonly Horizontal: "HORIZONTAL";
44
+ readonly Vertical: "VERTICAL";
45
+ };
46
+ /**
47
+ * The alignment of the image in the standalone card. This field is ignored if orientation is VERTICAL.
48
+ */
49
+ type ImageAlignment = "LEFT" | "RIGHT";
50
+ const ImageAlignment: {
51
+ readonly Left: "LEFT";
52
+ readonly Right: "RIGHT";
53
+ };
54
+ }
55
+ }
6
56
  }
@@ -3,3 +3,21 @@
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.RichCardsMessage = void 0;
7
+ var RichCardsMessage;
8
+ (function (RichCardsMessage) {
9
+ let Options;
10
+ (function (Options) {
11
+ let StandaloneCard;
12
+ (function (StandaloneCard) {
13
+ StandaloneCard.Orientation = {
14
+ Horizontal: "HORIZONTAL",
15
+ Vertical: "VERTICAL",
16
+ };
17
+ StandaloneCard.ImageAlignment = {
18
+ Left: "LEFT",
19
+ Right: "RIGHT",
20
+ };
21
+ })(StandaloneCard = Options.StandaloneCard || (Options.StandaloneCard = {}));
22
+ })(Options = RichCardsMessage.Options || (RichCardsMessage.Options = {}));
23
+ })(RichCardsMessage || (exports.RichCardsMessage = RichCardsMessage = {}));
@@ -0,0 +1,22 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Response schema confirming the typing indicator was sent.
6
+ */
7
+ export interface SendTypingIndicatorResponse {
8
+ /** Indicates whether the typing indicator was successfully sent. */
9
+ success: boolean;
10
+ /** The RCS agent that sent the typing indicator. */
11
+ agentId: string;
12
+ /** The recipient's phone number that received the typing indicator. */
13
+ recipient: string;
14
+ /** Timestamp when the typing indicator was started (ISO 8601 format). */
15
+ startedAt: string;
16
+ /**
17
+ * Timestamp when the typing indicator will automatically expire (ISO 8601 format). <br>
18
+ *
19
+ * This is typically one minute after `startedAt` unless a message is sent first.
20
+ */
21
+ endedAt: string;
22
+ }
@@ -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 });
@@ -35,6 +35,10 @@ export * from "./RcsCampaignUseCaseEnum.js";
35
35
  export * from "./RcsCampaign.js";
36
36
  export * from "./ExtendedRcsCampaign.js";
37
37
  export * from "./Contact.js";
38
+ export * from "./Pagination.js";
39
+ export * from "./AudienceWithPagination.js";
40
+ export * from "./AudienceCountOnly.js";
41
+ export * from "./DeleteAudienceResponse.js";
38
42
  export * from "./OptionalContact.js";
39
43
  export * from "./UpdatedContactId.js";
40
44
  export * from "./ContactId.js";
@@ -80,9 +84,11 @@ export * from "./RcsBase.js";
80
84
  export * from "./RichTextMessage.js";
81
85
  export * from "./RichMediaMessage.js";
82
86
  export * from "./RcsCards.js";
87
+ export * from "./Options.js";
83
88
  export * from "./RichCardsMessage.js";
84
89
  export * from "./RichMessage.js";
85
90
  export * from "./SentRcsDetails.js";
91
+ export * from "./SendTypingIndicatorResponse.js";
86
92
  export * from "./SmsValidationResult.js";
87
93
  export * from "./MmsValidationResult.js";
88
94
  export * from "./RcsValidateContent.js";
@@ -51,6 +51,10 @@ __exportStar(require("./RcsCampaignUseCaseEnum.js"), exports);
51
51
  __exportStar(require("./RcsCampaign.js"), exports);
52
52
  __exportStar(require("./ExtendedRcsCampaign.js"), exports);
53
53
  __exportStar(require("./Contact.js"), exports);
54
+ __exportStar(require("./Pagination.js"), exports);
55
+ __exportStar(require("./AudienceWithPagination.js"), exports);
56
+ __exportStar(require("./AudienceCountOnly.js"), exports);
57
+ __exportStar(require("./DeleteAudienceResponse.js"), exports);
54
58
  __exportStar(require("./OptionalContact.js"), exports);
55
59
  __exportStar(require("./UpdatedContactId.js"), exports);
56
60
  __exportStar(require("./ContactId.js"), exports);
@@ -96,9 +100,11 @@ __exportStar(require("./RcsBase.js"), exports);
96
100
  __exportStar(require("./RichTextMessage.js"), exports);
97
101
  __exportStar(require("./RichMediaMessage.js"), exports);
98
102
  __exportStar(require("./RcsCards.js"), exports);
103
+ __exportStar(require("./Options.js"), exports);
99
104
  __exportStar(require("./RichCardsMessage.js"), exports);
100
105
  __exportStar(require("./RichMessage.js"), exports);
101
106
  __exportStar(require("./SentRcsDetails.js"), exports);
107
+ __exportStar(require("./SendTypingIndicatorResponse.js"), exports);
102
108
  __exportStar(require("./SmsValidationResult.js"), exports);
103
109
  __exportStar(require("./MmsValidationResult.js"), exports);
104
110
  __exportStar(require("./RcsValidateContent.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.0.3";
1
+ export declare const SDK_VERSION = "2.0.5-rc.1";
@@ -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 = "2.0.3";
4
+ exports.SDK_VERSION = "2.0.5-rc.1";
@@ -4,6 +4,7 @@
4
4
  import * as environments from "./environments.mjs";
5
5
  import * as core from "./core/index.mjs";
6
6
  import { Brands } from "./api/resources/brands/client/Client.mjs";
7
+ import { Audiences } from "./api/resources/audiences/client/Client.mjs";
7
8
  import { Contacts } from "./api/resources/contacts/client/Client.mjs";
8
9
  import { Conversations } from "./api/resources/conversations/client/Client.mjs";
9
10
  import { Messages } from "./api/resources/messages/client/Client.mjs";
@@ -38,6 +39,7 @@ export declare namespace PinnacleClient {
38
39
  export declare class PinnacleClient {
39
40
  protected readonly _options: PinnacleClient.Options;
40
41
  protected _brands: Brands | undefined;
42
+ protected _audiences: Audiences | undefined;
41
43
  protected _contacts: Contacts | undefined;
42
44
  protected _conversations: Conversations | undefined;
43
45
  protected _messages: Messages | undefined;
@@ -49,6 +51,7 @@ export declare class PinnacleClient {
49
51
  protected _tools: Tools | undefined;
50
52
  constructor(_options?: PinnacleClient.Options);
51
53
  get brands(): Brands;
54
+ get audiences(): Audiences;
52
55
  get contacts(): Contacts;
53
56
  get conversations(): Conversations;
54
57
  get messages(): Messages;
@@ -4,6 +4,7 @@
4
4
  import * as core from "./core/index.mjs";
5
5
  import { mergeHeaders } from "./core/headers.mjs";
6
6
  import { Brands } from "./api/resources/brands/client/Client.mjs";
7
+ import { Audiences } from "./api/resources/audiences/client/Client.mjs";
7
8
  import { Contacts } from "./api/resources/contacts/client/Client.mjs";
8
9
  import { Conversations } from "./api/resources/conversations/client/Client.mjs";
9
10
  import { Messages } from "./api/resources/messages/client/Client.mjs";
@@ -18,8 +19,8 @@ export class PinnacleClient {
18
19
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
19
20
  "X-Fern-Language": "JavaScript",
20
21
  "X-Fern-SDK-Name": "rcs-js",
21
- "X-Fern-SDK-Version": "2.0.3",
22
- "User-Agent": "rcs-js/2.0.3",
22
+ "X-Fern-SDK-Version": "2.0.5-rc.1",
23
+ "User-Agent": "rcs-js/2.0.5-rc.1",
23
24
  "X-Fern-Runtime": core.RUNTIME.type,
24
25
  "X-Fern-Runtime-Version": core.RUNTIME.version,
25
26
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -28,6 +29,10 @@ export class PinnacleClient {
28
29
  var _a;
29
30
  return ((_a = this._brands) !== null && _a !== void 0 ? _a : (this._brands = new Brands(this._options)));
30
31
  }
32
+ get audiences() {
33
+ var _a;
34
+ return ((_a = this._audiences) !== null && _a !== void 0 ? _a : (this._audiences = new Audiences(this._options)));
35
+ }
31
36
  get contacts() {
32
37
  var _a;
33
38
  return ((_a = this._contacts) !== null && _a !== void 0 ? _a : (this._contacts = new Contacts(this._options)));
@@ -0,0 +1,129 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../environments.mjs";
5
+ import * as core from "../../../../core/index.mjs";
6
+ import * as Pinnacle from "../../../index.mjs";
7
+ import { Contacts } from "../resources/contacts/client/Client.mjs";
8
+ export declare namespace Audiences {
9
+ interface Options {
10
+ environment?: core.Supplier<environments.PinnacleEnvironment | string>;
11
+ /** Specify a custom URL to connect the client to. */
12
+ baseUrl?: core.Supplier<string>;
13
+ apiKey?: core.Supplier<string | undefined>;
14
+ /** Additional headers to include in requests. */
15
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
16
+ }
17
+ interface RequestOptions {
18
+ /** The maximum time to wait for a response in seconds. */
19
+ timeoutInSeconds?: number;
20
+ /** The number of times to retry the request. Defaults to 2. */
21
+ maxRetries?: number;
22
+ /** A hook to abort the request. */
23
+ abortSignal?: AbortSignal;
24
+ /** Additional query string parameters to include in the request. */
25
+ queryParams?: Record<string, unknown>;
26
+ /** Additional headers to include in the request. */
27
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
28
+ }
29
+ }
30
+ export declare class Audiences {
31
+ protected readonly _options: Audiences.Options;
32
+ protected _contacts: Contacts | undefined;
33
+ constructor(_options?: Audiences.Options);
34
+ get contacts(): Contacts;
35
+ /**
36
+ * Retrieve an audience by ID with optional pagination.
37
+ *
38
+ * @param {Pinnacle.AudiencesGetRequest} request
39
+ * @param {Audiences.RequestOptions} requestOptions - Request-specific configuration.
40
+ *
41
+ * @throws {@link Pinnacle.BadRequestError}
42
+ * @throws {@link Pinnacle.UnauthorizedError}
43
+ * @throws {@link Pinnacle.NotFoundError}
44
+ * @throws {@link Pinnacle.InternalServerError}
45
+ *
46
+ * @example
47
+ * await client.audiences.get({
48
+ * id: "aud_abc123"
49
+ * })
50
+ */
51
+ get(request: Pinnacle.AudiencesGetRequest, requestOptions?: Audiences.RequestOptions): core.HttpResponsePromise<Pinnacle.AudiencesGetResponse>;
52
+ private __get;
53
+ /**
54
+ * Create a new audience with optional initial contacts. Phone numbers that don't exist will be auto-created as contacts.
55
+ *
56
+ * @param {Pinnacle.CreateAudienceParams} request
57
+ * @param {Audiences.RequestOptions} requestOptions - Request-specific configuration.
58
+ *
59
+ * @throws {@link Pinnacle.BadRequestError}
60
+ * @throws {@link Pinnacle.UnauthorizedError}
61
+ * @throws {@link Pinnacle.InternalServerError}
62
+ *
63
+ * @example
64
+ * await client.audiences.create({
65
+ * name: "Marketing Campaign Q1",
66
+ * description: "Contacts for Q1 marketing push"
67
+ * })
68
+ *
69
+ * @example
70
+ * await client.audiences.create({
71
+ * name: "VIP Customers",
72
+ * description: "Our best customers",
73
+ * contacts: ["+12125551234", "+13105551234"]
74
+ * })
75
+ *
76
+ * @example
77
+ * await client.audiences.create({
78
+ * name: "Mixed Audience",
79
+ * contacts: ["+12125551234", "cont_abc123", "+13105551234"]
80
+ * })
81
+ */
82
+ create(request: Pinnacle.CreateAudienceParams, requestOptions?: Audiences.RequestOptions): core.HttpResponsePromise<Pinnacle.AudienceCountOnly>;
83
+ private __create;
84
+ /**
85
+ * Permanently delete an audience and all its contact associations.
86
+ *
87
+ * Note: This will NOT delete the contacts themselves, only the audience and its memberships.
88
+ *
89
+ * @param {Pinnacle.AudiencesDeleteRequest} request
90
+ * @param {Audiences.RequestOptions} requestOptions - Request-specific configuration.
91
+ *
92
+ * @throws {@link Pinnacle.BadRequestError}
93
+ * @throws {@link Pinnacle.UnauthorizedError}
94
+ * @throws {@link Pinnacle.NotFoundError}
95
+ * @throws {@link Pinnacle.InternalServerError}
96
+ *
97
+ * @example
98
+ * await client.audiences.delete({
99
+ * id: "aud_abc123"
100
+ * })
101
+ */
102
+ delete(request: Pinnacle.AudiencesDeleteRequest, requestOptions?: Audiences.RequestOptions): core.HttpResponsePromise<Pinnacle.DeleteAudienceResponse>;
103
+ private __delete;
104
+ /**
105
+ * Update audience metadata. This endpoint does NOT modify contacts.
106
+ *
107
+ * To add or remove contacts, use the [Add Contacts](/api-reference/audiences/add-contacts) or [Remove Contacts](/api-reference/audiences/remove-contacts) endpoints.
108
+ *
109
+ * @param {Pinnacle.UpdateAudienceParams} request
110
+ * @param {Audiences.RequestOptions} requestOptions - Request-specific configuration.
111
+ *
112
+ * @throws {@link Pinnacle.BadRequestError}
113
+ * @throws {@link Pinnacle.UnauthorizedError}
114
+ * @throws {@link Pinnacle.NotFoundError}
115
+ * @throws {@link Pinnacle.InternalServerError}
116
+ *
117
+ * @example
118
+ * await client.audiences.update({
119
+ * id: "aud_abc123",
120
+ * name: "Updated Audience Name",
121
+ * description: "New description"
122
+ * })
123
+ */
124
+ update(request: Pinnacle.UpdateAudienceParams, requestOptions?: Audiences.RequestOptions): core.HttpResponsePromise<Pinnacle.AudienceCountOnly>;
125
+ private __update;
126
+ protected _getCustomAuthorizationHeaders(): Promise<{
127
+ "PINNACLE-API-KEY": string | undefined;
128
+ }>;
129
+ }