api-sdk-rb 1.11.66 → 1.11.111

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 (317) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +192 -9
  3. data/docs/AdapterConnection.md +7 -1
  4. data/docs/BrandColor.md +22 -0
  5. data/docs/BrandFont.md +24 -0
  6. data/docs/BrandKitApi.md +593 -0
  7. data/docs/BrandKitAssetView.md +42 -0
  8. data/docs/BrandKitFigmaSource.md +26 -0
  9. data/docs/BrandKitTokens.md +24 -0
  10. data/docs/BrandKitTokensFonts.md +24 -0
  11. data/docs/BrandKitView.md +36 -0
  12. data/docs/BrandKitViewOwner.md +20 -0
  13. data/docs/BrandKitViewResponse.md +22 -0
  14. data/docs/BrandSpacing.md +32 -0
  15. data/docs/Composition.md +5 -1
  16. data/docs/CompositionLastEditedBy.md +20 -0
  17. data/docs/CompositionsApi.md +217 -135
  18. data/docs/ConfirmAdapterConnectionRequest.md +18 -0
  19. data/docs/CreateWidget201ResponseData.md +2 -4
  20. data/docs/CreateWorkspaceWorkflowFromPreset201Response.md +22 -0
  21. data/docs/CreateWorkspaceWorkflowFromPresetRequest.md +20 -0
  22. data/docs/CreateWorkspaceWorkflowRequest.md +22 -0
  23. data/docs/DeleteWorkspaceWorkflow200Response.md +22 -0
  24. data/docs/GetPublicCompositionEmbed200Response.md +7 -1
  25. data/docs/GetPublicCompositionEmbed200ResponseAdapters.md +20 -0
  26. data/docs/GetPublicCompositionEmbed200ResponseAdaptersCaptcha.md +18 -0
  27. data/docs/GetPublicCompositionEmbed200ResponseEntries.md +20 -0
  28. data/docs/GetPublicCompositionEmbed200ResponseMedia.md +18 -0
  29. data/docs/GetPublicWorkflow200Response.md +22 -0
  30. data/docs/GetWorkspaceWorkflowStats200Response.md +22 -0
  31. data/docs/GetWorkspaceWorkflowVersion200Response.md +22 -0
  32. data/docs/ListPartnerWorkflowPresets200Response.md +22 -0
  33. data/docs/ListWorkspaceWorkflowCompositionOptions200Response.md +22 -0
  34. data/docs/ListWorkspaceWorkflowPresets200Response.md +22 -0
  35. data/docs/ListWorkspaceWorkflowVersions200Response.md +22 -0
  36. data/docs/ListWorkspaceWorkflows200Response.md +22 -0
  37. data/docs/ManagedUsersApi.md +1 -1
  38. data/docs/NewComposition.md +1 -1
  39. data/docs/NewEditorSession.md +1 -1
  40. data/docs/OfferWorkflowPresetRequest.md +24 -0
  41. data/docs/OfferedWorkflowPreset.md +40 -0
  42. data/docs/OfferedWorkflowPresetList.md +18 -0
  43. data/docs/OfferedWorkflowPresetWidget.md +22 -0
  44. data/docs/PartnerApi.md +3360 -538
  45. data/docs/PartnerCustomization.md +2 -2
  46. data/docs/PartnerNotification.md +1 -1
  47. data/docs/PartnersApi.md +294 -2
  48. data/docs/PatchBrandKitAssetRequest.md +24 -0
  49. data/docs/PatchBrandKitRequest.md +28 -0
  50. data/docs/PatchBrandKitRequestFonts.md +24 -0
  51. data/docs/PatchBrandKitRequestSpacing.md +32 -0
  52. data/docs/PostBrandKitIconRequest.md +20 -0
  53. data/docs/PublicEmbedApi.md +270 -4
  54. data/docs/PublicWorkflow.md +36 -0
  55. data/docs/PublicWorkflowEventsAccepted.md +22 -0
  56. data/docs/PublicWorkflowEventsRequest.md +24 -0
  57. data/docs/PublicWorkflowEventsRequestEventsInner.md +22 -0
  58. data/docs/PublicWorkflowEventsRequestHeightsInner.md +20 -0
  59. data/docs/PublicWorkflowTranslation.md +20 -0
  60. data/docs/PublishWorkspaceWorkflow200Response.md +22 -0
  61. data/docs/PublishWorkspaceWorkflowRequest.md +18 -0
  62. data/docs/PutBrandKitRequest.md +22 -0
  63. data/docs/RemovePartnerWorkflowPreset200Response.md +22 -0
  64. data/docs/ReportPublicWorkflowEvents200Response.md +22 -0
  65. data/docs/SaveWorkspaceWorkflow200Response.md +22 -0
  66. data/docs/SaveWorkspaceWorkflowRequest.md +24 -0
  67. data/docs/SetAdapterConnectionRequest.md +1 -1
  68. data/docs/SetPartnerWorkflowPreset200Response.md +22 -0
  69. data/docs/UpdateComposition.md +1 -1
  70. data/docs/UsersApi.md +77 -1
  71. data/docs/Widget.md +2 -4
  72. data/docs/Workflow.md +50 -0
  73. data/docs/WorkflowCompositionAction.md +24 -0
  74. data/docs/WorkflowCompositionField.md +24 -0
  75. data/docs/WorkflowCompositionOption.md +30 -0
  76. data/docs/WorkflowCompositionOptionActions.md +22 -0
  77. data/docs/WorkflowCompositionOptionInputs.md +24 -0
  78. data/docs/WorkflowCompositionOptions.md +24 -0
  79. data/docs/WorkflowConditionCase.md +24 -0
  80. data/docs/WorkflowConditionTest.md +22 -0
  81. data/docs/WorkflowCounter.md +20 -0
  82. data/docs/WorkflowDetail.md +60 -0
  83. data/docs/WorkflowDetailAllOfLastEditedBy.md +20 -0
  84. data/docs/WorkflowEdge.md +24 -0
  85. data/docs/WorkflowFieldReference.md +22 -0
  86. data/docs/WorkflowGraph.md +22 -0
  87. data/docs/WorkflowIssue.md +28 -0
  88. data/docs/WorkflowList.md +24 -0
  89. data/docs/WorkflowNode.md +30 -0
  90. data/docs/WorkflowNodePosition.md +20 -0
  91. data/docs/WorkflowPresetChoice.md +26 -0
  92. data/docs/WorkflowPresetChoices.md +18 -0
  93. data/docs/WorkflowPresetRemoval.md +18 -0
  94. data/docs/WorkflowPresetWidget.md +20 -0
  95. data/docs/WorkflowPublishResult.md +22 -0
  96. data/docs/WorkflowRemoved.md +18 -0
  97. data/docs/WorkflowSchedule.md +24 -0
  98. data/docs/WorkflowStats.md +32 -0
  99. data/docs/WorkflowStatus.md +15 -0
  100. data/docs/WorkflowTrigger.md +28 -0
  101. data/docs/WorkflowTriggerValuesInner.md +20 -0
  102. data/docs/WorkflowVersion.md +28 -0
  103. data/docs/WorkflowVersionDetail.md +32 -0
  104. data/docs/WorkflowVersionList.md +18 -0
  105. data/docs/WorkflowVersionPublishedBy.md +20 -0
  106. data/docs/WorkflowsApi.md +1743 -0
  107. data/docs/WorkspacesApi.md +1527 -0
  108. data/lib/api-sdk-rb/api/brand_kit_api.rb +581 -0
  109. data/lib/api-sdk-rb/api/compositions_api.rb +237 -138
  110. data/lib/api-sdk-rb/api/managed_users_api.rb +2 -2
  111. data/lib/api-sdk-rb/api/partner_api.rb +3907 -809
  112. data/lib/api-sdk-rb/api/partners_api.rb +320 -4
  113. data/lib/api-sdk-rb/api/public_embed_api.rb +283 -6
  114. data/lib/api-sdk-rb/api/users_api.rb +96 -2
  115. data/lib/api-sdk-rb/api/workflows_api.rb +1997 -0
  116. data/lib/api-sdk-rb/api/workspaces_api.rb +1775 -0
  117. data/lib/api-sdk-rb/configuration.rb +50 -2
  118. data/lib/api-sdk-rb/models/adapter_connection.rb +48 -5
  119. data/lib/api-sdk-rb/models/brand_color.rb +329 -0
  120. data/lib/api-sdk-rb/models/brand_font.rb +357 -0
  121. data/lib/api-sdk-rb/models/brand_kit_asset_view.rb +409 -0
  122. data/lib/api-sdk-rb/models/brand_kit_figma_source.rb +277 -0
  123. data/lib/api-sdk-rb/models/brand_kit_tokens.rb +304 -0
  124. data/lib/api-sdk-rb/models/brand_kit_tokens_fonts.rb +241 -0
  125. data/lib/api-sdk-rb/models/brand_kit_view.rb +344 -0
  126. data/lib/api-sdk-rb/models/brand_kit_view_owner.rb +267 -0
  127. data/lib/api-sdk-rb/models/brand_kit_view_response.rb +247 -0
  128. data/lib/api-sdk-rb/models/brand_spacing.rb +557 -0
  129. data/lib/api-sdk-rb/models/composition.rb +26 -5
  130. data/lib/api-sdk-rb/models/composition_last_edited_by.rb +242 -0
  131. data/lib/api-sdk-rb/models/confirm_adapter_connection_request.rb +241 -0
  132. data/lib/api-sdk-rb/models/create_widget201_response_data.rb +9 -20
  133. data/lib/api-sdk-rb/models/create_workspace_workflow_from_preset201_response.rb +246 -0
  134. data/lib/api-sdk-rb/models/create_workspace_workflow_from_preset_request.rb +278 -0
  135. data/lib/api-sdk-rb/models/create_workspace_workflow_request.rb +271 -0
  136. data/lib/api-sdk-rb/models/delete_workspace_workflow200_response.rb +246 -0
  137. data/lib/api-sdk-rb/models/get_public_composition_embed200_response.rb +29 -2
  138. data/lib/api-sdk-rb/models/get_public_composition_embed200_response_adapters.rb +225 -0
  139. data/lib/api-sdk-rb/models/get_public_composition_embed200_response_adapters_captcha.rb +216 -0
  140. data/lib/api-sdk-rb/models/get_public_composition_embed200_response_entries.rb +224 -0
  141. data/lib/api-sdk-rb/models/get_public_composition_embed200_response_media.rb +216 -0
  142. data/lib/api-sdk-rb/models/get_public_workflow200_response.rb +246 -0
  143. data/lib/api-sdk-rb/models/get_workspace_workflow_stats200_response.rb +246 -0
  144. data/lib/api-sdk-rb/models/get_workspace_workflow_version200_response.rb +246 -0
  145. data/lib/api-sdk-rb/models/list_partner_workflow_presets200_response.rb +246 -0
  146. data/lib/api-sdk-rb/models/list_workspace_workflow_composition_options200_response.rb +246 -0
  147. data/lib/api-sdk-rb/models/list_workspace_workflow_presets200_response.rb +246 -0
  148. data/lib/api-sdk-rb/models/list_workspace_workflow_versions200_response.rb +246 -0
  149. data/lib/api-sdk-rb/models/list_workspace_workflows200_response.rb +246 -0
  150. data/lib/api-sdk-rb/models/new_composition.rb +1 -1
  151. data/lib/api-sdk-rb/models/new_editor_session.rb +1 -1
  152. data/lib/api-sdk-rb/models/offer_workflow_preset_request.rb +322 -0
  153. data/lib/api-sdk-rb/models/offered_workflow_preset.rb +423 -0
  154. data/lib/api-sdk-rb/models/offered_workflow_preset_list.rb +223 -0
  155. data/lib/api-sdk-rb/models/offered_workflow_preset_widget.rb +251 -0
  156. data/lib/api-sdk-rb/models/partner_notification.rb +1 -1
  157. data/lib/api-sdk-rb/models/partner_notification_event_type.rb +5 -1
  158. data/lib/api-sdk-rb/models/patch_brand_kit_asset_request.rb +289 -0
  159. data/lib/api-sdk-rb/models/patch_brand_kit_request.rb +332 -0
  160. data/lib/api-sdk-rb/models/patch_brand_kit_request_fonts.rb +242 -0
  161. data/lib/api-sdk-rb/models/patch_brand_kit_request_spacing.rb +502 -0
  162. data/lib/api-sdk-rb/models/post_brand_kit_icon_request.rb +237 -0
  163. data/lib/api-sdk-rb/models/public_workflow.rb +351 -0
  164. data/lib/api-sdk-rb/models/public_workflow_events_accepted.rb +242 -0
  165. data/lib/api-sdk-rb/models/public_workflow_events_request.rb +301 -0
  166. data/lib/api-sdk-rb/models/public_workflow_events_request_events_inner.rb +332 -0
  167. data/lib/api-sdk-rb/models/public_workflow_events_request_heights_inner.rb +267 -0
  168. data/lib/api-sdk-rb/models/public_workflow_translation.rb +242 -0
  169. data/lib/api-sdk-rb/models/publish_workspace_workflow200_response.rb +246 -0
  170. data/lib/api-sdk-rb/models/publish_workspace_workflow_request.rb +240 -0
  171. data/lib/api-sdk-rb/models/put_brand_kit_request.rb +239 -0
  172. data/lib/api-sdk-rb/models/remove_partner_workflow_preset200_response.rb +246 -0
  173. data/lib/api-sdk-rb/models/report_public_workflow_events200_response.rb +246 -0
  174. data/lib/api-sdk-rb/models/save_workspace_workflow200_response.rb +246 -0
  175. data/lib/api-sdk-rb/models/save_workspace_workflow_request.rb +296 -0
  176. data/lib/api-sdk-rb/models/set_adapter_connection_request.rb +1 -1
  177. data/lib/api-sdk-rb/models/set_partner_workflow_preset200_response.rb +246 -0
  178. data/lib/api-sdk-rb/models/update_composition.rb +1 -1
  179. data/lib/api-sdk-rb/models/widget.rb +9 -20
  180. data/lib/api-sdk-rb/models/workflow.rb +509 -0
  181. data/lib/api-sdk-rb/models/workflow_composition_action.rb +266 -0
  182. data/lib/api-sdk-rb/models/workflow_composition_field.rb +303 -0
  183. data/lib/api-sdk-rb/models/workflow_composition_option.rb +316 -0
  184. data/lib/api-sdk-rb/models/workflow_composition_option_actions.rb +284 -0
  185. data/lib/api-sdk-rb/models/workflow_composition_option_inputs.rb +304 -0
  186. data/lib/api-sdk-rb/models/workflow_composition_options.rb +271 -0
  187. data/lib/api-sdk-rb/models/workflow_condition_case.rb +322 -0
  188. data/lib/api-sdk-rb/models/workflow_condition_test.rb +284 -0
  189. data/lib/api-sdk-rb/models/workflow_counter.rb +238 -0
  190. data/lib/api-sdk-rb/models/workflow_detail.rb +580 -0
  191. data/lib/api-sdk-rb/models/workflow_detail_all_of_last_edited_by.rb +242 -0
  192. data/lib/api-sdk-rb/models/workflow_edge.rb +292 -0
  193. data/lib/api-sdk-rb/models/workflow_field_reference.rb +300 -0
  194. data/lib/api-sdk-rb/models/workflow_graph.rb +330 -0
  195. data/lib/api-sdk-rb/models/workflow_issue.rb +309 -0
  196. data/lib/api-sdk-rb/models/workflow_list.rb +271 -0
  197. data/lib/api-sdk-rb/models/workflow_node.rb +343 -0
  198. data/lib/api-sdk-rb/models/workflow_node_position.rb +238 -0
  199. data/lib/api-sdk-rb/models/workflow_preset_choice.rb +288 -0
  200. data/lib/api-sdk-rb/models/workflow_preset_choices.rb +224 -0
  201. data/lib/api-sdk-rb/models/workflow_preset_removal.rb +222 -0
  202. data/lib/api-sdk-rb/models/workflow_preset_widget.rb +234 -0
  203. data/lib/api-sdk-rb/models/workflow_publish_result.rb +256 -0
  204. data/lib/api-sdk-rb/models/workflow_removed.rb +221 -0
  205. data/lib/api-sdk-rb/models/workflow_schedule.rb +298 -0
  206. data/lib/api-sdk-rb/models/workflow_stats.rb +335 -0
  207. data/lib/api-sdk-rb/models/workflow_status.rb +42 -0
  208. data/lib/api-sdk-rb/models/workflow_trigger.rb +303 -0
  209. data/lib/api-sdk-rb/models/workflow_trigger_values_inner.rb +271 -0
  210. data/lib/api-sdk-rb/models/workflow_version.rb +316 -0
  211. data/lib/api-sdk-rb/models/workflow_version_detail.rb +354 -0
  212. data/lib/api-sdk-rb/models/workflow_version_list.rb +224 -0
  213. data/lib/api-sdk-rb/models/workflow_version_published_by.rb +225 -0
  214. data/lib/api-sdk-rb/version.rb +1 -1
  215. data/lib/api-sdk-rb.rb +88 -0
  216. data/spec/api/brand_kit_api_spec.rb +136 -0
  217. data/spec/api/compositions_api_spec.rb +86 -69
  218. data/spec/api/managed_users_api_spec.rb +1 -1
  219. data/spec/api/partner_api_spec.rb +624 -82
  220. data/spec/api/partners_api_spec.rb +56 -2
  221. data/spec/api/public_embed_api_spec.rb +54 -3
  222. data/spec/api/users_api_spec.rb +16 -1
  223. data/spec/api/workflows_api_spec.rb +378 -0
  224. data/spec/api/workspaces_api_spec.rb +339 -0
  225. data/spec/models/adapter_connection_spec.rb +18 -0
  226. data/spec/models/brand_color_spec.rb +52 -0
  227. data/spec/models/brand_font_spec.rb +62 -0
  228. data/spec/models/brand_kit_asset_view_spec.rb +120 -0
  229. data/spec/models/brand_kit_figma_source_spec.rb +60 -0
  230. data/spec/models/brand_kit_tokens_fonts_spec.rb +54 -0
  231. data/spec/models/brand_kit_tokens_spec.rb +54 -0
  232. data/spec/models/brand_kit_view_owner_spec.rb +46 -0
  233. data/spec/models/brand_kit_view_response_spec.rb +48 -0
  234. data/spec/models/brand_kit_view_spec.rb +90 -0
  235. data/spec/models/brand_spacing_spec.rb +78 -0
  236. data/spec/models/composition_last_edited_by_spec.rb +42 -0
  237. data/spec/models/composition_spec.rb +12 -0
  238. data/spec/models/confirm_adapter_connection_request_spec.rb +36 -0
  239. data/spec/models/create_widget201_response_data_spec.rb +1 -7
  240. data/spec/models/create_workspace_workflow_from_preset201_response_spec.rb +48 -0
  241. data/spec/models/create_workspace_workflow_from_preset_request_spec.rb +42 -0
  242. data/spec/models/create_workspace_workflow_request_spec.rb +48 -0
  243. data/spec/models/delete_workspace_workflow200_response_spec.rb +48 -0
  244. data/spec/models/editor_session_spec.rb +1 -1
  245. data/spec/models/get_public_composition_embed200_response_adapters_captcha_spec.rb +36 -0
  246. data/spec/models/get_public_composition_embed200_response_adapters_spec.rb +42 -0
  247. data/spec/models/get_public_composition_embed200_response_entries_spec.rb +42 -0
  248. data/spec/models/get_public_composition_embed200_response_media_spec.rb +36 -0
  249. data/spec/models/get_public_composition_embed200_response_spec.rb +18 -0
  250. data/spec/models/get_public_workflow200_response_spec.rb +48 -0
  251. data/spec/models/get_workspace_workflow_stats200_response_spec.rb +48 -0
  252. data/spec/models/get_workspace_workflow_version200_response_spec.rb +48 -0
  253. data/spec/models/list_partner_workflow_presets200_response_spec.rb +48 -0
  254. data/spec/models/list_workspace_workflow_composition_options200_response_spec.rb +48 -0
  255. data/spec/models/list_workspace_workflow_presets200_response_spec.rb +48 -0
  256. data/spec/models/list_workspace_workflow_versions200_response_spec.rb +48 -0
  257. data/spec/models/list_workspace_workflows200_response_spec.rb +48 -0
  258. data/spec/models/new_editor_session_spec.rb +1 -1
  259. data/spec/models/offer_workflow_preset_request_spec.rb +54 -0
  260. data/spec/models/offered_workflow_preset_list_spec.rb +36 -0
  261. data/spec/models/offered_workflow_preset_spec.rb +106 -0
  262. data/spec/models/offered_workflow_preset_widget_spec.rb +48 -0
  263. data/spec/models/patch_brand_kit_asset_request_spec.rb +62 -0
  264. data/spec/models/patch_brand_kit_request_fonts_spec.rb +54 -0
  265. data/spec/models/patch_brand_kit_request_spacing_spec.rb +78 -0
  266. data/spec/models/patch_brand_kit_request_spec.rb +66 -0
  267. data/spec/models/post_brand_kit_icon_request_spec.rb +42 -0
  268. data/spec/models/public_workflow_events_accepted_spec.rb +48 -0
  269. data/spec/models/public_workflow_events_request_events_inner_spec.rb +52 -0
  270. data/spec/models/public_workflow_events_request_heights_inner_spec.rb +42 -0
  271. data/spec/models/public_workflow_events_request_spec.rb +54 -0
  272. data/spec/models/public_workflow_spec.rb +94 -0
  273. data/spec/models/public_workflow_translation_spec.rb +42 -0
  274. data/spec/models/publish_workspace_workflow200_response_spec.rb +48 -0
  275. data/spec/models/publish_workspace_workflow_request_spec.rb +36 -0
  276. data/spec/models/put_brand_kit_request_spec.rb +48 -0
  277. data/spec/models/remove_partner_workflow_preset200_response_spec.rb +48 -0
  278. data/spec/models/report_public_workflow_events200_response_spec.rb +48 -0
  279. data/spec/models/save_workspace_workflow200_response_spec.rb +48 -0
  280. data/spec/models/save_workspace_workflow_request_spec.rb +54 -0
  281. data/spec/models/set_partner_workflow_preset200_response_spec.rb +48 -0
  282. data/spec/models/widget_spec.rb +1 -7
  283. data/spec/models/workflow_composition_action_spec.rb +54 -0
  284. data/spec/models/workflow_composition_field_spec.rb +58 -0
  285. data/spec/models/workflow_composition_option_actions_spec.rb +52 -0
  286. data/spec/models/workflow_composition_option_inputs_spec.rb +58 -0
  287. data/spec/models/workflow_composition_option_spec.rb +72 -0
  288. data/spec/models/workflow_composition_options_spec.rb +54 -0
  289. data/spec/models/workflow_condition_case_spec.rb +58 -0
  290. data/spec/models/workflow_condition_test_spec.rb +52 -0
  291. data/spec/models/workflow_counter_spec.rb +42 -0
  292. data/spec/models/workflow_detail_all_of_last_edited_by_spec.rb +42 -0
  293. data/spec/models/workflow_detail_spec.rb +162 -0
  294. data/spec/models/workflow_edge_spec.rb +54 -0
  295. data/spec/models/workflow_field_reference_spec.rb +56 -0
  296. data/spec/models/workflow_graph_spec.rb +52 -0
  297. data/spec/models/workflow_issue_spec.rb +70 -0
  298. data/spec/models/workflow_list_spec.rb +54 -0
  299. data/spec/models/workflow_node_position_spec.rb +42 -0
  300. data/spec/models/workflow_node_spec.rb +76 -0
  301. data/spec/models/workflow_preset_choice_spec.rb +60 -0
  302. data/spec/models/workflow_preset_choices_spec.rb +36 -0
  303. data/spec/models/workflow_preset_removal_spec.rb +36 -0
  304. data/spec/models/workflow_preset_widget_spec.rb +42 -0
  305. data/spec/models/workflow_publish_result_spec.rb +48 -0
  306. data/spec/models/workflow_removed_spec.rb +36 -0
  307. data/spec/models/workflow_schedule_spec.rb +62 -0
  308. data/spec/models/workflow_spec.rb +132 -0
  309. data/spec/models/workflow_stats_spec.rb +78 -0
  310. data/spec/models/workflow_status_spec.rb +30 -0
  311. data/spec/models/workflow_trigger_spec.rb +70 -0
  312. data/spec/models/workflow_trigger_values_inner_spec.rb +46 -0
  313. data/spec/models/workflow_version_detail_spec.rb +78 -0
  314. data/spec/models/workflow_version_list_spec.rb +36 -0
  315. data/spec/models/workflow_version_published_by_spec.rb +42 -0
  316. data/spec/models/workflow_version_spec.rb +66 -0
  317. metadata +364 -12
