@relayapi/sdk 0.2.2

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 (242) hide show
  1. package/dist/api-promise.d.ts +2 -0
  2. package/dist/api-promise.js +18 -0
  3. package/dist/client.d.ts +225 -0
  4. package/dist/client.js +552 -0
  5. package/dist/core/api-promise.d.ts +45 -0
  6. package/dist/core/api-promise.js +83 -0
  7. package/dist/core/error.d.ts +45 -0
  8. package/dist/core/error.js +112 -0
  9. package/dist/core/resource.d.ts +5 -0
  10. package/dist/core/resource.js +10 -0
  11. package/dist/core/uploads.d.ts +2 -0
  12. package/dist/core/uploads.js +5 -0
  13. package/dist/error.d.ts +2 -0
  14. package/dist/error.js +18 -0
  15. package/dist/index.d.ts +5 -0
  16. package/dist/index.js +26 -0
  17. package/dist/internal/builtin-types.d.ts +72 -0
  18. package/dist/internal/builtin-types.js +3 -0
  19. package/dist/internal/detect-platform.d.ts +14 -0
  20. package/dist/internal/detect-platform.js +161 -0
  21. package/dist/internal/errors.d.ts +2 -0
  22. package/dist/internal/errors.js +40 -0
  23. package/dist/internal/headers.d.ts +19 -0
  24. package/dist/internal/headers.js +78 -0
  25. package/dist/internal/parse.d.ts +11 -0
  26. package/dist/internal/parse.js +39 -0
  27. package/dist/internal/request-options.d.ts +74 -0
  28. package/dist/internal/request-options.js +13 -0
  29. package/dist/internal/shim-types.d.ts +16 -0
  30. package/dist/internal/shim-types.js +3 -0
  31. package/dist/internal/shims.d.ts +23 -0
  32. package/dist/internal/shims.js +90 -0
  33. package/dist/internal/to-file.d.ts +44 -0
  34. package/dist/internal/to-file.js +90 -0
  35. package/dist/internal/types.d.ts +68 -0
  36. package/dist/internal/types.js +3 -0
  37. package/dist/internal/uploads.d.ts +41 -0
  38. package/dist/internal/uploads.js +140 -0
  39. package/dist/internal/utils/base64.d.ts +2 -0
  40. package/dist/internal/utils/base64.js +37 -0
  41. package/dist/internal/utils/bytes.d.ts +3 -0
  42. package/dist/internal/utils/bytes.js +30 -0
  43. package/dist/internal/utils/env.d.ts +8 -0
  44. package/dist/internal/utils/env.js +21 -0
  45. package/dist/internal/utils/log.d.ts +36 -0
  46. package/dist/internal/utils/log.js +84 -0
  47. package/dist/internal/utils/path.d.ts +14 -0
  48. package/dist/internal/utils/path.js +78 -0
  49. package/dist/internal/utils/query.d.ts +4 -0
  50. package/dist/internal/utils/query.js +22 -0
  51. package/dist/internal/utils/sleep.d.ts +1 -0
  52. package/dist/internal/utils/sleep.js +6 -0
  53. package/dist/internal/utils/uuid.d.ts +4 -0
  54. package/dist/internal/utils/uuid.js +18 -0
  55. package/dist/internal/utils/values.d.ts +17 -0
  56. package/dist/internal/utils/values.js +111 -0
  57. package/dist/internal/utils.d.ts +7 -0
  58. package/dist/internal/utils.js +24 -0
  59. package/dist/resource.d.ts +2 -0
  60. package/dist/resource.js +18 -0
  61. package/dist/resources/account-groups.d.ts +52 -0
  62. package/dist/resources/account-groups.js +37 -0
  63. package/dist/resources/accounts/accounts.d.ts +148 -0
  64. package/dist/resources/accounts/accounts.js +101 -0
  65. package/dist/resources/accounts/facebook-pages.d.ts +48 -0
  66. package/dist/resources/accounts/facebook-pages.js +21 -0
  67. package/dist/resources/accounts/gmb-locations.d.ts +48 -0
  68. package/dist/resources/accounts/gmb-locations.js +21 -0
  69. package/dist/resources/accounts/health.d.ts +49 -0
  70. package/dist/resources/accounts/health.js +21 -0
  71. package/dist/resources/accounts/index.d.ts +8 -0
  72. package/dist/resources/accounts/index.js +20 -0
  73. package/dist/resources/accounts/linkedin-organizations.d.ts +52 -0
  74. package/dist/resources/accounts/linkedin-organizations.js +21 -0
  75. package/dist/resources/accounts/pinterest-boards.d.ts +48 -0
  76. package/dist/resources/accounts/pinterest-boards.js +21 -0
  77. package/dist/resources/accounts/reddit-flairs.d.ts +27 -0
  78. package/dist/resources/accounts/reddit-flairs.js +15 -0
  79. package/dist/resources/accounts/reddit-subreddits.d.ts +48 -0
  80. package/dist/resources/accounts/reddit-subreddits.js +21 -0
  81. package/dist/resources/accounts.d.ts +1 -0
  82. package/dist/resources/accounts.js +18 -0
  83. package/dist/resources/analytics/analytics.d.ts +369 -0
  84. package/dist/resources/analytics/analytics.js +84 -0
  85. package/dist/resources/analytics/index.d.ts +2 -0
  86. package/dist/resources/analytics/index.js +8 -0
  87. package/dist/resources/analytics/youtube.d.ts +49 -0
  88. package/dist/resources/analytics/youtube.js +14 -0
  89. package/dist/resources/analytics.d.ts +1 -0
  90. package/dist/resources/analytics.js +18 -0
  91. package/dist/resources/api-keys.d.ts +110 -0
  92. package/dist/resources/api-keys.js +32 -0
  93. package/dist/resources/connect/connect.d.ts +188 -0
  94. package/dist/resources/connect/connect.js +97 -0
  95. package/dist/resources/connect/facebook/facebook.d.ts +9 -0
  96. package/dist/resources/connect/facebook/facebook.js +48 -0
  97. package/dist/resources/connect/facebook/index.d.ts +2 -0
  98. package/dist/resources/connect/facebook/index.js +8 -0
  99. package/dist/resources/connect/facebook/pages.d.ts +70 -0
  100. package/dist/resources/connect/facebook/pages.js +20 -0
  101. package/dist/resources/connect/facebook.d.ts +1 -0
  102. package/dist/resources/connect/facebook.js +18 -0
  103. package/dist/resources/connect/googlebusiness/googlebusiness.d.ts +9 -0
  104. package/dist/resources/connect/googlebusiness/googlebusiness.js +48 -0
  105. package/dist/resources/connect/googlebusiness/index.d.ts +2 -0
  106. package/dist/resources/connect/googlebusiness/index.js +8 -0
  107. package/dist/resources/connect/googlebusiness/locations.d.ts +70 -0
  108. package/dist/resources/connect/googlebusiness/locations.js +20 -0
  109. package/dist/resources/connect/googlebusiness.d.ts +1 -0
  110. package/dist/resources/connect/googlebusiness.js +18 -0
  111. package/dist/resources/connect/index.d.ts +8 -0
  112. package/dist/resources/connect/index.js +20 -0
  113. package/dist/resources/connect/linkedin/index.d.ts +2 -0
  114. package/dist/resources/connect/linkedin/index.js +8 -0
  115. package/dist/resources/connect/linkedin/linkedin.d.ts +9 -0
  116. package/dist/resources/connect/linkedin/linkedin.js +48 -0
  117. package/dist/resources/connect/linkedin/organizations.d.ts +85 -0
  118. package/dist/resources/connect/linkedin/organizations.js +20 -0
  119. package/dist/resources/connect/linkedin.d.ts +1 -0
  120. package/dist/resources/connect/linkedin.js +18 -0
  121. package/dist/resources/connect/pinterest/boards.d.ts +70 -0
  122. package/dist/resources/connect/pinterest/boards.js +20 -0
  123. package/dist/resources/connect/pinterest/index.d.ts +2 -0
  124. package/dist/resources/connect/pinterest/index.js +8 -0
  125. package/dist/resources/connect/pinterest/pinterest.d.ts +9 -0
  126. package/dist/resources/connect/pinterest/pinterest.js +48 -0
  127. package/dist/resources/connect/pinterest.d.ts +1 -0
  128. package/dist/resources/connect/pinterest.js +18 -0
  129. package/dist/resources/connect/snapchat/index.d.ts +2 -0
  130. package/dist/resources/connect/snapchat/index.js +8 -0
  131. package/dist/resources/connect/snapchat/profiles.d.ts +74 -0
  132. package/dist/resources/connect/snapchat/profiles.js +20 -0
  133. package/dist/resources/connect/snapchat/snapchat.d.ts +9 -0
  134. package/dist/resources/connect/snapchat/snapchat.js +48 -0
  135. package/dist/resources/connect/snapchat.d.ts +1 -0
  136. package/dist/resources/connect/snapchat.js +18 -0
  137. package/dist/resources/connect/telegram.d.ts +122 -0
  138. package/dist/resources/connect/telegram.js +26 -0
  139. package/dist/resources/connect/whatsapp.d.ts +92 -0
  140. package/dist/resources/connect/whatsapp.js +26 -0
  141. package/dist/resources/connect.d.ts +1 -0
  142. package/dist/resources/connect.js +18 -0
  143. package/dist/resources/connections.d.ts +55 -0
  144. package/dist/resources/connections.js +14 -0
  145. package/dist/resources/inbox/comments/comments.d.ts +220 -0
  146. package/dist/resources/inbox/comments/comments.js +83 -0
  147. package/dist/resources/inbox/comments/hide.d.ts +36 -0
  148. package/dist/resources/inbox/comments/hide.js +21 -0
  149. package/dist/resources/inbox/comments/index.d.ts +3 -0
  150. package/dist/resources/inbox/comments/index.js +10 -0
  151. package/dist/resources/inbox/comments/like.d.ts +36 -0
  152. package/dist/resources/inbox/comments/like.js +21 -0
  153. package/dist/resources/inbox/comments.d.ts +1 -0
  154. package/dist/resources/inbox/comments.js +18 -0
  155. package/dist/resources/inbox/inbox.d.ts +17 -0
  156. package/dist/resources/inbox/inbox.js +56 -0
  157. package/dist/resources/inbox/index.d.ts +4 -0
  158. package/dist/resources/inbox/index.js +12 -0
  159. package/dist/resources/inbox/messages.d.ts +205 -0
  160. package/dist/resources/inbox/messages.js +40 -0
  161. package/dist/resources/inbox/reviews/index.d.ts +2 -0
  162. package/dist/resources/inbox/reviews/index.js +8 -0
  163. package/dist/resources/inbox/reviews/reply.d.ts +38 -0
  164. package/dist/resources/inbox/reviews/reply.js +21 -0
  165. package/dist/resources/inbox/reviews/reviews.d.ts +76 -0
  166. package/dist/resources/inbox/reviews/reviews.js +54 -0
  167. package/dist/resources/inbox/reviews.d.ts +1 -0
  168. package/dist/resources/inbox/reviews.js +18 -0
  169. package/dist/resources/inbox.d.ts +1 -0
  170. package/dist/resources/inbox.js +18 -0
  171. package/dist/resources/index.d.ts +16 -0
  172. package/dist/resources/index.js +36 -0
  173. package/dist/resources/media.d.ts +177 -0
  174. package/dist/resources/media.js +51 -0
  175. package/dist/resources/posts/index.d.ts +2 -0
  176. package/dist/resources/posts/index.js +8 -0
  177. package/dist/resources/posts/logs.d.ts +134 -0
  178. package/dist/resources/posts/logs.js +31 -0
  179. package/dist/resources/posts/posts.d.ts +607 -0
  180. package/dist/resources/posts/posts.js +149 -0
  181. package/dist/resources/posts.d.ts +1 -0
  182. package/dist/resources/posts.js +18 -0
  183. package/dist/resources/queue/index.d.ts +2 -0
  184. package/dist/resources/queue/index.js +8 -0
  185. package/dist/resources/queue/queue.d.ts +42 -0
  186. package/dist/resources/queue/queue.js +60 -0
  187. package/dist/resources/queue/slots.d.ts +215 -0
  188. package/dist/resources/queue/slots.js +36 -0
  189. package/dist/resources/queue.d.ts +1 -0
  190. package/dist/resources/queue.js +18 -0
  191. package/dist/resources/reddit.d.ts +186 -0
  192. package/dist/resources/reddit.js +20 -0
  193. package/dist/resources/tools/index.d.ts +3 -0
  194. package/dist/resources/tools/index.js +10 -0
  195. package/dist/resources/tools/instagram.d.ts +41 -0
  196. package/dist/resources/tools/instagram.js +22 -0
  197. package/dist/resources/tools/tools.d.ts +13 -0
  198. package/dist/resources/tools/tools.js +52 -0
  199. package/dist/resources/tools/validate.d.ts +689 -0
  200. package/dist/resources/tools/validate.js +63 -0
  201. package/dist/resources/tools.d.ts +1 -0
  202. package/dist/resources/tools.js +18 -0
  203. package/dist/resources/twitter/bookmark.d.ts +48 -0
  204. package/dist/resources/twitter/bookmark.js +20 -0
  205. package/dist/resources/twitter/follow.d.ts +48 -0
  206. package/dist/resources/twitter/follow.js +20 -0
  207. package/dist/resources/twitter/index.d.ts +4 -0
  208. package/dist/resources/twitter/index.js +12 -0
  209. package/dist/resources/twitter/retweet.d.ts +48 -0
  210. package/dist/resources/twitter/retweet.js +20 -0
  211. package/dist/resources/twitter/twitter.d.ts +17 -0
  212. package/dist/resources/twitter/twitter.js +56 -0
  213. package/dist/resources/twitter.d.ts +1 -0
  214. package/dist/resources/twitter.js +18 -0
  215. package/dist/resources/usage.d.ts +97 -0
  216. package/dist/resources/usage.js +14 -0
  217. package/dist/resources/webhooks.d.ts +205 -0
  218. package/dist/resources/webhooks.js +50 -0
  219. package/dist/resources/whatsapp/broadcasts.d.ts +291 -0
  220. package/dist/resources/whatsapp/broadcasts.js +49 -0
  221. package/dist/resources/whatsapp/business-profile.d.ts +85 -0
  222. package/dist/resources/whatsapp/business-profile.js +20 -0
  223. package/dist/resources/whatsapp/contacts.d.ts +250 -0
  224. package/dist/resources/whatsapp/contacts.js +49 -0
  225. package/dist/resources/whatsapp/groups.d.ts +87 -0
  226. package/dist/resources/whatsapp/groups.js +31 -0
  227. package/dist/resources/whatsapp/index.d.ts +6 -0
  228. package/dist/resources/whatsapp/index.js +16 -0
  229. package/dist/resources/whatsapp/templates.d.ts +250 -0
  230. package/dist/resources/whatsapp/templates.js +39 -0
  231. package/dist/resources/whatsapp/whatsapp.d.ts +148 -0
  232. package/dist/resources/whatsapp/whatsapp.js +76 -0
  233. package/dist/resources/whatsapp.d.ts +1 -0
  234. package/dist/resources/whatsapp.js +18 -0
  235. package/dist/resources.d.ts +1 -0
  236. package/dist/resources.js +17 -0
  237. package/dist/uploads.d.ts +2 -0
  238. package/dist/uploads.js +18 -0
  239. package/dist/version.d.ts +1 -0
  240. package/dist/version.js +5 -0
  241. package/package.json +28 -0
  242. package/src/index.ts +22 -0
