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
@@ -32,7 +32,7 @@ describe 'PublicEmbedApi' do
32
32
  end
33
33
  end
34
34
 
35
- # unit tests for call_public_composition_adapter_0
35
+ # unit tests for call_public_composition_adapter
36
36
  # Call a gateway operation of an adapter a published widget uses
37
37
  # 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).
38
38
  # @param composition_id
@@ -41,13 +41,13 @@ describe 'PublicEmbedApi' do
41
41
  # @param public_adapter_call_request
42
42
  # @param [Hash] opts the optional parameters
43
43
  # @return [PublicAdapterCallResult]
44
- describe 'call_public_composition_adapter_0 test' do
44
+ describe 'call_public_composition_adapter test' do
45
45
  it 'should work' do
46
46
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
47
47
  end
48
48
  end
49
49
 
50
- # unit tests for create_public_composition_entry_0
50
+ # unit tests for create_public_composition_entry
51
51
  # Append a visitor entry through the gateway
52
52
  # 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`.
53
53
  # @param composition_id
@@ -57,99 +57,99 @@ describe 'PublicEmbedApi' do
57
57
  # @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.
58
58
  # @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.
59
59
  # @return [PublicCompositionEntryCreated]
60
- describe 'create_public_composition_entry_0 test' do
60
+ describe 'create_public_composition_entry test' do
61
61
  it 'should work' do
62
62
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
63
63
  end
64
64
  end
65
65
 
66
- # unit tests for get_public_composition_embed_0
66
+ # unit tests for get_public_composition_embed
67
67
  # Resolve a composition UUID to a published widget URL
68
68
  # Public customer embed lookup. No API key. Used by embed-sdk.js on third-party sites. If the composition's owner listed the websites it may appear on (the workspace's domain list, or the `allowedDomains` of a partner the owner administers), a request from any other website is refused with 403 `DOMAIN_NOT_ALLOWED`. The website is read from the `Origin` header, or the host of `Referer` when there is no `Origin`; 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's own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed. So is the website where a partner integrates Widgetic, with every subdomain of it (`platformDomain` in the answer of `GET /partners/mine`), for the widgets of that partner: a partner's list never has to name it. The list stops other websites from showing the embed in a visitor's browser; it does not hide the published content from someone who holds the composition ID. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **Limit.** 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 `RATE_LIMITED` with a `Retry-After` header.
69
69
  # @param composition_id
70
70
  # @param [Hash] opts the optional parameters
71
71
  # @return [GetPublicCompositionEmbed200Response]
72
- describe 'get_public_composition_embed_0 test' do
72
+ describe 'get_public_composition_embed test' do
73
73
  it 'should work' do
74
74
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
75
75
  end
76
76
  end
77
77
 
78
- # unit tests for get_public_composition_iframe_0
78
+ # unit tests for get_public_composition_iframe
79
79
  # Embed a published composition with its saved values
80
80
  # Public HTML wrapper with an inner published artifact iframe. No API key or SDK required. If the composition's owner listed the websites it may appear on, the page is sent with `Content-Security-Policy: frame-ancestors` naming those websites (and Widgetic'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 `Referer` policy that website uses. Opening the address directly still works. An owner who listed nothing is not restricted. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/frame`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag.
81
81
  # @param composition_id
82
82
  # @param [Hash] opts the optional parameters
83
83
  # @return [String]
84
- describe 'get_public_composition_iframe_0 test' do
84
+ describe 'get_public_composition_iframe test' do
85
85
  it 'should work' do
86
86
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
87
87
  end
88
88
  end
89
89
 
90
- # unit tests for get_public_workflow_0
90
+ # unit tests for get_public_workflow
91
91
  # Read the published Workflow of an embed
92
92
  # Public read of a workflow for the embed that carries `workflow-id`. No API key. The answer is the live version (its graph, the composition a new visitor starts on, the time zone, the languages its compositions can be shown in, and the token that lets the browser report counts), or `status: paused` with nothing else, in which case the embed shows only its first composition. A workflow that is a draft, archived or unknown answers 404, and the embed then behaves as a plain embed of its `composition-id`. So does a workflow whose owner is not being served (a plan that lapsed, a partner whose agreement is not in force): the answer is the one the compositions of that owner give. **Address.** `https://api.widgetic.com/embed/workflows/{workflowId}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. The answer may be reused for a few seconds (`Cache-Control: public, max-age=15`), so a publish or a pause reaches visitors within moments. The graph is readable by anyone who has the workflow's id: its rules run in the visitor's browser, so a rule must never hold a secret.
93
93
  # @param workflow_id
94
94
  # @param [Hash] opts the optional parameters