@@ -20,7 +20,7 @@ module ApiSdkRb
20
20
  @api_client = api_client
21
21
  end
22
22
  # Call a gateway operation of an adapter a published widget uses
23
- # The door a widget's adapter module calls, from the visitor's browser, for the operations that cannot run in the browser: anything with a secret, a charge in credits or the owner's storage behind it. A widget that uses such an adapter is handed the address of this route as `adapters.url` in its `widgetic:host` message (see the host bridge contract) and calls `{adapters.url}/{adapterId}/{operation}`. It is not meant to be called by hand, and it takes no API key. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/adapters/{adapterId}/{operation}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **What it serves.** Only an adapter, and a version of it, that the widget's LIVE manifest (what the version that is published uses) lists, and only an operation that runs on the gateway. Anything else is one 404 `ADAPTER_NOT_AVAILABLE`, whatever the reason, so the route is no way to ask what a widget contains. An adapter an administrator stopped offering to NEW widgets keeps serving the widgets that already use it. **Who may call.** The same rule as the entry route: a permitted `Origin` header, which is the artifact origin the widget runs from or a website the owner allowed (or the owner's own platform). Page script cannot forge it. A request without a permitted `Origin` is 403 `ORIGIN_NOT_ALLOWED`. A composition that is not served (unpublished, or its owner's plan does not serve it) is 404, with the codes of the other public embed routes. When the partner of the owner signs the host context, a context that is not signed as the partner requires is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`, `CONTEXT_SIGNATURE_INVALID` or `CONTEXT_SIGNATURE_EXPIRED`. **Cost and retries.** An operation priced in credits is charged to the owner of the widget (for a customer a partner manages, to the partner's administrator, within the monthly credits set for that customer), once for each `requestId`, before it runs, and given back if it does not answer. A `requestId` that was charged and not given back is 409 `REQUEST_ALREADY_USED` and the operation is NOT run a second time; one whose charge was given back may be tried again with the same `requestId`. A visitor never sees an owner's balance: a feature that cannot be used because its owner has no credits left, because the customer's monthly credits are spent, or because an administrator stopped the adapter, is the same 503 `ADAPTER_UNAVAILABLE` as every other \"not right now\". The owner is told through a notice. **Limits.** In front of everything, 120 calls a minute for each visitor address and composition and 600 a minute for a composition (429 `RATE_LIMITED`). Then, for each operation of a widget, a rate for each visitor address a minute and a cap for the widget a day: 30 and 5000 for an operation that is free, 10 and 500 for one that costs credits, unless the adapter says otherwise (never above 120 and 100000). A visitor over the rate is 429 `RATE_LIMITED`; a widget over its cap is 429 `WIDGET_LIMIT_REACHED`. Both carry a `Retry-After` header. The body is at most 64 KiB (413 `PAYLOAD_TOO_LARGE`) and JSON (415 `UNSUPPORTED_MEDIA_TYPE`); an operation has 30 seconds to answer (504 `ADAPTER_TIMEOUT`, and the charge is given back).
23
+ # The door a widget's adapter module calls, from the visitor's browser, for the operations that cannot run in the browser: anything with a secret, a charge in credits or the owner's storage behind it. A widget that uses such an adapter is handed the address of this route as `adapters.url` in its `widgetic:host` message (see the host bridge contract) and calls `{adapters.url}/{adapterId}/{operation}`. It is not meant to be called by hand, and it takes no API key. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/adapters/{adapterId}/{operation}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **What it serves.** Only an adapter, and a version of it, that the widget's LIVE manifest (what the version that is published uses) lists, and only an operation that runs on the gateway. Anything else is one 404 `ADAPTER_NOT_AVAILABLE`, whatever the reason, so the route is no way to ask what a widget contains. An adapter an administrator stopped offering to NEW widgets keeps serving the widgets that already use it. **Who may call.** The same rule as the entry route: a permitted `Origin` header, which is the artifact origin the widget runs from or any website when the owner has not restricted the allowed websites (when the owner has, one of the websites the owner listed, Widgetic's own sites, the visitor's own machine or the owner's own platform). Page script cannot forge it. A request without a permitted `Origin` is 403 `ORIGIN_NOT_ALLOWED`. A composition that is not served (unpublished, or its owner's plan does not serve it) is 404, with the codes of the other public embed routes. When the partner of the owner signs the host context, a context that is not signed as the partner requires is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`, `CONTEXT_SIGNATURE_INVALID` or `CONTEXT_SIGNATURE_EXPIRED`. **Cost and retries.** An operation priced in credits is charged to the owner of the widget (for a customer a partner manages, to the partner's administrator, within the monthly credits set for that customer), once for each `requestId`, before it runs, and given back if it does not answer. A `requestId` that was charged and not given back is 409 `REQUEST_ALREADY_USED` and the operation is NOT run a second time; one whose charge was given back may be tried again with the same `requestId`. A visitor never sees an owner's balance: a feature that cannot be used because its owner has no credits left, because the customer's monthly credits are spent, or because an administrator stopped the adapter, is the same 503 `ADAPTER_UNAVAILABLE` as every other \"not right now\". The owner is told through a notice. **Limits.** In front of everything, 120 calls a minute for each visitor address and composition and 600 a minute for a composition (429 `RATE_LIMITED`). Then, for each operation of a widget, a rate for each visitor address a minute and a cap for the widget a day: 30 and 5000 for an operation that is free, 10 and 500 for one that costs credits, unless the adapter says otherwise (never above 120 and 100000). A visitor over the rate is 429 `RATE_LIMITED`; a widget over its cap is 429 `WIDGET_LIMIT_REACHED`. Both carry a `Retry-After` header. The body is at most 64 KiB (413 `PAYLOAD_TOO_LARGE`) and JSON (415 `UNSUPPORTED_MEDIA_TYPE`); an operation has 30 seconds to answer (504 `ADAPTER_TIMEOUT`, and the charge is given back).
24
24
  # @param composition_id [String]
