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.
- checksums.yaml +4 -4
- data/README.md +207 -381
- data/docs/{GetPartnerCreditTransactions200Response.md → AccountCreditTransactionListResponse.md} +2 -2
- data/docs/{GetUserAdapterConnections200Response.md → AdapterConnectionListResponse.md} +2 -2
- data/docs/{RemoveUserAdapterConnection200Response.md → AdapterConnectionRemovalResponse.md} +2 -2
- data/docs/{SetUserAdapterConnection200Response.md → AdapterConnectionResponse.md} +2 -2
- data/docs/{AddAiAnswersKnowledgeDocument201Response.md → AiAnswersKnowledgeDocumentResponse.md} +2 -2
- data/docs/BrandKitApi.md +74 -74
- data/docs/BrandKitTokens.md +2 -0
- data/docs/BrandKitView.md +1 -1
- data/docs/BrandTextStyle.md +22 -0
- data/docs/CanvasesApi.md +45 -45
- data/docs/{CreateCompositionDatabaseRecord201Response.md → CompositionDatabaseRecordResponse.md} +2 -2
- data/docs/CompositionsApi.md +615 -349
- data/docs/{CreateCompositionContentItem201Response.md → ContentItemWriteResultResponse.md} +2 -2
- data/docs/CreditsApi.md +20 -20
- data/docs/{CreateCompositionFromWidget201Response.md → DeleteUpload200Response.md} +3 -3
- data/docs/{UploadsIdDelete200ResponseData.md → DeleteUpload200ResponseData.md} +2 -2
- data/docs/{GetPartnerDesignDefaults200Response.md → DesignDefaultsResponse.md} +2 -2
- data/docs/EntitlementsApi.md +18 -18
- data/docs/{OperationsIdGetResponse.md → GetOperationResponse.md} +3 -3
- data/docs/{OperationsIdGetResponseData.md → GetOperationResponseData.md} +3 -3
- data/docs/GetOperationResponseDataMetadata.md +24 -0
- data/docs/InvoicesApi.md +9 -9
- data/docs/{UploadsGet200Response.md → ListUploads200Response.md} +2 -2
- data/docs/{GetManagedUserLimits200Response.md → ManagedUserLimitsResponse.md} +2 -2
- data/docs/{DeleteManagedUser200Response.md → ManagedUserRemovalResponse.md} +2 -2
- data/docs/ManagedUsersApi.md +261 -171
- data/docs/OperationsApi.md +11 -11
- data/docs/PartnersApi.md +388 -388
- data/docs/PatchBrandKitRequest.md +2 -0
- data/docs/PublicEmbedApi.md +95 -95
- data/docs/PublicWorkflowEventsRequestEventsInner.md +3 -1
- data/docs/{GetPublicWorkflow200Response.md → PublicWorkflowResponse.md} +2 -2
- data/docs/TokensApi.md +11 -9
- data/docs/Upload.md +1 -1
- data/docs/UploadLimits.md +3 -3
- data/docs/UploadsApi.md +85 -85
- data/docs/UsersApi.md +125 -125
- data/docs/WidgetClarification.md +22 -0
- data/docs/WidgetClarificationOption.md +22 -0
- data/docs/WidgetClarificationQuestion.md +26 -0
- data/docs/WidgetNextStep.md +24 -0
- data/docs/WidgetPlan.md +26 -0
- data/docs/WidgetPlanDecisions.md +32 -0
- data/docs/WidgetPlanDecisionsAdaptersInner.md +20 -0
- data/docs/WidgetPlanDecisionsLibrariesInner.md +22 -0
- data/docs/WidgetPlanDecisionsResponsive.md +22 -0
- data/docs/WidgetPlanTask.md +24 -0
- data/docs/WidgetsApi.md +38 -38
- data/docs/{CreateWorkspaceWorkflowFromPreset201Response.md → WorkflowDetailResponse.md} +2 -2
- data/docs/WorkflowFailureReason.md +15 -0
- data/docs/WorkflowFailureReasonCounter.md +22 -0
- data/docs/{SaveWorkspaceWorkflow200Response.md → WorkflowResponse.md} +2 -2
- data/docs/WorkflowStats.md +4 -2
- data/docs/WorkflowsApi.md +197 -413
- data/lib/api-sdk-rb/api/brand_kit_api.rb +61 -61
- data/lib/api-sdk-rb/api/canvases_api.rb +39 -39
- data/lib/api-sdk-rb/api/compositions_api.rb +770 -441
- data/lib/api-sdk-rb/api/credits_api.rb +20 -20
- data/lib/api-sdk-rb/api/entitlements_api.rb +14 -14
- data/lib/api-sdk-rb/api/invoices_api.rb +10 -10
- data/lib/api-sdk-rb/api/managed_users_api.rb +278 -172
- data/lib/api-sdk-rb/api/operations_api.rb +10 -10
- data/lib/api-sdk-rb/api/partners_api.rb +389 -389
- data/lib/api-sdk-rb/api/public_embed_api.rb +95 -95
- data/lib/api-sdk-rb/api/tokens_api.rb +8 -6
- data/lib/api-sdk-rb/api/uploads_api.rb +96 -96
- data/lib/api-sdk-rb/api/users_api.rb +132 -132
- data/lib/api-sdk-rb/api/widgets_api.rb +40 -40
- data/lib/api-sdk-rb/api/workflows_api.rb +246 -468
- data/lib/api-sdk-rb/configuration.rb +0 -60
- data/lib/api-sdk-rb/models/{get_user_adapter_connections200_response.rb → account_credit_transaction_list_response.rb} +4 -4
- data/lib/api-sdk-rb/models/{get_partner_credit_transactions200_response.rb → adapter_connection_list_response.rb} +4 -4
- data/lib/api-sdk-rb/models/{save_workspace_workflow200_response.rb → adapter_connection_removal_response.rb} +4 -4
- data/lib/api-sdk-rb/models/{set_user_adapter_connection200_response.rb → adapter_connection_response.rb} +3 -3
- data/lib/api-sdk-rb/models/{add_ai_answers_knowledge_document201_response.rb → ai_answers_knowledge_document_response.rb} +3 -3
- data/lib/api-sdk-rb/models/brand_kit_tokens.rb +33 -2
- data/lib/api-sdk-rb/models/brand_kit_view.rb +1 -1
- data/lib/api-sdk-rb/models/brand_text_style.rb +344 -0
- data/lib/api-sdk-rb/models/{create_composition_database_record201_response.rb → composition_database_record_response.rb} +3 -3
- data/lib/api-sdk-rb/models/{create_composition_content_item201_response.rb → content_item_write_result_response.rb} +3 -3
- data/lib/api-sdk-rb/models/{operations_id_get_response.rb → delete_upload200_response.rb} +4 -5
- data/lib/api-sdk-rb/models/{uploads_id_delete200_response_data.rb → delete_upload200_response_data.rb} +3 -3
- data/lib/api-sdk-rb/models/{get_partner_design_defaults200_response.rb → design_defaults_response.rb} +3 -3
- data/lib/api-sdk-rb/models/get_operation_response.rb +247 -0
- data/lib/api-sdk-rb/models/{operations_id_get_response_data.rb → get_operation_response_data.rb} +5 -8
- data/lib/api-sdk-rb/models/get_operation_response_data_metadata.rb +283 -0
- data/lib/api-sdk-rb/models/{uploads_get200_response.rb → list_uploads200_response.rb} +3 -3
- data/lib/api-sdk-rb/models/{get_managed_user_limits200_response.rb → managed_user_limits_response.rb} +3 -3
- data/lib/api-sdk-rb/models/{uploads_id_delete200_response.rb → managed_user_removal_response.rb} +4 -4
- data/lib/api-sdk-rb/models/patch_brand_kit_request.rb +32 -1
- data/lib/api-sdk-rb/models/public_workflow_events_request_events_inner.rb +26 -4
- data/lib/api-sdk-rb/models/{get_public_workflow200_response.rb → public_workflow_response.rb} +3 -3
- data/lib/api-sdk-rb/models/upload.rb +1 -1
- data/lib/api-sdk-rb/models/upload_limits.rb +3 -3
- data/lib/api-sdk-rb/models/widget_clarification.rb +279 -0
- data/lib/api-sdk-rb/models/{create_composition_from_widget201_response.rb → widget_clarification_option.rb} +40 -30
- data/lib/api-sdk-rb/models/widget_clarification_question.rb +329 -0
- data/lib/api-sdk-rb/models/widget_next_step.rb +307 -0
- data/lib/api-sdk-rb/models/widget_plan.rb +306 -0
- data/lib/api-sdk-rb/models/widget_plan_decisions.rb +346 -0
- data/lib/api-sdk-rb/models/widget_plan_decisions_adapters_inner.rb +237 -0
- data/lib/api-sdk-rb/models/{create_workspace_workflow_from_preset201_response.rb → widget_plan_decisions_libraries_inner.rb} +39 -30
- data/lib/api-sdk-rb/models/widget_plan_decisions_responsive.rb +311 -0
- data/lib/api-sdk-rb/models/widget_plan_task.rb +320 -0
- data/lib/api-sdk-rb/models/{delete_managed_user200_response.rb → workflow_detail_response.rb} +4 -4
- data/lib/api-sdk-rb/models/workflow_failure_reason.rb +42 -0
- data/lib/api-sdk-rb/models/workflow_failure_reason_counter.rb +277 -0
- data/lib/api-sdk-rb/models/workflow_response.rb +246 -0
- data/lib/api-sdk-rb/models/workflow_stats.rb +17 -5
- data/lib/api-sdk-rb/version.rb +1 -1
- data/lib/api-sdk-rb.rb +32 -21
- data/spec/api/brand_kit_api_spec.rb +18 -18
- data/spec/api/canvases_api_spec.rb +10 -10
- data/spec/api/compositions_api_spec.rb +144 -83
- data/spec/api/credits_api_spec.rb +5 -5
- data/spec/api/entitlements_api_spec.rb +4 -4
- data/spec/api/invoices_api_spec.rb +2 -2
- data/spec/api/managed_users_api_spec.rb +63 -42
- data/spec/api/operations_api_spec.rb +3 -3
- data/spec/api/partners_api_spec.rb +91 -91
- data/spec/api/public_embed_api_spec.rb +23 -23
- data/spec/api/tokens_api_spec.rb +3 -2
- data/spec/api/uploads_api_spec.rb +24 -24
- data/spec/api/users_api_spec.rb +30 -30
- data/spec/api/widgets_api_spec.rb +9 -9
- data/spec/api/workflows_api_spec.rb +50 -89
- data/spec/models/{get_user_adapter_connections200_response_spec.rb → account_credit_transaction_list_response_spec.rb} +6 -6
- data/spec/models/{get_public_workflow200_response_spec.rb → adapter_connection_list_response_spec.rb} +6 -6
- data/spec/models/{save_workspace_workflow200_response_spec.rb → adapter_connection_removal_response_spec.rb} +6 -6
- data/spec/models/{delete_managed_user200_response_spec.rb → adapter_connection_response_spec.rb} +6 -6
- data/spec/models/ai_answers_knowledge_document_response_spec.rb +48 -0
- data/spec/models/brand_kit_tokens_spec.rb +6 -0
- data/spec/models/{create_composition_from_widget201_response_spec.rb → brand_text_style_spec.rb} +13 -9
- data/spec/models/{get_managed_user_limits200_response_spec.rb → composition_database_record_response_spec.rb} +6 -6
- data/spec/models/content_item_write_result_response_spec.rb +48 -0
- data/spec/models/{uploads_id_delete200_response_data_spec.rb → delete_upload200_response_data_spec.rb} +6 -6
- data/spec/models/{operations_id_get_response_spec.rb → delete_upload200_response_spec.rb} +6 -6
- data/spec/models/design_defaults_response_spec.rb +48 -0
- data/spec/models/get_operation_response_data_metadata_spec.rb +58 -0
- data/spec/models/{operations_id_get_response_data_spec.rb → get_operation_response_data_spec.rb} +6 -6
- data/spec/models/{uploads_get200_response_spec.rb → get_operation_response_spec.rb} +6 -6
- data/spec/models/list_uploads200_response_spec.rb +48 -0
- data/spec/models/managed_user_limits_response_spec.rb +48 -0
- data/spec/models/{uploads_id_delete200_response_spec.rb → managed_user_removal_response_spec.rb} +6 -6
- data/spec/models/patch_brand_kit_request_spec.rb +6 -0
- data/spec/models/public_workflow_events_request_events_inner_spec.rb +10 -0
- data/spec/models/public_workflow_response_spec.rb +48 -0
- data/spec/models/widget_clarification_option_spec.rb +48 -0
- data/spec/models/widget_clarification_question_spec.rb +60 -0
- data/spec/models/widget_clarification_spec.rb +48 -0
- data/spec/models/widget_next_step_spec.rb +58 -0
- data/spec/models/widget_plan_decisions_adapters_inner_spec.rb +42 -0
- data/spec/models/widget_plan_decisions_libraries_inner_spec.rb +48 -0
- data/spec/models/widget_plan_decisions_responsive_spec.rb +48 -0
- data/spec/models/widget_plan_decisions_spec.rb +78 -0
- data/spec/models/{create_composition_database_record201_response_spec.rb → widget_plan_spec.rb} +21 -9
- data/spec/models/widget_plan_task_spec.rb +62 -0
- data/spec/models/workflow_detail_response_spec.rb +48 -0
- data/spec/models/workflow_failure_reason_counter_spec.rb +48 -0
- data/spec/models/workflow_failure_reason_spec.rb +30 -0
- data/spec/models/workflow_response_spec.rb +48 -0
- data/spec/models/workflow_stats_spec.rb +6 -0
- metadata +130 -86
- data/docs/PartnerApi.md +0 -12714
- data/docs/UploadsIdDelete200Response.md +0 -22
- data/docs/WorkspacesApi.md +0 -1527
- data/lib/api-sdk-rb/api/partner_api.rb +0 -13791
- data/lib/api-sdk-rb/api/workspaces_api.rb +0 -1775
- data/lib/api-sdk-rb/models/remove_user_adapter_connection200_response.rb +0 -246
- data/spec/api/partner_api_spec.rb +0 -2437
- data/spec/api/workspaces_api_spec.rb +0 -339
- data/spec/models/add_ai_answers_knowledge_document201_response_spec.rb +0 -48
- data/spec/models/create_composition_content_item201_response_spec.rb +0 -48
- data/spec/models/create_workspace_workflow_from_preset201_response_spec.rb +0 -48
- data/spec/models/get_partner_credit_transactions200_response_spec.rb +0 -48
- data/spec/models/get_partner_design_defaults200_response_spec.rb +0 -48
- data/spec/models/remove_user_adapter_connection200_response_spec.rb +0 -48
- data/spec/models/set_user_adapter_connection200_response_spec.rb +0 -48
|
@@ -32,7 +32,7 @@ describe 'CompositionsApi' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
# unit tests for
|
|
35
|
+
# unit tests for add_ai_answers_knowledge_document
|
|
36
36
|
# Add a document for a widget's AI to answer from
|
|
37
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
38
|
# @param id The widget (composition) to add the document to
|
|
@@ -40,14 +40,14 @@ describe 'CompositionsApi' do
|
|
|
40
40
|
# @param [Hash] opts the optional parameters
|
|
41
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
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 [
|
|
44
|
-
describe '
|
|
43
|
+
# @return [AiAnswersKnowledgeDocumentResponse]
|
|
44
|
+
describe 'add_ai_answers_knowledge_document 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
|
|
50
|
+
# unit tests for add_ai_answers_knowledge_file
|
|
51
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
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
53
|
# @param id The widget (composition) to add the document to
|
|
@@ -56,26 +56,26 @@ describe 'CompositionsApi' do
|
|
|
56
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
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
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 [
|
|
60
|
-
describe '
|
|
59
|
+
# @return [AiAnswersKnowledgeDocumentResponse]
|
|
60
|
+
describe 'add_ai_answers_knowledge_file 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
|
|
66
|
+
# unit tests for check_composition_access
|
|
67
67
|
# Check Composition Access
|
|
68
68
|
# Checks if the authenticated user can access a specific composition based on workspace context and permissions.
|
|
69
69
|
# @param id Composition ID
|
|
70
70
|
# @param [Hash] opts the optional parameters
|
|
71
71
|
# @return [CheckCompositionAccessResponse]
|
|
72
|
-
describe '
|
|
72
|
+
describe 'check_composition_access 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
|
|
78
|
+
# unit tests for create_composition
|
|
79
79
|
# Create Composition
|
|
80
80
|
# 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.
|
|
81
81
|
# @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`).
|
|
@@ -83,14 +83,14 @@ describe 'CompositionsApi' do
|
|
|
83
83
|
# @param [Hash] opts the optional parameters
|
|
84
84
|
# @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.
|
|
85
85
|
# @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.
|
|
86
|
-
# @return [
|
|
87
|
-
describe '
|
|
86
|
+
# @return [CompositionResponse]
|
|
87
|
+
describe 'create_composition test' do
|
|
88
88
|
it 'should work' do
|
|
89
89
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
90
90
|
end
|
|
91
91
|
end
|
|
92
92
|
|
|
93
|
-
# unit tests for
|
|
93
|
+
# unit tests for create_composition_content_item
|
|
94
94
|
# Add a content list item
|
|
95
95
|
# 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.
|
|
96
96
|
# @param id
|
|
@@ -101,14 +101,14 @@ describe 'CompositionsApi' do
|
|
|
101
101
|
# @option opts [String] :if_match Optional content version from ETag
|
|
102
102
|
# @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.
|
|
103
103
|
# @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.
|
|
104
|
-
# @return [
|
|
105
|
-
describe '
|
|
104
|
+
# @return [ContentItemWriteResultResponse]
|
|
105
|
+
describe 'create_composition_content_item test' do
|
|
106
106
|
it 'should work' do
|
|
107
107
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
108
108
|
end
|
|
109
109
|
end
|
|
110
110
|
|
|
111
|
-
# unit tests for
|
|
111
|
+
# unit tests for create_composition_database_record
|
|
112
112
|
# Create Record In Composition Database
|
|
113
113
|
# 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`.
|
|
114
114
|
# @param id ID of the composition
|
|
@@ -118,14 +118,14 @@ describe 'CompositionsApi' do
|
|
|
118
118
|
# @param [Hash] opts the optional parameters
|
|
119
119
|
# @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.
|
|
120
120
|
# @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.
|
|
121
|
-
# @return [
|
|
122
|
-
describe '
|
|
121
|
+
# @return [CompositionDatabaseRecordResponse]
|
|
122
|
+
describe 'create_composition_database_record test' do
|
|
123
123
|
it 'should work' do
|
|
124
124
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
125
125
|
end
|
|
126
126
|
end
|
|
127
127
|
|
|
128
|
-
# unit tests for
|
|
128
|
+
# unit tests for delete_composition
|
|
129
129
|
# Delete Composition
|
|
130
130
|
# Deletes a specific composition, and the data it keeps (the tables it declared and what visitors left in them).
|
|
131
131
|
# @param id The ID of the composition to delete
|
|
@@ -133,13 +133,13 @@ describe 'CompositionsApi' do
|
|
|
133
133
|
# @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.
|
|
134
134
|
# @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.
|
|
135
135
|
# @return [nil]
|
|
136
|
-
describe '
|
|
136
|
+
describe 'delete_composition test' do
|
|
137
137
|
it 'should work' do
|
|
138
138
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
139
139
|
end
|
|
140
140
|
end
|
|
141
141
|
|
|
142
|
-
# unit tests for
|
|
142
|
+
# unit tests for delete_composition_content_item
|
|
143
143
|
# Delete a content list item
|
|
144
144
|
# @param id
|
|
145
145
|
# @param list
|
|
@@ -150,13 +150,13 @@ describe 'CompositionsApi' do
|
|
|
150
150
|
# @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.
|
|
151
151
|
# @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.
|
|
152
152
|
# @return [DeleteCompositionContentItemResponse]
|
|
153
|
-
describe '
|
|
153
|
+
describe 'delete_composition_content_item test' do
|
|
154
154
|
it 'should work' do
|
|
155
155
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
156
156
|
end
|
|
157
157
|
end
|
|
158
158
|
|
|
159
|
-
# unit tests for
|
|
159
|
+
# unit tests for delete_composition_data_source
|
|
160
160
|
# Remove the composition data source binding
|
|
161
161
|
# 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.
|
|
162
162
|
# @param id
|
|
@@ -165,13 +165,13 @@ describe 'CompositionsApi' do
|
|
|
165
165
|
# @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.
|
|
166
166
|
# @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.
|
|
167
167
|
# @return [DeleteCompositionDataSourceResponse]
|
|
168
|
-
describe '
|
|
168
|
+
describe 'delete_composition_data_source test' do
|
|
169
169
|
it 'should work' do
|
|
170
170
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
171
171
|
end
|
|
172
172
|
end
|
|
173
173
|
|
|
174
|
-
# unit tests for
|
|
174
|
+
# unit tests for delete_composition_database_record
|
|
175
175
|
# Delete Record From Composition Database
|
|
176
176
|
# 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`.
|
|
177
177
|
# @param id ID of the composition
|
|
@@ -180,14 +180,32 @@ describe 'CompositionsApi' do
|
|
|
180
180
|
# @param [Hash] opts the optional parameters
|
|
181
181
|
# @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.
|
|
182
182
|
# @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.
|
|
183
|
-
# @return [
|
|
184
|
-
describe '
|
|
183
|
+
# @return [CompositionDatabaseRecordResponse]
|
|
184
|
+
describe 'delete_composition_database_record test' do
|
|
185
|
+
it 'should work' do
|
|
186
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# unit tests for delete_composition_entry_items
|
|
191
|
+
# Delete composition entry items by id or host context
|
|
192
|
+
# Delete by comma-separated ids (1–100) or by context filters (not both). Rate limit 30 requests per minute.
|
|
193
|
+
# @param id
|
|
194
|
+
# @param table
|
|
195
|
+
# @param [Hash] opts the optional parameters
|
|
196
|
+
# @option opts [String] :ids
|
|
197
|
+
# @option opts [Hash<String, String>] :context Host context filters as `context[key]=value` (max 5 keys, counting dotted `context.key` too). Use `column.<name>=value` for columns whose names collide with reserved parameters.
|
|
198
|
+
# @option opts [Hash<String, String>] :filter Column filters as `filter[columnName]=value` (same meaning as bare `columnName=value` or `column.columnName=value`; max 10 column filters counting all spellings). A plain `filter=value` still filters a column named `filter`.
|
|
199
|
+
# @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.
|
|
200
|
+
# @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.
|
|
201
|
+
# @return [CompositionEntryDeleteSuccess]
|
|
202
|
+
describe 'delete_composition_entry_items test' do
|
|
185
203
|
it 'should work' do
|
|
186
204
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
187
205
|
end
|
|
188
206
|
end
|
|
189
207
|
|
|
190
|
-
# unit tests for
|
|
208
|
+
# unit tests for describe_composition_entries
|
|
191
209
|
# Describe What a Composition Keeps
|
|
192
210
|
# Names the tables a composition'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 `readCompositionEntries` takes. A widget that only shows content keeps nothing of its own: the answer is `hasData: false` with no tables, and that is not an error. A table that could not be counted has `rows: null`, 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.
|
|
193
211
|
# @param id ID of the composition
|
|
@@ -195,13 +213,13 @@ describe 'CompositionsApi' do
|
|
|
195
213
|
# @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.
|
|
196
214
|
# @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.
|
|
197
215
|
# @return [CompositionEntriesDescriptionResponse]
|
|
198
|
-
describe '
|
|
216
|
+
describe 'describe_composition_entries test' do
|
|
199
217
|
it 'should work' do
|
|
200
218
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
201
219
|
end
|
|
202
220
|
end
|
|
203
221
|
|
|
204
|
-
# unit tests for
|
|
222
|
+
# unit tests for duplicate_composition
|
|
205
223
|
# Duplicate Composition
|
|
206
224
|
# Creates a duplicate of an existing composition for the authenticated user. The duplicate is made after the answer: the call returns `202` with an `operationId`. Ask `GET /operations/{id}` for that operation until its `status` is `completed`; the new composition is named in `metadata.newCompositionId`. A problem with the duplicate's database (for example, tables that could not be made just now) is listed in `metadata.warnings`, which is absent when there is none. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one duplicate is made, not two.
|
|
207
225
|
# @param id ID of the composition to duplicate
|
|
@@ -211,13 +229,34 @@ describe 'CompositionsApi' do
|
|
|
211
229
|
# @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.
|
|
212
230
|
# @option opts [DuplicateCompositionRequest] :duplicate_composition_request
|
|
213
231
|
# @return [DuplicateComposition202Response]
|
|
214
|
-
describe '
|
|
232
|
+
describe 'duplicate_composition test' do
|
|
233
|
+
it 'should work' do
|
|
234
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# unit tests for export_composition_entry_items
|
|
239
|
+
# Export composition entry items
|
|
240
|
+
# 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 `X-Widgetic-Export-Truncated: true`. Rate limit 20 requests per minute.
|
|
241
|
+
# @param id
|
|
242
|
+
# @param table
|
|
243
|
+
# @param [Hash] opts the optional parameters
|
|
244
|
+
# @option opts [String] :format
|
|
245
|
+
# @option opts [String] :order `desc` (the default) lists the newest entry first, `asc` 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.
|
|
246
|
+
# @option opts [Time] :since Only entries made at this time or later: `since` is INCLUSIVE (an entry made at exactly `since` is returned). A date and time with an offset, such as `2026-10-01T00:00:00Z`; anything else answers 400 `INVALID_SINCE`. An entry with no time never matches, and a table with no time column answers 400 `ENTRY_TABLE_HAS_NO_TIME`.
|
|
247
|
+
# @option opts [Time] :_until Only entries made before this time: `until` is EXCLUSIVE (an entry made at exactly `until` is NOT returned), so `since=A&until=B` followed by `since=B&until=C` counts every entry once. Same form and same refusals as `since` (400 `INVALID_UNTIL`).
|
|
248
|
+
# @option opts [Hash<String, String>] :context Host context filters as `context[key]=value` (max 5 keys, counting dotted `context.key` too). Use `column.<name>=value` for columns whose names collide with reserved parameters.
|
|
249
|
+
# @option opts [Hash<String, String>] :filter Column filters as `filter[columnName]=value` (same meaning as bare `columnName=value` or `column.columnName=value`; max 10 column filters counting all spellings). A plain `filter=value` still filters a column named `filter`.
|
|
250
|
+
# @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.
|
|
251
|
+
# @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.
|
|
252
|
+
# @return [String]
|
|
253
|
+
describe 'export_composition_entry_items test' do
|
|
215
254
|
it 'should work' do
|
|
216
255
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
217
256
|
end
|
|
218
257
|
end
|
|
219
258
|
|
|
220
|
-
# unit tests for
|
|
259
|
+
# unit tests for get_ai_answers_knowledge
|
|
221
260
|
# See the documents a widget's AI answers from
|
|
222
261
|
# The `ai-answers` adapter lets a widget answer a visitor's question with text an AI model writes from documents the widget's owner provides. This lists those documents, and how much room is left for more: `totals` carries the widget'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 `processing` 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 `addAiAnswersKnowledgeDocument`; remove one with `removeAiAnswersKnowledgeDocument`. 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 `content:read` scope.
|
|
223
262
|
# @param id The widget (composition) whose documents to list
|
|
@@ -225,13 +264,13 @@ describe 'CompositionsApi' do
|
|
|
225
264
|
# @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.
|
|
226
265
|
# @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.
|
|
227
266
|
# @return [GetAiAnswersKnowledge200Response]
|
|
228
|
-
describe '
|
|
267
|
+
describe 'get_ai_answers_knowledge test' do
|
|
229
268
|
it 'should work' do
|
|
230
269
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
231
270
|
end
|
|
232
271
|
end
|
|
233
272
|
|
|
234
|
-
# unit tests for
|
|
273
|
+
# unit tests for get_all_compositions
|
|
235
274
|
# Get All Compositions
|
|
236
275
|
# Retrieves all compositions with pagination support. Pass `managedUserId` (Widgetic's id for one of your managed users) or `managedUserExternalId` (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 `MANAGED_USER_NOT_FOUND`. An editor session with the `creator` surface may call this to list the compositions of ONE widget it built: it must send `widgetId`, and the answer holds only the compositions made for the session's managed user.
|
|
237
276
|
# @param [Hash] opts the optional parameters
|
|
@@ -247,27 +286,27 @@ describe 'CompositionsApi' do
|
|
|
247
286
|
# @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.
|
|
248
287
|
# @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.
|
|
249
288
|
# @return [GetAllCompositions200Response]
|
|
250
|
-
describe '
|
|
289
|
+
describe 'get_all_compositions test' do
|
|
251
290
|
it 'should work' do
|
|
252
291
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
253
292
|
end
|
|
254
293
|
end
|
|
255
294
|
|
|
256
|
-
# unit tests for
|
|
295
|
+
# unit tests for get_composition_by_id
|
|
257
296
|
# Get Composition
|
|
258
297
|
# Retrieves a specific composition by its ID. The answer carries `direct`, which says whether the widget the composition is made from is drawn straight into your page (`true`) or inside a frame (`false`), or `null` 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'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's own sites, the visitor's own machine and your own platform. A widget in a frame writes from Widgetic'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's workspace) the answer also carries `lastEditedBy` and `lastEditedAt`: who made the latest change and when, so that a teammate who opens it can be told \"Anna changed this at 14:32\". 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.
|
|
259
298
|
# @param id Composition ID
|
|
260
299
|
# @param [Hash] opts the optional parameters
|
|
261
300
|
# @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.
|
|
262
301
|
# @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.
|
|
263
|
-
# @return [
|
|
264
|
-
describe '
|
|
302
|
+
# @return [CompositionResponse]
|
|
303
|
+
describe 'get_composition_by_id test' do
|
|
265
304
|
it 'should work' do
|
|
266
305
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
267
306
|
end
|
|
268
307
|
end
|
|
269
308
|
|
|
270
|
-
# unit tests for
|
|
309
|
+
# unit tests for get_composition_content
|
|
271
310
|
# Get Current Content
|
|
272
311
|
# Retrieves the current content of a composition
|
|
273
312
|
# @param id ID of the composition
|
|
@@ -275,13 +314,13 @@ describe 'CompositionsApi' do
|
|
|
275
314
|
# @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.
|
|
276
315
|
# @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.
|
|
277
316
|
# @return [GetCompositionContentResponse]
|
|
278
|
-
describe '
|
|
317
|
+
describe 'get_composition_content test' do
|
|
279
318
|
it 'should work' do
|
|
280
319
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
281
320
|
end
|
|
282
321
|
end
|
|
283
322
|
|
|
284
|
-
# unit tests for
|
|
323
|
+
# unit tests for get_composition_content_schema
|
|
285
324
|
# Get Content Schema
|
|
286
325
|
# Retrieves the content schema for a composition based on its widget type
|
|
287
326
|
# @param id ID of the composition
|
|
@@ -289,13 +328,13 @@ describe 'CompositionsApi' do
|
|
|
289
328
|
# @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.
|
|
290
329
|
# @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.
|
|
291
330
|
# @return [GetCompositionContentSchemaResponse]
|
|
292
|
-
describe '
|
|
331
|
+
describe 'get_composition_content_schema test' do
|
|
293
332
|
it 'should work' do
|
|
294
333
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
295
334
|
end
|
|
296
335
|
end
|
|
297
336
|
|
|
298
|
-
# unit tests for
|
|
337
|
+
# unit tests for get_composition_data_source
|
|
299
338
|
# Read the composition data source binding
|
|
300
339
|
# The data source that is bound to the composition: `url` and `refreshSeconds`. The answer's `data` is `null` 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).
|
|
301
340
|
# @param id
|
|
@@ -303,13 +342,13 @@ describe 'CompositionsApi' do
|
|
|
303
342
|
# @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.
|
|
304
343
|
# @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.
|
|
305
344
|
# @return [GetCompositionDataSourceResponse]
|
|
306
|
-
describe '
|
|
345
|
+
describe 'get_composition_data_source test' do
|
|
307
346
|
it 'should work' do
|
|
308
347
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
309
348
|
end
|
|
310
349
|
end
|
|
311
350
|
|
|
312
|
-
# unit tests for
|
|
351
|
+
# unit tests for get_composition_database_record
|
|
313
352
|
# Get Record From Composition Database
|
|
314
353
|
# Retrieves 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`.
|
|
315
354
|
# @param id ID of the composition
|
|
@@ -318,14 +357,14 @@ describe 'CompositionsApi' do
|
|
|
318
357
|
# @param [Hash] opts the optional parameters
|
|
319
358
|
# @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.
|
|
320
359
|
# @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.
|
|
321
|
-
# @return [
|
|
322
|
-
describe '
|
|
360
|
+
# @return [CompositionDatabaseRecordResponse]
|
|
361
|
+
describe 'get_composition_database_record test' do
|
|
323
362
|
it 'should work' do
|
|
324
363
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
325
364
|
end
|
|
326
365
|
end
|
|
327
366
|
|
|
328
|
-
# unit tests for
|
|
367
|
+
# unit tests for get_composition_database_records
|
|
329
368
|
# Get All Records From Composition Database Table
|
|
330
369
|
# Retrieves all records 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`.
|
|
331
370
|
# @param id ID of the composition
|
|
@@ -334,13 +373,13 @@ describe 'CompositionsApi' do
|
|
|
334
373
|
# @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.
|
|
335
374
|
# @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.
|
|
336
375
|
# @return [GetCompositionDatabaseRecords200Response]
|
|
337
|
-
describe '
|
|
376
|
+
describe 'get_composition_database_records test' do
|
|
338
377
|
it 'should work' do
|
|
339
378
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
340
379
|
end
|
|
341
380
|
end
|
|
342
381
|
|
|
343
|
-
# unit tests for
|
|
382
|
+
# unit tests for get_composition_design
|
|
344
383
|
# Get Composition Design
|
|
345
384
|
# Retrieves only the design field from a composition.
|
|
346
385
|
# @param id ID of the composition
|
|
@@ -348,13 +387,13 @@ describe 'CompositionsApi' do
|
|
|
348
387
|
# @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.
|
|
349
388
|
# @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.
|
|
350
389
|
# @return [GetCompositionDesignResponse]
|
|
351
|
-
describe '
|
|
390
|
+
describe 'get_composition_design test' do
|
|
352
391
|
it 'should work' do
|
|
353
392
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
354
393
|
end
|
|
355
394
|
end
|
|
356
395
|
|
|
357
|
-
# unit tests for
|
|
396
|
+
# unit tests for get_composition_design_schema
|
|
358
397
|
# Get Design Schema
|
|
359
398
|
# Retrieves the design schema for a composition based on its widget type
|
|
360
399
|
# @param id ID of the composition
|
|
@@ -362,13 +401,13 @@ describe 'CompositionsApi' do
|
|
|
362
401
|
# @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.
|
|
363
402
|
# @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.
|
|
364
403
|
# @return [GetCompositionDesignSchemaResponse]
|
|
365
|
-
describe '
|
|
404
|
+
describe 'get_composition_design_schema test' do
|
|
366
405
|
it 'should work' do
|
|
367
406
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
368
407
|
end
|
|
369
408
|
end
|
|
370
409
|
|
|
371
|
-
# unit tests for
|
|
410
|
+
# unit tests for get_composition_embed_schema
|
|
372
411
|
# Get Embed Schema
|
|
373
412
|
# Retrieves the definition of the composition'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 `schema/content` and `schema/design`, in the same format (`componentGroups` → `components` → `propertyGroups` → `properties`, each property with a `type`, a `defaultValue` and an `inputController`), 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'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: - `GET /compositions/{id}/embed-settings` returns what the composition saved. A composition whose Embed tab was never saved has nothing to return; seed the form from `defaults`, which holds the `defaultValue` of every setting that declares one. - `PUT /compositions/{id}` with `embedSettings` saves them. The gateway stores `embedSettings` as given and does not check it against this schema; the schema is how a client knows what to put there. A property's `visibilityCondition` says when its control is shown: `condition` is a comparison of the current values of the properties named in `dependsOn` (`useIframe === false`, `embedTarget === 'mixed' && keepDimensions === false`). While it is false the Embed Editor does not show the control. A colour picker with `showOpacityControls` saves its opacity next to the colour, under the key `<name>_opacity` as a number from 0 to 1 (`overlayBackgroundColor` → `overlayBackgroundColor_opacity`). Its `defaultTransparency` is a percentage and the saved value a fraction (50 → 0.5).
|
|
374
413
|
# @param id ID of the composition
|
|
@@ -376,13 +415,13 @@ describe 'CompositionsApi' do
|
|
|
376
415
|
# @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.
|
|
377
416
|
# @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.
|
|
378
417
|
# @return [GetCompositionEmbedSchemaResponse]
|
|
379
|
-
describe '
|
|
418
|
+
describe 'get_composition_embed_schema test' do
|
|
380
419
|
it 'should work' do
|
|
381
420
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
382
421
|
end
|
|
383
422
|
end
|
|
384
423
|
|
|
385
|
-
# unit tests for
|
|
424
|
+
# unit tests for get_composition_embed_settings
|
|
386
425
|
# Get Composition Embed Settings
|
|
387
426
|
# Retrieves only the embedSettings field from a composition.
|
|
388
427
|
# @param id ID of the composition
|
|
@@ -390,13 +429,13 @@ describe 'CompositionsApi' do
|
|
|
390
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.
|
|
391
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.
|
|
392
431
|
# @return [GetCompositionEmbedSettingsResponse]
|
|
393
|
-
describe '
|
|
432
|
+
describe 'get_composition_embed_settings test' do
|
|
394
433
|
it 'should work' do
|
|
395
434
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
396
435
|
end
|
|
397
436
|
end
|
|
398
437
|
|
|
399
|
-
# unit tests for
|
|
438
|
+
# unit tests for get_composition_preview
|
|
400
439
|
# Get Composition Preview
|
|
401
440
|
# Returns the address of the page an editor shows the composition in: the page of the widget'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 `postMessage`: `{ type: 'widgetic:update', design }`, `{ type: 'widgetic:update', content }` or `{ type: 'widgetic:update', contentItems }`. 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 `WIDGET_NOT_PUBLISHED`.
|
|
402
441
|
# @param id ID of the composition
|
|
@@ -404,13 +443,13 @@ describe 'CompositionsApi' do
|
|
|
404
443
|
# @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.
|
|
405
444
|
# @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.
|
|
406
445
|
# @return [GetCompositionPreviewResponse]
|
|
407
|
-
describe '
|
|
446
|
+
describe 'get_composition_preview test' do
|
|
408
447
|
it 'should work' do
|
|
409
448
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
410
449
|
end
|
|
411
450
|
end
|
|
412
451
|
|
|
413
|
-
# unit tests for
|
|
452
|
+
# unit tests for get_composition_versions
|
|
414
453
|
# Get Composition Versions
|
|
415
454
|
# Retrieves version history for a specific composition.
|
|
416
455
|
# @param id Composition ID
|
|
@@ -418,25 +457,47 @@ describe 'CompositionsApi' do
|
|
|
418
457
|
# @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.
|
|
419
458
|
# @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.
|
|
420
459
|
# @return [GetCompositionVersions200Response]
|
|
421
|
-
describe '
|
|
460
|
+
describe 'get_composition_versions test' do
|
|
422
461
|
it 'should work' do
|
|
423
462
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
424
463
|
end
|
|
425
464
|
end
|
|
426
465
|
|
|
427
|
-
# unit tests for
|
|
466
|
+
# unit tests for get_compositions_batch
|
|
428
467
|
# Get Compositions Batch
|
|
429
468
|
# 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's domain list, or the `allowedDomains` of a partner the owner administers) and the request comes from another website (the `Origin` header, or the host of `Referer` when there is no `Origin`), that composition is left out of `compositions` and reported in `errors` as `Domain access denied: <reason>`; 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'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 compositions of that partner: a partner's list never has to name it.
|
|
430
469
|
# @param get_compositions_batch_request
|
|
431
470
|
# @param [Hash] opts the optional parameters
|
|
432
471
|
# @return [GetCompositionsBatchResponse]
|
|
433
|
-
describe '
|
|
472
|
+
describe 'get_compositions_batch test' do
|
|
473
|
+
it 'should work' do
|
|
474
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
475
|
+
end
|
|
476
|
+
end
|
|
477
|
+
|
|
478
|
+
# unit tests for list_composition_entry_items
|
|
479
|
+
# List composition entry items with paging and filters
|
|
480
|
+
# 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.
|
|
481
|
+
# @param id
|
|
482
|
+
# @param table
|
|
483
|
+
# @param [Hash] opts the optional parameters
|
|
484
|
+
# @option opts [Integer] :limit
|
|
485
|
+
# @option opts [String] :order `desc` (the default) lists the newest entry first, `asc` 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.
|
|
486
|
+
# @option opts [Time] :since Only entries made at this time or later: `since` is INCLUSIVE (an entry made at exactly `since` is returned). A date and time with an offset, such as `2026-10-01T00:00:00Z`; anything else answers 400 `INVALID_SINCE`. An entry with no time never matches, and a table with no time column answers 400 `ENTRY_TABLE_HAS_NO_TIME`.
|
|
487
|
+
# @option opts [Time] :_until Only entries made before this time: `until` is EXCLUSIVE (an entry made at exactly `until` is NOT returned), so `since=A&until=B` followed by `since=B&until=C` counts every entry once. Same form and same refusals as `since` (400 `INVALID_UNTIL`).
|
|
488
|
+
# @option opts [String] :cursor
|
|
489
|
+
# @option opts [Hash<String, String>] :context Host context filters as `context[key]=value` (max 5 keys, counting dotted `context.key` too). Use `column.<name>=value` for columns whose names collide with reserved parameters.
|
|
490
|
+
# @option opts [Hash<String, String>] :filter Column filters as `filter[columnName]=value` (same meaning as bare `columnName=value` or `column.columnName=value`; max 10 column filters counting all spellings). A plain `filter=value` still filters a column named `filter`.
|
|
491
|
+
# @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.
|
|
492
|
+
# @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.
|
|
493
|
+
# @return [CompositionEntryItemsPageSuccess]
|
|
494
|
+
describe 'list_composition_entry_items test' do
|
|
434
495
|
it 'should work' do
|
|
435
496
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
436
497
|
end
|
|
437
498
|
end
|
|
438
499
|
|
|
439
|
-
# unit tests for
|
|
500
|
+
# unit tests for patch_composition_content_item
|
|
440
501
|
# Update a content list item
|
|
441
502
|
# @param id
|
|
442
503
|
# @param list
|
|
@@ -447,14 +508,14 @@ describe 'CompositionsApi' do
|
|
|
447
508
|
# @option opts [String] :if_match
|
|
448
509
|
# @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.
|
|
449
510
|
# @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.
|
|
450
|
-
# @return [
|
|
451
|
-
describe '
|
|
511
|
+
# @return [ContentItemWriteResultResponse]
|
|
512
|
+
describe 'patch_composition_content_item test' do
|
|
452
513
|
it 'should work' do
|
|
453
514
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
454
515
|
end
|
|
455
516
|
end
|
|
456
517
|
|
|
457
|
-
# unit tests for
|
|
518
|
+
# unit tests for read_composition_entries
|
|
458
519
|
# Read the Entries of a Composition's Table
|
|
459
520
|
# 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 (`groupBy`): each group is a rating and how many visitors gave it. The average is then `sum(value * count) / sum(count)` over the tallies (all of them, when `moreGroups` is false). - **`totalRows`** is how many entries the table holds in all. - **`groupBy`** names a column (as `describeCompositionEntries` lists it). `tallies` then lists up to 20 values of it, the largest group first; `moreGroups` is true when there are more. - **`rows`** asks for the newest entries too, 1 to 25. The default is 0: counts and tallies only. `moreRows` is true when the table holds more than were returned. Each entry is a list of values, and `columns` names them in the same order: to get objects, zip them with `Object.fromEntries(columns.map((name, index) => [name, entry[index]]))`. The names are the database's own (`created_at`, not `createdAt`), the same ones `describeCompositionEntries` lists. - **`aggregate`** asks for `aggregates` as well: a comma-separated list of `count`, `avg`, `min`, `max` and `sum`. `avg`, `min`, `max` and `sum` need `column`, a numeric column of the table. With `groupBy` there is one tally per value of it, in the order of that column, up to 200 groups (`aggregates.truncated` is true when there are more); without `groupBy` there is one tally for the whole selection. **`aggregates` counts a selection; the rest of the answer does not.** `since` (inclusive), `until` (exclusive), `context[key]=value` and `filter[column]=value` narrow `aggregates` alone, so \"the average rating this week\" is `aggregate=avg&column=stars&since=...`. `totalRows`, `tallies` and `rows` always describe the whole table. These parameters, and `column`, are refused (400) on a read without `aggregate`, 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 `aggregates`), 40 columns or 200 characters a value. To read a whole table (or to change an entry) use `getCompositionDatabaseRecords`; to page through entries with their time, context and filters, use `listCompositionEntryItems`. **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.
|
|
460
521
|
# @param id ID of the composition
|
|
@@ -471,13 +532,13 @@ describe 'CompositionsApi' do
|
|
|
471
532
|
# @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.
|
|
472
533
|
# @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.
|
|
473
534
|
# @return [CompositionEntriesReadingResponse]
|
|
474
|
-
describe '
|
|
535
|
+
describe 'read_composition_entries test' do
|
|
475
536
|
it 'should work' do
|
|
476
537
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
477
538
|
end
|
|
478
539
|
end
|
|
479
540
|
|
|
480
|
-
# unit tests for
|
|
541
|
+
# unit tests for remove_ai_answers_knowledge_document
|
|
481
542
|
# Remove a document from a widget's knowledge base
|
|
482
543
|
# Removes one document and its passages: the widget's AI stops answering from it at once. Take the `documentId` from `getAiAnswersKnowledge`. The caller must be allowed to change the widget. An API key needs the `content:write` scope.
|
|
483
544
|
# @param id The widget (composition) the document is in
|
|
@@ -486,13 +547,13 @@ describe 'CompositionsApi' do
|
|
|
486
547
|
# @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.
|
|
487
548
|
# @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.
|
|
488
549
|
# @return [RemoveAiAnswersKnowledgeDocument200Response]
|
|
489
|
-
describe '
|
|
550
|
+
describe 'remove_ai_answers_knowledge_document test' do
|
|
490
551
|
it 'should work' do
|
|
491
552
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
492
553
|
end
|
|
493
554
|
end
|
|
494
555
|
|
|
495
|
-
# unit tests for
|
|
556
|
+
# unit tests for set_composition_data_source
|
|
496
557
|
# Bind a public JSON data source for embed refresh
|
|
497
558
|
# Stores an https URL the widget runtime may read on load and every `refreshSeconds`. 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 (`url`, `refreshSeconds`).
|
|
498
559
|
# @param id
|
|
@@ -502,13 +563,13 @@ describe 'CompositionsApi' do
|
|
|
502
563
|
# @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.
|
|
503
564
|
# @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.
|
|
504
565
|
# @return [CompositionDataSourceResponse]
|
|
505
|
-
describe '
|
|
566
|
+
describe 'set_composition_data_source test' do
|
|
506
567
|
it 'should work' do
|
|
507
568
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
508
569
|
end
|
|
509
570
|
end
|
|
510
571
|
|
|
511
|
-
# unit tests for
|
|
572
|
+
# unit tests for set_dynamic_content
|
|
512
573
|
# Set Dynamic Content
|
|
513
574
|
# Updates the content of a composition dynamically with optional schema validation. An editor session (see `createManagedUserEditorSession`) can send only `content`, `validate` and `partial`, and only for a composition made for its managed user. A body that names `version`, `source` or any other field is refused with `403` and `EDITOR_SESSION_FIELD_NOT_ALLOWED`.
|
|
514
575
|
# @param id ID of the composition
|
|
@@ -519,13 +580,13 @@ describe 'CompositionsApi' do
|
|
|
519
580
|
# @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.
|
|
520
581
|
# @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.
|
|
521
582
|
# @return [SetDynamicContentResponse]
|
|
522
|
-
describe '
|
|
583
|
+
describe 'set_dynamic_content test' do
|
|
523
584
|
it 'should work' do
|
|
524
585
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
525
586
|
end
|
|
526
587
|
end
|
|
527
588
|
|
|
528
|
-
# unit tests for
|
|
589
|
+
# unit tests for update_composition
|
|
529
590
|
# Update Composition
|
|
530
591
|
# Updates a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry. An editor session (see `createManagedUserEditorSession`) can send only `name`, `content`, `design` and `embedSettings`, and only for a composition made for its managed user. A body that names any other field is refused with `403` and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Send `databaseSchema` to add tables to the composition: the tables that are missing are made, and the ones that exist are left as they are. A `databaseSchema` that cannot be used is refused before anything is saved, with `400` and `INVALID_DATABASE_SCHEMA`. If the composition is saved but its tables cannot be made just now, the answer is still `200` and `meta.warnings` says so. **When several people edit the same composition.** A save that carries `content` can name the content version it started from in the `If-Match` header (the `contentVersion` of the composition you read, or the `ETag` of an earlier answer). If somebody saved the content since, nothing is overwritten: the save is refused with `412` and `CONTENT_VERSION_MISMATCH`, and `error.details.currentVersion` is the version to start again from. For a composition a team shares, `error.details` also says who got there first: `lastEditedBy` (`{ id, name }`, or `null` when nobody can be named) and `lastEditedAt`. An editor session, or a call made for one managed user, is told the version only. A save without `If-Match` still goes through, and the other person's change is replaced, as it always was.
|
|
531
592
|
# @param id Composition ID
|
|
@@ -535,14 +596,14 @@ describe 'CompositionsApi' do
|
|
|
535
596
|
# @option opts [String] :if_match Optional content version from `contentVersion` or an `ETag` (`\"3\"`, `3`, or `*`). Read only when the body has `content`.
|
|
536
597
|
# @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.
|
|
537
598
|
# @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.
|
|
538
|
-
# @return [
|
|
539
|
-
describe '
|
|
599
|
+
# @return [CompositionResponse]
|
|
600
|
+
describe 'update_composition test' do
|
|
540
601
|
it 'should work' do
|
|
541
602
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
542
603
|
end
|
|
543
604
|
end
|
|
544
605
|
|
|
545
|
-
# unit tests for
|
|
606
|
+
# unit tests for update_composition_database_record
|
|
546
607
|
# Update Record In Composition Database
|
|
547
608
|
# Updates a specific 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`.
|
|
548
609
|
# @param id ID of the composition
|
|
@@ -553,14 +614,14 @@ describe 'CompositionsApi' do
|
|
|
553
614
|
# @param [Hash] opts the optional parameters
|
|
554
615
|
# @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.
|
|
555
616
|
# @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.
|
|
556
|
-
# @return [
|
|
557
|
-
describe '
|
|
617
|
+
# @return [CompositionDatabaseRecordResponse]
|
|
618
|
+
describe 'update_composition_database_record test' do
|
|
558
619
|
it 'should work' do
|
|
559
620
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
560
621
|
end
|
|
561
622
|
end
|
|
562
623
|
|
|
563
|
-
# unit tests for
|
|
624
|
+
# unit tests for update_composition_status
|
|
564
625
|
# Update Composition Status
|
|
565
626
|
# Updates the status of a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry.
|
|
566
627
|
# @param id Composition ID
|
|
@@ -570,13 +631,13 @@ describe 'CompositionsApi' do
|
|
|
570
631
|
# @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.
|
|
571
632
|
# @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.
|
|
572
633
|
# @return [CompositionResponse]
|
|
573
|
-
describe '
|
|
634
|
+
describe 'update_composition_status test' do
|
|
574
635
|
it 'should work' do
|
|
575
636
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
576
637
|
end
|
|
577
638
|
end
|
|
578
639
|
|
|
579
|
-
# unit tests for
|
|
640
|
+
# unit tests for validate_composition_content
|
|
580
641
|
# Validate Content
|
|
581
642
|
# Checks content against the composition's widget schema without saving it. Send what a content update (`PUT /compositions/{id}/content`) would store, `{ \"design\": {...}, \"content\": {...} }`, or the widget'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'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 `valid` 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 `valid` stays true. The design is not checked here. Nothing is saved and nothing in the body is changed.
|
|
582
643
|
# @param id ID of the composition
|
|
@@ -586,7 +647,7 @@ describe 'CompositionsApi' do
|
|
|
586
647
|
# @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.
|
|
587
648
|
# @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.
|
|
588
649
|
# @return [ValidateCompositionContentResponse]
|
|
589
|
-
describe '
|
|
650
|
+
describe 'validate_composition_content test' do
|
|
590
651
|
it 'should work' do
|
|
591
652
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
592
653
|
end
|