@knocklabs/node 1.0.0 → 1.1.0

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 (400) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +1 -1
  3. package/api-promise.js +2 -15
  4. package/api-promise.js.map +1 -1
  5. package/client.d.mts +4 -1
  6. package/client.d.mts.map +1 -1
  7. package/client.d.ts +4 -1
  8. package/client.d.ts.map +1 -1
  9. package/client.js +27 -44
  10. package/client.js.map +1 -1
  11. package/client.mjs +18 -12
  12. package/client.mjs.map +1 -1
  13. package/core/api-promise.d.mts +0 -1
  14. package/core/api-promise.d.mts.map +1 -1
  15. package/core/api-promise.d.ts +0 -1
  16. package/core/api-promise.d.ts.map +1 -1
  17. package/core/api-promise.js +4 -14
  18. package/core/api-promise.js.map +1 -1
  19. package/core/api-promise.mjs +1 -11
  20. package/core/api-promise.mjs.map +1 -1
  21. package/core/error.d.mts +0 -1
  22. package/core/error.d.mts.map +1 -1
  23. package/core/error.d.ts +0 -1
  24. package/core/error.d.ts.map +1 -1
  25. package/core/error.js.map +1 -1
  26. package/core/error.mjs.map +1 -1
  27. package/core/pagination.d.mts +0 -1
  28. package/core/pagination.d.mts.map +1 -1
  29. package/core/pagination.d.ts +0 -1
  30. package/core/pagination.d.ts.map +1 -1
  31. package/core/pagination.js +3 -13
  32. package/core/pagination.js.map +1 -1
  33. package/core/pagination.mjs +1 -11
  34. package/core/pagination.mjs.map +1 -1
  35. package/error.js +2 -15
  36. package/error.js.map +1 -1
  37. package/internal/builtin-types.d.mts +0 -2
  38. package/internal/builtin-types.d.mts.map +1 -1
  39. package/internal/builtin-types.d.ts +0 -2
  40. package/internal/builtin-types.d.ts.map +1 -1
  41. package/internal/detect-platform.js.map +1 -1
  42. package/internal/detect-platform.mjs.map +1 -1
  43. package/internal/errors.d.mts.map +1 -1
  44. package/internal/errors.d.ts.map +1 -1
  45. package/internal/errors.js +2 -2
  46. package/internal/errors.js.map +1 -1
  47. package/internal/errors.mjs.map +1 -1
  48. package/internal/headers.d.mts +0 -1
  49. package/internal/headers.d.mts.map +1 -1
  50. package/internal/headers.d.ts +0 -1
  51. package/internal/headers.d.ts.map +1 -1
  52. package/internal/headers.js +1 -1
  53. package/internal/headers.js.map +1 -1
  54. package/internal/headers.mjs +1 -1
  55. package/internal/headers.mjs.map +1 -1
  56. package/internal/parse.d.mts +0 -1
  57. package/internal/parse.d.mts.map +1 -1
  58. package/internal/parse.d.ts +0 -1
  59. package/internal/parse.d.ts.map +1 -1
  60. package/internal/parse.js +1 -2
  61. package/internal/parse.js.map +1 -1
  62. package/internal/parse.mjs.map +1 -1
  63. package/internal/qs/stringify.js +1 -2
  64. package/internal/qs/stringify.js.map +1 -1
  65. package/internal/qs/stringify.mjs.map +1 -1
  66. package/internal/qs/utils.js +9 -9
  67. package/internal/qs/utils.js.map +1 -1
  68. package/internal/qs/utils.mjs.map +1 -1
  69. package/internal/request-options.d.mts +0 -1
  70. package/internal/request-options.d.mts.map +1 -1
  71. package/internal/request-options.d.ts +0 -1
  72. package/internal/request-options.d.ts.map +1 -1
  73. package/internal/shims.js +5 -6
  74. package/internal/shims.js.map +1 -1
  75. package/internal/shims.mjs.map +1 -1
  76. package/internal/to-file.d.mts +0 -1
  77. package/internal/to-file.d.mts.map +1 -1
  78. package/internal/to-file.d.ts +0 -1
  79. package/internal/to-file.d.ts.map +1 -1
  80. package/internal/to-file.js +4 -4
  81. package/internal/to-file.js.map +1 -1
  82. package/internal/to-file.mjs +3 -2
  83. package/internal/to-file.mjs.map +1 -1
  84. package/internal/tslib.js +81 -0
  85. package/internal/tslib.mjs +17 -0
  86. package/internal/types.d.mts +0 -1
  87. package/internal/types.d.mts.map +1 -1
  88. package/internal/types.d.ts +0 -1
  89. package/internal/types.d.ts.map +1 -1
  90. package/internal/uploads.d.mts +1 -3
  91. package/internal/uploads.d.mts.map +1 -1
  92. package/internal/uploads.d.ts +1 -3
  93. package/internal/uploads.d.ts.map +1 -1
  94. package/internal/uploads.js +16 -6
  95. package/internal/uploads.js.map +1 -1
  96. package/internal/uploads.mjs +12 -3
  97. package/internal/uploads.mjs.map +1 -1
  98. package/internal/utils/base64.d.mts.map +1 -1
  99. package/internal/utils/base64.d.ts.map +1 -1
  100. package/internal/utils/base64.js.map +1 -1
  101. package/internal/utils/base64.mjs.map +1 -1
  102. package/internal/utils/bytes.d.mts +1 -1
  103. package/internal/utils/bytes.d.mts.map +1 -1
  104. package/internal/utils/bytes.d.ts +1 -1
  105. package/internal/utils/bytes.d.ts.map +1 -1
  106. package/internal/utils/bytes.js +3 -4
  107. package/internal/utils/bytes.js.map +1 -1
  108. package/internal/utils/bytes.mjs.map +1 -1
  109. package/internal/utils/env.d.mts.map +1 -1
  110. package/internal/utils/env.d.ts.map +1 -1
  111. package/internal/utils/env.js.map +1 -1
  112. package/internal/utils/env.mjs.map +1 -1
  113. package/internal/utils/log.d.mts +0 -1
  114. package/internal/utils/log.d.mts.map +1 -1
  115. package/internal/utils/log.d.ts +0 -1
  116. package/internal/utils/log.d.ts.map +1 -1
  117. package/internal/utils/log.js +2 -2
  118. package/internal/utils/log.js.map +1 -1
  119. package/internal/utils/log.mjs.map +1 -1
  120. package/internal/utils/path.d.mts.map +1 -1
  121. package/internal/utils/path.d.ts.map +1 -1
  122. package/internal/utils/path.js +2 -2
  123. package/internal/utils/path.js.map +1 -1
  124. package/internal/utils/path.mjs.map +1 -1
  125. package/internal/utils/sleep.d.mts.map +1 -1
  126. package/internal/utils/sleep.d.ts.map +1 -1
  127. package/internal/utils/uuid.d.mts +1 -1
  128. package/internal/utils/uuid.d.mts.map +1 -1
  129. package/internal/utils/uuid.d.ts +1 -1
  130. package/internal/utils/uuid.d.ts.map +1 -1
  131. package/internal/utils/uuid.js +1 -2
  132. package/internal/utils/uuid.js.map +1 -1
  133. package/internal/utils/uuid.mjs +1 -2
  134. package/internal/utils/uuid.mjs.map +1 -1
  135. package/internal/utils/values.d.mts.map +1 -1
  136. package/internal/utils/values.d.ts.map +1 -1
  137. package/internal/utils/values.js +5 -5
  138. package/internal/utils/values.js.map +1 -1
  139. package/internal/utils/values.mjs.map +1 -1
  140. package/internal/utils.js +7 -20
  141. package/internal/utils.js.map +1 -1
  142. package/lib/index.js +3 -16
  143. package/lib/index.js.map +1 -1
  144. package/lib/tokenSigner.js +5 -28
  145. package/lib/tokenSigner.js.map +1 -1
  146. package/lib/tokenSigner.mjs.map +1 -1
  147. package/lib/userTokens.js +1 -1
  148. package/lib/userTokens.js.map +1 -1
  149. package/package.json +5 -6
  150. package/pagination.js +2 -15
  151. package/pagination.js.map +1 -1
  152. package/resource.js +2 -15
  153. package/resource.js.map +1 -1
  154. package/resources/audiences.d.mts +37 -0
  155. package/resources/audiences.d.mts.map +1 -1
  156. package/resources/audiences.d.ts +37 -0
  157. package/resources/audiences.d.ts.map +1 -1
  158. package/resources/audiences.js +25 -0
  159. package/resources/audiences.js.map +1 -1
  160. package/resources/audiences.mjs +25 -0
  161. package/resources/audiences.mjs.map +1 -1
  162. package/resources/bulk-operations.d.mts +7 -0
  163. package/resources/bulk-operations.d.mts.map +1 -1
  164. package/resources/bulk-operations.d.ts +7 -0
  165. package/resources/bulk-operations.d.ts.map +1 -1
  166. package/resources/bulk-operations.js +7 -0
  167. package/resources/bulk-operations.js.map +1 -1
  168. package/resources/bulk-operations.mjs +7 -0
  169. package/resources/bulk-operations.mjs.map +1 -1
  170. package/resources/channels/bulk.d.mts +21 -0
  171. package/resources/channels/bulk.d.mts.map +1 -1
  172. package/resources/channels/bulk.d.ts +21 -0
  173. package/resources/channels/bulk.d.ts.map +1 -1
  174. package/resources/channels/bulk.js +21 -0
  175. package/resources/channels/bulk.js.map +1 -1
  176. package/resources/channels/bulk.mjs +21 -0
  177. package/resources/channels/bulk.mjs.map +1 -1
  178. package/resources/channels/channels.js +2 -24
  179. package/resources/channels/channels.js.map +1 -1
  180. package/resources/channels.js +2 -15
  181. package/resources/channels.js.map +1 -1
  182. package/resources/integrations/integrations.js +3 -25
  183. package/resources/integrations/integrations.js.map +1 -1
  184. package/resources/integrations.js +2 -15
  185. package/resources/integrations.js.map +1 -1
  186. package/resources/messages/activities.d.mts +10 -0
  187. package/resources/messages/activities.d.mts.map +1 -1
  188. package/resources/messages/activities.d.ts +10 -0
  189. package/resources/messages/activities.d.ts.map +1 -1
  190. package/resources/messages/activities.js +10 -0
  191. package/resources/messages/activities.js.map +1 -1
  192. package/resources/messages/activities.mjs +10 -0
  193. package/resources/messages/activities.mjs.map +1 -1
  194. package/resources/messages/batch.d.mts +76 -0
  195. package/resources/messages/batch.d.mts.map +1 -1
  196. package/resources/messages/batch.d.ts +76 -0
  197. package/resources/messages/batch.d.ts.map +1 -1
  198. package/resources/messages/batch.js +76 -0
  199. package/resources/messages/batch.js.map +1 -1
  200. package/resources/messages/batch.mjs +76 -0
  201. package/resources/messages/batch.mjs.map +1 -1
  202. package/resources/messages/messages.d.mts +101 -0
  203. package/resources/messages/messages.d.mts.map +1 -1
  204. package/resources/messages/messages.d.ts +101 -0
  205. package/resources/messages/messages.d.ts.map +1 -1
  206. package/resources/messages/messages.js +104 -25
  207. package/resources/messages/messages.js.map +1 -1
  208. package/resources/messages/messages.mjs +101 -0
  209. package/resources/messages/messages.mjs.map +1 -1
  210. package/resources/messages.js +2 -15
  211. package/resources/messages.js.map +1 -1
  212. package/resources/objects/bulk.d.mts +49 -0
  213. package/resources/objects/bulk.d.mts.map +1 -1
  214. package/resources/objects/bulk.d.ts +49 -0
  215. package/resources/objects/bulk.d.ts.map +1 -1
  216. package/resources/objects/bulk.js +49 -0
  217. package/resources/objects/bulk.js.map +1 -1
  218. package/resources/objects/bulk.mjs +49 -0
  219. package/resources/objects/bulk.mjs.map +1 -1
  220. package/resources/objects/objects.d.mts +175 -4
  221. package/resources/objects/objects.d.mts.map +1 -1
  222. package/resources/objects/objects.d.ts +175 -4
  223. package/resources/objects/objects.d.ts.map +1 -1
  224. package/resources/objects/objects.js +173 -24
  225. package/resources/objects/objects.js.map +1 -1
  226. package/resources/objects/objects.mjs +171 -0
  227. package/resources/objects/objects.mjs.map +1 -1
  228. package/resources/objects.js +2 -15
  229. package/resources/objects.js.map +1 -1
  230. package/resources/providers/ms-teams.d.mts +40 -0
  231. package/resources/providers/ms-teams.d.mts.map +1 -1
  232. package/resources/providers/ms-teams.d.ts +40 -0
  233. package/resources/providers/ms-teams.d.ts.map +1 -1
  234. package/resources/providers/ms-teams.js +40 -0
  235. package/resources/providers/ms-teams.js.map +1 -1
  236. package/resources/providers/ms-teams.mjs +40 -0
  237. package/resources/providers/ms-teams.mjs.map +1 -1
  238. package/resources/providers/providers.js +3 -25
  239. package/resources/providers/providers.js.map +1 -1
  240. package/resources/providers/slack.d.mts +27 -0
  241. package/resources/providers/slack.d.mts.map +1 -1
  242. package/resources/providers/slack.d.ts +27 -0
  243. package/resources/providers/slack.d.ts.map +1 -1
  244. package/resources/providers/slack.js +27 -0
  245. package/resources/providers/slack.js.map +1 -1
  246. package/resources/providers/slack.mjs +27 -0
  247. package/resources/providers/slack.mjs.map +1 -1
  248. package/resources/providers.js +2 -15
  249. package/resources/providers.js.map +1 -1
  250. package/resources/recipients/recipients.js +4 -26
  251. package/resources/recipients/recipients.js.map +1 -1
  252. package/resources/recipients.js +2 -15
  253. package/resources/recipients.js.map +1 -1
  254. package/resources/schedules/bulk.d.mts +30 -0
  255. package/resources/schedules/bulk.d.mts.map +1 -1
  256. package/resources/schedules/bulk.d.ts +30 -0
  257. package/resources/schedules/bulk.d.ts.map +1 -1
  258. package/resources/schedules/bulk.js +30 -0
  259. package/resources/schedules/bulk.js.map +1 -1
  260. package/resources/schedules/bulk.mjs +30 -0
  261. package/resources/schedules/bulk.mjs.map +1 -1
  262. package/resources/schedules/schedules.d.mts +74 -0
  263. package/resources/schedules/schedules.d.mts.map +1 -1
  264. package/resources/schedules/schedules.d.ts +74 -0
  265. package/resources/schedules/schedules.d.ts.map +1 -1
  266. package/resources/schedules/schedules.js +76 -24
  267. package/resources/schedules/schedules.js.map +1 -1
  268. package/resources/schedules/schedules.mjs +74 -0
  269. package/resources/schedules/schedules.mjs.map +1 -1
  270. package/resources/schedules.js +2 -15
  271. package/resources/schedules.js.map +1 -1
  272. package/resources/tenants/bulk.d.mts +14 -0
  273. package/resources/tenants/bulk.d.mts.map +1 -1
  274. package/resources/tenants/bulk.d.ts +14 -0
  275. package/resources/tenants/bulk.d.ts.map +1 -1
  276. package/resources/tenants/bulk.js +14 -0
  277. package/resources/tenants/bulk.js.map +1 -1
  278. package/resources/tenants/bulk.mjs +14 -0
  279. package/resources/tenants/bulk.mjs.map +1 -1
  280. package/resources/tenants/tenants.d.mts +33 -0
  281. package/resources/tenants/tenants.d.mts.map +1 -1
  282. package/resources/tenants/tenants.d.ts +33 -0
  283. package/resources/tenants/tenants.d.ts.map +1 -1
  284. package/resources/tenants/tenants.js +35 -24
  285. package/resources/tenants/tenants.js.map +1 -1
  286. package/resources/tenants/tenants.mjs +33 -0
  287. package/resources/tenants/tenants.mjs.map +1 -1
  288. package/resources/tenants.js +2 -15
  289. package/resources/tenants.js.map +1 -1
  290. package/resources/users/bulk.d.mts +41 -0
  291. package/resources/users/bulk.d.mts.map +1 -1
  292. package/resources/users/bulk.d.ts +41 -0
  293. package/resources/users/bulk.d.ts.map +1 -1
  294. package/resources/users/bulk.js +41 -0
  295. package/resources/users/bulk.js.map +1 -1
  296. package/resources/users/bulk.mjs +41 -0
  297. package/resources/users/bulk.mjs.map +1 -1
  298. package/resources/users/feeds.d.mts +19 -0
  299. package/resources/users/feeds.d.mts.map +1 -1
  300. package/resources/users/feeds.d.ts +19 -0
  301. package/resources/users/feeds.d.ts.map +1 -1
  302. package/resources/users/feeds.js +19 -0
  303. package/resources/users/feeds.js.map +1 -1
  304. package/resources/users/feeds.mjs +19 -0
  305. package/resources/users/feeds.mjs.map +1 -1
  306. package/resources/users/guides.d.mts +68 -0
  307. package/resources/users/guides.d.mts.map +1 -1
  308. package/resources/users/guides.d.ts +68 -0
  309. package/resources/users/guides.d.ts.map +1 -1
  310. package/resources/users/guides.js +68 -0
  311. package/resources/users/guides.js.map +1 -1
  312. package/resources/users/guides.mjs +68 -0
  313. package/resources/users/guides.mjs.map +1 -1
  314. package/resources/users/users.d.mts +169 -15
  315. package/resources/users/users.d.mts.map +1 -1
  316. package/resources/users/users.d.ts +169 -15
  317. package/resources/users/users.d.ts.map +1 -1
  318. package/resources/users/users.js +143 -26
  319. package/resources/users/users.js.map +1 -1
  320. package/resources/users/users.mjs +139 -0
  321. package/resources/users/users.mjs.map +1 -1
  322. package/resources/users.js +2 -15
  323. package/resources/users.js.map +1 -1
  324. package/resources/workflows.d.mts +30 -0
  325. package/resources/workflows.d.mts.map +1 -1
  326. package/resources/workflows.d.ts +30 -0
  327. package/resources/workflows.d.ts.map +1 -1
  328. package/resources/workflows.js +30 -0
  329. package/resources/workflows.js.map +1 -1
  330. package/resources/workflows.mjs +30 -0
  331. package/resources/workflows.mjs.map +1 -1
  332. package/resources.js +2 -15
  333. package/resources.js.map +1 -1
  334. package/src/client.ts +17 -0
  335. package/src/internal/headers.ts +1 -1
  336. package/src/internal/to-file.ts +4 -2
  337. package/src/internal/uploads.ts +16 -4
  338. package/src/internal/utils/uuid.ts +1 -3
  339. package/src/resources/audiences.ts +37 -0
  340. package/src/resources/bulk-operations.ts +7 -0
  341. package/src/resources/channels/bulk.ts +21 -0
  342. package/src/resources/messages/activities.ts +10 -0
  343. package/src/resources/messages/batch.ts +76 -0
  344. package/src/resources/messages/messages.ts +101 -0
  345. package/src/resources/objects/bulk.ts +49 -0
  346. package/src/resources/objects/objects.ts +175 -4
  347. package/src/resources/providers/ms-teams.ts +40 -0
  348. package/src/resources/providers/slack.ts +27 -0
  349. package/src/resources/schedules/bulk.ts +30 -0
  350. package/src/resources/schedules/schedules.ts +74 -0
  351. package/src/resources/tenants/bulk.ts +14 -0
  352. package/src/resources/tenants/tenants.ts +33 -0
  353. package/src/resources/users/bulk.ts +41 -0
  354. package/src/resources/users/feeds.ts +19 -0
  355. package/src/resources/users/guides.ts +68 -0
  356. package/src/resources/users/users.ts +172 -15
  357. package/src/resources/workflows.ts +30 -0
  358. package/src/version.ts +1 -1
  359. package/uploads.js +2 -15
  360. package/uploads.js.map +1 -1
  361. package/version.d.mts +1 -1
  362. package/version.d.ts +1 -1
  363. package/version.js +1 -1
  364. package/version.mjs +1 -1
  365. package/internal/shims/crypto.d.mts +0 -13
  366. package/internal/shims/crypto.d.mts.map +0 -1
  367. package/internal/shims/crypto.d.ts +0 -13
  368. package/internal/shims/crypto.d.ts.map +0 -1
  369. package/internal/shims/crypto.js +0 -13
  370. package/internal/shims/crypto.js.map +0 -1
  371. package/internal/shims/crypto.mjs +0 -9
  372. package/internal/shims/crypto.mjs.map +0 -1
  373. package/internal/shims/file.d.mts +0 -23
  374. package/internal/shims/file.d.mts.map +0 -1
  375. package/internal/shims/file.d.ts +0 -23
  376. package/internal/shims/file.d.ts.map +0 -1
  377. package/internal/shims/file.js +0 -16
  378. package/internal/shims/file.js.map +0 -1
  379. package/internal/shims/file.mjs +0 -12
  380. package/internal/shims/file.mjs.map +0 -1
  381. package/internal/shims/getBuiltinModule.d.mts +0 -11
  382. package/internal/shims/getBuiltinModule.d.mts.map +0 -1
  383. package/internal/shims/getBuiltinModule.d.ts +0 -11
  384. package/internal/shims/getBuiltinModule.d.ts.map +0 -1
  385. package/internal/shims/getBuiltinModule.js +0 -71
  386. package/internal/shims/getBuiltinModule.js.map +0 -1
  387. package/internal/shims/getBuiltinModule.mjs +0 -67
  388. package/internal/shims/getBuiltinModule.mjs.map +0 -1
  389. package/internal/shims/nullGetBuiltinModule.d.mts +0 -2
  390. package/internal/shims/nullGetBuiltinModule.d.mts.map +0 -1
  391. package/internal/shims/nullGetBuiltinModule.d.ts +0 -2
  392. package/internal/shims/nullGetBuiltinModule.d.ts.map +0 -1
  393. package/internal/shims/nullGetBuiltinModule.js +0 -5
  394. package/internal/shims/nullGetBuiltinModule.js.map +0 -1
  395. package/internal/shims/nullGetBuiltinModule.mjs +0 -2
  396. package/internal/shims/nullGetBuiltinModule.mjs.map +0 -1
  397. package/src/internal/shims/crypto.ts +0 -18
  398. package/src/internal/shims/file.ts +0 -32
  399. package/src/internal/shims/getBuiltinModule.ts +0 -66
  400. package/src/internal/shims/nullGetBuiltinModule.ts +0 -1