25
25
  # @param adapter_id [String] The id of the adapter, the name its module is known by, for example `upload`.
26
26
  # @param operation [String] The name of one operation of the adapter, as its documentation gives it.
@@ -33,7 +33,7 @@ module ApiSdkRb
33
33
  end
34
34
 
35
35
  # Call a gateway operation of an adapter a published widget uses
36
- # The door a widget's adapter module calls, from the visitor's browser, for the operations that cannot run in the browser: anything with a secret, a charge in credits or the owner's storage behind it. A widget that uses such an adapter is handed the address of this route as `adapters.url` in its `widgetic:host` message (see the host bridge contract) and calls `{adapters.url}/{adapterId}/{operation}`. It is not meant to be called by hand, and it takes no API key. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/adapters/{adapterId}/{operation}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **What it serves.** Only an adapter, and a version of it, that the widget's LIVE manifest (what the version that is published uses) lists, and only an operation that runs on the gateway. Anything else is one 404 `ADAPTER_NOT_AVAILABLE`, whatever the reason, so the route is no way to ask what a widget contains. An adapter an administrator stopped offering to NEW widgets keeps serving the widgets that already use it. **Who may call.** The same rule as the entry route: a permitted `Origin` header, which is the artifact origin the widget runs from or a website the owner allowed (or the owner's own platform). Page script cannot forge it. A request without a permitted `Origin` is 403 `ORIGIN_NOT_ALLOWED`. A composition that is not served (unpublished, or its owner's plan does not serve it) is 404, with the codes of the other public embed routes. When the partner of the owner signs the host context, a context that is not signed as the partner requires is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`, `CONTEXT_SIGNATURE_INVALID` or `CONTEXT_SIGNATURE_EXPIRED`. **Cost and retries.** An operation priced in credits is charged to the owner of the widget (for a customer a partner manages, to the partner's administrator, within the monthly credits set for that customer), once for each `requestId`, before it runs, and given back if it does not answer. A `requestId` that was charged and not given back is 409 `REQUEST_ALREADY_USED` and the operation is NOT run a second time; one whose charge was given back may be tried again with the same `requestId`. A visitor never sees an owner's balance: a feature that cannot be used because its owner has no credits left, because the customer's monthly credits are spent, or because an administrator stopped the adapter, is the same 503 `ADAPTER_UNAVAILABLE` as every other \"not right now\". The owner is told through a notice. **Limits.** In front of everything, 120 calls a minute for each visitor address and composition and 600 a minute for a composition (429 `RATE_LIMITED`). Then, for each operation of a widget, a rate for each visitor address a minute and a cap for the widget a day: 30 and 5000 for an operation that is free, 10 and 500 for one that costs credits, unless the adapter says otherwise (never above 120 and 100000). A visitor over the rate is 429 `RATE_LIMITED`; a widget over its cap is 429 `WIDGET_LIMIT_REACHED`. Both carry a `Retry-After` header. The body is at most 64 KiB (413 `PAYLOAD_TOO_LARGE`) and JSON (415 `UNSUPPORTED_MEDIA_TYPE`); an operation has 30 seconds to answer (504 `ADAPTER_TIMEOUT`, and the charge is given back).
36
+ # The door a widget's adapter module calls, from the visitor's browser, for the operations that cannot run in the browser: anything with a secret, a charge in credits or the owner's storage behind it. A widget that uses such an adapter is handed the address of this route as `adapters.url` in its `widgetic:host` message (see the host bridge contract) and calls `{adapters.url}/{adapterId}/{operation}`. It is not meant to be called by hand, and it takes no API key. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/adapters/{adapterId}/{operation}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **What it serves.** Only an adapter, and a version of it, that the widget's LIVE manifest (what the version that is published uses) lists, and only an operation that runs on the gateway. Anything else is one 404 `ADAPTER_NOT_AVAILABLE`, whatever the reason, so the route is no way to ask what a widget contains. An adapter an administrator stopped offering to NEW widgets keeps serving the widgets that already use it. **Who may call.** The same rule as the entry route: a permitted `Origin` header, which is the artifact origin the widget runs from or any website when the owner has not restricted the allowed websites (when the owner has, one of the websites the owner listed, Widgetic's own sites, the visitor's own machine or the owner's own platform). Page script cannot forge it. A request without a permitted `Origin` is 403 `ORIGIN_NOT_ALLOWED`. A composition that is not served (unpublished, or its owner's plan does not serve it) is 404, with the codes of the other public embed routes. When the partner of the owner signs the host context, a context that is not signed as the partner requires is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`, `CONTEXT_SIGNATURE_INVALID` or `CONTEXT_SIGNATURE_EXPIRED`. **Cost and retries.** An operation priced in credits is charged to the owner of the widget (for a customer a partner manages, to the partner's administrator, within the monthly credits set for that customer), once for each `requestId`, before it runs, and given back if it does not answer. A `requestId` that was charged and not given back is 409 `REQUEST_ALREADY_USED` and the operation is NOT run a second time; one whose charge was given back may be tried again with the same `requestId`. A visitor never sees an owner's balance: a feature that cannot be used because its owner has no credits left, because the customer's monthly credits are spent, or because an administrator stopped the adapter, is the same 503 `ADAPTER_UNAVAILABLE` as every other \"not right now\". The owner is told through a notice. **Limits.** In front of everything, 120 calls a minute for each visitor address and composition and 600 a minute for a composition (429 `RATE_LIMITED`). Then, for each operation of a widget, a rate for each visitor address a minute and a cap for the widget a day: 30 and 5000 for an operation that is free, 10 and 500 for one that costs credits, unless the adapter says otherwise (never above 120 and 100000). A visitor over the rate is 429 `RATE_LIMITED`; a widget over its cap is 429 `WIDGET_LIMIT_REACHED`. Both carry a `Retry-After` header. The body is at most 64 KiB (413 `PAYLOAD_TOO_LARGE`) and JSON (415 `UNSUPPORTED_MEDIA_TYPE`); an operation has 30 seconds to answer (504 `ADAPTER_TIMEOUT`, and the charge is given back).
37
37
  # @param composition_id [String]
