@knocklabs/node 1.31.1 → 1.33.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 (310) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/api-promise.d.mts +1 -0
  3. package/api-promise.d.mts.map +1 -1
  4. package/api-promise.d.ts +1 -0
  5. package/api-promise.d.ts.map +1 -1
  6. package/api-promise.mjs +1 -0
  7. package/api-promise.mjs.map +1 -1
  8. package/client.d.mts.map +1 -1
  9. package/client.d.ts.map +1 -1
  10. package/client.js +20 -1
  11. package/client.js.map +1 -1
  12. package/client.mjs +20 -1
  13. package/client.mjs.map +1 -1
  14. package/core/api-promise.d.mts.map +1 -1
  15. package/core/api-promise.d.ts.map +1 -1
  16. package/core/api-promise.mjs.map +1 -1
  17. package/core/error.mjs.map +1 -1
  18. package/core/pagination.d.mts.map +1 -1
  19. package/core/pagination.d.ts.map +1 -1
  20. package/core/pagination.mjs.map +1 -1
  21. package/core/resource.d.mts.map +1 -1
  22. package/core/resource.d.ts.map +1 -1
  23. package/core/uploads.d.mts.map +1 -1
  24. package/core/uploads.d.ts.map +1 -1
  25. package/core/uploads.mjs.map +1 -1
  26. package/error.d.mts +1 -0
  27. package/error.d.mts.map +1 -1
  28. package/error.d.ts +1 -0
  29. package/error.d.ts.map +1 -1
  30. package/error.mjs +1 -0
  31. package/error.mjs.map +1 -1
  32. package/index.d.mts.map +1 -1
  33. package/index.d.ts.map +1 -1
  34. package/index.mjs +1 -0
  35. package/index.mjs.map +1 -1
  36. package/internal/detect-platform.mjs.map +1 -1
  37. package/internal/headers.mjs.map +1 -1
  38. package/internal/parse.d.mts.map +1 -1
  39. package/internal/parse.d.ts.map +1 -1
  40. package/internal/parse.mjs.map +1 -1
  41. package/internal/qs/formats.d.mts.map +1 -1
  42. package/internal/qs/formats.d.ts.map +1 -1
  43. package/internal/qs/index.d.mts +2 -2
  44. package/internal/qs/index.d.mts.map +1 -1
  45. package/internal/qs/index.d.ts +2 -2
  46. package/internal/qs/index.d.ts.map +1 -1
  47. package/internal/qs/index.mjs.map +1 -1
  48. package/internal/qs/stringify.d.mts.map +1 -1
  49. package/internal/qs/stringify.d.ts.map +1 -1
  50. package/internal/qs/stringify.mjs.map +1 -1
  51. package/internal/qs/utils.d.mts.map +1 -1
  52. package/internal/qs/utils.d.ts.map +1 -1
  53. package/internal/qs/utils.mjs.map +1 -1
  54. package/internal/request-options.d.mts.map +1 -1
  55. package/internal/request-options.d.ts.map +1 -1
  56. package/internal/shims.d.mts +6 -0
  57. package/internal/shims.d.mts.map +1 -1
  58. package/internal/shims.d.ts +6 -0
  59. package/internal/shims.d.ts.map +1 -1
  60. package/internal/to-file.d.mts.map +1 -1
  61. package/internal/to-file.d.ts.map +1 -1
  62. package/internal/to-file.mjs.map +1 -1
  63. package/internal/types.d.mts +10 -10
  64. package/internal/types.d.mts.map +1 -1
  65. package/internal/types.d.ts +10 -10
  66. package/internal/types.d.ts.map +1 -1
  67. package/internal/uploads.d.mts.map +1 -1
  68. package/internal/uploads.d.ts.map +1 -1
  69. package/internal/uploads.mjs.map +1 -1
  70. package/internal/utils/base64.mjs.map +1 -1
  71. package/internal/utils/log.d.mts.map +1 -1
  72. package/internal/utils/log.d.ts.map +1 -1
  73. package/internal/utils/log.js +2 -0
  74. package/internal/utils/log.js.map +1 -1
  75. package/internal/utils/log.mjs +2 -0
  76. package/internal/utils/log.mjs.map +1 -1
  77. package/internal/utils/path.mjs.map +1 -1
  78. package/internal/utils/query.d.mts +1 -6
  79. package/internal/utils/query.d.mts.map +1 -1
  80. package/internal/utils/query.d.ts +1 -6
  81. package/internal/utils/query.d.ts.map +1 -1
  82. package/internal/utils/query.js +7 -28
  83. package/internal/utils/query.js.map +1 -1
  84. package/internal/utils/query.mjs +5 -26
  85. package/internal/utils/query.mjs.map +1 -1
  86. package/internal/utils/values.mjs.map +1 -1
  87. package/internal/utils.d.mts.map +1 -1
  88. package/internal/utils.d.ts.map +1 -1
  89. package/internal/utils.mjs.map +1 -1
  90. package/lib/index.d.mts.map +1 -1
  91. package/lib/index.d.ts.map +1 -1
  92. package/lib/index.mjs.map +1 -1
  93. package/lib/stringifyQuery.d.mts +19 -0
  94. package/lib/stringifyQuery.d.mts.map +1 -0
  95. package/lib/stringifyQuery.d.ts +19 -0
  96. package/lib/stringifyQuery.d.ts.map +1 -0
  97. package/lib/stringifyQuery.js +43 -0
  98. package/lib/stringifyQuery.js.map +1 -0
  99. package/lib/stringifyQuery.mjs +39 -0
  100. package/lib/stringifyQuery.mjs.map +1 -0
  101. package/lib/tokenSigner.d.mts.map +1 -1
  102. package/lib/tokenSigner.d.ts.map +1 -1
  103. package/lib/tokenSigner.mjs.map +1 -1
  104. package/package.json +1 -1
  105. package/pagination.d.mts +1 -0
  106. package/pagination.d.mts.map +1 -1
  107. package/pagination.d.ts +1 -0
  108. package/pagination.d.ts.map +1 -1
  109. package/pagination.mjs +1 -0
  110. package/pagination.mjs.map +1 -1
  111. package/resource.d.mts +1 -0
  112. package/resource.d.mts.map +1 -1
  113. package/resource.d.ts +1 -0
  114. package/resource.d.ts.map +1 -1
  115. package/resource.mjs +1 -0
  116. package/resource.mjs.map +1 -1
  117. package/resources/audiences.d.mts.map +1 -1
  118. package/resources/audiences.d.ts.map +1 -1
  119. package/resources/audiences.mjs.map +1 -1
  120. package/resources/bulk-operations.d.mts.map +1 -1
  121. package/resources/bulk-operations.d.ts.map +1 -1
  122. package/resources/bulk-operations.mjs.map +1 -1
  123. package/resources/channels/bulk.d.mts.map +1 -1
  124. package/resources/channels/bulk.d.ts.map +1 -1
  125. package/resources/channels/bulk.mjs.map +1 -1
  126. package/resources/channels/channels.d.mts.map +1 -1
  127. package/resources/channels/channels.d.ts.map +1 -1
  128. package/resources/channels/channels.mjs.map +1 -1
  129. package/resources/channels/index.d.mts.map +1 -1
  130. package/resources/channels/index.d.ts.map +1 -1
  131. package/resources/channels/index.mjs.map +1 -1
  132. package/resources/channels.d.mts.map +1 -1
  133. package/resources/channels.d.ts.map +1 -1
  134. package/resources/channels.mjs.map +1 -1
  135. package/resources/index.d.mts.map +1 -1
  136. package/resources/index.d.ts.map +1 -1
  137. package/resources/index.mjs.map +1 -1
  138. package/resources/integrations/census.d.mts.map +1 -1
  139. package/resources/integrations/census.d.ts.map +1 -1
  140. package/resources/integrations/census.mjs.map +1 -1
  141. package/resources/integrations/hightouch.d.mts.map +1 -1
  142. package/resources/integrations/hightouch.d.ts.map +1 -1
  143. package/resources/integrations/hightouch.mjs.map +1 -1
  144. package/resources/integrations/index.d.mts.map +1 -1
  145. package/resources/integrations/index.d.ts.map +1 -1
  146. package/resources/integrations/index.mjs.map +1 -1
  147. package/resources/integrations/integrations.d.mts.map +1 -1
  148. package/resources/integrations/integrations.d.ts.map +1 -1
  149. package/resources/integrations/integrations.mjs.map +1 -1
  150. package/resources/integrations.d.mts.map +1 -1
  151. package/resources/integrations.d.ts.map +1 -1
  152. package/resources/integrations.mjs.map +1 -1
  153. package/resources/messages/batch.d.mts.map +1 -1
  154. package/resources/messages/batch.d.ts.map +1 -1
  155. package/resources/messages/batch.mjs.map +1 -1
  156. package/resources/messages/index.d.mts.map +1 -1
  157. package/resources/messages/index.d.ts.map +1 -1
  158. package/resources/messages/index.mjs.map +1 -1
  159. package/resources/messages/messages.d.mts +20 -1
  160. package/resources/messages/messages.d.mts.map +1 -1
  161. package/resources/messages/messages.d.ts +20 -1
  162. package/resources/messages/messages.d.ts.map +1 -1
  163. package/resources/messages/messages.js.map +1 -1
  164. package/resources/messages/messages.mjs.map +1 -1
  165. package/resources/messages.d.mts.map +1 -1
  166. package/resources/messages.d.ts.map +1 -1
  167. package/resources/messages.mjs.map +1 -1
  168. package/resources/objects/bulk.d.mts.map +1 -1
  169. package/resources/objects/bulk.d.ts.map +1 -1
  170. package/resources/objects/bulk.mjs.map +1 -1
  171. package/resources/objects/index.d.mts.map +1 -1
  172. package/resources/objects/index.d.ts.map +1 -1
  173. package/resources/objects/index.mjs.map +1 -1
  174. package/resources/objects/objects.d.mts.map +1 -1
  175. package/resources/objects/objects.d.ts.map +1 -1
  176. package/resources/objects/objects.mjs.map +1 -1
  177. package/resources/objects.d.mts.map +1 -1
  178. package/resources/objects.d.ts.map +1 -1
  179. package/resources/objects.mjs.map +1 -1
  180. package/resources/providers/index.d.mts.map +1 -1
  181. package/resources/providers/index.d.ts.map +1 -1
  182. package/resources/providers/index.mjs.map +1 -1
  183. package/resources/providers/ms-teams.d.mts +4 -0
  184. package/resources/providers/ms-teams.d.mts.map +1 -1
  185. package/resources/providers/ms-teams.d.ts +4 -0
  186. package/resources/providers/ms-teams.d.ts.map +1 -1
  187. package/resources/providers/ms-teams.mjs.map +1 -1
  188. package/resources/providers/providers.d.mts.map +1 -1
  189. package/resources/providers/providers.d.ts.map +1 -1
  190. package/resources/providers/providers.mjs.map +1 -1
  191. package/resources/providers/slack.d.mts.map +1 -1
  192. package/resources/providers/slack.d.ts.map +1 -1
  193. package/resources/providers/slack.mjs.map +1 -1
  194. package/resources/providers.d.mts.map +1 -1
  195. package/resources/providers.d.ts.map +1 -1
  196. package/resources/providers.mjs.map +1 -1
  197. package/resources/recipients/channel-data.d.mts +13 -2
  198. package/resources/recipients/channel-data.d.mts.map +1 -1
  199. package/resources/recipients/channel-data.d.ts +13 -2
  200. package/resources/recipients/channel-data.d.ts.map +1 -1
  201. package/resources/recipients/channel-data.mjs.map +1 -1
  202. package/resources/recipients/index.d.mts.map +1 -1
  203. package/resources/recipients/index.d.ts.map +1 -1
  204. package/resources/recipients/index.mjs.map +1 -1
  205. package/resources/recipients/preferences.d.mts.map +1 -1
  206. package/resources/recipients/preferences.d.ts.map +1 -1
  207. package/resources/recipients/preferences.mjs.map +1 -1
  208. package/resources/recipients/recipients.d.mts.map +1 -1
  209. package/resources/recipients/recipients.d.ts.map +1 -1
  210. package/resources/recipients/recipients.mjs.map +1 -1
  211. package/resources/recipients/subscriptions.d.mts.map +1 -1
  212. package/resources/recipients/subscriptions.d.ts.map +1 -1
  213. package/resources/recipients/subscriptions.mjs.map +1 -1
  214. package/resources/recipients.d.mts.map +1 -1
  215. package/resources/recipients.d.ts.map +1 -1
  216. package/resources/recipients.mjs.map +1 -1
  217. package/resources/schedules/bulk.d.mts.map +1 -1
  218. package/resources/schedules/bulk.d.ts.map +1 -1
  219. package/resources/schedules/bulk.mjs.map +1 -1
  220. package/resources/schedules/index.d.mts.map +1 -1
  221. package/resources/schedules/index.d.ts.map +1 -1
  222. package/resources/schedules/index.mjs.map +1 -1
  223. package/resources/schedules/schedules.d.mts.map +1 -1
  224. package/resources/schedules/schedules.d.ts.map +1 -1
  225. package/resources/schedules/schedules.mjs.map +1 -1
  226. package/resources/schedules.d.mts.map +1 -1
  227. package/resources/schedules.d.ts.map +1 -1
  228. package/resources/schedules.mjs.map +1 -1
  229. package/resources/shared.d.mts +1 -1
  230. package/resources/shared.d.mts.map +1 -1
  231. package/resources/shared.d.ts +1 -1
  232. package/resources/shared.d.ts.map +1 -1
  233. package/resources/tenants/bulk.d.mts.map +1 -1
  234. package/resources/tenants/bulk.d.ts.map +1 -1
  235. package/resources/tenants/bulk.mjs.map +1 -1
  236. package/resources/tenants/index.d.mts.map +1 -1
  237. package/resources/tenants/index.d.ts.map +1 -1
  238. package/resources/tenants/index.mjs.map +1 -1
  239. package/resources/tenants/tenants.d.mts +36 -0
  240. package/resources/tenants/tenants.d.mts.map +1 -1
  241. package/resources/tenants/tenants.d.ts +36 -0
  242. package/resources/tenants/tenants.d.ts.map +1 -1
  243. package/resources/tenants/tenants.js.map +1 -1
  244. package/resources/tenants/tenants.mjs.map +1 -1
  245. package/resources/tenants.d.mts.map +1 -1
  246. package/resources/tenants.d.ts.map +1 -1
  247. package/resources/tenants.mjs.map +1 -1
  248. package/resources/users/bulk.d.mts +88 -3
  249. package/resources/users/bulk.d.mts.map +1 -1
  250. package/resources/users/bulk.d.ts +88 -3
  251. package/resources/users/bulk.d.ts.map +1 -1
  252. package/resources/users/bulk.js +1 -1
  253. package/resources/users/bulk.js.map +1 -1
  254. package/resources/users/bulk.mjs +1 -1
  255. package/resources/users/bulk.mjs.map +1 -1
  256. package/resources/users/feeds.d.mts.map +1 -1
  257. package/resources/users/feeds.d.ts.map +1 -1
  258. package/resources/users/feeds.mjs.map +1 -1
  259. package/resources/users/guides.d.mts.map +1 -1
  260. package/resources/users/guides.d.ts.map +1 -1
  261. package/resources/users/guides.mjs.map +1 -1
  262. package/resources/users/index.d.mts.map +1 -1
  263. package/resources/users/index.d.ts.map +1 -1
  264. package/resources/users/index.mjs.map +1 -1
  265. package/resources/users/users.d.mts.map +1 -1
  266. package/resources/users/users.d.ts.map +1 -1
  267. package/resources/users/users.mjs.map +1 -1
  268. package/resources/users.d.mts.map +1 -1
  269. package/resources/users.d.ts.map +1 -1
  270. package/resources/users.mjs.map +1 -1
  271. package/resources/workflow-recipient-runs.d.mts +3 -2
  272. package/resources/workflow-recipient-runs.d.mts.map +1 -1
  273. package/resources/workflow-recipient-runs.d.ts +3 -2
  274. package/resources/workflow-recipient-runs.d.ts.map +1 -1
  275. package/resources/workflow-recipient-runs.mjs.map +1 -1
  276. package/resources/workflows.d.mts +33 -10
  277. package/resources/workflows.d.mts.map +1 -1
  278. package/resources/workflows.d.ts +33 -10
  279. package/resources/workflows.d.ts.map +1 -1
  280. package/resources/workflows.js +1 -0
  281. package/resources/workflows.js.map +1 -1
  282. package/resources/workflows.mjs +1 -0
  283. package/resources/workflows.mjs.map +1 -1
  284. package/resources.d.mts.map +1 -1
  285. package/resources.d.ts.map +1 -1
  286. package/resources.mjs.map +1 -1
  287. package/src/client.ts +21 -1
  288. package/src/internal/types.ts +6 -8
  289. package/src/internal/utils/log.ts +2 -0
  290. package/src/internal/utils/query.ts +5 -29
  291. package/src/lib/stringifyQuery.ts +41 -0
  292. package/src/resources/messages/messages.ts +33 -11
  293. package/src/resources/providers/ms-teams.ts +5 -0
  294. package/src/resources/recipients/channel-data.ts +14 -2
  295. package/src/resources/shared.ts +1 -0
  296. package/src/resources/tenants/tenants.ts +44 -0
  297. package/src/resources/users/bulk.ts +90 -3
  298. package/src/resources/workflow-recipient-runs.ts +3 -2
  299. package/src/resources/workflows.ts +36 -10
  300. package/src/version.ts +1 -1
  301. package/uploads.d.mts +1 -0
  302. package/uploads.d.mts.map +1 -1
  303. package/uploads.d.ts +1 -0
  304. package/uploads.d.ts.map +1 -1
  305. package/uploads.mjs +1 -0
  306. package/uploads.mjs.map +1 -1
  307. package/version.d.mts +1 -1
  308. package/version.d.ts +1 -1
  309. package/version.js +1 -1
  310. package/version.mjs +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"workflows.d.mts","sourceRoot":"","sources":["../src/resources/workflows.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,aAAa;OAClB,KAAK,UAAU;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAQ3F;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,OAAO,CACL,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,qBAAqB,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;CAGvC;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC;CAC7D;AAED,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,UAAU,EAAE,KAAK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GG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC;CAC7D;AAED,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,UAAU,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAElD;;;;OAIG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAE9C;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC;;;;;OAKG;IACH,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IAEzC;;OAEG;IACH,QAAQ,CAAC,EAAE,qBAAqB,CAAC,QAAQ,GAAG,IAAI,CAAC;IAEjD;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC,mBAAmB,GAAG,IAAI,CAAC;CAChD;AAED,yBAAiB,qBAAqB,CAAC;IACrC;;OAEG;IACH,UAAiB,QAAQ;QACvB;;;;WAIG;QACH,YAAY,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAE9B;;;WAGG;QACH,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;KAC7B;CACF;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
@@ -46,6 +46,7 @@ export declare class Workflows extends APIResource {
46
46
  * severity: 'critical',
47
47
  * system_status: 'fences_failing',
48
48
  * },
49
+ * settings: { sandbox_mode: true, skip_delay: true },
49
50
  * tenant: 'ingen_isla_nublar',
50
51
  * });
