api-sdk-rb 1.11.111 → 1.11.133

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 (180) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +207 -381
  3. data/docs/{GetPartnerCreditTransactions200Response.md → AccountCreditTransactionListResponse.md} +2 -2
  4. data/docs/{GetUserAdapterConnections200Response.md → AdapterConnectionListResponse.md} +2 -2
  5. data/docs/{RemoveUserAdapterConnection200Response.md → AdapterConnectionRemovalResponse.md} +2 -2
  6. data/docs/{SetUserAdapterConnection200Response.md → AdapterConnectionResponse.md} +2 -2
  7. data/docs/{AddAiAnswersKnowledgeDocument201Response.md → AiAnswersKnowledgeDocumentResponse.md} +2 -2
  8. data/docs/BrandKitApi.md +74 -74
  9. data/docs/BrandKitTokens.md +2 -0
  10. data/docs/BrandKitView.md +1 -1
  11. data/docs/BrandTextStyle.md +22 -0
  12. data/docs/CanvasesApi.md +45 -45
  13. data/docs/{CreateCompositionDatabaseRecord201Response.md → CompositionDatabaseRecordResponse.md} +2 -2
  14. data/docs/CompositionsApi.md +615 -349
  15. data/docs/{CreateCompositionContentItem201Response.md → ContentItemWriteResultResponse.md} +2 -2
  16. data/docs/CreditsApi.md +20 -20
  17. data/docs/{CreateCompositionFromWidget201Response.md → DeleteUpload200Response.md} +3 -3
  18. data/docs/{UploadsIdDelete200ResponseData.md → DeleteUpload200ResponseData.md} +2 -2
  19. data/docs/{GetPartnerDesignDefaults200Response.md → DesignDefaultsResponse.md} +2 -2
  20. data/docs/EntitlementsApi.md +18 -18
  21. data/docs/{OperationsIdGetResponse.md → GetOperationResponse.md} +3 -3
  22. data/docs/{OperationsIdGetResponseData.md → GetOperationResponseData.md} +3 -3
  23. data/docs/GetOperationResponseDataMetadata.md +24 -0
  24. data/docs/InvoicesApi.md +9 -9
  25. data/docs/{UploadsGet200Response.md → ListUploads200Response.md} +2 -2
  26. data/docs/{GetManagedUserLimits200Response.md → ManagedUserLimitsResponse.md} +2 -2
  27. data/docs/{DeleteManagedUser200Response.md → ManagedUserRemovalResponse.md} +2 -2
  28. data/docs/ManagedUsersApi.md +261 -171
  29. data/docs/OperationsApi.md +11 -11
  30. data/docs/PartnersApi.md +388 -388
  31. data/docs/PatchBrandKitRequest.md +2 -0
  32. data/docs/PublicEmbedApi.md +95 -95
  33. data/docs/PublicWorkflowEventsRequestEventsInner.md +3 -1
  34. data/docs/{GetPublicWorkflow200Response.md → PublicWorkflowResponse.md} +2 -2
  35. data/docs/TokensApi.md +11 -9
  36. data/docs/Upload.md +1 -1
  37. data/docs/UploadLimits.md +3 -3
  38. data/docs/UploadsApi.md +85 -85
  39. data/docs/UsersApi.md +125 -125
  40. data/docs/WidgetClarification.md +22 -0
  41. data/docs/WidgetClarificationOption.md +22 -0
  42. data/docs/WidgetClarificationQuestion.md +26 -0
  43. data/docs/WidgetNextStep.md +24 -0
  44. data/docs/WidgetPlan.md +26 -0
  45. data/docs/WidgetPlanDecisions.md +32 -0
  46. data/docs/WidgetPlanDecisionsAdaptersInner.md +20 -0
  47. data/docs/WidgetPlanDecisionsLibrariesInner.md +22 -0
  48. data/docs/WidgetPlanDecisionsResponsive.md +22 -0
  49. data/docs/WidgetPlanTask.md +24 -0
  50. data/docs/WidgetsApi.md +38 -38
  51. data/docs/{CreateWorkspaceWorkflowFromPreset201Response.md → WorkflowDetailResponse.md} +2 -2
  52. data/docs/WorkflowFailureReason.md +15 -0
  53. data/docs/WorkflowFailureReasonCounter.md +22 -0
  54. data/docs/{SaveWorkspaceWorkflow200Response.md → WorkflowResponse.md} +2 -2
  55. data/docs/WorkflowStats.md +4 -2
  56. data/docs/WorkflowsApi.md +197 -413
  57. data/lib/api-sdk-rb/api/brand_kit_api.rb +61 -61
  58. data/lib/api-sdk-rb/api/canvases_api.rb +39 -39
  59. data/lib/api-sdk-rb/api/compositions_api.rb +770 -441
  60. data/lib/api-sdk-rb/api/credits_api.rb +20 -20
  61. data/lib/api-sdk-rb/api/entitlements_api.rb +14 -14
  62. data/lib/api-sdk-rb/api/invoices_api.rb +10 -10
  63. data/lib/api-sdk-rb/api/managed_users_api.rb +278 -172
  64. data/lib/api-sdk-rb/api/operations_api.rb +10 -10
  65. data/lib/api-sdk-rb/api/partners_api.rb +389 -389
  66. data/lib/api-sdk-rb/api/public_embed_api.rb +95 -95
  67. data/lib/api-sdk-rb/api/tokens_api.rb +8 -6
  68. data/lib/api-sdk-rb/api/uploads_api.rb +96 -96
  69. data/lib/api-sdk-rb/api/users_api.rb +132 -132
  70. data/lib/api-sdk-rb/api/widgets_api.rb +40 -40
  71. data/lib/api-sdk-rb/api/workflows_api.rb +246 -468
  72. data/lib/api-sdk-rb/configuration.rb +0 -60
  73. data/lib/api-sdk-rb/models/{get_user_adapter_connections200_response.rb → account_credit_transaction_list_response.rb} +4 -4
  74. data/lib/api-sdk-rb/models/{get_partner_credit_transactions200_response.rb → adapter_connection_list_response.rb} +4 -4
  75. data/lib/api-sdk-rb/models/{save_workspace_workflow200_response.rb → adapter_connection_removal_response.rb} +4 -4
  76. data/lib/api-sdk-rb/models/{set_user_adapter_connection200_response.rb → adapter_connection_response.rb} +3 -3
  77. data/lib/api-sdk-rb/models/{add_ai_answers_knowledge_document201_response.rb → ai_answers_knowledge_document_response.rb} +3 -3
  78. data/lib/api-sdk-rb/models/brand_kit_tokens.rb +33 -2
  79. data/lib/api-sdk-rb/models/brand_kit_view.rb +1 -1
  80. data/lib/api-sdk-rb/models/brand_text_style.rb +344 -0
  81. data/lib/api-sdk-rb/models/{create_composition_database_record201_response.rb → composition_database_record_response.rb} +3 -3
  82. data/lib/api-sdk-rb/models/{create_composition_content_item201_response.rb → content_item_write_result_response.rb} +3 -3
  83. data/lib/api-sdk-rb/models/{operations_id_get_response.rb → delete_upload200_response.rb} +4 -5
  84. data/lib/api-sdk-rb/models/{uploads_id_delete200_response_data.rb → delete_upload200_response_data.rb} +3 -3
  85. data/lib/api-sdk-rb/models/{get_partner_design_defaults200_response.rb → design_defaults_response.rb} +3 -3
  86. data/lib/api-sdk-rb/models/get_operation_response.rb +247 -0
  87. data/lib/api-sdk-rb/models/{operations_id_get_response_data.rb → get_operation_response_data.rb} +5 -8
  88. data/lib/api-sdk-rb/models/get_operation_response_data_metadata.rb +283 -0
  89. data/lib/api-sdk-rb/models/{uploads_get200_response.rb → list_uploads200_response.rb} +3 -3
  90. data/lib/api-sdk-rb/models/{get_managed_user_limits200_response.rb → managed_user_limits_response.rb} +3 -3
  91. data/lib/api-sdk-rb/models/{uploads_id_delete200_response.rb → managed_user_removal_response.rb} +4 -4
  92. data/lib/api-sdk-rb/models/patch_brand_kit_request.rb +32 -1
  93. data/lib/api-sdk-rb/models/public_workflow_events_request_events_inner.rb +26 -4
  94. data/lib/api-sdk-rb/models/{get_public_workflow200_response.rb → public_workflow_response.rb} +3 -3
  95. data/lib/api-sdk-rb/models/upload.rb +1 -1
  96. data/lib/api-sdk-rb/models/upload_limits.rb +3 -3
  97. data/lib/api-sdk-rb/models/widget_clarification.rb +279 -0
  98. data/lib/api-sdk-rb/models/{create_composition_from_widget201_response.rb → widget_clarification_option.rb} +40 -30
  99. data/lib/api-sdk-rb/models/widget_clarification_question.rb +329 -0
  100. data/lib/api-sdk-rb/models/widget_next_step.rb +307 -0
  101. data/lib/api-sdk-rb/models/widget_plan.rb +306 -0
  102. data/lib/api-sdk-rb/models/widget_plan_decisions.rb +346 -0
  103. data/lib/api-sdk-rb/models/widget_plan_decisions_adapters_inner.rb +237 -0
  104. data/lib/api-sdk-rb/models/{create_workspace_workflow_from_preset201_response.rb → widget_plan_decisions_libraries_inner.rb} +39 -30
  105. data/lib/api-sdk-rb/models/widget_plan_decisions_responsive.rb +311 -0
  106. data/lib/api-sdk-rb/models/widget_plan_task.rb +320 -0
  107. data/lib/api-sdk-rb/models/{delete_managed_user200_response.rb → workflow_detail_response.rb} +4 -4
  108. data/lib/api-sdk-rb/models/workflow_failure_reason.rb +42 -0
  109. data/lib/api-sdk-rb/models/workflow_failure_reason_counter.rb +277 -0
  110. data/lib/api-sdk-rb/models/workflow_response.rb +246 -0
  111. data/lib/api-sdk-rb/models/workflow_stats.rb +17 -5
  112. data/lib/api-sdk-rb/version.rb +1 -1
  113. data/lib/api-sdk-rb.rb +32 -21
  114. data/spec/api/brand_kit_api_spec.rb +18 -18
  115. data/spec/api/canvases_api_spec.rb +10 -10
  116. data/spec/api/compositions_api_spec.rb +144 -83
  117. data/spec/api/credits_api_spec.rb +5 -5
  118. data/spec/api/entitlements_api_spec.rb +4 -4
  119. data/spec/api/invoices_api_spec.rb +2 -2
  120. data/spec/api/managed_users_api_spec.rb +63 -42
  121. data/spec/api/operations_api_spec.rb +3 -3
  122. data/spec/api/partners_api_spec.rb +91 -91
  123. data/spec/api/public_embed_api_spec.rb +23 -23
  124. data/spec/api/tokens_api_spec.rb +3 -2
  125. data/spec/api/uploads_api_spec.rb +24 -24
  126. data/spec/api/users_api_spec.rb +30 -30
  127. data/spec/api/widgets_api_spec.rb +9 -9
  128. data/spec/api/workflows_api_spec.rb +50 -89
  129. data/spec/models/{get_user_adapter_connections200_response_spec.rb → account_credit_transaction_list_response_spec.rb} +6 -6
  130. data/spec/models/{get_public_workflow200_response_spec.rb → adapter_connection_list_response_spec.rb} +6 -6
  131. data/spec/models/{save_workspace_workflow200_response_spec.rb → adapter_connection_removal_response_spec.rb} +6 -6
  132. data/spec/models/{delete_managed_user200_response_spec.rb → adapter_connection_response_spec.rb} +6 -6
  133. data/spec/models/ai_answers_knowledge_document_response_spec.rb +48 -0
  134. data/spec/models/brand_kit_tokens_spec.rb +6 -0
  135. data/spec/models/{create_composition_from_widget201_response_spec.rb → brand_text_style_spec.rb} +13 -9
  136. data/spec/models/{get_managed_user_limits200_response_spec.rb → composition_database_record_response_spec.rb} +6 -6
  137. data/spec/models/content_item_write_result_response_spec.rb +48 -0
  138. data/spec/models/{uploads_id_delete200_response_data_spec.rb → delete_upload200_response_data_spec.rb} +6 -6
  139. data/spec/models/{operations_id_get_response_spec.rb → delete_upload200_response_spec.rb} +6 -6
  140. data/spec/models/design_defaults_response_spec.rb +48 -0
  141. data/spec/models/get_operation_response_data_metadata_spec.rb +58 -0
  142. data/spec/models/{operations_id_get_response_data_spec.rb → get_operation_response_data_spec.rb} +6 -6
  143. data/spec/models/{uploads_get200_response_spec.rb → get_operation_response_spec.rb} +6 -6
  144. data/spec/models/list_uploads200_response_spec.rb +48 -0
  145. data/spec/models/managed_user_limits_response_spec.rb +48 -0
  146. data/spec/models/{uploads_id_delete200_response_spec.rb → managed_user_removal_response_spec.rb} +6 -6
  147. data/spec/models/patch_brand_kit_request_spec.rb +6 -0
  148. data/spec/models/public_workflow_events_request_events_inner_spec.rb +10 -0
  149. data/spec/models/public_workflow_response_spec.rb +48 -0
  150. data/spec/models/widget_clarification_option_spec.rb +48 -0
  151. data/spec/models/widget_clarification_question_spec.rb +60 -0
  152. data/spec/models/widget_clarification_spec.rb +48 -0
  153. data/spec/models/widget_next_step_spec.rb +58 -0
  154. data/spec/models/widget_plan_decisions_adapters_inner_spec.rb +42 -0
  155. data/spec/models/widget_plan_decisions_libraries_inner_spec.rb +48 -0
  156. data/spec/models/widget_plan_decisions_responsive_spec.rb +48 -0
  157. data/spec/models/widget_plan_decisions_spec.rb +78 -0
  158. data/spec/models/{create_composition_database_record201_response_spec.rb → widget_plan_spec.rb} +21 -9
  159. data/spec/models/widget_plan_task_spec.rb +62 -0
  160. data/spec/models/workflow_detail_response_spec.rb +48 -0
  161. data/spec/models/workflow_failure_reason_counter_spec.rb +48 -0
  162. data/spec/models/workflow_failure_reason_spec.rb +30 -0
  163. data/spec/models/workflow_response_spec.rb +48 -0
  164. data/spec/models/workflow_stats_spec.rb +6 -0
  165. metadata +130 -86
  166. data/docs/PartnerApi.md +0 -12714
  167. data/docs/UploadsIdDelete200Response.md +0 -22
  168. data/docs/WorkspacesApi.md +0 -1527
  169. data/lib/api-sdk-rb/api/partner_api.rb +0 -13791
  170. data/lib/api-sdk-rb/api/workspaces_api.rb +0 -1775
  171. data/lib/api-sdk-rb/models/remove_user_adapter_connection200_response.rb +0 -246
  172. data/spec/api/partner_api_spec.rb +0 -2437
  173. data/spec/api/workspaces_api_spec.rb +0 -339
  174. data/spec/models/add_ai_answers_knowledge_document201_response_spec.rb +0 -48
  175. data/spec/models/create_composition_content_item201_response_spec.rb +0 -48
  176. data/spec/models/create_workspace_workflow_from_preset201_response_spec.rb +0 -48
  177. data/spec/models/get_partner_credit_transactions200_response_spec.rb +0 -48
  178. data/spec/models/get_partner_design_defaults200_response_spec.rb +0 -48
  179. data/spec/models/remove_user_adapter_connection200_response_spec.rb +0 -48
  180. data/spec/models/set_user_adapter_connection200_response_spec.rb +0 -48