38
38
  # @param adapter_id [String] The id of the adapter, the name its module is known by, for example `upload`.
39
39
  # @param operation [String] The name of one operation of the adapter, as its documentation gives it.
@@ -124,12 +124,13 @@ module ApiSdkRb
124
124
  end
125
125
 
126
126
  # Append a visitor entry through the gateway
127
- # Public append-only write into a published composition database. No API key. The browser must send a permitted `Origin` header (the artifact iframe origin or a website the owner allowed). When the request comes from the shared artifact origin, it must also carry the per-composition write token (`X-Widgetic-Write-Token` header or `writeToken` body field, handed to the widget in `widgetic:host` as `entries.writeToken` and returned as `entryWriteToken` on `getPublicCompositionEmbed`). Host `context` is stored for partner attribution; it is not authenticated unless the partner signs it (see **Signed context**). Request bodies are limited to 16 KB before parsing. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/entries/{table}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **Signed context.** A partner that wants to trust `context` (to bill a customer by it, say) makes a signing secret (`rotatePartnerEntryContextSecret`), and its server signs the context it hands to the embed. The signature travels inside `context` as two reserved keys, `widgetic_exp` (UTC seconds, at most seven days ahead) and `widgetic_sig`. The gateway checks them after the `Origin` and before anything else is judged, stored or announced, and keeps and announces the context WITHOUT them. A context that is not signed as the partner requires is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`, `CONTEXT_SIGNATURE_INVALID` or `CONTEXT_SIGNATURE_EXPIRED`; when the check cannot be made just now the answer is a retryable 503 `CONTEXT_SIGNATURE_UNAVAILABLE`, never an unchecked entry. Until a partner makes a secret nothing changes: the two keys are dropped and the rest is taken as it came. A signature is good until its `widgetic_exp` and may be used again until then, so a partner that must count each submission once keeps a unique value of its own (a `submissionId`, say) in the context. The recipe and a test vector are in the description of `rotatePartnerEntryContextSecret`.
127
+ # Public append-only write into a published composition database. No API key. The browser must send a permitted `Origin` header: the artifact iframe origin, or any website when the owner has not restricted the allowed websites (when the owner has, one of the websites the owner listed, Widgetic's own sites, the visitor's own machine or the owner's own platform). When the request comes from the shared artifact origin, it must also carry the per-composition write token (`X-Widgetic-Write-Token` header or `writeToken` body field, handed to the widget in `widgetic:host` as `entries.writeToken` and returned as `entryWriteToken` on `getPublicCompositionEmbed`). Host `context` is stored for partner attribution; it is not authenticated unless the partner signs it (see **Signed context**). Request bodies are limited to 16 KB before parsing. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/entries/{table}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **Signed context.** A partner that wants to trust `context` (to bill a customer by it, say) makes a signing secret (`rotatePartnerEntryContextSecret`), and its server signs the context it hands to the embed. The signature travels inside `context` as two reserved keys, `widgetic_exp` (UTC seconds, at most seven days ahead) and `widgetic_sig`. The gateway checks them after the `Origin` and before anything else is judged, stored or announced, and keeps and announces the context WITHOUT them. A context that is not signed as the partner requires is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`, `CONTEXT_SIGNATURE_INVALID` or `CONTEXT_SIGNATURE_EXPIRED`; when the check cannot be made just now the answer is a retryable 503 `CONTEXT_SIGNATURE_UNAVAILABLE`, never an unchecked entry. Until a partner makes a secret nothing changes: the two keys are dropped and the rest is taken as it came. A signature is good until its `widgetic_exp` and may be used again until then, so a partner that must count each submission once keeps a unique value of its own (a `submissionId`, say) in the context. The recipe and a test vector are in the description of `rotatePartnerEntryContextSecret`.
128
128
  # @param composition_id [String]
129
129
  # @param table [String]
130
130
  # @param public_composition_entry_request [PublicCompositionEntryRequest]
131
131
  # @param [Hash] opts the optional parameters
132
132
  # @option opts [String] :x_widgetic_write_token Signed per-composition write token handed to the widget in `widgetic:host` as `entries.writeToken` (and returned by `GET /embed/compositions/{compositionId}` as `entryWriteToken`). Required when the request comes from the shared Widgetic artifact origin; verified whenever present.
133
+ # @option opts [String] :x_widgetic_visitor_id A random id the widget's browser makes once and keeps (16 to 64 characters of `A-Za-z0-9_-`), sent so a table's per-visitor `limit` (declared in the widget database file) can count this browser. Not an identity and not a secret. Without it, or with a malformed value, the limit counts only by network address.
133
134
  # @return [PublicCompositionEntryCreated]
134
135
  def create_public_composition_entry_0(composition_id, table, public_composition_entry_request, opts = {})
135
136
  data, _status_code, _headers = create_public_composition_entry_0_with_http_info(composition_id, table, public_composition_entry_request, opts)
@@ -137,12 +138,13 @@ module ApiSdkRb
137
138
  end
138
139
 
139
140
  # Append a visitor entry through the gateway
140
- # Public append-only write into a published composition database. No API key. The browser must send a permitted `Origin` header (the artifact iframe origin or a website the owner allowed). When the request comes from the shared artifact origin, it must also carry the per-composition write token (`X-Widgetic-Write-Token` header or `writeToken` body field, handed to the widget in `widgetic:host` as `entries.writeToken` and returned as `entryWriteToken` on `getPublicCompositionEmbed`). Host `context` is stored for partner attribution; it is not authenticated unless the partner signs it (see **Signed context**). Request bodies are limited to 16 KB before parsing. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/entries/{table}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **Signed context.** A partner that wants to trust `context` (to bill a customer by it, say) makes a signing secret (`rotatePartnerEntryContextSecret`), and its server signs the context it hands to the embed. The signature travels inside `context` as two reserved keys, `widgetic_exp` (UTC seconds, at most seven days ahead) and `widgetic_sig`. The gateway checks them after the `Origin` and before anything else is judged, stored or announced, and keeps and announces the context WITHOUT them. A context that is not signed as the partner requires is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`, `CONTEXT_SIGNATURE_INVALID` or `CONTEXT_SIGNATURE_EXPIRED`; when the check cannot be made just now the answer is a retryable 503 `CONTEXT_SIGNATURE_UNAVAILABLE`, never an unchecked entry. Until a partner makes a secret nothing changes: the two keys are dropped and the rest is taken as it came. A signature is good until its `widgetic_exp` and may be used again until then, so a partner that must count each submission once keeps a unique value of its own (a `submissionId`, say) in the context. The recipe and a test vector are in the description of `rotatePartnerEntryContextSecret`.
141
+ # Public append-only write into a published composition database. No API key. The browser must send a permitted `Origin` header: the artifact iframe origin, or any website when the owner has not restricted the allowed websites (when the owner has, one of the websites the owner listed, Widgetic's own sites, the visitor's own machine or the owner's own platform). When the request comes from the shared artifact origin, it must also carry the per-composition write token (`X-Widgetic-Write-Token` header or `writeToken` body field, handed to the widget in `widgetic:host` as `entries.writeToken` and returned as `entryWriteToken` on `getPublicCompositionEmbed`). Host `context` is stored for partner attribution; it is not authenticated unless the partner signs it (see **Signed context**). Request bodies are limited to 16 KB before parsing. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/entries/{table}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **Signed context.** A partner that wants to trust `context` (to bill a customer by it, say) makes a signing secret (`rotatePartnerEntryContextSecret`), and its server signs the context it hands to the embed. The signature travels inside `context` as two reserved keys, `widgetic_exp` (UTC seconds, at most seven days ahead) and `widgetic_sig`. The gateway checks them after the `Origin` and before anything else is judged, stored or announced, and keeps and announces the context WITHOUT them. A context that is not signed as the partner requires is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`, `CONTEXT_SIGNATURE_INVALID` or `CONTEXT_SIGNATURE_EXPIRED`; when the check cannot be made just now the answer is a retryable 503 `CONTEXT_SIGNATURE_UNAVAILABLE`, never an unchecked entry. Until a partner makes a secret nothing changes: the two keys are dropped and the rest is taken as it came. A signature is good until its `widgetic_exp` and may be used again until then, so a partner that must count each submission once keeps a unique value of its own (a `submissionId`, say) in the context. The recipe and a test vector are in the description of `rotatePartnerEntryContextSecret`.
141
142
  # @param composition_id [String]
142
143
  # @param table [String]
143
144
  # @param public_composition_entry_request [PublicCompositionEntryRequest]
144
145
  # @param [Hash] opts the optional parameters
145
146
  # @option opts [String] :x_widgetic_write_token Signed per-composition write token handed to the widget in `widgetic:host` as `entries.writeToken` (and returned by `GET /embed/compositions/{compositionId}` as `entryWriteToken`). Required when the request comes from the shared Widgetic artifact origin; verified whenever present.
147
+ # @option opts [String] :x_widgetic_visitor_id A random id the widget's browser makes once and keeps (16 to 64 characters of `A-Za-z0-9_-`), sent so a table's per-visitor `limit` (declared in the widget database file) can count this browser. Not an identity and not a secret. Without it, or with a malformed value, the limit counts only by network address.
146
148
  # @return [Array<(PublicCompositionEntryCreated, Integer, Hash)>] PublicCompositionEntryCreated data, response status code and response headers
147
149
  def create_public_composition_entry_0_with_http_info(composition_id, table, public_composition_entry_request, opts = {})
148
150
  if @api_client.config.debugging
@@ -160,6 +162,11 @@ module ApiSdkRb
160
162
  if @api_client.config.client_side_validation && public_composition_entry_request.nil?
161
163
  fail ArgumentError, "Missing the required parameter 'public_composition_entry_request' when calling PublicEmbedApi.create_public_composition_entry_0"
162
164
  end
165
+ pattern = Regexp.new(/^[A-Za-z0-9_-]{16,64}$/)
166
+ if @api_client.config.client_side_validation && !opts[:'x_widgetic_visitor_id'].nil? && opts[:'x_widgetic_visitor_id'] !~ pattern
167
+ fail ArgumentError, "invalid value for 'opts[:\"x_widgetic_visitor_id\"]' when calling PublicEmbedApi.create_public_composition_entry_0, must conform to the pattern #{pattern}."
168
+ end
169
+
163
170
  # resource path
164
171
  local_var_path = '/embed/compositions/{compositionId}/entries/{table}'.sub('{' + 'compositionId' + '}', CGI.escape(composition_id.to_s)).sub('{' + 'table' + '}', CGI.escape(table.to_s))
165
172
 
@@ -176,6 +183,7 @@ module ApiSdkRb
176
183
  header_params['Content-Type'] = content_type