51
52
  * ```
@@ -64,11 +65,11 @@ export interface WorkflowTriggerResponse {
64
65
  }
65
66
  export interface WorkflowCancelParams {
66
67
  /**
67
- * An optional key that is used to reference a specific workflow trigger request
68
- * when issuing a [workflow cancellation](/send-notifications/canceling-workflows)
69
- * request. Must be provided while triggering a workflow in order to enable
70
- * subsequent cancellation. Should be unique across trigger requests to avoid
71
- * unintentional cancellations.
68
+ * A key that is used to reference a specific workflow trigger request when issuing
69
+ * a [workflow cancellation](/send-notifications/canceling-workflows) request. Must
70
+ * be provided while triggering a workflow in order to enable subsequent
71
+ * cancellation. Should be unique across trigger requests to avoid unintentional
72
+ * cancellations.
72
73
  */
73
74
  cancellation_key: string;
74
75
  /**
@@ -90,11 +91,11 @@ export interface WorkflowTriggerParams {
90
91
  */
91
92
  actor?: RecipientsAPI.RecipientRequest | null;
92
93
  /**
93
- * An optional key that is used to reference a specific workflow trigger request
94
- * when issuing a [workflow cancellation](/send-notifications/canceling-workflows)
95
- * request. Must be provided while triggering a workflow in order to enable
96
- * subsequent cancellation. Should be unique across trigger requests to avoid
97
- * unintentional cancellations.
94
+ * A key that is used to reference a specific workflow trigger request when issuing
95
+ * a [workflow cancellation](/send-notifications/canceling-workflows) request. Must
96
+ * be provided while triggering a workflow in order to enable subsequent
97
+ * cancellation. Should be unique across trigger requests to avoid unintentional
98
+ * cancellations.
98
99
  */
99
100
  cancellation_key?: string | null;
100
101
  /**
@@ -106,11 +107,33 @@ export interface WorkflowTriggerParams {
106
107
  data?: {
107
108
  [key: string]: unknown;
108
109
  } | null;
110
+ /**
111
+ * Optional settings that control how this workflow trigger is executed.
112
+ */
113
+ settings?: WorkflowTriggerParams.Settings | null;
109
114
  /**
110
115
  * An request to set a tenant inline.
111
116
  */
112
117
  tenant?: TenantsAPI.InlineTenantRequest | null;
113
118
  }
119
+ export declare namespace WorkflowTriggerParams {
120
+ /**
121
+ * Optional settings that control how this workflow trigger is executed.
122
+ */
123
+ interface Settings {
124
+ /**
125
+ * When set to true, overrides the sandbox mode for all channels in this workflow
126
+ * run, messages are not delivered to the underlying providers. If false or not
127
+ * set, the workflow delivers messages normally.
128
+ */
129
+ sandbox_mode?: boolean | null;
130
+ /**
131
+ * When set to true, skips all delay steps in the workflow for this trigger
132
+ * request. If false or not set, delay steps execute normally.
133
+ */
134
+ skip_delay?: boolean | null;
135
+ }
136
+ }
114
137
  export declare namespace Workflows {
115
138
  export { type WorkflowTriggerResponse as WorkflowTriggerResponse, type WorkflowCancelParams as WorkflowCancelParams, type WorkflowTriggerParams as WorkflowTriggerParams, };
116
139
  }
@@ -1 +1 @@
1
- {"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../src/resources/workflows.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,aAAa;OAClB,KAAK,UAAU;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAQ3F;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,OAAO,CACL,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,qBAAqB,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;CAGvC;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC;CAC7D;AAED,MAAM,WAA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failing',
56
56
  * },
57
+ * settings: { sandbox_mode: true, skip_delay: true },
57
58
  * tenant: 'ingen_isla_nublar',
58
59
  * });
59
60
  * ```
