knockapi 0.6.1 → 1.0.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 (668) hide show
  1. checksums.yaml +4 -4
  2. data/.ignore +2 -0
  3. data/CHANGELOG.md +20 -0
  4. data/README.md +157 -94
  5. data/SECURITY.md +27 -0
  6. data/lib/knockapi/client.rb +122 -0
  7. data/lib/knockapi/errors.rb +192 -0
  8. data/lib/knockapi/file_part.rb +55 -0
  9. data/lib/knockapi/internal/entries_cursor.rb +101 -0
  10. data/lib/knockapi/internal/items_cursor.rb +101 -0
  11. data/lib/knockapi/internal/ms_teams_pagination.rb +86 -0
  12. data/lib/knockapi/internal/slack_channels_cursor.rb +86 -0
  13. data/lib/knockapi/internal/transport/base_client.rb +483 -0
  14. data/lib/knockapi/internal/transport/pooled_net_requester.rb +193 -0
  15. data/lib/knockapi/internal/type/array_of.rb +154 -0
  16. data/lib/knockapi/internal/type/base_model.rb +445 -0
  17. data/lib/knockapi/internal/type/base_page.rb +55 -0
  18. data/lib/knockapi/internal/type/boolean.rb +63 -0
  19. data/lib/knockapi/internal/type/converter.rb +274 -0
  20. data/lib/knockapi/internal/type/enum.rb +107 -0
  21. data/lib/knockapi/internal/type/file_input.rb +96 -0
  22. data/lib/knockapi/internal/type/hash_of.rb +174 -0
  23. data/lib/knockapi/internal/type/request_parameters.rb +48 -0
  24. data/lib/knockapi/internal/type/union.rb +225 -0
  25. data/lib/knockapi/internal/type/unknown.rb +67 -0
  26. data/lib/knockapi/internal/util.rb +790 -0
  27. data/lib/knockapi/internal.rb +11 -0
  28. data/lib/knockapi/models/activity.rb +70 -0
  29. data/lib/knockapi/models/audience_add_members_params.rb +55 -0
  30. data/lib/knockapi/models/audience_list_members_params.rb +14 -0
  31. data/lib/knockapi/models/audience_list_members_response.rb +27 -0
  32. data/lib/knockapi/models/audience_member.rb +56 -0
  33. data/lib/knockapi/models/audience_remove_members_params.rb +55 -0
  34. data/lib/knockapi/models/bulk_operation.rb +166 -0
  35. data/lib/knockapi/models/bulk_operation_get_params.rb +14 -0
  36. data/lib/knockapi/models/channels/bulk_update_message_status_params.rb +167 -0
  37. data/lib/knockapi/models/condition.rb +63 -0
  38. data/lib/knockapi/models/identify_user_request.rb +98 -0
  39. data/lib/knockapi/models/inline_identify_user_request.rb +49 -0
  40. data/lib/knockapi/models/inline_object_request.rb +54 -0
  41. data/lib/knockapi/models/inline_tenant_request.rb +19 -0
  42. data/lib/knockapi/models/integrations/census_custom_destination_params.rb +48 -0
  43. data/lib/knockapi/models/integrations/census_custom_destination_response.rb +27 -0
  44. data/lib/knockapi/models/integrations/hightouch_embedded_destination_params.rb +48 -0
  45. data/lib/knockapi/models/integrations/hightouch_embedded_destination_response.rb +27 -0
  46. data/lib/knockapi/models/message.rb +268 -0
  47. data/lib/knockapi/models/message_archive_params.rb +14 -0
  48. data/lib/knockapi/models/message_delivery_log.rb +202 -0
  49. data/lib/knockapi/models/message_event.rb +91 -0
  50. data/lib/knockapi/models/message_get_content_params.rb +14 -0
  51. data/lib/knockapi/models/message_get_content_response.rb +496 -0
  52. data/lib/knockapi/models/message_get_params.rb +14 -0
  53. data/lib/knockapi/models/message_list_activities_params.rb +46 -0
  54. data/lib/knockapi/models/message_list_delivery_logs_params.rb +38 -0
  55. data/lib/knockapi/models/message_list_events_params.rb +38 -0
  56. data/lib/knockapi/models/message_list_params.rb +200 -0
  57. data/lib/knockapi/models/message_mark_as_interacted_params.rb +22 -0
  58. data/lib/knockapi/models/message_mark_as_read_params.rb +14 -0
  59. data/lib/knockapi/models/message_mark_as_seen_params.rb +14 -0
  60. data/lib/knockapi/models/message_mark_as_unread_params.rb +14 -0
  61. data/lib/knockapi/models/message_mark_as_unseen_params.rb +14 -0
  62. data/lib/knockapi/models/message_unarchive_params.rb +14 -0
  63. data/lib/knockapi/models/messages/activity_list_params.rb +48 -0
  64. data/lib/knockapi/models/messages/batch_archive_params.rb +24 -0
  65. data/lib/knockapi/models/messages/batch_archive_response.rb +10 -0
  66. data/lib/knockapi/models/messages/batch_get_content_params.rb +24 -0
  67. data/lib/knockapi/models/messages/batch_get_content_response.rb +504 -0
  68. data/lib/knockapi/models/messages/batch_mark_as_interacted_params.rb +32 -0
  69. data/lib/knockapi/models/messages/batch_mark_as_interacted_response.rb +10 -0
  70. data/lib/knockapi/models/messages/batch_mark_as_read_params.rb +24 -0
  71. data/lib/knockapi/models/messages/batch_mark_as_read_response.rb +10 -0
  72. data/lib/knockapi/models/messages/batch_mark_as_seen_params.rb +24 -0
  73. data/lib/knockapi/models/messages/batch_mark_as_seen_response.rb +10 -0
  74. data/lib/knockapi/models/messages/batch_mark_as_unread_params.rb +24 -0
  75. data/lib/knockapi/models/messages/batch_mark_as_unread_response.rb +10 -0
  76. data/lib/knockapi/models/messages/batch_mark_as_unseen_params.rb +24 -0
  77. data/lib/knockapi/models/messages/batch_mark_as_unseen_response.rb +10 -0
  78. data/lib/knockapi/models/messages/batch_unarchive_params.rb +24 -0
  79. data/lib/knockapi/models/messages/batch_unarchive_response.rb +10 -0
  80. data/lib/knockapi/models/object.rb +51 -0
  81. data/lib/knockapi/models/object_add_subscriptions_params.rb +35 -0
  82. data/lib/knockapi/models/object_add_subscriptions_response.rb +9 -0
  83. data/lib/knockapi/models/object_delete_params.rb +14 -0
  84. data/lib/knockapi/models/object_delete_subscriptions_params.rb +28 -0
  85. data/lib/knockapi/models/object_delete_subscriptions_response.rb +9 -0
  86. data/lib/knockapi/models/object_get_channel_data_params.rb +14 -0
  87. data/lib/knockapi/models/object_get_params.rb +14 -0
  88. data/lib/knockapi/models/object_get_preferences_params.rb +14 -0
  89. data/lib/knockapi/models/object_list_messages_params.rb +200 -0
  90. data/lib/knockapi/models/object_list_params.rb +56 -0
  91. data/lib/knockapi/models/object_list_preferences_params.rb +14 -0
  92. data/lib/knockapi/models/object_list_preferences_response.rb +9 -0
  93. data/lib/knockapi/models/object_list_schedules_params.rb +54 -0
  94. data/lib/knockapi/models/object_list_subscriptions_params.rb +122 -0
  95. data/lib/knockapi/models/object_set_channel_data_params.rb +14 -0
  96. data/lib/knockapi/models/object_set_params.rb +57 -0
  97. data/lib/knockapi/models/object_set_preferences_params.rb +14 -0
  98. data/lib/knockapi/models/object_unset_channel_data_params.rb +14 -0
  99. data/lib/knockapi/models/objects/bulk_add_subscriptions_params.rb +52 -0
  100. data/lib/knockapi/models/objects/bulk_delete_params.rb +24 -0
  101. data/lib/knockapi/models/objects/bulk_set_params.rb +24 -0
  102. data/lib/knockapi/models/page_info.rb +42 -0
  103. data/lib/knockapi/models/providers/ms_team_check_auth_params.rb +24 -0
  104. data/lib/knockapi/models/providers/ms_team_check_auth_response.rb +43 -0
  105. data/lib/knockapi/models/providers/ms_team_list_channels_params.rb +66 -0
  106. data/lib/knockapi/models/providers/ms_team_list_channels_response.rb +74 -0
  107. data/lib/knockapi/models/providers/ms_team_list_teams_params.rb +78 -0
  108. data/lib/knockapi/models/providers/ms_team_list_teams_response.rb +35 -0
  109. data/lib/knockapi/models/providers/ms_team_revoke_access_params.rb +24 -0
  110. data/lib/knockapi/models/providers/ms_team_revoke_access_response.rb +21 -0
  111. data/lib/knockapi/models/providers/slack_check_auth_params.rb +24 -0
  112. data/lib/knockapi/models/providers/slack_check_auth_response.rb +43 -0
  113. data/lib/knockapi/models/providers/slack_list_channels_params.rb +83 -0
  114. data/lib/knockapi/models/providers/slack_list_channels_response.rb +53 -0
  115. data/lib/knockapi/models/providers/slack_revoke_access_params.rb +24 -0
  116. data/lib/knockapi/models/providers/slack_revoke_access_response.rb +21 -0
  117. data/lib/knockapi/models/recipient.rb +19 -0
  118. data/lib/knockapi/models/recipient_reference.rb +41 -0
  119. data/lib/knockapi/models/recipient_request.rb +24 -0
  120. data/lib/knockapi/models/recipients/channel_data.rb +88 -0
  121. data/lib/knockapi/models/recipients/channel_data_request.rb +45 -0
  122. data/lib/knockapi/models/recipients/discord_channel_data.rb +77 -0
  123. data/lib/knockapi/models/recipients/inline_channel_data_request.rb +11 -0
  124. data/lib/knockapi/models/recipients/inline_preference_set_request.rb +11 -0
  125. data/lib/knockapi/models/recipients/ms_teams_channel_data.rb +108 -0
  126. data/lib/knockapi/models/recipients/one_signal_channel_data.rb +20 -0
  127. data/lib/knockapi/models/recipients/preference_set.rb +126 -0
  128. data/lib/knockapi/models/recipients/preference_set_channel_type_setting.rb +21 -0
  129. data/lib/knockapi/models/recipients/preference_set_channel_types.rb +150 -0
  130. data/lib/knockapi/models/recipients/preference_set_request.rb +117 -0
  131. data/lib/knockapi/models/recipients/push_channel_data.rb +20 -0
  132. data/lib/knockapi/models/recipients/slack_channel_data.rb +99 -0
  133. data/lib/knockapi/models/recipients/subscription.rb +60 -0
  134. data/lib/knockapi/models/schedule.rb +113 -0
  135. data/lib/knockapi/models/schedule_create_params.rb +75 -0
  136. data/lib/knockapi/models/schedule_create_response.rb +8 -0
  137. data/lib/knockapi/models/schedule_delete_params.rb +22 -0
  138. data/lib/knockapi/models/schedule_delete_response.rb +8 -0
  139. data/lib/knockapi/models/schedule_list_params.rb +62 -0
  140. data/lib/knockapi/models/schedule_repeat_rule.rb +99 -0
  141. data/lib/knockapi/models/schedule_update_params.rb +75 -0
  142. data/lib/knockapi/models/schedule_update_response.rb +8 -0
  143. data/lib/knockapi/models/schedules/bulk_create_params.rb +103 -0
  144. data/lib/knockapi/models/tenant.rb +115 -0
  145. data/lib/knockapi/models/tenant_delete_params.rb +14 -0
  146. data/lib/knockapi/models/tenant_get_params.rb +14 -0
  147. data/lib/knockapi/models/tenant_list_params.rb +54 -0
  148. data/lib/knockapi/models/tenant_request.rb +114 -0
  149. data/lib/knockapi/models/tenant_set_params.rb +108 -0
  150. data/lib/knockapi/models/tenants/bulk_delete_params.rb +24 -0
  151. data/lib/knockapi/models/tenants/bulk_set_params.rb +24 -0
  152. data/lib/knockapi/models/user.rb +94 -0
  153. data/lib/knockapi/models/user_delete_params.rb +14 -0
  154. data/lib/knockapi/models/user_get_channel_data_params.rb +14 -0
  155. data/lib/knockapi/models/user_get_params.rb +14 -0
  156. data/lib/knockapi/models/user_get_preferences_params.rb +22 -0
  157. data/lib/knockapi/models/user_list_messages_params.rb +200 -0
  158. data/lib/knockapi/models/user_list_params.rb +56 -0
  159. data/lib/knockapi/models/user_list_preferences_params.rb +14 -0
  160. data/lib/knockapi/models/user_list_preferences_response.rb +9 -0
  161. data/lib/knockapi/models/user_list_schedules_params.rb +54 -0
  162. data/lib/knockapi/models/user_list_subscriptions_params.rb +64 -0
  163. data/lib/knockapi/models/user_merge_params.rb +22 -0
  164. data/lib/knockapi/models/user_set_channel_data_params.rb +14 -0
  165. data/lib/knockapi/models/user_set_preferences_params.rb +14 -0
  166. data/lib/knockapi/models/user_unset_channel_data_params.rb +14 -0
  167. data/lib/knockapi/models/user_update_params.rb +14 -0
  168. data/lib/knockapi/models/users/bulk_delete_params.rb +24 -0
  169. data/lib/knockapi/models/users/bulk_identify_params.rb +24 -0
  170. data/lib/knockapi/models/users/bulk_set_preferences_params.rb +32 -0
  171. data/lib/knockapi/models/users/feed_get_settings_params.rb +16 -0
  172. data/lib/knockapi/models/users/feed_get_settings_response.rb +35 -0
  173. data/lib/knockapi/models/users/feed_list_items_params.rb +122 -0
  174. data/lib/knockapi/models/users/feed_list_items_response.rb +333 -0
  175. data/lib/knockapi/models/users/guide_get_channel_params.rb +40 -0
  176. data/lib/knockapi/models/users/guide_get_channel_response.rb +79 -0
  177. data/lib/knockapi/models/users/guide_mark_message_as_archived_params.rb +88 -0
  178. data/lib/knockapi/models/users/guide_mark_message_as_archived_response.rb +21 -0
  179. data/lib/knockapi/models/users/guide_mark_message_as_interacted_params.rb +88 -0
  180. data/lib/knockapi/models/users/guide_mark_message_as_interacted_response.rb +21 -0
  181. data/lib/knockapi/models/users/guide_mark_message_as_seen_params.rb +88 -0
  182. data/lib/knockapi/models/users/guide_mark_message_as_seen_response.rb +21 -0
  183. data/lib/knockapi/models/workflow_cancel_params.rb +42 -0
  184. data/lib/knockapi/models/workflow_trigger_params.rb +67 -0
  185. data/lib/knockapi/models/workflow_trigger_response.rb +24 -0
  186. data/lib/knockapi/request_options.rb +73 -0
  187. data/lib/knockapi/resources/audiences.rb +82 -0
  188. data/lib/knockapi/resources/bulk_operations.rb +34 -0
  189. data/lib/knockapi/resources/channels/bulk.rb +67 -0
  190. data/lib/knockapi/resources/channels.rb +18 -0
  191. data/lib/knockapi/resources/integrations/census.rb +44 -0
  192. data/lib/knockapi/resources/integrations/hightouch.rb +44 -0
  193. data/lib/knockapi/resources/integrations.rb +22 -0
  194. data/lib/knockapi/resources/messages/activities.rb +47 -0
  195. data/lib/knockapi/resources/messages/batch.rb +208 -0
  196. data/lib/knockapi/resources/messages.rb +365 -0
  197. data/lib/knockapi/resources/objects/bulk.rb +92 -0
  198. data/lib/knockapi/resources/objects.rb +508 -0
  199. data/lib/knockapi/resources/providers/ms_teams.rb +122 -0
  200. data/lib/knockapi/resources/providers/slack.rb +91 -0
  201. data/lib/knockapi/resources/providers.rb +22 -0
  202. data/lib/knockapi/resources/recipients/channel_data.rb +16 -0
  203. data/lib/knockapi/resources/recipients/preferences.rb +16 -0
  204. data/lib/knockapi/resources/recipients/subscriptions.rb +16 -0
  205. data/lib/knockapi/resources/recipients.rb +26 -0
  206. data/lib/knockapi/resources/schedules/bulk.rb +40 -0
  207. data/lib/knockapi/resources/schedules.rb +159 -0
  208. data/lib/knockapi/resources/shared.rb +14 -0
  209. data/lib/knockapi/resources/tenants/bulk.rb +60 -0
  210. data/lib/knockapi/resources/tenants.rb +118 -0
  211. data/lib/knockapi/resources/users/bulk.rb +89 -0
  212. data/lib/knockapi/resources/users/feeds.rb +84 -0
  213. data/lib/knockapi/resources/users/guides.rb +175 -0
  214. data/lib/knockapi/resources/users.rb +448 -0
  215. data/lib/knockapi/resources/workflows.rb +89 -0
  216. data/lib/knockapi/version.rb +5 -0
  217. data/lib/knockapi.rb +239 -0
  218. data/manifest.yaml +15 -0
  219. data/rbi/knockapi/client.rbi +84 -0
  220. data/rbi/knockapi/errors.rbi +143 -0
  221. data/rbi/knockapi/file_part.rbi +34 -0
  222. data/rbi/knockapi/internal/entries_cursor.rbi +35 -0
  223. data/rbi/knockapi/internal/items_cursor.rbi +35 -0
  224. data/rbi/knockapi/internal/ms_teams_pagination.rbi +21 -0
  225. data/rbi/knockapi/internal/slack_channels_cursor.rbi +21 -0
  226. data/rbi/knockapi/internal/transport/base_client.rbi +213 -0
  227. data/rbi/knockapi/internal/transport/pooled_net_requester.rbi +60 -0
  228. data/rbi/knockapi/internal/type/array_of.rbi +88 -0
  229. data/rbi/knockapi/internal/type/base_model.rbi +219 -0
  230. data/rbi/knockapi/internal/type/base_page.rbi +38 -0
  231. data/rbi/knockapi/internal/type/boolean.rbi +48 -0
  232. data/rbi/knockapi/internal/type/converter.rbi +120 -0
  233. data/rbi/knockapi/internal/type/enum.rbi +64 -0
  234. data/rbi/knockapi/internal/type/file_input.rbi +50 -0
  235. data/rbi/knockapi/internal/type/hash_of.rbi +88 -0
  236. data/rbi/knockapi/internal/type/request_parameters.rbi +21 -0
  237. data/rbi/knockapi/internal/type/union.rbi +75 -0
  238. data/rbi/knockapi/internal/type/unknown.rbi +40 -0
  239. data/rbi/knockapi/internal/util.rbi +299 -0
  240. data/rbi/knockapi/internal.rbi +11 -0
  241. data/rbi/knockapi/models/activity.rbi +101 -0
  242. data/rbi/knockapi/models/audience_add_members_params.rbi +88 -0
  243. data/rbi/knockapi/models/audience_list_members_params.rbi +19 -0
  244. data/rbi/knockapi/models/audience_list_members_response.rbi +38 -0
  245. data/rbi/knockapi/models/audience_member.rbi +65 -0
  246. data/rbi/knockapi/models/audience_remove_members_params.rbi +90 -0
  247. data/rbi/knockapi/models/bulk_operation.rbi +194 -0
  248. data/rbi/knockapi/models/bulk_operation_get_params.rbi +19 -0
  249. data/rbi/knockapi/models/channels/bulk_update_message_status_params.rbi +287 -0
  250. data/rbi/knockapi/models/condition.rbi +77 -0
  251. data/rbi/knockapi/models/identify_user_request.rbi +110 -0
  252. data/rbi/knockapi/models/inline_identify_user_request.rbi +63 -0
  253. data/rbi/knockapi/models/inline_object_request.rbi +68 -0
  254. data/rbi/knockapi/models/inline_tenant_request.rbi +13 -0
  255. data/rbi/knockapi/models/integrations/census_custom_destination_params.rbi +66 -0
  256. data/rbi/knockapi/models/integrations/census_custom_destination_response.rbi +33 -0
  257. data/rbi/knockapi/models/integrations/hightouch_embedded_destination_params.rbi +66 -0
  258. data/rbi/knockapi/models/integrations/hightouch_embedded_destination_response.rbi +33 -0
  259. data/rbi/knockapi/models/message.rbi +322 -0
  260. data/rbi/knockapi/models/message_archive_params.rbi +19 -0
  261. data/rbi/knockapi/models/message_delivery_log.rbi +260 -0
  262. data/rbi/knockapi/models/message_event.rbi +103 -0
  263. data/rbi/knockapi/models/message_get_content_params.rbi +19 -0
  264. data/rbi/knockapi/models/message_get_content_response.rbi +738 -0
  265. data/rbi/knockapi/models/message_get_params.rbi +19 -0
  266. data/rbi/knockapi/models/message_list_activities_params.rbi +73 -0
  267. data/rbi/knockapi/models/message_list_delivery_logs_params.rbi +60 -0
  268. data/rbi/knockapi/models/message_list_events_params.rbi +60 -0
  269. data/rbi/knockapi/models/message_list_params.rbi +271 -0
  270. data/rbi/knockapi/models/message_mark_as_interacted_params.rbi +34 -0
  271. data/rbi/knockapi/models/message_mark_as_read_params.rbi +19 -0
  272. data/rbi/knockapi/models/message_mark_as_seen_params.rbi +19 -0
  273. data/rbi/knockapi/models/message_mark_as_unread_params.rbi +19 -0
  274. data/rbi/knockapi/models/message_mark_as_unseen_params.rbi +19 -0
  275. data/rbi/knockapi/models/message_unarchive_params.rbi +19 -0
  276. data/rbi/knockapi/models/messages/activity_list_params.rbi +75 -0
  277. data/rbi/knockapi/models/messages/batch_archive_params.rbi +31 -0
  278. data/rbi/knockapi/models/messages/batch_archive_response.rbi +10 -0
  279. data/rbi/knockapi/models/messages/batch_get_content_params.rbi +31 -0
  280. data/rbi/knockapi/models/messages/batch_get_content_response.rbi +748 -0
  281. data/rbi/knockapi/models/messages/batch_mark_as_interacted_params.rbi +47 -0
  282. data/rbi/knockapi/models/messages/batch_mark_as_interacted_response.rbi +10 -0
  283. data/rbi/knockapi/models/messages/batch_mark_as_read_params.rbi +31 -0
  284. data/rbi/knockapi/models/messages/batch_mark_as_read_response.rbi +10 -0
  285. data/rbi/knockapi/models/messages/batch_mark_as_seen_params.rbi +31 -0
  286. data/rbi/knockapi/models/messages/batch_mark_as_seen_response.rbi +10 -0
  287. data/rbi/knockapi/models/messages/batch_mark_as_unread_params.rbi +31 -0
  288. data/rbi/knockapi/models/messages/batch_mark_as_unread_response.rbi +10 -0
  289. data/rbi/knockapi/models/messages/batch_mark_as_unseen_params.rbi +31 -0
  290. data/rbi/knockapi/models/messages/batch_mark_as_unseen_response.rbi +10 -0
  291. data/rbi/knockapi/models/messages/batch_unarchive_params.rbi +31 -0
  292. data/rbi/knockapi/models/messages/batch_unarchive_response.rbi +10 -0
  293. data/rbi/knockapi/models/object.rbi +58 -0
  294. data/rbi/knockapi/models/object_add_subscriptions_params.rbi +58 -0
  295. data/rbi/knockapi/models/object_add_subscriptions_response.rbi +11 -0
  296. data/rbi/knockapi/models/object_delete_params.rbi +19 -0
  297. data/rbi/knockapi/models/object_delete_subscriptions_params.rbi +39 -0
  298. data/rbi/knockapi/models/object_delete_subscriptions_response.rbi +11 -0
  299. data/rbi/knockapi/models/object_get_channel_data_params.rbi +19 -0
  300. data/rbi/knockapi/models/object_get_params.rbi +19 -0
  301. data/rbi/knockapi/models/object_get_preferences_params.rbi +19 -0
  302. data/rbi/knockapi/models/object_list_messages_params.rbi +281 -0
  303. data/rbi/knockapi/models/object_list_params.rbi +85 -0
  304. data/rbi/knockapi/models/object_list_preferences_params.rbi +19 -0
  305. data/rbi/knockapi/models/object_list_preferences_response.rbi +11 -0
  306. data/rbi/knockapi/models/object_list_schedules_params.rbi +84 -0
  307. data/rbi/knockapi/models/object_list_subscriptions_params.rbi +175 -0
  308. data/rbi/knockapi/models/object_set_channel_data_params.rbi +19 -0
  309. data/rbi/knockapi/models/object_set_params.rbi +85 -0
  310. data/rbi/knockapi/models/object_set_preferences_params.rbi +19 -0
  311. data/rbi/knockapi/models/object_unset_channel_data_params.rbi +19 -0
  312. data/rbi/knockapi/models/objects/bulk_add_subscriptions_params.rbi +86 -0
  313. data/rbi/knockapi/models/objects/bulk_delete_params.rbi +31 -0
  314. data/rbi/knockapi/models/objects/bulk_set_params.rbi +36 -0
  315. data/rbi/knockapi/models/page_info.rbi +49 -0
  316. data/rbi/knockapi/models/providers/ms_team_check_auth_params.rbi +31 -0
  317. data/rbi/knockapi/models/providers/ms_team_check_auth_response.rbi +56 -0
  318. data/rbi/knockapi/models/providers/ms_team_list_channels_params.rbi +91 -0
  319. data/rbi/knockapi/models/providers/ms_team_list_channels_response.rbi +113 -0
  320. data/rbi/knockapi/models/providers/ms_team_list_teams_params.rbi +107 -0
  321. data/rbi/knockapi/models/providers/ms_team_list_teams_response.rbi +35 -0
  322. data/rbi/knockapi/models/providers/ms_team_revoke_access_params.rbi +31 -0
  323. data/rbi/knockapi/models/providers/ms_team_revoke_access_response.rbi +25 -0
  324. data/rbi/knockapi/models/providers/slack_check_auth_params.rbi +31 -0
  325. data/rbi/knockapi/models/providers/slack_check_auth_response.rbi +56 -0
  326. data/rbi/knockapi/models/providers/slack_list_channels_params.rbi +130 -0
  327. data/rbi/knockapi/models/providers/slack_list_channels_response.rbi +58 -0
  328. data/rbi/knockapi/models/providers/slack_revoke_access_params.rbi +31 -0
  329. data/rbi/knockapi/models/providers/slack_revoke_access_response.rbi +25 -0
  330. data/rbi/knockapi/models/recipient.rbi +13 -0
  331. data/rbi/knockapi/models/recipient_reference.rbi +41 -0
  332. data/rbi/knockapi/models/recipient_request.rbi +18 -0
  333. data/rbi/knockapi/models/recipients/channel_data.rbi +125 -0
  334. data/rbi/knockapi/models/recipients/channel_data_request.rbi +70 -0
  335. data/rbi/knockapi/models/recipients/discord_channel_data.rbi +143 -0
  336. data/rbi/knockapi/models/recipients/inline_channel_data_request.rbi +13 -0
  337. data/rbi/knockapi/models/recipients/inline_preference_set_request.rbi +13 -0
  338. data/rbi/knockapi/models/recipients/ms_teams_channel_data.rbi +186 -0
  339. data/rbi/knockapi/models/recipients/one_signal_channel_data.rbi +22 -0
  340. data/rbi/knockapi/models/recipients/preference_set.rbi +243 -0
  341. data/rbi/knockapi/models/recipients/preference_set_channel_type_setting.rbi +26 -0
  342. data/rbi/knockapi/models/recipients/preference_set_channel_types.rbi +218 -0
  343. data/rbi/knockapi/models/recipients/preference_set_request.rbi +234 -0
  344. data/rbi/knockapi/models/recipients/push_channel_data.rbi +22 -0
  345. data/rbi/knockapi/models/recipients/slack_channel_data.rbi +154 -0
  346. data/rbi/knockapi/models/recipients/subscription.rbi +77 -0
  347. data/rbi/knockapi/models/schedule.rbi +127 -0
  348. data/rbi/knockapi/models/schedule_create_params.rbi +98 -0
  349. data/rbi/knockapi/models/schedule_create_response.rbi +8 -0
  350. data/rbi/knockapi/models/schedule_delete_params.rbi +29 -0
  351. data/rbi/knockapi/models/schedule_delete_response.rbi +8 -0
  352. data/rbi/knockapi/models/schedule_list_params.rbi +92 -0
  353. data/rbi/knockapi/models/schedule_repeat_rule.rbi +118 -0
  354. data/rbi/knockapi/models/schedule_update_params.rbi +92 -0
  355. data/rbi/knockapi/models/schedule_update_response.rbi +8 -0
  356. data/rbi/knockapi/models/schedules/bulk_create_params.rbi +172 -0
  357. data/rbi/knockapi/models/tenant.rbi +162 -0
  358. data/rbi/knockapi/models/tenant_delete_params.rbi +19 -0
  359. data/rbi/knockapi/models/tenant_get_params.rbi +19 -0
  360. data/rbi/knockapi/models/tenant_list_params.rbi +84 -0
  361. data/rbi/knockapi/models/tenant_request.rbi +168 -0
  362. data/rbi/knockapi/models/tenant_set_params.rbi +166 -0
  363. data/rbi/knockapi/models/tenants/bulk_delete_params.rbi +31 -0
  364. data/rbi/knockapi/models/tenants/bulk_set_params.rbi +36 -0
  365. data/rbi/knockapi/models/user.rbi +106 -0
  366. data/rbi/knockapi/models/user_delete_params.rbi +19 -0
  367. data/rbi/knockapi/models/user_get_channel_data_params.rbi +19 -0
  368. data/rbi/knockapi/models/user_get_params.rbi +19 -0
  369. data/rbi/knockapi/models/user_get_preferences_params.rbi +29 -0
  370. data/rbi/knockapi/models/user_list_messages_params.rbi +277 -0
  371. data/rbi/knockapi/models/user_list_params.rbi +85 -0
  372. data/rbi/knockapi/models/user_list_preferences_params.rbi +19 -0
  373. data/rbi/knockapi/models/user_list_preferences_response.rbi +11 -0
  374. data/rbi/knockapi/models/user_list_schedules_params.rbi +84 -0
  375. data/rbi/knockapi/models/user_list_subscriptions_params.rbi +96 -0
  376. data/rbi/knockapi/models/user_merge_params.rbi +29 -0
  377. data/rbi/knockapi/models/user_set_channel_data_params.rbi +19 -0
  378. data/rbi/knockapi/models/user_set_preferences_params.rbi +19 -0
  379. data/rbi/knockapi/models/user_unset_channel_data_params.rbi +19 -0
  380. data/rbi/knockapi/models/user_update_params.rbi +19 -0
  381. data/rbi/knockapi/models/users/bulk_delete_params.rbi +31 -0
  382. data/rbi/knockapi/models/users/bulk_identify_params.rbi +36 -0
  383. data/rbi/knockapi/models/users/bulk_set_preferences_params.rbi +55 -0
  384. data/rbi/knockapi/models/users/feed_get_settings_params.rbi +21 -0
  385. data/rbi/knockapi/models/users/feed_get_settings_response.rbi +50 -0
  386. data/rbi/knockapi/models/users/feed_list_items_params.rbi +173 -0
  387. data/rbi/knockapi/models/users/feed_list_items_response.rbi +443 -0
  388. data/rbi/knockapi/models/users/guide_get_channel_params.rbi +63 -0
  389. data/rbi/knockapi/models/users/guide_get_channel_response.rbi +124 -0
  390. data/rbi/knockapi/models/users/guide_mark_message_as_archived_params.rbi +115 -0
  391. data/rbi/knockapi/models/users/guide_mark_message_as_archived_response.rbi +22 -0
  392. data/rbi/knockapi/models/users/guide_mark_message_as_interacted_params.rbi +115 -0
  393. data/rbi/knockapi/models/users/guide_mark_message_as_interacted_response.rbi +22 -0
  394. data/rbi/knockapi/models/users/guide_mark_message_as_seen_params.rbi +115 -0
  395. data/rbi/knockapi/models/users/guide_mark_message_as_seen_response.rbi +22 -0
  396. data/rbi/knockapi/models/workflow_cancel_params.rbi +57 -0
  397. data/rbi/knockapi/models/workflow_trigger_params.rbi +109 -0
  398. data/rbi/knockapi/models/workflow_trigger_response.rbi +22 -0
  399. data/rbi/knockapi/request_options.rbi +48 -0
  400. data/rbi/knockapi/resources/audiences.rbi +53 -0
  401. data/rbi/knockapi/resources/bulk_operations.rbi +18 -0
  402. data/rbi/knockapi/resources/channels/bulk.rbi +64 -0
  403. data/rbi/knockapi/resources/channels.rbi +14 -0
  404. data/rbi/knockapi/resources/integrations/census.rbi +35 -0
  405. data/rbi/knockapi/resources/integrations/hightouch.rbi +35 -0
  406. data/rbi/knockapi/resources/integrations.rbi +17 -0
  407. data/rbi/knockapi/resources/messages/activities.rbi +38 -0
  408. data/rbi/knockapi/resources/messages/batch.rbi +113 -0
  409. data/rbi/knockapi/resources/messages.rbi +231 -0
  410. data/rbi/knockapi/resources/objects/bulk.rbi +61 -0
  411. data/rbi/knockapi/resources/objects.rbi +434 -0
  412. data/rbi/knockapi/resources/providers/ms_teams.rbi +79 -0
  413. data/rbi/knockapi/resources/providers/slack.rbi +55 -0
  414. data/rbi/knockapi/resources/providers.rbi +17 -0
  415. data/rbi/knockapi/resources/recipients/channel_data.rbi +13 -0
  416. data/rbi/knockapi/resources/recipients/preferences.rbi +13 -0
  417. data/rbi/knockapi/resources/recipients/subscriptions.rbi +13 -0
  418. data/rbi/knockapi/resources/recipients.rbi +20 -0
  419. data/rbi/knockapi/resources/schedules/bulk.rbi +28 -0
  420. data/rbi/knockapi/resources/schedules.rbi +135 -0
  421. data/rbi/knockapi/resources/shared.rbi +11 -0
  422. data/rbi/knockapi/resources/tenants/bulk.rbi +36 -0
  423. data/rbi/knockapi/resources/tenants.rbi +80 -0
  424. data/rbi/knockapi/resources/users/bulk.rbi +57 -0
  425. data/rbi/knockapi/resources/users/feeds.rbi +72 -0
  426. data/rbi/knockapi/resources/users/guides.rbi +170 -0
  427. data/rbi/knockapi/resources/users.rbi +357 -0
  428. data/rbi/knockapi/resources/workflows.rbi +92 -0
  429. data/rbi/knockapi/version.rbi +5 -0
  430. data/sig/knockapi/client.rbs +50 -0
  431. data/sig/knockapi/errors.rbs +101 -0
  432. data/sig/knockapi/file_part.rbs +21 -0
  433. data/sig/knockapi/internal/entries_cursor.rbs +24 -0
  434. data/sig/knockapi/internal/items_cursor.rbs +24 -0
  435. data/sig/knockapi/internal/ms_teams_pagination.rbs +13 -0
  436. data/sig/knockapi/internal/slack_channels_cursor.rbs +13 -0
  437. data/sig/knockapi/internal/transport/base_client.rbs +116 -0
  438. data/sig/knockapi/internal/transport/pooled_net_requester.rbs +41 -0
  439. data/sig/knockapi/internal/type/array_of.rbs +45 -0
  440. data/sig/knockapi/internal/type/base_model.rbs +94 -0
  441. data/sig/knockapi/internal/type/base_page.rbs +24 -0
  442. data/sig/knockapi/internal/type/boolean.rbs +23 -0
  443. data/sig/knockapi/internal/type/converter.rbs +54 -0
  444. data/sig/knockapi/internal/type/enum.rbs +29 -0
  445. data/sig/knockapi/internal/type/file_input.rbs +23 -0
  446. data/sig/knockapi/internal/type/hash_of.rbs +45 -0
  447. data/sig/knockapi/internal/type/request_parameters.rbs +15 -0
  448. data/sig/knockapi/internal/type/union.rbs +49 -0
  449. data/sig/knockapi/internal/type/unknown.rbs +23 -0
  450. data/sig/knockapi/internal/util.rbs +158 -0
  451. data/sig/knockapi/internal.rbs +5 -0
  452. data/sig/knockapi/models/activity.rbs +54 -0
  453. data/sig/knockapi/models/audience_add_members_params.rbs +52 -0
  454. data/sig/knockapi/models/audience_list_members_params.rbs +15 -0
  455. data/sig/knockapi/models/audience_list_members_response.rbs +22 -0
  456. data/sig/knockapi/models/audience_member.rbs +34 -0
  457. data/sig/knockapi/models/audience_remove_members_params.rbs +54 -0
  458. data/sig/knockapi/models/bulk_operation.rbs +107 -0
  459. data/sig/knockapi/models/bulk_operation_get_params.rbs +15 -0
  460. data/sig/knockapi/models/channels/bulk_update_message_status_params.rbs +176 -0
  461. data/sig/knockapi/models/condition.rbs +71 -0
  462. data/sig/knockapi/models/identify_user_request.rbs +50 -0
  463. data/sig/knockapi/models/inline_identify_user_request.rbs +30 -0
  464. data/sig/knockapi/models/inline_object_request.rbs +34 -0
  465. data/sig/knockapi/models/inline_tenant_request.rbs +11 -0
  466. data/sig/knockapi/models/integrations/census_custom_destination_params.rbs +39 -0
  467. data/sig/knockapi/models/integrations/census_custom_destination_response.rbs +22 -0
  468. data/sig/knockapi/models/integrations/hightouch_embedded_destination_params.rbs +39 -0
  469. data/sig/knockapi/models/integrations/hightouch_embedded_destination_response.rbs +22 -0
  470. data/sig/knockapi/models/message.rbs +193 -0
  471. data/sig/knockapi/models/message_archive_params.rbs +15 -0
  472. data/sig/knockapi/models/message_delivery_log.rbs +152 -0
  473. data/sig/knockapi/models/message_event.rbs +77 -0
  474. data/sig/knockapi/models/message_get_content_params.rbs +15 -0
  475. data/sig/knockapi/models/message_get_content_response.rbs +338 -0
  476. data/sig/knockapi/models/message_get_params.rbs +15 -0
  477. data/sig/knockapi/models/message_list_activities_params.rbs +43 -0
  478. data/sig/knockapi/models/message_list_delivery_logs_params.rbs +33 -0
  479. data/sig/knockapi/models/message_list_events_params.rbs +33 -0
  480. data/sig/knockapi/models/message_list_params.rbs +176 -0
  481. data/sig/knockapi/models/message_mark_as_interacted_params.rbs +23 -0
  482. data/sig/knockapi/models/message_mark_as_read_params.rbs +15 -0
  483. data/sig/knockapi/models/message_mark_as_seen_params.rbs +15 -0
  484. data/sig/knockapi/models/message_mark_as_unread_params.rbs +15 -0
  485. data/sig/knockapi/models/message_mark_as_unseen_params.rbs +15 -0
  486. data/sig/knockapi/models/message_unarchive_params.rbs +15 -0
  487. data/sig/knockapi/models/messages/activity_list_params.rbs +45 -0
  488. data/sig/knockapi/models/messages/batch_archive_params.rbs +23 -0
  489. data/sig/knockapi/models/messages/batch_archive_response.rbs +9 -0
  490. data/sig/knockapi/models/messages/batch_get_content_params.rbs +23 -0
  491. data/sig/knockapi/models/messages/batch_get_content_response.rbs +349 -0
  492. data/sig/knockapi/models/messages/batch_mark_as_interacted_params.rbs +26 -0
  493. data/sig/knockapi/models/messages/batch_mark_as_interacted_response.rbs +10 -0
  494. data/sig/knockapi/models/messages/batch_mark_as_read_params.rbs +23 -0
  495. data/sig/knockapi/models/messages/batch_mark_as_read_response.rbs +9 -0
  496. data/sig/knockapi/models/messages/batch_mark_as_seen_params.rbs +23 -0
  497. data/sig/knockapi/models/messages/batch_mark_as_seen_response.rbs +9 -0
  498. data/sig/knockapi/models/messages/batch_mark_as_unread_params.rbs +23 -0
  499. data/sig/knockapi/models/messages/batch_mark_as_unread_response.rbs +9 -0
  500. data/sig/knockapi/models/messages/batch_mark_as_unseen_params.rbs +23 -0
  501. data/sig/knockapi/models/messages/batch_mark_as_unseen_response.rbs +9 -0
  502. data/sig/knockapi/models/messages/batch_unarchive_params.rbs +23 -0
  503. data/sig/knockapi/models/messages/batch_unarchive_response.rbs +9 -0
  504. data/sig/knockapi/models/object.rbs +34 -0
  505. data/sig/knockapi/models/object_add_subscriptions_params.rbs +27 -0
  506. data/sig/knockapi/models/object_add_subscriptions_response.rbs +8 -0
  507. data/sig/knockapi/models/object_delete_params.rbs +15 -0
  508. data/sig/knockapi/models/object_delete_subscriptions_params.rbs +21 -0
  509. data/sig/knockapi/models/object_delete_subscriptions_response.rbs +8 -0
  510. data/sig/knockapi/models/object_get_channel_data_params.rbs +15 -0
  511. data/sig/knockapi/models/object_get_params.rbs +14 -0
  512. data/sig/knockapi/models/object_get_preferences_params.rbs +15 -0
  513. data/sig/knockapi/models/object_list_messages_params.rbs +176 -0
  514. data/sig/knockapi/models/object_list_params.rbs +55 -0
  515. data/sig/knockapi/models/object_list_preferences_params.rbs +15 -0
  516. data/sig/knockapi/models/object_list_preferences_response.rbs +8 -0
  517. data/sig/knockapi/models/object_list_schedules_params.rbs +49 -0
  518. data/sig/knockapi/models/object_list_subscriptions_params.rbs +106 -0
  519. data/sig/knockapi/models/object_set_channel_data_params.rbs +15 -0
  520. data/sig/knockapi/models/object_set_params.rbs +43 -0
  521. data/sig/knockapi/models/object_set_preferences_params.rbs +15 -0
  522. data/sig/knockapi/models/object_unset_channel_data_params.rbs +15 -0
  523. data/sig/knockapi/models/objects/bulk_add_subscriptions_params.rbs +44 -0
  524. data/sig/knockapi/models/objects/bulk_delete_params.rbs +23 -0
  525. data/sig/knockapi/models/objects/bulk_set_params.rbs +23 -0
  526. data/sig/knockapi/models/page_info.rbs +25 -0
  527. data/sig/knockapi/models/providers/ms_team_check_auth_params.rbs +23 -0
  528. data/sig/knockapi/models/providers/ms_team_check_auth_response.rbs +32 -0
  529. data/sig/knockapi/models/providers/ms_team_list_channels_params.rbs +53 -0
  530. data/sig/knockapi/models/providers/ms_team_list_channels_response.rbs +61 -0
  531. data/sig/knockapi/models/providers/ms_team_list_teams_params.rbs +63 -0
  532. data/sig/knockapi/models/providers/ms_team_list_teams_response.rbs +24 -0
  533. data/sig/knockapi/models/providers/ms_team_revoke_access_params.rbs +23 -0
  534. data/sig/knockapi/models/providers/ms_team_revoke_access_response.rbs +17 -0
  535. data/sig/knockapi/models/providers/slack_check_auth_params.rbs +23 -0
  536. data/sig/knockapi/models/providers/slack_check_auth_response.rbs +32 -0
  537. data/sig/knockapi/models/providers/slack_list_channels_params.rbs +74 -0
  538. data/sig/knockapi/models/providers/slack_list_channels_response.rbs +36 -0
  539. data/sig/knockapi/models/providers/slack_revoke_access_params.rbs +23 -0
  540. data/sig/knockapi/models/providers/slack_revoke_access_response.rbs +17 -0
  541. data/sig/knockapi/models/recipient.rbs +11 -0
  542. data/sig/knockapi/models/recipient_reference.rbs +28 -0
  543. data/sig/knockapi/models/recipient_request.rbs +14 -0
  544. data/sig/knockapi/models/recipients/channel_data.rbs +74 -0
  545. data/sig/knockapi/models/recipients/channel_data_request.rbs +31 -0
  546. data/sig/knockapi/models/recipients/discord_channel_data.rbs +65 -0
  547. data/sig/knockapi/models/recipients/inline_channel_data_request.rbs +10 -0
  548. data/sig/knockapi/models/recipients/inline_preference_set_request.rbs +10 -0
  549. data/sig/knockapi/models/recipients/ms_teams_channel_data.rbs +86 -0
  550. data/sig/knockapi/models/recipients/one_signal_channel_data.rbs +15 -0
  551. data/sig/knockapi/models/recipients/preference_set.rbs +90 -0
  552. data/sig/knockapi/models/recipients/preference_set_channel_type_setting.rbs +18 -0
  553. data/sig/knockapi/models/recipients/preference_set_channel_types.rbs +118 -0
  554. data/sig/knockapi/models/recipients/preference_set_request.rbs +86 -0
  555. data/sig/knockapi/models/recipients/push_channel_data.rbs +15 -0
  556. data/sig/knockapi/models/recipients/slack_channel_data.rbs +73 -0
  557. data/sig/knockapi/models/recipients/subscription.rbs +40 -0
  558. data/sig/knockapi/models/schedule.rbs +64 -0
  559. data/sig/knockapi/models/schedule_create_params.rbs +47 -0
  560. data/sig/knockapi/models/schedule_create_response.rbs +7 -0
  561. data/sig/knockapi/models/schedule_delete_params.rbs +21 -0
  562. data/sig/knockapi/models/schedule_delete_response.rbs +7 -0
  563. data/sig/knockapi/models/schedule_list_params.rbs +53 -0
  564. data/sig/knockapi/models/schedule_repeat_rule.rbs +73 -0
  565. data/sig/knockapi/models/schedule_update_params.rbs +51 -0
  566. data/sig/knockapi/models/schedule_update_response.rbs +7 -0
  567. data/sig/knockapi/models/schedules/bulk_create_params.rbs +76 -0
  568. data/sig/knockapi/models/tenant.rbs +76 -0
  569. data/sig/knockapi/models/tenant_delete_params.rbs +15 -0
  570. data/sig/knockapi/models/tenant_get_params.rbs +14 -0
  571. data/sig/knockapi/models/tenant_list_params.rbs +49 -0
  572. data/sig/knockapi/models/tenant_request.rbs +84 -0
  573. data/sig/knockapi/models/tenant_set_params.rbs +85 -0
  574. data/sig/knockapi/models/tenants/bulk_delete_params.rbs +23 -0
  575. data/sig/knockapi/models/tenants/bulk_set_params.rbs +23 -0
  576. data/sig/knockapi/models/user.rbs +50 -0
  577. data/sig/knockapi/models/user_delete_params.rbs +15 -0
  578. data/sig/knockapi/models/user_get_channel_data_params.rbs +15 -0
  579. data/sig/knockapi/models/user_get_params.rbs +14 -0
  580. data/sig/knockapi/models/user_get_preferences_params.rbs +22 -0
  581. data/sig/knockapi/models/user_list_messages_params.rbs +176 -0
  582. data/sig/knockapi/models/user_list_params.rbs +55 -0
  583. data/sig/knockapi/models/user_list_preferences_params.rbs +15 -0
  584. data/sig/knockapi/models/user_list_preferences_response.rbs +8 -0
  585. data/sig/knockapi/models/user_list_schedules_params.rbs +49 -0
  586. data/sig/knockapi/models/user_list_subscriptions_params.rbs +61 -0
  587. data/sig/knockapi/models/user_merge_params.rbs +20 -0
  588. data/sig/knockapi/models/user_set_channel_data_params.rbs +15 -0
  589. data/sig/knockapi/models/user_set_preferences_params.rbs +15 -0
  590. data/sig/knockapi/models/user_unset_channel_data_params.rbs +15 -0
  591. data/sig/knockapi/models/user_update_params.rbs +15 -0
  592. data/sig/knockapi/models/users/bulk_delete_params.rbs +23 -0
  593. data/sig/knockapi/models/users/bulk_identify_params.rbs +23 -0
  594. data/sig/knockapi/models/users/bulk_set_preferences_params.rbs +29 -0
  595. data/sig/knockapi/models/users/feed_get_settings_params.rbs +17 -0
  596. data/sig/knockapi/models/users/feed_get_settings_response.rbs +28 -0
  597. data/sig/knockapi/models/users/feed_list_items_params.rbs +111 -0
  598. data/sig/knockapi/models/users/feed_list_items_response.rbs +214 -0
  599. data/sig/knockapi/models/users/guide_get_channel_params.rbs +35 -0
  600. data/sig/knockapi/models/users/guide_get_channel_response.rbs +71 -0
  601. data/sig/knockapi/models/users/guide_mark_message_as_archived_params.rbs +65 -0
  602. data/sig/knockapi/models/users/guide_mark_message_as_archived_response.rbs +15 -0
  603. data/sig/knockapi/models/users/guide_mark_message_as_interacted_params.rbs +65 -0
  604. data/sig/knockapi/models/users/guide_mark_message_as_interacted_response.rbs +15 -0
  605. data/sig/knockapi/models/users/guide_mark_message_as_seen_params.rbs +65 -0
  606. data/sig/knockapi/models/users/guide_mark_message_as_seen_response.rbs +15 -0
  607. data/sig/knockapi/models/workflow_cancel_params.rbs +27 -0
  608. data/sig/knockapi/models/workflow_trigger_params.rbs +39 -0
  609. data/sig/knockapi/models/workflow_trigger_response.rbs +13 -0
  610. data/sig/knockapi/request_options.rbs +34 -0
  611. data/sig/knockapi/resources/audiences.rbs +24 -0
  612. data/sig/knockapi/resources/bulk_operations.rbs +12 -0
  613. data/sig/knockapi/resources/channels/bulk.rbs +25 -0
  614. data/sig/knockapi/resources/channels.rbs +9 -0
  615. data/sig/knockapi/resources/integrations/census.rbs +17 -0
  616. data/sig/knockapi/resources/integrations/hightouch.rbs +17 -0
  617. data/sig/knockapi/resources/integrations.rbs +11 -0
  618. data/sig/knockapi/resources/messages/activities.rbs +18 -0
  619. data/sig/knockapi/resources/messages/batch.rbs +50 -0
  620. data/sig/knockapi/resources/messages.rbs +100 -0
  621. data/sig/knockapi/resources/objects/bulk.rbs +27 -0
  622. data/sig/knockapi/resources/objects.rbs +144 -0
  623. data/sig/knockapi/resources/providers/ms_teams.rbs +36 -0
  624. data/sig/knockapi/resources/providers/slack.rbs +28 -0
  625. data/sig/knockapi/resources/providers.rbs +11 -0
  626. data/sig/knockapi/resources/recipients/channel_data.rbs +9 -0
  627. data/sig/knockapi/resources/recipients/preferences.rbs +9 -0
  628. data/sig/knockapi/resources/recipients/subscriptions.rbs +9 -0
  629. data/sig/knockapi/resources/recipients.rbs +13 -0
  630. data/sig/knockapi/resources/schedules/bulk.rbs +14 -0
  631. data/sig/knockapi/resources/schedules.rbs +46 -0
  632. data/sig/knockapi/resources/shared.rbs +7 -0
  633. data/sig/knockapi/resources/tenants/bulk.rbs +19 -0
  634. data/sig/knockapi/resources/tenants.rbs +36 -0
  635. data/sig/knockapi/resources/users/bulk.rbs +25 -0
  636. data/sig/knockapi/resources/users/feeds.rbs +31 -0
  637. data/sig/knockapi/resources/users/guides.rbs +63 -0
  638. data/sig/knockapi/resources/users.rbs +130 -0
  639. data/sig/knockapi/resources/workflows.rbs +24 -0
  640. data/sig/knockapi/version.rbs +3 -0
  641. metadata +657 -77
  642. data/.github/workflows/publish.yml +0 -17
  643. data/.github/workflows/ruby.yml +0 -47
  644. data/.gitignore +0 -49
  645. data/.rubocop.yml +0 -8
  646. data/.ruby-version +0 -1
  647. data/.tool-versions +0 -1
  648. data/CONTRIBUTING.md +0 -31
  649. data/Gemfile +0 -9
  650. data/Gemfile.lock +0 -63
  651. data/LICENSE +0 -21
  652. data/bin/console +0 -8
  653. data/bin/publish +0 -5
  654. data/knockapi.gemspec +0 -30
  655. data/lib/knock/bulk_operations.rb +0 -27
  656. data/lib/knock/client.rb +0 -149
  657. data/lib/knock/configuration.rb +0 -18
  658. data/lib/knock/errors.rb +0 -57
  659. data/lib/knock/messages.rb +0 -93
  660. data/lib/knock/objects.rb +0 -442
  661. data/lib/knock/preferences.rb +0 -114
  662. data/lib/knock/tenants.rb +0 -72
  663. data/lib/knock/users.rb +0 -420
  664. data/lib/knock/version.rb +0 -5
  665. data/lib/knock/workflows.rb +0 -152
  666. data/lib/knock.rb +0 -71
  667. data/spec/configuration_spec.rb +0 -63
  668. data/spec/tenants_spec.rb +0 -66