177
184
  end
178
185
  header_params[:'X-Widgetic-Write-Token'] = opts[:'x_widgetic_write_token'] if !opts[:'x_widgetic_write_token'].nil?
186
+ header_params[:'X-Widgetic-Visitor-Id'] = opts[:'x_widgetic_visitor_id'] if !opts[:'x_widgetic_visitor_id'].nil?
179
187
 
180
188
  # form parameters
181
189
  form_params = opts[:form_params] || {}
@@ -332,6 +340,201 @@ module ApiSdkRb
332
340
  return data, status_code, headers
333
341
  end
334
342
 
343
+ # Read the published Workflow of an embed
344
+ # Public read of a workflow for the embed that carries `workflow-id`. No API key. The answer is the live version (its graph, the composition a new visitor starts on, the time zone, the languages its compositions can be shown in, and the token that lets the browser report counts), or `status: paused` with nothing else, in which case the embed shows only its first composition. A workflow that is a draft, archived or unknown answers 404, and the embed then behaves as a plain embed of its `composition-id`. So does a workflow whose owner is not being served (a plan that lapsed, a partner whose agreement is not in force): the answer is the one the compositions of that owner give. **Address.** `https://api.widgetic.com/embed/workflows/{workflowId}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. The answer may be reused for a few seconds (`Cache-Control: public, max-age=15`), so a publish or a pause reaches visitors within moments. The graph is readable by anyone who has the workflow's id: its rules run in the visitor's browser, so a rule must never hold a secret.
345
+ # @param workflow_id [String]
346
+ # @param [Hash] opts the optional parameters
347
+ # @return [GetPublicWorkflow200Response]
348
+ def get_public_workflow_0(workflow_id, opts = {})
349
+ data, _status_code, _headers = get_public_workflow_0_with_http_info(workflow_id, opts)
350
+ data
351
+ end
352
+
353
+ # Read the published Workflow of an embed
354
+ # Public read of a workflow for the embed that carries &#x60;workflow-id&#x60;. No API key. The answer is the live version (its graph, the composition a new visitor starts on, the time zone, the languages its compositions can be shown in, and the token that lets the browser report counts), or &#x60;status: paused&#x60; with nothing else, in which case the embed shows only its first composition. A workflow that is a draft, archived or unknown answers 404, and the embed then behaves as a plain embed of its &#x60;composition-id&#x60;. So does a workflow whose owner is not being served (a plan that lapsed, a partner whose agreement is not in force): the answer is the one the compositions of that owner give. **Address.** &#x60;https://api.widgetic.com/embed/workflows/{workflowId}&#x60;: the root of the API host, NOT under &#x60;/v1&#x60;. A client generated from this description for &#x60;https://api.widgetic.com/v1&#x60; must be given the base address &#x60;https://api.widgetic.com&#x60; for the calls of the &#x60;Public Embed&#x60; tag. The answer may be reused for a few seconds (&#x60;Cache-Control: public, max-age&#x3D;15&#x60;), so a publish or a pause reaches visitors within moments. The graph is readable by anyone who has the workflow&#39;s id: its rules run in the visitor&#39;s browser, so a rule must never hold a secret.
355
+ # @param workflow_id [String]
356
+ # @param [Hash] opts the optional parameters
357
+ # @return [Array<(GetPublicWorkflow200Response, Integer, Hash)>] GetPublicWorkflow200Response data, response status code and response headers
358
+ def get_public_workflow_0_with_http_info(workflow_id, opts = {})
359
+ if @api_client.config.debugging
360
+ @api_client.config.logger.debug 'Calling API: PublicEmbedApi.get_public_workflow_0 ...'
361
+ end
362
+ # verify the required parameter 'workflow_id' is set
363
+ if @api_client.config.client_side_validation && workflow_id.nil?
364
+ fail ArgumentError, "Missing the required parameter 'workflow_id' when calling PublicEmbedApi.get_public_workflow_0"
365
+ end
366
+ # resource path
367
+ local_var_path = '/embed/workflows/{workflowId}'.sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s))
368
+
369
+ # query parameters
370
+ query_params = opts[:query_params] || {}
371
+
372
+ # header parameters
373
+ header_params = opts[:header_params] || {}
374
+ # HTTP header 'Accept' (if needed)
375
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
376
+
377
+ # form parameters
378
+ form_params = opts[:form_params] || {}
379
+
380
+ # http body (model)
381
+ post_body = opts[:debug_body]
382
+
383
+ # return_type
384
+ return_type = opts[:debug_return_type] || 'GetPublicWorkflow200Response'
385
+
386
+ # auth_names
387
+ auth_names = opts[:debug_auth_names] || []
388
+
389
+ new_options = opts.merge(
390
+ :operation => :"PublicEmbedApi.get_public_workflow_0",
391
+ :header_params => header_params,
392
+ :query_params => query_params,
393
+ :form_params => form_params,
394
+ :body => post_body,
395
+ :auth_names => auth_names,
396
+ :return_type => return_type
397
+ )
398
+
399
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
400
+ if @api_client.config.debugging
401
+ @api_client.config.logger.debug "API called: PublicEmbedApi#get_public_workflow_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
402
+ end
403
+ return data, status_code, headers
404
+ end
405
+
406
+ # Show a published Workflow in a page of its own
407
+ # A page that runs a published workflow, for a place that can only be given an address or an iframe: a chat messenger, a link page, a site builder, a blog that follows oEmbed. No API key, no SDK to add. The page holds the Embed SDK and the same tag a website carries (`<widgetic workflow-id composition-id>`), so a visitor moves from one composition to the next in place, by the same rules, exactly as on a website. A paused workflow shows its first composition alone, as its embeds do. **What the frame can count.** Only what happens inside it: entries, a widget's goals and actions, and waits. The page events a website can send to a workflow (`widgetic:workflow-event`) are events of the page around the embed, and they do not cross an iframe, so a connection that waits for one never fires from a frame. A workflow that is a draft, is archived, or does not exist, and one whose owner is not being served, answers 404 with a short page that gives no reason. If the owner of the workflow's first composition listed the websites it may appear on, the page is sent with `Content-Security-Policy: frame-ancestors` naming those websites (and Widgetic's own), so a browser refuses to show it inside any other website. Opening the address directly still works. An owner who listed nothing is not restricted. The page links its oEmbed card, so a site that follows oEmbed turns the address of the frame into an embed. **Address.** `https://api.widgetic.com/embed/workflows/{workflowId}/frame`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag.
408
+ # @param workflow_id [String]
409
+ # @param [Hash] opts the optional parameters
410
+ # @return [String]
411
+ def get_public_workflow_frame_0(workflow_id, opts = {})
412
+ data, _status_code, _headers = get_public_workflow_frame_0_with_http_info(workflow_id, opts)
413
+ data
414
+ end
415
+
416
+ # Show a published Workflow in a page of its own
417
+ # A page that runs a published workflow, for a place that can only be given an address or an iframe: a chat messenger, a link page, a site builder, a blog that follows oEmbed. No API key, no SDK to add. The page holds the Embed SDK and the same tag a website carries (&#x60;&lt;widgetic workflow-id composition-id&gt;&#x60;), so a visitor moves from one composition to the next in place, by the same rules, exactly as on a website. A paused workflow shows its first composition alone, as its embeds do. **What the frame can count.** Only what happens inside it: entries, a widget&#39;s goals and actions, and waits. The page events a website can send to a workflow (&#x60;widgetic:workflow-event&#x60;) are events of the page around the embed, and they do not cross an iframe, so a connection that waits for one never fires from a frame. A workflow that is a draft, is archived, or does not exist, and one whose owner is not being served, answers 404 with a short page that gives no reason. If the owner of the workflow&#39;s first composition listed the websites it may appear on, the page is sent with &#x60;Content-Security-Policy: frame-ancestors&#x60; naming those websites (and Widgetic&#39;s own), so a browser refuses to show it inside any other website. Opening the address directly still works. An owner who listed nothing is not restricted. The page links its oEmbed card, so a site that follows oEmbed turns the address of the frame into an embed. **Address.** &#x60;https://api.widgetic.com/embed/workflows/{workflowId}/frame&#x60;: the root of the API host, NOT under &#x60;/v1&#x60;. A client generated from this description for &#x60;https://api.widgetic.com/v1&#x60; must be given the base address &#x60;https://api.widgetic.com&#x60; for the calls of the &#x60;Public Embed&#x60; tag.
418
+ # @param workflow_id [String]
419
+ # @param [Hash] opts the optional parameters
420
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
421
+ def get_public_workflow_frame_0_with_http_info(workflow_id, opts = {})
422
+ if @api_client.config.debugging
423
+ @api_client.config.logger.debug 'Calling API: PublicEmbedApi.get_public_workflow_frame_0 ...'
424
+ end
425
+ # verify the required parameter 'workflow_id' is set
426
+ if @api_client.config.client_side_validation && workflow_id.nil?
427
+ fail ArgumentError, "Missing the required parameter 'workflow_id' when calling PublicEmbedApi.get_public_workflow_frame_0"
428
+ end
429
+ # resource path
430
+ local_var_path = '/embed/workflows/{workflowId}/frame'.sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s))
431
+
432
+ # query parameters
433
+ query_params = opts[:query_params] || {}
434
+
435
+ # header parameters
436
+ header_params = opts[:header_params] || {}
437
+ # HTTP header 'Accept' (if needed)
438
+ header_params['Accept'] = @api_client.select_header_accept(['text/html', 'application/json']) unless header_params['Accept']
439
+
440
+ # form parameters
441
+ form_params = opts[:form_params] || {}
442
+
443
+ # http body (model)
444
+ post_body = opts[:debug_body]
445
+
446
+ # return_type
447
+ return_type = opts[:debug_return_type] || 'String'
448
+
449
+ # auth_names
450
+ auth_names = opts[:debug_auth_names] || []
451
+
452
+ new_options = opts.merge(
453
+ :operation => :"PublicEmbedApi.get_public_workflow_frame_0",
454
+ :header_params => header_params,
455
+ :query_params => query_params,
456
+ :form_params => form_params,
457
+ :body => post_body,
458
+ :auth_names => auth_names,
459
+ :return_type => return_type
460
+ )
461
+
462
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
463
+ if @api_client.config.debugging
464
+ @api_client.config.logger.debug "API called: PublicEmbedApi#get_public_workflow_frame_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
465
+ end
466
+ return data, status_code, headers
467
+ end
468
+
469
+ # Read one published version of a Workflow
470
+ # Public read of one version of a workflow, for a visitor who started on it before a newer one was published: they finish on the version they started on (for up to 30 days; after that they get the latest). The graph of a version never changes once published; the languages its compositions can be shown in (`translations`) are read each time, as for the live version. Like the read of the live version, it answers `status: paused` with nothing else while the workflow is paused, and 404 when the workflow is a draft or archived, or has no such version. **Address.** `https://api.widgetic.com/embed/workflows/{workflowId}/versions/{versionId}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag.
471
+ # @param workflow_id [String]
472
+ # @param version_id [String]
473
+ # @param [Hash] opts the optional parameters
474
+ # @return [GetPublicWorkflow200Response]
475
+ def get_public_workflow_version_0(workflow_id, version_id, opts = {})
476
+ data, _status_code, _headers = get_public_workflow_version_0_with_http_info(workflow_id, version_id, opts)
477
+ data
478
+ end
479
+
480
+ # Read one published version of a Workflow
481
+ # Public read of one version of a workflow, for a visitor who started on it before a newer one was published: they finish on the version they started on (for up to 30 days; after that they get the latest). The graph of a version never changes once published; the languages its compositions can be shown in (&#x60;translations&#x60;) are read each time, as for the live version. Like the read of the live version, it answers &#x60;status: paused&#x60; with nothing else while the workflow is paused, and 404 when the workflow is a draft or archived, or has no such version. **Address.** &#x60;https://api.widgetic.com/embed/workflows/{workflowId}/versions/{versionId}&#x60;: the root of the API host, NOT under &#x60;/v1&#x60;. A client generated from this description for &#x60;https://api.widgetic.com/v1&#x60; must be given the base address &#x60;https://api.widgetic.com&#x60; for the calls of the &#x60;Public Embed&#x60; tag.
482
+ # @param workflow_id [String]
483
+ # @param version_id [String]
484
+ # @param [Hash] opts the optional parameters
485
+ # @return [Array<(GetPublicWorkflow200Response, Integer, Hash)>] GetPublicWorkflow200Response data, response status code and response headers
486
+ def get_public_workflow_version_0_with_http_info(workflow_id, version_id, opts = {})
487
+ if @api_client.config.debugging
488
+ @api_client.config.logger.debug 'Calling API: PublicEmbedApi.get_public_workflow_version_0 ...'
489
+ end
490
+ # verify the required parameter 'workflow_id' is set
491
+ if @api_client.config.client_side_validation && workflow_id.nil?
492
+ fail ArgumentError, "Missing the required parameter 'workflow_id' when calling PublicEmbedApi.get_public_workflow_version_0"
493
+ end
494
+ # verify the required parameter 'version_id' is set
495
+ if @api_client.config.client_side_validation && version_id.nil?
496
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling PublicEmbedApi.get_public_workflow_version_0"
497
+ end
498
+ # resource path
499
+ local_var_path = '/embed/workflows/{workflowId}/versions/{versionId}'.sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s)).sub('{' + 'versionId' + '}', CGI.escape(version_id.to_s))
500
+
501
+ # query parameters
502
+ query_params = opts[:query_params] || {}
503
+
504
+ # header parameters
505
+ header_params = opts[:header_params] || {}
506
+ # HTTP header 'Accept' (if needed)
507
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
508
+
509
+ # form parameters
510
+ form_params = opts[:form_params] || {}
511
+
512
+ # http body (model)
513
+ post_body = opts[:debug_body]
514
+
515
+ # return_type
516
+ return_type = opts[:debug_return_type] || 'GetPublicWorkflow200Response'
517
+
518
+ # auth_names
519
+ auth_names = opts[:debug_auth_names] || []
520
+
521
+ new_options = opts.merge(
522
+ :operation => :"PublicEmbedApi.get_public_workflow_version_0",
523
+ :header_params => header_params,
524
+ :query_params => query_params,
525
+ :form_params => form_params,
526
+ :body => post_body,
527
+ :auth_names => auth_names,
528
+ :return_type => return_type
529
+ )
530
+
531
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
532
+ if @api_client.config.debugging
533
+ @api_client.config.logger.debug "API called: PublicEmbedApi#get_public_workflow_version_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
534
+ end
535
+ return data, status_code, headers
536
+ end
537
+
335
538
  # Batch-check whether compositions are currently served for embed