@@ -1,2437 +0,0 @@
1
- =begin
2
- #Widgetic API Gateway
3
-
4
- #API documentation for the Widgetic API Gateway
5
-
6
- The version of the OpenAPI document: 1.0.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for ApiSdkRb::PartnerApi
17
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
- # Please update as you see appropriate
19
- describe 'PartnerApi' do
20
- before do
21
- # run before each test
22
- @api_instance = ApiSdkRb::PartnerApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of PartnerApi' do
30
- it 'should create an instance of PartnerApi' do
31
- expect(@api_instance).to be_instance_of(ApiSdkRb::PartnerApi)
32
- end
33
- end
34
-
35
- # unit tests for add_ai_answers_knowledge_document
36
- # Add a document for a widget's AI to answer from
37
- # Gives the widget's AI a document to answer visitors' questions from. Send the title and the plain text. The call returns once the document is ready to be used, which takes a few seconds, longer for a long text. **How it is used.** The text is cleaned, cut into short passages and each passage is turned into numbers (an embedding) so the widget can find the passages nearest to a question. When a visitor asks, the nearest passages and the question are shown to an AI model, which writes the answer from them and from nothing else; if the documents say nothing about the question the visitor is told so, and the owner is not charged for that question. The titles of the documents an answer used are shown to the visitor as its sources. **What leaves Widgetic.** The text of a document is sent to OpenAI to be embedded when it is added, and the passages used for a question are sent to the AI model that writes the answer. Say so in your privacy policy. **Treat every document as public.** An answer can quote or paraphrase anything a document says, to any visitor of the widget. Do not add passwords, keys, personal data or anything that must stay private. **Limits.** A widget holds up to 20 documents, each up to 100000 characters, and up to 400000 characters in all (`getAiAnswersKnowledge` reports the current numbers). This call takes text. To add a text file or a picture of a document (a PDF too, once PDFs are read) without turning it into text yourself, use `addAiAnswersKnowledgeFile`. Adding a document costs no credits. The same text cannot be added twice to one widget (409). The caller must be allowed to change the widget. An API key needs the `content:write` scope. Adds are limited to ten in ten minutes per person. A partner's customer in an editor session is one person of its own: its adds are not counted with the partner's other customers'.
38
- # @param id The widget (composition) to add the document to
39
- # @param add_ai_answers_knowledge_document_request
40
- # @param [Hash] opts the optional parameters
41
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
42
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
43
- # @return [AddAiAnswersKnowledgeDocument201Response]
44
- describe 'add_ai_answers_knowledge_document test' do
45
- it 'should work' do
46
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
47
- end
48
- end
49
-
50
- # unit tests for add_ai_answers_knowledge_file
51
- # Add a text file or a picture of a document (a PDF once PDFs are read) for a widget's AI to answer from
52
- # Gives the widget's AI a document made from a file. Send a `multipart/form-data` request with the file in the field named `file` and, if you like, a `title`. The file is turned into text and then added exactly as `addAiAnswersKnowledgeDocument` adds text: the same cleaning, the same limits, the same refusal of a copy of a document the widget already has. The call returns once the document is ready to be used, which takes a few seconds (a PDF is read first, so it takes longer). **PDFs are not read yet.** For now a PDF is refused with 415, in a sentence that says what to do instead: paste the text, upload it as a text file, or upload its pages as pictures. What this description says about a PDF is what will hold from the day PDFs are read. **Which files.** - A **PDF** (not read yet, see above), up to 10 MB and 300 pages. Its text is read and its paragraphs are put back together. A PDF that is only pictures of pages (a scan) has no text to read: upload the pages as pictures instead. A PDF locked with a password is refused. - A **text file**: `.txt`, `.text`, `.md`, `.markdown` or `.csv`, in UTF-8, UTF-16 or Windows-1252. - A **picture of a document**: PNG, JPEG or WebP, up to 4 MB. The text in it is read with the same text recognition as the `ocr` adapter. - Word and other office files are not read yet: save the file as a PDF and upload that. What a file is comes from what is in it, not from its name or the type it is sent as. A file that is none of these is refused with 415. **The title.** Left out, the name of the file (without its extension) is the title. Visitors see the title as the source of an answer, so send one that means something to them. **The file is not kept.** Only its text, cut into passages, is kept, and `getAiAnswersKnowledge` never returns it. **What leaves Widgetic.** As for text, the words of the document are sent to OpenAI to be embedded when it is added, and the passages used for a question are sent to the AI model that writes the answer. A picture is also sent to the text recognition service. A PDF is read on Widgetic's own servers and is not sent anywhere to be read. Say so in your privacy policy. **Treat every document as public.** An answer can quote or paraphrase anything a document says, to any visitor of the widget. Do not add passwords, keys, personal data or anything that must stay private. **Limits.** The widget's limits are those of `addAiAnswersKnowledgeDocument` (up to 20 documents, each up to 100000 characters of text, and up to 400000 characters in all; `getAiAnswersKnowledge` reports the current numbers), and the file is at most 10 MB. Adding a document costs no credits. The same text cannot be added twice to one widget (409). The caller must be allowed to change the widget. An API key needs the `content:write` scope. Adds, from text or from a file, share one limit of ten in ten minutes per person. A partner's customer in an editor session is one person of its own: its adds are not counted with the partner's other customers'.
53
- # @param id The widget (composition) to add the document to
54
- # @param file The file, which is a text file or a picture of a document (a PDF is not read yet). One file only
55
- # @param [Hash] opts the optional parameters
56
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
57
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
58
- # @option opts [String] :title What the document is called, on one line. Visitors see it as the source of an answer. Left out, the name of the file stands in for it
59
- # @return [AddAiAnswersKnowledgeDocument201Response]
60
- describe 'add_ai_answers_knowledge_file test' do
61
- it 'should work' do
62
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
63
- end
64
- end
65
-
66
- # unit tests for add_personal_workspace_domain
67
- # Allow a website to show your widgets
68
- # Adds a website to an account's own list. Give a website name such as `example.com`, or `*.example.com` for a website and all of its subdomains. A scheme, a port, a path, capital letters and a leading `www.` are dropped, so `https://www.Example.com/shop` is kept as `example.com`, and `example.com` covers `www.example.com` too. Something that is not a website name is refused, not stored. Until the first website is added nothing is restricted, and a widget can be shown anywhere. Once the list has one, a widget of the account is shown on the listed websites (and on Widgetic's own) and nowhere else. A page on your own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed, so there is nothing to add to test locally. So is the website where a partner your account administers integrates Widgetic, with every subdomain of it (`platformDomain` in the answer of `GET /partners/mine`), so there is nothing to add for it either and a list can never lock it out. A change can take about 15 seconds to reach every server. The list is a safeguard against other websites showing your widgets in a visitor's browser. It is not access control: anyone who knows a widget's id can still fetch its published content with a plain request that names no website. There is no limit on the list of an account that administers a partner, so a partner can add the website of each of its customers as they publish on their own domain, one call each. Any other account can list at most 50 websites, and the 51st is answered with a 409 (`BUSINESS_STATE_CONFLICT`). A wildcard such as `*.example.com` counts as one website, not one per subdomain, so use it instead of listing each subdomain. A page that frames a widget can name only so many websites to the browser (about fifty of ordinary length). Past that, the browser no longer checks the list for that page; the lookup that the Embed SDK makes for the widget still refuses every website that is not on the list.
69
- # @param id The account the list belongs to. For your own, your own user id
70
- # @param add_domain_request
71
- # @param [Hash] opts the optional parameters
72
- # @return [PersonalWorkspaceDomainResultResponse]
73
- describe 'add_personal_workspace_domain test' do
74
- it 'should work' do
75
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
76
- end
77
- end
78
-
79
- # unit tests for archive_workspace_workflow
80
- # Archive a Workflow
81
- # Takes a workflow out of the default list and stops it serving: its embeds show only their first composition, as when paused. It is kept, with its versions and counts, until it is deleted. For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can archive.
82
- # @param workspace_id The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
83
- # @param workflow_id The workflow's id
84
- # @param [Hash] opts the optional parameters
85
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
86
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
87
- # @return [SaveWorkspaceWorkflow200Response]
88
- describe 'archive_workspace_workflow test' do
89
- it 'should work' do
90
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
91
- end
92
- end
93
-
94
- # unit tests for call_public_composition_adapter
95
- # Call a gateway operation of an adapter a published widget uses
96
- # 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).
97
- # @param composition_id
98
- # @param adapter_id The id of the adapter, the name its module is known by, for example `upload`.
99
- # @param operation The name of one operation of the adapter, as its documentation gives it.
100
- # @param public_adapter_call_request
101
- # @param [Hash] opts the optional parameters
102
- # @return [PublicAdapterCallResult]
103
- describe 'call_public_composition_adapter test' do
104
- it 'should work' do
105
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
106
- end
107
- end
108
-
109
- # unit tests for check_composition_access
110
- # Check Composition Access
111
- # Checks if the authenticated user can access a specific composition based on workspace context and permissions.
112
- # @param id Composition ID
113
- # @param [Hash] opts the optional parameters
114
- # @return [CheckCompositionAccessResponse]
115
- describe 'check_composition_access test' do
116
- it 'should work' do
117
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
118
- end
119
- end
120
-
121
- # unit tests for confirm_partner_adapter_connection
122
- # Confirm a partner's adapter address with the code that was emailed to it
123
- # Some credentials are an email address Widgetic sends a widget's messages to (`confirmation: email_code` in `getPartnerAdapterConnections`). Saving one with `setPartnerAdapterConnection` emails a six-digit code to it; this gives the code back. Only then is the address used: until it is confirmed, the widgets of the partner's customers 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 person who administers the partner, or a Widgetic administrator.
124
- # @param partner_id The partner that keeps the address
125
- # @param adapter_id The adapter the address is for
126
- # @param credential_key The credential's name within the adapter
127
- # @param confirm_adapter_connection_request
128
- # @param [Hash] opts the optional parameters
129
- # @return [SetUserAdapterConnection200Response]
130
- describe 'confirm_partner_adapter_connection test' do
131
- it 'should work' do
132
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
133
- end
134
- end
135
-
136
- # unit tests for confirm_user_adapter_connection
137
- # Confirm an adapter address with the code that was emailed to it
138
- # 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.
139
- # @param user_id The account that keeps the address. For your own, your own user id
140
- # @param adapter_id The adapter the address is for
141
- # @param credential_key The credential's name within the adapter
142
- # @param confirm_adapter_connection_request
143
- # @param [Hash] opts the optional parameters
144
- # @return [SetUserAdapterConnection200Response]
145
- describe 'confirm_user_adapter_connection test' do
146
- it 'should work' do
147
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
148
- end
149
- end
150
-
151
- # unit tests for copy_preset_for_managed_user
152
- # Give a managed user a copy of one of your presets
153
- # Copies the preset `key` (see `setPartnerPreset`) onto a new canvas for one of your managed users, so their widget creator opens on a widget of their own that starts from yours. The copy is a draft widget in your account, filed under the managed user: `getAllWidgets` with `managedUserId` lists it, and no other managed user's editor can reach it. The copy carries the preset's code, design and content schemas, and thumbnail, and starts from a fork of its code repository, so the user's chat edits begin where yours left off. It does not carry the preset's database or its compositions. It is not a preset itself, and changing or removing the preset afterwards never touches it. To start a composition (the content and design editor) instead, you do not need a copy: call `createComposition` with the preset's `widgetId` (from `listPartnerPresets`) and the managed user. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one copy is made, not two. A copy that could not be made leaves nothing behind (503 `PRESET_COPY_FAILED`). The managed user must be yours and active.
154
- # @param id The managed user to give the copy to (Widgetic's id for the user)
155
- # @param key The key of the preset to copy
156
- # @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
157
- # @param [Hash] opts the optional parameters
158
- # @option opts [CopyPartnerPresetRequest] :copy_partner_preset_request
159
- # @return [PartnerPresetCopyResponse]
160
- describe 'copy_preset_for_managed_user test' do
161
- it 'should work' do
162
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
163
- end
164
- end
165
-
166
- # unit tests for create_canvas
167
- # Create Canvas
168
- # Creates a new canvas with the specified properties. To make the canvas for one of your managed users, send `managedUserId` or `managedUserExternalId`. The canvas stays in your account and is yours to edit; the tag lets you list one user's canvases with `getAllCanvases`. The managed user must be yours and active: one that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`. The tag is set here and does not change afterwards. Called with an editor session, the canvas is always made for the session's managed user.
169
- # @param create_canvas_request
170
- # @param [Hash] opts the optional parameters
171
- # @return [CanvasResponse]
172
- describe 'create_canvas test' do
173
- it 'should work' do
174
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
175
- end
176
- end
177
-
178
- # unit tests for create_composition
179
- # Create Composition
180
- # Creates a new composition. To make the composition for one of your managed users, send `managedUserId` or `managedUserExternalId`. The composition stays in your account and is yours to edit; the tag lets you list one user's compositions with `getAllCompositions`. The managed user must be yours and active: one that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`. The tag is set here and does not change afterwards. A copy made with `duplicateComposition` keeps the tag of the original. An editor session with the `creator` surface may call this to start a composition of a widget it built: it sends only `name`, `widgetId` (a widget made for the session's managed user) and `content`, and the composition is always made for that managed user. Send `databaseSchema` to give the composition tables of its own for what visitors send it (the shape, the allowed types and the limits are described on the field). A `databaseSchema` that cannot be used is refused before anything is created, with `400` and `INVALID_DATABASE_SCHEMA`. If the composition is created but its tables cannot be made just now, the answer is still `201` and `meta.warnings` says so. Leave `databaseSchema` out and the composition gets the tables its widget declares in its own source (`src/lib/meta/database.json`), if it declares any: they are made the same way, in a schema of the composition's own. A widget that keeps nothing leaves the composition without tables. If the widget's file cannot be used, or its tables cannot be made just now, the answer is still `201` and `meta.warnings` says so. The widget is read as it was when it was last published (as it is now, when it never was). The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one composition is created, not two.
181
- # @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
182
- # @param new_composition
183
- # @param [Hash] opts the optional parameters
184
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
185
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
186
- # @return [CreateCompositionFromWidget201Response]
187
- describe 'create_composition test' do
188
- it 'should work' do
189
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
190
- end
191
- end
192
-
193
- # unit tests for create_composition_content_item
194
- # Add a content list item
195
- # Creates one item in a widget content list without replacing the whole list. Item field keys are widget data (camelCase or snake_case are kept as sent). Partners use this to keep galleries in sync.
196
- # @param id
197
- # @param list List name from the content schema (`contentItems`) or `items`
198
- # @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
199
- # @param create_composition_content_item_request
200
- # @param [Hash] opts the optional parameters
201
- # @option opts [String] :if_match Optional content version from ETag
202
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
203
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
204
- # @return [CreateCompositionContentItem201Response]
205
- describe 'create_composition_content_item test' do
206
- it 'should work' do
207
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
208
- end
209
- end
210
-
211
- # unit tests for create_composition_database_record
212
- # Create Record In Composition Database
213
- # Creates a new record in one of the composition's tables. Only the composition's own tables (made from its `databaseSchema` or from the tables its widget declares) can be reached; any other table name answers `404`.
214
- # @param id ID of the composition
215
- # @param table Name of the database table
216
- # @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
217
- # @param body
218
- # @param [Hash] opts the optional parameters
219
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
220
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
221
- # @return [CreateCompositionDatabaseRecord201Response]
222
- describe 'create_composition_database_record test' do
223
- it 'should work' do
224
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
225
- end
226
- end
227
-
228
- # unit tests for create_composition_from_preset
229
- # Create a composition from one of your presets in one call
230
- # Validates the name, optional content, design, embed settings and locale, then creates a draft composition filed under the managed user, built on the preset's widget, in a single insert. A failure never leaves a half-made composition. The preset's widget must be published. The managed user must be yours and active. A widget that keeps what visitors send (a form, a vote, a rating) declares its tables in its own source (`src/lib/meta/database.json`); they are made for the composition here, in a schema of its own, as the widget was when it was last published. A widget that keeps nothing leaves the composition without tables. If the tables cannot be made just now, or the widget's file cannot be used, the composition is still created (`201`) and `meta.warnings` says why; the tables are made the next time the widget is generated. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one composition is created, not two.
231
- # @param id
232
- # @param key
233
- # @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
234
- # @param create_composition_from_preset_request
235
- # @param [Hash] opts the optional parameters
236
- # @return [CreateCompositionFromWidget201Response]
237
- describe 'create_composition_from_preset test' do
238
- it 'should work' do
239
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
240
- end
241
- end
242
-
243
- # unit tests for create_composition_from_widget
244
- # Create a composition for a widget in one call
245
- # After a managed user publishes a widget from the creator, call this with the widget id, the customer's managed user (when the widget is not already filed under one), and optional content, design, embed settings and locale. Every input is validated before a single insert; a failure never leaves a half-made composition. When the widget is already tagged with a managed user, you may omit `managedUserId`. When you send it, it must match that tag. A widget that keeps what visitors send (a form, a vote, a rating) declares its tables in its own source (`src/lib/meta/database.json`); they are made for the composition here, in a schema of its own, as the widget was when it was last published. A widget that keeps nothing leaves the composition without tables. If the tables cannot be made just now, or the widget's file cannot be used, the composition is still created (`201`) and `meta.warnings` says why; the tables are made the next time the widget is generated. The widget must be published. The `Idempotency-Key` header is required.
246
- # @param id The widget id
247
- # @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
248
- # @param create_composition_from_widget_request
249
- # @param [Hash] opts the optional parameters
250
- # @return [CreateCompositionFromWidget201Response]
251
- describe 'create_composition_from_widget test' do
252
- it 'should work' do
253
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
254
- end
255
- end
256
-
257
- # unit tests for create_managed_user
258
- # Create Managed User
259
- # Creates a new managed user for a partner account. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one managed user is created, not two.
260
- # @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
261
- # @param new_managed_user
262
- # @param [Hash] opts the optional parameters
263
- # @return [ManagedUserResponse]
264
- describe 'create_managed_user test' do
265
- it 'should work' do
266
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
267
- end
268
- end
269
-
270
- # unit tests for create_managed_user_editor_session
271
- # Create an editor session for a managed user
272
- # Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic's editor pieces, such as the File Browser and the composition editor, without your API key ever reaching that browser. Call this from your server when the page that hosts the editor opens, and hand the `token` in the answer to that page. The token is shown once. It starts with `wgt_ses_` and the browser sends it as `Authorization: Bearer <token>`. It can do only what the `surfaces` you name allow, and only for this managed user: - `files`: upload a file (`uploadsPost`) and list the files uploaded for this user (`uploadsGet`). Every file is filed for this user and stored in your own storage destination, never in Widgetic's: a file a customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not optional, so no session, whatever its surfaces, can be made until you have set a destination (`setPartnerStorageDestination`); until then it is refused with 409 and `PARTNER_STORAGE_REQUIRED`, and when the destination cannot be used with 503 and `STORAGE_DESTINATION_UNAVAILABLE`. A destination you remove after the session was made stops its uploads too (the same 409; the browser is only told that the feature is not available right now). To keep a customer from uploading, leave `files` out of the session and hand the editors your own media library instead (`mediaLibrary`). - `editor`: edit one of this user's compositions: read it (`getCompositionById`, its content, design, embed settings and schemas), check a content change (`validateCompositionContent`), and change its name, content, design and embed settings (`updateComposition`, `setDynamicContent`). For a widget that answers visitors' questions from documents (the `ai-answers` adapter), it also lists those documents, adds one as text or as a file (a text file or a picture; a PDF once PDFs are read), and removes one (`getAiAnswersKnowledge`, `addAiAnswersKnowledgeDocument`, `addAiAnswersKnowledgeFile`, `removeAiAnswersKnowledgeDocument`); adding costs no credits, and is limited for each of your users separately. It can reach only compositions you created for this managed user (tag them with `managedUserId` when you create them); any other composition, including another of your users', answers 404. - `creator`: use Widgetic's widget creator for this user, including its AI. Draw on canvases and save them (`getAllCanvases`, `getCanvas`, `createCanvas`, `updateCanvas`, `previewDeleteCanvas`, `deleteCanvas`); make, change, copy and delete the widgets on them (`createWidget`, `getWidgets`, `getWidgetsBatch`, `updateWidget`, `uploadWidgetThumbnail`, `duplicateWidget`, `deleteWidget`); list and make the compositions of a widget it built (`getAllCompositions`, `createComposition`), which is how it shows the widget with sample values; keep the conversation of each widget (`getConversationsByWidgetId`, `createConversationForWidget`, `updateConversation`, `getMessages`, `createMessage`, `updateMessage`, `restoreCheckpoint`); and read a widget's schemas and give it its repository (`getWidgetContentSchema`, `getWidgetDesignSchema`, `updateWidgetRepository`). The AI that builds a widget is part of it: list the models (`agentModelsGet`), open the widget's repository (`agentRepositoriesPost`, `agentRepositoriesRepoIdGet`), start a generation and follow or cancel it (`agentCodeGeneratePost`, `operationsStreamGet`, `operationsIdGet`, `operationsIdCancelPost`), build and preview the result (`agentWidgetBuilderRepoHeadWidgetIdGet`, `buildWidgetFromRepo`, `previewWidgetVersion`), publish a version of the widget and move between its versions (`agentWidgetBuilderPublishWidgetIdPost`, `getWidgetPublishHistory`, `setWidgetPublishHistoryLive`, `renameWidgetPublishHistoryTitle`), and turn a stroke or a sentence into a decision (`agentShapeRecognizePost`, `agentDesignResolvePost`). It can also offer the customer your presets as starting points: read them and ask for a copy for this customer (`listMyPresets`, `copyMyPreset`; you choose the presets with `setPartnerPreset`). What the session makes is filed for this managed user, and the lists it reads hold only this user's canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories, uploaded files and operations made for this managed user (tag the canvases and widgets you create with `managedUserId`); any other canvas, widget, composition, conversation, message, repository, file or operation, including another of your users', answers 404. The creator also saves the composition it is editing (`updateComposition`, from the `editor` surface) and attaches pictures to its chat (`uploadsPost`, from the `files` surface), and the surfaces do not imply one another: to open the whole creator for a user, ask for `creator`, `editor` and `files` together. A generation or a build one user starts can be followed and cancelled by that user and by you, never by another of your users. The AI is paid for by your account, as your own calls are: its credits and allowances are yours. A session cannot make a widget public (publishing a version does not), file one under a project or an organization, or set anything the creator does not set: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. - `workflows`: use Widgetic's Workflows editor for this user. List their workflows and the compositions a workflow of theirs can chain (`listWorkspaceWorkflows`, `listWorkspaceWorkflowCompositionOptions`); list the starting points you offer them and make a workflow from one, which gives the user their own copy of every widget it chains, a composition of their own on each copy, and a draft (`listWorkspaceWorkflowPresets`, `createWorkspaceWorkflowFromPreset`; you offer them with `setPartnerWorkflowPreset`); make, open, change and delete one (`createWorkspaceWorkflow`, `getWorkspaceWorkflow`, `saveWorkspaceWorkflow`, `deleteWorkspaceWorkflow`) and copy it (`duplicateWorkspaceWorkflow`); publish it or discard the changes of its draft (`publishWorkspaceWorkflow`, `discardWorkspaceWorkflowChanges`); read and restore its versions (`listWorkspaceWorkflowVersions`, `getWorkspaceWorkflowVersion`, `restoreWorkspaceWorkflowVersion`); pause, resume, archive and unarchive it (`pauseWorkspaceWorkflow`, `resumeWorkspaceWorkflow`, `archiveWorkspaceWorkflow`, `unarchiveWorkspaceWorkflow`); and read its counts (`getWorkspaceWorkflowStats`). The workspace in each path is `personal`: a session has no other, and a path that names an organization is refused. What the session makes is filed for this managed user (`managedUserId`), the lists hold only this user's workflows, and it can reach only workflows made for this managed user; any other workflow, including one of yours or of another of your users, answers 404. A workflow can chain only the compositions you made for this managed user (tag them with `managedUserId`): one that belongs to anybody else is not available, and publishing a workflow that uses it is refused. A customer can have at most 50 workflows, and what a customer's session reads never says who published a version. A session cannot set who a workflow belongs to or which workspace it is in: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Everything else is refused with 403 and `EDITOR_SESSION_ROUTE_NOT_ALLOWED`: a session cannot read your account, make more sessions, change your presets or delete a composition, and a session without the `creator` surface cannot create or list compositions. Create the composition yourself with your API key, then open the editor on it. A session ends at `expiresAt` (at most four hours), when you end it (`revokeManagedUserEditorSession`), or when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at once (`429 EDITOR_SESSION_LIMIT_REACHED`). A session that is bound to a web page (`allowedOrigin`) is refused from any other origin. The AI the session runs is paid for with your credits. Set `maxCredits` to hold the session to a number of them: once its generations have taken that many (a generation that fails is refunded and does not count), the next one is refused with 402 and `EDITOR_SESSION_CREDIT_LIMIT_REACHED`, and the browser is told only that the feature is not available right now. Without it, the limit Widgetic has set for your account applies when it has set one (the same limit for every session you make, and `maxCredits: null` asks for none), and otherwise the credits of your account are the only ceiling. What each of your users' sessions has spent is in `getManagedUserUsage`. Each call makes a new session. It does not take an `Idempotency-Key`: the answer holds the token, and the token is never stored where a retry could read it back. The answer is sent with `Cache-Control: no-store`.
273
- # @param id The managed user the session is for (Widgetic's id for the user)
274
- # @param new_editor_session
275
- # @param [Hash] opts the optional parameters
276
- # @return [EditorSessionResponse]
277
- describe 'create_managed_user_editor_session test' do
278
- it 'should work' do
279
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
280
- end
281
- end
282
-
283
- # unit tests for create_partner_extra_credits_invoice
284
- # Buy extra credits for a partner
285
- # Asks Widgetic for an invoice for extra credits, on top of the credits of the contract. Name the dollars; the invoice is for the most whole credits they buy at the **list price** of a credit (the price a contract may lower belongs to the contract), so it is never for more than you asked: 12.34 buys 123 credits and the invoice says 12.30. The smallest purchase is 10 dollars and one request buys at most 100000 (ask Widgetic for an invoice for more). Pay the invoice with the link in the answer. When it is paid the credits are added **once, for good**, to the account of the person who administers the partner, which is the account everything the partner builds is charged to (`getPartnerCreditBalance` shows it). Extra credits **do not expire**, unlike the credits of a contract period, which end with it. Nothing is added before the invoice is paid, and an unpaid invoice for extra credits never stops the partner: only an unpaid invoice of the contract does (`payment_arrears`). Available only to partners that have an active paid contract in force with Widgetic (`NO_PAID_CONTRACT` when none is in force) and no overdue contract invoice (`CONTRACT_INVOICE_OVERDUE` while a contract invoice is past its due day). A partner that has run out of credits during its period can buy more at the list price. An `Idempotency-Key` is required, and it is what makes a retry safe: the same key with the same body returns the invoice already issued, the same key with a different body is refused with 422, and a duplicate that arrives while the first is still running is refused with 409. Use one key per purchase you mean to make, and a new key for the next one. At most 10 requests an hour. Who may ask: the person who administers the partner, or a Widgetic administrator. A key limited to scopes needs `billing:write`.
286
- # @param partner_id Partner ID
287
- # @param idempotency_key A key of your own for this purchase, so that a retry cannot make a second invoice
288
- # @param request_extra_credits
289
- # @param [Hash] opts the optional parameters
290
- # @return [PartnerExtraCreditsInvoiceResponse]
291
- describe 'create_partner_extra_credits_invoice test' do
292
- it 'should work' do
293
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
294
- end
295
- end
296
-
297
- # unit tests for create_public_composition_entry
298
- # Append a visitor entry through the gateway
299
- # 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`.
300
- # @param composition_id
301
- # @param table
302
- # @param public_composition_entry_request
303
- # @param [Hash] opts the optional parameters
304
- # @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.
305
- # @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.
306
- # @return [PublicCompositionEntryCreated]
307
- describe 'create_public_composition_entry test' do
308
- it 'should work' do
309
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
310
- end
311
- end
312
-
313
- # unit tests for create_user_api_key
314
- # Create an API key
315
- # 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).
316
- # @param id The account the key is for. For your own, your own user id
317
- # @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
318
- # @param create_user_api_key_request
319
- # @param [Hash] opts the optional parameters
320
- # @return [CreatedUserApiKeyResponse]
321
- describe 'create_user_api_key test' do
322
- it 'should work' do
323
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
324
- end
325
- end
326
-
327
- # unit tests for create_widget
328
- # Create Widget
329
- # Creates a widget for your account: a named record with a type and some starting content, on a canvas of its own (or one of yours that you name). It costs no credits and has no code yet; the code is generated for it afterwards. The new widget is yours, and you can list it with `getWidgets`. A widget is a draft until you say otherwise (`isDraft: false`). If a step after the widget was saved does not go through, the widget is still created, and `data.warnings` says what did not. Read it before relying on the widget. A widget can be placed on one of your canvases (`canvasId`), in a project you can edit (`projectId`) or in an organization where you may create widgets (`organizationId`). Naming anything you cannot use is refused with 403, and the answer is the same whether it exists or not. To make the widget for one of your managed users, send `managedUserId` or `managedUserExternalId`. The widget stays in your account and is yours to edit; the tag lets you list one user's widgets with `getWidgets`. The managed user must be yours and active: one that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`. The tag is set here and does not change afterwards. This call has a limit of its own: 120 per minute for each account (ask Widgetic if you need more). Past that the call is answered with 429 and a `Retry-After`. A widget has no database of its own: what the visitors of a composition leave is kept in the tables of that composition, made when the composition is. The `Idempotency-Key` header is required; send the same key when you retry, so one widget is created, not two.
330
- # @param idempotency_key A unique value (a UUID is fine) that makes a retry of this request safe.
331
- # @param new_widget
332
- # @param [Hash] opts the optional parameters
333
- # @return [CreateWidget201Response]
334
- describe 'create_widget test' do
335
- it 'should work' do
336
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
337
- end
338
- end
339
-
340
- # unit tests for create_workspace_workflow
341
- # Create a Workflow
342
- # Makes a draft workflow. Give it a composition and the workflow is born with one block, which starts it; without one it starts empty. A workspace holds up to 500 workflows. For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can create one.
343
- # @param workspace_id The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
344
- # @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
345
- # @param create_workspace_workflow_request
346
- # @param [Hash] opts the optional parameters
347
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
348
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
349
- # @return [CreateWorkspaceWorkflowFromPreset201Response]
350
- describe 'create_workspace_workflow test' do
351
- it 'should work' do
352
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
353
- end
354
- end
355
-
356
- # unit tests for create_workspace_workflow_from_preset
357
- # Start a Workflow from a starting point
358
- # Makes your own copy of a starting point (`listWorkspaceWorkflowPresets`): a copy of every widget it chains (an ordinary private widget that serves the starting point's published code), a composition of your own on each copy (a draft, with the content, design, embed settings and tables of the original), and a draft workflow wired like the starting point's live version. The workflow is named as you ask, or after the starting point. Nothing you do to the copy reaches the starting point, and nothing its offerer changes afterwards reaches your copy. The workflow stays a draft: publish it when it is ready. A start takes a few seconds, because each widget is copied. Send an `Idempotency-Key` so that asking again after a timeout makes one copy. When a start fails (503 with `details.reason` `preset_copy_failed`) the compositions it made are removed again, so asking again is safe; the widget copies it made stay in the workspace as ordinary widgets. The workspace's limit of workflows is checked before anything is copied. A starting point that is not offered to you, or that can no longer be started, is 404. For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can start one.
359
- # @param workspace_id The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
360
- # @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
361
- # @param create_workspace_workflow_from_preset_request
362
- # @param [Hash] opts the optional parameters
363
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
364
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
365
- # @return [CreateWorkspaceWorkflowFromPreset201Response]
366
- describe 'create_workspace_workflow_from_preset test' do
367
- it 'should work' do
368
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
369
- end
370
- end
371
-
372
- # unit tests for delete_brand_kit
373
- # Reset the Brand Kit to the default
374
- # @param [Hash] opts the optional parameters
375
- # @option opts [String] :organization_id
376
- # @return [BrandKitViewResponse]
377
- describe 'delete_brand_kit test' do
378
- it 'should work' do
379
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
380
- end
381
- end
382
-
383
- # unit tests for delete_brand_kit_asset
384
- # Remove a font or icon from the Brand Kit
385
- # @param asset_id
386
- # @param [Hash] opts the optional parameters
387
- # @option opts [String] :organization_id
388
- # @return [BrandKitViewResponse]
389
- describe 'delete_brand_kit_asset test' do
390
- it 'should work' do
391
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
392
- end
393
- end
394
-
395
- # unit tests for delete_canvas
396
- # Delete Canvas
397
- # Deletes a canvas together with every widget on it. Called with an editor session, only a canvas whose widgets were all made for the session's managed user can be deleted; one that also holds somebody else's widgets is refused with 409 and `CANVAS_HAS_OTHER_WIDGETS`, and nothing is deleted. Delete such a canvas with your API key.
398
- # @param id ID of the canvas
399
- # @param [Hash] opts the optional parameters
400
- # @return [CanvasResponse]
401
- describe 'delete_canvas test' do
402
- it 'should work' do
403
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
404
- end
405
- end
406
-
407
- # unit tests for delete_composition
408
- # Delete Composition
409
- # Deletes a specific composition, and the data it keeps (the tables it declared and what visitors left in them).
410
- # @param id The ID of the composition to delete
411
- # @param [Hash] opts the optional parameters
412
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
413
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
414
- # @return [nil]
415
- describe 'delete_composition test' do
416
- it 'should work' do
417
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
418
- end
419
- end
420
-
421
- # unit tests for delete_composition_content_item
422
- # Delete a content list item
423
- # @param id
424
- # @param list
425
- # @param item_id
426
- # @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
427
- # @param [Hash] opts the optional parameters
428
- # @option opts [String] :if_match
429
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
430
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
431
- # @return [DeleteCompositionContentItemResponse]
432
- describe 'delete_composition_content_item test' do
433
- it 'should work' do
434
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
435
- end
436
- end
437
-
438
- # unit tests for delete_composition_data_source
439
- # Remove the composition data source binding
440
- # Removes the binding. Asking again, or asking for a composition that had none, is not an error: the composition has no data source afterwards, and that is all `removed: true` says.
441
- # @param id
442
- # @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
443
- # @param [Hash] opts the optional parameters
444
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
445
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
446
- # @return [DeleteCompositionDataSourceResponse]
447
- describe 'delete_composition_data_source test' do
448
- it 'should work' do
449
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
450
- end
451
- end
452
-
453
- # unit tests for delete_composition_database_record
454
- # Delete Record From Composition Database
455
- # Deletes a specific record from one of the composition's tables. Only the composition's own tables (made from its `databaseSchema` or from the tables its widget declares) can be reached; any other table name answers `404`.
456
- # @param id ID of the composition
457
- # @param table Name of the database table
458
- # @param record_id ID of the record to delete
459
- # @param [Hash] opts the optional parameters
460
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
461
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
462
- # @return [CreateCompositionDatabaseRecord201Response]
463
- describe 'delete_composition_database_record test' do
464
- it 'should work' do
465
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
466
- end
467
- end
468
-
469
- # unit tests for delete_composition_entry_items
470
- # Delete composition entry items by id or host context
471
- # Delete by comma-separated ids (1–100) or by context filters (not both). Rate limit 30 requests per minute.
472
- # @param id
473
- # @param table
474
- # @param [Hash] opts the optional parameters
475
- # @option opts [String] :ids
476
- # @option opts [Hash<String, String>] :context Host context filters as &#x60;context[key]&#x3D;value&#x60; (max 5 keys, counting dotted &#x60;context.key&#x60; too). Use &#x60;column.&lt;name&gt;&#x3D;value&#x60; for columns whose names collide with reserved parameters.
477
- # @option opts [Hash<String, String>] :filter Column filters as &#x60;filter[columnName]&#x3D;value&#x60; (same meaning as bare &#x60;columnName&#x3D;value&#x60; or &#x60;column.columnName&#x3D;value&#x60;; max 10 column filters counting all spellings). A plain &#x60;filter&#x3D;value&#x60; still filters a column named &#x60;filter&#x60;.
478
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
479
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
480
- # @return [CompositionEntryDeleteSuccess]
481
- describe 'delete_composition_entry_items test' do
482
- it 'should work' do
483
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
484
- end
485
- end
486
-
487
- # unit tests for delete_managed_user
488
- # Delete Managed User
489
- # Deletes a managed user by ID. Its editor sessions end with it. What was filed under it (compositions, widgets, uploads) stays in your account, untagged.
490
- # @param id ID of the managed user to delete
491
- # @param [Hash] opts the optional parameters
492
- # @return [DeleteManagedUser200Response]
493
- describe 'delete_managed_user test' do
494
- it 'should work' do
495
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
496
- end
497
- end
498
-
499
- # unit tests for delete_personal_workspace_domain
500
- # Stop allowing a website to show your widgets
501
- # Removes one entry from an account&#39;s own list. When it was the last one, nothing is restricted any more and a widget can be shown anywhere again. A change can take about 15 seconds to reach every server.
502
- # @param id The account the list belongs to. For your own, your own user id
503
- # @param domain_id The &#x60;id&#x60; of the entry, as the list shows it
504
- # @param [Hash] opts the optional parameters
505
- # @return [DeletePersonalWorkspaceDomainResponse]
506
- describe 'delete_personal_workspace_domain test' do
507
- it 'should work' do
508
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
509
- end
510
- end
511
-
512
- # unit tests for delete_user_api_key
513
- # Delete an API key
514
- # Deletes a key and the record of what it was used for. The key stops working at once on the server that took the request and within a minute on the others, and cannot be brought back: make a new one instead. To stop a key without losing it, switch it off with &#x60;updateUserApiKey&#x60;.
515
- # @param id The account the key belongs to
516
- # @param key_id The &#x60;keyId&#x60; of the key, as the list shows it
517
- # @param [Hash] opts the optional parameters
518
- # @return [DeleteUserApiKeyResponse]
519
- describe 'delete_user_api_key test' do
520
- it 'should work' do
521
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
522
- end
523
- end
524
-
525
- # unit tests for delete_workspace_workflow
526
- # Delete a Workflow
527
- # Deletes a workflow, in whatever state it is in (draft, live, paused or archived), with all its versions and counts. It cannot be undone: archive the workflow instead to keep it. The compositions it chained are not touched, and a page whose embed still names the workflow shows the embed&#39;s first composition, as for a paused one. Asking for a workflow that is already gone is \&quot;not found\&quot;. For personal workspace, use &#39;personal&#39; as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can delete.
528
- # @param workspace_id The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403.
529
- # @param workflow_id The workflow&#39;s id
530
- # @param [Hash] opts the optional parameters
531
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
532
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
533
- # @return [DeleteWorkspaceWorkflow200Response]
534
- describe 'delete_workspace_workflow test' do
535
- it 'should work' do
536
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
537
- end
538
- end
539
-
540
- # unit tests for describe_composition_entries
541
- # Describe What a Composition Keeps
542
- # Names the tables a composition&#39;s widget keeps entries in (the votes, ratings, answers or sign-ups its visitors left), their columns, and how many entries each holds. Call it first to learn the table and column names that &#x60;readCompositionEntries&#x60; takes. A widget that only shows content keeps nothing of its own: the answer is &#x60;hasData: false&#x60; with no tables, and that is not an error. A table that could not be counted has &#x60;rows: null&#x60;, which is not zero. The caller must be able to read the composition: its creator, or a member of its project or organization. An editor session cannot call this route.
543
- # @param id ID of the composition
544
- # @param [Hash] opts the optional parameters
545
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
546
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
547
- # @return [CompositionEntriesDescriptionResponse]
548
- describe 'describe_composition_entries test' do
549
- it 'should work' do
550
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
551
- end
552
- end
553
-
554
- # unit tests for discard_workspace_workflow_changes
555
- # Discard the Unpublished Changes of a Workflow
556
- # Puts the draft back to the live version (its graph and its time zone). Only for a workflow that has been published; one that never was has no live version to go back to. Names the &#x60;revision&#x60; the editor read. For personal workspace, use &#39;personal&#39; as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can discard.
557
- # @param workspace_id The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403.
558
- # @param workflow_id The workflow&#39;s id
559
- # @param publish_workspace_workflow_request
560
- # @param [Hash] opts the optional parameters
561
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
562
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
563
- # @return [CreateWorkspaceWorkflowFromPreset201Response]
564
- describe 'discard_workspace_workflow_changes test' do
565
- it 'should work' do
566
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
567
- end
568
- end
569
-
570
- # unit tests for duplicate_composition
571
- # Duplicate Composition
572
- # Creates a duplicate of an existing composition for the authenticated user. The duplicate is made after the answer: the call returns &#x60;202&#x60; with an &#x60;operationId&#x60;. Ask &#x60;GET /operations/{id}&#x60; for that operation until its &#x60;status&#x60; is &#x60;completed&#x60;; the new composition is named in &#x60;metadata.newCompositionId&#x60;. A problem with the duplicate&#39;s database (for example, tables that could not be made just now) is listed in &#x60;metadata.warnings&#x60;, which is absent when there is none. The &#x60;Idempotency-Key&#x60; header is required (&#x60;400&#x60; without it). Send the same key when you retry, so one duplicate is made, not two.
573
- # @param id ID of the composition to duplicate
574
- # @param idempotency_key Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
575
- # @param [Hash] opts the optional parameters
576
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
577
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
578
- # @option opts [DuplicateCompositionRequest] :duplicate_composition_request
579
- # @return [DuplicateComposition202Response]
580
- describe 'duplicate_composition test' do
581
- it 'should work' do
582
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
583
- end
584
- end
585
-
586
- # unit tests for duplicate_workspace_workflow
587
- # Duplicate a Workflow
588
- # Makes a draft copy of a workflow (its draft graph, not its versions or counts), named \&quot;&lt;name&gt; (copy)\&quot;. For personal workspace, use &#39;personal&#39; as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can duplicate.
589
- # @param workspace_id The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403.
590
- # @param workflow_id The workflow&#39;s id
591
- # @param idempotency_key Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
592
- # @param [Hash] opts the optional parameters
593
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
594
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
595
- # @return [CreateWorkspaceWorkflowFromPreset201Response]
596
- describe 'duplicate_workspace_workflow test' do
597
- it 'should work' do
598
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
599
- end
600
- end
601
-
602
- # unit tests for export_composition_entry_items
603
- # Export composition entry items
604
- # Streams up to 50,000 matching rows in batches of 1,000. Tables without cursor paging export at most one batch; when more rows exist the response sets &#x60;X-Widgetic-Export-Truncated: true&#x60;. Rate limit 20 requests per minute.
605
- # @param id
606
- # @param table
607
- # @param [Hash] opts the optional parameters
608
- # @option opts [String] :format
609
- # @option opts [String] :order &#x60;desc&#x60; (the default) lists the newest entry first, &#x60;asc&#x60; the oldest. Entries are sorted by their time, then by their id (compared as text, byte by byte) in the same direction, so the order of two entries made at the same instant is always the same; an entry with no time counts as the oldest. A table with no time column is sorted by its id. The managed-user feed sorts by time, then by composition id, table and id.
610
- # @option opts [Time] :since Only entries made at this time or later: &#x60;since&#x60; is INCLUSIVE (an entry made at exactly &#x60;since&#x60; is returned). A date and time with an offset, such as &#x60;2026-10-01T00:00:00Z&#x60;; anything else answers 400 &#x60;INVALID_SINCE&#x60;. An entry with no time never matches, and a table with no time column answers 400 &#x60;ENTRY_TABLE_HAS_NO_TIME&#x60;.
611
- # @option opts [Time] :_until Only entries made before this time: &#x60;until&#x60; is EXCLUSIVE (an entry made at exactly &#x60;until&#x60; is NOT returned), so &#x60;since&#x3D;A&amp;until&#x3D;B&#x60; followed by &#x60;since&#x3D;B&amp;until&#x3D;C&#x60; counts every entry once. Same form and same refusals as &#x60;since&#x60; (400 &#x60;INVALID_UNTIL&#x60;).
612
- # @option opts [Hash<String, String>] :context Host context filters as &#x60;context[key]&#x3D;value&#x60; (max 5 keys, counting dotted &#x60;context.key&#x60; too). Use &#x60;column.&lt;name&gt;&#x3D;value&#x60; for columns whose names collide with reserved parameters.
613
- # @option opts [Hash<String, String>] :filter Column filters as &#x60;filter[columnName]&#x3D;value&#x60; (same meaning as bare &#x60;columnName&#x3D;value&#x60; or &#x60;column.columnName&#x3D;value&#x60;; max 10 column filters counting all spellings). A plain &#x60;filter&#x3D;value&#x60; still filters a column named &#x60;filter&#x60;.
614
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
615
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
616
- # @return [String]
617
- describe 'export_composition_entry_items test' do
618
- it 'should work' do
619
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
620
- end
621
- end
622
-
623
- # unit tests for get_ai_answers_knowledge
624
- # See the documents a widget&#39;s AI answers from
625
- # The &#x60;ai-answers&#x60; adapter lets a widget answer a visitor&#39;s question with text an AI model writes from documents the widget&#39;s owner provides. This lists those documents, and how much room is left for more: &#x60;totals&#x60; carries the widget&#39;s limits next to what it uses. The list never contains what a document says, only which documents there are: their title, size and state. A &#x60;processing&#x60; document is not used to answer questions yet (or an add of it was interrupted: remove it and add it again). Add a document with &#x60;addAiAnswersKnowledgeDocument&#x60;; remove one with &#x60;removeAiAnswersKnowledgeDocument&#x60;. The caller must be allowed to see the widget: its owner, a partner for a customer it manages, or a Widgetic administrator. An API key needs the &#x60;content:read&#x60; scope.
626
- # @param id The widget (composition) whose documents to list
627
- # @param [Hash] opts the optional parameters
628
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
629
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
630
- # @return [GetAiAnswersKnowledge200Response]
631
- describe 'get_ai_answers_knowledge test' do
632
- it 'should work' do
633
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
634
- end
635
- end
636
-
637
- # unit tests for get_all_canvases
638
- # Get All Canvases
639
- # Retrieves all canvases with pagination support and filtering options. Pass &#x60;managedUserId&#x60; (Widgetic&#39;s id for one of your managed users) or &#x60;managedUserExternalId&#x60; (your own identifier for the user) to list only the canvases made for that managed user. The canvases of your other managed users, and your own, are left out. A managed user that is not yours, or does not exist, is answered with 404 and &#x60;MANAGED_USER_NOT_FOUND&#x60;. Called with an editor session, the list is always the session&#39;s managed user&#39;s.
640
- # @param [Hash] opts the optional parameters
641
- # @option opts [Integer] :page Page number for pagination
642
- # @option opts [Integer] :size Number of items per page
643
- # @option opts [String] :sort Sort field and direction (e.g., \&quot;created_at:desc\&quot;)
644
- # @option opts [Time] :created_after Filter canvases created after the specified date (ISO 8601 format)
645
- # @option opts [Time] :created_before Filter canvases created before the specified date (ISO 8601 format)
646
- # @option opts [Time] :updated_after Filter canvases updated after the specified date (ISO 8601 format)
647
- # @option opts [Time] :updated_before Filter canvases updated before the specified date (ISO 8601 format)
648
- # @option opts [String] :managed_user_id List only the canvases made for this managed user (Widgetic&#39;s id for the user). Send this or &#x60;managedUserExternalId&#x60;, not both.
649
- # @option opts [String] :managed_user_external_id List only the canvases made for the managed user you registered with this &#x60;externalId&#x60; (your own identifier for the user). Send this or &#x60;managedUserId&#x60;, not both.
650
- # @return [GetAllCanvasesResponse]
651
- describe 'get_all_canvases test' do
652
- it 'should work' do
653
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
654
- end
655
- end
656
-
657
- # unit tests for get_all_compositions
658
- # Get All Compositions
659
- # Retrieves all compositions with pagination support. Pass &#x60;managedUserId&#x60; (Widgetic&#39;s id for one of your managed users) or &#x60;managedUserExternalId&#x60; (your own identifier for the user) to list only the compositions made for that managed user. The compositions of your other managed users, and your own, are left out. It combines with the other filters and with paging. A managed user that is not yours, or does not exist, is answered with 404 and &#x60;MANAGED_USER_NOT_FOUND&#x60;. An editor session with the &#x60;creator&#x60; surface may call this to list the compositions of ONE widget it built: it must send &#x60;widgetId&#x60;, and the answer holds only the compositions made for the session&#39;s managed user.
660
- # @param [Hash] opts the optional parameters
661
- # @option opts [Integer] :page Page number for pagination
662
- # @option opts [Integer] :size Number of items per page
663
- # @option opts [String] :sort The order of the list, as &#x60;&lt;field&gt;:&lt;asc|desc&gt;&#x60;. The field is &#x60;createdAt&#x60;, &#x60;updatedAt&#x60;, &#x60;name&#x60; or &#x60;status&#x60; (the snake_case spelling, such as &#x60;created_at&#x60;, is read too). &#x60;asc&#x60; or &#x60;desc&#x60; alone orders by &#x60;createdAt&#x60;. Default: &#x60;createdAt:desc&#x60;. Any other field is a 400.
664
- # @option opts [String] :widget_id Filter compositions by widget ID
665
- # @option opts [String] :workspace Filter by workspace
666
- # @option opts [String] :project_folder Only the compositions in this project (the project&#39;s id).
667
- # @option opts [String] :status Only the compositions in this status. Without it, every status is listed.
668
- # @option opts [String] :managed_user_id List only the compositions made for this managed user (Widgetic&#39;s id for the user). Send this or &#x60;managedUserExternalId&#x60;, not both. Send it as &#x60;managedUserId&#x60;; the snake_case spelling &#x60;managed_user_id&#x60; is refused with a 400, not ignored.
669
- # @option opts [String] :managed_user_external_id List only the compositions made for the managed user you registered with this &#x60;externalId&#x60; (your own identifier for the user). Send this or &#x60;managedUserId&#x60;, not both.
670
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
671
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
672
- # @return [GetAllCompositions200Response]
673
- describe 'get_all_compositions test' do
674
- it 'should work' do
675
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
676
- end
677
- end
678
-
679
- # unit tests for get_all_managed_users
680
- # Get Managed Users
681
- # Retrieve the managed users you manage, with pagination support. (Admins see every partner&#39;s managed users.)
682
- # @param [Hash] opts the optional parameters
683
- # @option opts [Integer] :page Page number for pagination
684
- # @option opts [Integer] :size Number of items per page
685
- # @option opts [String] :sort Sort field and direction, &#x60;&lt;field&gt;:&lt;asc|desc&gt;&#x60;. The field is &#x60;createdAt&#x60;, &#x60;updatedAt&#x60; or &#x60;externalId&#x60; (the snake_case spellings &#x60;created_at&#x60;, &#x60;updated_at&#x60; and &#x60;external_id&#x60; work too); &#x60;asc&#x60; or &#x60;desc&#x60; alone sorts by &#x60;createdAt&#x60;. Any other field is a 400.
686
- # @return [GetAllManagedUsers200Response]
687
- describe 'get_all_managed_users test' do
688
- it 'should work' do
689
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
690
- end
691
- end
692
-
693
- # unit tests for get_brand_kit
694
- # The Brand Kit of the current workspace
695
- # The colors, fonts, icons, corner radius and style notes every widget made by this account is generated with. An account that never saved a kit gets Widgetic&#39;s default one (&#x60;isDefault&#x60; is true). A partner account&#39;s kit is the default for everything its keys create, and a key reads and changes the kit of the account it belongs to; there is no kit per managed user.
696
- # @param [Hash] opts the optional parameters
697
- # @option opts [String] :organization_id An organisation&#39;s kit; omit for the caller&#39;s current workspace.
698
- # @return [BrandKitViewResponse]
699
- describe 'get_brand_kit test' do
700
- it 'should work' do
701
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
702
- end
703
- end
704
-
705
- # unit tests for get_canvas
706
- # Get Canvas
707
- # Retrieves a specific canvas by ID.
708
- # @param id ID of the canvas
709
- # @param [Hash] opts the optional parameters
710
- # @return [CanvasResponse]
711
- describe 'get_canvas test' do
712
- it 'should work' do
713
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
714
- end
715
- end
716
-
717
- # unit tests for get_composition_by_id
718
- # Get Composition
719
- # Retrieves a specific composition by its ID. The answer carries &#x60;direct&#x60;, which says whether the widget the composition is made from is drawn straight into your page (&#x60;true&#x60;) or inside a frame (&#x60;false&#x60;), or &#x60;null&#x60; while the widget has no published version. Read it before you go live: a widget drawn without a frame writes its entries from your own page, so the public entry route looks at the website that page is on. While the composition&#39;s allowed list is empty (you have not restricted the allowed websites), every website may write; once you list websites, only those may, besides Widgetic&#39;s own sites, the visitor&#39;s own machine and your own platform. A widget in a frame writes from Widgetic&#39;s own frame and is accepted whatever the list says. The public JSON of the composition stays open to every website. For a composition a team shares (one filed under a project of an organization, or made in a Shopify store&#39;s workspace) the answer also carries &#x60;lastEditedBy&#x60; and &#x60;lastEditedAt&#x60;: who made the latest change and when, so that a teammate who opens it can be told \&quot;Anna changed this at 14:32\&quot;. A composition in a personal project leaves both out, and so does an answer given to an editor session or to a call made for one managed user: only a person is told who a teammate is.
720
- # @param id Composition ID
721
- # @param [Hash] opts the optional parameters
722
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
723
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
724
- # @return [CreateCompositionFromWidget201Response]
725
- describe 'get_composition_by_id test' do
726
- it 'should work' do
727
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
728
- end
729
- end
730
-
731
- # unit tests for get_composition_content
732
- # Get Current Content
733
- # Retrieves the current content of a composition
734
- # @param id ID of the composition
735
- # @param [Hash] opts the optional parameters
736
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
737
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
738
- # @return [GetCompositionContentResponse]
739
- describe 'get_composition_content test' do
740
- it 'should work' do
741
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
742
- end
743
- end
744
-
745
- # unit tests for get_composition_content_schema
746
- # Get Content Schema
747
- # Retrieves the content schema for a composition based on its widget type
748
- # @param id ID of the composition
749
- # @param [Hash] opts the optional parameters
750
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
751
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
752
- # @return [GetCompositionContentSchemaResponse]
753
- describe 'get_composition_content_schema test' do
754
- it 'should work' do
755
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
756
- end
757
- end
758
-
759
- # unit tests for get_composition_data_source
760
- # Read the composition data source binding
761
- # The data source that is bound to the composition: &#x60;url&#x60; and &#x60;refreshSeconds&#x60;. The answer&#39;s &#x60;data&#x60; is &#x60;null&#x60; when none is bound, and also when what is stored does not pass the rule for a public https address (a binding written by another path, such as the general embed-settings update, is never shown to a page unless it passes the same checks as this route).
762
- # @param id
763
- # @param [Hash] opts the optional parameters
764
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
765
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
766
- # @return [GetCompositionDataSourceResponse]
767
- describe 'get_composition_data_source test' do
768
- it 'should work' do
769
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
770
- end
771
- end
772
-
773
- # unit tests for get_composition_database_record
774
- # Get Record From Composition Database
775
- # Retrieves a specific record from one of the composition&#39;s tables. Only the composition&#39;s own tables (made from its &#x60;databaseSchema&#x60; or from the tables its widget declares) can be reached; any other table name answers &#x60;404&#x60;.
776
- # @param id ID of the composition
777
- # @param table Name of the database table
778
- # @param record_id ID of the record to retrieve
779
- # @param [Hash] opts the optional parameters
780
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
781
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
782
- # @return [CreateCompositionDatabaseRecord201Response]
783
- describe 'get_composition_database_record test' do
784
- it 'should work' do
785
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
786
- end
787
- end
788
-
789
- # unit tests for get_composition_database_records
790
- # Get All Records From Composition Database Table
791
- # Retrieves all records from one of the composition&#39;s tables. Only the composition&#39;s own tables (made from its &#x60;databaseSchema&#x60; or from the tables its widget declares) can be reached; any other table name answers &#x60;404&#x60;.
792
- # @param id ID of the composition
793
- # @param table Name of the database table
794
- # @param [Hash] opts the optional parameters
795
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
796
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
797
- # @return [GetCompositionDatabaseRecords200Response]
798
- describe 'get_composition_database_records test' do
799
- it 'should work' do
800
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
801
- end
802
- end
803
-
804
- # unit tests for get_composition_design
805
- # Get Composition Design
806
- # Retrieves only the design field from a composition.
807
- # @param id ID of the composition
808
- # @param [Hash] opts the optional parameters
809
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
810
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
811
- # @return [GetCompositionDesignResponse]
812
- describe 'get_composition_design test' do
813
- it 'should work' do
814
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
815
- end
816
- end
817
-
818
- # unit tests for get_composition_design_schema
819
- # Get Design Schema
820
- # Retrieves the design schema for a composition based on its widget type
821
- # @param id ID of the composition
822
- # @param [Hash] opts the optional parameters
823
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
824
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
825
- # @return [GetCompositionDesignSchemaResponse]
826
- describe 'get_composition_design_schema test' do
827
- it 'should work' do
828
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
829
- end
830
- end
831
-
832
- # unit tests for get_composition_embed_schema
833
- # Get Embed Schema
834
- # Retrieves the definition of the composition&#39;s Embed tab: which settings exist, what each one holds, what it defaults to, and when its control is shown. It is the third tab beside &#x60;schema/content&#x60; and &#x60;schema/design&#x60;, in the same format (&#x60;componentGroups&#x60; → &#x60;components&#x60; → &#x60;propertyGroups&#x60; → &#x60;properties&#x60;, each property with a &#x60;type&#x60;, a &#x60;defaultValue&#x60; and an &#x60;inputController&#x60;), so a client that draws those two tabs draws this one with the same code. The schema is the same for every composition (it is the one Widgetic&#39;s own Embed Editor draws). The composition id decides who may ask: the caller must be able to read the composition. Reading and saving the values: - &#x60;GET /compositions/{id}/embed-settings&#x60; returns what the composition saved. A composition whose Embed tab was never saved has nothing to return; seed the form from &#x60;defaults&#x60;, which holds the &#x60;defaultValue&#x60; of every setting that declares one. - &#x60;PUT /compositions/{id}&#x60; with &#x60;embedSettings&#x60; saves them. The gateway stores &#x60;embedSettings&#x60; as given and does not check it against this schema; the schema is how a client knows what to put there. A property&#39;s &#x60;visibilityCondition&#x60; says when its control is shown: &#x60;condition&#x60; is a comparison of the current values of the properties named in &#x60;dependsOn&#x60; (&#x60;useIframe &#x3D;&#x3D;&#x3D; false&#x60;, &#x60;embedTarget &#x3D;&#x3D;&#x3D; &#39;mixed&#39; &amp;&amp; keepDimensions &#x3D;&#x3D;&#x3D; false&#x60;). While it is false the Embed Editor does not show the control. A colour picker with &#x60;showOpacityControls&#x60; saves its opacity next to the colour, under the key &#x60;&lt;name&gt;_opacity&#x60; as a number from 0 to 1 (&#x60;overlayBackgroundColor&#x60; → &#x60;overlayBackgroundColor_opacity&#x60;). Its &#x60;defaultTransparency&#x60; is a percentage and the saved value a fraction (50 → 0.5).
835
- # @param id ID of the composition
836
- # @param [Hash] opts the optional parameters
837
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
838
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
839
- # @return [GetCompositionEmbedSchemaResponse]
840
- describe 'get_composition_embed_schema test' do
841
- it 'should work' do
842
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
843
- end
844
- end
845
-
846
- # unit tests for get_composition_embed_settings
847
- # Get Composition Embed Settings
848
- # Retrieves only the embedSettings field from a composition.
849
- # @param id ID of the composition
850
- # @param [Hash] opts the optional parameters
851
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
852
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
853
- # @return [GetCompositionEmbedSettingsResponse]
854
- describe 'get_composition_embed_settings test' do
855
- it 'should work' do
856
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
857
- end
858
- end
859
-
860
- # unit tests for get_composition_preview
861
- # Get Composition Preview
862
- # Returns the address of the page an editor shows the composition in: the page of the widget&#39;s published version on the CDN, with the widget and version it is. Load it in a frame, then send the frame what to show (the content, design and embed settings you read from the composition, and every change the user makes) with &#x60;postMessage&#x60;: &#x60;{ type: &#39;widgetic:update&#39;, design }&#x60;, &#x60;{ type: &#39;widgetic:update&#39;, content }&#x60; or &#x60;{ type: &#39;widgetic:update&#39;, contentItems }&#x60;. The version is the one embeds show, so the editor previews what a visitor gets. The address does not carry the composition id: an embed uses the id to fetch the saved composition itself, while an editor sends the current state (unsaved changes included). A widget that has never been published has no page to show: the answer is 409 &#x60;WIDGET_NOT_PUBLISHED&#x60;.
863
- # @param id ID of the composition
864
- # @param [Hash] opts the optional parameters
865
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
866
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
867
- # @return [GetCompositionPreviewResponse]
868
- describe 'get_composition_preview test' do
869
- it 'should work' do
870
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
871
- end
872
- end
873
-
874
- # unit tests for get_composition_versions
875
- # Get Composition Versions
876
- # Retrieves version history for a specific composition.
877
- # @param id Composition ID
878
- # @param [Hash] opts the optional parameters
879
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
880
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
881
- # @return [GetCompositionVersions200Response]
882
- describe 'get_composition_versions test' do
883
- it 'should work' do
884
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
885
- end
886
- end
887
-
888
- # unit tests for get_compositions_batch
889
- # Get Compositions Batch
890
- # Retrieves multiple compositions by their IDs in a single request. This endpoint includes domain validation for embed contexts and is used by the embed SDK. Each composition is checked on its own. If its owner listed the websites it may appear on (the workspace&#39;s domain list, or the &#x60;allowedDomains&#x60; of a partner the owner administers) and the request comes from another website (the &#x60;Origin&#x60; header, or the host of &#x60;Referer&#x60; when there is no &#x60;Origin&#x60;), that composition is left out of &#x60;compositions&#x60; and reported in &#x60;errors&#x60; as &#x60;Domain access denied: &lt;reason&gt;&#x60;; the others are still returned. A request that names no website, and an owner who listed nothing, are not restricted, and a page on the visitor&#39;s own machine (&#x60;localhost&#x60;, &#x60;127.0.0.1&#x60; or &#x60;[::1]&#x60;, on any port) is always allowed. So is the website where a partner integrates Widgetic, with every subdomain of it (&#x60;platformDomain&#x60; in the answer of &#x60;GET /partners/mine&#x60;), for the compositions of that partner: a partner&#39;s list never has to name it.
891
- # @param get_compositions_batch_request
892
- # @param [Hash] opts the optional parameters
893
- # @return [GetCompositionsBatchResponse]
894
- describe 'get_compositions_batch test' do
895
- it 'should work' do
896
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
897
- end
898
- end
899
-
900
- # unit tests for get_invoices_by_partner_id
901
- # List a partner&#39;s invoices
902
- # Lists the invoices issued to a partner, newest first. Each carries the price (&#x60;subtotal&#x60;), the tax on it (&#x60;taxAmount&#x60;) and what is paid (&#x60;total&#x60;), its status as the payment provider reports it, why the last payment failed (&#x60;failureReason&#x60;), and the page where it is paid (&#x60;hostedInvoiceUrl&#x60;). A partner reads its own: the caller must be the person who administers the partner (an API key of that account works), and anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can read any partner&#39;s and see exactly what the partner sees; the full records, with the internal fields, are &#x60;getAllInvoices&#x60; filtered by partner. The page is always bounded: &#x60;limit&#x60; defaults to 50 and is capped at 100, &#x60;offset&#x60; defaults to 0.
903
- # @param partner_id The partner whose invoices to list
904
- # @param [Hash] opts the optional parameters
905
- # @option opts [String] :status Only invoices with this status
906
- # @option opts [Integer] :limit Maximum number of invoices to return
907
- # @option opts [Integer] :offset Number of invoices to skip
908
- # @return [GetInvoicesByPartnerId200Response]
909
- describe 'get_invoices_by_partner_id test' do
910
- it 'should work' do
911
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
912
- end
913
- end
914
-
915
- # unit tests for get_managed_user_by_id
916
- # Get Managed User By ID
917
- # Retrieves a specific managed user by ID.
918
- # @param id ID of the managed user to retrieve
919
- # @param [Hash] opts the optional parameters
920
- # @return [ManagedUserResponse]
921
- describe 'get_managed_user_by_id test' do
922
- it 'should work' do
923
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
924
- end
925
- end
926
-
927
- # unit tests for get_managed_user_design_defaults
928
- # Read design defaults for one managed user
929
- # @param id
930
- # @param [Hash] opts the optional parameters
931
- # @return [GetPartnerDesignDefaults200Response]
932
- describe 'get_managed_user_design_defaults test' do
933
- it 'should work' do
934
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
935
- end
936
- end
937
-
938
- # unit tests for get_managed_user_entitlements
939
- # Get managed user entitlements
940
- # Retrieves all entitlements for a managed user (admin or partner access).
941
- # @param managed_user_id Managed user ID
942
- # @param [Hash] opts the optional parameters
943
- # @option opts [Boolean] :include_expired Include expired entitlements in results
944
- # @option opts [String] :feature Filter by specific feature
945
- # @option opts [String] :source Filter by entitlement source
946
- # @return [GetManagedUserEntitlementsResponse]
947
- describe 'get_managed_user_entitlements test' do
948
- it 'should work' do
949
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
950
- end
951
- end
952
-
953
- # unit tests for get_managed_user_limits
954
- # Read monthly credit cap and usage for one managed user
955
- # @param id
956
- # @param [Hash] opts the optional parameters
957
- # @return [GetManagedUserLimits200Response]
958
- describe 'get_managed_user_limits test' do
959
- it 'should work' do
960
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
961
- end
962
- end
963
-
964
- # unit tests for get_managed_user_storage_usage
965
- # Storage used by one managed user&#39;s uploads
966
- # @param id
967
- # @param [Hash] opts the optional parameters
968
- # @return [GetManagedUserStorageUsage200Response]
969
- describe 'get_managed_user_storage_usage test' do
970
- it 'should work' do
971
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
972
- end
973
- end
974
-
975
- # unit tests for get_managed_user_usage
976
- # What a managed user&#39;s editor sessions spent
977
- # Says how many credits the editor sessions of one of your managed users took from your account over a period, in total and for each operation. A generation costs one credit, taken from your account when it starts; one that fails is refunded and is counted as refunded, not as spent. Only what was spent through editor sessions is here, and only since usage was first recorded: what you spend with your API key, and anything from before, is not. Use it to see which of your users spend the most, or to charge them for it. To hold one session to a number of credits, set &#x60;max_credits&#x60; when you make it (&#x60;createManagedUserEditorSession&#x60;). The period runs from &#x60;startDate&#x60; (included) to &#x60;endDate&#x60; (not included): the 30 days before now when you give neither, and at most 366 days. A date without a time is midnight UTC at the start of that day, so for all of October give &#x60;startDate&#x3D;2026-10-01&#x60; and &#x60;endDate&#x3D;2026-11-01&#x60;.
978
- # @param id The managed user whose usage you want (Widgetic&#39;s id for the user)
979
- # @param [Hash] opts the optional parameters
980
- # @option opts [String] :start_date Start of the period, included: an ISO 8601 date (&#x60;2026-10-01&#x60;) or date-time with its offset (&#x60;2026-10-01T08:00:00Z&#x60;). Default: 30 days before &#x60;endDate&#x60;.
981
- # @option opts [String] :end_date End of the period, not included, in the same forms. Default: now. It must be after &#x60;startDate&#x60;, by at most 366 days.
982
- # @return [ManagedUserUsageResponse]
983
- describe 'get_managed_user_usage test' do
984
- it 'should work' do
985
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
986
- end
987
- end
988
-
989
- # unit tests for get_managed_users_by_manager_id
990
- # Get Managed Users By Manager
991
- # Retrieve managed users for a specific manager with pagination support.
992
- # @param manager_id ID of the manager
993
- # @param [Hash] opts the optional parameters
994
- # @option opts [Integer] :page Page number for pagination
995
- # @option opts [Integer] :size Number of items per page
996
- # @option opts [String] :sort Sort field and direction, &#x60;&lt;field&gt;:&lt;asc|desc&gt;&#x60;. The field is &#x60;createdAt&#x60;, &#x60;updatedAt&#x60; or &#x60;externalId&#x60; (the snake_case spellings &#x60;created_at&#x60;, &#x60;updated_at&#x60; and &#x60;external_id&#x60; work too); &#x60;asc&#x60; or &#x60;desc&#x60; alone sorts by &#x60;createdAt&#x60;. Any other field is a 400.
997
- # @return [GetManagedUsersByManagerIdResponse]
998
- describe 'get_managed_users_by_manager_id test' do
999
- it 'should work' do
1000
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1001
- end
1002
- end
1003
-
1004
- # unit tests for get_my_partners
1005
- # Find the partner you administer
1006
- # Returns the partner (nearly always one) that the signed-in account administers, with the id every other partner route asks for and the standing it is in: &#x60;active&#x60;, &#x60;inactive&#x60; (not activated yet), &#x60;suspended&#x60; (paused, with the reason Widgetic gave) or &#x60;payment_arrears&#x60; (a contract invoice is past its due date and unpaid, since &#x60;overdueSince&#x60;; the partner is stopped until it is paid). A partner API key is that account&#39;s key, so it reads its own partner here. An account that administers no partner is not refused: it gets &#x60;standing: not_a_partner&#x60; and an empty list, so a dashboard can tell \&quot;this is not a partner account\&quot; from \&quot;something failed\&quot;. The call stays open while the partner is paused, not yet active or in payment arrears: that is when its dashboard has to say why.
1007
- # @param [Hash] opts the optional parameters
1008
- # @return [MyPartnersResponse]
1009
- describe 'get_my_partners test' do
1010
- it 'should work' do
1011
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1012
- end
1013
- end
1014
-
1015
- # unit tests for get_partner_adapter_connections
1016
- # See which adapter keys a partner has connected
1017
- # Widget adapters are capabilities a widget can use, and some of them act through a service the account that made the widget has with a provider: an adapter that sends email needs an email provider key, one that sends texts needs an SMS provider key. For the widgets of the customers a partner manages, those keys are the partner&#39;s. This lists every key an adapter takes from a partner and whether the partner has connected it. An empty list means no adapter takes a key from a partner at the moment. The list never contains a key: only whether one is connected and when it was last set. Connect a key with &#x60;setPartnerAdapterConnection&#x60;; take it away with &#x60;removePartnerAdapterConnection&#x60;. A managed customer never holds a key: the widgets of a managed customer use the partner&#39;s, and never the personal key of the person who administers the partner. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
1018
- # @param partner_id The partner whose adapter keys to list
1019
- # @param [Hash] opts the optional parameters
1020
- # @return [GetUserAdapterConnections200Response]
1021
- describe 'get_partner_adapter_connections test' do
1022
- it 'should work' do
1023
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1024
- end
1025
- end
1026
-
1027
- # unit tests for get_partner_analytics_by_managed_user
1028
- # What each managed user&#39;s widgets did
1029
- # Lists every one of your managed users with what their widgets and compositions did in a period: views, interactions and visitors, and how many widgets and compositions they have made. A managed user whose widgets were not viewed is listed too, with zeros. The most viewed come first, and &#x60;page.hasMore&#x60; says whether more follow. Only the compositions made for a managed user count for it: file them under the user when you create them (&#x60;managedUserId&#x60; on &#x60;createComposition&#x60;), or let the user&#39;s editor session do it, which files everything under its user. What a visitor did with a composition that is not filed under anyone is in the summary of the whole account (&#x60;getPartnerAnalyticsSummary&#x60;) and in no managed user&#39;s row. The period works as it does for &#x60;getPartnerAnalyticsSummary&#x60;. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
1030
- # @param partner_id The partner whose managed users to report on
1031
- # @param [Hash] opts the optional parameters
1032
- # @option opts [String] :start_date Start of the period, included. An ISO 8601 date (&#x60;2026-10-01&#x60;) or date-time with its offset. Default 30 days before &#x60;endDate&#x60;.
1033
- # @option opts [String] :end_date End of the period, not included, in the same forms. Default now. At most 366 days after &#x60;startDate&#x60;.
1034
- # @option opts [Integer] :limit How many managed users to list at most
1035
- # @option opts [Integer] :offset How many managed users to skip
1036
- # @return [PartnerAnalyticsByManagedUserResponse]
1037
- describe 'get_partner_analytics_by_managed_user test' do
1038
- it 'should work' do
1039
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1040
- end
1041
- end
1042
-
1043
- # unit tests for get_partner_analytics_summary
1044
- # What was done with a partner&#39;s published widgets
1045
- # Counts what the visitors of the compositions made through your account did in a period: how many times a composition was **viewed**, how many times a visitor **interacted** with one, and how many different visitors there were. It covers every composition of your account, your own and the ones made for your managed users; narrow it to one managed user with &#x60;managedUserId&#x60; or &#x60;managedUserExternalId&#x60; (not both). The numbers come from the events the embedded widgets send while they are shown (the Widgetic embed SDK sends them by itself), counted when you ask. Only views and interactions are counted; the events that describe a visit (its start, its end, the device and the referrer) are not. The period runs from &#x60;startDate&#x60; (included) to &#x60;endDate&#x60; (not included): the 30 days before now when you give neither, and at most 366 days. A date without a time is midnight UTC at the start of that day, so for all of October give &#x60;startDate&#x3D;2026-10-01&#x60; and &#x60;endDate&#x3D;2026-11-01&#x60;. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
1046
- # @param partner_id The partner whose widgets to report on
1047
- # @param [Hash] opts the optional parameters
1048
- # @option opts [String] :start_date Start of the period, included. An ISO 8601 date (&#x60;2026-10-01&#x60;) or date-time with its offset (&#x60;2026-10-01T08:00:00Z&#x60;). Default 30 days before &#x60;endDate&#x60;.
1049
- # @option opts [String] :end_date End of the period, not included, in the same forms. Default now. It must be after &#x60;startDate&#x60;, by at most 366 days.
1050
- # @option opts [String] :managed_user_id Report only on this managed user (Widgetic&#39;s id for the user). Send this or &#x60;managedUserExternalId&#x60;, not both.
1051
- # @option opts [String] :managed_user_external_id Report only on the managed user you registered with this &#x60;externalId&#x60; (your own identifier for the user). Send this or &#x60;managedUserId&#x60;, not both.
1052
- # @return [PartnerAnalyticsSummaryResponse]
1053
- describe 'get_partner_analytics_summary test' do
1054
- it 'should work' do
1055
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1056
- end
1057
- end
1058
-
1059
- # unit tests for get_partner_analytics_timeline
1060
- # What was done with a partner&#39;s widgets, day by day
1061
- # Counts views, interactions and visitors for each day of a period (UTC days), oldest first, for a chart. Every day of the period is in the list, also one on which nothing happened (all zeros), so the list can be drawn as it is. Narrow it to one managed user with &#x60;managedUserId&#x60; or &#x60;managedUserExternalId&#x60; (not both). The period works as it does for &#x60;getPartnerAnalyticsSummary&#x60;; &#x60;startDate&#x60; and &#x60;endDate&#x60; are best given as dates, so that the first and the last day are whole days. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
1062
- # @param partner_id The partner whose widgets to report on
1063
- # @param [Hash] opts the optional parameters
1064
- # @option opts [String] :start_date Start of the period, included. An ISO 8601 date (&#x60;2026-10-01&#x60;) or date-time with its offset. Default 30 days before &#x60;endDate&#x60;.
1065
- # @option opts [String] :end_date End of the period, not included, in the same forms. Default now. At most 366 days after &#x60;startDate&#x60;.
1066
- # @option opts [String] :managed_user_id Report only on this managed user (Widgetic&#39;s id for the user). Send this or &#x60;managedUserExternalId&#x60;, not both.
1067
- # @option opts [String] :managed_user_external_id Report only on the managed user you registered with this &#x60;externalId&#x60;. Send this or &#x60;managedUserId&#x60;, not both.
1068
- # @return [PartnerAnalyticsTimelineResponse]
1069
- describe 'get_partner_analytics_timeline test' do
1070
- it 'should work' do
1071
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1072
- end
1073
- end
1074
-
1075
- # unit tests for get_partner_analytics_top_widgets
1076
- # Which widgets were viewed the most
1077
- # Lists the widgets whose compositions were viewed the most in a period, with their views, interactions, visitors and how many of their compositions were viewed. A widget that nobody viewed or used is not listed. The most viewed come first (then the most used), and at most &#x60;limit&#x60; are listed. Narrow it to one managed user with &#x60;managedUserId&#x60; or &#x60;managedUserExternalId&#x60; (not both). The period works as it does for &#x60;getPartnerAnalyticsSummary&#x60;. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
1078
- # @param partner_id The partner whose widgets to report on
1079
- # @param [Hash] opts the optional parameters
1080
- # @option opts [String] :start_date Start of the period, included. An ISO 8601 date (&#x60;2026-10-01&#x60;) or date-time with its offset. Default 30 days before &#x60;endDate&#x60;.
1081
- # @option opts [String] :end_date End of the period, not included, in the same forms. Default now. At most 366 days after &#x60;startDate&#x60;.
1082
- # @option opts [String] :managed_user_id Report only on this managed user (Widgetic&#39;s id for the user). Send this or &#x60;managedUserExternalId&#x60;, not both.
1083
- # @option opts [String] :managed_user_external_id Report only on the managed user you registered with this &#x60;externalId&#x60;. Send this or &#x60;managedUserId&#x60;, not both.
1084
- # @option opts [Integer] :limit How many widgets to list at most
1085
- # @return [PartnerAnalyticsTopWidgetsResponse]
1086
- describe 'get_partner_analytics_top_widgets test' do
1087
- it 'should work' do
1088
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1089
- end
1090
- end
1091
-
1092
- # unit tests for get_partner_billing_overview
1093
- # Get comprehensive partner billing overview
1094
- # Retrieves the partner&#39;s credits (&#x60;operationalCredits&#x60;), the partner&#39;s contract terms (&#x60;partnerCustomization&#x60;, the same fields as &#x60;getPartnerContract&#x60;) and billing integration status. Internal negotiation notes are not part of it. &#x60;operationalCredits&#x60; is the one account a partner has for its credits: the account of the person who administers it. It holds &#x60;balance&#x60; (the same balance &#x60;getPartnerCreditBalance&#x60; reads), &#x60;reservedBalance&#x60;, &#x60;availableBalance&#x60; (what a new operation can use) and &#x60;recentTransactions&#x60; (the ten newest entries of the ledger &#x60;getPartnerCreditTransactions&#x60; lists). A partner with no administrator has no account, and reads 0 and an empty list.
1095
- # @param partner_id Partner ID
1096
- # @param [Hash] opts the optional parameters
1097
- # @return [GetPartnerBillingOverview200Response]
1098
- describe 'get_partner_billing_overview test' do
1099
- it 'should work' do
1100
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1101
- end
1102
- end
1103
-
1104
- # unit tests for get_partner_contract
1105
- # Get a partner&#39;s contract
1106
- # Returns the commercial terms agreed with the partner: price, included credits and storage, billing cycle, commitment, support level, and the dates the contract runs between. A partner reads its own: the caller must be the person who administers the partner (an API key of that account works), and anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can read any partner&#39;s. Responds 404 while no contract has been recorded for the partner, which is the case until Widgetic sets its terms.
1107
- # @param partner_id The partner whose contract to read
1108
- # @param [Hash] opts the optional parameters
1109
- # @return [PartnerContractResponse]
1110
- describe 'get_partner_contract test' do
1111
- it 'should work' do
1112
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1113
- end
1114
- end
1115
-
1116
- # unit tests for get_partner_credit_balance
1117
- # Get partner credit balance
1118
- # Returns the credits the partner has, and how much of that is reserved by operations that are still running. A partner has ONE account for its credits: the account of the person who administers it, the same account its API key acts as. There is nothing else to create or to fund. What its customers&#39; editor sessions and its own API calls spend comes out of that account, and the credits a paid invoice carries are added to it, so this is the same balance &#x60;getUserCreditBalance&#x60; reads for that person. A partner with no administrator has no account to hold credits, and reads a balance of 0. Access: the person who administers the partner, or a Widgetic administrator.
1119
- # @param partner_id Partner ID
1120
- # @param [Hash] opts the optional parameters
1121
- # @return [AccountCreditBalanceResponse]
1122
- describe 'get_partner_credit_balance test' do
1123
- it 'should work' do
1124
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1125
- end
1126
- end
1127
-
1128
- # unit tests for get_partner_credit_transactions
1129
- # Get partner credit transaction history
1130
- # Lists what happened to the partner&#39;s credits, newest first: the entries of the credit ledger of the account of the person who administers it, the one account a partner has for its credits. Every operation that spends credits is a &#x60;debit&#x60; entry, and the credits an invoice carried arrive as &#x60;credit&#x60; entries when the invoice is paid, so this is also how the partner&#39;s usage is read. It is the same ledger &#x60;getUserCreditTransactions&#x60; reads for that person. A partner with no administrator has no account, and an empty ledger. The page is always bounded: &#x60;limit&#x60; defaults to 20 and is capped at 100, &#x60;offset&#x60; defaults to 0. Access: the person who administers the partner, or a Widgetic administrator.
1131
- # @param partner_id Partner ID
1132
- # @param [Hash] opts the optional parameters
1133
- # @option opts [Integer] :limit Number of transactions to return
1134
- # @option opts [Integer] :offset Number of transactions to skip
1135
- # @option opts [String] :type Only entries of this type, for instance &#x60;debit&#x60; for the credits spent. The types are listed on &#x60;AccountCreditTransaction&#x60;.
1136
- # @return [GetPartnerCreditTransactions200Response]
1137
- describe 'get_partner_credit_transactions test' do
1138
- it 'should work' do
1139
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1140
- end
1141
- end
1142
-
1143
- # unit tests for get_partner_data_database
1144
- # See the Neon database a partner keeps the data of its compositions in
1145
- # Returns the database set with &#x60;setPartnerDataDatabase&#x60;, without its password: the host, the database and the role, when it last passed the check, and why the latest re-check failed if it did. Responds 404 while the partner has no database of its own, which means the data of its compositions is kept by Widgetic. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
1146
- # @param partner_id The partner whose database to read
1147
- # @param [Hash] opts the optional parameters
1148
- # @return [PartnerDataDatabaseResponse]
1149
- describe 'get_partner_data_database test' do
1150
- it 'should work' do
1151
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1152
- end
1153
- end
1154
-
1155
- # unit tests for get_partner_design_defaults
1156
- # Read partner-wide design defaults
1157
- # @param partner_id
1158
- # @param [Hash] opts the optional parameters
1159
- # @return [GetPartnerDesignDefaults200Response]
1160
- describe 'get_partner_design_defaults test' do
1161
- it 'should work' do
1162
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1163
- end
1164
- end
1165
-
1166
- # unit tests for get_partner_entitlements
1167
- # Get partner entitlements
1168
- # Retrieves all entitlements for a partner (admin or partner access).
1169
- # @param partner_id Partner ID
1170
- # @param [Hash] opts the optional parameters
1171
- # @option opts [Boolean] :include_expired Include expired entitlements in results
1172
- # @option opts [String] :feature Filter by specific feature
1173
- # @option opts [String] :source Filter by entitlement source
1174
- # @return [GetPartnerEntitlementsResponse]
1175
- describe 'get_partner_entitlements test' do
1176
- it 'should work' do
1177
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1178
- end
1179
- end
1180
-
1181
- # unit tests for get_partner_entry_context_signing
1182
- # See how the context of your embeds is signed
1183
- # Says whether you have a secret to sign the &#x60;context&#x60; of your embeds with, when it was made, whether the secret it replaced is still accepted, and whether an entry without a valid signature is refused (&#x60;required&#x60;). The secret itself is never part of the answer: it is shown once, when it is made (&#x60;rotatePartnerEntryContextSecret&#x60;, which also explains what signing is for and how to sign). Signing covers the entries written through the gateway into the compositions of your managed users and into those of your own account. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
1184
- # @param partner_id The partner whose context signing to read
1185
- # @param [Hash] opts the optional parameters
1186
- # @return [PartnerEntryContextSigningResponse]
1187
- describe 'get_partner_entry_context_signing test' do
1188
- it 'should work' do
1189
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1190
- end
1191
- end
1192
-
1193
- # unit tests for get_partner_notification_settings
1194
- # Where your notifications go
1195
- # Returns who gets the emails, which events you want by email and by webhook, the address of your webhook, and whether it has a secret to sign with. The secret itself is never returned: it is shown once, when it is made. &#x60;events&#x60; lists every kind of event there is, for a settings screen. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
1196
- # @param partner_id The partner whose notification settings to read
1197
- # @param [Hash] opts the optional parameters
1198
- # @return [PartnerNotificationSettingsResponse]
1199
- describe 'get_partner_notification_settings test' do
1200
- it 'should work' do
1201
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1202
- end
1203
- end
1204
-
1205
- # unit tests for get_partner_storage_destination
1206
- # Get where a partner&#39;s uploaded files are stored
1207
- # Returns the partner&#39;s storage destination without its secret: the endpoint, bucket, folder and public address, the last four characters of the access key id, when the destination last passed the check, and why the latest re-check failed if it did. Responds 404 while the partner has no destination, which means the partner cannot be activated, its uploads are refused, and no editor session is made for its customers until a destination is set. The caller must be the person who administers the partner, or a Widgetic administrator.
1208
- # @param partner_id The partner whose storage destination to read
1209
- # @param [Hash] opts the optional parameters
1210
- # @return [PartnerStorageDestinationResponse]
1211
- describe 'get_partner_storage_destination test' do
1212
- it 'should work' do
1213
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1214
- end
1215
- end
1216
-
1217
- # unit tests for get_partner_storage_usage
1218
- # What a partner&#39;s customers store
1219
- # Says how many files, and how many bytes, your account keeps, in total and for each of your managed users, and how much of it is in Widgetic&#39;s storage and how much in your own storage destination (&#x60;setPartnerStorageDestination&#x60;). Use it to see which customers store the most, or to charge them for it. A file is counted for a managed user when it was filed under that user: by naming &#x60;managed_user_id&#x60; or &#x60;managed_user_external_id&#x60; when you upload it (&#x60;uploadsPost&#x60;, or the metadata of a resumable upload), or because it was uploaded through that user&#39;s editor session, which files everything under its user. The files that are not filed under anyone (your own, and the ones uploaded without naming a managed user) are the row whose &#x60;managedUserId&#x60; is null. Deleted files are not counted. To list the files of one managed user, use the &#x60;managed_user_id&#x60; filter of &#x60;uploadsGet&#x60;. The answer is counted when you ask, so it is always current. The groups are ordered by size, the heaviest first, and &#x60;page.hasMore&#x60; says whether more follow. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
1220
- # @param partner_id The partner whose storage to report on
1221
- # @param [Hash] opts the optional parameters
1222
- # @option opts [Integer] :limit How many managed users to list at most
1223
- # @option opts [Integer] :offset How many managed users to skip
1224
- # @return [PartnerStorageUsageResponse]
1225
- describe 'get_partner_storage_usage test' do
1226
- it 'should work' do
1227
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1228
- end
1229
- end
1230
-
1231
- # unit tests for get_personal_workspace_domains
1232
- # List the websites allowed to show your widgets
1233
- # Lists the websites on an account&#39;s own list, newest first. It is the list Widgetic checks when a widget of the account is embedded: when it holds at least one website, the widget is shown on those websites (and on Widgetic&#39;s own) and nowhere else; when it is empty, the widget can be shown anywhere. If the account administers a partner, the websites set on the partner record by Widgetic are added to them. Widgets that belong to an organization use the organization&#39;s list instead. The answer holds the whole list, however long it is: a partner&#39;s list has no limit.
1234
- # @param id The account the list belongs to. For your own, your own user id
1235
- # @param [Hash] opts the optional parameters
1236
- # @return [GetPersonalWorkspaceDomains200Response]
1237
- describe 'get_personal_workspace_domains test' do
1238
- it 'should work' do
1239
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1240
- end
1241
- end
1242
-
1243
- # unit tests for get_public_composition_embed
1244
- # Resolve a composition UUID to a published widget URL
1245
- # Public customer embed lookup. No API key. Used by embed-sdk.js on third-party sites. If the composition&#39;s owner listed the websites it may appear on (the workspace&#39;s domain list, or the &#x60;allowedDomains&#x60; of a partner the owner administers), a request from any other website is refused with 403 &#x60;DOMAIN_NOT_ALLOWED&#x60;. The website is read from the &#x60;Origin&#x60; header, or the host of &#x60;Referer&#x60; when there is no &#x60;Origin&#x60;; a request that names neither (a server, a tool) is not refused. An owner who listed nothing is not restricted, and a page on the visitor&#39;s own machine (&#x60;localhost&#x60;, &#x60;127.0.0.1&#x60; or &#x60;[::1]&#x60;, on any port) is always allowed. So is the website where a partner integrates Widgetic, with every subdomain of it (&#x60;platformDomain&#x60; in the answer of &#x60;GET /partners/mine&#x60;), for the widgets of that partner: a partner&#39;s list never has to name it. The list stops other websites from showing the embed in a visitor&#39;s browser; it does not hide the published content from someone who holds the composition ID. **Address.** &#x60;https://api.widgetic.com/embed/compositions/{compositionId}&#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. **Limit.** 500 calls for each visitor address and browser in one counting window, shared with the frame and the status routes. Over it the answer is 429 &#x60;RATE_LIMITED&#x60; with a &#x60;Retry-After&#x60; header.
1246
- # @param composition_id
1247
- # @param [Hash] opts the optional parameters
1248
- # @return [GetPublicCompositionEmbed200Response]
1249
- describe 'get_public_composition_embed test' do
1250
- it 'should work' do
1251
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1252
- end
1253
- end
1254
-
1255
- # unit tests for get_public_composition_iframe
1256
- # Embed a published composition with its saved values
1257
- # Public HTML wrapper with an inner published artifact iframe. No API key or SDK required. If the composition&#39;s owner 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, and the website where the partner the owner administers integrates Widgetic, with its subdomains), so a browser refuses to show it inside any other website whatever &#x60;Referer&#x60; policy that website uses. Opening the address directly still works. An owner who listed nothing is not restricted. **Address.** &#x60;https://api.widgetic.com/embed/compositions/{compositionId}/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.
1258
- # @param composition_id
1259
- # @param [Hash] opts the optional parameters
1260
- # @return [String]
1261
- describe 'get_public_composition_iframe test' do
1262
- it 'should work' do
1263
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1264
- end
1265
- end
1266
-
1267
- # unit tests for get_public_workflow
1268
- # Read the published Workflow of an embed
1269
- # 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.
1270
- # @param workflow_id
1271
- # @param [Hash] opts the optional parameters
1272
- # @return [GetPublicWorkflow200Response]
1273
- describe 'get_public_workflow test' do
1274
- it 'should work' do
1275
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1276
- end
1277
- end
1278
-
1279
- # unit tests for get_public_workflow_frame
1280
- # Show a published Workflow in a page of its own
1281
- # 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.
1282
- # @param workflow_id
1283
- # @param [Hash] opts the optional parameters
1284
- # @return [String]
1285
- describe 'get_public_workflow_frame test' do
1286
- it 'should work' do
1287
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1288
- end
1289
- end
1290
-
1291
- # unit tests for get_public_workflow_version
1292
- # Read one published version of a Workflow
1293
- # 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.
1294
- # @param workflow_id
1295
- # @param version_id
1296
- # @param [Hash] opts the optional parameters
1297
- # @return [GetPublicWorkflow200Response]
1298
- describe 'get_public_workflow_version test' do
1299
- it 'should work' do
1300
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1301
- end
1302
- end
1303
-
1304
- # unit tests for get_user_adapter_connections
1305
- # See which adapter keys an account has connected
1306
- # Widget adapters are capabilities a widget can use, and some of them act through a service the owner has an account with: an adapter that sends email needs the owner&#39;s email provider key, one that sends texts needs the owner&#39;s SMS provider key. This lists every key an adapter takes from an owner and whether this account has connected it, so a settings page can show what is missing. An empty list means no adapter takes a key from an owner at the moment. The list never contains a key: only whether one is connected and when it was last set. Connect a key with &#x60;setUserAdapterConnection&#x60;; take it away with &#x60;removeUserAdapterConnection&#x60;. The widgets of customers a partner manages use the partner&#39;s keys instead (&#x60;getPartnerAdapterConnections&#x60;). The caller must be the account itself (an API key of that account works, with the &#x60;account:read&#x60; scope), or a Widgetic administrator.
1307
- # @param user_id The account whose adapter keys to list. For your own, your own user id
1308
- # @param [Hash] opts the optional parameters
1309
- # @return [GetUserAdapterConnections200Response]
1310
- describe 'get_user_adapter_connections test' do
1311
- it 'should work' do
1312
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1313
- end
1314
- end
1315
-
1316
- # unit tests for get_user_api_key_usage_logs
1317
- # Read what an API key was used for
1318
- # Lists the calls made with one key, newest first: when, which path and method, and the status each ended with. Use it to see whether a key is still in use before deleting it, or to see what a key that should not be in use has been doing.
1319
- # @param id The account the key belongs to
1320
- # @param key_id The &#x60;keyId&#x60; of the key, as the list shows it
1321
- # @param [Hash] opts the optional parameters
1322
- # @option opts [Integer] :limit How many calls to return, newest first
1323
- # @return [GetUserApiKeyUsageLogsResponse]
1324
- describe 'get_user_api_key_usage_logs test' do
1325
- it 'should work' do
1326
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1327
- end
1328
- end
1329
-
1330
- # unit tests for get_user_api_keys
1331
- # List the API keys of an account
1332
- # Lists the API keys of an account, in the order they were made: name, the first characters of the key, when it was made, when it expires, when it was last used, whether it is switched on and what it is limited to (&#x60;scopes&#x60; and &#x60;preset&#x60;). The secret of a key is never part of the list. A caller can list its own account&#39;s keys; Widgetic staff can list any account&#39;s.
1333
- # @param id The account the keys belong to. For your own keys, your own user id
1334
- # @param [Hash] opts the optional parameters
1335
- # @return [GetUserApiKeys200Response]
1336
- describe 'get_user_api_keys test' do
1337
- it 'should work' do
1338
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1339
- end
1340
- end
1341
-
1342
- # unit tests for get_user_credit_balance
1343
- # Get an account&#39;s credit balance
1344
- # Returns the credits an account holds: the balance, and how much of it is reserved by operations that are still running. An account reads its own balance; with a partner&#39;s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account&#39;s. An account that has never held credits reads a balance of 0. &#x60;getPartnerCreditBalance&#x60; reads this same balance by partner id.
1345
- # @param user_id The account whose balance to read
1346
- # @param [Hash] opts the optional parameters
1347
- # @return [AccountCreditBalanceResponse]
1348
- describe 'get_user_credit_balance test' do
1349
- it 'should work' do
1350
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1351
- end
1352
- end
1353
-
1354
- # unit tests for get_user_credit_transactions
1355
- # List an account&#39;s credit ledger
1356
- # Lists the entries of an account&#39;s credit ledger, newest first. This is also how an account&#39;s usage is read: every operation that spends credits is a &#x60;debit&#x60; entry, so summing the &#x60;debit&#x60; entries over a period gives the credits consumed in it, and the other types give what was added. An account reads its own ledger; with a partner&#39;s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account&#39;s. &#x60;getPartnerCreditTransactions&#x60; reads this same ledger by partner id. The page is always bounded: &#x60;limit&#x60; defaults to 100 and is capped at 500, &#x60;offset&#x60; defaults to 0.
1357
- # @param user_id The account whose ledger to read
1358
- # @param [Hash] opts the optional parameters
1359
- # @option opts [String] :transaction_type Only entries of this type, for instance &#x60;debit&#x60; for the credits spent. The types are listed on &#x60;AccountCreditTransaction&#x60;.
1360
- # @option opts [Integer] :limit Maximum number of entries to return
1361
- # @option opts [Integer] :offset Number of entries to skip
1362
- # @return [GetPartnerCreditTransactions200Response]
1363
- describe 'get_user_credit_transactions test' do
1364
- it 'should work' do
1365
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1366
- end
1367
- end
1368
-
1369
- # unit tests for get_widgets
1370
- # List Widgets
1371
- # Lists the widgets your account owns, newest first. A widget is the reusable piece a composition is made from; this is your own library, not a catalogue of Widgetic&#39;s widgets. Pass &#x60;page&#x60; (counting from 1) and &#x60;size&#x60; (1 to 100, 20 when left out) to read the list one page at a time. &#x60;meta&#x60; then carries &#x60;total&#x60;, &#x60;hasNextPage&#x60; and &#x60;hasPreviousPage&#x60;, so a client can walk the list to its end. A page past the end is an empty list. Without &#x60;page&#x60; and &#x60;size&#x60; the call returns the whole list in one response, which only suits an account with a few widgets. Pass &#x60;canvasId&#x60; to list only the widgets on one of your canvases. That list is always returned whole, whatever &#x60;page&#x60; and &#x60;size&#x60; say. Pass &#x60;managedUserId&#x60; (Widgetic&#39;s id for one of your managed users) or &#x60;managedUserExternalId&#x60; (your own identifier for the user) to list only the widgets made for that managed user. The widgets of your other managed users, and your own, are left out. It combines with &#x60;page&#x60;, &#x60;size&#x60; and &#x60;canvasId&#x60;. A managed user that is not yours, or does not exist, is answered with 404 and &#x60;MANAGED_USER_NOT_FOUND&#x60;.
1372
- # @param [Hash] opts the optional parameters
1373
- # @option opts [Integer] :page Page to return, counting from 1. Giving &#x60;page&#x60; or &#x60;size&#x60; turns paging on.
1374
- # @option opts [Integer] :size How many widgets a page holds (20 when &#x60;page&#x60; is given without it). Giving &#x60;page&#x60; or &#x60;size&#x60; turns paging on.
1375
- # @option opts [String] :canvas_id List only the widgets on this canvas. The list is returned whole.
1376
- # @option opts [String] :managed_user_id List only the widgets made for this managed user (Widgetic&#39;s id for the user). Send this or &#x60;managedUserExternalId&#x60;, not both.
1377
- # @option opts [String] :managed_user_external_id List only the widgets made for the managed user you registered with this &#x60;externalId&#x60; (your own identifier for the user). Send this or &#x60;managedUserId&#x60;, not both.
1378
- # @return [GetWidgets200Response]
1379
- describe 'get_widgets test' do
1380
- it 'should work' do
1381
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1382
- end
1383
- end
1384
-
1385
- # unit tests for get_widgets_batch
1386
- # Get Widgets Batch
1387
- # Retrieves multiple widgets by their IDs in a single request. An id that is not found, or that is not yours, is reported in &#x60;errors&#x60; exactly like one that does not exist. Called with an editor session, only the widgets made for the session&#39;s managed user are returned.
1388
- # @param get_widgets_batch_request
1389
- # @param [Hash] opts the optional parameters
1390
- # @return [GetWidgetsBatchResponse]
1391
- describe 'get_widgets_batch test' do
1392
- it 'should work' do
1393
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1394
- end
1395
- end
1396
-
1397
- # unit tests for get_workspace_workflow
1398
- # Get a Workflow
1399
- # Reads a workflow with its draft graph and the version that is live. For personal workspace, use &#39;personal&#39; as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read it.
1400
- # @param workspace_id The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403.
1401
- # @param workflow_id The workflow&#39;s id
1402
- # @param [Hash] opts the optional parameters
1403
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1404
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1405
- # @return [CreateWorkspaceWorkflowFromPreset201Response]
1406
- describe 'get_workspace_workflow test' do
1407
- it 'should work' do
1408
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1409
- end
1410
- end
1411
-
1412
- # unit tests for get_workspace_workflow_stats
1413
- # Get what Visitors Did in a Workflow
1414
- # Counts per block and per connection over a range of UTC days (the last 30 days when not given, up to 366), for one version or for all of them. Only counts: how many visitors reached a block, took a connection, or could not be moved on. No visitor and no value a visitor typed is ever stored. For personal workspace, use &#39;personal&#39; as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read.
1415
- # @param workspace_id The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403.
1416
- # @param workflow_id The workflow&#39;s id
1417
- # @param [Hash] opts the optional parameters
1418
- # @option opts [String] :version_id Count one version only
1419
- # @option opts [String] :from First UTC day (YYYY-MM-DD)
1420
- # @option opts [String] :to Last UTC day (YYYY-MM-DD)
1421
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1422
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1423
- # @return [GetWorkspaceWorkflowStats200Response]
1424
- describe 'get_workspace_workflow_stats test' do
1425
- it 'should work' do
1426
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1427
- end
1428
- end
1429
-
1430
- # unit tests for get_workspace_workflow_version
1431
- # Get a Published Version of a Workflow
1432
- # One published version with its graph, for the read-only preview and for the Runs view. For personal workspace, use &#39;personal&#39; as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read.
1433
- # @param workspace_id The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403.
1434
- # @param workflow_id The workflow&#39;s id
1435
- # @param version_id The id of a published version of the workflow
1436
- # @param [Hash] opts the optional parameters
1437
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1438
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1439
- # @return [GetWorkspaceWorkflowVersion200Response]
1440
- describe 'get_workspace_workflow_version test' do
1441
- it 'should work' do
1442
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1443
- end
1444
- end
1445
-
1446
- # unit tests for list_composition_entry_items
1447
- # List composition entry items with paging and filters
1448
- # Reads one widget table with cursor paging (time then id in byte order), optional since/until on the time column, and up to five context filters plus ten column filters. Rate limit 120 requests per minute. Each read batch uses a 5 s statement timeout.
1449
- # @param id
1450
- # @param table
1451
- # @param [Hash] opts the optional parameters
1452
- # @option opts [Integer] :limit
1453
- # @option opts [String] :order &#x60;desc&#x60; (the default) lists the newest entry first, &#x60;asc&#x60; the oldest. Entries are sorted by their time, then by their id (compared as text, byte by byte) in the same direction, so the order of two entries made at the same instant is always the same; an entry with no time counts as the oldest. A table with no time column is sorted by its id. The managed-user feed sorts by time, then by composition id, table and id.
1454
- # @option opts [Time] :since Only entries made at this time or later: &#x60;since&#x60; is INCLUSIVE (an entry made at exactly &#x60;since&#x60; is returned). A date and time with an offset, such as &#x60;2026-10-01T00:00:00Z&#x60;; anything else answers 400 &#x60;INVALID_SINCE&#x60;. An entry with no time never matches, and a table with no time column answers 400 &#x60;ENTRY_TABLE_HAS_NO_TIME&#x60;.
1455
- # @option opts [Time] :_until Only entries made before this time: &#x60;until&#x60; is EXCLUSIVE (an entry made at exactly &#x60;until&#x60; is NOT returned), so &#x60;since&#x3D;A&amp;until&#x3D;B&#x60; followed by &#x60;since&#x3D;B&amp;until&#x3D;C&#x60; counts every entry once. Same form and same refusals as &#x60;since&#x60; (400 &#x60;INVALID_UNTIL&#x60;).
1456
- # @option opts [String] :cursor
1457
- # @option opts [Hash<String, String>] :context Host context filters as &#x60;context[key]&#x3D;value&#x60; (max 5 keys, counting dotted &#x60;context.key&#x60; too). Use &#x60;column.&lt;name&gt;&#x3D;value&#x60; for columns whose names collide with reserved parameters.
1458
- # @option opts [Hash<String, String>] :filter Column filters as &#x60;filter[columnName]&#x3D;value&#x60; (same meaning as bare &#x60;columnName&#x3D;value&#x60; or &#x60;column.columnName&#x3D;value&#x60;; max 10 column filters counting all spellings). A plain &#x60;filter&#x3D;value&#x60; still filters a column named &#x60;filter&#x60;.
1459
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1460
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1461
- # @return [CompositionEntryItemsPageSuccess]
1462
- describe 'list_composition_entry_items test' do
1463
- it 'should work' do
1464
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1465
- end
1466
- end
1467
-
1468
- # unit tests for list_managed_user_entries
1469
- # List entries across a managed user&#39;s compositions
1470
- # Merges eligible tables (time and id columns) across the managed user&#39;s compositions in global time order, then compositionId, table, and id (byte order). Only tables with both a time and an id column take part. Rate limit 30 requests per minute.
1471
- # @param id
1472
- # @param [Hash] opts the optional parameters
1473
- # @option opts [String] :composition_id
1474
- # @option opts [String] :table
1475
- # @option opts [Integer] :limit
1476
- # @option opts [String] :order &#x60;desc&#x60; (the default) lists the newest entry first, &#x60;asc&#x60; the oldest. Entries are sorted by their time, then by their id (compared as text, byte by byte) in the same direction, so the order of two entries made at the same instant is always the same; an entry with no time counts as the oldest. A table with no time column is sorted by its id. The managed-user feed sorts by time, then by composition id, table and id.
1477
- # @option opts [Time] :since Only entries made at this time or later: &#x60;since&#x60; is INCLUSIVE (an entry made at exactly &#x60;since&#x60; is returned). A date and time with an offset, such as &#x60;2026-10-01T00:00:00Z&#x60;; anything else answers 400 &#x60;INVALID_SINCE&#x60;. An entry with no time never matches, and a table with no time column answers 400 &#x60;ENTRY_TABLE_HAS_NO_TIME&#x60;.
1478
- # @option opts [Time] :_until Only entries made before this time: &#x60;until&#x60; is EXCLUSIVE (an entry made at exactly &#x60;until&#x60; is NOT returned), so &#x60;since&#x3D;A&amp;until&#x3D;B&#x60; followed by &#x60;since&#x3D;B&amp;until&#x3D;C&#x60; counts every entry once. Same form and same refusals as &#x60;since&#x60; (400 &#x60;INVALID_UNTIL&#x60;).
1479
- # @option opts [String] :cursor
1480
- # @option opts [Hash<String, String>] :context Host context filters as &#x60;context[key]&#x3D;value&#x60; (max 5 keys, counting dotted &#x60;context.key&#x60; too). Use &#x60;column.&lt;name&gt;&#x3D;value&#x60; for columns whose names collide with reserved parameters.
1481
- # @option opts [Hash<String, String>] :filter Column filters as &#x60;filter[columnName]&#x3D;value&#x60; (same meaning as bare &#x60;columnName&#x3D;value&#x60; or &#x60;column.columnName&#x3D;value&#x60;; max 10 column filters counting all spellings). A plain &#x60;filter&#x3D;value&#x60; still filters a column named &#x60;filter&#x60;.
1482
- # @return [ManagedUserEntriesPageSuccess]
1483
- describe 'list_managed_user_entries test' do
1484
- it 'should work' do
1485
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1486
- end
1487
- end
1488
-
1489
- # unit tests for list_partner_notification_deliveries
1490
- # How your notifications reached you
1491
- # Lists the sends of your notifications, the newest first: each email to one address and each call to your webhook, with whether it was delivered, when it is tried again if not, how many attempts it had, and why the last one failed. Use it to find out why a webhook of yours did not receive an event. An email counts as delivered when it was handed to the mail service; a call to your webhook counts as delivered when your endpoint answered with a 2xx status. Anything else is tried again, after 1 minute, then 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours and a day, eight attempts in all, because your address is read again at each attempt and you may have mended it. Two answers end the delivery at once: &#x60;410 Gone&#x60; and &#x60;413 Payload Too Large&#x60;. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
1492
- # @param partner_id The partner whose deliveries to list
1493
- # @param [Hash] opts the optional parameters
1494
- # @option opts [Integer] :limit How many deliveries to list at most
1495
- # @return [PartnerNotificationDeliveryLogResponse]
1496
- describe 'list_partner_notification_deliveries test' do
1497
- it 'should work' do
1498
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1499
- end
1500
- end
1501
-
1502
- # unit tests for list_partner_notifications
1503
- # What your partner account was told
1504
- # Lists the notifications of a partner, the newest first: the invoices Widgetic issued and their payments, the reminders to pay them, a warning when your credits run low, and the changes to the standing of the account (activated, paused, resumed). It is the same list your dashboard shows, and each entry is what your webhook receives as &#x60;data&#x60; when you have one (&#x60;updatePartnerNotificationSettings&#x60;). A page holds &#x60;limit&#x60; notifications (20 by default, at most 100). When there are older ones &#x60;nextBefore&#x60; is set: ask again with it as &#x60;before&#x60; to get the next page. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
1505
- # @param partner_id The partner whose notifications to list
1506
- # @param [Hash] opts the optional parameters
1507
- # @option opts [Integer] :limit How many notifications to list at most
1508
- # @option opts [Time] :before Only the notifications made before this moment. Give the &#x60;nextBefore&#x60; of the previous page.
1509
- # @return [PartnerNotificationPageResponse]
1510
- describe 'list_partner_notifications test' do
1511
- it 'should work' do
1512
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1513
- end
1514
- end
1515
-
1516
- # unit tests for list_partner_presets
1517
- # List the widgets a partner offers as presets
1518
- # Returns the partner&#39;s presets, ordered by &#x60;position&#x60; and then by &#x60;key&#x60;: the widgets it offers its managed users as starting points. The list is the same for every managed user. Use a preset in one of two ways: - **Make a composition of it** (the content and design editor): call &#x60;createComposition&#x60; with the preset&#39;s &#x60;widgetId&#x60; and the managed user. The widget itself stays yours; a composition is the user&#39;s own content. - **Give the user a copy to build on** (the widget creator): call &#x60;copyPresetForManagedUser&#x60;. The user gets a widget and a canvas of their own. Presets are not the same as the widgets Widgetic puts on every new Widgetic account. Those are chosen by Widgetic and are copied at sign-up. A preset here is yours, and is copied only when you ask. The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator.
1519
- # @param partner_id The partner whose presets to list
1520
- # @param [Hash] opts the optional parameters
1521
- # @return [ListPartnerPresets200Response]
1522
- describe 'list_partner_presets test' do
1523
- it 'should work' do
1524
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1525
- end
1526
- end
1527
-
1528
- # unit tests for list_partner_workflow_presets
1529
- # List the workflows a partner offers as places to start
1530
- # The partner&#39;s starting points, ordered by &#x60;position&#x60; and then by &#x60;key&#x60;: the published workflows it offers its managed users when they make a new workflow. Each says whether people can start from it now and, when they cannot, why. The list is the same for every managed user, and a managed user is shown only what is available. A starting point is one of the partner account&#39;s own published workflows, built from compositions the account made for itself (not for a customer or a team) and from widgets the partner already offers as presets (&#x60;setPartnerPreset&#x60;), and it uses at most 10 widgets. A partner offers up to 50. The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator.
1531
- # @param partner_id The partner whose starting points to list
1532
- # @param [Hash] opts the optional parameters
1533
- # @return [ListPartnerWorkflowPresets200Response]
1534
- describe 'list_partner_workflow_presets test' do
1535
- it 'should work' do
1536
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1537
- end
1538
- end
1539
-
1540
- # unit tests for list_workspace_workflow_composition_options
1541
- # List the compositions a workflow can show, and what each can do
1542
- # The workspace&#39;s compositions as the workflow editor offers them, newest first. For each one: whether it can be shown (its widget has a published version), the websites it may be embedded on, and which triggers it supports. - **Input added** (&#x60;inputs&#x60;) is enabled only for a composition that declares at least one table a visitor&#39;s entries can be written to. Its &#x60;tables&#x60; are all of them; its &#x60;fields&#x60; are the columns a rule may read (not &#x60;id&#x60; and &#x60;created_at&#x60;, not a column that is not text, a number or yes/no, and not one whose name says it holds a person&#39;s private details, such as an email or a phone number). - **Action in the widget** (&#x60;actions&#x60;) is enabled only when the published widget version declares at least one goal. Its &#x60;items&#x60; are the goals a trigger can wait for. When one of them is not enabled, &#x60;reason&#x60; says why (&#x60;widget_keeps_no_data&#x60;, &#x60;widget_reports_no_actions&#x60; or &#x60;widget_not_published&#x60;), so the editor can show the trigger disabled with an explanation. Publishing checks every reference again against what the composition can do at that moment. For personal workspace, use &#39;personal&#39; as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read it.
1543
- # @param workspace_id The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403.
1544
- # @param [Hash] opts the optional parameters
1545
- # @option opts [String] :search Text the composition&#39;s name must contain
1546
- # @option opts [String] :ids Only these compositions (comma-separated ids, at most 50), those of them you may see. Ask for the compositions a workflow shows with this, so each is found whatever page it would be on. An id you may not see is left out, as one that does not exist is.
1547
- # @option opts [Integer] :limit Page size (1-100, 50 when not given)
1548
- # @option opts [Integer] :offset How many to skip (0 when not given)
1549
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1550
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1551
- # @return [ListWorkspaceWorkflowCompositionOptions200Response]
1552
- describe 'list_workspace_workflow_composition_options test' do
1553
- it 'should work' do
1554
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1555
- end
1556
- end
1557
-
1558
- # unit tests for list_workspace_workflow_presets
1559
- # List the starting points for a new Workflow
1560
- # The workflows you can start from in this workspace: published workflows that Widgetic offers or, for one of a partner&#39;s managed users, that the partner offers (a managed user is never shown Widgetic&#39;s, and a person is never shown a partner&#39;s). Only what can be started now is listed, in the order the offerer set (smallest &#x60;position&#x60; first, then by &#x60;key&#x60;). Each shows what you would get, and none shows who made it or any id of its own. Start from one with &#x60;createWorkspaceWorkflowFromPreset&#x60;. For personal workspace, use &#39;personal&#39; as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read the list.
1561
- # @param workspace_id The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403.
1562
- # @param [Hash] opts the optional parameters
1563
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1564
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1565
- # @return [ListWorkspaceWorkflowPresets200Response]
1566
- describe 'list_workspace_workflow_presets test' do
1567
- it 'should work' do
1568
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1569
- end
1570
- end
1571
-
1572
- # unit tests for list_workspace_workflow_versions
1573
- # List the Published Versions of a Workflow
1574
- # Every version the workflow has had, newest first, with who published it and when. The one visitors get is marked &#x60;isLive&#x60;. For personal workspace, use &#39;personal&#39; as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read.
1575
- # @param workspace_id The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403.
1576
- # @param workflow_id The workflow&#39;s id
1577
- # @param [Hash] opts the optional parameters
1578
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1579
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1580
- # @return [ListWorkspaceWorkflowVersions200Response]
1581
- describe 'list_workspace_workflow_versions test' do
1582
- it 'should work' do
1583
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1584
- end
1585
- end
1586
-
1587
- # unit tests for list_workspace_workflows
1588
- # List the Workflows of a Workspace
1589
- # Lists the workspace&#39;s workflows, newest first unless &#x60;sort&#x60; says otherwise. Archived workflows are left out unless &#x60;status&#x60; asks for them (&#x60;archived&#x60;, or &#x60;all&#x60;). For personal workspace, use &#39;personal&#39; as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read the list.
1590
- # @param workspace_id The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403.
1591
- # @param [Hash] opts the optional parameters
1592
- # @option opts [String] :search Text the workflow&#39;s name must contain
1593
- # @option opts [String] :status One state to list (&#x60;draft&#x60;, &#x60;live&#x60;, &#x60;paused&#x60;, &#x60;archived&#x60;), or &#x60;all&#x60; for every state. Without it, the ones in use (draft, live and paused).
1594
- # @option opts [String] :sort &#x60;&lt;field&gt;:&lt;asc|desc&gt;&#x60; where field is createdAt, lastPublishedAt, runsCount or name (or just asc / desc for createdAt). Newest first when not given.
1595
- # @option opts [Integer] :limit Page size (1-100, 50 when not given)
1596
- # @option opts [Integer] :offset How many to skip (0 when not given)
1597
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1598
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1599
- # @return [ListWorkspaceWorkflows200Response]
1600
- describe 'list_workspace_workflows test' do
1601
- it 'should work' do
1602
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1603
- end
1604
- end
1605
-
1606
- # unit tests for operations_id_get
1607
- # Get operation status
1608
- # Follows work that carries on after the response that started it. Duplicating a composition, for one, answers 202 with an &#x60;operationId&#x60;: ask for that operation until its &#x60;status&#x60; is &#x60;completed&#x60; (or &#x60;failed&#x60;, with the reason in &#x60;error&#x60;). A finished duplication names the new composition in &#x60;metadata.newCompositionId&#x60;. An operation belongs to the user who started it. Asking for somebody else&#39;s operation answers 404, exactly as for one that does not exist. Administrators may read any operation.
1609
- # @param id Operation identifier returned when the job was created.
1610
- # @param [Hash] opts the optional parameters
1611
- # @return [OperationsIdGetResponse]
1612
- describe 'operations_id_get test' do
1613
- it 'should work' do
1614
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1615
- end
1616
- end
1617
-
1618
- # unit tests for patch_brand_kit
1619
- # Change part of the Brand Kit
1620
- # Changes only what is sent: the colors, a font role, a spacing step, one corner radius (0 for square corners) or the style notes, and keeps the rest of the saved kit. An account that never saved a kit starts from Widgetic&#39;s default one. The response lists what is worth fixing in &#x60;warnings&#x60;.
1621
- # @param patch_brand_kit_request
1622
- # @param [Hash] opts the optional parameters
1623
- # @option opts [String] :organization_id
1624
- # @return [BrandKitViewResponse]
1625
- describe 'patch_brand_kit test' do
1626
- it 'should work' do
1627
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1628
- end
1629
- end
1630
-
1631
- # unit tests for patch_brand_kit_asset
1632
- # Rename an icon or relabel a font variant
1633
- # @param asset_id
1634
- # @param patch_brand_kit_asset_request
1635
- # @param [Hash] opts the optional parameters
1636
- # @option opts [String] :organization_id
1637
- # @return [BrandKitViewResponse]
1638
- describe 'patch_brand_kit_asset test' do
1639
- it 'should work' do
1640
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1641
- end
1642
- end
1643
-
1644
- # unit tests for patch_composition_content_item
1645
- # Update a content list item
1646
- # @param id
1647
- # @param list
1648
- # @param item_id
1649
- # @param idempotency_key Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
1650
- # @param request_body
1651
- # @param [Hash] opts the optional parameters
1652
- # @option opts [String] :if_match
1653
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1654
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1655
- # @return [CreateCompositionContentItem201Response]
1656
- describe 'patch_composition_content_item test' do
1657
- it 'should work' do
1658
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1659
- end
1660
- end
1661
-
1662
- # unit tests for pause_workspace_workflow
1663
- # Pause a Workflow
1664
- # While a workflow is paused, its embeds show only their first composition (the &#x60;composition-id&#x60; of the embed) and no visitor moves on. The live version is kept, and visitors partway through carry on from where they were when it is resumed. Only a live workflow can be paused. For personal workspace, use &#39;personal&#39; as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can pause.
1665
- # @param workspace_id The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403.
1666
- # @param workflow_id The workflow&#39;s id
1667
- # @param [Hash] opts the optional parameters
1668
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1669
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1670
- # @return [SaveWorkspaceWorkflow200Response]
1671
- describe 'pause_workspace_workflow test' do
1672
- it 'should work' do
1673
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1674
- end
1675
- end
1676
-
1677
- # unit tests for post_brand_kit_font
1678
- # Upload a font file to the Brand Kit
1679
- # @param file
1680
- # @param family
1681
- # @param weight
1682
- # @param [Hash] opts the optional parameters
1683
- # @option opts [String] :organization_id
1684
- # @option opts [String] :style
1685
- # @return [BrandKitViewResponse]
1686
- describe 'post_brand_kit_font test' do
1687
- it 'should work' do
1688
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1689
- end
1690
- end
1691
-
1692
- # unit tests for post_brand_kit_icon
1693
- # Add a named SVG icon to the Brand Kit
1694
- # @param post_brand_kit_icon_request
1695
- # @param [Hash] opts the optional parameters
1696
- # @option opts [String] :organization_id
1697
- # @return [BrandKitViewResponse]
1698
- describe 'post_brand_kit_icon test' do
1699
- it 'should work' do
1700
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1701
- end
1702
- end
1703
-
1704
- # unit tests for post_public_composition_embed_status
1705
- # Batch-check whether compositions are currently served for embed
1706
- # Public batch health check for embed-sdk.js. No API key. Uses the same serving gate and domain policy as &#x60;GET /embed/compositions/{compositionId}&#x60;: the caller&#39;s website is read from &#x60;Origin&#x60;, or the host of &#x60;Referer&#x60; when there is no &#x60;Origin&#x60;. A request that names neither (a server or tool) is not refused for domain reasons. **Address.** &#x60;https://api.widgetic.com/embed/compositions/status&#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. **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 &#x60;ids&#x60; 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 &#x60;RATE_LIMITED&#x60; for the WHOLE call, with a &#x60;Retry-After&#x60; header and no state for any id: there is no per-composition rate-limit state in the answer.
1707
- # @param post_public_composition_embed_status_request
1708
- # @param [Hash] opts the optional parameters
1709
- # @return [PostPublicCompositionEmbedStatus200Response]
1710
- describe 'post_public_composition_embed_status test' do
1711
- it 'should work' do
1712
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1713
- end
1714
- end
1715
-
1716
- # unit tests for publish_workspace_workflow
1717
- # Publish the Draft of a Workflow
1718
- # Checks the draft and, when nothing stops it, makes it the next version and the one new visitors get. Versions never change once published. A visitor already partway through keeps the version they started on (for up to 30 days). The check reads what each composition can do right now (a table the visitor adds to, a goal the widget reports, the websites it may be embedded on), so a workflow never goes live pointing at something that has gone. It is refused with 422 (&#x60;BUSINESS_OPERATION_INVALID&#x60;) when the draft has errors; the &#x60;issues&#x60; in the error&#39;s &#x60;details&#x60; name the blocks to fix: an unconnected trigger, a condition without rules, a composition that is not published, a field or action that is gone, a composition whose allowed websites exclude the site the workflow starts on. Nothing is published when the draft has no changes since the live version. The &#x60;revision&#x60; is the one the editor read, and a publish of a draft that has moved on is refused with 409. For personal workspace, use &#39;personal&#39; as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can publish.
1719
- # @param workspace_id The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403.
1720
- # @param workflow_id The workflow&#39;s id
1721
- # @param idempotency_key Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
1722
- # @param publish_workspace_workflow_request
1723
- # @param [Hash] opts the optional parameters
1724
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1725
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1726
- # @return [PublishWorkspaceWorkflow200Response]
1727
- describe 'publish_workspace_workflow test' do
1728
- it 'should work' do
1729
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1730
- end
1731
- end
1732
-
1733
- # unit tests for put_brand_kit
1734
- # Save Brand Kit tokens
1735
- # Replaces the colors, fonts, spacing and notes of the kit with the ones sent. To change one thing, use PATCH.
1736
- # @param put_brand_kit_request
1737
- # @param [Hash] opts the optional parameters
1738
- # @option opts [String] :organization_id
1739
- # @return [BrandKitViewResponse]
1740
- describe 'put_brand_kit test' do
1741
- it 'should work' do
1742
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1743
- end
1744
- end
1745
-
1746
- # unit tests for read_composition_entries
1747
- # Read the Entries of a Composition&#39;s Table
1748
- # Counts the entries visitors left in one table, tallies them per value of a column on request, and returns the newest entries only when asked to. To show the results of a rating widget, tally by its rating column (&#x60;groupBy&#x60;): each group is a rating and how many visitors gave it. The average is then &#x60;sum(value * count) / sum(count)&#x60; over the tallies (all of them, when &#x60;moreGroups&#x60; is false). - **&#x60;totalRows&#x60;** is how many entries the table holds in all. - **&#x60;groupBy&#x60;** names a column (as &#x60;describeCompositionEntries&#x60; lists it). &#x60;tallies&#x60; then lists up to 20 values of it, the largest group first; &#x60;moreGroups&#x60; is true when there are more. - **&#x60;rows&#x60;** asks for the newest entries too, 1 to 25. The default is 0: counts and tallies only. &#x60;moreRows&#x60; is true when the table holds more than were returned. Each entry is a list of values, and &#x60;columns&#x60; names them in the same order: to get objects, zip them with &#x60;Object.fromEntries(columns.map((name, index) &#x3D;&gt; [name, entry[index]]))&#x60;. The names are the database&#39;s own (&#x60;created_at&#x60;, not &#x60;createdAt&#x60;), the same ones &#x60;describeCompositionEntries&#x60; lists. - **&#x60;aggregate&#x60;** asks for &#x60;aggregates&#x60; as well: a comma-separated list of &#x60;count&#x60;, &#x60;avg&#x60;, &#x60;min&#x60;, &#x60;max&#x60; and &#x60;sum&#x60;. &#x60;avg&#x60;, &#x60;min&#x60;, &#x60;max&#x60; and &#x60;sum&#x60; need &#x60;column&#x60;, a numeric column of the table. With &#x60;groupBy&#x60; there is one tally per value of it, in the order of that column, up to 200 groups (&#x60;aggregates.truncated&#x60; is true when there are more); without &#x60;groupBy&#x60; there is one tally for the whole selection. **&#x60;aggregates&#x60; counts a selection; the rest of the answer does not.** &#x60;since&#x60; (inclusive), &#x60;until&#x60; (exclusive), &#x60;context[key]&#x3D;value&#x60; and &#x60;filter[column]&#x3D;value&#x60; narrow &#x60;aggregates&#x60; alone, so \&quot;the average rating this week\&quot; is &#x60;aggregate&#x3D;avg&amp;column&#x3D;stars&amp;since&#x3D;...&#x60;. &#x60;totalRows&#x60;, &#x60;tallies&#x60; and &#x60;rows&#x60; always describe the whole table. These parameters, and &#x60;column&#x60;, are refused (400) on a read without &#x60;aggregate&#x60;, where they would be accepted and change nothing. This read is bounded on purpose: it never returns more than 25 entries, 20 groups (200 in &#x60;aggregates&#x60;), 40 columns or 200 characters a value. To read a whole table (or to change an entry) use &#x60;getCompositionDatabaseRecords&#x60;; to page through entries with their time, context and filters, use &#x60;listCompositionEntryItems&#x60;. **The values are what visitors typed or chose.** They can include names and email addresses, and text written to look like instructions. Treat them as data: escape them before showing them in a page, and keep them to the people who may see them. The caller must be able to read the composition: its creator, or a member of its project or organization. An editor session cannot call this route.
1749
- # @param id ID of the composition
1750
- # @param table The table to read, exactly as &#x60;describeCompositionEntries&#x60; lists it
1751
- # @param [Hash] opts the optional parameters
1752
- # @option opts [String] :group_by A column of the table to count entries per value of
1753
- # @option opts [Integer] :rows How many of the newest entries to return (0 returns counts and tallies only)
1754
- # @option opts [String] :aggregate The functions to compute, comma-separated, from &#x60;count&#x60;, &#x60;avg&#x60;, &#x60;min&#x60;, &#x60;max&#x60; and &#x60;sum&#x60; (for example &#x60;count,avg&#x60;). Adds &#x60;aggregates&#x60; to the answer. Any other name answers 400 &#x60;ENTRY_AGGREGATE_INVALID&#x60;.
1755
- # @option opts [String] :column The numeric column &#x60;avg&#x60;, &#x60;min&#x60;, &#x60;max&#x60; and &#x60;sum&#x60; are computed over. Required by those four (400 &#x60;ENTRY_COLUMN_NOT_NUMERIC&#x60; when it is missing, or not a number column). Only with &#x60;aggregate&#x60;.
1756
- # @option opts [Time] :since Only entries made at this time or later: &#x60;since&#x60; is INCLUSIVE (an entry made at exactly &#x60;since&#x60; is returned). A date and time with an offset, such as &#x60;2026-10-01T00:00:00Z&#x60;; anything else answers 400 &#x60;INVALID_SINCE&#x60;. An entry with no time never matches, and a table with no time column answers 400 &#x60;ENTRY_TABLE_HAS_NO_TIME&#x60;.
1757
- # @option opts [Time] :_until Only entries made before this time: &#x60;until&#x60; is EXCLUSIVE (an entry made at exactly &#x60;until&#x60; is NOT returned), so &#x60;since&#x3D;A&amp;until&#x3D;B&#x60; followed by &#x60;since&#x3D;B&amp;until&#x3D;C&#x60; counts every entry once. Same form and same refusals as &#x60;since&#x60; (400 &#x60;INVALID_UNTIL&#x60;).
1758
- # @option opts [Hash<String, String>] :context Host context filters as &#x60;context[key]&#x3D;value&#x60; (max 5 keys, counting dotted &#x60;context.key&#x60; too). Use &#x60;column.&lt;name&gt;&#x3D;value&#x60; for columns whose names collide with reserved parameters.
1759
- # @option opts [Hash<String, String>] :filter Column filters as &#x60;filter[columnName]&#x3D;value&#x60; (same meaning as bare &#x60;columnName&#x3D;value&#x60; or &#x60;column.columnName&#x3D;value&#x60;; max 10 column filters counting all spellings). A plain &#x60;filter&#x3D;value&#x60; still filters a column named &#x60;filter&#x60;.
1760
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1761
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1762
- # @return [CompositionEntriesReadingResponse]
1763
- describe 'read_composition_entries test' do
1764
- it 'should work' do
1765
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1766
- end
1767
- end
1768
-
1769
- # unit tests for remove_ai_answers_knowledge_document
1770
- # Remove a document from a widget&#39;s knowledge base
1771
- # Removes one document and its passages: the widget&#39;s AI stops answering from it at once. Take the &#x60;documentId&#x60; from &#x60;getAiAnswersKnowledge&#x60;. The caller must be allowed to change the widget. An API key needs the &#x60;content:write&#x60; scope.
1772
- # @param id The widget (composition) the document is in
1773
- # @param document_id The document to remove
1774
- # @param [Hash] opts the optional parameters
1775
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1776
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1777
- # @return [RemoveAiAnswersKnowledgeDocument200Response]
1778
- describe 'remove_ai_answers_knowledge_document test' do
1779
- it 'should work' do
1780
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1781
- end
1782
- end
1783
-
1784
- # unit tests for remove_partner_adapter_connection
1785
- # Remove an adapter key from a partner
1786
- # Removes a key an adapter was given. The adapter stops working for the widgets of the partner&#39;s customers that need it: their visitors are told the feature is unavailable. Nothing else of the widgets changes, and connecting a key again brings them back. Removing a key that is not connected answers 200 with &#x60;removed: false&#x60;: the state asked for is the state it is in. A key of an adapter that has since been retired from the catalog can still be removed. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
1787
- # @param partner_id The partner that keeps the key
1788
- # @param adapter_id The adapter the key is for
1789
- # @param credential_key The key&#39;s name within the adapter
1790
- # @param [Hash] opts the optional parameters
1791
- # @return [RemoveUserAdapterConnection200Response]
1792
- describe 'remove_partner_adapter_connection test' do
1793
- it 'should work' do
1794
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1795
- end
1796
- end
1797
-
1798
- # unit tests for remove_partner_data_database
1799
- # Stop keeping the data of a partner&#39;s compositions in its own database
1800
- # Removes the partner&#39;s database from Widgetic: Widgetic forgets the connection string, and from then on the data of the partner&#39;s compositions is kept in Widgetic&#39;s database again. Nothing in your database is deleted. Removing is refused with 409 &#x60;PARTNER_DATABASE_HOLDS_DATA&#x60; while any composition of the partner keeps its data in your database: it would read as empty from then on, and what it holds would stay where nothing reads it. Delete the compositions you no longer need, or keep the database. If Widgetic cannot check what your database holds (it cannot be reached) the answer is 503 &#x60;PARTNER_DATABASE_UNAVAILABLE&#x60;; check it with &#x60;verifyPartnerDataDatabase&#x60;, or set the same database again to repair its connection. Removing a database the partner does not have is not an error: the answer is &#x60;removed: false&#x60;. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
1801
- # @param partner_id The partner whose database to remove
1802
- # @param [Hash] opts the optional parameters
1803
- # @return [PartnerDataDatabaseRemovalResponse]
1804
- describe 'remove_partner_data_database test' do
1805
- it 'should work' do
1806
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1807
- end
1808
- end
1809
-
1810
- # unit tests for remove_partner_preset
1811
- # Take a widget off the partner&#39;s presets
1812
- # Removes the preset under &#x60;key&#x60;. The widget itself is not touched, and neither are the copies and the compositions already made from it. Removing a preset the partner does not have is not an error: the answer is &#x60;removed: false&#x60;.
1813
- # @param partner_id The partner whose preset to remove
1814
- # @param key The key of the preset to remove
1815
- # @param [Hash] opts the optional parameters
1816
- # @return [PartnerPresetRemovalResponse]
1817
- describe 'remove_partner_preset test' do
1818
- it 'should work' do
1819
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1820
- end
1821
- end
1822
-
1823
- # unit tests for remove_partner_storage_destination
1824
- # Stop storing a partner&#39;s uploaded files in its own bucket
1825
- # Removes the partner&#39;s storage destination. Partner storage is not optional, so after this every upload of the account, on any route, and the uploads of your customers&#39; editor sessions are refused (409 &#x60;PARTNER_STORAGE_REQUIRED&#x60;) until a destination is set again, and no editor session can be made. Files already in the partner&#39;s bucket are not touched and are not moved: they stay where they are, at the addresses they were given. Removing a destination the partner does not have is not an error: the answer is &#x60;removed: false&#x60;. The caller must be the person who administers the partner, or a Widgetic administrator.
1826
- # @param partner_id The partner whose storage destination to remove
1827
- # @param [Hash] opts the optional parameters
1828
- # @return [PartnerStorageRemovalResponse]
1829
- describe 'remove_partner_storage_destination test' do
1830
- it 'should work' do
1831
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1832
- end
1833
- end
1834
-
1835
- # unit tests for remove_partner_workflow_preset
1836
- # Stop offering a workflow as a place to start
1837
- # Removes the starting point under &#x60;key&#x60;. The workflow itself is not touched, and neither are the workflows people already started from it. Removing a starting point the partner does not offer is not an error: the answer is &#x60;removed: false&#x60;.
1838
- # @param partner_id The partner whose starting point to remove
1839
- # @param key The key of the starting point to remove
1840
- # @param [Hash] opts the optional parameters
1841
- # @return [RemovePartnerWorkflowPreset200Response]
1842
- describe 'remove_partner_workflow_preset test' do
1843
- it 'should work' do
1844
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1845
- end
1846
- end
1847
-
1848
- # unit tests for remove_user_adapter_connection
1849
- # Remove an adapter key from an account
1850
- # Removes a key an adapter was given. The adapter stops working for the widgets that need it: their visitors are told the feature is unavailable. Nothing else of the widgets changes, and connecting a key again brings them back. Removing a key that is not connected answers 200 with &#x60;removed: false&#x60;: the state asked for is the state it is in. A key of an adapter that has since been retired from the catalog can still be removed. This needs an API key with full access. The caller must be the account itself or a Widgetic administrator.
1851
- # @param user_id The account that keeps the key. For your own, your own user id
1852
- # @param adapter_id The adapter the key is for
1853
- # @param credential_key The key&#39;s name within the adapter
1854
- # @param [Hash] opts the optional parameters
1855
- # @return [RemoveUserAdapterConnection200Response]
1856
- describe 'remove_user_adapter_connection test' do
1857
- it 'should work' do
1858
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1859
- end
1860
- end
1861
-
1862
- # unit tests for replay_partner_notification_delivery
1863
- # Send a webhook delivery again
1864
- # Sends one earlier **webhook** delivery again to your **current** webhook address, with the same event &#x60;id&#x60; (&#x60;webhook-id&#x60;) as the original notification so a receiver that remembers ids can ignore a duplicate, and a new &#x60;createdAt&#x60; and signature made with your current secret. The attempt is recorded in the delivery log as a new row that points at the delivery you replayed. Set a webhook address (and secret) under notification settings before you replay. Changing the settings needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
1865
- # @param partner_id The partner whose delivery to replay
1866
- # @param delivery_id The delivery to send again (must be a webhook delivery of this partner)
1867
- # @param idempotency_key Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
1868
- # @param [Hash] opts the optional parameters
1869
- # @return [PartnerNotificationDeliveryResponse]
1870
- describe 'replay_partner_notification_delivery test' do
1871
- it 'should work' do
1872
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1873
- end
1874
- end
1875
-
1876
- # unit tests for report_public_workflow_events
1877
- # Report what visitors did in a Workflow, as counts
1878
- # 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.
1879
- # @param workflow_id
1880
- # @param public_workflow_events_request
1881
- # @param [Hash] opts the optional parameters
1882
- # @return [ReportPublicWorkflowEvents200Response]
1883
- describe 'report_public_workflow_events test' do
1884
- it 'should work' do
1885
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1886
- end
1887
- end
1888
-
1889
- # unit tests for restore_workspace_workflow_version
1890
- # Restore a Version of a Workflow into the Draft
1891
- # Copies a published version into the draft, so it can be changed and published again. Nothing is published and nothing visitors see changes: the version stays in the history as it was. Names the &#x60;revision&#x60; the editor read. For personal workspace, use &#39;personal&#39; as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can restore.
1892
- # @param workspace_id The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403.
1893
- # @param workflow_id The workflow&#39;s id
1894
- # @param version_id The id of a published version of the workflow
1895
- # @param publish_workspace_workflow_request
1896
- # @param [Hash] opts the optional parameters
1897
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1898
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1899
- # @return [CreateWorkspaceWorkflowFromPreset201Response]
1900
- describe 'restore_workspace_workflow_version test' do
1901
- it 'should work' do
1902
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1903
- end
1904
- end
1905
-
1906
- # unit tests for resume_workspace_workflow
1907
- # Resume a Paused Workflow
1908
- # Makes a paused workflow live again, on the version that was live when it was paused. For personal workspace, use &#39;personal&#39; as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can resume.
1909
- # @param workspace_id The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403.
1910
- # @param workflow_id The workflow&#39;s id
1911
- # @param [Hash] opts the optional parameters
1912
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1913
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1914
- # @return [SaveWorkspaceWorkflow200Response]
1915
- describe 'resume_workspace_workflow test' do
1916
- it 'should work' do
1917
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1918
- end
1919
- end
1920
-
1921
- # unit tests for revoke_managed_user_editor_session
1922
- # End one editor session of a managed user
1923
- # Ends the session at once: its token stops working on the next request (on another server of ours, within a few seconds). Ending a session that has already ended is fine.
1924
- # @param id The managed user the session is for
1925
- # @param session_id The &#x60;sessionId&#x60; of the session, from &#x60;createManagedUserEditorSession&#x60;
1926
- # @param [Hash] opts the optional parameters
1927
- # @return [DeleteManagedUser200Response]
1928
- describe 'revoke_managed_user_editor_session test' do
1929
- it 'should work' do
1930
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1931
- end
1932
- end
1933
-
1934
- # unit tests for revoke_managed_user_editor_sessions
1935
- # End every editor session of a managed user
1936
- # Ends all of the managed user&#39;s live editor sessions at once, for example when the user signs out of your platform. Their tokens stop working on the next request (on another server of ours, within a few seconds). It is fine to call it for a user who has none.
1937
- # @param id The managed user whose sessions end
1938
- # @param [Hash] opts the optional parameters
1939
- # @return [RevokeManagedUserEditorSessionsResponse]
1940
- describe 'revoke_managed_user_editor_sessions test' do
1941
- it 'should work' do
1942
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1943
- end
1944
- end
1945
-
1946
- # unit tests for rotate_partner_entry_context_secret
1947
- # Make a secret to sign the context of your embeds
1948
- # Makes a secret to sign the &#x60;context&#x60; of your embeds with, and returns it in &#x60;secret&#x60;: **keep it now, it is shown once** and cannot be read again. Keep it on your server only: whoever holds it can write contexts your compositions accept. Call this again to make a new secret; the one it replaces is still accepted for a day, so that your server can switch without an entry being refused (making another within that day ends the overlap with the first). **What signing is for.** &#x60;&lt;widgetic composition-id&#x3D;\&quot;...\&quot; context&#x3D;&#39;{\&quot;customerId\&quot;:\&quot;c_42\&quot;}&#39;&gt;&#x60; hands attribution to a widget, which sends it with every entry it saves. The page is yours but the browser is the visitor&#39;s: anybody can change that attribute and file an entry under another customer&#39;s id. When your server signs the context, the gateway refuses an entry whose context was changed, and the entries you keep hold attribution your server wrote. **How to sign** (on your server, for each page you render): 1. Take the context to give the widget. It may hold text and whole numbers only (within ±2^53, written without a fraction or an exponent). 2. Choose when the signature stops being good: &#x60;widgetic_exp&#x60;, in seconds since 1970 (UTC), no more than seven days from now. A minute of difference between clocks is forgiven. 3. Write the text to sign, with no spaces except those inside values: &#x60;widgetic-context.v1.&lt;compositionId&gt;.&lt;widgetic_exp&gt;.&lt;json&gt;&#x60;. &#x60;&lt;compositionId&gt;&#x60; is the id of the composition in lower case. &#x60;&lt;json&gt;&#x60; is the context as JSON with the keys in character-code order (so &#x60;Z&#x60; comes before &#x60;a&#x60;, and &#x60;10&#x60; before &#x60;9&#x60;), no spaces, strings escaped as JSON escapes them, and the two keys of the signature left out. 4. Sign that text: HMAC-SHA256 with the 32 bytes the secret stands for (the base64 text after &#x60;ctxsec_&#x60;), and write the result as base64url without padding. 5. Give the widget the context with two keys added: &#x60;widgetic_exp&#x60; and &#x60;widgetic_sig&#x60; (the signature). The whole attribute, the two keys included, stays within the limits of any context: at most 20 keys, 2048 bytes of JSON, strings up to 500 characters. The two keys take two of the 20 keys and 87 bytes of the 2048. A test vector, to check your code against before you rely on it. Secret &#x60;ctxsec_AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8&#x3D;&#x60; (the bytes 0 to 31), composition &#x60;7c9e6679-7425-40de-944b-e07fc1f90ae7&#x60;, &#x60;widgetic_exp&#x60; 1792000000 and context &#x60;{\&quot;customerId\&quot;:\&quot;c_42\&quot;,\&quot;plan\&quot;:\&quot;pro\&quot;,\&quot;seats\&quot;:3}&#x60; sign the text &#x60;widgetic-context.v1.7c9e6679-7425-40de-944b-e07fc1f90ae7.1792000000.{\&quot;customerId\&quot;:\&quot;c_42\&quot;,\&quot;plan\&quot;:\&quot;pro\&quot;,\&quot;seats\&quot;:3}&#x60; and give the signature &#x60;j6g7151F54tl9C8oEY9levaYSppHME4fAPZ7WPwL8C8&#x60;. (The secret is the example&#39;s, not a real one.) **What the gateway does with an entry.** When you have a secret, an entry whose context carries a signature is checked: a signature that does not match is refused with 403 &#x60;CONTEXT_SIGNATURE_INVALID&#x60;, and one that is past &#x60;widgetic_exp&#x60; with 403 &#x60;CONTEXT_SIGNATURE_EXPIRED&#x60;. When you also require signatures (&#x60;updatePartnerEntryContextSigning&#x60;) an entry whose context carries none is refused with 403 &#x60;CONTEXT_SIGNATURE_REQUIRED&#x60;. The two keys are taken out before the entry is stored or announced: your entries and your &#x60;entry.created&#x60; events hold the context you wrote. A change you make reaches every part of the gateway within a minute. **What it does not do.** A signed context that has been seen (a page&#39;s source is public) can be sent again by anyone until &#x60;widgetic_exp&#x60;; when you must not accept the same context twice, put a value that is new for each page view in it (a &#x60;submissionId&#x60; you made up) and keep the ones you have seen. The signature covers the entries that reach Widgetic&#39;s gateway: a row that gets into a table another way (your own code writing straight into a database you brought, or the record calls of the composition&#39;s owner) does not pass through it, and carries no context. Retry this call with the same &#x60;Idempotency-Key&#x60; if its answer was lost: the answer, secret included, is then given again, and no second secret is made. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
1949
- # @param partner_id The partner whose secret to make
1950
- # @param idempotency_key Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
1951
- # @param [Hash] opts the optional parameters
1952
- # @return [PartnerEntryContextSecretResponse]
1953
- describe 'rotate_partner_entry_context_secret test' do
1954
- it 'should work' do
1955
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1956
- end
1957
- end
1958
-
1959
- # unit tests for rotate_partner_webhook_secret
1960
- # Make a new secret for your webhook
1961
- # Makes a new secret to sign your webhook with, and returns it in &#x60;webhookSecret&#x60;: **keep it now, it is shown once** and cannot be read again. Use it when the secret was lost, or may have leaked. The secret you had keeps signing beside the new one for a day, so that your receiver can switch without a call being rejected: during that day each call carries two signatures (see &#x60;updatePartnerNotificationSettings&#x60; for how they are verified). Rotating again within the day ends the overlap with the first secret. Retry this call with the same &#x60;Idempotency-Key&#x60; if its answer was lost: the answer, secret included, is then given again, and no second secret is made. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
1962
- # @param partner_id The partner whose webhook secret to replace
1963
- # @param idempotency_key Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
1964
- # @param [Hash] opts the optional parameters
1965
- # @return [PartnerNotificationSettingsChangeResponse]
1966
- describe 'rotate_partner_webhook_secret test' do
1967
- it 'should work' do
1968
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1969
- end
1970
- end
1971
-
1972
- # unit tests for save_workspace_workflow
1973
- # Save the Draft of a Workflow
1974
- # Saves the name, the time zone and/or the graph of the draft. Send at least one. The save names the &#x60;revision&#x60; the editor started from and is refused with 409 (&#x60;BUSINESS_STATE_CONFLICT&#x60;) when the draft has moved on, so two people editing do not overwrite each other without knowing; read the workflow again and apply the change to it. A save is never refused for what is wrong with the graph (a block with no connection yet is normal in a draft): only the shape is judged here, and what stops a workflow going live is told when it is published. A graph larger than 200,000 bytes, or with more than 100 blocks or 300 connections, is refused. An archived workflow cannot be saved. Saving a live workflow changes the draft only: visitors keep getting the published version until the changes are published. For personal workspace, use &#39;personal&#39; as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can save.
1975
- # @param workspace_id The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403.
1976
- # @param workflow_id The workflow&#39;s id
1977
- # @param save_workspace_workflow_request
1978
- # @param [Hash] opts the optional parameters
1979
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1980
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
1981
- # @return [SaveWorkspaceWorkflow200Response]
1982
- describe 'save_workspace_workflow test' do
1983
- it 'should work' do
1984
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1985
- end
1986
- end
1987
-
1988
- # unit tests for send_partner_notification_test_event
1989
- # Send a test event to your webhook
1990
- # Sends ONE signed call, right now, to the webhook address you saved under notification settings, with a sample of what an event of the type you name carries, and answers how it went: whether your receiver answered with a 2xx status, which status, how long it took, and why not when it did not arrive. Use it to write and try your receiver (above all the signature check) before a real event happens. The call is made like every other: it is signed with your current secret (and the previous one while a rotation overlaps), it carries the headers &#x60;webhook-id&#x60;, &#x60;webhook-timestamp&#x60;, &#x60;webhook-signature&#x60; and &#x60;x-widgetic-event&#x60; (the event type), and its body is &#x60;{ \&quot;id\&quot;, \&quot;type\&quot;, \&quot;createdAt\&quot;, \&quot;partnerId\&quot;, \&quot;data\&quot; }&#x60;. Three things differ. &#x60;id&#x60; starts with &#x60;evt_test_&#x60; and is new every time, so a receiver that remembers ids can tell a test from an event and drop it. &#x60;data&#x60; holds made-up values of the shape a real event of that type carries (&#x60;PartnerNotification&#x60; describes each), never anything about your account. And the call is made once: it is not tried again, nothing is stored, and it appears neither in the delivery log nor in the notification list. It is sent whatever &#x60;webhookEvents&#x60; says: a test is not filtered by what you subscribed to. The answer is 200 whether or not your receiver took the call (read &#x60;delivered&#x60;); a call that gets no answer within ten seconds is given up and reported as a &#x60;timeout&#x60;. A webhook address and a signing secret must be saved first (&#x60;updatePartnerNotificationSettings&#x60;); until then the answer is 409. This needs an API key with full access, and &#x60;Idempotency-Key&#x60; is required: a retry with the same key gets the first answer back and no second call is made. The caller must be the person who administers the partner, or a Widgetic administrator. Five tests a minute.
1991
- # @param partner_id The partner whose webhook to try
1992
- # @param idempotency_key Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
1993
- # @param partner_notification_test_event_request
1994
- # @param [Hash] opts the optional parameters
1995
- # @return [PartnerNotificationTestEventResultResponse]
1996
- describe 'send_partner_notification_test_event test' do
1997
- it 'should work' do
1998
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1999
- end
2000
- end
2001
-
2002
- # unit tests for set_composition_data_source
2003
- # Bind a public JSON data source for embed refresh
2004
- # Stores an https URL the widget runtime may read on load and every &#x60;refreshSeconds&#x60;. The URL must name a public host (no loopback, link-local or metadata addresses). A composition has one binding: saving another replaces it. The answer is the binding as it was saved (&#x60;url&#x60;, &#x60;refreshSeconds&#x60;).
2005
- # @param id
2006
- # @param idempotency_key Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
2007
- # @param set_composition_data_source_request
2008
- # @param [Hash] opts the optional parameters
2009
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
2010
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
2011
- # @return [CompositionDataSourceResponse]
2012
- describe 'set_composition_data_source test' do
2013
- it 'should work' do
2014
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2015
- end
2016
- end
2017
-
2018
- # unit tests for set_dynamic_content
2019
- # Set Dynamic Content
2020
- # Updates the content of a composition dynamically with optional schema validation. An editor session (see &#x60;createManagedUserEditorSession&#x60;) can send only &#x60;content&#x60;, &#x60;validate&#x60; and &#x60;partial&#x60;, and only for a composition made for its managed user. A body that names &#x60;version&#x60;, &#x60;source&#x60; or any other field is refused with &#x60;403&#x60; and &#x60;EDITOR_SESSION_FIELD_NOT_ALLOWED&#x60;.
2021
- # @param id ID of the composition
2022
- # @param idempotency_key Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
2023
- # @param set_dynamic_content_request
2024
- # @param [Hash] opts the optional parameters
2025
- # @option opts [String] :if_match Optional content version from ETag (&#x60;\&quot;3\&quot;&#x60;, &#x60;3&#x60;, or &#x60;*&#x60;)
2026
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
2027
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
2028
- # @return [SetDynamicContentResponse]
2029
- describe 'set_dynamic_content test' do
2030
- it 'should work' do
2031
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2032
- end
2033
- end
2034
-
2035
- # unit tests for set_managed_user_design_defaults
2036
- # Set or clear design defaults for one managed user
2037
- # Send &#x60;{ \&quot;design\&quot;: { ... } }&#x60; to store a JSON object (at most 64 KB, nesting depth 32), or &#x60;{ \&quot;design\&quot;: null }&#x60; to remove the override. New compositions for this customer merge this layer over the partner default and under the request body.
2038
- # @param id
2039
- # @param set_partner_design_defaults_request
2040
- # @param [Hash] opts the optional parameters
2041
- # @return [GetPartnerDesignDefaults200Response]
2042
- describe 'set_managed_user_design_defaults test' do
2043
- it 'should work' do
2044
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2045
- end
2046
- end
2047
-
2048
- # unit tests for set_managed_user_limits
2049
- # Set or clear the monthly credit cap for one managed user
2050
- # Send monthlyCredits as a whole number from 0 up to 2147483647 to cap what this customer&#39;s editor sessions may spend in a UTC calendar month, or null to remove the cap. The cap counts the credits the customer&#39;s sessions spent that month (refunded credits do not count) and applies to all of the customer&#39;s sessions together, beside any &#x60;max_credits&#x60; a single session was given. A cap of 0 stops all paid work by this customer until you raise it. The cap starts counting from the first of the month (UTC); a cap set below what was already spent this month stops further work at once.
2051
- # @param id
2052
- # @param set_managed_user_limits_request
2053
- # @param [Hash] opts the optional parameters
2054
- # @return [GetManagedUserLimits200Response]
2055
- describe 'set_managed_user_limits test' do
2056
- it 'should work' do
2057
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2058
- end
2059
- end
2060
-
2061
- # unit tests for set_partner_adapter_connection
2062
- # Connect an adapter key to a partner
2063
- # Gives an adapter the key it needs to act through a service the partner has an account with, for the widgets of the customers the partner manages. Take the &#x60;adapterId&#x60; and &#x60;credentialKey&#x60; from &#x60;getPartnerAdapterConnections&#x60;. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this partner, 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 or to your customers. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on the partner&#39;s 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 a partner may keep it (some are for an owner 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. **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;getPartnerAdapterConnections&#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;confirmPartnerAdapterConnection&#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 partner is told once a day what to do. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator. A retry is harmless: saving the same key twice only refreshes when it was set.
2064
- # @param partner_id The partner that keeps the key
2065
- # @param adapter_id The adapter the key is for
2066
- # @param credential_key The key&#39;s name within the adapter
2067
- # @param set_adapter_connection_request
2068
- # @param [Hash] opts the optional parameters
2069
- # @return [SetUserAdapterConnection200Response]
2070
- describe 'set_partner_adapter_connection test' do
2071
- it 'should work' do
2072
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2073
- end
2074
- end
2075
-
2076
- # unit tests for set_partner_data_database
2077
- # Keep the data of a partner&#39;s compositions in a Neon database of its own
2078
- # Points the partner at a Neon database of its own. From then on, what visitors leave in the compositions of the partner&#39;s managed users, and of the compositions made in the partner&#39;s own account (the votes, ratings, answers and form submissions of the widgets that collect them), is stored in that database and nowhere else. Widgetic&#39;s own database is not used for them any more, and nothing of it is copied there. **What to give.** The connection string of a Neon database and a role made for this, as Neon shows it under *Connect* (&#x60;postgresql://&lt;role&gt;:&lt;password&gt;@ep-&lt;name&gt;.&lt;region&gt;.aws.neon.tech/&lt;database&gt;&#x60;). Only Neon databases are accepted; a string for any other host is refused with 400. What the database needs: - an empty database of its own, so that nothing else of yours shares it. Widgetic makes one schema in it for each composition (named &#x60;comp_&#x60; followed by the composition&#39;s id). In that schema go the tables the widget declares for what its visitors leave, and two small tables of Widgetic&#39;s own, whose names start with &#x60;_widgetic_&#x60;: the context a host page sent with an entry, and how far Widgetic has read the entries to tell you about new ones. It touches nothing else; - a role that may create schemas and tables in it (the CREATE privilege on the database). The role Neon makes with a project has it. A role made in the Neon console can also read and write every other database of the same project, so if you keep other data in Neon give Widgetic a project of its own, or make the role with SQL (&#x60;CREATE ROLE ... LOGIN PASSWORD ...&#x60;) and grant it only the CREATE privilege on this database; - connections from anywhere: Widgetic&#39;s addresses are not fixed, so a Neon project that only accepts connections from an allow list of addresses cannot be used. A suspended compute is fine: it wakes on the first request. **It is checked before it is saved.** Widgetic makes a schema in your database, creates a table in it, writes a row, reads it back, and removes the schema again, all in one step, so that nothing is left if anything fails. If it cannot be done nothing is saved and the answer is 422 &#x60;PARTNER_DATABASE_UNVERIFIED&#x60;: &#x60;details.reason&#x60; says why (&#x60;INVALID_CREDENTIALS&#x60;, &#x60;DATABASE_NOT_FOUND&#x60;, &#x60;ACCESS_DENIED&#x60;, &#x60;ACCESS_BLOCKED&#x60;, &#x60;ENDPOINT_NOT_FOUND&#x60;, &#x60;ENDPOINT_UNREACHABLE&#x60;, &#x60;TIMEOUT&#x60;, &#x60;READ_ONLY&#x60;, &#x60;RATE_LIMITED&#x60;, &#x60;DATABASE_UNAVAILABLE&#x60;, &#x60;PROBE_MISMATCH&#x60; or &#x60;DATABASE_ERROR&#x60;) and &#x60;message&#x60; says what to do. **Existing data does not move.** The data of a composition lives in one database. If any composition of the partner already keeps data somewhere else (in Widgetic&#39;s database, or in the database you had set), and the new database does not hold it, the change is refused with 409 &#x60;PARTNER_DATABASE_HOLDS_DATA&#x60; and nothing is changed: those compositions would read as empty from then on. &#x60;details.compositionsWithData&#x60; says how many. Set your database before your customers collect data, or delete the compositions you no longer need. Saving the same database again (a new password) moves nothing and is never refused. **It is never a fallback.** Once a database is set, a request that needs it while it cannot be used (the password was changed, the project was deleted) is refused with 503 &#x60;PARTNER_DATABASE_UNAVAILABLE&#x60;. What the visitor sent is not stored with Widgetic instead. Fix the connection and set the database again, or check it with &#x60;verifyPartnerDataDatabase&#x60;. **When it takes effect.** A change reaches every part of Widgetic within about a minute. **What Widgetic keeps.** The connection string is stored encrypted and is never returned or logged; a response shows the host, the database and the role, never the password. Widgetic&#39;s servers open it to read and write the data of your compositions while they handle a request for it. To cut that off, change the role&#39;s password in Neon: the compositions stop saving until you set the new string. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator. A retry is harmless: saving the same database twice only refreshes when it was checked and saved.
2079
- # @param partner_id The partner whose database to set
2080
- # @param set_partner_data_database_request
2081
- # @param [Hash] opts the optional parameters
2082
- # @return [PartnerDataDatabaseResponse]
2083
- describe 'set_partner_data_database test' do
2084
- it 'should work' do
2085
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2086
- end
2087
- end
2088
-
2089
- # unit tests for set_partner_design_defaults
2090
- # Set or clear partner-wide design defaults
2091
- # Send &#x60;{ \&quot;design\&quot;: { ... } }&#x60; or &#x60;{ \&quot;design\&quot;: null }&#x60; to remove. New compositions merge this layer over the widget base and under each managed user&#39;s default and the request body.
2092
- # @param partner_id
2093
- # @param set_partner_design_defaults_request
2094
- # @param [Hash] opts the optional parameters
2095
- # @return [GetPartnerDesignDefaults200Response]
2096
- describe 'set_partner_design_defaults test' do
2097
- it 'should work' do
2098
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2099
- end
2100
- end
2101
-
2102
- # unit tests for set_partner_preset
2103
- # Make a widget a preset, or replace a preset
2104
- # Offers one of the partner&#39;s own widgets as a preset under &#x60;key&#x60;. If the partner already has a preset under that key it is replaced, so sending the same request twice is safe. Saving replaces the whole preset: a &#x60;title&#x60;, &#x60;description&#x60; or &#x60;position&#x60; you leave out goes back to its default. Keys are 1 to 64 characters: lowercase letters, digits, hyphens and underscores, the first a letter or a digit (&#x60;rating&#x60;, &#x60;quiz-3&#x60;). The widget must belong to the partner&#39;s account; a widget that does not exist and one that belongs to somebody else are refused in the same way (404 &#x60;PRESET_WIDGET_NOT_FOUND&#x60;). A widget is a preset under at most one key (409 &#x60;PRESET_WIDGET_ALREADY_USED&#x60;; &#x60;details.key&#x60; says which), and an account can have at most 100 presets (409 &#x60;PRESET_LIMIT_REACHED&#x60;). Later changes to the widget reach new copies and new compositions; copies made earlier are not touched. Deleting the widget removes its preset.
2105
- # @param partner_id The partner whose preset to set
2106
- # @param key The name your code uses for the preset
2107
- # @param set_partner_preset_request
2108
- # @param [Hash] opts the optional parameters
2109
- # @return [PartnerPresetResponse]
2110
- describe 'set_partner_preset test' do
2111
- it 'should work' do
2112
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2113
- end
2114
- end
2115
-
2116
- # unit tests for set_partner_storage_destination
2117
- # Set where a partner&#39;s uploaded files are stored
2118
- # Points the partner at a bucket of its own on an S3-compatible service (Cloudflare R2, Amazon S3, Wasabi, MinIO and the like). From then on, every file the account that administers the partner stores is kept in that bucket instead of with Widgetic, whichever way it arrives: a file sent with &#x60;uploadsPost&#x60; (with an API key, an SDK token, an editor session or from the Widgetic website), a resumable upload, the media library, and the files the agent tools and the MCP server save. It takes none of the account&#39;s storage allowance, and its &#x60;url&#x60; is served from &#x60;publicBaseUrl&#x60;. The chunks of a resumable upload wait in Widgetic&#39;s temporary staging area until it is completed and are removed then: the finished file is stored in your bucket and nowhere else. A destination is required. Partner storage is not optional: your customers&#39; files, and your own however they arrive, are kept in this destination and nowhere else. An editor session (&#x60;createManagedUserEditorSession&#x60;) of any surface cannot be made until a destination is set (409 &#x60;PARTNER_STORAGE_REQUIRED&#x60;), a destination removed later stops the uploads of the sessions already made (the same 409), and your own upload with no destination (on any route, including a resumable upload, which is refused when it is started) is refused in the same way instead of being stored with Widgetic. A partner cannot be activated until it has a destination that works. The destination is checked before it is saved. Widgetic writes a small test file under &#x60;&lt;keyPrefix&gt;widgetic-check/&#x60;, reads it back from &#x60;&lt;publicBaseUrl&gt;/&lt;its key&gt;&#x60;, and deletes it. If any step fails nothing is saved and the answer is 422 &#x60;STORAGE_DESTINATION_UNVERIFIED&#x60;: &#x60;details.step&#x60; says where (&#x60;endpoint&#x60;, &#x60;write&#x60; or &#x60;public_read&#x60;), &#x60;details.reason&#x60; says why, and &#x60;param&#x60; names the field most likely to be wrong. What the bucket needs: - an access key that may put objects into it (it may also delete objects, which lets the test file be cleaned up, but that is not required); - its files publicly readable at &#x60;publicBaseUrl&#x60;, either because the bucket is public or through a CDN. The secret access key is stored encrypted and is never returned or logged; a response shows only the last four characters of the access key id (&#x60;accessKeyHint&#x60;). Saving replaces the whole destination, so send every field again, including the secret. Files already stored stay where they are, and keep working for as long as that bucket stays publicly readable. Once a destination is set, an upload is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 &#x60;STORAGE_DESTINATION_UNAVAILABLE&#x60;, and when the bucket rejects the file with 502 &#x60;STORAGE_DESTINATION_WRITE_FAILED&#x60;. The caller must be the person who administers the partner (an API key of that account works); anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can set any partner&#39;s.
2119
- # @param partner_id The partner whose storage destination to set
2120
- # @param set_partner_storage_destination_request
2121
- # @param [Hash] opts the optional parameters
2122
- # @return [PartnerStorageDestinationResponse]
2123
- describe 'set_partner_storage_destination test' do
2124
- it 'should work' do
2125
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2126
- end
2127
- end
2128
-
2129
- # unit tests for set_partner_workflow_preset
2130
- # Offer a workflow as a place to start, or replace what a key offers
2131
- # Offers one of the partner account&#39;s own published workflows to its managed users under &#x60;key&#x60;. If the partner already offers something under that key it is replaced, so sending the same request twice is safe. Saving replaces the whole starting point: a &#x60;title&#x60;, &#x60;description&#x60; or &#x60;position&#x60; you leave out goes back to its default. Keys are 1 to 64 characters: lowercase letters, digits, hyphens and underscores, the first a letter or a digit. A workflow is offered once. What people get is the workflow&#39;s live version as it is when they start, so publishing the workflow changes what new starts get; workflows people already started are never touched. The offer is refused, and &#x60;error.details.reason&#x60; says why, when the workflow: - is not the partner account&#39;s own (a workflow of a team or of a customer, or of somebody else), or does not exist: 404, the same for both; - is archived (409 &#x60;workflow_archived&#x60;), or was never published (409 &#x60;workflow_not_published&#x60;); - shows no composition (422 &#x60;workflow_empty&#x60;), or a block shows a composition made for a customer or a team (422 &#x60;composition_not_own&#x60;); - chains more than 10 widgets (422 &#x60;too_many_widgets&#x60;), or a widget that the partner does not offer as a preset (422 &#x60;widget_not_preset&#x60;; &#x60;error.details.widgets&#x60; lists them, each with its &#x60;id&#x60; and &#x60;name&#x60;, so they can be offered first with &#x60;setPartnerPreset&#x60;); - is already offered under another key (409 &#x60;workflow_already_offered&#x60;; &#x60;error.details.key&#x60; says which), or the partner already offers 50 (409 &#x60;too_many_presets&#x60;). The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator, who offers the partner&#39;s workflow on its behalf.
2132
- # @param partner_id The partner whose starting point to set
2133
- # @param key The name your code and the picker use for the starting point
2134
- # @param offer_workflow_preset_request
2135
- # @param [Hash] opts the optional parameters
2136
- # @return [SetPartnerWorkflowPreset200Response]
2137
- describe 'set_partner_workflow_preset test' do
2138
- it 'should work' do
2139
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2140
- end
2141
- end
2142
-
2143
- # unit tests for set_user_adapter_connection
2144
- # Connect an adapter key to an account
2145
- # 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.
2146
- # @param user_id The account that keeps the key. For your own, your own user id
2147
- # @param adapter_id The adapter the key is for
2148
- # @param credential_key The key&#39;s name within the adapter
2149
- # @param set_adapter_connection_request
2150
- # @param [Hash] opts the optional parameters
2151
- # @return [SetUserAdapterConnection200Response]
2152
- describe 'set_user_adapter_connection test' do
2153
- it 'should work' do
2154
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2155
- end
2156
- end
2157
-
2158
- # unit tests for unarchive_workspace_workflow
2159
- # Unarchive a Workflow
2160
- # Brings an archived workflow back into the list: as paused when it was ever published (resume it to serve visitors again), as a draft when it never was. For personal workspace, use &#39;personal&#39; as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can unarchive.
2161
- # @param workspace_id The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403.
2162
- # @param workflow_id The workflow&#39;s id
2163
- # @param [Hash] opts the optional parameters
2164
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
2165
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
2166
- # @return [SaveWorkspaceWorkflow200Response]
2167
- describe 'unarchive_workspace_workflow test' do
2168
- it 'should work' do
2169
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2170
- end
2171
- end
2172
-
2173
- # unit tests for update_canvas
2174
- # Update Canvas
2175
- # Updates an existing canvas with the specified properties.
2176
- # @param id ID of the canvas to update
2177
- # @param update_canvas_request
2178
- # @param [Hash] opts the optional parameters
2179
- # @return [CanvasResponse]
2180
- describe 'update_canvas test' do
2181
- it 'should work' do
2182
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2183
- end
2184
- end
2185
-
2186
- # unit tests for update_composition
2187
- # Update Composition
2188
- # Updates a specific composition. The &#x60;Idempotency-Key&#x60; header is required (&#x60;400&#x60; without it). Send the same key when you retry. An editor session (see &#x60;createManagedUserEditorSession&#x60;) can send only &#x60;name&#x60;, &#x60;content&#x60;, &#x60;design&#x60; and &#x60;embedSettings&#x60;, and only for a composition made for its managed user. A body that names any other field is refused with &#x60;403&#x60; and &#x60;EDITOR_SESSION_FIELD_NOT_ALLOWED&#x60;. Send &#x60;databaseSchema&#x60; to add tables to the composition: the tables that are missing are made, and the ones that exist are left as they are. A &#x60;databaseSchema&#x60; that cannot be used is refused before anything is saved, with &#x60;400&#x60; and &#x60;INVALID_DATABASE_SCHEMA&#x60;. If the composition is saved but its tables cannot be made just now, the answer is still &#x60;200&#x60; and &#x60;meta.warnings&#x60; says so. **When several people edit the same composition.** A save that carries &#x60;content&#x60; can name the content version it started from in the &#x60;If-Match&#x60; header (the &#x60;contentVersion&#x60; of the composition you read, or the &#x60;ETag&#x60; of an earlier answer). If somebody saved the content since, nothing is overwritten: the save is refused with &#x60;412&#x60; and &#x60;CONTENT_VERSION_MISMATCH&#x60;, and &#x60;error.details.currentVersion&#x60; is the version to start again from. For a composition a team shares, &#x60;error.details&#x60; also says who got there first: &#x60;lastEditedBy&#x60; (&#x60;{ id, name }&#x60;, or &#x60;null&#x60; when nobody can be named) and &#x60;lastEditedAt&#x60;. An editor session, or a call made for one managed user, is told the version only. A save without &#x60;If-Match&#x60; still goes through, and the other person&#39;s change is replaced, as it always was.
2189
- # @param id Composition ID
2190
- # @param idempotency_key Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
2191
- # @param update_composition
2192
- # @param [Hash] opts the optional parameters
2193
- # @option opts [String] :if_match Optional content version from &#x60;contentVersion&#x60; or an &#x60;ETag&#x60; (&#x60;\&quot;3\&quot;&#x60;, &#x60;3&#x60;, or &#x60;*&#x60;). Read only when the body has &#x60;content&#x60;.
2194
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
2195
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
2196
- # @return [CreateCompositionFromWidget201Response]
2197
- describe 'update_composition test' do
2198
- it 'should work' do
2199
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2200
- end
2201
- end
2202
-
2203
- # unit tests for update_composition_database_record
2204
- # Update Record In Composition Database
2205
- # Updates a specific record in one of the composition&#39;s tables. Only the composition&#39;s own tables (made from its &#x60;databaseSchema&#x60; or from the tables its widget declares) can be reached; any other table name answers &#x60;404&#x60;.
2206
- # @param id ID of the composition
2207
- # @param table Name of the database table
2208
- # @param record_id ID of the record to update
2209
- # @param idempotency_key Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
2210
- # @param body
2211
- # @param [Hash] opts the optional parameters
2212
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
2213
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
2214
- # @return [CreateCompositionDatabaseRecord201Response]
2215
- describe 'update_composition_database_record test' do
2216
- it 'should work' do
2217
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2218
- end
2219
- end
2220
-
2221
- # unit tests for update_composition_status
2222
- # Update Composition Status
2223
- # Updates the status of a specific composition. The &#x60;Idempotency-Key&#x60; header is required (&#x60;400&#x60; without it). Send the same key when you retry.
2224
- # @param id Composition ID
2225
- # @param idempotency_key Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
2226
- # @param update_composition_status_request
2227
- # @param [Hash] opts the optional parameters
2228
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
2229
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
2230
- # @return [CompositionResponse]
2231
- describe 'update_composition_status test' do
2232
- it 'should work' do
2233
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2234
- end
2235
- end
2236
-
2237
- # unit tests for update_managed_user
2238
- # Update Managed User
2239
- # Updates an existing managed user. Only &#x60;externalId&#x60;, &#x60;metadata&#x60; and &#x60;isActive&#x60; can change, and &#x60;metadata&#x60; is replaced as a whole, so send all of it. &#x60;isActive: false&#x60; switches the managed user off: what it already has stays, and nothing new can be filed under it until you send &#x60;isActive: true&#x60;. Switching it off also ends all of its editor sessions, and they do not come back when you switch it on again. The &#x60;Idempotency-Key&#x60; header is required (&#x60;400&#x60; without it).
2240
- # @param id ID of the managed user to update
2241
- # @param idempotency_key Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
2242
- # @param update_managed_user
2243
- # @param [Hash] opts the optional parameters
2244
- # @return [ManagedUserResponse]
2245
- describe 'update_managed_user test' do
2246
- it 'should work' do
2247
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2248
- end
2249
- end
2250
-
2251
- # unit tests for update_partner_entry_context_signing
2252
- # Require a signed context, or stop requiring it
2253
- # Chooses what the gateway does with an entry whose &#x60;context&#x60; carries no valid signature. With &#x60;required: false&#x60; (the default) an entry that carries a signature is checked and refused when the signature is wrong or out of date, and an entry that carries none is accepted, as it always was. With &#x60;required: true&#x60; an entry without a valid signature is refused with 403 &#x60;CONTEXT_SIGNATURE_REQUIRED&#x60;: use it once every page of yours that embeds a composition signs its context. Signatures cannot be required before you have made a secret (&#x60;rotatePartnerEntryContextSecret&#x60;): the answer is 409, so that you cannot lock your own compositions out of taking entries. The change reaches every part of the gateway within a minute. Saving the same choice twice leaves the same state, so a retry is harmless and &#x60;Idempotency-Key&#x60; is optional. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
2254
- # @param partner_id The partner whose context signing to change
2255
- # @param update_partner_entry_context_signing_request
2256
- # @param [Hash] opts the optional parameters
2257
- # @option opts [String] :idempotency_key Optional: without it the call is carried out every time it is sent. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
2258
- # @return [PartnerEntryContextSigningResponse]
2259
- describe 'update_partner_entry_context_signing test' do
2260
- it 'should work' do
2261
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2262
- end
2263
- end
2264
-
2265
- # unit tests for update_partner_notification_settings
2266
- # Choose where your notifications go
2267
- # Changes who gets the emails, which events you want by email and by webhook, and the address of your webhook. A key you leave out of the body is left as it was; send only what changes. **Email.** &#x60;emailRecipients&#x60; is the list of addresses (at most five). While it is empty the emails about invoices go to the billing emails of your billing profile (your contact email when there are none), and the others to your contact email. The events about money and about the standing of your account are always emailed, whatever &#x60;emailEvents&#x60; says; it narrows the others. **Webhook.** &#x60;webhookUrl&#x60; is where Widgetic sends a signed &#x60;POST&#x60; for each event, so that your own system can act on it (mark an invoice paid, warn your team that credits are low). The address must be &#x60;https&#x60; on the standard port, on a public site, and must not redirect. Setting an address when you have no secret yet makes one, and the answer carries it as &#x60;webhookSecret&#x60;: **keep it now, it is shown once**. &#x60;webhookEvents&#x60; narrows what is sent. Each call has a JSON body, &#x60;{ \&quot;id\&quot;: \&quot;evt_...\&quot;, \&quot;type\&quot;: \&quot;invoice.paid\&quot;, \&quot;createdAt\&quot;: \&quot;...\&quot;, \&quot;partnerId\&quot;: \&quot;...\&quot;, \&quot;data\&quot;: { ... } }&#x60; (&#x60;data&#x60; is the &#x60;data&#x60; of &#x60;PartnerNotification&#x60;), and these headers: &#x60;webhook-id&#x60; (the same as &#x60;id&#x60;, and the same on every retry), &#x60;webhook-timestamp&#x60; (seconds since 1970) and &#x60;webhook-signature&#x60; (&#x60;v1,&#x60; and a base64 HMAC-SHA256). It is the Standard Webhooks scheme, so any of its libraries verifies it. By hand: take your secret without the &#x60;whsec_&#x60; prefix, decode it from base64, and sign the text &#x60;&lt;webhook-id&gt;.&lt;webhook-timestamp&gt;.&lt;the raw body&gt;&#x60; with it; the header holds &#x60;v1,&lt;base64 of the result&gt;&#x60; (two signatures separated by a space while a rotated secret overlaps). Reject a &#x60;webhook-timestamp&#x60; that is more than five minutes old. Answer with a 2xx status within ten seconds. Anything else is tried again, eight attempts in all over about two days (&#x60;listPartnerNotificationDeliveries&#x60; shows each). Delivery is at least once: if your answer was lost the same event arrives again with the same &#x60;id&#x60;, so drop what you have already handled by it. Changing the settings needs an API key with full access: they decide where your notifications go. The caller must be the person who administers the partner, or a Widgetic administrator.
2268
- # @param partner_id The partner whose notification settings to change
2269
- # @param update_partner_notification_settings_request
2270
- # @param [Hash] opts the optional parameters
2271
- # @option opts [String] :idempotency_key Optional: without it the call is carried out every time it is sent. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
2272
- # @return [PartnerNotificationSettingsChangeResponse]
2273
- describe 'update_partner_notification_settings test' do
2274
- it 'should work' do
2275
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2276
- end
2277
- end
2278
-
2279
- # unit tests for update_personal_workspace_domain
2280
- # Change a website on your list
2281
- # Replaces the website of one entry on an account&#39;s own list. The same rules apply as when adding one (&#x60;addPersonalWorkspaceDomain&#x60;): a website name such as &#x60;example.com&#x60; or &#x60;*.example.com&#x60;, kept in its cleaned form, and refused when it is not a website name or is already on the list.
2282
- # @param id The account the list belongs to. For your own, your own user id
2283
- # @param domain_id The &#x60;id&#x60; of the entry, as the list shows it
2284
- # @param update_domain_request
2285
- # @param [Hash] opts the optional parameters
2286
- # @return [PersonalWorkspaceDomainResultResponse]
2287
- describe 'update_personal_workspace_domain test' do
2288
- it 'should work' do
2289
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2290
- end
2291
- end
2292
-
2293
- # unit tests for update_user_api_key
2294
- # Rename an API key, or switch it off or on
2295
- # Renames a key, or switches it off (&#x60;isActive: false&#x60;) or back on. A key that is switched off is refused at once by the server that took the request and within a minute by the others, and can be switched on again; deleting is for a key that is not coming back. The secret, the expiry and the scopes of a key cannot be changed. Only a key with full access can make these requests: a key limited to some scopes is refused with 403 and the code &#x60;API_KEY_SCOPE_MISSING&#x60;. Renaming and switching off can be done with an API key. Switching a key on needs a person signed in on widgetic.com: a request that asks for it with an API key or an SDK token is refused with 403, so a leaked key cannot bring a dormant key back to life.
2296
- # @param id The account the key belongs to
2297
- # @param key_id The &#x60;keyId&#x60; of the key, as the list shows it
2298
- # @param update_user_api_key_request
2299
- # @param [Hash] opts the optional parameters
2300
- # @return [UserApiKeyResponse]
2301
- describe 'update_user_api_key test' do
2302
- it 'should work' do
2303
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2304
- end
2305
- end
2306
-
2307
- # unit tests for upload_public_composition_adapter_file
2308
- # Send the file a visitor chose through the upload adapter of a published widget
2309
- # 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.
2310
- # @param composition_id
2311
- # @param ticket The ticket the &#x60;begin-upload&#x60; operation answered with.
2312
- # @param body
2313
- # @param [Hash] opts the optional parameters
2314
- # @return [PublicAdapterFileResult]
2315
- describe 'upload_public_composition_adapter_file test' do
2316
- it 'should work' do
2317
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2318
- end
2319
- end
2320
-
2321
- # unit tests for uploads_get
2322
- # List the account&#39;s uploads
2323
- # The files the account has uploaded, newest first. Deleted files are not listed. Returns at most &#x60;limit&#x60; files and has no further pages: a client that needs more narrows the list instead, for example to one managed user&#39;s files with &#x60;managedUserId&#x60; or &#x60;managedUserExternalId&#x60;. The files that visitors sent through a widget&#39;s upload adapter (&#x60;source&#x60; is &#x60;widget-visitor-upload&#x60;) are not part of this list, so that a popular widget does not push the account&#39;s own files out of it; naming one widget with &#x60;widgetId&#x60; lists what visitors sent to that widget as well.
2324
- # @param [Hash] opts the optional parameters
2325
- # @option opts [Integer] :limit Maximum number of files to return
2326
- # @option opts [String] :managed_user_id List only the files uploaded for this managed user (Widgetic&#39;s id for the user). Send this or &#x60;managedUserExternalId&#x60;, not both.
2327
- # @option opts [String] :managed_user_external_id List only the files uploaded for the managed user you registered with this &#x60;externalId&#x60; (your own identifier for the user). Send this or &#x60;managedUserId&#x60;, not both.
2328
- # @return [UploadsGet200Response]
2329
- describe 'uploads_get test' do
2330
- it 'should work' do
2331
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2332
- end
2333
- end
2334
-
2335
- # unit tests for uploads_id_delete
2336
- # Delete an upload
2337
- # Removes the stored file and the upload row. A file in Widgetic&#39;s own storage gives back the space it took from your storage allowance; a file in your own bucket is removed from your bucket. Deleting an upload that is already gone succeeds the same way as the first delete. An upload that belongs to another account is not found. If the storage cannot be reached the call fails and nothing is marked deleted, so it can be repeated.
2338
- # @param id
2339
- # @param [Hash] opts the optional parameters
2340
- # @return [UploadsIdDelete200Response]
2341
- describe 'uploads_id_delete test' do
2342
- it 'should work' do
2343
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2344
- end
2345
- end
2346
-
2347
- # unit tests for uploads_id_get
2348
- # Get an upload by id
2349
- # The details of one of the account&#39;s uploads. An upload that belongs to another account is not found.
2350
- # @param id The upload to read
2351
- # @param [Hash] opts the optional parameters
2352
- # @return [UploadResponse]
2353
- describe 'uploads_id_get test' do
2354
- it 'should work' do
2355
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2356
- end
2357
- end
2358
-
2359
- # unit tests for uploads_limits_get
2360
- # Upload size limits and accepted file types
2361
- # The size limit and the accepted file types of the upload endpoints. Read them from here rather than hard-coding thresholds: they are configuration and can change. The limits are the same for every account, whatever its plan: &#x60;multipart_max_bytes&#x60; for a file sent in one request (10 MB) and &#x60;tus_max_bytes&#x60; for a resumable upload (250 MB).
2362
- # @param [Hash] opts the optional parameters
2363
- # @return [UploadLimitsResponse]
2364
- describe 'uploads_limits_get test' do
2365
- it 'should work' do
2366
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2367
- end
2368
- end
2369
-
2370
- # unit tests for uploads_post
2371
- # Upload a file
2372
- # Stores one file for the account and returns its public address. This is how a user&#39;s own images, video and PDFs reach a widget&#39;s content. Send a &#x60;multipart/form-data&#x60; request with the file in the field named &#x60;file&#x60;. The file counts against the storage of the workspace it is uploaded in, and a full workspace is refused with 413 and &#x60;QUOTA_STORAGE_EXCEEDED&#x60;. For a person signed in on widgetic.com that is the workspace they are currently working in: inside a team, the team&#39;s shared storage; inside their own workspace, their own allowance. An organization API key, and a Shopify store&#39;s session, always work in that team&#39;s shared storage. A personal API key or an SDK token always uses the account&#39;s own allowance. The two never add up and one never lends room to the other. A file over the size limit is refused with 413 and &#x60;UPLOAD_TOO_LARGE&#x60;, and a type that is not accepted with 415 and &#x60;UPLOAD_UNSUPPORTED_TYPE&#x60;; &#x60;uploadsLimitsGet&#x60; lists the size limit and the accepted types. A file is judged by what is in it, not by the type it is sent as. A file that is not the type it claims (a web page sent as &#x60;image/png&#x60;) is refused with 415 and &#x60;UPLOAD_UNSUPPORTED_TYPE&#x60;, and a picture sent under the wrong picture type is stored under the type it really is, which &#x60;mime_type&#x60; in the answer says. An SVG is rewritten as it is stored: script, &#x60;foreignObject&#x60;, animation and references to other addresses are taken out, it must be UTF-8 and at most 2 MB, and the stored file can be larger or smaller than the one sent. Anything that is not an image, audio or video (a PDF, for example) is served as a download rather than shown in a page. When the full storage is a Shopify store&#39;s team&#39;s, extra storage cannot be added through Shopify yet, so the message ends by saying so and what to do instead: delete files, or contact support. On a Solo plan it names the Teams plan (which holds more) and &#x60;error.details.planPageUrl&#x60; is the address of the plan page on Shopify. &#x60;error.suggestedAction&#x60; says the same in a few words, instead of the usual \&quot;upgrade your storage plan\&quot;. Any other team, and a person&#39;s own workspace, get the shorter message. To upload the file for one of your managed users, send &#x60;managedUserId&#x60; (Widgetic&#39;s id for the user) or &#x60;managedUserExternalId&#x60; (your own identifier for the user), not both. The file stays in your account and counts against its allowance; the tag lets you list one user&#39;s files with &#x60;uploadsGet&#x60;. The managed user must be yours and active: one that is not yours, or does not exist, is refused with 404 and &#x60;MANAGED_USER_NOT_FOUND&#x60;, and one that is switched off with 409 and &#x60;MANAGED_USER_INACTIVE&#x60;, before the file is stored. The tag is set here and does not change afterwards. Called with an editor session (&#x60;createManagedUserEditorSession&#x60;), the file is always filed for the session&#39;s own managed user and is always media for widget content: naming another managed user is refused with 403 and &#x60;MANAGED_USER_SESSION_MISMATCH&#x60;, and &#x60;contextType&#x60;, &#x60;source&#x60;, &#x60;widgetId&#x60; and &#x60;conversationId&#x60; are ignored. A full storage allowance is refused with the same 413 and &#x60;QUOTA_STORAGE_EXCEEDED&#x60;, but the message only says that it is not available right now (not how much is stored: that is the partner&#39;s business) and &#x60;error.details.limit&#x60; is &#x60;storage&#x60;. An account that administers a partner with a storage destination (&#x60;setPartnerStorageDestination&#x60;) has its files stored in the partner&#39;s own bucket instead. Such a file takes none of the allowance, its &#x60;url&#x60; is served from the partner&#39;s public address, and its &#x60;storage_key&#x60; is the key in the partner&#39;s bucket. The file is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 and &#x60;STORAGE_DESTINATION_UNAVAILABLE&#x60;, and when the partner&#39;s storage rejects the file with 502 and &#x60;STORAGE_DESTINATION_WRITE_FAILED&#x60;. Partner storage is not optional, and it does not depend on how the file arrives. A partner&#39;s own uploads (with its API key, an SDK token, or from the Widgetic website, the resumable route and the media library alike) and the uploads of its customers&#39; editor sessions are kept in the partner&#39;s own storage or not at all, so a partner with no destination (or one that removed it after the session was made) has them refused with 409 and &#x60;PARTNER_STORAGE_REQUIRED&#x60;; they are never stored with Widgetic. An editor session&#39;s browser is only told that the feature is not available right now.
2373
- # @param file The file to store
2374
- # @param [Hash] opts the optional parameters
2375
- # @option opts [String] :context_type What the file is for. Send &#x60;content-property&#x60; for media that becomes widget content (images, video and PDF); the other values are used by Widgetic&#39;s own editor.
2376
- # @option opts [String] :source Which part of the product, or which client, the file comes from
2377
- # @option opts [String] :managed_user_id Upload the file for one of your managed users, by Widgetic&#39;s id for the user. Send this or &#x60;managedUserExternalId&#x60;, not both.
2378
- # @option opts [String] :managed_user_external_id The same, by your own identifier for the user, the &#x60;externalId&#x60; you gave when you created the managed user. Send this or &#x60;managedUserId&#x60;, not both.
2379
- # @option opts [String] :purpose Where in your product you use the file. It is kept with the file, so that a customer&#39;s storage can be counted by purpose (&#x60;getManagedUserStorageUsage&#x60;). Optional; any other value is refused with 400 and &#x60;UPLOAD_INVALID_PURPOSE&#x60;.
2380
- # @return [UploadResponse]
2381
- describe 'uploads_post test' do
2382
- it 'should work' do
2383
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2384
- end
2385
- end
2386
-
2387
- # unit tests for validate_composition_content
2388
- # Validate Content
2389
- # Checks content against the composition&#39;s widget schema without saving it. Send what a content update (&#x60;PUT /compositions/{id}/content&#x60;) would store, &#x60;{ \&quot;design\&quot;: {...}, \&quot;content\&quot;: {...} }&#x60;, or the widget&#39;s values alone. Each value is checked by the kind of field the widget declares for it: text, a number within the limits of its slider, true or false, one of the choices of a dropdown, a color, a font, the address of an image, a date. The items of the widget&#39;s list are checked the same way, and their number against the limits of the list. A value that cannot be what the field holds, or a number outside its range, is an error and &#x60;valid&#x60; is false. Text longer than the field takes, a number or true/false sent as text, and a name the widget has no field for are warnings, and &#x60;valid&#x60; stays true. The design is not checked here. Nothing is saved and nothing in the body is changed.
2390
- # @param id ID of the composition
2391
- # @param idempotency_key Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
2392
- # @param request_body
2393
- # @param [Hash] opts the optional parameters
2394
- # @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
2395
- # @option opts [String] :x_managed_user_external_id Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user.
2396
- # @return [ValidateCompositionContentResponse]
2397
- describe 'validate_composition_content test' do
2398
- it 'should work' do
2399
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2400
- end
2401
- end
2402
-
2403
- # unit tests for validate_token
2404
- # Validate current authentication token
2405
- # @param [Hash] opts the optional parameters
2406
- # @return [ValidateToken200Response]
2407
- describe 'validate_token test' do
2408
- it 'should work' do
2409
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2410
- end
2411
- end
2412
-
2413
- # unit tests for verify_partner_data_database
2414
- # Check that a partner&#39;s own database still works
2415
- # Runs the same check as &#x60;setPartnerDataDatabase&#x60; against the database already saved: a schema is made in it, a table created, a row written and read back, and the schema removed again. Use it after changing the role&#39;s password or the project&#39;s settings in Neon, or when saving is failing with 503 &#x60;PARTNER_DATABASE_UNAVAILABLE&#x60;. The result is recorded either way. A pass refreshes &#x60;verifiedAt&#x60; and clears &#x60;lastVerificationError&#x60;; a failure answers 422 &#x60;PARTNER_DATABASE_UNVERIFIED&#x60; and is recorded in &#x60;lastVerificationError&#x60; and &#x60;lastVerificationFailedAt&#x60;, so the database shows what went wrong the next time it is read. A failed check does not remove the database. &#x60;details.reason&#x60; is one of the reasons &#x60;setPartnerDataDatabase&#x60; lists, or &#x60;STORED_STRING_UNREADABLE&#x60; when the connection string Widgetic stored can no longer be read: set the database again, with its connection string. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
2416
- # @param partner_id The partner whose database to check
2417
- # @param [Hash] opts the optional parameters
2418
- # @return [PartnerDataDatabaseResponse]
2419
- describe 'verify_partner_data_database test' do
2420
- it 'should work' do
2421
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2422
- end
2423
- end
2424
-
2425
- # unit tests for verify_partner_storage_destination
2426
- # Check that a partner&#39;s storage destination still works
2427
- # Runs the same check as &#x60;setPartnerStorageDestination&#x60; against the destination already saved: a test file is written, read back from the public address and deleted. Use it after rotating a key or changing a bucket policy, or when uploads are failing with 502 or 503. The result is recorded either way. A pass refreshes &#x60;verifiedAt&#x60; and clears &#x60;lastVerificationError&#x60;; a failure answers 422 &#x60;STORAGE_DESTINATION_UNVERIFIED&#x60; and is recorded in &#x60;lastVerificationError&#x60; and &#x60;lastVerificationFailedAt&#x60;, so the destination shows what went wrong the next time it is read. A failed check does not remove the destination or stop uploads from using it. The caller must be the person who administers the partner, or a Widgetic administrator.
2428
- # @param partner_id The partner whose storage destination to check
2429
- # @param [Hash] opts the optional parameters
2430
- # @return [PartnerStorageDestinationResponse]
2431
- describe 'verify_partner_storage_destination test' do
2432
- it 'should work' do
2433
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
2434
- end
2435
- end
2436
-
2437
- end