@@ -1 +1 @@
1
- {"version":3,"file":"workflows.js","sourceRoot":"","sources":["../src/resources/workflows.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,oDAAmD;AAEnD,oDAA8C;AAE9C;;GAEG;AACH,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,GAAW,EAAE,IAA0B,EAAE,OAAwB;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,iBAAiB,GAAG,SAAS,EAAE;YAC1D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,OAAO,CACL,GAAW,EACX,IAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,iBAAiB,GAAG,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AA1DD,8BA0DC"}
1
+ {"version":3,"file":"workflows.js","sourceRoot":"","sources":["../src/resources/workflows.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,oDAAmD;AAEnD,oDAA8C;AAE9C;;GAEG;AACH,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,GAAW,EAAE,IAA0B,EAAE,OAAwB;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,iBAAiB,GAAG,SAAS,EAAE;YAC1D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,OAAO,CACL,GAAW,EACX,IAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,iBAAiB,GAAG,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AA3DD,8BA2DC"}
@@ -51,6 +51,7 @@ export class Workflows extends APIResource {
51
51
  * severity: 'critical',
52
52
  * system_status: 'fences_failing',
53
53
  * },
54
+ * settings: { sandbox_mode: true, skip_delay: true },
54
55
  * tenant: 'ingen_isla_nublar',
55
56
  * });