336
539
  # Public batch health check for embed-sdk.js. No API key. Uses the same serving gate and domain policy as `GET /embed/compositions/{compositionId}`: the caller's website is read from `Origin`, or the host of `Referer` when there is no `Origin`. A request that names neither (a server or tool) is not refused for domain reasons. **Address.** `https://api.widgetic.com/embed/compositions/status`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **Limit.** The route counts against the same limit as the lookup and the frame routes: 500 calls for each visitor address and browser in one counting window. A call is ONE hit whatever the number of `ids` it carries (up to 100), so a server that checks many compositions spends one call for each hundred of them. A visitor who is over the limit gets 429 `RATE_LIMITED` for the WHOLE call, with a `Retry-After` header and no state for any id: there is no per-composition rate-limit state in the answer.
337
540
  # @param post_public_composition_embed_status_request [PostPublicCompositionEmbedStatusRequest]
@@ -400,8 +603,82 @@ module ApiSdkRb
400
603
  return data, status_code, headers
401
604
  end
402
605
 
606
+ # Report what visitors did in a Workflow, as counts
607
+ # Public report of counts for a workflow, sent by the embed. No API key. Each event is one id and a number: a visitor reached a block (`n`), took a connection (`e`), or could not be moved on (`f`). Nothing else is kept: no visitor, no value a visitor typed, no address. A batch carries at most 100 events and 16 KB. The same report may carry `heights`: how tall a step settled at in the browser, which the embed code of the workflow uses to start its box at a real height (a composition, a whole number of pixels, nothing about the visitor). A report is accepted only with the `token` the workflow's own read handed out for that `versionId`, so a page that never read the workflow cannot raise its numbers. An expired token (`EVENT_TOKEN_EXPIRED`) is refused with 401: read the workflow again for a new one. Counts for ids that are not in that version, or for a workflow that is not live, are not recorded and the answer says so (`recorded: false`) with 200: the visitor's page has nothing to fix. The body is JSON, sent as `application/json` or as `text/plain` (a \"simple\" cross-origin request, which is what lets a report leave a page that is being closed). **Address.** `https://api.widgetic.com/embed/workflows/{workflowId}/events`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag.
608
+ # @param workflow_id [String]
609
+ # @param public_workflow_events_request [PublicWorkflowEventsRequest]
610
+ # @param [Hash] opts the optional parameters
611
+ # @return [ReportPublicWorkflowEvents200Response]
612
+ def report_public_workflow_events_0(workflow_id, public_workflow_events_request, opts = {})
613
+ data, _status_code, _headers = report_public_workflow_events_0_with_http_info(workflow_id, public_workflow_events_request, opts)
614
+ data
615
+ end
616
+
617
+ # Report what visitors did in a Workflow, as counts
618
+ # Public report of counts for a workflow, sent by the embed. No API key. Each event is one id and a number: a visitor reached a block (&#x60;n&#x60;), took a connection (&#x60;e&#x60;), or could not be moved on (&#x60;f&#x60;). Nothing else is kept: no visitor, no value a visitor typed, no address. A batch carries at most 100 events and 16 KB. The same report may carry &#x60;heights&#x60;: how tall a step settled at in the browser, which the embed code of the workflow uses to start its box at a real height (a composition, a whole number of pixels, nothing about the visitor). A report is accepted only with the &#x60;token&#x60; the workflow&#39;s own read handed out for that &#x60;versionId&#x60;, so a page that never read the workflow cannot raise its numbers. An expired token (&#x60;EVENT_TOKEN_EXPIRED&#x60;) is refused with 401: read the workflow again for a new one. Counts for ids that are not in that version, or for a workflow that is not live, are not recorded and the answer says so (&#x60;recorded: false&#x60;) with 200: the visitor&#39;s page has nothing to fix. The body is JSON, sent as &#x60;application/json&#x60; or as &#x60;text/plain&#x60; (a \&quot;simple\&quot; cross-origin request, which is what lets a report leave a page that is being closed). **Address.** &#x60;https://api.widgetic.com/embed/workflows/{workflowId}/events&#x60;: the root of the API host, NOT under &#x60;/v1&#x60;. A client generated from this description for &#x60;https://api.widgetic.com/v1&#x60; must be given the base address &#x60;https://api.widgetic.com&#x60; for the calls of the &#x60;Public Embed&#x60; tag.
619
+ # @param workflow_id [String]
620
+ # @param public_workflow_events_request [PublicWorkflowEventsRequest]
621
+ # @param [Hash] opts the optional parameters
622
+ # @return [Array<(ReportPublicWorkflowEvents200Response, Integer, Hash)>] ReportPublicWorkflowEvents200Response data, response status code and response headers
623
+ def report_public_workflow_events_0_with_http_info(workflow_id, public_workflow_events_request, opts = {})
624
+ if @api_client.config.debugging
625
+ @api_client.config.logger.debug 'Calling API: PublicEmbedApi.report_public_workflow_events_0 ...'
626
+ end
627
+ # verify the required parameter 'workflow_id' is set
628
+ if @api_client.config.client_side_validation && workflow_id.nil?
629
+ fail ArgumentError, "Missing the required parameter 'workflow_id' when calling PublicEmbedApi.report_public_workflow_events_0"
630
+ end
631
+ # verify the required parameter 'public_workflow_events_request' is set
632
+ if @api_client.config.client_side_validation && public_workflow_events_request.nil?
633
+ fail ArgumentError, "Missing the required parameter 'public_workflow_events_request' when calling PublicEmbedApi.report_public_workflow_events_0"
634
+ end
635
+ # resource path
636
+ local_var_path = '/embed/workflows/{workflowId}/events'.sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s))
637
+
638
+ # query parameters
639
+ query_params = opts[:query_params] || {}
640
+
641
+ # header parameters
642
+ header_params = opts[:header_params] || {}
643
+ # HTTP header 'Accept' (if needed)
644
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
645
+ # HTTP header 'Content-Type'
646
+ content_type = @api_client.select_header_content_type(['application/json', 'text/plain'])
647
+ if !content_type.nil?
648
+ header_params['Content-Type'] = content_type
649
+ end
650
+
651
+ # form parameters
652
+ form_params = opts[:form_params] || {}
653
+
654
+ # http body (model)
655
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(public_workflow_events_request)
656
+
657
+ # return_type
658
+ return_type = opts[:debug_return_type] || 'ReportPublicWorkflowEvents200Response'
659
+
660
+ # auth_names
661
+ auth_names = opts[:debug_auth_names] || []
662
+
663
+ new_options = opts.merge(
664
+ :operation => :"PublicEmbedApi.report_public_workflow_events_0",
665
+ :header_params => header_params,
666
+ :query_params => query_params,
667
+ :form_params => form_params,
668
+ :body => post_body,
669
+ :auth_names => auth_names,
670
+ :return_type => return_type
671
+ )
672
+
673
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
674
+ if @api_client.config.debugging
675
+ @api_client.config.logger.debug "API called: PublicEmbedApi#report_public_workflow_events_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
676
+ end
677
+ return data, status_code, headers
678
+ end
679
+
403
680
  # Send the file a visitor chose through the upload adapter of a published widget