95
- # @return [GetPublicWorkflow200Response]
96
- describe 'get_public_workflow_0 test' do
95
+ # @return [PublicWorkflowResponse]
96
+ describe 'get_public_workflow test' do
97
97
  it 'should work' do
98
98
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
99
99
  end
100
100
  end
101
101
 
102
- # unit tests for get_public_workflow_frame_0
102
+ # unit tests for get_public_workflow_frame
103
103
  # Show a published Workflow in a page of its own
104
- # A page that runs a published workflow, for a place that can only be given an address or an iframe: a chat messenger, a link page, a site builder, a blog that follows oEmbed. No API key, no SDK to add. The page holds the Embed SDK and the same tag a website carries (`<widgetic workflow-id composition-id>`), so a visitor moves from one composition to the next in place, by the same rules, exactly as on a website. A paused workflow shows its first composition alone, as its embeds do. **What the frame can count.** Only what happens inside it: entries, a widget's goals and actions, and waits. The page events a website can send to a workflow (`widgetic:workflow-event`) are events of the page around the embed, and they do not cross an iframe, so a connection that waits for one never fires from a frame. A workflow that is a draft, is archived, or does not exist, and one whose owner is not being served, answers 404 with a short page that gives no reason. If the owner of the workflow's first composition listed the websites it may appear on, the page is sent with `Content-Security-Policy: frame-ancestors` naming those websites (and Widgetic's own), so a browser refuses to show it inside any other website. Opening the address directly still works. An owner who listed nothing is not restricted. The page links its oEmbed card, so a site that follows oEmbed turns the address of the frame into an embed. **Address.** `https://api.widgetic.com/embed/workflows/{workflowId}/frame`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag.
104
+ # A page that runs a published workflow, for a place that can only be given an address or an iframe: a chat messenger, a link page, a site builder, a blog that follows oEmbed. No API key, no SDK to add. The page holds the Embed SDK and the same tag a website carries (`<widgetic workflow-id composition-id>`), so a visitor moves from one composition to the next in place, by the same rules, exactly as on a website. A paused workflow shows its first composition alone, as its embeds do. **What the frame can count.** Only what happens inside it: entries, a widget's goals and actions, and waits. The page events a website can send to a workflow (`widgetic:workflow-event`) are events of the page around the embed, and they do not cross an iframe, so a connection that waits for one never fires from a frame. A workflow that is a draft, is archived, or does not exist, and one whose owner is not being served, answers 404 with a short page that gives no reason. If the owner of the workflow's first composition listed the websites it may appear on, the page is sent with `Content-Security-Policy: frame-ancestors` naming those websites (and Widgetic's own, 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. Opening the address directly still works. An owner who listed nothing is not restricted. The page links its oEmbed card, so a site that follows oEmbed turns the address of the frame into an embed. **Address.** `https://api.widgetic.com/embed/workflows/{workflowId}/frame`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag.
105
105
  # @param workflow_id
106
106
  # @param [Hash] opts the optional parameters
107
107
  # @return [String]
108
- describe 'get_public_workflow_frame_0 test' do
108
+ describe 'get_public_workflow_frame test' do
109
109
  it 'should work' do
110
110
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
111
111
  end
112
112
  end
113
113
 
114
- # unit tests for get_public_workflow_version_0
114
+ # unit tests for get_public_workflow_version
115
115
  # Read one published version of a Workflow
116
116
  # Public read of one version of a workflow, for a visitor who started on it before a newer one was published: they finish on the version they started on (for up to 30 days; after that they get the latest). The graph of a version never changes once published; the languages its compositions can be shown in (`translations`) are read each time, as for the live version. Like the read of the live version, it answers `status: paused` with nothing else while the workflow is paused, and 404 when the workflow is a draft or archived, or has no such version. **Address.** `https://api.widgetic.com/embed/workflows/{workflowId}/versions/{versionId}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag.
117
117
  # @param workflow_id
118
118
  # @param version_id
119
119
  # @param [Hash] opts the optional parameters
120
- # @return [GetPublicWorkflow200Response]
121
- describe 'get_public_workflow_version_0 test' do
120
+ # @return [PublicWorkflowResponse]
121
+ describe 'get_public_workflow_version test' do
122
122
  it 'should work' do
123
123
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
124
124
  end
125
125
  end
126
126
 
127
- # unit tests for post_public_composition_embed_status_0
127
+ # unit tests for post_public_composition_embed_status
128
128
  # Batch-check whether compositions are currently served for embed