56
57
  * ```
@@ -1 +1 @@
1
- {"version":3,"file":"workflows.mjs","sourceRoot":"","sources":["../src/resources/workflows.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,GAAW,EAAE,IAA0B,EAAE,OAAwB;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,iBAAiB,GAAG,SAAS,EAAE;YAC1D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,OAAO,CACL,GAAW,EACX,IAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,iBAAiB,GAAG,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF"}
1
+ {"version":3,"file":"workflows.mjs","sourceRoot":"","sources":["../src/resources/workflows.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,GAAW,EAAE,IAA0B,EAAE,OAAwB;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,iBAAiB,GAAG,SAAS,EAAE;YAC1D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,OAAO,CACL,GAAW,EACX,IAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,iBAAiB,GAAG,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"resources.d.mts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"resources.d.mts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":"AAAA,sCAAkC"}
@@ -1 +1 @@
1
- {"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":"AAAA,qCAAkC"}
package/resources.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"resources.mjs","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"resources.mjs","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":"AAAA,sCAAkC"}
package/src/client.ts CHANGED
@@ -294,6 +294,18 @@ export class Knock {
294
294
  this.fetch = options.fetch ?? Shims.getDefaultFetch();
295
295
  this.#encoder = Opts.FallbackEncoder;
296
296
 
297
+ const customHeadersEnv = readEnv('KNOCK_CUSTOM_HEADERS');
298
+ if (customHeadersEnv) {
299
+ const parsed: Record<string, string> = {};
300
+ for (const line of customHeadersEnv.split('\n')) {
301
+ const colon = line.indexOf(':');
302
+ if (colon >= 0) {
303
+ parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim();
304
+ }
305
+ }
306
+ options.defaultHeaders = { ...parsed, ...options.defaultHeaders };
307
+ }
308
+
297
309
  this._options = options;
298
310
  this.idempotencyHeader = 'Idempotency-Key';
299
311
 
@@ -808,11 +820,19 @@ export class Knock {
808
820
  return () => controller.abort();
809
821
  }
810
822
 
811
- private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): {
823
+ private buildBody({ options }: { options: FinalRequestOptions }): {
812
824
  bodyHeaders: HeadersLike;
813
825
  body: BodyInit | undefined;
814
826
  } {
827
+ const { body, headers: rawHeaders } = options;
815
828
  if (!body) {
829
+ // A resource method always passes a `body` key when its operation defines a
830
+ // request body, even if the caller omitted an optional body param. Keep the
831
+ // content-type for those, and only elide it for operations with no body at
832
+ // all (e.g. GET/DELETE).
833
+ if (body == null && 'body' in options) {
834
+ return this.#encoder({ body, headers: buildHeaders([rawHeaders]) });
835
+ }
816
836
  return { bodyHeaders: undefined, body: undefined };
817
837
  }
818
838
  const headers = buildHeaders([rawHeaders]);
@@ -40,7 +40,6 @@ type OverloadedParameters<T> =
40
40
  : T extends (...args: infer A) => unknown ? A
41
41
  : never;
42
42
 
43
- /* eslint-disable */
44
43
  /**
45
44
  * These imports attempt to get types from a parent package's dependencies.
46
45
  * Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which
@@ -63,19 +62,18 @@ type OverloadedParameters<T> =
63
62
  *
64
63
  * [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition
65
64
  */
66
- /** @ts-ignore For users with \@types/node */
65
+ /** @ts-ignore For users with \@types/node */ /* prettier-ignore */
67
66
  type UndiciTypesRequestInit = NotAny<import('../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit>;
68
- /** @ts-ignore For users with undici */
67
+ /** @ts-ignore For users with undici */ /* prettier-ignore */
69
68
  type UndiciRequestInit = NotAny<import('../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici/index.d.ts').RequestInit>;
70
- /** @ts-ignore For users with \@types/bun */
69
+ /** @ts-ignore For users with \@types/bun */ /* prettier-ignore */
71
70
  type BunRequestInit = globalThis.FetchRequestInit;
72
- /** @ts-ignore For users with node-fetch@2 */
71
+ /** @ts-ignore For users with node-fetch@2 */ /* prettier-ignore */
73
72
  type NodeFetch2RequestInit = NotAny<import('../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit>;
74
- /** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */
73
+ /** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ /* prettier-ignore */
75
74
  type NodeFetch3RequestInit = NotAny<import('../node_modules/node-fetch').RequestInit> | NotAny<import('../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/node-fetch').RequestInit>;
76
- /** @ts-ignore For users who use Deno */
75
+ /** @ts-ignore For users who use Deno */ /* prettier-ignore */
77
76
  type FetchRequestInit = NonNullable<OverloadedParameters<typeof fetch>[1]>;
78
- /* eslint-enable */
79
77
 
80
78
  type RequestInits =
81
79
  | NotAny<UndiciTypesRequestInit>
@@ -107,6 +107,8 @@ export const formatRequestDetails = (details: {
107
107
  name,
108
108
  (
109
109
  name.toLowerCase() === 'authorization' ||
110
+ name.toLowerCase() === 'api-key' ||
111
+ name.toLowerCase() === 'x-api-key' ||
110
112
  name.toLowerCase() === 'cookie' ||
111
113
  name.toLowerCase() === 'set-cookie'
112
114
  ) ?
@@ -1,31 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import * as qs from '../qs/stringify';
4
-
5
- /**
6
- * Stringify query parameters with smart array handling:
7
- * 1. Simple arrays 'brackets' format: `tags[]=tag1&tags[]=tag2`
8
- * 2. Arrays of objects → 'indices' format: `objects[0][id]=1&objects[0][collection]=teams`
9
- */
10
- export function stringifyQuery(query: object | Record<string, unknown>): string {
11
- const record = query as Record<string, unknown>;
12
- const objectArrays: Record<string, unknown> = {};
13
- const otherParams: Record<string, unknown> = {};
14
-
15
- for (const key in record) {
16
- const value = record[key];
17
- if (Array.isArray(value) && value.length > 0 && typeof value[0] === 'object' && value[0] !== null) {
18
- objectArrays[key] = value;
19
- } else {
20
- otherParams[key] = value;
21
- }
22
- }
23
-
24
- const otherParamsString = qs.stringify(otherParams, { arrayFormat: 'brackets' });
25
- const objectArraysString = qs.stringify(objectArrays, { arrayFormat: 'indices' });
26
-
27
- if (otherParamsString && objectArraysString) {
28
- return `${otherParamsString}&${objectArraysString}`;
29
- }
30
- return otherParamsString || objectArraysString;
31
- }
3
+ // NOTE: The custom query-string serialization lives in `src/lib/stringifyQuery.ts`,
4
+ // which the Stainless generator never modifies. This file only re-exports it so the
5
+ // generated client (and the generated tests that import from here) pick it up. If a
6
+ // regeneration overwrites this file, re-add this one-line re-export. See KNO-9922.
7
+ export { stringifyQuery } from '../../lib/stringifyQuery';
@@ -0,0 +1,41 @@
1
+ import * as qs from '../internal/qs/stringify';
2
+
3
+ /**
4
+ * Stringify query parameters with smart array handling:
5
+ *
6
+ * 1. Simple arrays (primitives) → 'brackets' format: `tags[]=tag1&tags[]=tag2`
7
+ * 2. Arrays of objects → 'indices' format: `objects[0][id]=1&objects[0][collection]=teams`
8
+ *
9
+ * The Knock API (Phoenix) expects object-array query params in indexed form
10
+ * (`objects[0][id]`), which Plug decodes into a keyed list. Primitive arrays must
11
+ * stay in bracket form (`include[]`) — indexed primitives (`include[0]`) get
12
+ * misparsed as a map `{ "0": ... }` and cause 422s. `qs` only supports a single
13
+ * global `arrayFormat`, so we partition the params and serialize each group with
14
+ * the format it needs.
15
+ *
16
+ * This lives in `src/lib/`, which the Stainless generator never modifies (see
17
+ * CONTRIBUTING.md), so the behavior survives regeneration of the generated query
18
+ * util. See KNO-9922.
19
+ */
20
+ export function stringifyQuery(query: object | Record<string, unknown>): string {
21
+ const record = query as Record<string, unknown>;
22
+ const objectArrays: Record<string, unknown> = {};
23
+ const otherParams: Record<string, unknown> = {};
24
+
25
+ for (const key in record) {
26
+ const value = record[key];
27
+ if (Array.isArray(value) && value.length > 0 && typeof value[0] === 'object' && value[0] !== null) {
28
+ objectArrays[key] = value;
29
+ } else {
30
+ otherParams[key] = value;
31
+ }
32
+ }
33
+
34
+ const otherParamsString = qs.stringify(otherParams, { arrayFormat: 'brackets' });
35
+ const objectArraysString = qs.stringify(objectArrays, { arrayFormat: 'indices' });
36
+
37
+ if (otherParamsString && objectArraysString) {
38
+ return `${otherParamsString}&${objectArraysString}`;
39
+ }
40
+ return otherParamsString || objectArraysString;
41
+ }
@@ -423,6 +423,12 @@ export interface Message {
423
423
  */
424
424
  read_at?: string | null;
425
425
 
426
+ /**
427
+ * Recipient contact information captured at email send time. Null for non-email
428
+ * channels.
429
+ */
430
+ recipient_snapshot?: Message.RecipientSnapshot | null;
431
+
426
432
  /**
427
433
  * Timestamp when the message was scheduled to be sent.
428
434
  */
@@ -529,6 +535,22 @@ export namespace Message {
529
535
  */
530
536
  name?: string | null;
531
537
  }
538
+
539
+ /**
540
+ * Recipient contact information captured at email send time. Null for non-email
541
+ * channels.
542
+ */
543
+ export interface RecipientSnapshot {
544
+ /**
545
+ * The email address the message was delivered to
546
+ */
547
+ email?: string;
548
+
549
+ /**
550
+ * The recipient name at send time
551
+ */
552
+ name?: string | null;
553
+ }
532
554
  }
533
555
 
534
556
  /**
@@ -659,22 +681,22 @@ export interface MessageEvent {
659
681
  * The type of event that occurred.
660
682
  */
661
683
  type:
662
- | 'message.archived'
663
- | 'message.bounced'
684
+ | 'message.read'
685
+ | 'message.sent'
686
+ | 'message.seen'
664
687
  | 'message.created'
688
+ | 'message.queued'
665
689
  | 'message.delivered'
690
+ | 'message.bounced'
691
+ | 'message.undelivered'
692
+ | 'message.not_sent'
666
693
  | 'message.delivery_attempted'
667
- | 'message.interacted'
694
+ | 'message.archived'
668
695
  | 'message.link_clicked'
669
- | 'message.not_sent'
670
- | 'message.queued'
671
- | 'message.read'
672
- | 'message.seen'
673
- | 'message.sent'
674
- | 'message.unarchived'
675
- | 'message.undelivered'
696
+ | 'message.interacted'
697
+ | 'message.unseen'
676
698
  | 'message.unread'
677
- | 'message.unseen';
699
+ | 'message.unarchived';
678
700
 
679
701
  /**
680
702
  * The data associated with the message event. Only present for some event types.
@@ -128,6 +128,11 @@ export namespace MsTeamCheckAuthResponse {
128
128
  */
129
129
  ok: boolean;
130
130
 
131
+ /**
132
+ * The Microsoft Teams tenant ID for the connected tenant.
133
+ */
134
+ ms_teams_tenant_id?: string | null;
135
+
131
136
  /**
132
137
  * The reason for the Microsoft Teams connection if it is not valid.
133
138
  */
@@ -414,9 +414,21 @@ export namespace SlackChannelData {
414
414
  */
415
415
  export interface SlackIncomingWebhookConnection {
416
416
  /**
417
- * The URL of the incoming webhook for a Slack connection.
417
+ * A Slack connection incoming webhook.
418
418
  */
419
- url: string;
419
+ incoming_webhook: SlackIncomingWebhookConnection.IncomingWebhook;
420
+ }
421
+
422
+ export namespace SlackIncomingWebhookConnection {
423
+ /**
424
+ * A Slack connection incoming webhook.
425
+ */
426
+ export interface IncomingWebhook {
427
+ /**
428
+ * The URL of the incoming webhook for a Slack connection.
429
+ */
430
+ url: string;
431
+ }
420
432
  }
421
433
 
422
434
  /**
@@ -26,6 +26,7 @@ export interface Condition {
26
26
  | 'exists'
27
27
  | 'not_exists'
28
28
  | 'contains_all'
29
+ | 'not_contains_all'
29
30
  | 'is_timestamp'
30
31
  | 'is_not_timestamp'
31
32
  | 'is_timestamp_on_or_after'
@@ -152,6 +152,28 @@ export namespace Tenant {
152
152
  * The branding for the tenant.
153
153
  */
154
154
  export interface Branding {
155
+ /**
156
+ * The icon URL for the tenant in dark mode. Falls back to `icon_url` if unset.
157
+ */
158
+ dark_icon_url?: string | null;
159
+
160
+ /**
161
+ * The logo URL for the tenant in dark mode. Falls back to `logo_url` if unset.
162
+ */
163
+ dark_logo_url?: string | null;
164
+
165
+ /**
166
+ * The primary color for the tenant in dark mode, provided as a hex value. Defaults
167
+ * to `#FFFFFF`.
168
+ */
169
+ dark_primary_color?: string | null;
170
+
171
+ /**
172
+ * The primary color contrast for the tenant in dark mode, provided as a hex value.
173
+ * Defaults to `#000000`.
174
+ */
175
+ dark_primary_color_contrast?: string | null;
176
+
155
177
  /**
156
178
  * The icon URL for the tenant. Must point to a valid image with an image MIME
157
179
  * type.
@@ -233,6 +255,28 @@ export namespace TenantRequest {
233
255
  * The branding for the tenant.
234
256
  */