404
- # The second of the two calls the `upload` adapter's module makes from the visitor's browser (the first, the `begin-upload` operation of `callPublicCompositionAdapter`, answers with the ticket this route takes). The module sends the file itself, as the body, with its media type as the `Content-Type`. It is not meant to be called by hand, and it takes no API key. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/adapters/upload/files/{ticket}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **The ticket.** Single-use and valid for ten minutes, given for one file: its name, its media type and its exact size are what the visitor said when the ticket was asked for, after the widget's owner's settings (the kinds of file they take, the largest size) were applied. The `Content-Type` and the `Content-Length` of this request must be those, and the body must be exactly that many bytes (400 `UPLOAD_FILE_CHANGED` otherwise). The gateway never believes the type it was told: the first bytes of the file must be a file of that type and one the owner accepts (422 otherwise). A ticket whose file was stored and is sent again is answered with the same file, so a visitor whose connection dropped after the file landed does not store it twice; a ticket whose attempt failed is spent, and the module asks for a new one. **What it stores.** The file goes to the widget owner's storage: Widgetic's, or the partner's own bucket for a widget of a customer a partner manages. It counts against the owner's storage allowance and is filed in the folder the owner chose, as a file sent by a visitor, which the owner's own file list leaves out. A full allowance, a partner's storage that cannot be used and a stopped feature are all the same 503 `UPLOAD_UNAVAILABLE` to a visitor, and the owner is told through a notice. **Who may call.** The same rule as the entry route: a permitted `Origin` header, which is the artifact origin the widget runs from or a website the owner allowed (or the owner's own platform). A request without a permitted `Origin` is 403 `ORIGIN_NOT_ALLOWED`. A composition that is not served (unpublished, or its owner's plan does not serve it) is 404, with the codes of the other public embed routes. **Limits.** 30 requests a minute for each visitor address and composition and 240 a minute for a composition (429 `RATE_LIMITED`, with a `Retry-After` header); at most 10 MB for a file, and only so many files held in memory at once on each gateway process (503 `UPLOAD_BUSY`, with a `Retry-After`). A file that does not arrive within two minutes is 408 `UPLOAD_TIMEOUT`. Every answer but a success closes the connection, so a client that is refused before it has sent the file reads the answer and stops.
681
+ # The second of the two calls the `upload` adapter's module makes from the visitor's browser (the first, the `begin-upload` operation of `callPublicCompositionAdapter`, answers with the ticket this route takes). The module sends the file itself, as the body, with its media type as the `Content-Type`. It is not meant to be called by hand, and it takes no API key. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/adapters/upload/files/{ticket}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **The ticket.** Single-use and valid for ten minutes, given for one file: its name, its media type and its exact size are what the visitor said when the ticket was asked for, after the widget's owner's settings (the kinds of file they take, the largest size) were applied. The `Content-Type` and the `Content-Length` of this request must be those, and the body must be exactly that many bytes (400 `UPLOAD_FILE_CHANGED` otherwise). The gateway never believes the type it was told: the first bytes of the file must be a file of that type and one the owner accepts (422 otherwise). A ticket whose file was stored and is sent again is answered with the same file, so a visitor whose connection dropped after the file landed does not store it twice; a ticket whose attempt failed is spent, and the module asks for a new one. **The virus check.** Before anything is stored, the file is checked for viruses, wherever it would be kept (Widgetic's storage or a partner's own bucket). A file that fails the check is refused with 422 `UPLOAD_FILE_UNSAFE` and nothing is stored. When the check cannot be done, nothing is stored either, and the answer is the same neutral 503 `UPLOAD_UNAVAILABLE` as for any other cause the visitor is not told. The ticket of a refused file is spent. **What it stores.** The file goes to the widget owner's storage: Widgetic's, or the partner's own bucket for a widget of a customer a partner manages. It counts against the owner's storage allowance and is filed in the folder the owner chose, as a file sent by a visitor, which the owner's own file list leaves out. A full allowance, a partner's storage that cannot be used and a stopped feature are all the same 503 `UPLOAD_UNAVAILABLE` to a visitor, and the owner is told through a notice. **Who may call.** The same rule as the entry route: a permitted `Origin` header, which is the artifact origin the widget runs from or any website when the owner has not restricted the allowed websites (when the owner has, one of the websites the owner listed, Widgetic's own sites, the visitor's own machine or the owner's own platform). A request without a permitted `Origin` is 403 `ORIGIN_NOT_ALLOWED`. A composition that is not served (unpublished, or its owner's plan does not serve it) is 404, with the codes of the other public embed routes. **Limits.** 30 requests a minute for each visitor address and composition and 240 a minute for a composition (429 `RATE_LIMITED`, with a `Retry-After` header); at most 10 MB for a file, and only so many files held in memory at once on each gateway process (503 `UPLOAD_BUSY`, with a `Retry-After`). A file that does not arrive within two minutes is 408 `UPLOAD_TIMEOUT`. Every answer but a success closes the connection, so a client that is refused before it has sent the file reads the answer and stops.
405
682
  # @param composition_id [String]
406
683
  # @param ticket [String] The ticket the &#x60;begin-upload&#x60; operation answered with.
407
684
  # @param body [File]
@@ -413,7 +690,7 @@ module ApiSdkRb
413
690
  end
414
691
 
415
692
  # Send the file a visitor chose through the upload adapter of a published widget
416
- # The second of the two calls the &#x60;upload&#x60; adapter&#39;s module makes from the visitor&#39;s browser (the first, the &#x60;begin-upload&#x60; operation of &#x60;callPublicCompositionAdapter&#x60;, answers with the ticket this route takes). The module sends the file itself, as the body, with its media type as the &#x60;Content-Type&#x60;. It is not meant to be called by hand, and it takes no API key. **Address.** &#x60;https://api.widgetic.com/embed/compositions/{compositionId}/adapters/upload/files/{ticket}&#x60;: the root of the API host, NOT under &#x60;/v1&#x60;. A client generated from this description for &#x60;https://api.widgetic.com/v1&#x60; must be given the base address &#x60;https://api.widgetic.com&#x60; for the calls of the &#x60;Public Embed&#x60; tag. **The ticket.** Single-use and valid for ten minutes, given for one file: its name, its media type and its exact size are what the visitor said when the ticket was asked for, after the widget&#39;s owner&#39;s settings (the kinds of file they take, the largest size) were applied. The &#x60;Content-Type&#x60; and the &#x60;Content-Length&#x60; of this request must be those, and the body must be exactly that many bytes (400 &#x60;UPLOAD_FILE_CHANGED&#x60; otherwise). The gateway never believes the type it was told: the first bytes of the file must be a file of that type and one the owner accepts (422 otherwise). A ticket whose file was stored and is sent again is answered with the same file, so a visitor whose connection dropped after the file landed does not store it twice; a ticket whose attempt failed is spent, and the module asks for a new one. **What it stores.** The file goes to the widget owner&#39;s storage: Widgetic&#39;s, or the partner&#39;s own bucket for a widget of a customer a partner manages. It counts against the owner&#39;s storage allowance and is filed in the folder the owner chose, as a file sent by a visitor, which the owner&#39;s own file list leaves out. A full allowance, a partner&#39;s storage that cannot be used and a stopped feature are all the same 503 &#x60;UPLOAD_UNAVAILABLE&#x60; to a visitor, and the owner is told through a notice. **Who may call.** The same rule as the entry route: a permitted &#x60;Origin&#x60; header, which is the artifact origin the widget runs from or a website the owner allowed (or the owner&#39;s own platform). A request without a permitted &#x60;Origin&#x60; is 403 &#x60;ORIGIN_NOT_ALLOWED&#x60;. A composition that is not served (unpublished, or its owner&#39;s plan does not serve it) is 404, with the codes of the other public embed routes. **Limits.** 30 requests a minute for each visitor address and composition and 240 a minute for a composition (429 &#x60;RATE_LIMITED&#x60;, with a &#x60;Retry-After&#x60; header); at most 10 MB for a file, and only so many files held in memory at once on each gateway process (503 &#x60;UPLOAD_BUSY&#x60;, with a &#x60;Retry-After&#x60;). A file that does not arrive within two minutes is 408 &#x60;UPLOAD_TIMEOUT&#x60;. Every answer but a success closes the connection, so a client that is refused before it has sent the file reads the answer and stops.
693
+ # The second of the two calls the &#x60;upload&#x60; adapter&#39;s module makes from the visitor&#39;s browser (the first, the &#x60;begin-upload&#x60; operation of &#x60;callPublicCompositionAdapter&#x60;, answers with the ticket this route takes). The module sends the file itself, as the body, with its media type as the &#x60;Content-Type&#x60;. It is not meant to be called by hand, and it takes no API key. **Address.** &#x60;https://api.widgetic.com/embed/compositions/{compositionId}/adapters/upload/files/{ticket}&#x60;: the root of the API host, NOT under &#x60;/v1&#x60;. A client generated from this description for &#x60;https://api.widgetic.com/v1&#x60; must be given the base address &#x60;https://api.widgetic.com&#x60; for the calls of the &#x60;Public Embed&#x60; tag. **The ticket.** Single-use and valid for ten minutes, given for one file: its name, its media type and its exact size are what the visitor said when the ticket was asked for, after the widget&#39;s owner&#39;s settings (the kinds of file they take, the largest size) were applied. The &#x60;Content-Type&#x60; and the &#x60;Content-Length&#x60; of this request must be those, and the body must be exactly that many bytes (400 &#x60;UPLOAD_FILE_CHANGED&#x60; otherwise). The gateway never believes the type it was told: the first bytes of the file must be a file of that type and one the owner accepts (422 otherwise). A ticket whose file was stored and is sent again is answered with the same file, so a visitor whose connection dropped after the file landed does not store it twice; a ticket whose attempt failed is spent, and the module asks for a new one. **The virus check.** Before anything is stored, the file is checked for viruses, wherever it would be kept (Widgetic&#39;s storage or a partner&#39;s own bucket). A file that fails the check is refused with 422 &#x60;UPLOAD_FILE_UNSAFE&#x60; and nothing is stored. When the check cannot be done, nothing is stored either, and the answer is the same neutral 503 &#x60;UPLOAD_UNAVAILABLE&#x60; as for any other cause the visitor is not told. The ticket of a refused file is spent. **What it stores.** The file goes to the widget owner&#39;s storage: Widgetic&#39;s, or the partner&#39;s own bucket for a widget of a customer a partner manages. It counts against the owner&#39;s storage allowance and is filed in the folder the owner chose, as a file sent by a visitor, which the owner&#39;s own file list leaves out. A full allowance, a partner&#39;s storage that cannot be used and a stopped feature are all the same 503 &#x60;UPLOAD_UNAVAILABLE&#x60; to a visitor, and the owner is told through a notice. **Who may call.** The same rule as the entry route: a permitted &#x60;Origin&#x60; header, which is the artifact origin the widget runs from or any website when the owner has not restricted the allowed websites (when the owner has, one of the websites the owner listed, Widgetic&#39;s own sites, the visitor&#39;s own machine or the owner&#39;s own platform). A request without a permitted &#x60;Origin&#x60; is 403 &#x60;ORIGIN_NOT_ALLOWED&#x60;. A composition that is not served (unpublished, or its owner&#39;s plan does not serve it) is 404, with the codes of the other public embed routes. **Limits.** 30 requests a minute for each visitor address and composition and 240 a minute for a composition (429 &#x60;RATE_LIMITED&#x60;, with a &#x60;Retry-After&#x60; header); at most 10 MB for a file, and only so many files held in memory at once on each gateway process (503 &#x60;UPLOAD_BUSY&#x60;, with a &#x60;Retry-After&#x60;). A file that does not arrive within two minutes is 408 &#x60;UPLOAD_TIMEOUT&#x60;. Every answer but a success closes the connection, so a client that is refused before it has sent the file reads the answer and stops.
417
694
  # @param composition_id [String]
418
695
  # @param ticket [String] The ticket the &#x60;begin-upload&#x60; operation answered with.
419
696
  # @param body [File]
@@ -93,6 +93,100 @@ module ApiSdkRb
93
93
  return data, status_code, headers
94
94
  end
95
95
 