129
129
  # Public batch health check for embed-sdk.js. No API key. Uses the same serving gate and domain policy as `GET /embed/compositions/{compositionId}`: the caller's website is read from `Origin`, or the host of `Referer` when there is no `Origin`. A request that names neither (a server or tool) is not refused for domain reasons. **Address.** `https://api.widgetic.com/embed/compositions/status`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **Limit.** The route counts against the same limit as the lookup and the frame routes: 500 calls for each visitor address and browser in one counting window. A call is ONE hit whatever the number of `ids` it carries (up to 100), so a server that checks many compositions spends one call for each hundred of them. A visitor who is over the limit gets 429 `RATE_LIMITED` for the WHOLE call, with a `Retry-After` header and no state for any id: there is no per-composition rate-limit state in the answer.
130
130
  # @param post_public_composition_embed_status_request
131
131
  # @param [Hash] opts the optional parameters
132
132
  # @return [PostPublicCompositionEmbedStatus200Response]
133
- describe 'post_public_composition_embed_status_0 test' do
133
+ describe 'post_public_composition_embed_status test' do
134
134
  it 'should work' do
135
135
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
136
136
  end
137
137
  end
138
138
 
139
- # unit tests for report_public_workflow_events_0
139
+ # unit tests for report_public_workflow_events
140
140
  # Report what visitors did in a Workflow, as counts
141
141
  # Public report of counts for a workflow, sent by the embed. No API key. Each event is one id and a number: a visitor reached a block (`n`), took a connection (`e`), or could not be moved on (`f`). Nothing else is kept: no visitor, no value a visitor typed, no address. A batch carries at most 100 events and 16 KB. The same report may carry `heights`: how tall a step settled at in the browser, which the embed code of the workflow uses to start its box at a real height (a composition, a whole number of pixels, nothing about the visitor). A report is accepted only with the `token` the workflow's own read handed out for that `versionId`, so a page that never read the workflow cannot raise its numbers. An expired token (`EVENT_TOKEN_EXPIRED`) is refused with 401: read the workflow again for a new one. Counts for ids that are not in that version, or for a workflow that is not live, are not recorded and the answer says so (`recorded: false`) with 200: the visitor's page has nothing to fix. The body is JSON, sent as `application/json` or as `text/plain` (a \"simple\" cross-origin request, which is what lets a report leave a page that is being closed). **Address.** `https://api.widgetic.com/embed/workflows/{workflowId}/events`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag.
142
142
  # @param workflow_id
143
143
  # @param public_workflow_events_request
144
144
  # @param [Hash] opts the optional parameters
145
145
  # @return [ReportPublicWorkflowEvents200Response]
146
- describe 'report_public_workflow_events_0 test' do
146
+ describe 'report_public_workflow_events test' do
147
147
  it 'should work' do
148
148
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
149
149
  end
150
150
  end
151
151
 
152
- # unit tests for upload_public_composition_adapter_file_0
152
+ # unit tests for upload_public_composition_adapter_file
153
153
  # Send the file a visitor chose through the upload adapter of a published widget
154
154
  # The second of the two calls the `upload` adapter's module makes from the visitor's browser (the first, the `begin-upload` operation of `callPublicCompositionAdapter`, answers with the ticket this route takes). The module sends the file itself, as the body, with its media type as the `Content-Type`. It is not meant to be called by hand, and it takes no API key. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/adapters/upload/files/{ticket}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **The ticket.** Single-use and valid for ten minutes, given for one file: its name, its media type and its exact size are what the visitor said when the ticket was asked for, after the widget's owner's settings (the kinds of file they take, the largest size) were applied. The `Content-Type` and the `Content-Length` of this request must be those, and the body must be exactly that many bytes (400 `UPLOAD_FILE_CHANGED` otherwise). The gateway never believes the type it was told: the first bytes of the file must be a file of that type and one the owner accepts (422 otherwise). A ticket whose file was stored and is sent again is answered with the same file, so a visitor whose connection dropped after the file landed does not store it twice; a ticket whose attempt failed is spent, and the module asks for a new one. **The virus check.** Before anything is stored, the file is checked for viruses, wherever it would be kept (Widgetic's storage or a partner's own bucket). A file that fails the check is refused with 422 `UPLOAD_FILE_UNSAFE` and nothing is stored. When the check cannot be done, nothing is stored either, and the answer is the same neutral 503 `UPLOAD_UNAVAILABLE` as for any other cause the visitor is not told. The ticket of a refused file is spent. **What it stores.** The file goes to the widget owner's storage: Widgetic's, or the partner's own bucket for a widget of a customer a partner manages. It counts against the owner's storage allowance and is filed in the folder the owner chose, as a file sent by a visitor, which the owner's own file list leaves out. A full allowance, a partner's storage that cannot be used and a stopped feature are all the same 503 `UPLOAD_UNAVAILABLE` to a visitor, and the owner is told through a notice. **Who may call.** The same rule as the entry route: a permitted `Origin` header, which is the artifact origin the widget runs from or any website when the owner has not restricted the allowed websites (when the owner has, one of the websites the owner listed, Widgetic's own sites, the visitor's own machine or the owner's own platform). A request without a permitted `Origin` is 403 `ORIGIN_NOT_ALLOWED`. A composition that is not served (unpublished, or its owner's plan does not serve it) is 404, with the codes of the other public embed routes. **Limits.** 30 requests a minute for each visitor address and composition and 240 a minute for a composition (429 `RATE_LIMITED`, with a `Retry-After` header); at most 10 MB for a file, and only so many files held in memory at once on each gateway process (503 `UPLOAD_BUSY`, with a `Retry-After`). A file that does not arrive within two minutes is 408 `UPLOAD_TIMEOUT`. Every answer but a success closes the connection, so a client that is refused before it has sent the file reads the answer and stops.
