@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,220 @@
1
+ import { APIResource } from '../../../core/resource';
2
+ import * as HideAPI from './hide';
3
+ import { Hide, HideCreateResponse, HideDeleteResponse } from './hide';
4
+ import * as LikeAPI from './like';
5
+ import { Like, LikeCreateResponse, LikeDeleteResponse } from './like';
6
+ import { APIPromise } from '../../../core/api-promise';
7
+ import { RequestOptions } from '../../../internal/request-options';
8
+ export declare class Comments extends APIResource {
9
+ hide: HideAPI.Hide;
10
+ like: LikeAPI.Like;
11
+ /**
12
+ * Get comments for a specific post
13
+ */
14
+ retrieve(postID: string, query?: CommentRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<CommentRetrieveResponse>;
15
+ /**
16
+ * List comments across platforms
17
+ */
18
+ list(query?: CommentListParams | null | undefined, options?: RequestOptions): APIPromise<CommentListResponse>;
19
+ /**
20
+ * Delete a comment
21
+ */
22
+ delete(commentID: string, options?: RequestOptions): APIPromise<CommentDeleteResponse>;
23
+ /**
24
+ * Send a private reply to a commenter
25
+ */
26
+ privateReply(commentID: string, body: CommentPrivateReplyParams, options?: RequestOptions): APIPromise<CommentPrivateReplyResponse>;
27
+ /**
28
+ * Reply to a comment
29
+ */
30
+ reply(postID: string, body: CommentReplyParams, options?: RequestOptions): APIPromise<CommentReplyResponse>;
31
+ }
32
+ export interface CommentRetrieveResponse {
33
+ data: Array<CommentRetrieveResponse.Data>;
34
+ has_more?: boolean;
35
+ next_cursor?: string | null;
36
+ platform?: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
37
+ /**
38
+ * Post ID if filtered by post
39
+ */
40
+ post_id?: string;
41
+ }
42
+ export declare namespace CommentRetrieveResponse {
43
+ interface Data {
44
+ /**
45
+ * Comment ID
46
+ */
47
+ id: string;
48
+ /**
49
+ * Comment author name
50
+ */
51
+ author_name: string;
52
+ /**
53
+ * Comment timestamp
54
+ */
55
+ created_at: string;
56
+ platform: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
57
+ /**
58
+ * Comment text
59
+ */
60
+ text: string;
61
+ /**
62
+ * Author avatar URL
63
+ */
64
+ author_avatar?: string | null;
65
+ /**
66
+ * Whether comment is hidden
67
+ */
68
+ hidden?: boolean;
69
+ /**
70
+ * Like count
71
+ */
72
+ likes?: number;
73
+ /**
74
+ * Reply count
75
+ */
76
+ replies_count?: number;
77
+ }
78
+ }
79
+ export interface CommentListResponse {
80
+ data: Array<CommentListResponse.Data>;
81
+ has_more?: boolean;
82
+ next_cursor?: string | null;
83
+ platform?: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
84
+ /**
85
+ * Post ID if filtered by post
86
+ */
87
+ post_id?: string;
88
+ }
89
+ export declare namespace CommentListResponse {
90
+ interface Data {
91
+ /**
92
+ * Comment ID
93
+ */
94
+ id: string;
95
+ /**
96
+ * Comment author name
97
+ */
98
+ author_name: string;
99
+ /**
100
+ * Comment timestamp
101
+ */
102
+ created_at: string;
103
+ platform: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
104
+ /**
105
+ * Comment text
106
+ */
107
+ text: string;
108
+ /**
109
+ * Author avatar URL
110
+ */
111
+ author_avatar?: string | null;
112
+ /**
113
+ * Whether comment is hidden
114
+ */
115
+ hidden?: boolean;
116
+ /**
117
+ * Like count
118
+ */
119
+ likes?: number;
120
+ /**
121
+ * Reply count
122
+ */
123
+ replies_count?: number;
124
+ }
125
+ }
126
+ export interface CommentDeleteResponse {
127
+ /**
128
+ * Whether the action succeeded
129
+ */
130
+ success: boolean;
131
+ /**
132
+ * Comment ID
133
+ */
134
+ comment_id?: string;
135
+ }
136
+ export interface CommentPrivateReplyResponse {
137
+ /**
138
+ * Whether the action succeeded
139
+ */
140
+ success: boolean;
141
+ /**
142
+ * Comment ID
143
+ */
144
+ comment_id?: string;
145
+ }
146
+ export interface CommentReplyResponse {
147
+ /**
148
+ * Whether the action succeeded
149
+ */
150
+ success: boolean;
151
+ /**
152
+ * Comment ID
153
+ */
154
+ comment_id?: string;
155
+ }
156
+ export interface CommentRetrieveParams {
157
+ /**
158
+ * Filter by account ID
159
+ */
160
+ account_id?: string;
161
+ /**
162
+ * Pagination cursor
163
+ */
164
+ cursor?: string;
165
+ /**
166
+ * Number of items
167
+ */
168
+ limit?: number;
169
+ /**
170
+ * Filter by platform
171
+ */
172
+ platform?: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
173
+ }
174
+ export interface CommentListParams {
175
+ /**
176
+ * Filter by account ID
177
+ */
178
+ account_id?: string;
179
+ /**
180
+ * Pagination cursor
181
+ */
182
+ cursor?: string;
183
+ /**
184
+ * Number of items
185
+ */
186
+ limit?: number;
187
+ /**
188
+ * Filter by platform
189
+ */
190
+ platform?: 'twitter' | 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'reddit' | 'bluesky' | 'threads' | 'telegram' | 'snapchat' | 'googlebusiness' | 'whatsapp' | 'mastodon' | 'discord' | 'sms';
191
+ }
192
+ export interface CommentPrivateReplyParams {
193
+ /**
194
+ * Account ID to reply from
195
+ */
196
+ account_id: string;
197
+ /**
198
+ * Private reply text
199
+ */
200
+ text: string;
201
+ }
202
+ export interface CommentReplyParams {
203
+ /**
204
+ * Account ID to reply from
205
+ */
206
+ account_id: string;
207
+ /**
208
+ * Reply text
209
+ */
210
+ text: string;
211
+ /**
212
+ * Parent comment ID for threaded replies
213
+ */
214
+ comment_id?: string;
215
+ }
216
+ export declare namespace Comments {
217
+ export { type CommentRetrieveResponse as CommentRetrieveResponse, type CommentListResponse as CommentListResponse, type CommentDeleteResponse as CommentDeleteResponse, type CommentPrivateReplyResponse as CommentPrivateReplyResponse, type CommentReplyResponse as CommentReplyResponse, type CommentRetrieveParams as CommentRetrieveParams, type CommentListParams as CommentListParams, type CommentPrivateReplyParams as CommentPrivateReplyParams, type CommentReplyParams as CommentReplyParams, };
218
+ export { Hide as Hide, type HideCreateResponse as HideCreateResponse, type HideDeleteResponse as HideDeleteResponse, };
219
+ export { Like as Like, type LikeCreateResponse as LikeCreateResponse, type LikeDeleteResponse as LikeDeleteResponse, };
220
+ }
@@ -0,0 +1,83 @@
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.Comments = void 0;
38
+ const resource_1 = require("../../../core/resource");
39
+ const HideAPI = __importStar(require("./hide"));
40
+ const hide_1 = require("./hide");
41
+ const LikeAPI = __importStar(require("./like"));
42
+ const like_1 = require("./like");
43
+ const path_1 = require("../../../internal/utils/path");
44
+ class Comments extends resource_1.APIResource {
45
+ constructor() {
46
+ super(...arguments);
47
+ this.hide = new HideAPI.Hide(this._client);
48
+ this.like = new LikeAPI.Like(this._client);
49
+ }
50
+ /**
51
+ * Get comments for a specific post
52
+ */
53
+ retrieve(postID, query = {}, options) {
54
+ return this._client.get((0, path_1.path) `/v1/inbox/comments/${postID}`, { query, ...options });
55
+ }
56
+ /**
57
+ * List comments across platforms
58
+ */
59
+ list(query = {}, options) {
60
+ return this._client.get('/v1/inbox/comments', { query, ...options });
61
+ }
62
+ /**
63
+ * Delete a comment
64
+ */
65
+ delete(commentID, options) {
66
+ return this._client.delete((0, path_1.path) `/v1/inbox/comments/${commentID}`, options);
67
+ }
68
+ /**
69
+ * Send a private reply to a commenter
70
+ */
71
+ privateReply(commentID, body, options) {
72
+ return this._client.post((0, path_1.path) `/v1/inbox/comments/${commentID}/private-reply`, { body, ...options });
73
+ }
74
+ /**
75
+ * Reply to a comment
76
+ */
77
+ reply(postID, body, options) {
78
+ return this._client.post((0, path_1.path) `/v1/inbox/comments/${postID}/reply`, { body, ...options });
79
+ }
80
+ }
81
+ exports.Comments = Comments;
82
+ Comments.Hide = hide_1.Hide;
83
+ Comments.Like = like_1.Like;
@@ -0,0 +1,36 @@
1
+ import { APIResource } from '../../../core/resource';
2
+ import { APIPromise } from '../../../core/api-promise';
3
+ import { RequestOptions } from '../../../internal/request-options';
4
+ export declare class Hide extends APIResource {
5
+ /**
6
+ * Hide a comment
7
+ */
8
+ create(commentID: string, options?: RequestOptions): APIPromise<HideCreateResponse>;
9
+ /**
10
+ * Unhide a comment
11
+ */
12
+ delete(commentID: string, options?: RequestOptions): APIPromise<HideDeleteResponse>;
13
+ }
14
+ export interface HideCreateResponse {
15
+ /**
16
+ * Whether the action succeeded
17
+ */
18
+ success: boolean;
19
+ /**
20
+ * Comment ID
21
+ */
22
+ comment_id?: string;
23
+ }
24
+ export interface HideDeleteResponse {
25
+ /**
26
+ * Whether the action succeeded
27
+ */
28
+ success: boolean;
29
+ /**
30
+ * Comment ID
31
+ */
32
+ comment_id?: string;
33
+ }
34
+ export declare namespace Hide {
35
+ export { type HideCreateResponse as HideCreateResponse, type HideDeleteResponse as HideDeleteResponse };
36
+ }
@@ -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.Hide = void 0;
5
+ const resource_1 = require("../../../core/resource");
6
+ const path_1 = require("../../../internal/utils/path");
7
+ class Hide extends resource_1.APIResource {
8
+ /**
9
+ * Hide a comment
10
+ */
11
+ create(commentID, options) {
12
+ return this._client.post((0, path_1.path) `/v1/inbox/comments/${commentID}/hide`, options);
13
+ }
14
+ /**
15
+ * Unhide a comment
16
+ */
17
+ delete(commentID, options) {
18
+ return this._client.delete((0, path_1.path) `/v1/inbox/comments/${commentID}/hide`, options);
19
+ }
20
+ }
21
+ exports.Hide = Hide;
@@ -0,0 +1,3 @@
1
+ export { Comments, type CommentRetrieveResponse, type CommentListResponse, type CommentDeleteResponse, type CommentPrivateReplyResponse, type CommentReplyResponse, type CommentRetrieveParams, type CommentListParams, type CommentPrivateReplyParams, type CommentReplyParams, } from './comments';
2
+ export { Hide, type HideCreateResponse, type HideDeleteResponse } from './hide';
3
+ export { Like, type LikeCreateResponse, type LikeDeleteResponse } from './like';
@@ -0,0 +1,10 @@
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.Like = exports.Hide = exports.Comments = void 0;
5
+ var comments_1 = require("./comments");
6
+ Object.defineProperty(exports, "Comments", { enumerable: true, get: function () { return comments_1.Comments; } });
7
+ var hide_1 = require("./hide");
8
+ Object.defineProperty(exports, "Hide", { enumerable: true, get: function () { return hide_1.Hide; } });
9
+ var like_1 = require("./like");
10
+ Object.defineProperty(exports, "Like", { enumerable: true, get: function () { return like_1.Like; } });
@@ -0,0 +1,36 @@
1
+ import { APIResource } from '../../../core/resource';
2
+ import { APIPromise } from '../../../core/api-promise';
3
+ import { RequestOptions } from '../../../internal/request-options';
4
+ export declare class Like extends APIResource {
5
+ /**
6
+ * Like a comment
7
+ */
8
+ create(commentID: string, options?: RequestOptions): APIPromise<LikeCreateResponse>;
9
+ /**
10
+ * Unlike a comment
11
+ */
12
+ delete(commentID: string, options?: RequestOptions): APIPromise<LikeDeleteResponse>;
13
+ }
14
+ export interface LikeCreateResponse {
15
+ /**
16
+ * Whether the action succeeded
17
+ */
18
+ success: boolean;
19
+ /**
20
+ * Comment ID
21
+ */
22
+ comment_id?: string;
23
+ }
24
+ export interface LikeDeleteResponse {
25
+ /**
26
+ * Whether the action succeeded
27
+ */
28
+ success: boolean;
29
+ /**
30
+ * Comment ID
31
+ */
32
+ comment_id?: string;
33
+ }
34
+ export declare namespace Like {
35
+ export { type LikeCreateResponse as LikeCreateResponse, type LikeDeleteResponse as LikeDeleteResponse };
36
+ }
@@ -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.Like = void 0;
5
+ const resource_1 = require("../../../core/resource");
6
+ const path_1 = require("../../../internal/utils/path");
7
+ class Like extends resource_1.APIResource {
8
+ /**
9
+ * Like a comment
10
+ */
11
+ create(commentID, options) {
12
+ return this._client.post((0, path_1.path) `/v1/inbox/comments/${commentID}/like`, options);
13
+ }
14
+ /**
15
+ * Unlike a comment
16
+ */
17
+ delete(commentID, options) {
18
+ return this._client.delete((0, path_1.path) `/v1/inbox/comments/${commentID}/like`, options);
19
+ }
20
+ }
21
+ exports.Like = Like;
@@ -0,0 +1 @@
1
+ export * from './comments/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("./comments/index"), exports);
@@ -0,0 +1,17 @@
1
+ import { APIResource } from '../../core/resource';
2
+ import * as MessagesAPI from './messages';
3
+ import { MessageArchiveResponse, MessageEditParams, MessageEditResponse, MessageListParams, MessageListResponse, MessageRetrieveResponse, MessageSendParams, MessageSendResponse, Messages } from './messages';
4
+ import * as CommentsAPI from './comments/comments';
5
+ import { CommentDeleteResponse, CommentListParams, CommentListResponse, CommentPrivateReplyParams, CommentPrivateReplyResponse, CommentReplyParams, CommentReplyResponse, CommentRetrieveParams, CommentRetrieveResponse, Comments } from './comments/comments';
6
+ import * as ReviewsAPI from './reviews/reviews';
7
+ import { ReviewListParams, ReviewListResponse, Reviews } from './reviews/reviews';
8
+ export declare class Inbox extends APIResource {
9
+ comments: CommentsAPI.Comments;
10
+ messages: MessagesAPI.Messages;
11
+ reviews: ReviewsAPI.Reviews;
12
+ }
13
+ export declare namespace Inbox {
14
+ export { Comments as Comments, type CommentRetrieveResponse as CommentRetrieveResponse, type CommentListResponse as CommentListResponse, type CommentDeleteResponse as CommentDeleteResponse, type CommentPrivateReplyResponse as CommentPrivateReplyResponse, type CommentReplyResponse as CommentReplyResponse, type CommentRetrieveParams as CommentRetrieveParams, type CommentListParams as CommentListParams, type CommentPrivateReplyParams as CommentPrivateReplyParams, type CommentReplyParams as CommentReplyParams, };
15
+ export { Messages as Messages, 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, };
16
+ export { Reviews as Reviews, type ReviewListResponse as ReviewListResponse, type ReviewListParams as ReviewListParams, };
17
+ }
@@ -0,0 +1,56 @@
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.Inbox = void 0;
38
+ const resource_1 = require("../../core/resource");
39
+ const MessagesAPI = __importStar(require("./messages"));
40
+ const messages_1 = require("./messages");
41
+ const CommentsAPI = __importStar(require("./comments/comments"));
42
+ const comments_1 = require("./comments/comments");
43
+ const ReviewsAPI = __importStar(require("./reviews/reviews"));
44
+ const reviews_1 = require("./reviews/reviews");
45
+ class Inbox extends resource_1.APIResource {
46
+ constructor() {
47
+ super(...arguments);
48
+ this.comments = new CommentsAPI.Comments(this._client);
49
+ this.messages = new MessagesAPI.Messages(this._client);
50
+ this.reviews = new ReviewsAPI.Reviews(this._client);
51
+ }
52
+ }
53
+ exports.Inbox = Inbox;
54
+ Inbox.Comments = comments_1.Comments;
55
+ Inbox.Messages = messages_1.Messages;
56
+ Inbox.Reviews = reviews_1.Reviews;
@@ -0,0 +1,4 @@
1
+ export { Comments, type CommentRetrieveResponse, type CommentListResponse, type CommentDeleteResponse, type CommentPrivateReplyResponse, type CommentReplyResponse, type CommentRetrieveParams, type CommentListParams, type CommentPrivateReplyParams, type CommentReplyParams, } from './comments/index';
2
+ export { Inbox } from './inbox';
3
+ export { Messages, type MessageRetrieveResponse, type MessageListResponse, type MessageArchiveResponse, type MessageEditResponse, type MessageSendResponse, type MessageListParams, type MessageEditParams, type MessageSendParams, } from './messages';
4
+ export { Reviews, type ReviewListResponse, type ReviewListParams } from './reviews/index';
@@ -0,0 +1,12 @@
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.Messages = exports.Inbox = exports.Comments = void 0;
5
+ var index_1 = require("./comments/index");
6
+ Object.defineProperty(exports, "Comments", { enumerable: true, get: function () { return index_1.Comments; } });
7
+ var inbox_1 = require("./inbox");
8
+ Object.defineProperty(exports, "Inbox", { enumerable: true, get: function () { return inbox_1.Inbox; } });
9
+ var messages_1 = require("./messages");
10
+ Object.defineProperty(exports, "Messages", { enumerable: true, get: function () { return messages_1.Messages; } });
11
+ var index_2 = require("./reviews/index");
12
+ Object.defineProperty(exports, "Reviews", { enumerable: true, get: function () { return index_2.Reviews; } });