@@ -0,0 +1,205 @@
1
+ import { APIResource } from '../../core/resource';
2
+ import { APIPromise } from '../../core/api-promise';
3
+ import { RequestOptions } from '../../internal/request-options';
4
+ export declare class Messages extends APIResource {
5
+ /**
6
+ * Get messages in a conversation
7
+ */
8
+ retrieve(conversationID: string, options?: RequestOptions): APIPromise<MessageRetrieveResponse>;
9
+ /**
10
+ * List message conversations
11
+ */
12
+ list(query?: MessageListParams | null | undefined, options?: RequestOptions): APIPromise<MessageListResponse>;
13
+ /**
14
+ * Archive a conversation
15
+ */
16
+ archive(conversationID: string, options?: RequestOptions): APIPromise<MessageArchiveResponse>;
17
+ /**
18
+ * Edit a sent message
19
+ */
20
+ edit(messageID: string, params: MessageEditParams, options?: RequestOptions): APIPromise<MessageEditResponse>;
21
+ /**
22
+ * Send a message in a conversation
23
+ */
24
+ send(conversationID: string, body: MessageSendParams, options?: RequestOptions): APIPromise<MessageSendResponse>;
25
+ }
26
+ export interface MessageRetrieveResponse {
27
+ data: Array<MessageRetrieveResponse.Data>;
28
+ has_more?: boolean;
29
+ next_cursor?: string | null;
30
+ }
31
+ export declare namespace MessageRetrieveResponse {
32
+ interface Data {
33
+ /**
34
+ * Message ID
35
+ */
36
+ id: string;
37
+ /**
38
+ * Message timestamp
39
+ */
40
+ created_at: string;
41
+ /**
42
+ * Message sender
43
+ */
44
+ sender: 'user' | 'participant';
45
+ /**
46
+ * Message text
47
+ */
48
+ text: string;
49
+ /**
50
+ * Message attachments
51
+ */
52
+ attachments?: Array<Data.Attachment>;
53
+ }
54
+ namespace Data {
55
+ interface Attachment {
56
+ /**
57
+ * Attachment MIME type
58
+ */
59
+ type: string;
60
+ /**
61
+ * Attachment URL
62
+ */
63
+ url: string;
64
+ }
65
+ }
66
+ }
67
+ export interface MessageListResponse {
68
+ data: Array<MessageListResponse.Data>;
69
+ /**
70
+ * Whether more items exist
71
+ */
72
+ has_more: boolean;
73
+ /**
74
+ * Cursor for next page
75
+ */
76
+ next_cursor: string | null;
77
+ }
78
+ export declare namespace MessageListResponse {
79
+ interface Data {
80
+ /**
81
+ * Conversation ID
82
+ */
83
+ id: string;
84
+ /**
85
+ * Account ID
86
+ */
87
+ account_id: string;
88
+ /**
89
+ * Participant display name
90
+ */
91
+ participant_name: string;
92
+ platform: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
93
+ /**
94
+ * Last updated timestamp
95
+ */
96
+ updated_at: string;
97
+ /**
98
+ * Last message text
99
+ */
100
+ last_message?: string | null;
101
+ /**
102
+ * Participant avatar URL
103
+ */
104
+ participant_avatar?: string | null;
105
+ /**
106
+ * Unread message count
107
+ */
108
+ unread_count?: number;
109
+ }
110
+ }
111
+ export interface MessageArchiveResponse {
112
+ /**
113
+ * Whether the action succeeded
114
+ */
115
+ success: boolean;
116
+ /**
117
+ * Message ID
118
+ */
119
+ message_id?: string;
120
+ }
121
+ export interface MessageEditResponse {
122
+ /**
123
+ * Whether the action succeeded
124
+ */
125
+ success: boolean;
126
+ /**
127
+ * Message ID
128
+ */
129
+ message_id?: string;
130
+ }
131
+ export interface MessageSendResponse {
132
+ /**
133
+ * Whether the action succeeded
134
+ */
135
+ success: boolean;
136
+ /**
137
+ * Message ID
138
+ */
139
+ message_id?: string;
140
+ }
141
+ export interface MessageListParams {
142
+ /**
143
+ * Filter by account ID
144
+ */
145
+ account_id?: string;
146
+ /**
147
+ * Pagination cursor
148
+ */
149
+ cursor?: string;
150
+ /**
151
+ * Number of items
152
+ */
153
+ limit?: number;
154
+ /**
155
+ * Filter by platform
156
+ */
157
+ platform?: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
158
+ }
159
+ export interface MessageEditParams {
160
+ /**
161
+ * Path param: Conversation ID
162
+ */
163
+ conversation_id: string;
164
+ /**
165
+ * Body param: Updated message text
166
+ */
167
+ text: string;
168
+ }
169
+ export interface MessageSendParams {
170
+ /**
171
+ * Account ID to send from
172
+ */
173
+ account_id: string;
174
+ /**
175
+ * Message text
176
+ */
177
+ text: string;
178
+ /**
179
+ * Attachments
180
+ */
181
+ attachments?: Array<MessageSendParams.Attachment>;
182
+ /**
183
+ * Message tag (e.g. for Facebook outside 24h window)
184
+ */
185
+ message_tag?: string;
186
+ /**
187
+ * Message ID to reply to
188
+ */
189
+ reply_to?: string;
190
+ }
191
+ export declare namespace MessageSendParams {
192
+ interface Attachment {
193
+ /**
194
+ * Attachment MIME type
195
+ */
196
+ type: string;
197
+ /**
198
+ * Attachment URL
199
+ */
200
+ url: string;
201
+ }
202
+ }
203
+ export declare namespace Messages {
204
+ export { type MessageRetrieveResponse as MessageRetrieveResponse, type MessageListResponse as MessageListResponse, type MessageArchiveResponse as MessageArchiveResponse, type MessageEditResponse as MessageEditResponse, type MessageSendResponse as MessageSendResponse, type MessageListParams as MessageListParams, type MessageEditParams as MessageEditParams, type MessageSendParams as MessageSendParams, };
205
+ }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Messages = void 0;
5
+ const resource_1 = require("../../core/resource");
6
+ const path_1 = require("../../internal/utils/path");
7
+ class Messages extends resource_1.APIResource {
8
+ /**
9
+ * Get messages in a conversation
10
+ */
11
+ retrieve(conversationID, options) {
12
+ return this._client.get((0, path_1.path) `/v1/inbox/messages/${conversationID}`, options);
13
+ }
14
+ /**
15
+ * List message conversations
16
+ */
17
+ list(query = {}, options) {
18
+ return this._client.get('/v1/inbox/messages', { query, ...options });
19
+ }
20
+ /**
21
+ * Archive a conversation
22
+ */
23
+ archive(conversationID, options) {
24
+ return this._client.put((0, path_1.path) `/v1/inbox/messages/${conversationID}/archive`, options);
25
+ }
26
+ /**
27
+ * Edit a sent message
28
+ */
29
+ edit(messageID, params, options) {
30
+ const { conversation_id, ...body } = params;
31
+ return this._client.patch((0, path_1.path) `/v1/inbox/messages/${conversation_id}/${messageID}`, { body, ...options });
32
+ }
33
+ /**
34
+ * Send a message in a conversation
35
+ */
36
+ send(conversationID, body, options) {
37
+ return this._client.post((0, path_1.path) `/v1/inbox/messages/${conversationID}`, { body, ...options });
38
+ }
39
+ }
40
+ exports.Messages = Messages;
@@ -0,0 +1,2 @@
1
+ export { Reply, type ReplyCreateResponse, type ReplyDeleteResponse, type ReplyCreateParams } from './reply';
2
+ export { Reviews, type ReviewListResponse, type ReviewListParams } from './reviews';
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Reviews = exports.Reply = void 0;
5
+ var reply_1 = require("./reply");
6
+ Object.defineProperty(exports, "Reply", { enumerable: true, get: function () { return reply_1.Reply; } });
7
+ var reviews_1 = require("./reviews");
8
+ Object.defineProperty(exports, "Reviews", { enumerable: true, get: function () { return reviews_1.Reviews; } });
@@ -0,0 +1,38 @@
1
+ import { APIResource } from '../../../core/resource';
2
+ import { APIPromise } from '../../../core/api-promise';
3
+ import { RequestOptions } from '../../../internal/request-options';
4
+ export declare class Reply extends APIResource {
5
+ /**
6
+ * Reply to a review
7
+ */
8
+ create(reviewID: string, body: ReplyCreateParams, options?: RequestOptions): APIPromise<ReplyCreateResponse>;
9
+ /**
10
+ * Delete a review reply
11
+ */
12
+ delete(reviewID: string, options?: RequestOptions): APIPromise<ReplyDeleteResponse>;
13
+ }
14
+ export interface ReplyCreateResponse {
15
+ /**
16
+ * Whether the action succeeded
17
+ */
18
+ success: boolean;
19
+ }
20
+ export interface ReplyDeleteResponse {
21
+ /**
22
+ * Whether the action succeeded
23
+ */
24
+ success: boolean;
25
+ }
26
+ export interface ReplyCreateParams {
27
+ /**
28
+ * Account ID
29
+ */
30
+ account_id: string;
31
+ /**
32
+ * Reply text
33
+ */
34
+ text: string;
35
+ }
36
+ export declare namespace Reply {
37
+ export { type ReplyCreateResponse as ReplyCreateResponse, type ReplyDeleteResponse as ReplyDeleteResponse, type ReplyCreateParams as ReplyCreateParams, };
38
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Reply = void 0;
5
+ const resource_1 = require("../../../core/resource");
6
+ const path_1 = require("../../../internal/utils/path");
7
+ class Reply extends resource_1.APIResource {
8
+ /**
9
+ * Reply to a review
10
+ */
11
+ create(reviewID, body, options) {
12
+ return this._client.post((0, path_1.path) `/v1/inbox/reviews/${reviewID}/reply`, { body, ...options });
13
+ }
14
+ /**
15
+ * Delete a review reply
16
+ */
17
+ delete(reviewID, options) {
18
+ return this._client.delete((0, path_1.path) `/v1/inbox/reviews/${reviewID}/reply`, options);
19
+ }
20
+ }
21
+ exports.Reply = Reply;
@@ -0,0 +1,76 @@
1
+ import { APIResource } from '../../../core/resource';
2
+ import * as ReplyAPI from './reply';
3
+ import { Reply, ReplyCreateParams, ReplyCreateResponse, ReplyDeleteResponse } from './reply';
4
+ import { APIPromise } from '../../../core/api-promise';
5
+ import { RequestOptions } from '../../../internal/request-options';
6
+ export declare class Reviews extends APIResource {
7
+ reply: ReplyAPI.Reply;
8
+ /**
9
+ * List reviews across platforms
10
+ */
11
+ list(query?: ReviewListParams | null | undefined, options?: RequestOptions): APIPromise<ReviewListResponse>;
12
+ }
13
+ export interface ReviewListResponse {
14
+ data: Array<ReviewListResponse.Data>;
15
+ /**
16
+ * Whether more items exist
17
+ */
18
+ has_more: boolean;
19
+ /**
20
+ * Cursor for next page
21
+ */
22
+ next_cursor: string | null;
23
+ }
24
+ export declare namespace ReviewListResponse {
25
+ interface Data {
26
+ /**
27
+ * Review ID
28
+ */
29
+ id: string;
30
+ /**
31
+ * Review author name
32
+ */
33
+ author_name: string;
34
+ /**
35
+ * Review timestamp
36
+ */
37
+ created_at: string;
38
+ platform: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
39
+ /**
40
+ * Rating (1-5)
41
+ */
42
+ rating: number;
43
+ /**
44
+ * Business reply text
45
+ */
46
+ reply?: string | null;
47
+ /**
48
+ * Review text
49
+ */
50
+ text?: string | null;
51
+ }
52
+ }
53
+ export interface ReviewListParams {
54
+ /**
55
+ * Filter by account ID
56
+ */
57
+ account_id?: string;
58
+ /**
59
+ * Pagination cursor
60
+ */
61
+ cursor?: string;
62
+ /**
63
+ * Number of items
64
+ */
65
+ limit?: number;
66
+ max_rating?: number;
67
+ min_rating?: number;
68
+ /**
69
+ * Filter by platform
70
+ */
71
+ platform?: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
72
+ }
73
+ export declare namespace Reviews {
74
+ export { type ReviewListResponse as ReviewListResponse, type ReviewListParams as ReviewListParams };
75
+ export { Reply as Reply, type ReplyCreateResponse as ReplyCreateResponse, type ReplyDeleteResponse as ReplyDeleteResponse, type ReplyCreateParams as ReplyCreateParams, };
76
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.Reviews = void 0;
38
+ const resource_1 = require("../../../core/resource");
39
+ const ReplyAPI = __importStar(require("./reply"));
40
+ const reply_1 = require("./reply");
41
+ class Reviews extends resource_1.APIResource {
42
+ constructor() {
43
+ super(...arguments);
44
+ this.reply = new ReplyAPI.Reply(this._client);
45
+ }
46
+ /**
47
+ * List reviews across platforms
48
+ */
49
+ list(query = {}, options) {
50
+ return this._client.get('/v1/inbox/reviews', { query, ...options });
51
+ }
52
+ }
53
+ exports.Reviews = Reviews;
54
+ Reviews.Reply = reply_1.Reply;
@@ -0,0 +1 @@
1
+ export * from './reviews/index';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ __exportStar(require("./reviews/index"), exports);
@@ -0,0 +1 @@
1
+ export * from './inbox/index';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ __exportStar(require("./inbox/index"), exports);
@@ -0,0 +1,16 @@
1
+ export { APIKeys, type APIKeyCreateResponse, type APIKeyListResponse, type APIKeyCreateParams, type APIKeyListParams, } from './api-keys';
2
+ export { AccountGroups, type AccountGroupCreateResponse, type AccountGroupUpdateResponse, type AccountGroupListResponse, type AccountGroupCreateParams, type AccountGroupUpdateParams, } from './account-groups';
3
+ export { Accounts, type AccountRetrieveResponse, type AccountUpdateResponse, type AccountListResponse, type AccountUpdateParams, type AccountListParams, } from './accounts/accounts';
4
+ export { Analytics, type AnalyticsRetrieveResponse, type AnalyticsGetBestTimeResponse, type AnalyticsGetContentDecayResponse, type AnalyticsGetPostTimelineResponse, type AnalyticsGetPostingFrequencyResponse, type AnalyticsListDailyMetricsResponse, type AnalyticsRetrieveParams, type AnalyticsGetBestTimeParams, type AnalyticsGetContentDecayParams, type AnalyticsGetPostTimelineParams, type AnalyticsGetPostingFrequencyParams, type AnalyticsListDailyMetricsParams, } from './analytics/analytics';
5
+ export { Connect, type ConnectCompleteOAuthCallbackResponse, type ConnectCreateBlueskyConnectionResponse, type ConnectFetchPendingDataResponse, type ConnectStartOAuthFlowResponse, type ConnectCompleteOAuthCallbackParams, type ConnectCreateBlueskyConnectionParams, type ConnectFetchPendingDataParams, type ConnectStartOAuthFlowParams, } from './connect/connect';
6
+ export { Connections, type ConnectionListLogsResponse, type ConnectionListLogsParams } from './connections';
7
+ export { Inbox } from './inbox/inbox';
8
+ export { Media, type MediaListResponse, type MediaRetrieveResponse, type MediaGetPresignURLResponse, type MediaUploadResponse, type MediaListParams, type MediaGetPresignURLParams, type MediaUploadParams, } from './media';
9
+ export { Posts, type PostCreateResponse, type PostRetrieveResponse, type PostUpdateResponse, type PostListResponse, type PostBulkCreateResponse, type PostRetryResponse, type PostUnpublishResponse, type PostCreateParams, type PostUpdateParams, type PostListParams, type PostBulkCreateParams, } from './posts/posts';
10
+ export { Queue, type QueueGetNextSlotResponse, type QueuePreviewResponse, type QueuePreviewParams, } from './queue/queue';
11
+ export { Reddit, type RedditGetFeedResponse, type RedditSearchResponse, type RedditGetFeedParams, type RedditSearchParams, } from './reddit';
12
+ export { Tools } from './tools/tools';
13
+ export { Twitter } from './twitter/twitter';
14
+ export { Usage, type UsageRetrieveResponse } from './usage';
15
+ export { Webhooks, type WebhookCreateResponse, type WebhookUpdateResponse, type WebhookListResponse, type WebhookListLogsResponse, type WebhookSendTestResponse, type WebhookCreateParams, type WebhookUpdateParams, type WebhookListParams, type WebhookListLogsParams, type WebhookSendTestParams, } from './webhooks';
16
+ export { Whatsapp, type WhatsappBulkSendResponse, type WhatsappListPhoneNumbersResponse, type WhatsappBulkSendParams, type WhatsappListPhoneNumbersParams, } from './whatsapp/whatsapp';
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Whatsapp = exports.Webhooks = exports.Usage = exports.Twitter = exports.Tools = exports.Reddit = exports.Queue = exports.Posts = exports.Media = exports.Inbox = exports.Connections = exports.Connect = exports.Analytics = exports.Accounts = exports.AccountGroups = exports.APIKeys = void 0;
5
+ var api_keys_1 = require("./api-keys");
6
+ Object.defineProperty(exports, "APIKeys", { enumerable: true, get: function () { return api_keys_1.APIKeys; } });
7
+ var account_groups_1 = require("./account-groups");
8
+ Object.defineProperty(exports, "AccountGroups", { enumerable: true, get: function () { return account_groups_1.AccountGroups; } });
9
+ var accounts_1 = require("./accounts/accounts");
10
+ Object.defineProperty(exports, "Accounts", { enumerable: true, get: function () { return accounts_1.Accounts; } });
11
+ var analytics_1 = require("./analytics/analytics");
12
+ Object.defineProperty(exports, "Analytics", { enumerable: true, get: function () { return analytics_1.Analytics; } });
13
+ var connect_1 = require("./connect/connect");
14
+ Object.defineProperty(exports, "Connect", { enumerable: true, get: function () { return connect_1.Connect; } });
15
+ var connections_1 = require("./connections");
16
+ Object.defineProperty(exports, "Connections", { enumerable: true, get: function () { return connections_1.Connections; } });
17
+ var inbox_1 = require("./inbox/inbox");
18
+ Object.defineProperty(exports, "Inbox", { enumerable: true, get: function () { return inbox_1.Inbox; } });
19
+ var media_1 = require("./media");
20
+ Object.defineProperty(exports, "Media", { enumerable: true, get: function () { return media_1.Media; } });
21
+ var posts_1 = require("./posts/posts");
22
+ Object.defineProperty(exports, "Posts", { enumerable: true, get: function () { return posts_1.Posts; } });
23
+ var queue_1 = require("./queue/queue");
24
+ Object.defineProperty(exports, "Queue", { enumerable: true, get: function () { return queue_1.Queue; } });
25
+ var reddit_1 = require("./reddit");
26
+ Object.defineProperty(exports, "Reddit", { enumerable: true, get: function () { return reddit_1.Reddit; } });
27
+ var tools_1 = require("./tools/tools");
28
+ Object.defineProperty(exports, "Tools", { enumerable: true, get: function () { return tools_1.Tools; } });
29
+ var twitter_1 = require("./twitter/twitter");
30
+ Object.defineProperty(exports, "Twitter", { enumerable: true, get: function () { return twitter_1.Twitter; } });
31
+ var usage_1 = require("./usage");
32
+ Object.defineProperty(exports, "Usage", { enumerable: true, get: function () { return usage_1.Usage; } });
33
+ var webhooks_1 = require("./webhooks");
34
+ Object.defineProperty(exports, "Webhooks", { enumerable: true, get: function () { return webhooks_1.Webhooks; } });
35
+ var whatsapp_1 = require("./whatsapp/whatsapp");
36
+ Object.defineProperty(exports, "Whatsapp", { enumerable: true, get: function () { return whatsapp_1.Whatsapp; } });