155
155
  # @param composition_id
@@ -157,7 +157,7 @@ describe 'PublicEmbedApi' do
157
157
  # @param body
158
158
  # @param [Hash] opts the optional parameters
159
159
  # @return [PublicAdapterFileResult]
160
- describe 'upload_public_composition_adapter_file_0 test' do
160
+ describe 'upload_public_composition_adapter_file test' do
161
161
  it 'should work' do
162
162
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
163
163
  end
@@ -32,11 +32,12 @@ describe 'TokensApi' do
32
32
  end
33
33
  end
34
34
 
35
- # unit tests for validate_token_0
35
+ # unit tests for validate_token
36
36
  # Validate current authentication token
37
+ # Describes the credential the request was made with: how it signs in (`tokenType`), what it may do (`scopes`) and the account it belongs to (`userId`). A credential that belongs to the platform itself, and not to a customer's account, is held to no scope: it is answered with `tokenType` `service_key`, `scopes` `[\"*:*\"]` and no `userId`.
37
38
  # @param [Hash] opts the optional parameters
38
39
  # @return [ValidateToken200Response]
39
- describe 'validate_token_0 test' do
40
+ describe 'validate_token test' do
40
41
  it 'should work' do
41
42
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
42
43
  end
@@ -32,58 +32,58 @@ describe 'UploadsApi' do
32
32
  end
33
33
  end
34
34
 
35
- # unit tests for uploads_get_0
36
- # List the account's uploads
37
- # The files the account has uploaded, newest first. Deleted files are not listed. Returns at most `limit` files and has no further pages: a client that needs more narrows the list instead, for example to one managed user's files with `managedUserId` or `managedUserExternalId`. The files that visitors sent through a widget's upload adapter (`source` is `widget-visitor-upload`) are not part of this list, so that a popular widget does not push the account's own files out of it; naming one widget with `widgetId` lists what visitors sent to that widget as well.
38
- # @param [Hash] opts the optional parameters
39
- # @option opts [Integer] :limit Maximum number of files to return
40
- # @option opts [String] :managed_user_id List only the files uploaded for this managed user (Widgetic's id for the user). Send this or `managedUserExternalId`, not both.
41
- # @option opts [String] :managed_user_external_id List only the files uploaded for the managed user you registered with this `externalId` (your own identifier for the user). Send this or `managedUserId`, not both.
42
- # @return [UploadsGet200Response]
43
- describe 'uploads_get_0 test' do
44
- it 'should work' do
45
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
46
- end
47
- end
48
-
49
- # unit tests for uploads_id_delete_0
35
+ # unit tests for delete_upload
50
36
  # Delete an upload
51
37
  # Removes the stored file and the upload row. A file in Widgetic'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.
52
38
  # @param id
53
39
  # @param [Hash] opts the optional parameters
54
- # @return [UploadsIdDelete200Response]
55
- describe 'uploads_id_delete_0 test' do
40
+ # @return [DeleteUpload200Response]
41
+ describe 'delete_upload test' do
56
42
  it 'should work' do
57
43
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
58
44
  end
59
45
  end
60
46
 
61
- # unit tests for uploads_id_get_0
47
+ # unit tests for get_upload
62
48
  # Get an upload by id
63
49
  # The details of one of the account's uploads. An upload that belongs to another account is not found.
64
50
  # @param id The upload to read
65
51
  # @param [Hash] opts the optional parameters
66
52
  # @return [UploadResponse]
67
- describe 'uploads_id_get_0 test' do
53
+ describe 'get_upload test' do
68
54
  it 'should work' do
69
55
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
70
56
  end
71
57
  end
72
58
 
73
- # unit tests for uploads_limits_get_0
59
+ # unit tests for get_upload_limits
74
60
  # Upload size limits and accepted file types
75
61
  # 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: `multipart_max_bytes` for a file sent in one request (10 MB) and `tus_max_bytes` for a resumable upload (250 MB).
76
62
  # @param [Hash] opts the optional parameters
77
63
  # @return [UploadLimitsResponse]