235
257
  export interface Branding {
258
+ /**
259
+ * The icon URL for the tenant in dark mode. Falls back to `icon_url` if unset.
260
+ */
261
+ dark_icon_url?: string | null;
262
+
263
+ /**
264
+ * The logo URL for the tenant in dark mode. Falls back to `logo_url` if unset.
265
+ */
266
+ dark_logo_url?: string | null;
267
+
268
+ /**
269
+ * The primary color for the tenant in dark mode, provided as a hex value. Defaults
270
+ * to `#FFFFFF`.
271
+ */
272
+ dark_primary_color?: string | null;
273
+
274
+ /**
275
+ * The primary color contrast for the tenant in dark mode, provided as a hex value.
276
+ * Defaults to `#000000`.
277
+ */
278
+ dark_primary_color_contrast?: string | null;
279
+
236
280
  /**
237
281
  * The icon URL for the tenant. Must point to a valid image with an image MIME
238
282
  * type.
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as BulkOperationsAPI from '../bulk-operations';
5
+ import * as Shared from '../shared';
5
6
  import * as PreferencesAPI from '../recipients/preferences';
6
7
  import * as UsersAPI from './users';
7
8
  import { APIPromise } from '../../core/api-promise';
@@ -60,7 +61,6 @@ export class Bulk extends APIResource {
60
61
  * const bulkOperation =
61
62
  * await client.users.bulk.setPreferences({
62
63
  * preferences: {
63
- * __persistence_strategy__: 'merge',
64
64
  * categories: {
65
65
  * marketing: false,
66
66
  * transactional: { channel_types: { email: false } },
@@ -79,6 +79,7 @@ export class Bulk extends APIResource {
79
79
  * 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true,
80
80
  * },
81
81
  * commercial_subscribed: true,
82
+ * id: 'default',
82
83
  * workflows: {
83
84
  * 'dinosaurs-loose': {
84
85
  * channel_types: { email: false },
@@ -113,9 +114,10 @@ export interface BulkIdentifyParams {
113
114
 
114
115
  export interface BulkSetPreferencesParams {
115
116
  /**
116
- * A request to set a preference set for a recipient.
117
+ * A preference set to apply in a bulk operation. Always replaces existing
118
+ * preferences for the specified set.
117
119
  */
118
- preferences: PreferencesAPI.PreferenceSetRequest;
120
+ preferences: BulkSetPreferencesParams.Preferences;
119
121
 
120
122
  /**
121
123
  * A list of user IDs.
@@ -123,6 +125,91 @@ export interface BulkSetPreferencesParams {
123
125
  user_ids: Array<string>;
124
126
  }
125
127
 
128
+ export namespace BulkSetPreferencesParams {
129
+ /**
130
+ * A preference set to apply in a bulk operation. Always replaces existing
131
+ * preferences for the specified set.
132
+ */
133
+ export interface Preferences {
134
+ /**
135
+ * Identifier for the preference set to update. Can be `default` or a tenant ID.
136
+ */
137
+ id?: string;
138
+
139
+ /**
140
+ * An object where the key is the category and the values are the preference
141
+ * settings for that category.
142
+ */
143
+ categories?: { [key: string]: boolean | Preferences.PreferenceSetWorkflowCategorySettingObject } | null;
144
+
145
+ /**
146
+ * Channel type preferences.
147
+ */
148
+ channel_types?: PreferencesAPI.PreferenceSetChannelTypes | null;
149
+
150
+ /**
151
+ * Channel preferences.
152
+ */
153
+ channels?: { [key: string]: boolean | PreferencesAPI.PreferenceSetChannelSetting } | null;
154
+
155
+ /**
156
+ * Whether the recipient is subscribed to commercial communications. When false,
157
+ * the recipient will not receive commercial workflow notifications.
158
+ */
159
+ commercial_subscribed?: boolean | null;
160
+
161
+ /**
162
+ * An object where the key is the workflow key and the values are the preference
163
+ * settings for that workflow.
164
+ */
165
+ workflows?: { [key: string]: boolean | Preferences.PreferenceSetWorkflowCategorySettingObject } | null;
166
+ }
167
+
168
+ export namespace Preferences {
169
+ /**
170
+ * The settings object for a workflow or category, where you can specify channel
171
+ * types or conditions.
172
+ */
173
+ export interface PreferenceSetWorkflowCategorySettingObject {
174
+ /**
175
+ * Channel type preferences.
176
+ */
177
+ channel_types?: PreferencesAPI.PreferenceSetChannelTypes | null;
178
+
179
+ /**
180
+ * Channel preferences.
181
+ */
182
+ channels?: { [key: string]: boolean | PreferencesAPI.PreferenceSetChannelSetting } | null;
183
+
184
+ /**
185
+ * A list of conditions to apply to a channel type.
186
+ */
187
+ conditions?: Array<Shared.Condition> | null;
188
+ }
189
+
190
+ /**
191
+ * The settings object for a workflow or category, where you can specify channel
192
+ * types or conditions.
193
+ */
194
+ export interface PreferenceSetWorkflowCategorySettingObject {
195
+ /**
196
+ * Channel type preferences.
197
+ */
198
+ channel_types?: PreferencesAPI.PreferenceSetChannelTypes | null;
199
+
200
+ /**
201
+ * Channel preferences.
202
+ */
203
+ channels?: { [key: string]: boolean | PreferencesAPI.PreferenceSetChannelSetting } | null;
204
+
205
+ /**
206
+ * A list of conditions to apply to a channel type.
207
+ */
208
+ conditions?: Array<Shared.Condition> | null;
209
+ }
210
+ }
211
+ }
212
+
126
213
  export declare namespace Bulk {
127
214
  export {
128
215
  type BulkDeleteParams as BulkDeleteParams,
@@ -102,9 +102,10 @@ export interface WorkflowRecipientRun {
102
102
  workflow_run_id: string;
103
103
 
104
104
  /**
105
- * A recipient of a notification, which is either a user or an object.
105
+ * A reference to a recipient, either a user identifier (string) or an object
106
+ * reference (ID, collection).
106
107
  */
107
- actor?: RecipientsAPI.Recipient | null;
108
+ actor?: RecipientsAPI.RecipientReference | null;
108
109
 
109
110
  /**
110
111
  * The number of errors encountered during the workflow recipient run.