@@ -1,32 +1,10 @@
1
1
  "use strict";
2
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 (mod) {
20
- if (mod && mod.__esModule) return mod;
21
- var result = {};
22
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
- __setModuleDefault(result, mod);
24
- return result;
25
- };
26
3
  Object.defineProperty(exports, "__esModule", { value: true });
27
4
  exports.Objects = void 0;
5
+ const tslib_1 = require("../../internal/tslib.js");
28
6
  const resource_1 = require("../../core/resource.js");
29
- const BulkAPI = __importStar(require("./bulk.js"));
7
+ const BulkAPI = tslib_1.__importStar(require("./bulk.js"));
30
8
  const bulk_1 = require("./bulk.js");
31
9
  const pagination_1 = require("../../core/pagination.js");
32
10
  const path_1 = require("../../internal/utils/path.js");
@@ -38,6 +16,16 @@ class Objects extends resource_1.APIResource {
38
16
  /**
39
17
  * Returns a paginated list of objects from the specified collection. Optionally
40
18
  * includes preference data for the objects.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * // Automatically fetches more pages as needed.
23
+ * for await (const object of client.objects.list(
24
+ * 'collection',
25
+ * )) {
26
+ * // ...
27
+ * }
28
+ * ```
41
29
  */
42
30
  list(collection, query = {}, options) {
43
31
  return this._client.getAPIList((0, path_1.path) `/v1/objects/${collection}`, (pagination_1.EntriesCursor), {
@@ -48,6 +36,14 @@ class Objects extends resource_1.APIResource {
48
36
  /**
49
37
  * Permanently removes an object from the specified collection. This operation
50
38
  * cannot be undone.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const object = await client.objects.delete(
43
+ * 'collection',
44
+ * 'id',
45
+ * );
46
+ * ```
51
47
  */
52
48
  delete(collection, id, options) {
53
49
  return this._client.delete((0, path_1.path) `/v1/objects/${collection}/${id}`, options);
@@ -57,6 +53,18 @@ class Objects extends resource_1.APIResource {
57
53
  * updated. This endpoint also handles
58
54
  * [inline identifications](/managing-recipients/identifying-recipients#inline-identifying-recipients)
59
55
  * for the `recipient`.
56
+ *
57
+ * @example
58
+ * ```ts
59
+ * const subscriptions = await client.objects.addSubscriptions(
60
+ * 'collection',
61
+ * 'object_id',
62
+ * {
63
+ * recipients: ['user_1', 'user_2'],
64
+ * properties: { key: 'value' },
65
+ * },
66
+ * );
67
+ * ```
60
68
  */
61
69
  addSubscriptions(collection, objectID, body, options) {
62
70
  return this._client.post((0, path_1.path) `/v1/objects/${collection}/${objectID}/subscriptions`, { body, ...options });
@@ -64,6 +72,16 @@ class Objects extends resource_1.APIResource {
64
72
  /**
65
73
  * Delete subscriptions for the specified recipients from an object. Returns the
66
74
  * list of deleted subscriptions.
75
+ *
76
+ * @example
77
+ * ```ts
78
+ * const subscriptions =
79
+ * await client.objects.deleteSubscriptions(
80
+ * 'collection',
81
+ * 'object_id',
82
+ * { recipients: ['user_123'] },
83
+ * );
84
+ * ```
67
85
  */
68
86
  deleteSubscriptions(collection, objectID, body, options) {
69
87
  return this._client.delete((0, path_1.path) `/v1/objects/${collection}/${objectID}/subscriptions`, {
@@ -74,18 +92,41 @@ class Objects extends resource_1.APIResource {
74
92
  /**
75
93
  * Retrieves a specific object by its ID from the specified collection. Returns the
76
94
  * object with all its properties.
95
+ *
96
+ * @example
97
+ * ```ts
98
+ * const object = await client.objects.get('collection', 'id');
99
+ * ```
77
100
  */
78
101
  get(collection, id, options) {
79
102
  return this._client.get((0, path_1.path) `/v1/objects/${collection}/${id}`, options);
80
103
  }
81
104
  /**
82
105
  * Returns the channel data for the specified object and channel.
106
+ *
107
+ * @example
108
+ * ```ts
109
+ * const channelData = await client.objects.getChannelData(
110
+ * 'collection',
111
+ * 'object_id',
112
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
113
+ * );
114
+ * ```
83
115
  */
84
116
  getChannelData(collection, objectID, channelID, options) {
85
117
  return this._client.get((0, path_1.path) `/v1/objects/${collection}/${objectID}/channel_data/${channelID}`, options);
86
118
  }
87
119
  /**
88
120
  * Returns the preference set for the specified object and preference set `id`.
121
+ *
122
+ * @example
123
+ * ```ts
124
+ * const preferenceSet = await client.objects.getPreferences(
125
+ * 'collection',
126
+ * 'object_id',
127
+ * 'default',
128
+ * );
129
+ * ```
89
130
  */
90
131
  getPreferences(collection, objectID, id, options) {
91
132
  return this._client.get((0, path_1.path) `/v1/objects/${collection}/${objectID}/preferences/${id}`, options);
@@ -94,18 +135,48 @@ class Objects extends resource_1.APIResource {
94
135
  * Returns a paginated list of messages for a specific object in the given
95
136
  * collection. Allows filtering by message status and provides various sorting
96
137
  * options.
138
+ *
139
+ * @example
140
+ * ```ts
141
+ * // Automatically fetches more pages as needed.
142
+ * for await (const message of client.objects.listMessages(
143
+ * 'projects',
144
+ * 'project-123',
145
+ * )) {
146
+ * // ...
147
+ * }
148
+ * ```
97
149
  */
98
150
  listMessages(collection, id, query = {}, options) {
99
151
  return this._client.getAPIList((0, path_1.path) `/v1/objects/${collection}/${id}/messages`, (pagination_1.EntriesCursor), { query, ...options });
100
152
  }
101
153
  /**
102
154
  * Returns a paginated list of preference sets for the specified object.
155
+ *
156
+ * @example
157
+ * ```ts
158
+ * const preferenceSets = await client.objects.listPreferences(
159
+ * 'collection',
160
+ * 'object_id',
161
+ * );
162
+ * ```
103
163
  */
104
164
  listPreferences(collection, objectID, options) {
105
165
  return this._client.get((0, path_1.path) `/v1/objects/${collection}/${objectID}/preferences`, options);
106
166
  }
107
167
  /**
108
168
  * Returns a paginated list of schedules for an object.
169
+ *
170
+ * @example
171
+ * ```ts
172
+ * // Automatically fetches more pages as needed.
173
+ * for await (const schedule of client.objects.listSchedules(
174
+ * 'collection',
175
+ * 'id',
176
+ * )) {
177
+ * // ...
178
+ * }
179
+ * ```
109
180
  */
110
181
  listSchedules(collection, id, query = {}, options) {
111
182
  return this._client.getAPIList((0, path_1.path) `/v1/objects/${collection}/${id}/schedules`, (pagination_1.EntriesCursor), { query, ...options });
@@ -114,6 +185,17 @@ class Objects extends resource_1.APIResource {
114
185
  * List subscriptions for an object. Either list the recipients that subscribe to
115
186
  * the provided object, or list the objects that the provided object is subscribed
116
187
  * to. Determined by the `mode` query parameter.
188
+ *
189
+ * @example
190
+ * ```ts
191
+ * // Automatically fetches more pages as needed.
192
+ * for await (const subscription of client.objects.listSubscriptions(
193
+ * 'collection',
194
+ * 'object_id',
195
+ * )) {
196
+ * // ...
197
+ * }
198
+ * ```
117
199
  */
118
200
  listSubscriptions(collection, objectID, query = {}, options) {
119
201
  return this._client.getAPIList((0, path_1.path) `/v1/objects/${collection}/${objectID}/subscriptions`, (pagination_1.EntriesCursor), { query, ...options });
@@ -122,6 +204,33 @@ class Objects extends resource_1.APIResource {
122
204
  * Creates a new object or updates an existing one in the specified collection.
123
205
  * This operation is used to identify objects with their properties, as well as
124
206
  * optional preferences and channel data.
207
+ *
208
+ * @example
209
+ * ```ts
210
+ * const object = await client.objects.set(
211
+ * 'collection',
212
+ * 'id',
213
+ * {
214
+ * channel_data: {
215
+ * '97c5837d-c65c-4d54-aa39-080eeb81c69d': {
216
+ * data: { tokens: ['push_token_123'] },
217
+ * },
218
+ * },
219
+ * locale: 'en-US',
220
+ * preferences: {
221
+ * default: {
222
+ * channel_types: { email: true },
223
+ * workflows: {
224
+ * 'dinosaurs-loose': {
225
+ * channel_types: { email: true },
226
+ * },
227
+ * },
228
+ * },
229
+ * },
230
+ * timezone: 'America/New_York',
231
+ * },
232
+ * );
233
+ * ```
125
234
  */
126
235
  set(collection, id, body, options) {
127
236
  return this._client.put((0, path_1.path) `/v1/objects/${collection}/${id}`, { body, ...options });
@@ -130,6 +239,16 @@ class Objects extends resource_1.APIResource {
130
239
  * Sets the channel data for the specified object and channel. If no object exists
131
240
  * in the current environment for the given `collection` and `object_id`, Knock
132
241
  * will create the object as part of this request.
242
+ *
243
+ * @example
244
+ * ```ts
245
+ * const channelData = await client.objects.setChannelData(
246
+ * 'collection',
247
+ * 'object_id',
248
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
249
+ * { data: { tokens: ['push_token_1'] } },
250
+ * );
251
+ * ```
133
252
  */
134
253
  setChannelData(collection, objectID, channelID, body, options) {
135
254
  return this._client.put((0, path_1.path) `/v1/objects/${collection}/${objectID}/channel_data/${channelID}`, {
@@ -144,6 +263,27 @@ class Objects extends resource_1.APIResource {
144
263
  * `:object_id`, Knock will create the object as part of this request. The
145
264
  * preference set `:id` can be either `default` or a `tenant.id`. Learn more about
146
265
  * [per-tenant preferences](/preferences/tenant-preferences).
266
+ *
267
+ * @example
268
+ * ```ts
269
+ * const preferenceSet = await client.objects.setPreferences(
270
+ * 'collection',
271
+ * 'object_id',
272
+ * 'default',
273
+ * {
274
+ * categories: {
275
+ * marketing: false,
276
+ * transactional: { channel_types: { email: false } },
277
+ * },
278
+ * channel_types: { email: true },
279
+ * workflows: {
280
+ * 'dinosaurs-loose': {
281
+ * channel_types: { email: false },
282
+ * },
283
+ * },
284
+ * },
285
+ * );
286
+ * ```
147
287
  */
148
288
  setPreferences(collection, objectID, id, body, options) {
149
289
  return this._client.put((0, path_1.path) `/v1/objects/${collection}/${objectID}/preferences/${id}`, {
@@ -153,6 +293,15 @@ class Objects extends resource_1.APIResource {
153
293
  }
154
294
  /**
155
295
  * Unsets the channel data for the specified object and channel.
296
+ *
297
+ * @example
298
+ * ```ts
299
+ * const response = await client.objects.unsetChannelData(
300
+ * 'collection',
301
+ * 'object_id',
302
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
303
+ * );
304
+ * ```
156
305
  */
157
306
  unsetChannelData(collection, objectID, channelID, options) {
158
307
  return this._client.delete((0, path_1.path) `/v1/objects/${collection}/${objectID}/channel_data/${channelID}`, options);
@@ -1 +1 @@
1
- {"version":3,"file":"objects.js","sourceRoot":"","sources":["../../src/resources/objects/objects.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,qDAAkD;AAIlD,mDAAkC;AAClC,oCAA2F;AAS3F,yDAA6F;AAE7F,uDAAiD;AAEjD,MAAa,OAAQ,SAAQ,sBAAW;IAAxC;;QACE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAqNtD,CAAC;IAnNC;;;OAGG;IACH,IAAI,CACF,UAAkB,EAClB,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAA,WAAI,EAAA,eAAe,UAAU,EAAE,EAAE,CAAA,0BAAqB,CAAA,EAAE;YACrF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,UAAkB,EAAE,EAAU,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,eAAe,UAAU,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;OAKG;IACH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 export class Objects extends APIResource {
12
12
  /**
13
13
  * Returns a paginated list of objects from the specified collection. Optionally
14
14
  * includes preference data for the objects.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * // Automatically fetches more pages as needed.
19
+ * for await (const object of client.objects.list(
20
+ * 'collection',
21
+ * )) {
22
+ * // ...
23
+ * }
24
+ * ```
15
25
  */
16
26
  list(collection, query = {}, options) {
17
27
  return this._client.getAPIList(path `/v1/objects/${collection}`, (EntriesCursor), {
@@ -22,6 +32,14 @@ export class Objects extends APIResource {
22
32
  /**
23
33
  * Permanently removes an object from the specified collection. This operation
24
34
  * cannot be undone.
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const object = await client.objects.delete(
39
+ * 'collection',
40
+ * 'id',
41
+ * );
42
+ * ```
25
43
  */
26
44
  delete(collection, id, options) {
27
45
  return this._client.delete(path `/v1/objects/${collection}/${id}`, options);
@@ -31,6 +49,18 @@ export class Objects extends APIResource {
31
49
  * updated. This endpoint also handles
32
50
  * [inline identifications](/managing-recipients/identifying-recipients#inline-identifying-recipients)
33
51
  * for the `recipient`.
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * const subscriptions = await client.objects.addSubscriptions(
56
+ * 'collection',
57
+ * 'object_id',
58
+ * {
59
+ * recipients: ['user_1', 'user_2'],
60
+ * properties: { key: 'value' },
61
+ * },
62
+ * );
63
+ * ```
34
64
  */
35
65
  addSubscriptions(collection, objectID, body, options) {
36
66
  return this._client.post(path `/v1/objects/${collection}/${objectID}/subscriptions`, { body, ...options });
@@ -38,6 +68,16 @@ export class Objects extends APIResource {
38
68
  /**
39
69
  * Delete subscriptions for the specified recipients from an object. Returns the
40
70
  * list of deleted subscriptions.
71
+ *
72
+ * @example
73
+ * ```ts
74
+ * const subscriptions =
75
+ * await client.objects.deleteSubscriptions(
76
+ * 'collection',
77
+ * 'object_id',
78
+ * { recipients: ['user_123'] },
79
+ * );
80
+ * ```
41
81
  */
42
82
  deleteSubscriptions(collection, objectID, body, options) {
43
83
  return this._client.delete(path `/v1/objects/${collection}/${objectID}/subscriptions`, {
@@ -48,18 +88,41 @@ export class Objects extends APIResource {
48
88
  /**
49
89
  * Retrieves a specific object by its ID from the specified collection. Returns the
50
90
  * object with all its properties.
91
+ *
92
+ * @example
93
+ * ```ts
94
+ * const object = await client.objects.get('collection', 'id');
95
+ * ```
51
96
  */
52
97
  get(collection, id, options) {
53
98
  return this._client.get(path `/v1/objects/${collection}/${id}`, options);
54
99
  }
55
100
  /**
56
101
  * Returns the channel data for the specified object and channel.
102
+ *
103
+ * @example
104
+ * ```ts
105
+ * const channelData = await client.objects.getChannelData(
106
+ * 'collection',
107
+ * 'object_id',
108
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
109
+ * );
110
+ * ```
57
111
  */
58
112
  getChannelData(collection, objectID, channelID, options) {
59
113
  return this._client.get(path `/v1/objects/${collection}/${objectID}/channel_data/${channelID}`, options);
60
114
  }
61
115
  /**
62
116
  * Returns the preference set for the specified object and preference set `id`.
117
+ *
118
+ * @example
119
+ * ```ts
120
+ * const preferenceSet = await client.objects.getPreferences(
121
+ * 'collection',
122
+ * 'object_id',
123
+ * 'default',
124
+ * );
125
+ * ```
63
126
  */
64
127
  getPreferences(collection, objectID, id, options) {
65
128
  return this._client.get(path `/v1/objects/${collection}/${objectID}/preferences/${id}`, options);
@@ -68,18 +131,48 @@ export class Objects extends APIResource {
68
131
  * Returns a paginated list of messages for a specific object in the given
69
132
  * collection. Allows filtering by message status and provides various sorting
70
133
  * options.
134
+ *
135
+ * @example
136
+ * ```ts
137
+ * // Automatically fetches more pages as needed.
138
+ * for await (const message of client.objects.listMessages(
139
+ * 'projects',
140
+ * 'project-123',
141
+ * )) {
142
+ * // ...
143
+ * }
144
+ * ```
71
145
  */
72
146
  listMessages(collection, id, query = {}, options) {
73
147
  return this._client.getAPIList(path `/v1/objects/${collection}/${id}/messages`, (EntriesCursor), { query, ...options });
74
148
  }
75
149
  /**
76
150
  * Returns a paginated list of preference sets for the specified object.
151
+ *
152
+ * @example
153
+ * ```ts
154
+ * const preferenceSets = await client.objects.listPreferences(
155
+ * 'collection',
156
+ * 'object_id',
157
+ * );
158
+ * ```
77
159
  */
78
160
  listPreferences(collection, objectID, options) {
79
161
  return this._client.get(path `/v1/objects/${collection}/${objectID}/preferences`, options);
80
162
  }
81
163
  /**
82
164
  * Returns a paginated list of schedules for an object.
165
+ *
166
+ * @example
167
+ * ```ts
168
+ * // Automatically fetches more pages as needed.
169
+ * for await (const schedule of client.objects.listSchedules(
170
+ * 'collection',
171
+ * 'id',
172
+ * )) {
173
+ * // ...
174
+ * }
175
+ * ```
83
176
  */
84
177
  listSchedules(collection, id, query = {}, options) {
85
178
  return this._client.getAPIList(path `/v1/objects/${collection}/${id}/schedules`, (EntriesCursor), { query, ...options });
@@ -88,6 +181,17 @@ export class Objects extends APIResource {
88
181
  * List subscriptions for an object. Either list the recipients that subscribe to
89
182
  * the provided object, or list the objects that the provided object is subscribed
90
183
  * to. Determined by the `mode` query parameter.
184
+ *
185
+ * @example
186
+ * ```ts
187
+ * // Automatically fetches more pages as needed.
188
+ * for await (const subscription of client.objects.listSubscriptions(
189
+ * 'collection',
190
+ * 'object_id',
191
+ * )) {
192
+ * // ...
193
+ * }
194
+ * ```
91
195
  */
92
196
  listSubscriptions(collection, objectID, query = {}, options) {
93
197
  return this._client.getAPIList(path `/v1/objects/${collection}/${objectID}/subscriptions`, (EntriesCursor), { query, ...options });
@@ -96,6 +200,33 @@ export class Objects extends APIResource {
96
200
  * Creates a new object or updates an existing one in the specified collection.
97
201
  * This operation is used to identify objects with their properties, as well as
98
202
  * optional preferences and channel data.
203
+ *
204
+ * @example
205
+ * ```ts
206
+ * const object = await client.objects.set(
207
+ * 'collection',
208
+ * 'id',
209
+ * {
210
+ * channel_data: {
211
+ * '97c5837d-c65c-4d54-aa39-080eeb81c69d': {
212
+ * data: { tokens: ['push_token_123'] },
213
+ * },
214
+ * },
215
+ * locale: 'en-US',
216
+ * preferences: {
217
+ * default: {
218
+ * channel_types: { email: true },
219
+ * workflows: {
220
+ * 'dinosaurs-loose': {
221
+ * channel_types: { email: true },
222
+ * },
223
+ * },
224
+ * },
225
+ * },
226
+ * timezone: 'America/New_York',
227
+ * },
228
+ * );
229
+ * ```
99
230
  */
100
231
  set(collection, id, body, options) {
101
232
  return this._client.put(path `/v1/objects/${collection}/${id}`, { body, ...options });
@@ -104,6 +235,16 @@ export class Objects extends APIResource {
104
235
  * Sets the channel data for the specified object and channel. If no object exists
105
236
  * in the current environment for the given `collection` and `object_id`, Knock
106
237
  * will create the object as part of this request.
238
+ *
239
+ * @example
240
+ * ```ts
241
+ * const channelData = await client.objects.setChannelData(
242
+ * 'collection',
243
+ * 'object_id',
244
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
245
+ * { data: { tokens: ['push_token_1'] } },
246
+ * );
247
+ * ```
107
248
  */
108
249
  setChannelData(collection, objectID, channelID, body, options) {
109
250
  return this._client.put(path `/v1/objects/${collection}/${objectID}/channel_data/${channelID}`, {
@@ -118,6 +259,27 @@ export class Objects extends APIResource {
118
259
  * `:object_id`, Knock will create the object as part of this request. The
119
260
  * preference set `:id` can be either `default` or a `tenant.id`. Learn more about
120
261
  * [per-tenant preferences](/preferences/tenant-preferences).
262
+ *
263
+ * @example
264
+ * ```ts
265
+ * const preferenceSet = await client.objects.setPreferences(
266
+ * 'collection',
267
+ * 'object_id',
268
+ * 'default',
269
+ * {
270
+ * categories: {
271
+ * marketing: false,
272
+ * transactional: { channel_types: { email: false } },
273
+ * },
274
+ * channel_types: { email: true },
275
+ * workflows: {
276
+ * 'dinosaurs-loose': {
277
+ * channel_types: { email: false },
278
+ * },
279
+ * },
280
+ * },
281
+ * );
282
+ * ```
121
283
  */
122
284
  setPreferences(collection, objectID, id, body, options) {
123
285
  return this._client.put(path `/v1/objects/${collection}/${objectID}/preferences/${id}`, {
@@ -127,6 +289,15 @@ export class Objects extends APIResource {
127
289
  }
128
290
  /**
129
291
  * Unsets the channel data for the specified object and channel.
292
+ *
293
+ * @example
294
+ * ```ts
295
+ * const response = await client.objects.unsetChannelData(
296
+ * 'collection',
297
+ * 'object_id',
298
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
299
+ * );
300
+ * ```
130
301
  */
131
302
  unsetChannelData(collection, objectID, channelID, options) {
132
303
  return this._client.delete(path `/v1/objects/${collection}/${objectID}/channel_data/${channelID}`, options);
@@ -1 +1 @@
1
- {"version":3,"file":"objects.mjs","sourceRoot":"","sources":["../../src/resources/objects/objects.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,KAAK,OAAO;OACZ,EAAE,IAAI,EAA+D;OASrE,EAAE,aAAa,EAAyC;OAExD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAqNtD,CAAC;IAnNC;;;OAGG;IACH,IAAI,CACF,UAAkB,EAClB,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAA,eAAe,UAAU,EAAE,EAAE,CAAA,aAAqB,CAAA,EAAE;YACrF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,UAAkB,EAAE,EAAU,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,eAAe,UAAU,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;OAKG;IACH,gBAAgB,CACd,UAAkB,EAClB,QAAgB,EAChB,IAAkC,EAClC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,eAAe,UAAU,IAAI,QAAQ,gBAAgB,E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AI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,cAAc,CACZ,UAAkB,EAClB,QAAgB,EAChB,SAAiB,EACjB,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,UAAU,IAAI,QAAQ,iBAAiB,SAAS,EAAE,EAAE;YAC7F,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,cAAc,CACZ,UAAkB,EAClB,QAAgB,EAChB,EAAU,EACV,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,UAAU,IAAI,QAAQ,gBAAgB,EAAE,EAAE,EAAE;YACrF,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,gBAAgB,CACd,UAAkB,EAClB,QAAgB,EAChB,SAAiB,EACjB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CACxB,IAAI,CAAA,eAAe,UAAU,IAAI,QAAQ,iBAAiB,SAAS,EAAE,EACrE,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AAqWD,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC"}
@@ -1,19 +1,6 @@
1
1
  "use strict";
2
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
3
  Object.defineProperty(exports, "__esModule", { value: true });
18
- __exportStar(require("./objects/index.js"), exports);
4
+ const tslib_1 = require("../internal/tslib.js");
5
+ tslib_1.__exportStar(require("./objects/index.js"), exports);
19
6
  //# sourceMappingURL=objects.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"objects.js","sourceRoot":"","sources":["../src/resources/objects.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;AAEtF,qDAAgC"}
1
+ {"version":3,"file":"objects.js","sourceRoot":"","sources":["../src/resources/objects.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6DAAgC"}