78
- describe 'uploads_limits_get_0 test' do
64
+ describe 'get_upload_limits test' do
65
+ it 'should work' do
66
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
67
+ end
68
+ end
69
+
70
+ # unit tests for list_uploads
71
+ # List the account's uploads
72
+ # The files the account has uploaded, newest first. Deleted files are not listed. Returns at most `limit` files and has no further pages: a client that needs more narrows the list instead, for example to one managed user's files with `managedUserId` or `managedUserExternalId`. The files that visitors sent through a widget's upload adapter (`source` is `widget-visitor-upload`) are not part of this list, so that a popular widget does not push the account's own files out of it; naming one widget with `widgetId` lists what visitors sent to that widget as well.
73
+ # @param [Hash] opts the optional parameters
74
+ # @option opts [Integer] :limit Maximum number of files to return
75
+ # @option opts [String] :managed_user_id List only the files uploaded for this managed user (Widgetic's id for the user). Send this or `managedUserExternalId`, not both.
76
+ # @option opts [String] :managed_user_external_id List only the files uploaded for the managed user you registered with this `externalId` (your own identifier for the user). Send this or `managedUserId`, not both.
77
+ # @return [ListUploads200Response]
78
+ describe 'list_uploads test' do
79
79
  it 'should work' do
80
80
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
81
81
  end
82
82
  end
83
83
 
84
- # unit tests for uploads_post_0
84
+ # unit tests for upload_file
85
85
  # Upload a file
86
- # Stores one file for the account and returns its public address. This is how a user's own images, video and PDFs reach a widget's content. Send a `multipart/form-data` request with the file in the field named `file`. The file counts against the storage of the workspace it is uploaded in, and a full workspace is refused with 413 and `QUOTA_STORAGE_EXCEEDED`. For a person signed in on widgetic.com that is the workspace they are currently working in: inside a team, the team's shared storage; inside their own workspace, their own allowance. An organization API key, and a Shopify store's session, always work in that team's shared storage. A personal API key or an SDK token always uses the account'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 `UPLOAD_TOO_LARGE`, and a type that is not accepted with 415 and `UPLOAD_UNSUPPORTED_TYPE`; `uploadsLimitsGet` 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 `image/png`) is refused with 415 and `UPLOAD_UNSUPPORTED_TYPE`, and a picture sent under the wrong picture type is stored under the type it really is, which `mime_type` in the answer says. An SVG is rewritten as it is stored: script, `foreignObject`, 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's team'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 `error.details.planPageUrl` is the address of the plan page on Shopify. `error.suggestedAction` says the same in a few words, instead of the usual \"upgrade your storage plan\". Any other team, and a person's own workspace, get the shorter message. To upload the file for one of your managed users, send `managedUserId` (Widgetic's id for the user) or `managedUserExternalId` (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's files with `uploadsGet`. The managed user must be yours and active: one that is not yours, or does not exist, is refused with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`, before the file is stored. The tag is set here and does not change afterwards. Called with an editor session (`createManagedUserEditorSession`), the file is always filed for the session's own managed user and is always media for widget content: naming another managed user is refused with 403 and `MANAGED_USER_SESSION_MISMATCH`, and `contextType`, `source`, `widgetId` and `conversationId` are ignored. A full storage allowance is refused with the same 413 and `QUOTA_STORAGE_EXCEEDED`, but the message only says that it is not available right now (not how much is stored: that is the partner's business) and `error.details.limit` is `storage`. An account that administers a partner with a storage destination (`setPartnerStorageDestination`) has its files stored in the partner's own bucket instead. Such a file takes none of the allowance, its `url` is served from the partner's public address, and its `storage_key` is the key in the partner's bucket. The file is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 and `STORAGE_DESTINATION_UNAVAILABLE`, and when the partner's storage rejects the file with 502 and `STORAGE_DESTINATION_WRITE_FAILED`. Partner storage is not optional, and it does not depend on how the file arrives. A partner'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' editor sessions are kept in the partner'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 `PARTNER_STORAGE_REQUIRED`; they are never stored with Widgetic. An editor session's browser is only told that the feature is not available right now.
86
+ # Stores one file for the account and returns its public address. This is how a user's own images, video and PDFs reach a widget's content. Send a `multipart/form-data` request with the file in the field named `file`. The file counts against the storage of the workspace it is uploaded in, and a full workspace is refused with 413 and `QUOTA_STORAGE_EXCEEDED`. For a person signed in on widgetic.com that is the workspace they are currently working in: inside a team, the team's shared storage; inside their own workspace, their own allowance. An organization API key, and a Shopify store's session, always work in that team's shared storage. A personal API key or an SDK token always uses the account'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 `UPLOAD_TOO_LARGE`, and a type that is not accepted with 415 and `UPLOAD_UNSUPPORTED_TYPE`; `getUploadLimits` 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 `image/png`) is refused with 415 and `UPLOAD_UNSUPPORTED_TYPE`, and a picture sent under the wrong picture type is stored under the type it really is, which `mime_type` in the answer says. An SVG is rewritten as it is stored: script, `foreignObject`, 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's team'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 `error.details.planPageUrl` is the address of the plan page on Shopify. `error.suggestedAction` says the same in a few words, instead of the usual \"upgrade your storage plan\". Any other team, and a person's own workspace, get the shorter message. To upload the file for one of your managed users, send `managedUserId` (Widgetic's id for the user) or `managedUserExternalId` (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's files with `listUploads`. The managed user must be yours and active: one that is not yours, or does not exist, is refused with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`, before the file is stored. The tag is set here and does not change afterwards. Called with an editor session (`createManagedUserEditorSession`), the file is always filed for the session's own managed user and is always media for widget content: naming another managed user is refused with 403 and `MANAGED_USER_SESSION_MISMATCH`, and `contextType`, `source`, `widgetId` and `conversationId` are ignored. A full storage allowance is refused with the same 413 and `QUOTA_STORAGE_EXCEEDED`, but the message only says that it is not available right now (not how much is stored: that is the partner's business) and `error.details.limit` is `storage`. An account that administers a partner with a storage destination (`setPartnerStorageDestination`) has its files stored in the partner's own bucket instead. Such a file takes none of the allowance, its `url` is served from the partner's public address, and its `storage_key` is the key in the partner's bucket. The file is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 and `STORAGE_DESTINATION_UNAVAILABLE`, and when the partner's storage rejects the file with 502 and `STORAGE_DESTINATION_WRITE_FAILED`. Partner storage is not optional, and it does not depend on how the file arrives. A partner'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' editor sessions are kept in the partner'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 `PARTNER_STORAGE_REQUIRED`; they are never stored with Widgetic. An editor session's browser is only told that the feature is not available right now.
87
87
  # @param file The file to store