96
+ # Confirm an adapter address with the code that was emailed to it
97
+ # Some credentials are an email address Widgetic sends a widget's messages to (`confirmation: email_code` in `getUserAdapterConnections`). Saving one with `setUserAdapterConnection` emails a six-digit code to it; this gives the code back. Only then is the address used: until it is confirmed, the widgets that need it are not charged and their visitors are told the feature is unavailable. The code works for 30 minutes and for five wrong tries. After that, save the address again and a new code is emailed (not sooner than a minute after the last one). A code that is not made of digits is refused without counting as a try. Confirming an address that is already confirmed answers 200 with the same state, so a retry of a request that went through is harmless. Saving a different address, or the same one before it was confirmed, starts again. This needs an API key with full access. The caller must be the account itself or a Widgetic administrator.
98
+ # @param user_id [String] The account that keeps the address. For your own, your own user id
99
+ # @param adapter_id [String] The adapter the address is for
100
+ # @param credential_key [String] The credential&#39;s name within the adapter
101
+ # @param confirm_adapter_connection_request [ConfirmAdapterConnectionRequest]
102
+ # @param [Hash] opts the optional parameters
103
+ # @return [SetUserAdapterConnection200Response]
104
+ def confirm_user_adapter_connection_0(user_id, adapter_id, credential_key, confirm_adapter_connection_request, opts = {})
105
+ data, _status_code, _headers = confirm_user_adapter_connection_0_with_http_info(user_id, adapter_id, credential_key, confirm_adapter_connection_request, opts)
106
+ data
107
+ end
108
+
109
+ # Confirm an adapter address with the code that was emailed to it
110
+ # Some credentials are an email address Widgetic sends a widget&#39;s messages to (&#x60;confirmation: email_code&#x60; in &#x60;getUserAdapterConnections&#x60;). Saving one with &#x60;setUserAdapterConnection&#x60; emails a six-digit code to it; this gives the code back. Only then is the address used: until it is confirmed, the widgets that need it are not charged and their visitors are told the feature is unavailable. The code works for 30 minutes and for five wrong tries. After that, save the address again and a new code is emailed (not sooner than a minute after the last one). A code that is not made of digits is refused without counting as a try. Confirming an address that is already confirmed answers 200 with the same state, so a retry of a request that went through is harmless. Saving a different address, or the same one before it was confirmed, starts again. This needs an API key with full access. The caller must be the account itself or a Widgetic administrator.
111
+ # @param user_id [String] The account that keeps the address. For your own, your own user id
112
+ # @param adapter_id [String] The adapter the address is for
113
+ # @param credential_key [String] The credential&#39;s name within the adapter
114
+ # @param confirm_adapter_connection_request [ConfirmAdapterConnectionRequest]
115
+ # @param [Hash] opts the optional parameters
116
+ # @return [Array<(SetUserAdapterConnection200Response, Integer, Hash)>] SetUserAdapterConnection200Response data, response status code and response headers
117
+ def confirm_user_adapter_connection_0_with_http_info(user_id, adapter_id, credential_key, confirm_adapter_connection_request, opts = {})
118
+ if @api_client.config.debugging
119
+ @api_client.config.logger.debug 'Calling API: UsersApi.confirm_user_adapter_connection_0 ...'
120
+ end
121
+ # verify the required parameter 'user_id' is set
122
+ if @api_client.config.client_side_validation && user_id.nil?
123
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.confirm_user_adapter_connection_0"
124
+ end
125
+ # verify the required parameter 'adapter_id' is set
126
+ if @api_client.config.client_side_validation && adapter_id.nil?
127
+ fail ArgumentError, "Missing the required parameter 'adapter_id' when calling UsersApi.confirm_user_adapter_connection_0"
128
+ end
129
+ if @api_client.config.client_side_validation && adapter_id.to_s.length > 40
130
+ fail ArgumentError, 'invalid value for "adapter_id" when calling UsersApi.confirm_user_adapter_connection_0, the character length must be smaller than or equal to 40.'
131
+ end
132
+
133
+ # verify the required parameter 'credential_key' is set
134
+ if @api_client.config.client_side_validation && credential_key.nil?
135
+ fail ArgumentError, "Missing the required parameter 'credential_key' when calling UsersApi.confirm_user_adapter_connection_0"
136
+ end
137
+ if @api_client.config.client_side_validation && credential_key.to_s.length > 40
138
+ fail ArgumentError, 'invalid value for "credential_key" when calling UsersApi.confirm_user_adapter_connection_0, the character length must be smaller than or equal to 40.'
139
+ end
140
+
141
+ # verify the required parameter 'confirm_adapter_connection_request' is set
142
+ if @api_client.config.client_side_validation && confirm_adapter_connection_request.nil?
143
+ fail ArgumentError, "Missing the required parameter 'confirm_adapter_connection_request' when calling UsersApi.confirm_user_adapter_connection_0"
144
+ end
145
+ # resource path
146
+ local_var_path = '/users/{userId}/adapter-connections/{adapterId}/{credentialKey}/confirm'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'adapterId' + '}', CGI.escape(adapter_id.to_s)).sub('{' + 'credentialKey' + '}', CGI.escape(credential_key.to_s))
147
+
148
+ # query parameters
149
+ query_params = opts[:query_params] || {}
150
+
151
+ # header parameters
152
+ header_params = opts[:header_params] || {}
153
+ # HTTP header 'Accept' (if needed)
154
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
155
+ # HTTP header 'Content-Type'
156
+ content_type = @api_client.select_header_content_type(['application/json'])
157
+ if !content_type.nil?
158
+ header_params['Content-Type'] = content_type
159
+ end
160
+
161
+ # form parameters
162
+ form_params = opts[:form_params] || {}
163
+
164
+ # http body (model)
165
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(confirm_adapter_connection_request)
166
+
167
+ # return_type
168
+ return_type = opts[:debug_return_type] || 'SetUserAdapterConnection200Response'
169
+
170
+ # auth_names
171
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
172
+
173
+ new_options = opts.merge(
174
+ :operation => :"UsersApi.confirm_user_adapter_connection_0",
175
+ :header_params => header_params,
176
+ :query_params => query_params,
177
+ :form_params => form_params,
178
+ :body => post_body,
179
+ :auth_names => auth_names,
180
+ :return_type => return_type
181
+ )
182
+
183
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
184
+ if @api_client.config.debugging
185
+ @api_client.config.logger.debug "API called: UsersApi#confirm_user_adapter_connection_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
186
+ end
187
+ return data, status_code, headers
188
+ end
189
+
96
190
  # Create an API key
97
191
  # Makes a new API key for an account and returns its secret in `key`. That is the only time the secret is shown: Widgetic keeps a hash, so a key that was not stored cannot be recovered, only replaced. To rotate a key, make the new one, switch the integration over to it, then delete the old one. Only a person signed in on widgetic.com can make a key: a request made with an API key, or with an SDK token, is refused with 403. That way a leaked key cannot be used to make a second one that survives its revocation. Make keys from the dashboard; a key can still list, rename, switch off and delete keys. An `Idempotency-Key` header is required (8 to 50 characters: letters, digits, `-` and `_`). A retry with the same header and the same body returns the same answer instead of making a second key, and the same header with a different body is refused with 422. Make keys one at a time: two requests for the same account that run at the same moment can overwrite each other. A key can be limited to what it needs. Send a `preset` (`read_only`, `content` or `full_access`) or a list of `scopes`, never both. Send neither for a key that can do everything its owner can, as every key made before scopes existed. A limited key is refused with 403 and the code `API_KEY_SCOPE_MISSING` on anything outside its scopes, so a key held by a build server or by a partner's backend can be given only the part of the API it uses. The scopes of a key are fixed when it is made: to widen one, make a new key and delete the old one. A limited key cannot make, change or delete keys, exchange tokens or reach the administration routes. The list of scopes is in the `ApiKeyScope` schema. Accounts with API access (Solo, Teams and partner accounts) have no limit on how many keys they hold. An account on a plan without API access cannot make one (a partner account is not asked about a plan).
98
192
  # @param id [String] The account the key is for. For your own, your own user id
@@ -678,7 +772,7 @@ module ApiSdkRb
678
772
  end
679
773
 
680
774
  # Connect an adapter key to an account
681
- # Gives an adapter the key it needs to act through a service you have an account with, for the widgets you made. Take the `adapterId` and `credentialKey` from `getUserAdapterConnections`. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this account, this adapter and this credential, so that a stored value cannot be moved to another. It is never returned, never logged and never shown to a visitor of a widget. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on your behalf, and discards it. To cut that off, remove the key here, or revoke it with the provider. **What is checked.** That the adapter exists and takes this credential, that an owner may keep it (some are for a partner only) and that the text is one line of at most 2048 characters. Whether the provider accepts the key is not checked here: it shows the first time a widget uses it, and the widget tells its owner. A widget whose adapter has no key connected is not charged and does not run that adapter: its visitors are told the feature is unavailable, and the owner is told once a day what to connect. This needs an API key with full access. The caller must be the account itself or a Widgetic administrator. A retry is harmless: saving the same key twice only refreshes when it was set.
775
+ # Gives an adapter the key it needs to act through a service you have an account with, for the widgets you made. Take the `adapterId` and `credentialKey` from `getUserAdapterConnections`. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this account, this adapter and this credential, so that a stored value cannot be moved to another. It is never returned, never logged and never shown to a visitor of a widget. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on your behalf, and discards it. To cut that off, remove the key here, or revoke it with the provider. **What is checked.** That the adapter exists and takes this credential, that an owner may keep it (some are for a partner only) and that the text is one line of at most 2048 characters. Whether the provider accepts the key is not checked here: it shows the first time a widget uses it, and the widget tells its owner. **An address that has to be confirmed.** Some credentials are not a key but the email address Widgetic sends a widget's messages to (`confirmation: email_code` in `getUserAdapterConnections`). Saving one checks that it is one email address and emails a six-digit code to it; the answer says `awaitingConfirmation: true`, and nothing is sent to the address until the code is given back with `confirmUserAdapterConnection`. Saving the same address again before it is confirmed emails a new code (not sooner than a minute after the last); saving the address that is already confirmed changes nothing. If the code cannot be emailed, nothing is saved. A widget whose adapter has no key connected, or whose address is not confirmed yet, is not charged and does not run that adapter: its visitors are told the feature is unavailable, and the owner is told once a day what to do. This needs an API key with full access. The caller must be the account itself or a Widgetic administrator. A retry is harmless: saving the same key twice only refreshes when it was set.
682
776
  # @param user_id [String] The account that keeps the key. For your own, your own user id
683
777
  # @param adapter_id [String] The adapter the key is for
684
778
  # @param credential_key [String] The key&#39;s name within the adapter
@@ -691,7 +785,7 @@ module ApiSdkRb
691
785
  end
692
786
 
693
787
  # Connect an adapter key to an account
694
- # Gives an adapter the key it needs to act through a service you have an account with, for the widgets you made. Take the &#x60;adapterId&#x60; and &#x60;credentialKey&#x60; from &#x60;getUserAdapterConnections&#x60;. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this account, this adapter and this credential, so that a stored value cannot be moved to another. It is never returned, never logged and never shown to a visitor of a widget. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on your behalf, and discards it. To cut that off, remove the key here, or revoke it with the provider. **What is checked.** That the adapter exists and takes this credential, that an owner may keep it (some are for a partner only) and that the text is one line of at most 2048 characters. Whether the provider accepts the key is not checked here: it shows the first time a widget uses it, and the widget tells its owner. A widget whose adapter has no key connected is not charged and does not run that adapter: its visitors are told the feature is unavailable, and the owner is told once a day what to connect. This needs an API key with full access. The caller must be the account itself or a Widgetic administrator. A retry is harmless: saving the same key twice only refreshes when it was set.
788
+ # Gives an adapter the key it needs to act through a service you have an account with, for the widgets you made. Take the &#x60;adapterId&#x60; and &#x60;credentialKey&#x60; from &#x60;getUserAdapterConnections&#x60;. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this account, this adapter and this credential, so that a stored value cannot be moved to another. It is never returned, never logged and never shown to a visitor of a widget. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on your behalf, and discards it. To cut that off, remove the key here, or revoke it with the provider. **What is checked.** That the adapter exists and takes this credential, that an owner may keep it (some are for a partner only) and that the text is one line of at most 2048 characters. Whether the provider accepts the key is not checked here: it shows the first time a widget uses it, and the widget tells its owner. **An address that has to be confirmed.** Some credentials are not a key but the email address Widgetic sends a widget&#39;s messages to (&#x60;confirmation: email_code&#x60; in &#x60;getUserAdapterConnections&#x60;). Saving one checks that it is one email address and emails a six-digit code to it; the answer says &#x60;awaitingConfirmation: true&#x60;, and nothing is sent to the address until the code is given back with &#x60;confirmUserAdapterConnection&#x60;. Saving the same address again before it is confirmed emails a new code (not sooner than a minute after the last); saving the address that is already confirmed changes nothing. If the code cannot be emailed, nothing is saved. A widget whose adapter has no key connected, or whose address is not confirmed yet, is not charged and does not run that adapter: its visitors are told the feature is unavailable, and the owner is told once a day what to do. This needs an API key with full access. The caller must be the account itself or a Widgetic administrator. A retry is harmless: saving the same key twice only refreshes when it was set.
695
789
  # @param user_id [String] The account that keeps the key. For your own, your own user id
696
790
  # @param adapter_id [String] The adapter the key is for
697
791
  # @param credential_key [String] The key&#39;s name within the adapter