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
@@ -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
  }
@@ -1,4 +1,11 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export {};
4
+ export var RcsButtonOpenUrl;
5
+ (function (RcsButtonOpenUrl) {
6
+ RcsButtonOpenUrl.WebviewMode = {
7
+ Half: "HALF",
8
+ Tall: "TALL",
9
+ Full: "FULL",
10
+ };
11
+ })(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.mjs";
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
  }
@@ -1,4 +1,20 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export {};
4
+ export var RichCardsMessage;
5
+ (function (RichCardsMessage) {
6
+ let Options;
7
+ (function (Options) {
8
+ let StandaloneCard;
9
+ (function (StandaloneCard) {
10
+ StandaloneCard.Orientation = {
11
+ Horizontal: "HORIZONTAL",
12
+ Vertical: "VERTICAL",
13
+ };
14
+ StandaloneCard.ImageAlignment = {
15
+ Left: "LEFT",
16
+ Right: "RIGHT",
17
+ };
18
+ })(StandaloneCard = Options.StandaloneCard || (Options.StandaloneCard = {}));
19
+ })(Options = RichCardsMessage.Options || (RichCardsMessage.Options = {}));
20
+ })(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,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -35,6 +35,10 @@ export * from "./RcsCampaignUseCaseEnum.mjs";
35
35
  export * from "./RcsCampaign.mjs";
36
36
  export * from "./ExtendedRcsCampaign.mjs";
37
37
  export * from "./Contact.mjs";
38
+ export * from "./Pagination.mjs";
39
+ export * from "./AudienceWithPagination.mjs";
40
+ export * from "./AudienceCountOnly.mjs";
41
+ export * from "./DeleteAudienceResponse.mjs";
38
42
  export * from "./OptionalContact.mjs";
39
43
  export * from "./UpdatedContactId.mjs";
40
44
  export * from "./ContactId.mjs";
@@ -80,9 +84,11 @@ export * from "./RcsBase.mjs";
80
84
  export * from "./RichTextMessage.mjs";
81
85
  export * from "./RichMediaMessage.mjs";
82
86
  export * from "./RcsCards.mjs";
87
+ export * from "./Options.mjs";
83
88
  export * from "./RichCardsMessage.mjs";
84
89
  export * from "./RichMessage.mjs";
85
90
  export * from "./SentRcsDetails.mjs";
91
+ export * from "./SendTypingIndicatorResponse.mjs";
86
92
  export * from "./SmsValidationResult.mjs";
87
93
  export * from "./MmsValidationResult.mjs";
88
94
  export * from "./RcsValidateContent.mjs";
@@ -35,6 +35,10 @@ export * from "./RcsCampaignUseCaseEnum.mjs";
35
35
  export * from "./RcsCampaign.mjs";
36
36
  export * from "./ExtendedRcsCampaign.mjs";
37
37
  export * from "./Contact.mjs";
38
+ export * from "./Pagination.mjs";
39
+ export * from "./AudienceWithPagination.mjs";
40
+ export * from "./AudienceCountOnly.mjs";
41
+ export * from "./DeleteAudienceResponse.mjs";
38
42
  export * from "./OptionalContact.mjs";
39
43
  export * from "./UpdatedContactId.mjs";
40
44
  export * from "./ContactId.mjs";
@@ -80,9 +84,11 @@ export * from "./RcsBase.mjs";
80
84
  export * from "./RichTextMessage.mjs";
81
85
  export * from "./RichMediaMessage.mjs";
82
86
  export * from "./RcsCards.mjs";
87
+ export * from "./Options.mjs";
83
88
  export * from "./RichCardsMessage.mjs";
84
89
  export * from "./RichMessage.mjs";
85
90
  export * from "./SentRcsDetails.mjs";
91
+ export * from "./SendTypingIndicatorResponse.mjs";
86
92
  export * from "./SmsValidationResult.mjs";
87
93
  export * from "./MmsValidationResult.mjs";
88
94
  export * from "./RcsValidateContent.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.0.3";
1
+ export declare const SDK_VERSION = "2.0.5-rc.1";
@@ -1 +1 @@
1
- export const SDK_VERSION = "2.0.3";
1
+ export const SDK_VERSION = "2.0.5-rc.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rcs-js",
3
- "version": "2.0.3",
3
+ "version": "2.0.5-rc.1",
4
4
  "private": false,
5
5
  "repository": "github:pinnacle-dev/rcs-js",
6
6
  "type": "commonjs",
@@ -36,7 +36,7 @@
36
36
  "test": "jest --selectProjects unit && NODE_OPTIONS=--experimental-vm-modules jest --selectProjects wire",
37
37
  "test:unit": "jest --selectProjects unit",
38
38
  "test:browser": "jest --selectProjects browser",
39
- "test:wire": "NODE_OPTIONS=--experimental-vm-modules jest --selectProjects wire"
39
+ "test:wire": "NODE_OPTIONS='--experimental-vm-modules' jest --selectProjects wire"
40
40
  },
41
41
  "dependencies": {
42
42
  "mime-types": "^3.0.1"