api-sdk-rb 1.11.66 → 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 +294 -285
- data/docs/{GetPartnerCreditTransactions200Response.md → AccountCreditTransactionListResponse.md} +2 -2
- data/docs/AdapterConnection.md +7 -1
- 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/BrandColor.md +22 -0
- data/docs/BrandFont.md +24 -0
- data/docs/BrandKitApi.md +593 -0
- data/docs/BrandKitAssetView.md +42 -0
- data/docs/BrandKitFigmaSource.md +26 -0
- data/docs/BrandKitTokens.md +26 -0
- data/docs/BrandKitTokensFonts.md +24 -0
- data/docs/BrandKitView.md +36 -0
- data/docs/BrandKitViewOwner.md +20 -0
- data/docs/{OperationsIdGetResponse.md → BrandKitViewResponse.md} +3 -3
- data/docs/BrandSpacing.md +32 -0
- data/docs/BrandTextStyle.md +22 -0
- data/docs/CanvasesApi.md +45 -45
- data/docs/Composition.md +5 -1
- data/docs/{CreateCompositionDatabaseRecord201Response.md → CompositionDatabaseRecordResponse.md} +2 -2
- data/docs/CompositionLastEditedBy.md +20 -0
- data/docs/CompositionsApi.md +821 -473
- data/docs/ConfirmAdapterConnectionRequest.md +18 -0
- data/docs/{CreateCompositionContentItem201Response.md → ContentItemWriteResultResponse.md} +2 -2
- data/docs/CreateWidget201ResponseData.md +2 -4
- data/docs/CreateWorkspaceWorkflowFromPresetRequest.md +20 -0
- data/docs/CreateWorkspaceWorkflowRequest.md +22 -0
- data/docs/CreditsApi.md +20 -20
- data/docs/DeleteUpload200Response.md +22 -0
- data/docs/{UploadsIdDelete200ResponseData.md → DeleteUpload200ResponseData.md} +2 -2
- data/docs/DeleteWorkspaceWorkflow200Response.md +22 -0
- data/docs/{GetPartnerDesignDefaults200Response.md → DesignDefaultsResponse.md} +2 -2
- data/docs/EntitlementsApi.md +18 -18
- data/docs/GetOperationResponse.md +22 -0
- data/docs/{OperationsIdGetResponseData.md → GetOperationResponseData.md} +3 -3
- data/docs/GetOperationResponseDataMetadata.md +24 -0
- data/docs/GetPublicCompositionEmbed200Response.md +7 -1
- data/docs/GetPublicCompositionEmbed200ResponseAdapters.md +20 -0
- data/docs/GetPublicCompositionEmbed200ResponseAdaptersCaptcha.md +18 -0
- data/docs/GetPublicCompositionEmbed200ResponseEntries.md +20 -0
- data/docs/GetPublicCompositionEmbed200ResponseMedia.md +18 -0
- data/docs/GetWorkspaceWorkflowStats200Response.md +22 -0
- data/docs/GetWorkspaceWorkflowVersion200Response.md +22 -0
- data/docs/InvoicesApi.md +9 -9
- data/docs/ListPartnerWorkflowPresets200Response.md +22 -0
- data/docs/{UploadsGet200Response.md → ListUploads200Response.md} +2 -2
- data/docs/ListWorkspaceWorkflowCompositionOptions200Response.md +22 -0
- data/docs/ListWorkspaceWorkflowPresets200Response.md +22 -0
- data/docs/ListWorkspaceWorkflowVersions200Response.md +22 -0
- data/docs/ListWorkspaceWorkflows200Response.md +22 -0
- data/docs/{GetManagedUserLimits200Response.md → ManagedUserLimitsResponse.md} +2 -2
- data/docs/{DeleteManagedUser200Response.md → ManagedUserRemovalResponse.md} +2 -2
- data/docs/ManagedUsersApi.md +261 -171
- data/docs/NewComposition.md +1 -1
- data/docs/NewEditorSession.md +1 -1
- data/docs/OfferWorkflowPresetRequest.md +24 -0
- data/docs/OfferedWorkflowPreset.md +40 -0
- data/docs/OfferedWorkflowPresetList.md +18 -0
- data/docs/OfferedWorkflowPresetWidget.md +22 -0
- data/docs/OperationsApi.md +11 -11
- data/docs/PartnerCustomization.md +2 -2
- data/docs/PartnerNotification.md +1 -1
- data/docs/PartnersApi.md +644 -352
- data/docs/PatchBrandKitAssetRequest.md +24 -0
- data/docs/PatchBrandKitRequest.md +30 -0
- data/docs/PatchBrandKitRequestFonts.md +24 -0
- data/docs/PatchBrandKitRequestSpacing.md +32 -0
- data/docs/PostBrandKitIconRequest.md +20 -0
- data/docs/PublicEmbedApi.md +324 -58
- data/docs/PublicWorkflow.md +36 -0
- data/docs/PublicWorkflowEventsAccepted.md +22 -0
- data/docs/PublicWorkflowEventsRequest.md +24 -0
- data/docs/PublicWorkflowEventsRequestEventsInner.md +24 -0
- data/docs/PublicWorkflowEventsRequestHeightsInner.md +20 -0
- data/docs/{CreateCompositionFromWidget201Response.md → PublicWorkflowResponse.md} +3 -3
- data/docs/PublicWorkflowTranslation.md +20 -0
- data/docs/PublishWorkspaceWorkflow200Response.md +22 -0
- data/docs/PublishWorkspaceWorkflowRequest.md +18 -0
- data/docs/PutBrandKitRequest.md +22 -0
- data/docs/RemovePartnerWorkflowPreset200Response.md +22 -0
- data/docs/ReportPublicWorkflowEvents200Response.md +22 -0
- data/docs/SaveWorkspaceWorkflowRequest.md +24 -0
- data/docs/SetAdapterConnectionRequest.md +1 -1
- data/docs/SetPartnerWorkflowPreset200Response.md +22 -0
- data/docs/TokensApi.md +11 -9
- data/docs/UpdateComposition.md +1 -1
- data/docs/Upload.md +1 -1
- data/docs/UploadLimits.md +3 -3
- data/docs/UploadsApi.md +85 -85
- data/docs/UsersApi.md +191 -115
- data/docs/Widget.md +2 -4
- 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/Workflow.md +50 -0
- data/docs/WorkflowCompositionAction.md +24 -0
- data/docs/WorkflowCompositionField.md +24 -0
- data/docs/WorkflowCompositionOption.md +30 -0
- data/docs/WorkflowCompositionOptionActions.md +22 -0
- data/docs/WorkflowCompositionOptionInputs.md +24 -0
- data/docs/WorkflowCompositionOptions.md +24 -0
- data/docs/WorkflowConditionCase.md +24 -0
- data/docs/WorkflowConditionTest.md +22 -0
- data/docs/WorkflowCounter.md +20 -0
- data/docs/WorkflowDetail.md +60 -0
- data/docs/WorkflowDetailAllOfLastEditedBy.md +20 -0
- data/docs/WorkflowDetailResponse.md +22 -0
- data/docs/WorkflowEdge.md +24 -0
- data/docs/WorkflowFailureReason.md +15 -0
- data/docs/WorkflowFailureReasonCounter.md +22 -0
- data/docs/WorkflowFieldReference.md +22 -0
- data/docs/WorkflowGraph.md +22 -0
- data/docs/WorkflowIssue.md +28 -0
- data/docs/WorkflowList.md +24 -0
- data/docs/WorkflowNode.md +30 -0
- data/docs/WorkflowNodePosition.md +20 -0
- data/docs/WorkflowPresetChoice.md +26 -0
- data/docs/WorkflowPresetChoices.md +18 -0
- data/docs/WorkflowPresetRemoval.md +18 -0
- data/docs/WorkflowPresetWidget.md +20 -0
- data/docs/WorkflowPublishResult.md +22 -0
- data/docs/WorkflowRemoved.md +18 -0
- data/docs/WorkflowResponse.md +22 -0
- data/docs/WorkflowSchedule.md +24 -0
- data/docs/WorkflowStats.md +34 -0
- data/docs/WorkflowStatus.md +15 -0
- data/docs/WorkflowTrigger.md +28 -0
- data/docs/WorkflowTriggerValuesInner.md +20 -0
- data/docs/WorkflowVersion.md +28 -0
- data/docs/WorkflowVersionDetail.md +32 -0
- data/docs/WorkflowVersionList.md +18 -0
- data/docs/WorkflowVersionPublishedBy.md +20 -0
- data/docs/WorkflowsApi.md +1527 -0
- data/lib/api-sdk-rb/api/brand_kit_api.rb +581 -0
- data/lib/api-sdk-rb/api/canvases_api.rb +39 -39
- data/lib/api-sdk-rb/api/compositions_api.rb +993 -565
- 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 +668 -352
- data/lib/api-sdk-rb/api/public_embed_api.rb +339 -62
- 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 +213 -119
- data/lib/api-sdk-rb/api/widgets_api.rb +40 -40
- data/lib/api-sdk-rb/api/workflows_api.rb +1775 -0
- data/lib/api-sdk-rb/configuration.rb +11 -23
- 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/adapter_connection.rb +48 -5
- 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/adapter_connection_removal_response.rb +246 -0
- data/lib/api-sdk-rb/models/{delete_managed_user200_response.rb → adapter_connection_response.rb} +4 -4
- data/lib/api-sdk-rb/models/ai_answers_knowledge_document_response.rb +246 -0
- data/lib/api-sdk-rb/models/brand_color.rb +329 -0
- data/lib/api-sdk-rb/models/brand_font.rb +357 -0
- data/lib/api-sdk-rb/models/brand_kit_asset_view.rb +409 -0
- data/lib/api-sdk-rb/models/brand_kit_figma_source.rb +277 -0
- data/lib/api-sdk-rb/models/brand_kit_tokens.rb +335 -0
- data/lib/api-sdk-rb/models/brand_kit_tokens_fonts.rb +241 -0
- data/lib/api-sdk-rb/models/brand_kit_view.rb +344 -0
- data/lib/api-sdk-rb/models/brand_kit_view_owner.rb +267 -0
- data/lib/api-sdk-rb/models/brand_kit_view_response.rb +247 -0
- data/lib/api-sdk-rb/models/brand_spacing.rb +557 -0
- data/lib/api-sdk-rb/models/brand_text_style.rb +344 -0
- data/lib/api-sdk-rb/models/composition.rb +26 -5
- 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/composition_last_edited_by.rb +242 -0
- data/lib/api-sdk-rb/models/confirm_adapter_connection_request.rb +241 -0
- data/lib/api-sdk-rb/models/content_item_write_result_response.rb +246 -0
- data/lib/api-sdk-rb/models/create_widget201_response_data.rb +9 -20
- data/lib/api-sdk-rb/models/create_workspace_workflow_from_preset_request.rb +278 -0
- data/lib/api-sdk-rb/models/create_workspace_workflow_request.rb +271 -0
- 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/delete_workspace_workflow200_response.rb +246 -0
- data/lib/api-sdk-rb/models/design_defaults_response.rb +246 -0
- 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/get_public_composition_embed200_response.rb +29 -2
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_adapters.rb +225 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_adapters_captcha.rb +216 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_entries.rb +224 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_media.rb +216 -0
- data/lib/api-sdk-rb/models/get_workspace_workflow_stats200_response.rb +246 -0
- data/lib/api-sdk-rb/models/{create_composition_from_widget201_response.rb → get_workspace_workflow_version200_response.rb} +4 -4
- data/lib/api-sdk-rb/models/list_partner_workflow_presets200_response.rb +246 -0
- data/lib/api-sdk-rb/models/{uploads_get200_response.rb → list_uploads200_response.rb} +3 -3
- data/lib/api-sdk-rb/models/list_workspace_workflow_composition_options200_response.rb +246 -0
- data/lib/api-sdk-rb/models/{create_composition_content_item201_response.rb → list_workspace_workflow_presets200_response.rb} +4 -4
- data/lib/api-sdk-rb/models/{add_ai_answers_knowledge_document201_response.rb → list_workspace_workflow_versions200_response.rb} +4 -4
- data/lib/api-sdk-rb/models/list_workspace_workflows200_response.rb +246 -0
- 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/new_composition.rb +1 -1
- data/lib/api-sdk-rb/models/new_editor_session.rb +1 -1
- data/lib/api-sdk-rb/models/offer_workflow_preset_request.rb +322 -0
- data/lib/api-sdk-rb/models/offered_workflow_preset.rb +423 -0
- data/lib/api-sdk-rb/models/offered_workflow_preset_list.rb +223 -0
- data/lib/api-sdk-rb/models/offered_workflow_preset_widget.rb +251 -0
- data/lib/api-sdk-rb/models/partner_notification.rb +1 -1
- data/lib/api-sdk-rb/models/partner_notification_event_type.rb +5 -1
- data/lib/api-sdk-rb/models/patch_brand_kit_asset_request.rb +289 -0
- data/lib/api-sdk-rb/models/patch_brand_kit_request.rb +363 -0
- data/lib/api-sdk-rb/models/patch_brand_kit_request_fonts.rb +242 -0
- data/lib/api-sdk-rb/models/patch_brand_kit_request_spacing.rb +502 -0
- data/lib/api-sdk-rb/models/post_brand_kit_icon_request.rb +237 -0
- data/lib/api-sdk-rb/models/public_workflow.rb +351 -0
- data/lib/api-sdk-rb/models/public_workflow_events_accepted.rb +242 -0
- data/lib/api-sdk-rb/models/public_workflow_events_request.rb +301 -0
- data/lib/api-sdk-rb/models/public_workflow_events_request_events_inner.rb +354 -0
- data/lib/api-sdk-rb/models/public_workflow_events_request_heights_inner.rb +267 -0
- data/lib/api-sdk-rb/models/public_workflow_response.rb +246 -0
- data/lib/api-sdk-rb/models/public_workflow_translation.rb +242 -0
- data/lib/api-sdk-rb/models/{set_user_adapter_connection200_response.rb → publish_workspace_workflow200_response.rb} +4 -4
- data/lib/api-sdk-rb/models/publish_workspace_workflow_request.rb +240 -0
- data/lib/api-sdk-rb/models/put_brand_kit_request.rb +239 -0
- data/lib/api-sdk-rb/models/{remove_user_adapter_connection200_response.rb → remove_partner_workflow_preset200_response.rb} +4 -4
- data/lib/api-sdk-rb/models/report_public_workflow_events200_response.rb +246 -0
- data/lib/api-sdk-rb/models/save_workspace_workflow_request.rb +296 -0
- data/lib/api-sdk-rb/models/set_adapter_connection_request.rb +1 -1
- data/lib/api-sdk-rb/models/{get_partner_design_defaults200_response.rb → set_partner_workflow_preset200_response.rb} +4 -4
- data/lib/api-sdk-rb/models/update_composition.rb +1 -1
- 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.rb +9 -20
- data/lib/api-sdk-rb/models/widget_clarification.rb +279 -0
- data/lib/api-sdk-rb/models/widget_clarification_option.rb +256 -0
- 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/widget_plan_decisions_libraries_inner.rb +255 -0
- 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/workflow.rb +509 -0
- data/lib/api-sdk-rb/models/workflow_composition_action.rb +266 -0
- data/lib/api-sdk-rb/models/workflow_composition_field.rb +303 -0
- data/lib/api-sdk-rb/models/workflow_composition_option.rb +316 -0
- data/lib/api-sdk-rb/models/workflow_composition_option_actions.rb +284 -0
- data/lib/api-sdk-rb/models/workflow_composition_option_inputs.rb +304 -0
- data/lib/api-sdk-rb/models/workflow_composition_options.rb +271 -0
- data/lib/api-sdk-rb/models/workflow_condition_case.rb +322 -0
- data/lib/api-sdk-rb/models/workflow_condition_test.rb +284 -0
- data/lib/api-sdk-rb/models/workflow_counter.rb +238 -0
- data/lib/api-sdk-rb/models/workflow_detail.rb +580 -0
- data/lib/api-sdk-rb/models/workflow_detail_all_of_last_edited_by.rb +242 -0
- data/lib/api-sdk-rb/models/workflow_detail_response.rb +246 -0
- data/lib/api-sdk-rb/models/workflow_edge.rb +292 -0
- 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_field_reference.rb +300 -0
- data/lib/api-sdk-rb/models/workflow_graph.rb +330 -0
- data/lib/api-sdk-rb/models/workflow_issue.rb +309 -0
- data/lib/api-sdk-rb/models/workflow_list.rb +271 -0
- data/lib/api-sdk-rb/models/workflow_node.rb +343 -0
- data/lib/api-sdk-rb/models/workflow_node_position.rb +238 -0
- data/lib/api-sdk-rb/models/workflow_preset_choice.rb +288 -0
- data/lib/api-sdk-rb/models/workflow_preset_choices.rb +224 -0
- data/lib/api-sdk-rb/models/workflow_preset_removal.rb +222 -0
- data/lib/api-sdk-rb/models/workflow_preset_widget.rb +234 -0
- data/lib/api-sdk-rb/models/workflow_publish_result.rb +256 -0
- data/lib/api-sdk-rb/models/workflow_removed.rb +221 -0
- data/lib/api-sdk-rb/models/workflow_response.rb +246 -0
- data/lib/api-sdk-rb/models/workflow_schedule.rb +298 -0
- data/lib/api-sdk-rb/models/workflow_stats.rb +347 -0
- data/lib/api-sdk-rb/models/workflow_status.rb +42 -0
- data/lib/api-sdk-rb/models/workflow_trigger.rb +303 -0
- data/lib/api-sdk-rb/models/workflow_trigger_values_inner.rb +271 -0
- data/lib/api-sdk-rb/models/workflow_version.rb +316 -0
- data/lib/api-sdk-rb/models/workflow_version_detail.rb +354 -0
- data/lib/api-sdk-rb/models/workflow_version_list.rb +224 -0
- data/lib/api-sdk-rb/models/workflow_version_published_by.rb +225 -0
- data/lib/api-sdk-rb/version.rb +1 -1
- data/lib/api-sdk-rb.rb +116 -17
- data/spec/api/brand_kit_api_spec.rb +136 -0
- data/spec/api/canvases_api_spec.rb +10 -10
- data/spec/api/compositions_api_spec.rb +227 -149
- 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 +138 -84
- data/spec/api/public_embed_api_spec.rb +66 -15
- 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 +43 -28
- data/spec/api/widgets_api_spec.rb +9 -9
- data/spec/api/workflows_api_spec.rb +339 -0
- data/spec/models/account_credit_transaction_list_response_spec.rb +48 -0
- data/spec/models/adapter_connection_list_response_spec.rb +48 -0
- data/spec/models/{get_managed_user_limits200_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/adapter_connection_spec.rb +18 -0
- data/spec/models/ai_answers_knowledge_document_response_spec.rb +48 -0
- data/spec/models/brand_color_spec.rb +52 -0
- data/spec/models/brand_font_spec.rb +62 -0
- data/spec/models/brand_kit_asset_view_spec.rb +120 -0
- data/spec/models/brand_kit_figma_source_spec.rb +60 -0
- data/spec/models/brand_kit_tokens_fonts_spec.rb +54 -0
- data/spec/models/brand_kit_tokens_spec.rb +60 -0
- data/spec/models/brand_kit_view_owner_spec.rb +46 -0
- data/spec/models/{uploads_get200_response_spec.rb → brand_kit_view_response_spec.rb} +6 -6
- data/spec/models/brand_kit_view_spec.rb +90 -0
- data/spec/models/brand_spacing_spec.rb +78 -0
- data/spec/models/brand_text_style_spec.rb +52 -0
- data/spec/models/composition_database_record_response_spec.rb +48 -0
- data/spec/models/composition_last_edited_by_spec.rb +42 -0
- data/spec/models/composition_spec.rb +12 -0
- data/spec/models/confirm_adapter_connection_request_spec.rb +36 -0
- data/spec/models/content_item_write_result_response_spec.rb +48 -0
- data/spec/models/create_widget201_response_data_spec.rb +1 -7
- data/spec/models/create_workspace_workflow_from_preset_request_spec.rb +42 -0
- data/spec/models/create_workspace_workflow_request_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/delete_workspace_workflow200_response_spec.rb +48 -0
- data/spec/models/design_defaults_response_spec.rb +48 -0
- data/spec/models/editor_session_spec.rb +1 -1
- 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/get_operation_response_spec.rb +48 -0
- data/spec/models/get_public_composition_embed200_response_adapters_captcha_spec.rb +36 -0
- data/spec/models/get_public_composition_embed200_response_adapters_spec.rb +42 -0
- data/spec/models/get_public_composition_embed200_response_entries_spec.rb +42 -0
- data/spec/models/get_public_composition_embed200_response_media_spec.rb +36 -0
- data/spec/models/get_public_composition_embed200_response_spec.rb +18 -0
- data/spec/models/{get_user_adapter_connections200_response_spec.rb → get_workspace_workflow_stats200_response_spec.rb} +6 -6
- data/spec/models/{remove_user_adapter_connection200_response_spec.rb → get_workspace_workflow_version200_response_spec.rb} +6 -6
- data/spec/models/list_partner_workflow_presets200_response_spec.rb +48 -0
- data/spec/models/list_uploads200_response_spec.rb +48 -0
- data/spec/models/{create_composition_database_record201_response_spec.rb → list_workspace_workflow_composition_options200_response_spec.rb} +6 -6
- data/spec/models/{get_partner_credit_transactions200_response_spec.rb → list_workspace_workflow_presets200_response_spec.rb} +6 -6
- data/spec/models/{add_ai_answers_knowledge_document201_response_spec.rb → list_workspace_workflow_versions200_response_spec.rb} +6 -6
- data/spec/models/list_workspace_workflows200_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/new_editor_session_spec.rb +1 -1
- data/spec/models/offer_workflow_preset_request_spec.rb +54 -0
- data/spec/models/offered_workflow_preset_list_spec.rb +36 -0
- data/spec/models/offered_workflow_preset_spec.rb +106 -0
- data/spec/models/offered_workflow_preset_widget_spec.rb +48 -0
- data/spec/models/patch_brand_kit_asset_request_spec.rb +62 -0
- data/spec/models/patch_brand_kit_request_fonts_spec.rb +54 -0
- data/spec/models/patch_brand_kit_request_spacing_spec.rb +78 -0
- data/spec/models/patch_brand_kit_request_spec.rb +72 -0
- data/spec/models/post_brand_kit_icon_request_spec.rb +42 -0
- data/spec/models/public_workflow_events_accepted_spec.rb +48 -0
- data/spec/models/public_workflow_events_request_events_inner_spec.rb +62 -0
- data/spec/models/public_workflow_events_request_heights_inner_spec.rb +42 -0
- data/spec/models/public_workflow_events_request_spec.rb +54 -0
- data/spec/models/public_workflow_response_spec.rb +48 -0
- data/spec/models/public_workflow_spec.rb +94 -0
- data/spec/models/public_workflow_translation_spec.rb +42 -0
- data/spec/models/{get_partner_design_defaults200_response_spec.rb → publish_workspace_workflow200_response_spec.rb} +6 -6
- data/spec/models/publish_workspace_workflow_request_spec.rb +36 -0
- data/spec/models/put_brand_kit_request_spec.rb +48 -0
- data/spec/models/{create_composition_from_widget201_response_spec.rb → remove_partner_workflow_preset200_response_spec.rb} +6 -6
- data/spec/models/report_public_workflow_events200_response_spec.rb +48 -0
- data/spec/models/save_workspace_workflow_request_spec.rb +54 -0
- data/spec/models/{set_user_adapter_connection200_response_spec.rb → set_partner_workflow_preset200_response_spec.rb} +6 -6
- 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/widget_plan_spec.rb +60 -0
- data/spec/models/widget_plan_task_spec.rb +62 -0
- data/spec/models/widget_spec.rb +1 -7
- data/spec/models/workflow_composition_action_spec.rb +54 -0
- data/spec/models/workflow_composition_field_spec.rb +58 -0
- data/spec/models/workflow_composition_option_actions_spec.rb +52 -0
- data/spec/models/workflow_composition_option_inputs_spec.rb +58 -0
- data/spec/models/workflow_composition_option_spec.rb +72 -0
- data/spec/models/workflow_composition_options_spec.rb +54 -0
- data/spec/models/workflow_condition_case_spec.rb +58 -0
- data/spec/models/workflow_condition_test_spec.rb +52 -0
- data/spec/models/workflow_counter_spec.rb +42 -0
- data/spec/models/workflow_detail_all_of_last_edited_by_spec.rb +42 -0
- data/spec/models/workflow_detail_response_spec.rb +48 -0
- data/spec/models/workflow_detail_spec.rb +162 -0
- data/spec/models/workflow_edge_spec.rb +54 -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_field_reference_spec.rb +56 -0
- data/spec/models/workflow_graph_spec.rb +52 -0
- data/spec/models/workflow_issue_spec.rb +70 -0
- data/spec/models/{create_composition_content_item201_response_spec.rb → workflow_list_spec.rb} +15 -9
- data/spec/models/workflow_node_position_spec.rb +42 -0
- data/spec/models/workflow_node_spec.rb +76 -0
- data/spec/models/workflow_preset_choice_spec.rb +60 -0
- data/spec/models/workflow_preset_choices_spec.rb +36 -0
- data/spec/models/workflow_preset_removal_spec.rb +36 -0
- data/spec/models/workflow_preset_widget_spec.rb +42 -0
- data/spec/models/workflow_publish_result_spec.rb +48 -0
- data/spec/models/workflow_removed_spec.rb +36 -0
- data/spec/models/workflow_response_spec.rb +48 -0
- data/spec/models/workflow_schedule_spec.rb +62 -0
- data/spec/models/workflow_spec.rb +132 -0
- data/spec/models/workflow_stats_spec.rb +84 -0
- data/spec/models/workflow_status_spec.rb +30 -0
- data/spec/models/workflow_trigger_spec.rb +70 -0
- data/spec/models/workflow_trigger_values_inner_spec.rb +46 -0
- data/spec/models/workflow_version_detail_spec.rb +78 -0
- data/spec/models/workflow_version_list_spec.rb +36 -0
- data/spec/models/workflow_version_published_by_spec.rb +42 -0
- data/spec/models/workflow_version_spec.rb +66 -0
- metadata +476 -80
- data/docs/PartnerApi.md +0 -9892
- data/docs/UploadsIdDelete200Response.md +0 -22
- data/lib/api-sdk-rb/api/partner_api.rb +0 -10693
- data/spec/api/partner_api_spec.rb +0 -1895
|
@@ -20,63 +20,63 @@ module ApiSdkRb
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Call a gateway operation of an adapter a published widget uses
|
|
23
|
-
# The door a widget's adapter module calls, from the visitor's browser, for the operations that cannot run in the browser: anything with a secret, a charge in credits or the owner's storage behind it. A widget that uses such an adapter is handed the address of this route as `adapters.url` in its `widgetic:host` message (see the host bridge contract) and calls `{adapters.url}/{adapterId}/{operation}`. It is not meant to be called by hand, and it takes no API key. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/adapters/{adapterId}/{operation}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **What it serves.** Only an adapter, and a version of it, that the widget's LIVE manifest (what the version that is published uses) lists, and only an operation that runs on the gateway. Anything else is one 404 `ADAPTER_NOT_AVAILABLE`, whatever the reason, so the route is no way to ask what a widget contains. An adapter an administrator stopped offering to NEW widgets keeps serving the widgets that already use it. **Who may call.** The same rule as the entry route: a permitted `Origin` header, which is the artifact origin the widget runs from or
|
|
23
|
+
# The door a widget's adapter module calls, from the visitor's browser, for the operations that cannot run in the browser: anything with a secret, a charge in credits or the owner's storage behind it. A widget that uses such an adapter is handed the address of this route as `adapters.url` in its `widgetic:host` message (see the host bridge contract) and calls `{adapters.url}/{adapterId}/{operation}`. It is not meant to be called by hand, and it takes no API key. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/adapters/{adapterId}/{operation}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **What it serves.** Only an adapter, and a version of it, that the widget's LIVE manifest (what the version that is published uses) lists, and only an operation that runs on the gateway. Anything else is one 404 `ADAPTER_NOT_AVAILABLE`, whatever the reason, so the route is no way to ask what a widget contains. An adapter an administrator stopped offering to NEW widgets keeps serving the widgets that already use it. **Who may call.** The same rule as the entry route: a permitted `Origin` header, which is the artifact origin the widget runs from or any website when the owner has not restricted the allowed websites (when the owner has, one of the websites the owner listed, Widgetic's own sites, the visitor's own machine or the owner's own platform). Page script cannot forge it. A request without a permitted `Origin` is 403 `ORIGIN_NOT_ALLOWED`. A composition that is not served (unpublished, or its owner's plan does not serve it) is 404, with the codes of the other public embed routes. When the partner of the owner signs the host context, a context that is not signed as the partner requires is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`, `CONTEXT_SIGNATURE_INVALID` or `CONTEXT_SIGNATURE_EXPIRED`. **Cost and retries.** An operation priced in credits is charged to the owner of the widget (for a customer a partner manages, to the partner's administrator, within the monthly credits set for that customer), once for each `requestId`, before it runs, and given back if it does not answer. A `requestId` that was charged and not given back is 409 `REQUEST_ALREADY_USED` and the operation is NOT run a second time; one whose charge was given back may be tried again with the same `requestId`. A visitor never sees an owner's balance: a feature that cannot be used because its owner has no credits left, because the customer's monthly credits are spent, or because an administrator stopped the adapter, is the same 503 `ADAPTER_UNAVAILABLE` as every other \"not right now\". The owner is told through a notice. **Limits.** In front of everything, 120 calls a minute for each visitor address and composition and 600 a minute for a composition (429 `RATE_LIMITED`). Then, for each operation of a widget, a rate for each visitor address a minute and a cap for the widget a day: 30 and 5000 for an operation that is free, 10 and 500 for one that costs credits, unless the adapter says otherwise (never above 120 and 100000). A visitor over the rate is 429 `RATE_LIMITED`; a widget over its cap is 429 `WIDGET_LIMIT_REACHED`. Both carry a `Retry-After` header. The body is at most 64 KiB (413 `PAYLOAD_TOO_LARGE`) and JSON (415 `UNSUPPORTED_MEDIA_TYPE`); an operation has 30 seconds to answer (504 `ADAPTER_TIMEOUT`, and the charge is given back).
|
|
24
24
|
# @param composition_id [String]
|
|
25
25
|
# @param adapter_id [String] The id of the adapter, the name its module is known by, for example `upload`.
|
|
26
26
|
# @param operation [String] The name of one operation of the adapter, as its documentation gives it.
|
|
27
27
|
# @param public_adapter_call_request [PublicAdapterCallRequest]
|
|
28
28
|
# @param [Hash] opts the optional parameters
|
|
29
29
|
# @return [PublicAdapterCallResult]
|
|
30
|
-
def
|
|
31
|
-
data, _status_code, _headers =
|
|
30
|
+
def call_public_composition_adapter(composition_id, adapter_id, operation, public_adapter_call_request, opts = {})
|
|
31
|
+
data, _status_code, _headers = call_public_composition_adapter_with_http_info(composition_id, adapter_id, operation, public_adapter_call_request, opts)
|
|
32
32
|
data
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
# Call a gateway operation of an adapter a published widget uses
|
|
36
|
-
# The door a widget's adapter module calls, from the visitor's browser, for the operations that cannot run in the browser: anything with a secret, a charge in credits or the owner's storage behind it. A widget that uses such an adapter is handed the address of this route as `adapters.url` in its `widgetic:host` message (see the host bridge contract) and calls `{adapters.url}/{adapterId}/{operation}`. It is not meant to be called by hand, and it takes no API key. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/adapters/{adapterId}/{operation}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **What it serves.** Only an adapter, and a version of it, that the widget's LIVE manifest (what the version that is published uses) lists, and only an operation that runs on the gateway. Anything else is one 404 `ADAPTER_NOT_AVAILABLE`, whatever the reason, so the route is no way to ask what a widget contains. An adapter an administrator stopped offering to NEW widgets keeps serving the widgets that already use it. **Who may call.** The same rule as the entry route: a permitted `Origin` header, which is the artifact origin the widget runs from or
|
|
36
|
+
# The door a widget's adapter module calls, from the visitor's browser, for the operations that cannot run in the browser: anything with a secret, a charge in credits or the owner's storage behind it. A widget that uses such an adapter is handed the address of this route as `adapters.url` in its `widgetic:host` message (see the host bridge contract) and calls `{adapters.url}/{adapterId}/{operation}`. It is not meant to be called by hand, and it takes no API key. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/adapters/{adapterId}/{operation}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **What it serves.** Only an adapter, and a version of it, that the widget's LIVE manifest (what the version that is published uses) lists, and only an operation that runs on the gateway. Anything else is one 404 `ADAPTER_NOT_AVAILABLE`, whatever the reason, so the route is no way to ask what a widget contains. An adapter an administrator stopped offering to NEW widgets keeps serving the widgets that already use it. **Who may call.** The same rule as the entry route: a permitted `Origin` header, which is the artifact origin the widget runs from or any website when the owner has not restricted the allowed websites (when the owner has, one of the websites the owner listed, Widgetic's own sites, the visitor's own machine or the owner's own platform). Page script cannot forge it. A request without a permitted `Origin` is 403 `ORIGIN_NOT_ALLOWED`. A composition that is not served (unpublished, or its owner's plan does not serve it) is 404, with the codes of the other public embed routes. When the partner of the owner signs the host context, a context that is not signed as the partner requires is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`, `CONTEXT_SIGNATURE_INVALID` or `CONTEXT_SIGNATURE_EXPIRED`. **Cost and retries.** An operation priced in credits is charged to the owner of the widget (for a customer a partner manages, to the partner's administrator, within the monthly credits set for that customer), once for each `requestId`, before it runs, and given back if it does not answer. A `requestId` that was charged and not given back is 409 `REQUEST_ALREADY_USED` and the operation is NOT run a second time; one whose charge was given back may be tried again with the same `requestId`. A visitor never sees an owner's balance: a feature that cannot be used because its owner has no credits left, because the customer's monthly credits are spent, or because an administrator stopped the adapter, is the same 503 `ADAPTER_UNAVAILABLE` as every other \"not right now\". The owner is told through a notice. **Limits.** In front of everything, 120 calls a minute for each visitor address and composition and 600 a minute for a composition (429 `RATE_LIMITED`). Then, for each operation of a widget, a rate for each visitor address a minute and a cap for the widget a day: 30 and 5000 for an operation that is free, 10 and 500 for one that costs credits, unless the adapter says otherwise (never above 120 and 100000). A visitor over the rate is 429 `RATE_LIMITED`; a widget over its cap is 429 `WIDGET_LIMIT_REACHED`. Both carry a `Retry-After` header. The body is at most 64 KiB (413 `PAYLOAD_TOO_LARGE`) and JSON (415 `UNSUPPORTED_MEDIA_TYPE`); an operation has 30 seconds to answer (504 `ADAPTER_TIMEOUT`, and the charge is given back).
|
|
37
37
|
# @param composition_id [String]
|
|
38
38
|
# @param adapter_id [String] The id of the adapter, the name its module is known by, for example `upload`.
|
|
39
39
|
# @param operation [String] The name of one operation of the adapter, as its documentation gives it.
|
|
40
40
|
# @param public_adapter_call_request [PublicAdapterCallRequest]
|
|
41
41
|
# @param [Hash] opts the optional parameters
|
|
42
42
|
# @return [Array<(PublicAdapterCallResult, Integer, Hash)>] PublicAdapterCallResult data, response status code and response headers
|
|
43
|
-
def
|
|
43
|
+
def call_public_composition_adapter_with_http_info(composition_id, adapter_id, operation, public_adapter_call_request, opts = {})
|
|
44
44
|
if @api_client.config.debugging
|
|
45
|
-
@api_client.config.logger.debug 'Calling API: PublicEmbedApi.
|
|
45
|
+
@api_client.config.logger.debug 'Calling API: PublicEmbedApi.call_public_composition_adapter ...'
|
|
46
46
|
end
|
|
47
47
|
# verify the required parameter 'composition_id' is set
|
|
48
48
|
if @api_client.config.client_side_validation && composition_id.nil?
|
|
49
|
-
fail ArgumentError, "Missing the required parameter 'composition_id' when calling PublicEmbedApi.
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'composition_id' when calling PublicEmbedApi.call_public_composition_adapter"
|
|
50
50
|
end
|
|
51
51
|
# verify the required parameter 'adapter_id' is set
|
|
52
52
|
if @api_client.config.client_side_validation && adapter_id.nil?
|
|
53
|
-
fail ArgumentError, "Missing the required parameter 'adapter_id' when calling PublicEmbedApi.
|
|
53
|
+
fail ArgumentError, "Missing the required parameter 'adapter_id' when calling PublicEmbedApi.call_public_composition_adapter"
|
|
54
54
|
end
|
|
55
55
|
if @api_client.config.client_side_validation && adapter_id.to_s.length > 40
|
|
56
|
-
fail ArgumentError, 'invalid value for "adapter_id" when calling PublicEmbedApi.
|
|
56
|
+
fail ArgumentError, 'invalid value for "adapter_id" when calling PublicEmbedApi.call_public_composition_adapter, the character length must be smaller than or equal to 40.'
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
pattern = Regexp.new(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/)
|
|
60
60
|
if @api_client.config.client_side_validation && adapter_id !~ pattern
|
|
61
|
-
fail ArgumentError, "invalid value for 'adapter_id' when calling PublicEmbedApi.
|
|
61
|
+
fail ArgumentError, "invalid value for 'adapter_id' when calling PublicEmbedApi.call_public_composition_adapter, must conform to the pattern #{pattern}."
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
# verify the required parameter 'operation' is set
|
|
65
65
|
if @api_client.config.client_side_validation && operation.nil?
|
|
66
|
-
fail ArgumentError, "Missing the required parameter 'operation' when calling PublicEmbedApi.
|
|
66
|
+
fail ArgumentError, "Missing the required parameter 'operation' when calling PublicEmbedApi.call_public_composition_adapter"
|
|
67
67
|
end
|
|
68
68
|
if @api_client.config.client_side_validation && operation.to_s.length > 40
|
|
69
|
-
fail ArgumentError, 'invalid value for "operation" when calling PublicEmbedApi.
|
|
69
|
+
fail ArgumentError, 'invalid value for "operation" when calling PublicEmbedApi.call_public_composition_adapter, the character length must be smaller than or equal to 40.'
|
|
70
70
|
end
|
|
71
71
|
|
|
72
72
|
pattern = Regexp.new(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/)
|
|
73
73
|
if @api_client.config.client_side_validation && operation !~ pattern
|
|
74
|
-
fail ArgumentError, "invalid value for 'operation' when calling PublicEmbedApi.
|
|
74
|
+
fail ArgumentError, "invalid value for 'operation' when calling PublicEmbedApi.call_public_composition_adapter, must conform to the pattern #{pattern}."
|
|
75
75
|
end
|
|
76
76
|
|
|
77
77
|
# verify the required parameter 'public_adapter_call_request' is set
|
|
78
78
|
if @api_client.config.client_side_validation && public_adapter_call_request.nil?
|
|
79
|
-
fail ArgumentError, "Missing the required parameter 'public_adapter_call_request' when calling PublicEmbedApi.
|
|
79
|
+
fail ArgumentError, "Missing the required parameter 'public_adapter_call_request' when calling PublicEmbedApi.call_public_composition_adapter"
|
|
80
80
|
end
|
|
81
81
|
# resource path
|
|
82
82
|
local_var_path = '/embed/compositions/{compositionId}/adapters/{adapterId}/{operation}'.sub('{' + 'compositionId' + '}', CGI.escape(composition_id.to_s)).sub('{' + 'adapterId' + '}', CGI.escape(adapter_id.to_s)).sub('{' + 'operation' + '}', CGI.escape(operation.to_s))
|
|
@@ -107,7 +107,7 @@ module ApiSdkRb
|
|
|
107
107
|
auth_names = opts[:debug_auth_names] || []
|
|
108
108
|
|
|
109
109
|
new_options = opts.merge(
|
|
110
|
-
:operation => :"PublicEmbedApi.
|
|
110
|
+
:operation => :"PublicEmbedApi.call_public_composition_adapter",
|
|
111
111
|
:header_params => header_params,
|
|
112
112
|
:query_params => query_params,
|
|
113
113
|
:form_params => form_params,
|
|
@@ -118,48 +118,55 @@ module ApiSdkRb
|
|
|
118
118
|
|
|
119
119
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
120
120
|
if @api_client.config.debugging
|
|
121
|
-
@api_client.config.logger.debug "API called: PublicEmbedApi#
|
|
121
|
+
@api_client.config.logger.debug "API called: PublicEmbedApi#call_public_composition_adapter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
122
122
|
end
|
|
123
123
|
return data, status_code, headers
|
|
124
124
|
end
|
|
125
125
|
|
|
126
126
|
# Append a visitor entry through the gateway
|
|
127
|
-
# Public append-only write into a published composition database. No API key. The browser must send a permitted `Origin` header
|
|
127
|
+
# Public append-only write into a published composition database. No API key. The browser must send a permitted `Origin` header: the artifact iframe origin, or any website when the owner has not restricted the allowed websites (when the owner has, one of the websites the owner listed, Widgetic's own sites, the visitor's own machine or the owner's own platform). When the request comes from the shared artifact origin, it must also carry the per-composition write token (`X-Widgetic-Write-Token` header or `writeToken` body field, handed to the widget in `widgetic:host` as `entries.writeToken` and returned as `entryWriteToken` on `getPublicCompositionEmbed`). Host `context` is stored for partner attribution; it is not authenticated unless the partner signs it (see **Signed context**). Request bodies are limited to 16 KB before parsing. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/entries/{table}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **Signed context.** A partner that wants to trust `context` (to bill a customer by it, say) makes a signing secret (`rotatePartnerEntryContextSecret`), and its server signs the context it hands to the embed. The signature travels inside `context` as two reserved keys, `widgetic_exp` (UTC seconds, at most seven days ahead) and `widgetic_sig`. The gateway checks them after the `Origin` and before anything else is judged, stored or announced, and keeps and announces the context WITHOUT them. A context that is not signed as the partner requires is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`, `CONTEXT_SIGNATURE_INVALID` or `CONTEXT_SIGNATURE_EXPIRED`; when the check cannot be made just now the answer is a retryable 503 `CONTEXT_SIGNATURE_UNAVAILABLE`, never an unchecked entry. Until a partner makes a secret nothing changes: the two keys are dropped and the rest is taken as it came. A signature is good until its `widgetic_exp` and may be used again until then, so a partner that must count each submission once keeps a unique value of its own (a `submissionId`, say) in the context. The recipe and a test vector are in the description of `rotatePartnerEntryContextSecret`.
|
|
128
128
|
# @param composition_id [String]
|
|
129
129
|
# @param table [String]
|
|
130
130
|
# @param public_composition_entry_request [PublicCompositionEntryRequest]
|
|
131
131
|
# @param [Hash] opts the optional parameters
|
|
132
132
|
# @option opts [String] :x_widgetic_write_token Signed per-composition write token handed to the widget in `widgetic:host` as `entries.writeToken` (and returned by `GET /embed/compositions/{compositionId}` as `entryWriteToken`). Required when the request comes from the shared Widgetic artifact origin; verified whenever present.
|
|
133
|
+
# @option opts [String] :x_widgetic_visitor_id A random id the widget's browser makes once and keeps (16 to 64 characters of `A-Za-z0-9_-`), sent so a table's per-visitor `limit` (declared in the widget database file) can count this browser. Not an identity and not a secret. Without it, or with a malformed value, the limit counts only by network address.
|
|
133
134
|
# @return [PublicCompositionEntryCreated]
|
|
134
|
-
def
|
|
135
|
-
data, _status_code, _headers =
|
|
135
|
+
def create_public_composition_entry(composition_id, table, public_composition_entry_request, opts = {})
|
|
136
|
+
data, _status_code, _headers = create_public_composition_entry_with_http_info(composition_id, table, public_composition_entry_request, opts)
|
|
136
137
|
data
|
|
137
138
|
end
|
|
138
139
|
|
|
139
140
|
# Append a visitor entry through the gateway
|
|
140
|
-
# Public append-only write into a published composition database. No API key. The browser must send a permitted `Origin` header
|
|
141
|
+
# Public append-only write into a published composition database. No API key. The browser must send a permitted `Origin` header: the artifact iframe origin, or any website when the owner has not restricted the allowed websites (when the owner has, one of the websites the owner listed, Widgetic's own sites, the visitor's own machine or the owner's own platform). When the request comes from the shared artifact origin, it must also carry the per-composition write token (`X-Widgetic-Write-Token` header or `writeToken` body field, handed to the widget in `widgetic:host` as `entries.writeToken` and returned as `entryWriteToken` on `getPublicCompositionEmbed`). Host `context` is stored for partner attribution; it is not authenticated unless the partner signs it (see **Signed context**). Request bodies are limited to 16 KB before parsing. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/entries/{table}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **Signed context.** A partner that wants to trust `context` (to bill a customer by it, say) makes a signing secret (`rotatePartnerEntryContextSecret`), and its server signs the context it hands to the embed. The signature travels inside `context` as two reserved keys, `widgetic_exp` (UTC seconds, at most seven days ahead) and `widgetic_sig`. The gateway checks them after the `Origin` and before anything else is judged, stored or announced, and keeps and announces the context WITHOUT them. A context that is not signed as the partner requires is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`, `CONTEXT_SIGNATURE_INVALID` or `CONTEXT_SIGNATURE_EXPIRED`; when the check cannot be made just now the answer is a retryable 503 `CONTEXT_SIGNATURE_UNAVAILABLE`, never an unchecked entry. Until a partner makes a secret nothing changes: the two keys are dropped and the rest is taken as it came. A signature is good until its `widgetic_exp` and may be used again until then, so a partner that must count each submission once keeps a unique value of its own (a `submissionId`, say) in the context. The recipe and a test vector are in the description of `rotatePartnerEntryContextSecret`.
|
|
141
142
|
# @param composition_id [String]
|
|
142
143
|
# @param table [String]
|
|
143
144
|
# @param public_composition_entry_request [PublicCompositionEntryRequest]
|
|
144
145
|
# @param [Hash] opts the optional parameters
|
|
145
146
|
# @option opts [String] :x_widgetic_write_token Signed per-composition write token handed to the widget in `widgetic:host` as `entries.writeToken` (and returned by `GET /embed/compositions/{compositionId}` as `entryWriteToken`). Required when the request comes from the shared Widgetic artifact origin; verified whenever present.
|
|
147
|
+
# @option opts [String] :x_widgetic_visitor_id A random id the widget's browser makes once and keeps (16 to 64 characters of `A-Za-z0-9_-`), sent so a table's per-visitor `limit` (declared in the widget database file) can count this browser. Not an identity and not a secret. Without it, or with a malformed value, the limit counts only by network address.
|
|
146
148
|
# @return [Array<(PublicCompositionEntryCreated, Integer, Hash)>] PublicCompositionEntryCreated data, response status code and response headers
|
|
147
|
-
def
|
|
149
|
+
def create_public_composition_entry_with_http_info(composition_id, table, public_composition_entry_request, opts = {})
|
|
148
150
|
if @api_client.config.debugging
|
|
149
|
-
@api_client.config.logger.debug 'Calling API: PublicEmbedApi.
|
|
151
|
+
@api_client.config.logger.debug 'Calling API: PublicEmbedApi.create_public_composition_entry ...'
|
|
150
152
|
end
|
|
151
153
|
# verify the required parameter 'composition_id' is set
|
|
152
154
|
if @api_client.config.client_side_validation && composition_id.nil?
|
|
153
|
-
fail ArgumentError, "Missing the required parameter 'composition_id' when calling PublicEmbedApi.
|
|
155
|
+
fail ArgumentError, "Missing the required parameter 'composition_id' when calling PublicEmbedApi.create_public_composition_entry"
|
|
154
156
|
end
|
|
155
157
|
# verify the required parameter 'table' is set
|
|
156
158
|
if @api_client.config.client_side_validation && table.nil?
|
|
157
|
-
fail ArgumentError, "Missing the required parameter 'table' when calling PublicEmbedApi.
|
|
159
|
+
fail ArgumentError, "Missing the required parameter 'table' when calling PublicEmbedApi.create_public_composition_entry"
|
|
158
160
|
end
|
|
159
161
|
# verify the required parameter 'public_composition_entry_request' is set
|
|
160
162
|
if @api_client.config.client_side_validation && public_composition_entry_request.nil?
|
|
161
|
-
fail ArgumentError, "Missing the required parameter 'public_composition_entry_request' when calling PublicEmbedApi.
|
|
163
|
+
fail ArgumentError, "Missing the required parameter 'public_composition_entry_request' when calling PublicEmbedApi.create_public_composition_entry"
|
|
162
164
|
end
|
|
165
|
+
pattern = Regexp.new(/^[A-Za-z0-9_-]{16,64}$/)
|
|
166
|
+
if @api_client.config.client_side_validation && !opts[:'x_widgetic_visitor_id'].nil? && opts[:'x_widgetic_visitor_id'] !~ pattern
|
|
167
|
+
fail ArgumentError, "invalid value for 'opts[:\"x_widgetic_visitor_id\"]' when calling PublicEmbedApi.create_public_composition_entry, must conform to the pattern #{pattern}."
|
|
168
|
+
end
|
|
169
|
+
|
|
163
170
|
# resource path
|
|
164
171
|
local_var_path = '/embed/compositions/{compositionId}/entries/{table}'.sub('{' + 'compositionId' + '}', CGI.escape(composition_id.to_s)).sub('{' + 'table' + '}', CGI.escape(table.to_s))
|
|
165
172
|
|
|
@@ -176,6 +183,7 @@ module ApiSdkRb
|
|
|
176
183
|
header_params['Content-Type'] = content_type
|
|
177
184
|
end
|
|
178
185
|
header_params[:'X-Widgetic-Write-Token'] = opts[:'x_widgetic_write_token'] if !opts[:'x_widgetic_write_token'].nil?
|
|
186
|
+
header_params[:'X-Widgetic-Visitor-Id'] = opts[:'x_widgetic_visitor_id'] if !opts[:'x_widgetic_visitor_id'].nil?
|
|
179
187
|
|
|
180
188
|
# form parameters
|
|
181
189
|
form_params = opts[:form_params] || {}
|
|
@@ -190,7 +198,7 @@ module ApiSdkRb
|
|
|
190
198
|
auth_names = opts[:debug_auth_names] || []
|
|
191
199
|
|
|
192
200
|
new_options = opts.merge(
|
|
193
|
-
:operation => :"PublicEmbedApi.
|
|
201
|
+
:operation => :"PublicEmbedApi.create_public_composition_entry",
|
|
194
202
|
:header_params => header_params,
|
|
195
203
|
:query_params => query_params,
|
|
196
204
|
:form_params => form_params,
|
|
@@ -201,7 +209,7 @@ module ApiSdkRb
|
|
|
201
209
|
|
|
202
210
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
203
211
|
if @api_client.config.debugging
|
|
204
|
-
@api_client.config.logger.debug "API called: PublicEmbedApi#
|
|
212
|
+
@api_client.config.logger.debug "API called: PublicEmbedApi#create_public_composition_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
205
213
|
end
|
|
206
214
|
return data, status_code, headers
|
|
207
215
|
end
|
|
@@ -211,8 +219,8 @@ module ApiSdkRb
|
|
|
211
219
|
# @param composition_id [String]
|
|
212
220
|
# @param [Hash] opts the optional parameters
|
|
213
221
|
# @return [GetPublicCompositionEmbed200Response]
|
|
214
|
-
def
|
|
215
|
-
data, _status_code, _headers =
|
|
222
|
+
def get_public_composition_embed(composition_id, opts = {})
|
|
223
|
+
data, _status_code, _headers = get_public_composition_embed_with_http_info(composition_id, opts)
|
|
216
224
|
data
|
|
217
225
|
end
|
|
218
226
|
|
|
@@ -221,13 +229,13 @@ module ApiSdkRb
|
|
|
221
229
|
# @param composition_id [String]
|
|
222
230
|
# @param [Hash] opts the optional parameters
|
|
223
231
|
# @return [Array<(GetPublicCompositionEmbed200Response, Integer, Hash)>] GetPublicCompositionEmbed200Response data, response status code and response headers
|
|
224
|
-
def
|
|
232
|
+
def get_public_composition_embed_with_http_info(composition_id, opts = {})
|
|
225
233
|
if @api_client.config.debugging
|
|
226
|
-
@api_client.config.logger.debug 'Calling API: PublicEmbedApi.
|
|
234
|
+
@api_client.config.logger.debug 'Calling API: PublicEmbedApi.get_public_composition_embed ...'
|
|
227
235
|
end
|
|
228
236
|
# verify the required parameter 'composition_id' is set
|
|
229
237
|
if @api_client.config.client_side_validation && composition_id.nil?
|
|
230
|
-
fail ArgumentError, "Missing the required parameter 'composition_id' when calling PublicEmbedApi.
|
|
238
|
+
fail ArgumentError, "Missing the required parameter 'composition_id' when calling PublicEmbedApi.get_public_composition_embed"
|
|
231
239
|
end
|
|
232
240
|
# resource path
|
|
233
241
|
local_var_path = '/embed/compositions/{compositionId}'.sub('{' + 'compositionId' + '}', CGI.escape(composition_id.to_s))
|
|
@@ -253,7 +261,7 @@ module ApiSdkRb
|
|
|
253
261
|
auth_names = opts[:debug_auth_names] || []
|
|
254
262
|
|
|
255
263
|
new_options = opts.merge(
|
|
256
|
-
:operation => :"PublicEmbedApi.
|
|
264
|
+
:operation => :"PublicEmbedApi.get_public_composition_embed",
|
|
257
265
|
:header_params => header_params,
|
|
258
266
|
:query_params => query_params,
|
|
259
267
|
:form_params => form_params,
|
|
@@ -264,7 +272,7 @@ module ApiSdkRb
|
|
|
264
272
|
|
|
265
273
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
266
274
|
if @api_client.config.debugging
|
|
267
|
-
@api_client.config.logger.debug "API called: PublicEmbedApi#
|
|
275
|
+
@api_client.config.logger.debug "API called: PublicEmbedApi#get_public_composition_embed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
268
276
|
end
|
|
269
277
|
return data, status_code, headers
|
|
270
278
|
end
|
|
@@ -274,8 +282,8 @@ module ApiSdkRb
|
|
|
274
282
|
# @param composition_id [String]
|
|
275
283
|
# @param [Hash] opts the optional parameters
|
|
276
284
|
# @return [String]
|
|
277
|
-
def
|
|
278
|
-
data, _status_code, _headers =
|
|
285
|
+
def get_public_composition_iframe(composition_id, opts = {})
|
|
286
|
+
data, _status_code, _headers = get_public_composition_iframe_with_http_info(composition_id, opts)
|
|
279
287
|
data
|
|
280
288
|
end
|
|
281
289
|
|
|
@@ -284,13 +292,13 @@ module ApiSdkRb
|
|
|
284
292
|
# @param composition_id [String]
|
|
285
293
|
# @param [Hash] opts the optional parameters
|
|
286
294
|
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
|
287
|
-
def
|
|
295
|
+
def get_public_composition_iframe_with_http_info(composition_id, opts = {})
|
|
288
296
|
if @api_client.config.debugging
|
|
289
|
-
@api_client.config.logger.debug 'Calling API: PublicEmbedApi.
|
|
297
|
+
@api_client.config.logger.debug 'Calling API: PublicEmbedApi.get_public_composition_iframe ...'
|
|
290
298
|
end
|
|
291
299
|
# verify the required parameter 'composition_id' is set
|
|
292
300
|
if @api_client.config.client_side_validation && composition_id.nil?
|
|
293
|
-
fail ArgumentError, "Missing the required parameter 'composition_id' when calling PublicEmbedApi.
|
|
301
|
+
fail ArgumentError, "Missing the required parameter 'composition_id' when calling PublicEmbedApi.get_public_composition_iframe"
|
|
294
302
|
end
|
|
295
303
|
# resource path
|
|
296
304
|
local_var_path = '/embed/compositions/{compositionId}/frame'.sub('{' + 'compositionId' + '}', CGI.escape(composition_id.to_s))
|
|
@@ -316,7 +324,133 @@ module ApiSdkRb
|
|
|
316
324
|
auth_names = opts[:debug_auth_names] || []
|
|
317
325
|
|
|
318
326
|
new_options = opts.merge(
|
|
319
|
-
:operation => :"PublicEmbedApi.
|
|
327
|
+
:operation => :"PublicEmbedApi.get_public_composition_iframe",
|
|
328
|
+
:header_params => header_params,
|
|
329
|
+
:query_params => query_params,
|
|
330
|
+
:form_params => form_params,
|
|
331
|
+
:body => post_body,
|
|
332
|
+
:auth_names => auth_names,
|
|
333
|
+
:return_type => return_type
|
|
334
|
+
)
|
|
335
|
+
|
|
336
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
337
|
+
if @api_client.config.debugging
|
|
338
|
+
@api_client.config.logger.debug "API called: PublicEmbedApi#get_public_composition_iframe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
339
|
+
end
|
|
340
|
+
return data, status_code, headers
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
# Read the published Workflow of an embed
|
|
344
|
+
# Public read of a workflow for the embed that carries `workflow-id`. No API key. The answer is the live version (its graph, the composition a new visitor starts on, the time zone, the languages its compositions can be shown in, and the token that lets the browser report counts), or `status: paused` with nothing else, in which case the embed shows only its first composition. A workflow that is a draft, archived or unknown answers 404, and the embed then behaves as a plain embed of its `composition-id`. So does a workflow whose owner is not being served (a plan that lapsed, a partner whose agreement is not in force): the answer is the one the compositions of that owner give. **Address.** `https://api.widgetic.com/embed/workflows/{workflowId}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. The answer may be reused for a few seconds (`Cache-Control: public, max-age=15`), so a publish or a pause reaches visitors within moments. The graph is readable by anyone who has the workflow's id: its rules run in the visitor's browser, so a rule must never hold a secret.
|
|
345
|
+
# @param workflow_id [String]
|
|
346
|
+
# @param [Hash] opts the optional parameters
|
|
347
|
+
# @return [PublicWorkflowResponse]
|
|
348
|
+
def get_public_workflow(workflow_id, opts = {})
|
|
349
|
+
data, _status_code, _headers = get_public_workflow_with_http_info(workflow_id, opts)
|
|
350
|
+
data
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
# Read the published Workflow of an embed
|
|
354
|
+
# Public read of a workflow for the embed that carries `workflow-id`. No API key. The answer is the live version (its graph, the composition a new visitor starts on, the time zone, the languages its compositions can be shown in, and the token that lets the browser report counts), or `status: paused` with nothing else, in which case the embed shows only its first composition. A workflow that is a draft, archived or unknown answers 404, and the embed then behaves as a plain embed of its `composition-id`. So does a workflow whose owner is not being served (a plan that lapsed, a partner whose agreement is not in force): the answer is the one the compositions of that owner give. **Address.** `https://api.widgetic.com/embed/workflows/{workflowId}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. The answer may be reused for a few seconds (`Cache-Control: public, max-age=15`), so a publish or a pause reaches visitors within moments. The graph is readable by anyone who has the workflow's id: its rules run in the visitor's browser, so a rule must never hold a secret.
|
|
355
|
+
# @param workflow_id [String]
|
|
356
|
+
# @param [Hash] opts the optional parameters
|
|
357
|
+
# @return [Array<(PublicWorkflowResponse, Integer, Hash)>] PublicWorkflowResponse data, response status code and response headers
|
|
358
|
+
def get_public_workflow_with_http_info(workflow_id, opts = {})
|
|
359
|
+
if @api_client.config.debugging
|
|
360
|
+
@api_client.config.logger.debug 'Calling API: PublicEmbedApi.get_public_workflow ...'
|
|
361
|
+
end
|
|
362
|
+
# verify the required parameter 'workflow_id' is set
|
|
363
|
+
if @api_client.config.client_side_validation && workflow_id.nil?
|
|
364
|
+
fail ArgumentError, "Missing the required parameter 'workflow_id' when calling PublicEmbedApi.get_public_workflow"
|
|
365
|
+
end
|
|
366
|
+
# resource path
|
|
367
|
+
local_var_path = '/embed/workflows/{workflowId}'.sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s))
|
|
368
|
+
|
|
369
|
+
# query parameters
|
|
370
|
+
query_params = opts[:query_params] || {}
|
|
371
|
+
|
|
372
|
+
# header parameters
|
|
373
|
+
header_params = opts[:header_params] || {}
|
|
374
|
+
# HTTP header 'Accept' (if needed)
|
|
375
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
376
|
+
|
|
377
|
+
# form parameters
|
|
378
|
+
form_params = opts[:form_params] || {}
|
|
379
|
+
|
|
380
|
+
# http body (model)
|
|
381
|
+
post_body = opts[:debug_body]
|
|
382
|
+
|
|
383
|
+
# return_type
|
|
384
|
+
return_type = opts[:debug_return_type] || 'PublicWorkflowResponse'
|
|
385
|
+
|
|
386
|
+
# auth_names
|
|
387
|
+
auth_names = opts[:debug_auth_names] || []
|
|
388
|
+
|
|
389
|
+
new_options = opts.merge(
|
|
390
|
+
:operation => :"PublicEmbedApi.get_public_workflow",
|
|
391
|
+
:header_params => header_params,
|
|
392
|
+
:query_params => query_params,
|
|
393
|
+
:form_params => form_params,
|
|
394
|
+
:body => post_body,
|
|
395
|
+
:auth_names => auth_names,
|
|
396
|
+
:return_type => return_type
|
|
397
|
+
)
|
|
398
|
+
|
|
399
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
400
|
+
if @api_client.config.debugging
|
|
401
|
+
@api_client.config.logger.debug "API called: PublicEmbedApi#get_public_workflow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
402
|
+
end
|
|
403
|
+
return data, status_code, headers
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
# Show a published Workflow in a page of its own
|
|
407
|
+
# A page that runs a published workflow, for a place that can only be given an address or an iframe: a chat messenger, a link page, a site builder, a blog that follows oEmbed. No API key, no SDK to add. The page holds the Embed SDK and the same tag a website carries (`<widgetic workflow-id composition-id>`), so a visitor moves from one composition to the next in place, by the same rules, exactly as on a website. A paused workflow shows its first composition alone, as its embeds do. **What the frame can count.** Only what happens inside it: entries, a widget's goals and actions, and waits. The page events a website can send to a workflow (`widgetic:workflow-event`) are events of the page around the embed, and they do not cross an iframe, so a connection that waits for one never fires from a frame. A workflow that is a draft, is archived, or does not exist, and one whose owner is not being served, answers 404 with a short page that gives no reason. If the owner of the workflow's first composition listed the websites it may appear on, the page is sent with `Content-Security-Policy: frame-ancestors` naming those websites (and Widgetic's own, and the website where the partner the owner administers integrates Widgetic, with its subdomains), so a browser refuses to show it inside any other website. Opening the address directly still works. An owner who listed nothing is not restricted. The page links its oEmbed card, so a site that follows oEmbed turns the address of the frame into an embed. **Address.** `https://api.widgetic.com/embed/workflows/{workflowId}/frame`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag.
|
|
408
|
+
# @param workflow_id [String]
|
|
409
|
+
# @param [Hash] opts the optional parameters
|
|
410
|
+
# @return [String]
|
|
411
|
+
def get_public_workflow_frame(workflow_id, opts = {})
|
|
412
|
+
data, _status_code, _headers = get_public_workflow_frame_with_http_info(workflow_id, opts)
|
|
413
|
+
data
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
# Show a published Workflow in a page of its own
|
|
417
|
+
# A page that runs a published workflow, for a place that can only be given an address or an iframe: a chat messenger, a link page, a site builder, a blog that follows oEmbed. No API key, no SDK to add. The page holds the Embed SDK and the same tag a website carries (`<widgetic workflow-id composition-id>`), so a visitor moves from one composition to the next in place, by the same rules, exactly as on a website. A paused workflow shows its first composition alone, as its embeds do. **What the frame can count.** Only what happens inside it: entries, a widget's goals and actions, and waits. The page events a website can send to a workflow (`widgetic:workflow-event`) are events of the page around the embed, and they do not cross an iframe, so a connection that waits for one never fires from a frame. A workflow that is a draft, is archived, or does not exist, and one whose owner is not being served, answers 404 with a short page that gives no reason. If the owner of the workflow's first composition listed the websites it may appear on, the page is sent with `Content-Security-Policy: frame-ancestors` naming those websites (and Widgetic's own, and the website where the partner the owner administers integrates Widgetic, with its subdomains), so a browser refuses to show it inside any other website. Opening the address directly still works. An owner who listed nothing is not restricted. The page links its oEmbed card, so a site that follows oEmbed turns the address of the frame into an embed. **Address.** `https://api.widgetic.com/embed/workflows/{workflowId}/frame`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag.
|
|
418
|
+
# @param workflow_id [String]
|
|
419
|
+
# @param [Hash] opts the optional parameters
|
|
420
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
|
421
|
+
def get_public_workflow_frame_with_http_info(workflow_id, opts = {})
|
|
422
|
+
if @api_client.config.debugging
|
|
423
|
+
@api_client.config.logger.debug 'Calling API: PublicEmbedApi.get_public_workflow_frame ...'
|
|
424
|
+
end
|
|
425
|
+
# verify the required parameter 'workflow_id' is set
|
|
426
|
+
if @api_client.config.client_side_validation && workflow_id.nil?
|
|
427
|
+
fail ArgumentError, "Missing the required parameter 'workflow_id' when calling PublicEmbedApi.get_public_workflow_frame"
|
|
428
|
+
end
|
|
429
|
+
# resource path
|
|
430
|
+
local_var_path = '/embed/workflows/{workflowId}/frame'.sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s))
|
|
431
|
+
|
|
432
|
+
# query parameters
|
|
433
|
+
query_params = opts[:query_params] || {}
|
|
434
|
+
|
|
435
|
+
# header parameters
|
|
436
|
+
header_params = opts[:header_params] || {}
|
|
437
|
+
# HTTP header 'Accept' (if needed)
|
|
438
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/html', 'application/json']) unless header_params['Accept']
|
|
439
|
+
|
|
440
|
+
# form parameters
|
|
441
|
+
form_params = opts[:form_params] || {}
|
|
442
|
+
|
|
443
|
+
# http body (model)
|
|
444
|
+
post_body = opts[:debug_body]
|
|
445
|
+
|
|
446
|
+
# return_type
|
|
447
|
+
return_type = opts[:debug_return_type] || 'String'
|
|
448
|
+
|
|
449
|
+
# auth_names
|
|
450
|
+
auth_names = opts[:debug_auth_names] || []
|
|
451
|
+
|
|
452
|
+
new_options = opts.merge(
|
|
453
|
+
:operation => :"PublicEmbedApi.get_public_workflow_frame",
|
|
320
454
|
:header_params => header_params,
|
|
321
455
|
:query_params => query_params,
|
|
322
456
|
:form_params => form_params,
|
|
@@ -327,7 +461,76 @@ module ApiSdkRb
|
|
|
327
461
|
|
|
328
462
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
329
463
|
if @api_client.config.debugging
|
|
330
|
-
@api_client.config.logger.debug "API called: PublicEmbedApi#
|
|
464
|
+
@api_client.config.logger.debug "API called: PublicEmbedApi#get_public_workflow_frame\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
465
|
+
end
|
|
466
|
+
return data, status_code, headers
|
|
467
|
+
end
|
|
468
|
+
|
|
469
|
+
# Read one published version of a Workflow
|
|
470
|
+
# Public read of one version of a workflow, for a visitor who started on it before a newer one was published: they finish on the version they started on (for up to 30 days; after that they get the latest). The graph of a version never changes once published; the languages its compositions can be shown in (`translations`) are read each time, as for the live version. Like the read of the live version, it answers `status: paused` with nothing else while the workflow is paused, and 404 when the workflow is a draft or archived, or has no such version. **Address.** `https://api.widgetic.com/embed/workflows/{workflowId}/versions/{versionId}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag.
|
|
471
|
+
# @param workflow_id [String]
|
|
472
|
+
# @param version_id [String]
|
|
473
|
+
# @param [Hash] opts the optional parameters
|
|
474
|
+
# @return [PublicWorkflowResponse]
|
|
475
|
+
def get_public_workflow_version(workflow_id, version_id, opts = {})
|
|
476
|
+
data, _status_code, _headers = get_public_workflow_version_with_http_info(workflow_id, version_id, opts)
|
|
477
|
+
data
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
# Read one published version of a Workflow
|
|
481
|
+
# Public read of one version of a workflow, for a visitor who started on it before a newer one was published: they finish on the version they started on (for up to 30 days; after that they get the latest). The graph of a version never changes once published; the languages its compositions can be shown in (`translations`) are read each time, as for the live version. Like the read of the live version, it answers `status: paused` with nothing else while the workflow is paused, and 404 when the workflow is a draft or archived, or has no such version. **Address.** `https://api.widgetic.com/embed/workflows/{workflowId}/versions/{versionId}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag.
|
|
482
|
+
# @param workflow_id [String]
|
|
483
|
+
# @param version_id [String]
|
|
484
|
+
# @param [Hash] opts the optional parameters
|
|
485
|
+
# @return [Array<(PublicWorkflowResponse, Integer, Hash)>] PublicWorkflowResponse data, response status code and response headers
|
|
486
|
+
def get_public_workflow_version_with_http_info(workflow_id, version_id, opts = {})
|
|
487
|
+
if @api_client.config.debugging
|
|
488
|
+
@api_client.config.logger.debug 'Calling API: PublicEmbedApi.get_public_workflow_version ...'
|
|
489
|
+
end
|
|
490
|
+
# verify the required parameter 'workflow_id' is set
|
|
491
|
+
if @api_client.config.client_side_validation && workflow_id.nil?
|
|
492
|
+
fail ArgumentError, "Missing the required parameter 'workflow_id' when calling PublicEmbedApi.get_public_workflow_version"
|
|
493
|
+
end
|
|
494
|
+
# verify the required parameter 'version_id' is set
|
|
495
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
|
496
|
+
fail ArgumentError, "Missing the required parameter 'version_id' when calling PublicEmbedApi.get_public_workflow_version"
|
|
497
|
+
end
|
|
498
|
+
# resource path
|
|
499
|
+
local_var_path = '/embed/workflows/{workflowId}/versions/{versionId}'.sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s)).sub('{' + 'versionId' + '}', CGI.escape(version_id.to_s))
|
|
500
|
+
|
|
501
|
+
# query parameters
|
|
502
|
+
query_params = opts[:query_params] || {}
|
|
503
|
+
|
|
504
|
+
# header parameters
|
|
505
|
+
header_params = opts[:header_params] || {}
|
|
506
|
+
# HTTP header 'Accept' (if needed)
|
|
507
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
508
|
+
|
|
509
|
+
# form parameters
|
|
510
|
+
form_params = opts[:form_params] || {}
|
|
511
|
+
|
|
512
|
+
# http body (model)
|
|
513
|
+
post_body = opts[:debug_body]
|
|
514
|
+
|
|
515
|
+
# return_type
|
|
516
|
+
return_type = opts[:debug_return_type] || 'PublicWorkflowResponse'
|
|
517
|
+
|
|
518
|
+
# auth_names
|
|
519
|
+
auth_names = opts[:debug_auth_names] || []
|
|
520
|
+
|
|
521
|
+
new_options = opts.merge(
|
|
522
|
+
:operation => :"PublicEmbedApi.get_public_workflow_version",
|
|
523
|
+
:header_params => header_params,
|
|
524
|
+
:query_params => query_params,
|
|
525
|
+
:form_params => form_params,
|
|
526
|
+
:body => post_body,
|
|
527
|
+
:auth_names => auth_names,
|
|
528
|
+
:return_type => return_type
|
|
529
|
+
)
|
|
530
|
+
|
|
531
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
532
|
+
if @api_client.config.debugging
|
|
533
|
+
@api_client.config.logger.debug "API called: PublicEmbedApi#get_public_workflow_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
331
534
|
end
|
|
332
535
|
return data, status_code, headers
|
|
333
536
|
end
|
|
@@ -337,8 +540,8 @@ module ApiSdkRb
|
|
|
337
540
|
# @param post_public_composition_embed_status_request [PostPublicCompositionEmbedStatusRequest]
|
|
338
541
|
# @param [Hash] opts the optional parameters
|
|
339
542
|
# @return [PostPublicCompositionEmbedStatus200Response]
|
|
340
|
-
def
|
|
341
|
-
data, _status_code, _headers =
|
|
543
|
+
def post_public_composition_embed_status(post_public_composition_embed_status_request, opts = {})
|
|
544
|
+
data, _status_code, _headers = post_public_composition_embed_status_with_http_info(post_public_composition_embed_status_request, opts)
|
|
342
545
|
data
|
|
343
546
|
end
|
|
344
547
|
|
|
@@ -347,13 +550,13 @@ module ApiSdkRb
|
|
|
347
550
|
# @param post_public_composition_embed_status_request [PostPublicCompositionEmbedStatusRequest]
|
|
348
551
|
# @param [Hash] opts the optional parameters
|
|
349
552
|
# @return [Array<(PostPublicCompositionEmbedStatus200Response, Integer, Hash)>] PostPublicCompositionEmbedStatus200Response data, response status code and response headers
|
|
350
|
-
def
|
|
553
|
+
def post_public_composition_embed_status_with_http_info(post_public_composition_embed_status_request, opts = {})
|
|
351
554
|
if @api_client.config.debugging
|
|
352
|
-
@api_client.config.logger.debug 'Calling API: PublicEmbedApi.
|
|
555
|
+
@api_client.config.logger.debug 'Calling API: PublicEmbedApi.post_public_composition_embed_status ...'
|
|
353
556
|
end
|
|
354
557
|
# verify the required parameter 'post_public_composition_embed_status_request' is set
|
|
355
558
|
if @api_client.config.client_side_validation && post_public_composition_embed_status_request.nil?
|
|
356
|
-
fail ArgumentError, "Missing the required parameter 'post_public_composition_embed_status_request' when calling PublicEmbedApi.
|
|
559
|
+
fail ArgumentError, "Missing the required parameter 'post_public_composition_embed_status_request' when calling PublicEmbedApi.post_public_composition_embed_status"
|
|
357
560
|
end
|
|
358
561
|
# resource path
|
|
359
562
|
local_var_path = '/embed/compositions/status'
|
|
@@ -384,7 +587,81 @@ module ApiSdkRb
|
|
|
384
587
|
auth_names = opts[:debug_auth_names] || []
|
|
385
588
|
|
|
386
589
|
new_options = opts.merge(
|
|
387
|
-
:operation => :"PublicEmbedApi.
|
|
590
|
+
:operation => :"PublicEmbedApi.post_public_composition_embed_status",
|
|
591
|
+
:header_params => header_params,
|
|
592
|
+
:query_params => query_params,
|
|
593
|
+
:form_params => form_params,
|
|
594
|
+
:body => post_body,
|
|
595
|
+
:auth_names => auth_names,
|
|
596
|
+
:return_type => return_type
|
|
597
|
+
)
|
|
598
|
+
|
|
599
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
600
|
+
if @api_client.config.debugging
|
|
601
|
+
@api_client.config.logger.debug "API called: PublicEmbedApi#post_public_composition_embed_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
602
|
+
end
|
|
603
|
+
return data, status_code, headers
|
|
604
|
+
end
|
|
605
|
+
|
|
606
|
+
# Report what visitors did in a Workflow, as counts
|
|
607
|
+
# Public report of counts for a workflow, sent by the embed. No API key. Each event is one id and a number: a visitor reached a block (`n`), took a connection (`e`), or could not be moved on (`f`). Nothing else is kept: no visitor, no value a visitor typed, no address. A batch carries at most 100 events and 16 KB. The same report may carry `heights`: how tall a step settled at in the browser, which the embed code of the workflow uses to start its box at a real height (a composition, a whole number of pixels, nothing about the visitor). A report is accepted only with the `token` the workflow's own read handed out for that `versionId`, so a page that never read the workflow cannot raise its numbers. An expired token (`EVENT_TOKEN_EXPIRED`) is refused with 401: read the workflow again for a new one. Counts for ids that are not in that version, or for a workflow that is not live, are not recorded and the answer says so (`recorded: false`) with 200: the visitor's page has nothing to fix. The body is JSON, sent as `application/json` or as `text/plain` (a \"simple\" cross-origin request, which is what lets a report leave a page that is being closed). **Address.** `https://api.widgetic.com/embed/workflows/{workflowId}/events`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag.
|
|
608
|
+
# @param workflow_id [String]
|
|
609
|
+
# @param public_workflow_events_request [PublicWorkflowEventsRequest]
|
|
610
|
+
# @param [Hash] opts the optional parameters
|
|
611
|
+
# @return [ReportPublicWorkflowEvents200Response]
|
|
612
|
+
def report_public_workflow_events(workflow_id, public_workflow_events_request, opts = {})
|
|
613
|
+
data, _status_code, _headers = report_public_workflow_events_with_http_info(workflow_id, public_workflow_events_request, opts)
|
|
614
|
+
data
|
|
615
|
+
end
|
|
616
|
+
|
|
617
|
+
# Report what visitors did in a Workflow, as counts
|
|
618
|
+
# Public report of counts for a workflow, sent by the embed. No API key. Each event is one id and a number: a visitor reached a block (`n`), took a connection (`e`), or could not be moved on (`f`). Nothing else is kept: no visitor, no value a visitor typed, no address. A batch carries at most 100 events and 16 KB. The same report may carry `heights`: how tall a step settled at in the browser, which the embed code of the workflow uses to start its box at a real height (a composition, a whole number of pixels, nothing about the visitor). A report is accepted only with the `token` the workflow's own read handed out for that `versionId`, so a page that never read the workflow cannot raise its numbers. An expired token (`EVENT_TOKEN_EXPIRED`) is refused with 401: read the workflow again for a new one. Counts for ids that are not in that version, or for a workflow that is not live, are not recorded and the answer says so (`recorded: false`) with 200: the visitor's page has nothing to fix. The body is JSON, sent as `application/json` or as `text/plain` (a \"simple\" cross-origin request, which is what lets a report leave a page that is being closed). **Address.** `https://api.widgetic.com/embed/workflows/{workflowId}/events`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag.
|
|
619
|
+
# @param workflow_id [String]
|
|
620
|
+
# @param public_workflow_events_request [PublicWorkflowEventsRequest]
|
|
621
|
+
# @param [Hash] opts the optional parameters
|
|
622
|
+
# @return [Array<(ReportPublicWorkflowEvents200Response, Integer, Hash)>] ReportPublicWorkflowEvents200Response data, response status code and response headers
|
|
623
|
+
def report_public_workflow_events_with_http_info(workflow_id, public_workflow_events_request, opts = {})
|
|
624
|
+
if @api_client.config.debugging
|
|
625
|
+
@api_client.config.logger.debug 'Calling API: PublicEmbedApi.report_public_workflow_events ...'
|
|
626
|
+
end
|
|
627
|
+
# verify the required parameter 'workflow_id' is set
|
|
628
|
+
if @api_client.config.client_side_validation && workflow_id.nil?
|
|
629
|
+
fail ArgumentError, "Missing the required parameter 'workflow_id' when calling PublicEmbedApi.report_public_workflow_events"
|
|
630
|
+
end
|
|
631
|
+
# verify the required parameter 'public_workflow_events_request' is set
|
|
632
|
+
if @api_client.config.client_side_validation && public_workflow_events_request.nil?
|
|
633
|
+
fail ArgumentError, "Missing the required parameter 'public_workflow_events_request' when calling PublicEmbedApi.report_public_workflow_events"
|
|
634
|
+
end
|
|
635
|
+
# resource path
|
|
636
|
+
local_var_path = '/embed/workflows/{workflowId}/events'.sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s))
|
|
637
|
+
|
|
638
|
+
# query parameters
|
|
639
|
+
query_params = opts[:query_params] || {}
|
|
640
|
+
|
|
641
|
+
# header parameters
|
|
642
|
+
header_params = opts[:header_params] || {}
|
|
643
|
+
# HTTP header 'Accept' (if needed)
|
|
644
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
645
|
+
# HTTP header 'Content-Type'
|
|
646
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/plain'])
|
|
647
|
+
if !content_type.nil?
|
|
648
|
+
header_params['Content-Type'] = content_type
|
|
649
|
+
end
|
|
650
|
+
|
|
651
|
+
# form parameters
|
|
652
|
+
form_params = opts[:form_params] || {}
|
|
653
|
+
|
|
654
|
+
# http body (model)
|
|
655
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(public_workflow_events_request)
|
|
656
|
+
|
|
657
|
+
# return_type
|
|
658
|
+
return_type = opts[:debug_return_type] || 'ReportPublicWorkflowEvents200Response'
|
|
659
|
+
|
|
660
|
+
# auth_names
|
|
661
|
+
auth_names = opts[:debug_auth_names] || []
|
|
662
|
+
|
|
663
|
+
new_options = opts.merge(
|
|
664
|
+
:operation => :"PublicEmbedApi.report_public_workflow_events",
|
|
388
665
|
:header_params => header_params,
|
|
389
666
|
:query_params => query_params,
|
|
390
667
|
:form_params => form_params,
|
|
@@ -395,58 +672,58 @@ module ApiSdkRb
|
|
|
395
672
|
|
|
396
673
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
397
674
|
if @api_client.config.debugging
|
|
398
|
-
@api_client.config.logger.debug "API called: PublicEmbedApi#
|
|
675
|
+
@api_client.config.logger.debug "API called: PublicEmbedApi#report_public_workflow_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
399
676
|
end
|
|
400
677
|
return data, status_code, headers
|
|
401
678
|
end
|
|
402
679
|
|
|
403
680
|
# Send the file a visitor chose through the upload adapter of a published widget
|
|
404
|
-
# The second of the two calls the `upload` adapter's module makes from the visitor's browser (the first, the `begin-upload` operation of `callPublicCompositionAdapter`, answers with the ticket this route takes). The module sends the file itself, as the body, with its media type as the `Content-Type`. It is not meant to be called by hand, and it takes no API key. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/adapters/upload/files/{ticket}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **The ticket.** Single-use and valid for ten minutes, given for one file: its name, its media type and its exact size are what the visitor said when the ticket was asked for, after the widget's owner's settings (the kinds of file they take, the largest size) were applied. The `Content-Type` and the `Content-Length` of this request must be those, and the body must be exactly that many bytes (400 `UPLOAD_FILE_CHANGED` otherwise). The gateway never believes the type it was told: the first bytes of the file must be a file of that type and one the owner accepts (422 otherwise). A ticket whose file was stored and is sent again is answered with the same file, so a visitor whose connection dropped after the file landed does not store it twice; a ticket whose attempt failed is spent, and the module asks for a new one. **What it stores.** The file goes to the widget owner's storage: Widgetic's, or the partner's own bucket for a widget of a customer a partner manages. It counts against the owner's storage allowance and is filed in the folder the owner chose, as a file sent by a visitor, which the owner's own file list leaves out. A full allowance, a partner's storage that cannot be used and a stopped feature are all the same 503 `UPLOAD_UNAVAILABLE` to a visitor, and the owner is told through a notice. **Who may call.** The same rule as the entry route: a permitted `Origin` header, which is the artifact origin the widget runs from or
|
|
681
|
+
# The second of the two calls the `upload` adapter's module makes from the visitor's browser (the first, the `begin-upload` operation of `callPublicCompositionAdapter`, answers with the ticket this route takes). The module sends the file itself, as the body, with its media type as the `Content-Type`. It is not meant to be called by hand, and it takes no API key. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/adapters/upload/files/{ticket}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **The ticket.** Single-use and valid for ten minutes, given for one file: its name, its media type and its exact size are what the visitor said when the ticket was asked for, after the widget's owner's settings (the kinds of file they take, the largest size) were applied. The `Content-Type` and the `Content-Length` of this request must be those, and the body must be exactly that many bytes (400 `UPLOAD_FILE_CHANGED` otherwise). The gateway never believes the type it was told: the first bytes of the file must be a file of that type and one the owner accepts (422 otherwise). A ticket whose file was stored and is sent again is answered with the same file, so a visitor whose connection dropped after the file landed does not store it twice; a ticket whose attempt failed is spent, and the module asks for a new one. **The virus check.** Before anything is stored, the file is checked for viruses, wherever it would be kept (Widgetic's storage or a partner's own bucket). A file that fails the check is refused with 422 `UPLOAD_FILE_UNSAFE` and nothing is stored. When the check cannot be done, nothing is stored either, and the answer is the same neutral 503 `UPLOAD_UNAVAILABLE` as for any other cause the visitor is not told. The ticket of a refused file is spent. **What it stores.** The file goes to the widget owner's storage: Widgetic's, or the partner's own bucket for a widget of a customer a partner manages. It counts against the owner's storage allowance and is filed in the folder the owner chose, as a file sent by a visitor, which the owner's own file list leaves out. A full allowance, a partner's storage that cannot be used and a stopped feature are all the same 503 `UPLOAD_UNAVAILABLE` to a visitor, and the owner is told through a notice. **Who may call.** The same rule as the entry route: a permitted `Origin` header, which is the artifact origin the widget runs from or any website when the owner has not restricted the allowed websites (when the owner has, one of the websites the owner listed, Widgetic's own sites, the visitor's own machine or the owner's own platform). A request without a permitted `Origin` is 403 `ORIGIN_NOT_ALLOWED`. A composition that is not served (unpublished, or its owner's plan does not serve it) is 404, with the codes of the other public embed routes. **Limits.** 30 requests a minute for each visitor address and composition and 240 a minute for a composition (429 `RATE_LIMITED`, with a `Retry-After` header); at most 10 MB for a file, and only so many files held in memory at once on each gateway process (503 `UPLOAD_BUSY`, with a `Retry-After`). A file that does not arrive within two minutes is 408 `UPLOAD_TIMEOUT`. Every answer but a success closes the connection, so a client that is refused before it has sent the file reads the answer and stops.
|
|
405
682
|
# @param composition_id [String]
|
|
406
683
|
# @param ticket [String] The ticket the `begin-upload` operation answered with.
|
|
407
684
|
# @param body [File]
|
|
408
685
|
# @param [Hash] opts the optional parameters
|
|
409
686
|
# @return [PublicAdapterFileResult]
|
|
410
|
-
def
|
|
411
|
-
data, _status_code, _headers =
|
|
687
|
+
def upload_public_composition_adapter_file(composition_id, ticket, body, opts = {})
|
|
688
|
+
data, _status_code, _headers = upload_public_composition_adapter_file_with_http_info(composition_id, ticket, body, opts)
|
|
412
689
|
data
|
|
413
690
|
end
|
|
414
691
|
|
|
415
692
|
# Send the file a visitor chose through the upload adapter of a published widget
|
|
416
|
-
# The second of the two calls the `upload` adapter's module makes from the visitor's browser (the first, the `begin-upload` operation of `callPublicCompositionAdapter`, answers with the ticket this route takes). The module sends the file itself, as the body, with its media type as the `Content-Type`. It is not meant to be called by hand, and it takes no API key. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/adapters/upload/files/{ticket}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **The ticket.** Single-use and valid for ten minutes, given for one file: its name, its media type and its exact size are what the visitor said when the ticket was asked for, after the widget's owner's settings (the kinds of file they take, the largest size) were applied. The `Content-Type` and the `Content-Length` of this request must be those, and the body must be exactly that many bytes (400 `UPLOAD_FILE_CHANGED` otherwise). The gateway never believes the type it was told: the first bytes of the file must be a file of that type and one the owner accepts (422 otherwise). A ticket whose file was stored and is sent again is answered with the same file, so a visitor whose connection dropped after the file landed does not store it twice; a ticket whose attempt failed is spent, and the module asks for a new one. **What it stores.** The file goes to the widget owner's storage: Widgetic's, or the partner's own bucket for a widget of a customer a partner manages. It counts against the owner's storage allowance and is filed in the folder the owner chose, as a file sent by a visitor, which the owner's own file list leaves out. A full allowance, a partner's storage that cannot be used and a stopped feature are all the same 503 `UPLOAD_UNAVAILABLE` to a visitor, and the owner is told through a notice. **Who may call.** The same rule as the entry route: a permitted `Origin` header, which is the artifact origin the widget runs from or
|
|
693
|
+
# The second of the two calls the `upload` adapter's module makes from the visitor's browser (the first, the `begin-upload` operation of `callPublicCompositionAdapter`, answers with the ticket this route takes). The module sends the file itself, as the body, with its media type as the `Content-Type`. It is not meant to be called by hand, and it takes no API key. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/adapters/upload/files/{ticket}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **The ticket.** Single-use and valid for ten minutes, given for one file: its name, its media type and its exact size are what the visitor said when the ticket was asked for, after the widget's owner's settings (the kinds of file they take, the largest size) were applied. The `Content-Type` and the `Content-Length` of this request must be those, and the body must be exactly that many bytes (400 `UPLOAD_FILE_CHANGED` otherwise). The gateway never believes the type it was told: the first bytes of the file must be a file of that type and one the owner accepts (422 otherwise). A ticket whose file was stored and is sent again is answered with the same file, so a visitor whose connection dropped after the file landed does not store it twice; a ticket whose attempt failed is spent, and the module asks for a new one. **The virus check.** Before anything is stored, the file is checked for viruses, wherever it would be kept (Widgetic's storage or a partner's own bucket). A file that fails the check is refused with 422 `UPLOAD_FILE_UNSAFE` and nothing is stored. When the check cannot be done, nothing is stored either, and the answer is the same neutral 503 `UPLOAD_UNAVAILABLE` as for any other cause the visitor is not told. The ticket of a refused file is spent. **What it stores.** The file goes to the widget owner's storage: Widgetic's, or the partner's own bucket for a widget of a customer a partner manages. It counts against the owner's storage allowance and is filed in the folder the owner chose, as a file sent by a visitor, which the owner's own file list leaves out. A full allowance, a partner's storage that cannot be used and a stopped feature are all the same 503 `UPLOAD_UNAVAILABLE` to a visitor, and the owner is told through a notice. **Who may call.** The same rule as the entry route: a permitted `Origin` header, which is the artifact origin the widget runs from or any website when the owner has not restricted the allowed websites (when the owner has, one of the websites the owner listed, Widgetic's own sites, the visitor's own machine or the owner's own platform). A request without a permitted `Origin` is 403 `ORIGIN_NOT_ALLOWED`. A composition that is not served (unpublished, or its owner's plan does not serve it) is 404, with the codes of the other public embed routes. **Limits.** 30 requests a minute for each visitor address and composition and 240 a minute for a composition (429 `RATE_LIMITED`, with a `Retry-After` header); at most 10 MB for a file, and only so many files held in memory at once on each gateway process (503 `UPLOAD_BUSY`, with a `Retry-After`). A file that does not arrive within two minutes is 408 `UPLOAD_TIMEOUT`. Every answer but a success closes the connection, so a client that is refused before it has sent the file reads the answer and stops.
|
|
417
694
|
# @param composition_id [String]
|
|
418
695
|
# @param ticket [String] The ticket the `begin-upload` operation answered with.
|
|
419
696
|
# @param body [File]
|
|
420
697
|
# @param [Hash] opts the optional parameters
|
|
421
698
|
# @return [Array<(PublicAdapterFileResult, Integer, Hash)>] PublicAdapterFileResult data, response status code and response headers
|
|
422
|
-
def
|
|
699
|
+
def upload_public_composition_adapter_file_with_http_info(composition_id, ticket, body, opts = {})
|
|
423
700
|
if @api_client.config.debugging
|
|
424
|
-
@api_client.config.logger.debug 'Calling API: PublicEmbedApi.
|
|
701
|
+
@api_client.config.logger.debug 'Calling API: PublicEmbedApi.upload_public_composition_adapter_file ...'
|
|
425
702
|
end
|
|
426
703
|
# verify the required parameter 'composition_id' is set
|
|
427
704
|
if @api_client.config.client_side_validation && composition_id.nil?
|
|
428
|
-
fail ArgumentError, "Missing the required parameter 'composition_id' when calling PublicEmbedApi.
|
|
705
|
+
fail ArgumentError, "Missing the required parameter 'composition_id' when calling PublicEmbedApi.upload_public_composition_adapter_file"
|
|
429
706
|
end
|
|
430
707
|
# verify the required parameter 'ticket' is set
|
|
431
708
|
if @api_client.config.client_side_validation && ticket.nil?
|
|
432
|
-
fail ArgumentError, "Missing the required parameter 'ticket' when calling PublicEmbedApi.
|
|
709
|
+
fail ArgumentError, "Missing the required parameter 'ticket' when calling PublicEmbedApi.upload_public_composition_adapter_file"
|
|
433
710
|
end
|
|
434
711
|
if @api_client.config.client_side_validation && ticket.to_s.length > 128
|
|
435
|
-
fail ArgumentError, 'invalid value for "ticket" when calling PublicEmbedApi.
|
|
712
|
+
fail ArgumentError, 'invalid value for "ticket" when calling PublicEmbedApi.upload_public_composition_adapter_file, the character length must be smaller than or equal to 128.'
|
|
436
713
|
end
|
|
437
714
|
|
|
438
715
|
if @api_client.config.client_side_validation && ticket.to_s.length < 20
|
|
439
|
-
fail ArgumentError, 'invalid value for "ticket" when calling PublicEmbedApi.
|
|
716
|
+
fail ArgumentError, 'invalid value for "ticket" when calling PublicEmbedApi.upload_public_composition_adapter_file, the character length must be great than or equal to 20.'
|
|
440
717
|
end
|
|
441
718
|
|
|
442
719
|
pattern = Regexp.new(/^[A-Za-z0-9_-]{20,128}$/)
|
|
443
720
|
if @api_client.config.client_side_validation && ticket !~ pattern
|
|
444
|
-
fail ArgumentError, "invalid value for 'ticket' when calling PublicEmbedApi.
|
|
721
|
+
fail ArgumentError, "invalid value for 'ticket' when calling PublicEmbedApi.upload_public_composition_adapter_file, must conform to the pattern #{pattern}."
|
|
445
722
|
end
|
|
446
723
|
|
|
447
724
|
# verify the required parameter 'body' is set
|
|
448
725
|
if @api_client.config.client_side_validation && body.nil?
|
|
449
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling PublicEmbedApi.
|
|
726
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PublicEmbedApi.upload_public_composition_adapter_file"
|
|
450
727
|
end
|
|
451
728
|
# resource path
|
|
452
729
|
local_var_path = '/embed/compositions/{compositionId}/adapters/upload/files/{ticket}'.sub('{' + 'compositionId' + '}', CGI.escape(composition_id.to_s)).sub('{' + 'ticket' + '}', CGI.escape(ticket.to_s))
|
|
@@ -477,7 +754,7 @@ module ApiSdkRb
|
|
|
477
754
|
auth_names = opts[:debug_auth_names] || []
|
|
478
755
|
|
|
479
756
|
new_options = opts.merge(
|
|
480
|
-
:operation => :"PublicEmbedApi.
|
|
757
|
+
:operation => :"PublicEmbedApi.upload_public_composition_adapter_file",
|
|
481
758
|
:header_params => header_params,
|
|
482
759
|
:query_params => query_params,
|
|
483
760
|
:form_params => form_params,
|
|
@@ -488,7 +765,7 @@ module ApiSdkRb
|
|
|
488
765
|
|
|
489
766
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
490
767
|
if @api_client.config.debugging
|
|
491
|
-
@api_client.config.logger.debug "API called: PublicEmbedApi#
|
|
768
|
+
@api_client.config.logger.debug "API called: PublicEmbedApi#upload_public_composition_adapter_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
492
769
|
end
|
|
493
770
|
return data, status_code, headers
|
|
494
771
|
end
|