88
88
  # @param [Hash] opts the optional parameters
89
89
  # @option opts [String] :context_type What the file is for. Send `content-property` for media that becomes widget content (images, video and PDF); the other values are used by Widgetic's own editor.
@@ -92,7 +92,7 @@ describe 'UploadsApi' do
92
92
  # @option opts [String] :managed_user_external_id The same, by your own identifier for the user, the `externalId` you gave when you created the managed user. Send this or `managedUserId`, not both.
93
93
  # @option opts [String] :purpose Where in your product you use the file. It is kept with the file, so that a customer's storage can be counted by purpose (`getManagedUserStorageUsage`). Optional; any other value is refused with 400 and `UPLOAD_INVALID_PURPOSE`.
94
94
  # @return [UploadResponse]
95
- describe 'uploads_post_0 test' do
95
+ describe 'upload_file test' do
96
96
  it 'should work' do
97
97
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
98
98
  end
@@ -32,20 +32,20 @@ describe 'UsersApi' do
32
32
  end
33
33
  end
34
34
 
35
- # unit tests for add_personal_workspace_domain_0
35
+ # unit tests for add_personal_workspace_domain
36
36
  # Allow a website to show your widgets
37
37
  # 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.
38
38
  # @param id The account the list belongs to. For your own, your own user id
39
39
  # @param add_domain_request
40
40
  # @param [Hash] opts the optional parameters
41
41
  # @return [PersonalWorkspaceDomainResultResponse]
42
- describe 'add_personal_workspace_domain_0 test' do
42
+ describe 'add_personal_workspace_domain test' do
43
43
  it 'should work' do
44
44
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
45
  end
46
46
  end
47
47
 
48
- # unit tests for confirm_user_adapter_connection_0
48
+ # unit tests for confirm_user_adapter_connection
49
49
  # Confirm an adapter address with the code that was emailed to it
50
50
  # 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.
51
51
  # @param user_id The account that keeps the address. For your own, your own user id
@@ -53,14 +53,14 @@ describe 'UsersApi' do
53
53
  # @param credential_key The credential's name within the adapter
54
54
  # @param confirm_adapter_connection_request
55
55
  # @param [Hash] opts the optional parameters
56
- # @return [SetUserAdapterConnection200Response]
57
- describe 'confirm_user_adapter_connection_0 test' do
56
+ # @return [AdapterConnectionResponse]
57
+ describe 'confirm_user_adapter_connection test' do
58
58
  it 'should work' do
59
59
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
60
60
  end
61
61
  end
62
62
 
63
- # unit tests for create_user_api_key_0
63
+ # unit tests for create_user_api_key
64
64
  # Create an API key
65
65
  # 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).
66
66
  # @param id The account the key is for. For your own, your own user id