@@ -0,0 +1,448 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Knockapi
4
+ module Resources
5
+ class Users
6
+ # @return [Knockapi::Resources::Users::Feeds]
7
+ attr_reader :feeds
8
+
9
+ # @return [Knockapi::Resources::Users::Guides]
10
+ attr_reader :guides
11
+
12
+ # @return [Knockapi::Resources::Users::Bulk]
13
+ attr_reader :bulk
14
+
15
+ # Some parameter documentations has been truncated, see
16
+ # {Knockapi::Models::UserUpdateParams} for more details.
17
+ #
18
+ # Create or update a user with the provided identification data. When you identify
19
+ # an existing user, the system merges the properties you specific with what is
20
+ # currently set on the user, updating only the fields included in your requests.
21
+ #
22
+ # @overload update(user_id, avatar: nil, channel_data: nil, created_at: nil, email: nil, locale: nil, name: nil, phone_number: nil, preferences: nil, timezone: nil, request_options: {})
23
+ #
24
+ # @param user_id [String] The ID for the user that you set when identifying them in Knock.
25
+ #
26
+ # @param avatar [String, nil] URL to the user's avatar image.
27
+ #
28
+ # @param channel_data [Hash{Symbol=>Knockapi::Models::Recipients::ChannelDataRequest}, nil] A request to set channel data for a type of channel inline.
29
+ #
30
+ # @param created_at [Time, nil] The creation date of the user from your system.
31
+ #
32
+ # @param email [String, nil] The primary email address for the user.
33
+ #
34
+ # @param locale [String, nil] The locale of the user. Used for [message localization](/concepts/translations).
35
+ # ...
36
+ #
37
+ # @param name [String, nil] Display name of the user.
38
+ #
39
+ # @param phone_number [String, nil] The [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the
40
+ # ...
41
+ #
42
+ # @param preferences [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil] Inline set preferences for a recipient, where the key is the preference set id.
43
+ #
44
+ # @param timezone [String, nil] The timezone of the user. Must be a valid [tz database time zone string](https:/
45
+ # ...
46
+ #
47
+ # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
48
+ #
49
+ # @return [Knockapi::Models::User]
50
+ #
51
+ # @see Knockapi::Models::UserUpdateParams
52
+ def update(user_id, params = {})
53
+ parsed, options = Knockapi::Models::UserUpdateParams.dump_request(params)
54
+ @client.request(
55
+ method: :put,
56
+ path: ["v1/users/%1$s", user_id],
57
+ body: parsed,
58
+ model: Knockapi::Models::User,
59
+ options: options
60
+ )
61
+ end
62
+
63
+ # Retrieve a paginated list of users in the environment. Defaults to 50 users per
64
+ # page.
65
+ #
66
+ # @overload list(after: nil, before: nil, include: nil, page_size: nil, request_options: {})
67
+ #
68
+ # @param after [String] The cursor to fetch entries after.
69
+ #
70
+ # @param before [String] The cursor to fetch entries before.
71
+ #
72
+ # @param include [Array<Symbol, Knockapi::Models::UserListParams::Include>] Associated resources to include in the response.
73
+ #
74
+ # @param page_size [Integer] The number of items per page.
75
+ #
76
+ # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
77
+ #
78
+ # @return [Knockapi::Internal::EntriesCursor<Knockapi::Models::User>]
79
+ #
80
+ # @see Knockapi::Models::UserListParams
81
+ def list(params = {})
82
+ parsed, options = Knockapi::Models::UserListParams.dump_request(params)
83
+ @client.request(
84
+ method: :get,
85
+ path: "v1/users",
86
+ query: parsed,
87
+ page: Knockapi::Internal::EntriesCursor,
88
+ model: Knockapi::Models::User,
89
+ options: options
90
+ )
91
+ end
92
+
93
+ # Permanently delete a user and all associated data.
94
+ #
95
+ # @overload delete(user_id, request_options: {})
96
+ #
97
+ # @param user_id [String] The ID of the user to delete.
98
+ #
99
+ # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
100
+ #
101
+ # @return [String]
102
+ #
103
+ # @see Knockapi::Models::UserDeleteParams
104
+ def delete(user_id, params = {})
105
+ @client.request(
106
+ method: :delete,
107
+ path: ["v1/users/%1$s", user_id],
108
+ model: String,
109
+ options: params[:request_options]
110
+ )
111
+ end
112
+
113
+ # Retrieve a specific user by their ID.
114
+ #
115
+ # @overload get(user_id, request_options: {})
116
+ #
117
+ # @param user_id [String] The ID of the user to retrieve.
118
+ #
119
+ # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
120
+ #
121
+ # @return [Knockapi::Models::User]
122
+ #
123
+ # @see Knockapi::Models::UserGetParams
124
+ def get(user_id, params = {})
125
+ @client.request(
126
+ method: :get,
127
+ path: ["v1/users/%1$s", user_id],
128
+ model: Knockapi::Models::User,
129
+ options: params[:request_options]
130
+ )
131
+ end
132
+
133
+ # Retrieves the channel data for a specific user and channel ID.
134
+ #
135
+ # @overload get_channel_data(user_id, channel_id, request_options: {})
136
+ #
137
+ # @param user_id [String] The ID for the user that you set when identifying them in Knock.
138
+ #
139
+ # @param channel_id [String] The unique identifier for the channel.
140
+ #
141
+ # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
142
+ #
143
+ # @return [Knockapi::Models::Recipients::RecipientsChannelData]
144
+ #
145
+ # @see Knockapi::Models::UserGetChannelDataParams
146
+ def get_channel_data(user_id, channel_id, params = {})
147
+ @client.request(
148
+ method: :get,
149
+ path: ["v1/users/%1$s/channel_data/%2$s", user_id, channel_id],
150
+ model: Knockapi::Models::Recipients::RecipientsChannelData,
151
+ options: params[:request_options]
152
+ )
153
+ end
154
+
155
+ # Retrieves a specific preference set for a user identified by the preference set
156
+ # ID.
157
+ #
158
+ # @overload get_preferences(user_id, id, tenant: nil, request_options: {})
159
+ #
160
+ # @param user_id [String] The ID for the user that you set when identifying them in Knock.
161
+ #
162
+ # @param id [String] Unique identifier for the preference set.
163
+ #
164
+ # @param tenant [String] The unique identifier for the tenant.
165
+ #
166
+ # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
167
+ #
168
+ # @return [Knockapi::Models::Recipients::PreferenceSet]
169
+ #
170
+ # @see Knockapi::Models::UserGetPreferencesParams
171
+ def get_preferences(user_id, id, params = {})
172
+ parsed, options = Knockapi::Models::UserGetPreferencesParams.dump_request(params)
173
+ @client.request(
174
+ method: :get,
175
+ path: ["v1/users/%1$s/preferences/%2$s", user_id, id],
176
+ query: parsed,
177
+ model: Knockapi::Models::Recipients::PreferenceSet,
178
+ options: options
179
+ )
180
+ end
181
+
182
+ # Some parameter documentations has been truncated, see
183
+ # {Knockapi::Models::UserListMessagesParams} for more details.
184
+ #
185
+ # Returns a paginated list of messages for a specific user. Allows filtering by
186
+ # message status and provides various sorting options. Messages outside the
187
+ # account's retention window will not be included in the results.
188
+ #
189
+ # @overload list_messages(user_id, after: nil, before: nil, channel_id: nil, engagement_status: nil, inserted_at: nil, message_ids: nil, page_size: nil, source: nil, status: nil, tenant: nil, trigger_data: nil, workflow_categories: nil, workflow_recipient_run_id: nil, workflow_run_id: nil, request_options: {})
190
+ #
191
+ # @param user_id [String] The user ID to list messages for.
192
+ #
193
+ # @param after [String] The cursor to fetch entries after.
194
+ #
195
+ # @param before [String] The cursor to fetch entries before.
196
+ #
197
+ # @param channel_id [String] Limits the results to items with the corresponding channel ID.
198
+ #
199
+ # @param engagement_status [Array<Symbol, Knockapi::Models::UserListMessagesParams::EngagementStatus>] Limits the results to messages with the given engagement status.
200
+ #
201
+ # @param inserted_at [Knockapi::Models::UserListMessagesParams::InsertedAt]
202
+ #
203
+ # @param message_ids [Array<String>] Limits the results to only the message IDs given (max 50). Note: when using this
204
+ # ...
205
+ #
206
+ # @param page_size [Integer] The number of items per page.
207
+ #
208
+ # @param source [String] Limits the results to messages triggered by the given workflow key.
209
+ #
210
+ # @param status [Array<Symbol, Knockapi::Models::UserListMessagesParams::Status>] Limits the results to messages with the given delivery status.
211
+ #
212
+ # @param tenant [String] Limits the results to items with the corresponding tenant.
213
+ #
214
+ # @param trigger_data [String] Limits the results to only messages that were generated with the given data. See
215
+ # ...
216
+ #
217
+ # @param workflow_categories [Array<String>] Limits the results to messages related to any of the provided categories.
218
+ #
219
+ # @param workflow_recipient_run_id [String] Limits the results to messages for a specific recipient's workflow run.
220
+ #
221
+ # @param workflow_run_id [String] Limits the results to messages associated with the top-level workflow run ID ret
222
+ # ...
223
+ #
224
+ # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
225
+ #
226
+ # @return [Knockapi::Internal::EntriesCursor<Knockapi::Models::Message>]
227
+ #
228
+ # @see Knockapi::Models::UserListMessagesParams
229
+ def list_messages(user_id, params = {})
230
+ parsed, options = Knockapi::Models::UserListMessagesParams.dump_request(params)
231
+ @client.request(
232
+ method: :get,
233
+ path: ["v1/users/%1$s/messages", user_id],
234
+ query: parsed,
235
+ page: Knockapi::Internal::EntriesCursor,
236
+ model: Knockapi::Models::Message,
237
+ options: options
238
+ )
239
+ end
240
+
241
+ # Retrieves a list of all preference sets for a specific user.
242
+ #
243
+ # @overload list_preferences(user_id, request_options: {})
244
+ #
245
+ # @param user_id [String] The ID for the user that you set when identifying them in Knock.
246
+ #
247
+ # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
248
+ #
249
+ # @return [Array<Knockapi::Models::Recipients::PreferenceSet>]
250
+ #
251
+ # @see Knockapi::Models::UserListPreferencesParams
252
+ def list_preferences(user_id, params = {})
253
+ @client.request(
254
+ method: :get,
255
+ path: ["v1/users/%1$s/preferences", user_id],
256
+ model: Knockapi::Internal::Type::ArrayOf[Knockapi::Models::Recipients::PreferenceSet],
257
+ options: params[:request_options]
258
+ )
259
+ end
260
+
261
+ # Returns a paginated list of schedules for a specific user, in descending order.
262
+ #
263
+ # @overload list_schedules(user_id, after: nil, before: nil, page_size: nil, tenant: nil, workflow: nil, request_options: {})
264
+ #
265
+ # @param user_id [String] The user ID to list schedules for.
266
+ #
267
+ # @param after [String] The cursor to fetch entries after.
268
+ #
269
+ # @param before [String] The cursor to fetch entries before.
270
+ #
271
+ # @param page_size [Integer] The number of items per page.
272
+ #
273
+ # @param tenant [String] The tenant ID to filter schedules for.
274
+ #
275
+ # @param workflow [String] The workflow key to filter schedules for.
276
+ #
277
+ # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
278
+ #
279
+ # @return [Knockapi::Internal::EntriesCursor<Knockapi::Models::Schedule>]
280
+ #
281
+ # @see Knockapi::Models::UserListSchedulesParams
282
+ def list_schedules(user_id, params = {})
283
+ parsed, options = Knockapi::Models::UserListSchedulesParams.dump_request(params)
284
+ @client.request(
285
+ method: :get,
286
+ path: ["v1/users/%1$s/schedules", user_id],
287
+ query: parsed,
288
+ page: Knockapi::Internal::EntriesCursor,
289
+ model: Knockapi::Models::Schedule,
290
+ options: options
291
+ )
292
+ end
293
+
294
+ # Retrieves a paginated list of subscriptions for a specific user, in descending
295
+ # order.
296
+ #
297
+ # @overload list_subscriptions(user_id, after: nil, before: nil, include: nil, objects: nil, page_size: nil, request_options: {})
298
+ #
299
+ # @param user_id [String] The user ID to list subscriptions for.
300
+ #
301
+ # @param after [String] The cursor to fetch entries after.
302
+ #
303
+ # @param before [String] The cursor to fetch entries before.
304
+ #
305
+ # @param include [Array<Symbol, Knockapi::Models::UserListSubscriptionsParams::Include>] Associated resources to include in the response.
306
+ #
307
+ # @param objects [Array<String>] Only returns subscriptions for the specified object GIDs.
308
+ #
309
+ # @param page_size [Integer] The number of items per page.
310
+ #
311
+ # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
312
+ #
313
+ # @return [Knockapi::Internal::EntriesCursor<Knockapi::Models::Recipients::Subscription>]
314
+ #
315
+ # @see Knockapi::Models::UserListSubscriptionsParams
316
+ def list_subscriptions(user_id, params = {})
317
+ parsed, options = Knockapi::Models::UserListSubscriptionsParams.dump_request(params)
318
+ @client.request(
319
+ method: :get,
320
+ path: ["v1/users/%1$s/subscriptions", user_id],
321
+ query: parsed,
322
+ page: Knockapi::Internal::EntriesCursor,
323
+ model: Knockapi::Models::Recipients::Subscription,
324
+ options: options
325
+ )
326
+ end
327
+
328
+ # Merge two users together, where the user specified with the `from_user_id` param
329
+ # will be merged into the user specified by `user_id`.
330
+ #
331
+ # @overload merge(user_id, from_user_id:, request_options: {})
332
+ #
333
+ # @param user_id [String] The id of the user to merge into.
334
+ #
335
+ # @param from_user_id [String] The user ID to merge from.
336
+ #
337
+ # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
338
+ #
339
+ # @return [Knockapi::Models::User]
340
+ #
341
+ # @see Knockapi::Models::UserMergeParams
342
+ def merge(user_id, params)
343
+ parsed, options = Knockapi::Models::UserMergeParams.dump_request(params)
344
+ @client.request(
345
+ method: :post,
346
+ path: ["v1/users/%1$s/merge", user_id],
347
+ body: parsed,
348
+ model: Knockapi::Models::User,
349
+ options: options
350
+ )
351
+ end
352
+
353
+ # Updates or creates channel data for a specific user and channel ID.
354
+ #
355
+ # @overload set_channel_data(user_id, channel_id, data:, request_options: {})
356
+ #
357
+ # @param user_id [String] The ID for the user that you set when identifying them in Knock.
358
+ #
359
+ # @param channel_id [String] The unique identifier for the channel.
360
+ #
361
+ # @param data [Knockapi::Models::Recipients::PushChannelData, Knockapi::Models::Recipients::OneSignalChannelData, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData] Channel data for a given channel type.
362
+ #
363
+ # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
364
+ #
365
+ # @return [Knockapi::Models::Recipients::RecipientsChannelData]
366
+ #
367
+ # @see Knockapi::Models::UserSetChannelDataParams
368
+ def set_channel_data(user_id, channel_id, params)
369
+ parsed, options = Knockapi::Models::UserSetChannelDataParams.dump_request(params)
370
+ @client.request(
371
+ method: :put,
372
+ path: ["v1/users/%1$s/channel_data/%2$s", user_id, channel_id],
373
+ body: parsed,
374
+ model: Knockapi::Models::Recipients::RecipientsChannelData,
375
+ options: options
376
+ )
377
+ end
378
+
379
+ # Some parameter documentations has been truncated, see
380
+ # {Knockapi::Models::UserSetPreferencesParams} for more details.
381
+ #
382
+ # Updates a complete preference set for a user. This is a destructive operation
383
+ # that will replace the existing preference set for the user.
384
+ #
385
+ # @overload set_preferences(user_id, id, categories: nil, channel_types: nil, workflows: nil, request_options: {})
386
+ #
387
+ # @param user_id [String] The ID for the user that you set when identifying them in Knock.
388
+ #
389
+ # @param id [String] Unique identifier for the preference set.
390
+ #
391
+ # @param categories [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Category::PreferenceSetWorkflowCategorySettingObject}, nil] An object where the key is the category and the values are the preference settin
392
+ # ...
393
+ #
394
+ # @param channel_types [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] Channel type preferences.
395
+ #
396
+ # @param workflows [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Workflow::PreferenceSetWorkflowCategorySettingObject}, nil] An object where the key is the workflow key and the values are the preference se
397
+ # ...
398
+ #
399
+ # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
400
+ #
401
+ # @return [Knockapi::Models::Recipients::PreferenceSet]
402
+ #
403
+ # @see Knockapi::Models::UserSetPreferencesParams
404
+ def set_preferences(user_id, id, params = {})
405
+ parsed, options = Knockapi::Models::UserSetPreferencesParams.dump_request(params)
406
+ @client.request(
407
+ method: :put,
408
+ path: ["v1/users/%1$s/preferences/%2$s", user_id, id],
409
+ body: parsed,
410
+ model: Knockapi::Models::Recipients::PreferenceSet,
411
+ options: options
412
+ )
413
+ end
414
+
415
+ # Deletes channel data for a specific user and channel ID.
416
+ #
417
+ # @overload unset_channel_data(user_id, channel_id, request_options: {})
418
+ #
419
+ # @param user_id [String] The ID for the user that you set when identifying them in Knock.
420
+ #
421
+ # @param channel_id [String] The unique identifier for the channel.
422
+ #
423
+ # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
424
+ #
425
+ # @return [String]
426
+ #
427
+ # @see Knockapi::Models::UserUnsetChannelDataParams
428
+ def unset_channel_data(user_id, channel_id, params = {})
429
+ @client.request(
430
+ method: :delete,
431
+ path: ["v1/users/%1$s/channel_data/%2$s", user_id, channel_id],
432
+ model: String,
433
+ options: params[:request_options]
434
+ )
435
+ end
436
+
437
+ # @api private
438
+ #
439
+ # @param client [Knockapi::Client]
440
+ def initialize(client:)
441
+ @client = client
442
+ @feeds = Knockapi::Resources::Users::Feeds.new(client: client)
443
+ @guides = Knockapi::Resources::Users::Guides.new(client: client)
444
+ @bulk = Knockapi::Resources::Users::Bulk.new(client: client)
445
+ end
446
+ end
447
+ end
448
+ end
@@ -0,0 +1,89 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Knockapi
4
+ module Resources
5
+ class Workflows
6
+ # Some parameter documentations has been truncated, see
7
+ # {Knockapi::Models::WorkflowCancelParams} for more details.
8
+ #
9
+ # When invoked for a workflow using a specific workflow key and cancellation key,
10
+ # will cancel any queued workflow runs associated with that key/cancellation key
11
+ # pair. Can optionally be provided one or more recipients to scope the request to.
12
+ #
13
+ # @overload cancel(key, cancellation_key:, recipients: nil, request_options: {})
14
+ #
15
+ # @param key [String] The key of the workflow to cancel.
16
+ #
17
+ # @param cancellation_key [String] An optional key that is used to reference a specific workflow trigger request wh
18
+ # ...
19
+ #
20
+ # @param recipients [Array<String, Knockapi::Models::RecipientReference::ObjectReference>, nil] A list of recipients to cancel the notification for. If omitted, cancels for all
21
+ # ...
22
+ #
23
+ # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
24
+ #
25
+ # @return [String]
26
+ #
27
+ # @see Knockapi::Models::WorkflowCancelParams
28
+ def cancel(key, params)
29
+ parsed, options = Knockapi::Models::WorkflowCancelParams.dump_request(params)
30
+ @client.request(
31
+ method: :post,
32
+ path: ["v1/workflows/%1$s/cancel", key],
33
+ body: parsed,
34
+ model: String,
35
+ options: options
36
+ )
37
+ end
38
+
39
+ # Some parameter documentations has been truncated, see
40
+ # {Knockapi::Models::WorkflowTriggerParams} for more details.
41
+ #
42
+ # Trigger a workflow (specified by the key) to run for the given recipients, using
43
+ # the parameters provided. Returns an identifier for the workflow run request. All
44
+ # workflow runs are executed asynchronously. This endpoint also handles
45
+ # [inline identifications](/managing-recipients/identifying-recipients#inline-identifying-recipients)
46
+ # for the `actor`, `recipient`, and `tenant` fields.
47
+ #
48
+ # @overload trigger(key, recipients:, actor: nil, cancellation_key: nil, data: nil, tenant: nil, request_options: {})
49
+ #
50
+ # @param key [String] Key of the workflow to trigger.
51
+ #
52
+ # @param recipients [Array<String, Knockapi::Models::InlineIdentifyUserRequest, Knockapi::Models::InlineObjectRequest>] The recipients to trigger the workflow for. Can inline identify users, objects,
53
+ # ...
54
+ #
55
+ # @param actor [String, Knockapi::Models::InlineIdentifyUserRequest, Knockapi::Models::InlineObjectRequest, nil] Specifies a recipient in a request. This can either be a user identifier (string
56
+ # ...
57
+ #
58
+ # @param cancellation_key [String, nil] An optional key that is used to reference a specific workflow trigger request wh
59
+ # ...
60
+ #
61
+ # @param data [Hash{Symbol=>Object}, nil] An optional map of data to pass into the workflow execution.
62
+ #
63
+ # @param tenant [String, Knockapi::Models::TenantRequest, nil] An request to set a tenant inline.
64
+ #
65
+ # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
66
+ #
67
+ # @return [Knockapi::Models::WorkflowTriggerResponse]
68
+ #
69
+ # @see Knockapi::Models::WorkflowTriggerParams
70
+ def trigger(key, params)
71
+ parsed, options = Knockapi::Models::WorkflowTriggerParams.dump_request(params)
72
+ @client.request(
73
+ method: :post,
74
+ path: ["v1/workflows/%1$s/trigger", key],
75
+ body: parsed,
76
+ model: Knockapi::Models::WorkflowTriggerResponse,
77
+ options: options
78
+ )
79
+ end
80
+
81
+ # @api private
82
+ #
83
+ # @param client [Knockapi::Client]
84
+ def initialize(client:)
85
+ @client = client
86
+ end
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Knockapi
4
+ VERSION = "1.0.0"
5
+ end