@@ -68,63 +68,63 @@ describe 'UsersApi' do
68
68
  # @param create_user_api_key_request
69
69
  # @param [Hash] opts the optional parameters
70
70
  # @return [CreatedUserApiKeyResponse]
71
- describe 'create_user_api_key_0 test' do
71
+ describe 'create_user_api_key test' do
72
72
  it 'should work' do
73
73
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
74
74
  end
75
75
  end
76
76
 
77
- # unit tests for delete_personal_workspace_domain_0
77
+ # unit tests for delete_personal_workspace_domain
78
78
  # Stop allowing a website to show your widgets
79
79
  # Removes one entry from an account'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.
80
80
  # @param id The account the list belongs to. For your own, your own user id
81
81
  # @param domain_id The `id` of the entry, as the list shows it
82
82
  # @param [Hash] opts the optional parameters
83
83
  # @return [DeletePersonalWorkspaceDomainResponse]
84
- describe 'delete_personal_workspace_domain_0 test' do
84
+ describe 'delete_personal_workspace_domain test' do
85
85
  it 'should work' do
86
86
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
87
87
  end
88
88
  end
89
89
 
90
- # unit tests for delete_user_api_key_0
90
+ # unit tests for delete_user_api_key
91
91
  # Delete an API key
92
92
  # 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 `updateUserApiKey`.
93
93
  # @param id The account the key belongs to
94
94
  # @param key_id The `keyId` of the key, as the list shows it
95
95
  # @param [Hash] opts the optional parameters
96
96
  # @return [DeleteUserApiKeyResponse]
97
- describe 'delete_user_api_key_0 test' do
97
+ describe 'delete_user_api_key test' do
98
98
  it 'should work' do
99
99
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
100
100
  end
101
101
  end
102
102
 
103
- # unit tests for get_personal_workspace_domains_0
103
+ # unit tests for get_personal_workspace_domains
104
104
  # List the websites allowed to show your widgets
105
105
  # Lists the websites on an account'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'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's list instead. The answer holds the whole list, however long it is: a partner's list has no limit.
106
106
  # @param id The account the list belongs to. For your own, your own user id
107
107
  # @param [Hash] opts the optional parameters
108
108
  # @return [GetPersonalWorkspaceDomains200Response]
109
- describe 'get_personal_workspace_domains_0 test' do
109
+ describe 'get_personal_workspace_domains test' do
110
110
  it 'should work' do
111
111
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
112
112
  end
113
113
  end
114
114
 
115
- # unit tests for get_user_adapter_connections_0
115
+ # unit tests for get_user_adapter_connections
116
116
  # See which adapter keys an account has connected
117
117
  # 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's email provider key, one that sends texts needs the owner'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 `setUserAdapterConnection`; take it away with `removeUserAdapterConnection`. The widgets of customers a partner manages use the partner's keys instead (`getPartnerAdapterConnections`). The caller must be the account itself (an API key of that account works, with the `account:read` scope), or a Widgetic administrator.
118
118
  # @param user_id The account whose adapter keys to list. For your own, your own user id
119
119
  # @param [Hash] opts the optional parameters
120
- # @return [GetUserAdapterConnections200Response]
121
- describe 'get_user_adapter_connections_0 test' do
120
+ # @return [AdapterConnectionListResponse]
121
+ describe 'get_user_adapter_connections test' do
122
122
  it 'should work' do
123
123
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
124
124
  end
125
125
  end
126
126
 
127
- # unit tests for get_user_api_key_usage_logs_0
127
+ # unit tests for get_user_api_key_usage_logs
128
128
  # Read what an API key was used for
129
129
  # 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.
130
130
  # @param id The account the key belongs to
@@ -132,39 +132,39 @@ describe 'UsersApi' do
132
132
  # @param [Hash] opts the optional parameters
133
133
  # @option opts [Integer] :limit How many calls to return, newest first
134
134
  # @return [GetUserApiKeyUsageLogsResponse]
135
- describe 'get_user_api_key_usage_logs_0 test' do
135
+ describe 'get_user_api_key_usage_logs test' do
136
136
  it 'should work' do
137
137
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
138
138
  end
139
139
  end
140
140
 
141
- # unit tests for get_user_api_keys_0
141
+ # unit tests for get_user_api_keys
142
142
  # List the API keys of an account
143
143
  # 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 (`scopes` and `preset`). The secret of a key is never part of the list. A caller can list its own account's keys; Widgetic staff can list any account's.
144
144
  # @param id The account the keys belong to. For your own keys, your own user id
145
145
  # @param [Hash] opts the optional parameters
146
146
  # @return [GetUserApiKeys200Response]
147
- describe 'get_user_api_keys_0 test' do
147
+ describe 'get_user_api_keys test' do
148
148
  it 'should work' do
149
149
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
150
150
  end
151
151
  end
152
152
 
153
- # unit tests for remove_user_adapter_connection_0
153
+ # unit tests for remove_user_adapter_connection
154
154
  # Remove an adapter key from an account
155
155
  # 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 `removed: false`: 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.
156
156
  # @param user_id The account that keeps the key. For your own, your own user id
157
157
  # @param adapter_id The adapter the key is for
158
158
  # @param credential_key The key's name within the adapter
159
159
  # @param [Hash] opts the optional parameters
160
- # @return [RemoveUserAdapterConnection200Response]
161
- describe 'remove_user_adapter_connection_0 test' do
160
+ # @return [AdapterConnectionRemovalResponse]
161
+ describe 'remove_user_adapter_connection test' do
162
162
  it 'should work' do
163
163
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
164
164
  end
165
165
  end
166
166
 
167
- # unit tests for set_user_adapter_connection_0
167
+ # unit tests for set_user_adapter_connection
168
168
  # Connect an adapter key to an account
169
169
  # Gives an adapter the key it needs to act through a service you have an account with, for the widgets you made. Take the `adapterId` and `credentialKey` from `getUserAdapterConnections`. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this account, this adapter and this credential, so that a stored value cannot be moved to another. It is never returned, never logged and never shown to a visitor of a widget. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on your behalf, and discards it. To cut that off, remove the key here, or revoke it with the provider. **What is checked.** That the adapter exists and takes this credential, that an owner may keep it (some are for a partner only) and that the text is one line of at most 2048 characters. Whether the provider accepts the key is not checked here: it shows the first time a widget uses it, and the widget tells its owner. **An address that has to be confirmed.** Some credentials are not a key but the email address Widgetic sends a widget's messages to (`confirmation: email_code` in `getUserAdapterConnections`). Saving one checks that it is one email address and emails a six-digit code to it; the answer says `awaitingConfirmation: true`, and nothing is sent to the address until the code is given back with `confirmUserAdapterConnection`. Saving the same address again before it is confirmed emails a new code (not sooner than a minute after the last); saving the address that is already confirmed changes nothing. If the code cannot be emailed, nothing is saved. A widget whose adapter has no key connected, or whose address is not confirmed yet, is not charged and does not run that adapter: its visitors are told the feature is unavailable, and the owner is told once a day what to do. This needs an API key with full access. The caller must be the account itself or a Widgetic administrator. A retry is harmless: saving the same key twice only refreshes when it was set.
170
170
  # @param user_id The account that keeps the key. For your own, your own user id
@@ -172,14 +172,14 @@ describe 'UsersApi' do
172
172
  # @param credential_key The key's name within the adapter
173
173
  # @param set_adapter_connection_request
174
174
  # @param [Hash] opts the optional parameters
175
- # @return [SetUserAdapterConnection200Response]
176
- describe 'set_user_adapter_connection_0 test' do
175
+ # @return [AdapterConnectionResponse]
176
+ describe 'set_user_adapter_connection test' do
177
177
  it 'should work' do
178
178
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
179
179
  end
180
180
  end
181
181
 
182
- # unit tests for update_personal_workspace_domain_0
182
+ # unit tests for update_personal_workspace_domain
183
183
  # Change a website on your list
184
184
  # Replaces the website of one entry on an account's own list. The same rules apply as when adding one (`addPersonalWorkspaceDomain`): a website name such as `example.com` or `*.example.com`, kept in its cleaned form, and refused when it is not a website name or is already on the list.
185
185
  # @param id The account the list belongs to. For your own, your own user id
@@ -187,13 +187,13 @@ describe 'UsersApi' do
187
187
  # @param update_domain_request
188
188
  # @param [Hash] opts the optional parameters
189
189
  # @return [PersonalWorkspaceDomainResultResponse]
190
- describe 'update_personal_workspace_domain_0 test' do
190
+ describe 'update_personal_workspace_domain test' do
191
191
  it 'should work' do
192
192
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
193
193
  end
194
194
  end
195
195
 
196
- # unit tests for update_user_api_key_0
196
+ # unit tests for update_user_api_key
197
197
  # Rename an API key, or switch it off or on
198
198
  # Renames a key, or switches it off (`isActive: false`) 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 `API_KEY_SCOPE_MISSING`. 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.
199
199
  # @param id The account the key belongs to
@@ -201,7 +201,7 @@ describe 'UsersApi' do
201
201
  # @param update_user_api_key_request
202
202
  # @param [Hash] opts the optional parameters
203
203
  # @return [UserApiKeyResponse]
204
- describe 'update_user_api_key_0 test' do
204
+ describe 'update_user_api_key test' do
205
205
  it 'should work' do
206
206
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
207
207
  end