api-sdk-rb 1.11.66
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 +7 -0
- data/Gemfile +9 -0
- data/LICENSE +122 -0
- data/README.md +648 -0
- data/Rakefile +10 -0
- data/api-sdk-rb.gemspec +39 -0
- data/docs/AccountCreditBalance.md +26 -0
- data/docs/AccountCreditBalanceResponse.md +22 -0
- data/docs/AccountCreditTransaction.md +30 -0
- data/docs/AdapterConnection.md +30 -0
- data/docs/AdapterConnectionRemoval.md +18 -0
- data/docs/AddAiAnswersKnowledgeDocument201Response.md +22 -0
- data/docs/AddAiAnswersKnowledgeDocumentRequest.md +20 -0
- data/docs/AddDomainRequest.md +18 -0
- data/docs/AiAnswersKnowledge.md +20 -0
- data/docs/AiAnswersKnowledgeDocument.md +30 -0
- data/docs/AiAnswersKnowledgeRemoval.md +18 -0
- data/docs/AiAnswersKnowledgeTotals.md +24 -0
- data/docs/ApiKeyScope.md +15 -0
- data/docs/Canvas.md +32 -0
- data/docs/CanvasResponse.md +22 -0
- data/docs/CanvasesApi.md +377 -0
- data/docs/CheckCompositionAccessResponse.md +22 -0
- data/docs/CheckCompositionAccessResponseData.md +20 -0
- data/docs/Composition.md +46 -0
- data/docs/CompositionDataSource.md +20 -0
- data/docs/CompositionDataSourceResponse.md +22 -0
- data/docs/CompositionEntriesDescription.md +22 -0
- data/docs/CompositionEntriesDescriptionResponse.md +22 -0
- data/docs/CompositionEntriesReading.md +34 -0
- data/docs/CompositionEntriesReadingResponse.md +22 -0
- data/docs/CompositionEntryAggregateTally.md +28 -0
- data/docs/CompositionEntryAggregatesBlock.md +22 -0
- data/docs/CompositionEntryColumn.md +20 -0
- data/docs/CompositionEntryDeleteSuccess.md +20 -0
- data/docs/CompositionEntryDeleteSuccessData.md +18 -0
- data/docs/CompositionEntryItem.md +26 -0
- data/docs/CompositionEntryItemsMeta.md +22 -0
- data/docs/CompositionEntryItemsPageSuccess.md +22 -0
- data/docs/CompositionEntryTable.md +22 -0
- data/docs/CompositionEntryTally.md +20 -0
- data/docs/CompositionResponse.md +22 -0
- data/docs/CompositionVersion.md +26 -0
- data/docs/CompositionsApi.md +2768 -0
- data/docs/ContentCheckFinding.md +24 -0
- data/docs/ContentItemWriteResult.md +28 -0
- data/docs/ContentItemWriteResultValidationResult.md +22 -0
- data/docs/CopyPartnerPresetRequest.md +18 -0
- data/docs/CreateCanvasRequest.md +28 -0
- data/docs/CreateCompositionContentItem201Response.md +22 -0
- data/docs/CreateCompositionContentItemRequest.md +18 -0
- data/docs/CreateCompositionDatabaseRecord201Response.md +22 -0
- data/docs/CreateCompositionFromPresetRequest.md +26 -0
- data/docs/CreateCompositionFromWidget201Response.md +22 -0
- data/docs/CreateCompositionFromWidgetRequest.md +28 -0
- data/docs/CreateUserApiKeyRequest.md +24 -0
- data/docs/CreateWidget201Response.md +22 -0
- data/docs/CreateWidget201ResponseData.md +62 -0
- data/docs/CreatedUserApiKey.md +34 -0
- data/docs/CreatedUserApiKeyResponse.md +22 -0
- data/docs/CreditsApi.md +155 -0
- data/docs/DeleteCompositionContentItemResponse.md +22 -0
- data/docs/DeleteCompositionContentItemResponseData.md +20 -0
- data/docs/DeleteCompositionDataSourceResponse.md +22 -0
- data/docs/DeleteCompositionDataSourceResponseData.md +18 -0
- data/docs/DeleteManagedUser200Response.md +22 -0
- data/docs/DeletePersonalWorkspaceDomainResponse.md +22 -0
- data/docs/DeletePersonalWorkspaceDomainResponseData.md +18 -0
- data/docs/DeleteUserApiKeyResponse.md +22 -0
- data/docs/DeleteUserApiKeyResponseData.md +18 -0
- data/docs/DesignDefaults.md +18 -0
- data/docs/DuplicateComposition202Response.md +22 -0
- data/docs/DuplicateComposition202ResponseData.md +18 -0
- data/docs/DuplicateCompositionRequest.md +20 -0
- data/docs/EditorSession.md +34 -0
- data/docs/EditorSessionResponse.md +22 -0
- data/docs/Entitlement.md +38 -0
- data/docs/EntitlementsApi.md +163 -0
- data/docs/ErrorDetail.md +34 -0
- data/docs/ErrorResponse.md +22 -0
- data/docs/ExportCompositionEntryItems200Response.md +22 -0
- data/docs/ExportCompositionEntryItems200ResponseMeta.md +20 -0
- data/docs/GetAiAnswersKnowledge200Response.md +22 -0
- data/docs/GetAllCanvasesResponse.md +22 -0
- data/docs/GetAllCanvasesResponseData.md +24 -0
- data/docs/GetAllCompositions200Response.md +22 -0
- data/docs/GetAllManagedUsers200Response.md +22 -0
- data/docs/GetCompositionContentResponse.md +22 -0
- data/docs/GetCompositionContentSchemaResponse.md +22 -0
- data/docs/GetCompositionContentSchemaResponseData.md +28 -0
- data/docs/GetCompositionDataSourceResponse.md +22 -0
- data/docs/GetCompositionDatabaseRecords200Response.md +22 -0
- data/docs/GetCompositionDesignResponse.md +22 -0
- data/docs/GetCompositionDesignSchemaResponse.md +22 -0
- data/docs/GetCompositionDesignSchemaResponseData.md +28 -0
- data/docs/GetCompositionEmbedSchemaResponse.md +22 -0
- data/docs/GetCompositionEmbedSchemaResponseData.md +28 -0
- data/docs/GetCompositionEmbedSettingsResponse.md +22 -0
- data/docs/GetCompositionPreviewResponse.md +22 -0
- data/docs/GetCompositionPreviewResponseData.md +24 -0
- data/docs/GetCompositionVersions200Response.md +22 -0
- data/docs/GetCompositionsBatchRequest.md +18 -0
- data/docs/GetCompositionsBatchResponse.md +22 -0
- data/docs/GetCompositionsBatchResponseData.md +20 -0
- data/docs/GetInvoicesByPartnerId200Response.md +22 -0
- data/docs/GetManagedUserEntitlementsResponse.md +22 -0
- data/docs/GetManagedUserEntitlementsResponseData.md +20 -0
- data/docs/GetManagedUserLimits200Response.md +22 -0
- data/docs/GetManagedUserStorageUsage200Response.md +22 -0
- data/docs/GetManagedUserStorageUsage200ResponseData.md +22 -0
- data/docs/GetManagedUserStorageUsage200ResponseDataByPurpose.md +24 -0
- data/docs/GetManagedUsersByManagerIdResponse.md +22 -0
- data/docs/GetManagedUsersByManagerIdResponseData.md +24 -0
- data/docs/GetPartnerBillingOverview200Response.md +22 -0
- data/docs/GetPartnerCreditTransactions200Response.md +22 -0
- data/docs/GetPartnerDesignDefaults200Response.md +22 -0
- data/docs/GetPartnerEntitlementsResponse.md +22 -0
- data/docs/GetPartnerEntitlementsResponseData.md +20 -0
- data/docs/GetPersonalWorkspaceDomains200Response.md +22 -0
- data/docs/GetPublicCompositionEmbed200Response.md +46 -0
- data/docs/GetPublicCompositionEmbed200ResponseDataSource.md +20 -0
- data/docs/GetPublicCompositionEmbed200ResponseDirect.md +22 -0
- data/docs/GetUserAdapterConnections200Response.md +22 -0
- data/docs/GetUserApiKeyUsageLogsResponse.md +22 -0
- data/docs/GetUserApiKeyUsageLogsResponseData.md +18 -0
- data/docs/GetUserApiKeys200Response.md +22 -0
- data/docs/GetWidgets200Response.md +22 -0
- data/docs/GetWidgetsBatchRequest.md +18 -0
- data/docs/GetWidgetsBatchResponse.md +22 -0
- data/docs/GetWidgetsBatchResponseData.md +20 -0
- data/docs/GetWidgetsBatchResponseDataErrorsInner.md +20 -0
- data/docs/InvoicesApi.md +85 -0
- data/docs/ListPartnerPresets200Response.md +22 -0
- data/docs/ManagedUser.md +30 -0
- data/docs/ManagedUserEntriesMeta.md +26 -0
- data/docs/ManagedUserEntriesPageSuccess.md +22 -0
- data/docs/ManagedUserEntryItem.md +30 -0
- data/docs/ManagedUserLimits.md +24 -0
- data/docs/ManagedUserOperationUsage.md +26 -0
- data/docs/ManagedUserRemoval.md +20 -0
- data/docs/ManagedUserResponse.md +22 -0
- data/docs/ManagedUserUsage.md +28 -0
- data/docs/ManagedUserUsageResponse.md +22 -0
- data/docs/ManagedUserUsageTotals.md +24 -0
- data/docs/ManagedUsersApi.md +1239 -0
- data/docs/MyPartner.md +34 -0
- data/docs/MyPartners.md +22 -0
- data/docs/MyPartnersResponse.md +22 -0
- data/docs/NewComposition.md +38 -0
- data/docs/NewEditorSession.md +24 -0
- data/docs/NewManagedUser.md +22 -0
- data/docs/NewWidget.md +38 -0
- data/docs/OperationsApi.md +77 -0
- data/docs/OperationsIdGetResponse.md +22 -0
- data/docs/OperationsIdGetResponseData.md +32 -0
- data/docs/PartnerAnalyticsByManagedUser.md +24 -0
- data/docs/PartnerAnalyticsByManagedUserResponse.md +22 -0
- data/docs/PartnerAnalyticsOfDay.md +24 -0
- data/docs/PartnerAnalyticsOfManagedUser.md +36 -0
- data/docs/PartnerAnalyticsOfWidget.md +28 -0
- data/docs/PartnerAnalyticsSummary.md +32 -0
- data/docs/PartnerAnalyticsSummaryResponse.md +22 -0
- data/docs/PartnerAnalyticsTimeline.md +24 -0
- data/docs/PartnerAnalyticsTimelineResponse.md +22 -0
- data/docs/PartnerAnalyticsTopWidgets.md +24 -0
- data/docs/PartnerAnalyticsTopWidgetsResponse.md +22 -0
- data/docs/PartnerApi.md +9892 -0
- data/docs/PartnerBillingOverview.md +24 -0
- data/docs/PartnerBillingOverviewBillingIntegration.md +24 -0
- data/docs/PartnerBillingOverviewOperationalCredits.md +24 -0
- data/docs/PartnerBillingOverviewPartner.md +24 -0
- data/docs/PartnerContract.md +48 -0
- data/docs/PartnerContractResponse.md +22 -0
- data/docs/PartnerCustomization.md +50 -0
- data/docs/PartnerDataDatabase.md +32 -0
- data/docs/PartnerDataDatabaseRemoval.md +18 -0
- data/docs/PartnerDataDatabaseRemovalResponse.md +22 -0
- data/docs/PartnerDataDatabaseResponse.md +22 -0
- data/docs/PartnerEntryContextSecret.md +20 -0
- data/docs/PartnerEntryContextSecretResponse.md +22 -0
- data/docs/PartnerEntryContextSigning.md +28 -0
- data/docs/PartnerEntryContextSigningResponse.md +22 -0
- data/docs/PartnerExtraCreditsInvoice.md +40 -0
- data/docs/PartnerExtraCreditsInvoiceResponse.md +22 -0
- data/docs/PartnerInvoice.md +64 -0
- data/docs/PartnerNotification.md +30 -0
- data/docs/PartnerNotificationDefaultRecipients.md +20 -0
- data/docs/PartnerNotificationDelivery.md +46 -0
- data/docs/PartnerNotificationDeliveryLog.md +18 -0
- data/docs/PartnerNotificationDeliveryLogResponse.md +22 -0
- data/docs/PartnerNotificationDeliveryResponse.md +22 -0
- data/docs/PartnerNotificationEvent.md +28 -0
- data/docs/PartnerNotificationEventType.md +15 -0
- data/docs/PartnerNotificationPage.md +20 -0
- data/docs/PartnerNotificationPageResponse.md +22 -0
- data/docs/PartnerNotificationSettings.md +36 -0
- data/docs/PartnerNotificationSettingsChange.md +20 -0
- data/docs/PartnerNotificationSettingsChangeResponse.md +22 -0
- data/docs/PartnerNotificationSettingsResponse.md +22 -0
- data/docs/PartnerNotificationTestEventRequest.md +18 -0
- data/docs/PartnerNotificationTestEventResult.md +24 -0
- data/docs/PartnerNotificationTestEventResultResponse.md +22 -0
- data/docs/PartnerPreset.md +34 -0
- data/docs/PartnerPresetCopy.md +28 -0
- data/docs/PartnerPresetCopyResponse.md +22 -0
- data/docs/PartnerPresetRemoval.md +18 -0
- data/docs/PartnerPresetRemovalResponse.md +22 -0
- data/docs/PartnerPresetResponse.md +22 -0
- data/docs/PartnerReportPage.md +22 -0
- data/docs/PartnerReportPeriod.md +20 -0
- data/docs/PartnerStorageDestination.md +40 -0
- data/docs/PartnerStorageDestinationResponse.md +22 -0
- data/docs/PartnerStorageRemoval.md +18 -0
- data/docs/PartnerStorageRemovalResponse.md +22 -0
- data/docs/PartnerStorageUsage.md +24 -0
- data/docs/PartnerStorageUsageOfManagedUser.md +34 -0
- data/docs/PartnerStorageUsageResponse.md +22 -0
- data/docs/PartnerStorageUsageTotals.md +24 -0
- data/docs/PartnersApi.md +2708 -0
- data/docs/PersonalWorkspaceDomain.md +26 -0
- data/docs/PersonalWorkspaceDomainResult.md +20 -0
- data/docs/PersonalWorkspaceDomainResultResponse.md +22 -0
- data/docs/PostPublicCompositionEmbedStatus200Response.md +22 -0
- data/docs/PostPublicCompositionEmbedStatus200ResponseData.md +18 -0
- data/docs/PostPublicCompositionEmbedStatusRequest.md +18 -0
- data/docs/PublicAdapterCallError.md +24 -0
- data/docs/PublicAdapterCallRequest.md +26 -0
- data/docs/PublicAdapterCallResult.md +20 -0
- data/docs/PublicAdapterCallResultData.md +18 -0
- data/docs/PublicAdapterFileResult.md +20 -0
- data/docs/PublicAdapterFileResultData.md +18 -0
- data/docs/PublicAdapterFileResultDataFile.md +28 -0
- data/docs/PublicCompositionEntryCreated.md +20 -0
- data/docs/PublicCompositionEntryCreatedData.md +22 -0
- data/docs/PublicCompositionEntryRequest.md +22 -0
- data/docs/PublicEmbedApi.md +415 -0
- data/docs/PublicEmbedFailure.md +28 -0
- data/docs/PublicEmbedFailureDetails.md +20 -0
- data/docs/PublicEmbedFailureError.md +28 -0
- data/docs/PurposeStorageBucket.md +20 -0
- data/docs/RemoveAiAnswersKnowledgeDocument200Response.md +22 -0
- data/docs/RemoveUserAdapterConnection200Response.md +22 -0
- data/docs/RequestExtraCredits.md +18 -0
- data/docs/ResponseMeta.md +34 -0
- data/docs/RevokeManagedUserEditorSessionsResponse.md +22 -0
- data/docs/RevokeManagedUserEditorSessionsResponseData.md +18 -0
- data/docs/SetAdapterConnectionRequest.md +18 -0
- data/docs/SetCompositionDataSourceRequest.md +20 -0
- data/docs/SetDynamicContentRequest.md +26 -0
- data/docs/SetDynamicContentResponse.md +22 -0
- data/docs/SetDynamicContentResponseData.md +26 -0
- data/docs/SetDynamicContentResponseDataValidationResult.md +22 -0
- data/docs/SetManagedUserLimitsRequest.md +18 -0
- data/docs/SetPartnerDataDatabaseRequest.md +18 -0
- data/docs/SetPartnerDesignDefaultsRequest.md +18 -0
- data/docs/SetPartnerPresetRequest.md +24 -0
- data/docs/SetPartnerStorageDestinationRequest.md +32 -0
- data/docs/SetUserAdapterConnection200Response.md +22 -0
- data/docs/SuccessResponse.md +22 -0
- data/docs/TokensApi.md +77 -0
- data/docs/UpdateCanvasRequest.md +22 -0
- data/docs/UpdateComposition.md +32 -0
- data/docs/UpdateCompositionStatusRequest.md +18 -0
- data/docs/UpdateDomainRequest.md +18 -0
- data/docs/UpdateManagedUser.md +22 -0
- data/docs/UpdatePartnerEntryContextSigningRequest.md +18 -0
- data/docs/UpdatePartnerNotificationSettingsRequest.md +24 -0
- data/docs/UpdateUserApiKeyRequest.md +20 -0
- data/docs/Upload.md +44 -0
- data/docs/UploadLimits.md +28 -0
- data/docs/UploadLimitsResponse.md +22 -0
- data/docs/UploadResponse.md +22 -0
- data/docs/UploadsApi.md +372 -0
- data/docs/UploadsGet200Response.md +22 -0
- data/docs/UploadsIdDelete200Response.md +22 -0
- data/docs/UploadsIdDelete200ResponseData.md +18 -0
- data/docs/UserApiKey.md +34 -0
- data/docs/UserApiKeyResponse.md +22 -0
- data/docs/UserApiKeyUsageLog.md +32 -0
- data/docs/UsersApi.md +881 -0
- data/docs/ValidateCompositionContentResponse.md +22 -0
- data/docs/ValidateCompositionContentResponseData.md +24 -0
- data/docs/ValidateToken200Response.md +22 -0
- data/docs/ValidateToken200ResponseData.md +26 -0
- data/docs/Widget.md +60 -0
- data/docs/WidgetsApi.md +303 -0
- data/git_push.sh +57 -0
- data/lib/api-sdk-rb/api/canvases_api.rb +390 -0
- data/lib/api-sdk-rb/api/compositions_api.rb +3267 -0
- data/lib/api-sdk-rb/api/credits_api.rb +169 -0
- data/lib/api-sdk-rb/api/entitlements_api.rb +166 -0
- data/lib/api-sdk-rb/api/invoices_api.rb +110 -0
- data/lib/api-sdk-rb/api/managed_users_api.rb +1299 -0
- data/lib/api-sdk-rb/api/operations_api.rb +85 -0
- data/lib/api-sdk-rb/api/partner_api.rb +10693 -0
- data/lib/api-sdk-rb/api/partners_api.rb +2799 -0
- data/lib/api-sdk-rb/api/public_embed_api.rb +496 -0
- data/lib/api-sdk-rb/api/tokens_api.rb +77 -0
- data/lib/api-sdk-rb/api/uploads_api.rb +383 -0
- data/lib/api-sdk-rb/api/users_api.rb +934 -0
- data/lib/api-sdk-rb/api/widgets_api.rb +347 -0
- data/lib/api-sdk-rb/api_client.rb +394 -0
- data/lib/api-sdk-rb/api_error.rb +58 -0
- data/lib/api-sdk-rb/configuration.rb +425 -0
- data/lib/api-sdk-rb/models/account_credit_balance.rb +253 -0
- data/lib/api-sdk-rb/models/account_credit_balance_response.rb +247 -0
- data/lib/api-sdk-rb/models/account_credit_transaction.rb +277 -0
- data/lib/api-sdk-rb/models/adapter_connection.rb +355 -0
- data/lib/api-sdk-rb/models/adapter_connection_removal.rb +222 -0
- data/lib/api-sdk-rb/models/add_ai_answers_knowledge_document201_response.rb +246 -0
- data/lib/api-sdk-rb/models/add_ai_answers_knowledge_document_request.rb +277 -0
- data/lib/api-sdk-rb/models/add_domain_request.rb +222 -0
- data/lib/api-sdk-rb/models/ai_answers_knowledge.rb +240 -0
- data/lib/api-sdk-rb/models/ai_answers_knowledge_document.rb +373 -0
- data/lib/api-sdk-rb/models/ai_answers_knowledge_removal.rb +222 -0
- data/lib/api-sdk-rb/models/ai_answers_knowledge_totals.rb +273 -0
- data/lib/api-sdk-rb/models/api_key_scope.rb +47 -0
- data/lib/api-sdk-rb/models/canvas.rb +315 -0
- data/lib/api-sdk-rb/models/canvas_response.rb +247 -0
- data/lib/api-sdk-rb/models/check_composition_access_response.rb +247 -0
- data/lib/api-sdk-rb/models/check_composition_access_response_data.rb +225 -0
- data/lib/api-sdk-rb/models/composition.rb +447 -0
- data/lib/api-sdk-rb/models/composition_data_source.rb +287 -0
- data/lib/api-sdk-rb/models/composition_data_source_response.rb +247 -0
- data/lib/api-sdk-rb/models/composition_entries_description.rb +258 -0
- data/lib/api-sdk-rb/models/composition_entries_description_response.rb +247 -0
- data/lib/api-sdk-rb/models/composition_entries_reading.rb +368 -0
- data/lib/api-sdk-rb/models/composition_entries_reading_response.rb +247 -0
- data/lib/api-sdk-rb/models/composition_entry_aggregate_tally.rb +271 -0
- data/lib/api-sdk-rb/models/composition_entry_aggregates_block.rb +252 -0
- data/lib/api-sdk-rb/models/composition_entry_column.rb +239 -0
- data/lib/api-sdk-rb/models/composition_entry_delete_success.rb +237 -0
- data/lib/api-sdk-rb/models/composition_entry_delete_success_data.rb +221 -0
- data/lib/api-sdk-rb/models/composition_entry_item.rb +274 -0
- data/lib/api-sdk-rb/models/composition_entry_items_meta.rb +279 -0
- data/lib/api-sdk-rb/models/composition_entry_items_page_success.rb +255 -0
- data/lib/api-sdk-rb/models/composition_entry_table.rb +269 -0
- data/lib/api-sdk-rb/models/composition_entry_tally.rb +254 -0
- data/lib/api-sdk-rb/models/composition_response.rb +247 -0
- data/lib/api-sdk-rb/models/composition_version.rb +255 -0
- data/lib/api-sdk-rb/models/content_check_finding.rb +260 -0
- data/lib/api-sdk-rb/models/content_item_write_result.rb +266 -0
- data/lib/api-sdk-rb/models/content_item_write_result_validation_result.rb +236 -0
- data/lib/api-sdk-rb/models/copy_partner_preset_request.rb +243 -0
- data/lib/api-sdk-rb/models/create_canvas_request.rb +291 -0
- data/lib/api-sdk-rb/models/create_composition_content_item201_response.rb +246 -0
- data/lib/api-sdk-rb/models/create_composition_content_item_request.rb +233 -0
- data/lib/api-sdk-rb/models/create_composition_database_record201_response.rb +249 -0
- data/lib/api-sdk-rb/models/create_composition_from_preset_request.rb +259 -0
- data/lib/api-sdk-rb/models/create_composition_from_widget201_response.rb +246 -0
- data/lib/api-sdk-rb/models/create_composition_from_widget_request.rb +267 -0
- data/lib/api-sdk-rb/models/create_user_api_key_request.rb +335 -0
- data/lib/api-sdk-rb/models/create_widget201_response.rb +246 -0
- data/lib/api-sdk-rb/models/create_widget201_response_data.rb +493 -0
- data/lib/api-sdk-rb/models/created_user_api_key.rb +384 -0
- data/lib/api-sdk-rb/models/created_user_api_key_response.rb +247 -0
- data/lib/api-sdk-rb/models/delete_composition_content_item_response.rb +247 -0
- data/lib/api-sdk-rb/models/delete_composition_content_item_response_data.rb +223 -0
- data/lib/api-sdk-rb/models/delete_composition_data_source_response.rb +247 -0
- data/lib/api-sdk-rb/models/delete_composition_data_source_response_data.rb +222 -0
- data/lib/api-sdk-rb/models/delete_managed_user200_response.rb +246 -0
- data/lib/api-sdk-rb/models/delete_personal_workspace_domain_response.rb +247 -0
- data/lib/api-sdk-rb/models/delete_personal_workspace_domain_response_data.rb +214 -0
- data/lib/api-sdk-rb/models/delete_user_api_key_response.rb +247 -0
- data/lib/api-sdk-rb/models/delete_user_api_key_response_data.rb +214 -0
- data/lib/api-sdk-rb/models/design_defaults.rb +221 -0
- data/lib/api-sdk-rb/models/duplicate_composition202_response.rb +246 -0
- data/lib/api-sdk-rb/models/duplicate_composition202_response_data.rb +215 -0
- data/lib/api-sdk-rb/models/duplicate_composition_request.rb +227 -0
- data/lib/api-sdk-rb/models/editor_session.rb +367 -0
- data/lib/api-sdk-rb/models/editor_session_response.rb +247 -0
- data/lib/api-sdk-rb/models/entitlement.rb +350 -0
- data/lib/api-sdk-rb/models/error_detail.rb +317 -0
- data/lib/api-sdk-rb/models/error_response.rb +255 -0
- data/lib/api-sdk-rb/models/export_composition_entry_items200_response.rb +255 -0
- data/lib/api-sdk-rb/models/export_composition_entry_items200_response_meta.rb +237 -0
- data/lib/api-sdk-rb/models/get_ai_answers_knowledge200_response.rb +246 -0
- data/lib/api-sdk-rb/models/get_all_canvases_response.rb +247 -0
- data/lib/api-sdk-rb/models/get_all_canvases_response_data.rb +244 -0
- data/lib/api-sdk-rb/models/get_all_compositions200_response.rb +248 -0
- data/lib/api-sdk-rb/models/get_all_managed_users200_response.rb +248 -0
- data/lib/api-sdk-rb/models/get_composition_content_response.rb +247 -0
- data/lib/api-sdk-rb/models/get_composition_content_schema_response.rb +247 -0
- data/lib/api-sdk-rb/models/get_composition_content_schema_response_data.rb +261 -0
- data/lib/api-sdk-rb/models/get_composition_data_source_response.rb +243 -0
- data/lib/api-sdk-rb/models/get_composition_database_records200_response.rb +248 -0
- data/lib/api-sdk-rb/models/get_composition_design_response.rb +247 -0
- data/lib/api-sdk-rb/models/get_composition_design_schema_response.rb +247 -0
- data/lib/api-sdk-rb/models/get_composition_design_schema_response_data.rb +262 -0
- data/lib/api-sdk-rb/models/get_composition_embed_schema_response.rb +247 -0
- data/lib/api-sdk-rb/models/get_composition_embed_schema_response_data.rb +302 -0
- data/lib/api-sdk-rb/models/get_composition_embed_settings_response.rb +247 -0
- data/lib/api-sdk-rb/models/get_composition_preview_response.rb +247 -0
- data/lib/api-sdk-rb/models/get_composition_preview_response_data.rb +245 -0
- data/lib/api-sdk-rb/models/get_composition_versions200_response.rb +248 -0
- data/lib/api-sdk-rb/models/get_compositions_batch_request.rb +243 -0
- data/lib/api-sdk-rb/models/get_compositions_batch_response.rb +247 -0
- data/lib/api-sdk-rb/models/get_compositions_batch_response_data.rb +227 -0
- data/lib/api-sdk-rb/models/get_invoices_by_partner_id200_response.rb +248 -0
- data/lib/api-sdk-rb/models/get_managed_user_entitlements_response.rb +247 -0
- data/lib/api-sdk-rb/models/get_managed_user_entitlements_response_data.rb +225 -0
- data/lib/api-sdk-rb/models/get_managed_user_limits200_response.rb +246 -0
- data/lib/api-sdk-rb/models/get_managed_user_storage_usage200_response.rb +246 -0
- data/lib/api-sdk-rb/models/get_managed_user_storage_usage200_response_data.rb +253 -0
- data/lib/api-sdk-rb/models/get_managed_user_storage_usage200_response_data_by_purpose.rb +241 -0
- data/lib/api-sdk-rb/models/get_managed_users_by_manager_id_response.rb +247 -0
- data/lib/api-sdk-rb/models/get_managed_users_by_manager_id_response_data.rb +243 -0
- data/lib/api-sdk-rb/models/get_partner_billing_overview200_response.rb +246 -0
- data/lib/api-sdk-rb/models/get_partner_credit_transactions200_response.rb +248 -0
- data/lib/api-sdk-rb/models/get_partner_design_defaults200_response.rb +246 -0
- data/lib/api-sdk-rb/models/get_partner_entitlements_response.rb +247 -0
- data/lib/api-sdk-rb/models/get_partner_entitlements_response_data.rb +225 -0
- data/lib/api-sdk-rb/models/get_personal_workspace_domains200_response.rb +248 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response.rb +348 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_data_source.rb +223 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_direct.rb +234 -0
- data/lib/api-sdk-rb/models/get_user_adapter_connections200_response.rb +248 -0
- data/lib/api-sdk-rb/models/get_user_api_key_usage_logs_response.rb +247 -0
- data/lib/api-sdk-rb/models/get_user_api_key_usage_logs_response_data.rb +223 -0
- data/lib/api-sdk-rb/models/get_user_api_keys200_response.rb +248 -0
- data/lib/api-sdk-rb/models/get_widgets200_response.rb +248 -0
- data/lib/api-sdk-rb/models/get_widgets_batch_request.rb +223 -0
- data/lib/api-sdk-rb/models/get_widgets_batch_response.rb +247 -0
- data/lib/api-sdk-rb/models/get_widgets_batch_response_data.rb +227 -0
- data/lib/api-sdk-rb/models/get_widgets_batch_response_data_errors_inner.rb +223 -0
- data/lib/api-sdk-rb/models/list_partner_presets200_response.rb +248 -0
- data/lib/api-sdk-rb/models/managed_user.rb +312 -0
- data/lib/api-sdk-rb/models/managed_user_entries_meta.rb +274 -0
- data/lib/api-sdk-rb/models/managed_user_entries_page_success.rb +255 -0
- data/lib/api-sdk-rb/models/managed_user_entry_item.rb +313 -0
- data/lib/api-sdk-rb/models/managed_user_limits.rb +264 -0
- data/lib/api-sdk-rb/models/managed_user_operation_usage.rb +291 -0
- data/lib/api-sdk-rb/models/managed_user_removal.rb +239 -0
- data/lib/api-sdk-rb/models/managed_user_response.rb +247 -0
- data/lib/api-sdk-rb/models/managed_user_usage.rb +308 -0
- data/lib/api-sdk-rb/models/managed_user_usage_response.rb +247 -0
- data/lib/api-sdk-rb/models/managed_user_usage_totals.rb +270 -0
- data/lib/api-sdk-rb/models/my_partner.rb +368 -0
- data/lib/api-sdk-rb/models/my_partners.rb +288 -0
- data/lib/api-sdk-rb/models/my_partners_response.rb +247 -0
- data/lib/api-sdk-rb/models/new_composition.rb +350 -0
- data/lib/api-sdk-rb/models/new_editor_session.rb +340 -0
- data/lib/api-sdk-rb/models/new_managed_user.rb +242 -0
- data/lib/api-sdk-rb/models/new_widget.rb +434 -0
- data/lib/api-sdk-rb/models/operations_id_get_response.rb +247 -0
- data/lib/api-sdk-rb/models/operations_id_get_response_data.rb +348 -0
- data/lib/api-sdk-rb/models/partner_analytics_by_managed_user.rb +272 -0
- data/lib/api-sdk-rb/models/partner_analytics_by_managed_user_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_analytics_of_day.rb +270 -0
- data/lib/api-sdk-rb/models/partner_analytics_of_managed_user.rb +354 -0
- data/lib/api-sdk-rb/models/partner_analytics_of_widget.rb +300 -0
- data/lib/api-sdk-rb/models/partner_analytics_summary.rb +336 -0
- data/lib/api-sdk-rb/models/partner_analytics_summary_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_analytics_timeline.rb +270 -0
- data/lib/api-sdk-rb/models/partner_analytics_timeline_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_analytics_top_widgets.rb +269 -0
- data/lib/api-sdk-rb/models/partner_analytics_top_widgets_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_billing_overview.rb +265 -0
- data/lib/api-sdk-rb/models/partner_billing_overview_billing_integration.rb +304 -0
- data/lib/api-sdk-rb/models/partner_billing_overview_operational_credits.rb +276 -0
- data/lib/api-sdk-rb/models/partner_billing_overview_partner.rb +304 -0
- data/lib/api-sdk-rb/models/partner_contract.rb +400 -0
- data/lib/api-sdk-rb/models/partner_contract_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_customization.rb +414 -0
- data/lib/api-sdk-rb/models/partner_data_database.rb +332 -0
- data/lib/api-sdk-rb/models/partner_data_database_removal.rb +222 -0
- data/lib/api-sdk-rb/models/partner_data_database_removal_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_data_database_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_entry_context_secret.rb +239 -0
- data/lib/api-sdk-rb/models/partner_entry_context_secret_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_entry_context_signing.rb +299 -0
- data/lib/api-sdk-rb/models/partner_entry_context_signing_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_extra_credits_invoice.rb +394 -0
- data/lib/api-sdk-rb/models/partner_extra_credits_invoice_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_invoice.rb +489 -0
- data/lib/api-sdk-rb/models/partner_notification.rb +358 -0
- data/lib/api-sdk-rb/models/partner_notification_default_recipients.rb +244 -0
- data/lib/api-sdk-rb/models/partner_notification_delivery.rb +466 -0
- data/lib/api-sdk-rb/models/partner_notification_delivery_log.rb +224 -0
- data/lib/api-sdk-rb/models/partner_notification_delivery_log_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_notification_delivery_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_notification_event.rb +351 -0
- data/lib/api-sdk-rb/models/partner_notification_event_type.rb +54 -0
- data/lib/api-sdk-rb/models/partner_notification_page.rb +237 -0
- data/lib/api-sdk-rb/models/partner_notification_page_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_notification_settings.rb +366 -0
- data/lib/api-sdk-rb/models/partner_notification_settings_change.rb +235 -0
- data/lib/api-sdk-rb/models/partner_notification_settings_change_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_notification_settings_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_notification_test_event_request.rb +244 -0
- data/lib/api-sdk-rb/models/partner_notification_test_event_result.rb +263 -0
- data/lib/api-sdk-rb/models/partner_notification_test_event_result_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_preset.rb +344 -0
- data/lib/api-sdk-rb/models/partner_preset_copy.rb +308 -0
- data/lib/api-sdk-rb/models/partner_preset_copy_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_preset_removal.rb +222 -0
- data/lib/api-sdk-rb/models/partner_preset_removal_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_preset_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_report_page.rb +257 -0
- data/lib/api-sdk-rb/models/partner_report_period.rb +240 -0
- data/lib/api-sdk-rb/models/partner_storage_destination.rb +393 -0
- data/lib/api-sdk-rb/models/partner_storage_destination_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_storage_removal.rb +222 -0
- data/lib/api-sdk-rb/models/partner_storage_removal_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_storage_usage.rb +272 -0
- data/lib/api-sdk-rb/models/partner_storage_usage_of_managed_user.rb +334 -0
- data/lib/api-sdk-rb/models/partner_storage_usage_response.rb +247 -0
- data/lib/api-sdk-rb/models/partner_storage_usage_totals.rb +273 -0
- data/lib/api-sdk-rb/models/personal_workspace_domain.rb +275 -0
- data/lib/api-sdk-rb/models/personal_workspace_domain_result.rb +237 -0
- data/lib/api-sdk-rb/models/personal_workspace_domain_result_response.rb +247 -0
- data/lib/api-sdk-rb/models/post_public_composition_embed_status200_response.rb +246 -0
- data/lib/api-sdk-rb/models/post_public_composition_embed_status200_response_data.rb +239 -0
- data/lib/api-sdk-rb/models/post_public_composition_embed_status_request.rb +251 -0
- data/lib/api-sdk-rb/models/public_adapter_call_error.rb +265 -0
- data/lib/api-sdk-rb/models/public_adapter_call_request.rb +332 -0
- data/lib/api-sdk-rb/models/public_adapter_call_result.rb +237 -0
- data/lib/api-sdk-rb/models/public_adapter_call_result_data.rb +224 -0
- data/lib/api-sdk-rb/models/public_adapter_file_result.rb +237 -0
- data/lib/api-sdk-rb/models/public_adapter_file_result_data.rb +221 -0
- data/lib/api-sdk-rb/models/public_adapter_file_result_data_file.rb +318 -0
- data/lib/api-sdk-rb/models/public_composition_entry_created.rb +237 -0
- data/lib/api-sdk-rb/models/public_composition_entry_created_data.rb +253 -0
- data/lib/api-sdk-rb/models/public_composition_entry_request.rb +246 -0
- data/lib/api-sdk-rb/models/public_embed_failure.rb +291 -0
- data/lib/api-sdk-rb/models/public_embed_failure_details.rb +260 -0
- data/lib/api-sdk-rb/models/public_embed_failure_error.rb +283 -0
- data/lib/api-sdk-rb/models/purpose_storage_bucket.rb +237 -0
- data/lib/api-sdk-rb/models/remove_ai_answers_knowledge_document200_response.rb +246 -0
- data/lib/api-sdk-rb/models/remove_user_adapter_connection200_response.rb +246 -0
- data/lib/api-sdk-rb/models/request_extra_credits.rb +250 -0
- data/lib/api-sdk-rb/models/response_meta.rb +297 -0
- data/lib/api-sdk-rb/models/revoke_managed_user_editor_sessions_response.rb +247 -0
- data/lib/api-sdk-rb/models/revoke_managed_user_editor_sessions_response_data.rb +215 -0
- data/lib/api-sdk-rb/models/set_adapter_connection_request.rb +241 -0
- data/lib/api-sdk-rb/models/set_composition_data_source_request.rb +284 -0
- data/lib/api-sdk-rb/models/set_dynamic_content_request.rb +266 -0
- data/lib/api-sdk-rb/models/set_dynamic_content_response.rb +247 -0
- data/lib/api-sdk-rb/models/set_dynamic_content_response_data.rb +251 -0
- data/lib/api-sdk-rb/models/set_dynamic_content_response_data_validation_result.rb +236 -0
- data/lib/api-sdk-rb/models/set_managed_user_limits_request.rb +241 -0
- data/lib/api-sdk-rb/models/set_partner_data_database_request.rb +222 -0
- data/lib/api-sdk-rb/models/set_partner_design_defaults_request.rb +217 -0
- data/lib/api-sdk-rb/models/set_partner_preset_request.rb +322 -0
- data/lib/api-sdk-rb/models/set_partner_storage_destination_request.rb +331 -0
- data/lib/api-sdk-rb/models/set_user_adapter_connection200_response.rb +246 -0
- data/lib/api-sdk-rb/models/success_response.rb +250 -0
- data/lib/api-sdk-rb/models/update_canvas_request.rb +236 -0
- data/lib/api-sdk-rb/models/update_composition.rb +285 -0
- data/lib/api-sdk-rb/models/update_composition_status_request.rb +256 -0
- data/lib/api-sdk-rb/models/update_domain_request.rb +223 -0
- data/lib/api-sdk-rb/models/update_managed_user.rb +235 -0
- data/lib/api-sdk-rb/models/update_partner_entry_context_signing_request.rb +222 -0
- data/lib/api-sdk-rb/models/update_partner_notification_settings_request.rb +289 -0
- data/lib/api-sdk-rb/models/update_user_api_key_request.rb +254 -0
- data/lib/api-sdk-rb/models/upload.rb +462 -0
- data/lib/api-sdk-rb/models/upload_limits.rb +269 -0
- data/lib/api-sdk-rb/models/upload_limits_response.rb +247 -0
- data/lib/api-sdk-rb/models/upload_response.rb +247 -0
- data/lib/api-sdk-rb/models/uploads_get200_response.rb +248 -0
- data/lib/api-sdk-rb/models/uploads_id_delete200_response.rb +246 -0
- data/lib/api-sdk-rb/models/uploads_id_delete200_response_data.rb +214 -0
- data/lib/api-sdk-rb/models/user_api_key.rb +382 -0
- data/lib/api-sdk-rb/models/user_api_key_response.rb +247 -0
- data/lib/api-sdk-rb/models/user_api_key_usage_log.rb +326 -0
- data/lib/api-sdk-rb/models/validate_composition_content_response.rb +247 -0
- data/lib/api-sdk-rb/models/validate_composition_content_response_data.rb +258 -0
- data/lib/api-sdk-rb/models/validate_token200_response.rb +246 -0
- data/lib/api-sdk-rb/models/validate_token200_response_data.rb +286 -0
- data/lib/api-sdk-rb/models/widget.rb +475 -0
- data/lib/api-sdk-rb/version.rb +15 -0
- data/lib/api-sdk-rb.rb +319 -0
- data/spec/api/canvases_api_spec.rb +104 -0
- data/spec/api/compositions_api_spec.rb +578 -0
- data/spec/api/credits_api_spec.rb +62 -0
- data/spec/api/entitlements_api_spec.rb +65 -0
- data/spec/api/invoices_api_spec.rb +50 -0
- data/spec/api/managed_users_api_spec.rb +256 -0
- data/spec/api/operations_api_spec.rb +47 -0
- data/spec/api/partner_api_spec.rb +1895 -0
- data/spec/api/partners_api_spec.rb +525 -0
- data/spec/api/public_embed_api_spec.rb +115 -0
- data/spec/api/tokens_api_spec.rb +45 -0
- data/spec/api/uploads_api_spec.rb +101 -0
- data/spec/api/users_api_spec.rb +195 -0
- data/spec/api/widgets_api_spec.rb +90 -0
- data/spec/models/account_credit_balance_response_spec.rb +48 -0
- data/spec/models/account_credit_balance_spec.rb +60 -0
- data/spec/models/account_credit_transaction_spec.rb +72 -0
- data/spec/models/adapter_connection_removal_spec.rb +36 -0
- data/spec/models/adapter_connection_spec.rb +76 -0
- data/spec/models/add_ai_answers_knowledge_document201_response_spec.rb +48 -0
- data/spec/models/add_ai_answers_knowledge_document_request_spec.rb +42 -0
- data/spec/models/add_domain_request_spec.rb +36 -0
- data/spec/models/ai_answers_knowledge_document_spec.rb +76 -0
- data/spec/models/ai_answers_knowledge_removal_spec.rb +36 -0
- data/spec/models/ai_answers_knowledge_spec.rb +42 -0
- data/spec/models/ai_answers_knowledge_totals_spec.rb +54 -0
- data/spec/models/api_key_scope_spec.rb +30 -0
- data/spec/models/canvas_response_spec.rb +48 -0
- data/spec/models/canvas_spec.rb +78 -0
- data/spec/models/check_composition_access_response_data_spec.rb +42 -0
- data/spec/models/check_composition_access_response_spec.rb +48 -0
- data/spec/models/composition_data_source_response_spec.rb +48 -0
- data/spec/models/composition_data_source_spec.rb +42 -0
- data/spec/models/composition_entries_description_response_spec.rb +48 -0
- data/spec/models/composition_entries_description_spec.rb +48 -0
- data/spec/models/composition_entries_reading_response_spec.rb +48 -0
- data/spec/models/composition_entries_reading_spec.rb +84 -0
- data/spec/models/composition_entry_aggregate_tally_spec.rb +66 -0
- data/spec/models/composition_entry_aggregates_block_spec.rb +48 -0
- data/spec/models/composition_entry_column_spec.rb +42 -0
- data/spec/models/composition_entry_delete_success_data_spec.rb +36 -0
- data/spec/models/composition_entry_delete_success_spec.rb +42 -0
- data/spec/models/composition_entry_item_spec.rb +60 -0
- data/spec/models/composition_entry_items_meta_spec.rb +52 -0
- data/spec/models/composition_entry_items_page_success_spec.rb +48 -0
- data/spec/models/composition_entry_table_spec.rb +48 -0
- data/spec/models/composition_entry_tally_spec.rb +42 -0
- data/spec/models/composition_response_spec.rb +48 -0
- data/spec/models/composition_spec.rb +124 -0
- data/spec/models/composition_version_spec.rb +60 -0
- data/spec/models/content_check_finding_spec.rb +54 -0
- data/spec/models/content_item_write_result_spec.rb +66 -0
- data/spec/models/content_item_write_result_validation_result_spec.rb +48 -0
- data/spec/models/copy_partner_preset_request_spec.rb +36 -0
- data/spec/models/create_canvas_request_spec.rb +66 -0
- data/spec/models/create_composition_content_item201_response_spec.rb +48 -0
- data/spec/models/create_composition_content_item_request_spec.rb +36 -0
- data/spec/models/create_composition_database_record201_response_spec.rb +48 -0
- data/spec/models/create_composition_from_preset_request_spec.rb +60 -0
- data/spec/models/create_composition_from_widget201_response_spec.rb +48 -0
- data/spec/models/create_composition_from_widget_request_spec.rb +66 -0
- data/spec/models/create_user_api_key_request_spec.rb +58 -0
- data/spec/models/create_widget201_response_data_spec.rb +172 -0
- data/spec/models/create_widget201_response_spec.rb +48 -0
- data/spec/models/created_user_api_key_response_spec.rb +48 -0
- data/spec/models/created_user_api_key_spec.rb +88 -0
- data/spec/models/delete_composition_content_item_response_data_spec.rb +42 -0
- data/spec/models/delete_composition_content_item_response_spec.rb +48 -0
- data/spec/models/delete_composition_data_source_response_data_spec.rb +36 -0
- data/spec/models/delete_composition_data_source_response_spec.rb +48 -0
- data/spec/models/delete_managed_user200_response_spec.rb +48 -0
- data/spec/models/delete_personal_workspace_domain_response_data_spec.rb +36 -0
- data/spec/models/delete_personal_workspace_domain_response_spec.rb +48 -0
- data/spec/models/delete_user_api_key_response_data_spec.rb +36 -0
- data/spec/models/delete_user_api_key_response_spec.rb +48 -0
- data/spec/models/design_defaults_spec.rb +36 -0
- data/spec/models/duplicate_composition202_response_data_spec.rb +36 -0
- data/spec/models/duplicate_composition202_response_spec.rb +48 -0
- data/spec/models/duplicate_composition_request_spec.rb +42 -0
- data/spec/models/editor_session_response_spec.rb +48 -0
- data/spec/models/editor_session_spec.rb +88 -0
- data/spec/models/entitlement_spec.rb +100 -0
- data/spec/models/error_detail_spec.rb +84 -0
- data/spec/models/error_response_spec.rb +48 -0
- data/spec/models/export_composition_entry_items200_response_meta_spec.rb +42 -0
- data/spec/models/export_composition_entry_items200_response_spec.rb +48 -0
- data/spec/models/get_ai_answers_knowledge200_response_spec.rb +48 -0
- data/spec/models/get_all_canvases_response_data_spec.rb +54 -0
- data/spec/models/get_all_canvases_response_spec.rb +48 -0
- data/spec/models/get_all_compositions200_response_spec.rb +48 -0
- data/spec/models/get_all_managed_users200_response_spec.rb +48 -0
- data/spec/models/get_composition_content_response_spec.rb +48 -0
- data/spec/models/get_composition_content_schema_response_data_spec.rb +66 -0
- data/spec/models/get_composition_content_schema_response_spec.rb +48 -0
- data/spec/models/get_composition_data_source_response_spec.rb +48 -0
- data/spec/models/get_composition_database_records200_response_spec.rb +48 -0
- data/spec/models/get_composition_design_response_spec.rb +48 -0
- data/spec/models/get_composition_design_schema_response_data_spec.rb +66 -0
- data/spec/models/get_composition_design_schema_response_spec.rb +48 -0
- data/spec/models/get_composition_embed_schema_response_data_spec.rb +70 -0
- data/spec/models/get_composition_embed_schema_response_spec.rb +48 -0
- data/spec/models/get_composition_embed_settings_response_spec.rb +48 -0
- data/spec/models/get_composition_preview_response_data_spec.rb +54 -0
- data/spec/models/get_composition_preview_response_spec.rb +48 -0
- data/spec/models/get_composition_versions200_response_spec.rb +48 -0
- data/spec/models/get_compositions_batch_request_spec.rb +36 -0
- data/spec/models/get_compositions_batch_response_data_spec.rb +42 -0
- data/spec/models/get_compositions_batch_response_spec.rb +48 -0
- data/spec/models/get_invoices_by_partner_id200_response_spec.rb +48 -0
- data/spec/models/get_managed_user_entitlements_response_data_spec.rb +42 -0
- data/spec/models/get_managed_user_entitlements_response_spec.rb +48 -0
- data/spec/models/get_managed_user_limits200_response_spec.rb +48 -0
- data/spec/models/get_managed_user_storage_usage200_response_data_by_purpose_spec.rb +54 -0
- data/spec/models/get_managed_user_storage_usage200_response_data_spec.rb +48 -0
- data/spec/models/get_managed_user_storage_usage200_response_spec.rb +48 -0
- data/spec/models/get_managed_users_by_manager_id_response_data_spec.rb +54 -0
- data/spec/models/get_managed_users_by_manager_id_response_spec.rb +48 -0
- data/spec/models/get_partner_billing_overview200_response_spec.rb +48 -0
- data/spec/models/get_partner_credit_transactions200_response_spec.rb +48 -0
- data/spec/models/get_partner_design_defaults200_response_spec.rb +48 -0
- data/spec/models/get_partner_entitlements_response_data_spec.rb +42 -0
- data/spec/models/get_partner_entitlements_response_spec.rb +48 -0
- data/spec/models/get_personal_workspace_domains200_response_spec.rb +48 -0
- data/spec/models/get_public_composition_embed200_response_data_source_spec.rb +42 -0
- data/spec/models/get_public_composition_embed200_response_direct_spec.rb +48 -0
- data/spec/models/get_public_composition_embed200_response_spec.rb +120 -0
- data/spec/models/get_user_adapter_connections200_response_spec.rb +48 -0
- data/spec/models/get_user_api_key_usage_logs_response_data_spec.rb +36 -0
- data/spec/models/get_user_api_key_usage_logs_response_spec.rb +48 -0
- data/spec/models/get_user_api_keys200_response_spec.rb +48 -0
- data/spec/models/get_widgets200_response_spec.rb +48 -0
- data/spec/models/get_widgets_batch_request_spec.rb +36 -0
- data/spec/models/get_widgets_batch_response_data_errors_inner_spec.rb +42 -0
- data/spec/models/get_widgets_batch_response_data_spec.rb +42 -0
- data/spec/models/get_widgets_batch_response_spec.rb +48 -0
- data/spec/models/list_partner_presets200_response_spec.rb +48 -0
- data/spec/models/managed_user_entries_meta_spec.rb +60 -0
- data/spec/models/managed_user_entries_page_success_spec.rb +48 -0
- data/spec/models/managed_user_entry_item_spec.rb +72 -0
- data/spec/models/managed_user_limits_spec.rb +54 -0
- data/spec/models/managed_user_operation_usage_spec.rb +60 -0
- data/spec/models/managed_user_removal_spec.rb +42 -0
- data/spec/models/managed_user_response_spec.rb +48 -0
- data/spec/models/managed_user_spec.rb +72 -0
- data/spec/models/managed_user_usage_response_spec.rb +48 -0
- data/spec/models/managed_user_usage_spec.rb +66 -0
- data/spec/models/managed_user_usage_totals_spec.rb +54 -0
- data/spec/models/my_partner_spec.rb +88 -0
- data/spec/models/my_partners_response_spec.rb +48 -0
- data/spec/models/my_partners_spec.rb +52 -0
- data/spec/models/new_composition_spec.rb +96 -0
- data/spec/models/new_editor_session_spec.rb +58 -0
- data/spec/models/new_managed_user_spec.rb +48 -0
- data/spec/models/new_widget_spec.rb +100 -0
- data/spec/models/operations_id_get_response_data_spec.rb +82 -0
- data/spec/models/operations_id_get_response_spec.rb +48 -0
- data/spec/models/partner_analytics_by_managed_user_response_spec.rb +48 -0
- data/spec/models/partner_analytics_by_managed_user_spec.rb +54 -0
- data/spec/models/partner_analytics_of_day_spec.rb +54 -0
- data/spec/models/partner_analytics_of_managed_user_spec.rb +90 -0
- data/spec/models/partner_analytics_of_widget_spec.rb +66 -0
- data/spec/models/partner_analytics_summary_response_spec.rb +48 -0
- data/spec/models/partner_analytics_summary_spec.rb +78 -0
- data/spec/models/partner_analytics_timeline_response_spec.rb +48 -0
- data/spec/models/partner_analytics_timeline_spec.rb +54 -0
- data/spec/models/partner_analytics_top_widgets_response_spec.rb +48 -0
- data/spec/models/partner_analytics_top_widgets_spec.rb +54 -0
- data/spec/models/partner_billing_overview_billing_integration_spec.rb +58 -0
- data/spec/models/partner_billing_overview_operational_credits_spec.rb +54 -0
- data/spec/models/partner_billing_overview_partner_spec.rb +58 -0
- data/spec/models/partner_billing_overview_spec.rb +54 -0
- data/spec/models/partner_contract_response_spec.rb +48 -0
- data/spec/models/partner_contract_spec.rb +130 -0
- data/spec/models/partner_customization_spec.rb +136 -0
- data/spec/models/partner_data_database_removal_response_spec.rb +48 -0
- data/spec/models/partner_data_database_removal_spec.rb +36 -0
- data/spec/models/partner_data_database_response_spec.rb +48 -0
- data/spec/models/partner_data_database_spec.rb +78 -0
- data/spec/models/partner_entry_context_secret_response_spec.rb +48 -0
- data/spec/models/partner_entry_context_secret_spec.rb +42 -0
- data/spec/models/partner_entry_context_signing_response_spec.rb +48 -0
- data/spec/models/partner_entry_context_signing_spec.rb +66 -0
- data/spec/models/partner_extra_credits_invoice_response_spec.rb +48 -0
- data/spec/models/partner_extra_credits_invoice_spec.rb +102 -0
- data/spec/models/partner_invoice_spec.rb +178 -0
- data/spec/models/partner_notification_default_recipients_spec.rb +42 -0
- data/spec/models/partner_notification_delivery_log_response_spec.rb +48 -0
- data/spec/models/partner_notification_delivery_log_spec.rb +36 -0
- data/spec/models/partner_notification_delivery_response_spec.rb +48 -0
- data/spec/models/partner_notification_delivery_spec.rb +128 -0
- data/spec/models/partner_notification_event_spec.rb +74 -0
- data/spec/models/partner_notification_event_type_spec.rb +30 -0
- data/spec/models/partner_notification_page_response_spec.rb +48 -0
- data/spec/models/partner_notification_page_spec.rb +42 -0
- data/spec/models/partner_notification_settings_change_response_spec.rb +48 -0
- data/spec/models/partner_notification_settings_change_spec.rb +42 -0
- data/spec/models/partner_notification_settings_response_spec.rb +48 -0
- data/spec/models/partner_notification_settings_spec.rb +90 -0
- data/spec/models/partner_notification_spec.rb +76 -0
- data/spec/models/partner_notification_test_event_request_spec.rb +36 -0
- data/spec/models/partner_notification_test_event_result_response_spec.rb +48 -0
- data/spec/models/partner_notification_test_event_result_spec.rb +54 -0
- data/spec/models/partner_preset_copy_response_spec.rb +48 -0
- data/spec/models/partner_preset_copy_spec.rb +66 -0
- data/spec/models/partner_preset_removal_response_spec.rb +48 -0
- data/spec/models/partner_preset_removal_spec.rb +36 -0
- data/spec/models/partner_preset_response_spec.rb +48 -0
- data/spec/models/partner_preset_spec.rb +84 -0
- data/spec/models/partner_report_page_spec.rb +48 -0
- data/spec/models/partner_report_period_spec.rb +42 -0
- data/spec/models/partner_storage_destination_response_spec.rb +48 -0
- data/spec/models/partner_storage_destination_spec.rb +102 -0
- data/spec/models/partner_storage_removal_response_spec.rb +48 -0
- data/spec/models/partner_storage_removal_spec.rb +36 -0
- data/spec/models/partner_storage_usage_of_managed_user_spec.rb +84 -0
- data/spec/models/partner_storage_usage_response_spec.rb +48 -0
- data/spec/models/partner_storage_usage_spec.rb +54 -0
- data/spec/models/partner_storage_usage_totals_spec.rb +54 -0
- data/spec/models/personal_workspace_domain_result_response_spec.rb +48 -0
- data/spec/models/personal_workspace_domain_result_spec.rb +42 -0
- data/spec/models/personal_workspace_domain_spec.rb +60 -0
- data/spec/models/post_public_composition_embed_status200_response_data_spec.rb +40 -0
- data/spec/models/post_public_composition_embed_status200_response_spec.rb +48 -0
- data/spec/models/post_public_composition_embed_status_request_spec.rb +36 -0
- data/spec/models/public_adapter_call_error_spec.rb +54 -0
- data/spec/models/public_adapter_call_request_spec.rb +60 -0
- data/spec/models/public_adapter_call_result_data_spec.rb +36 -0
- data/spec/models/public_adapter_call_result_spec.rb +42 -0
- data/spec/models/public_adapter_file_result_data_file_spec.rb +66 -0
- data/spec/models/public_adapter_file_result_data_spec.rb +36 -0
- data/spec/models/public_adapter_file_result_spec.rb +42 -0
- data/spec/models/public_composition_entry_created_data_spec.rb +48 -0
- data/spec/models/public_composition_entry_created_spec.rb +42 -0
- data/spec/models/public_composition_entry_request_spec.rb +48 -0
- data/spec/models/public_embed_failure_details_spec.rb +46 -0
- data/spec/models/public_embed_failure_error_spec.rb +66 -0
- data/spec/models/public_embed_failure_spec.rb +66 -0
- data/spec/models/purpose_storage_bucket_spec.rb +42 -0
- data/spec/models/remove_ai_answers_knowledge_document200_response_spec.rb +48 -0
- data/spec/models/remove_user_adapter_connection200_response_spec.rb +48 -0
- data/spec/models/request_extra_credits_spec.rb +36 -0
- data/spec/models/response_meta_spec.rb +84 -0
- data/spec/models/revoke_managed_user_editor_sessions_response_data_spec.rb +36 -0
- data/spec/models/revoke_managed_user_editor_sessions_response_spec.rb +48 -0
- data/spec/models/set_adapter_connection_request_spec.rb +36 -0
- data/spec/models/set_composition_data_source_request_spec.rb +42 -0
- data/spec/models/set_dynamic_content_request_spec.rb +60 -0
- data/spec/models/set_dynamic_content_response_data_spec.rb +60 -0
- data/spec/models/set_dynamic_content_response_data_validation_result_spec.rb +48 -0
- data/spec/models/set_dynamic_content_response_spec.rb +48 -0
- data/spec/models/set_managed_user_limits_request_spec.rb +36 -0
- data/spec/models/set_partner_data_database_request_spec.rb +36 -0
- data/spec/models/set_partner_design_defaults_request_spec.rb +36 -0
- data/spec/models/set_partner_preset_request_spec.rb +54 -0
- data/spec/models/set_partner_storage_destination_request_spec.rb +78 -0
- data/spec/models/set_user_adapter_connection200_response_spec.rb +48 -0
- data/spec/models/success_response_spec.rb +48 -0
- data/spec/models/update_canvas_request_spec.rb +48 -0
- data/spec/models/update_composition_spec.rb +78 -0
- data/spec/models/update_composition_status_request_spec.rb +40 -0
- data/spec/models/update_domain_request_spec.rb +36 -0
- data/spec/models/update_managed_user_spec.rb +48 -0
- data/spec/models/update_partner_entry_context_signing_request_spec.rb +36 -0
- data/spec/models/update_partner_notification_settings_request_spec.rb +54 -0
- data/spec/models/update_user_api_key_request_spec.rb +42 -0
- data/spec/models/upload_limits_response_spec.rb +48 -0
- data/spec/models/upload_limits_spec.rb +66 -0
- data/spec/models/upload_response_spec.rb +48 -0
- data/spec/models/upload_spec.rb +126 -0
- data/spec/models/uploads_get200_response_spec.rb +48 -0
- data/spec/models/uploads_id_delete200_response_data_spec.rb +36 -0
- data/spec/models/uploads_id_delete200_response_spec.rb +48 -0
- data/spec/models/user_api_key_response_spec.rb +48 -0
- data/spec/models/user_api_key_spec.rb +88 -0
- data/spec/models/user_api_key_usage_log_spec.rb +78 -0
- data/spec/models/validate_composition_content_response_data_spec.rb +54 -0
- data/spec/models/validate_composition_content_response_spec.rb +48 -0
- data/spec/models/validate_token200_response_data_spec.rb +64 -0
- data/spec/models/validate_token200_response_spec.rb +48 -0
- data/spec/models/widget_spec.rb +166 -0
- data/spec/spec_helper.rb +111 -0
- metadata +1216 -0
|
@@ -0,0 +1,3267 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Widgetic API Gateway
|
|
3
|
+
|
|
4
|
+
#API documentation for the Widgetic API Gateway
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module ApiSdkRb
|
|
16
|
+
class CompositionsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Add a document for a widget's AI to answer from
|
|
23
|
+
# Gives the widget's AI a document to answer visitors' questions from. Send the title and the plain text. The call returns once the document is ready to be used, which takes a few seconds, longer for a long text. **How it is used.** The text is cleaned, cut into short passages and each passage is turned into numbers (an embedding) so the widget can find the passages nearest to a question. When a visitor asks, the nearest passages and the question are shown to an AI model, which writes the answer from them and from nothing else; if the documents say nothing about the question the visitor is told so, and the owner is not charged for that question. The titles of the documents an answer used are shown to the visitor as its sources. **What leaves Widgetic.** The text of a document is sent to OpenAI to be embedded when it is added, and the passages used for a question are sent to the AI model that writes the answer. Say so in your privacy policy. **Treat every document as public.** An answer can quote or paraphrase anything a document says, to any visitor of the widget. Do not add passwords, keys, personal data or anything that must stay private. **Limits.** A widget holds up to 20 documents, each up to 100000 characters, and up to 400000 characters in all (`getAiAnswersKnowledge` reports the current numbers). Text only: convert PDF or Word files to text first. Adding a document costs no credits. The same text cannot be added twice to one widget (409). The caller must be allowed to change the widget. An API key needs the `content:write` scope. Adds are limited to ten in ten minutes per person.
|
|
24
|
+
# @param id [String] The widget (composition) to add the document to
|
|
25
|
+
# @param add_ai_answers_knowledge_document_request [AddAiAnswersKnowledgeDocumentRequest]
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
28
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
29
|
+
# @return [AddAiAnswersKnowledgeDocument201Response]
|
|
30
|
+
def add_ai_answers_knowledge_document_0(id, add_ai_answers_knowledge_document_request, opts = {})
|
|
31
|
+
data, _status_code, _headers = add_ai_answers_knowledge_document_0_with_http_info(id, add_ai_answers_knowledge_document_request, opts)
|
|
32
|
+
data
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Add a document for a widget's AI to answer from
|
|
36
|
+
# Gives the widget's AI a document to answer visitors' questions from. Send the title and the plain text. The call returns once the document is ready to be used, which takes a few seconds, longer for a long text. **How it is used.** The text is cleaned, cut into short passages and each passage is turned into numbers (an embedding) so the widget can find the passages nearest to a question. When a visitor asks, the nearest passages and the question are shown to an AI model, which writes the answer from them and from nothing else; if the documents say nothing about the question the visitor is told so, and the owner is not charged for that question. The titles of the documents an answer used are shown to the visitor as its sources. **What leaves Widgetic.** The text of a document is sent to OpenAI to be embedded when it is added, and the passages used for a question are sent to the AI model that writes the answer. Say so in your privacy policy. **Treat every document as public.** An answer can quote or paraphrase anything a document says, to any visitor of the widget. Do not add passwords, keys, personal data or anything that must stay private. **Limits.** A widget holds up to 20 documents, each up to 100000 characters, and up to 400000 characters in all (`getAiAnswersKnowledge` reports the current numbers). Text only: convert PDF or Word files to text first. Adding a document costs no credits. The same text cannot be added twice to one widget (409). The caller must be allowed to change the widget. An API key needs the `content:write` scope. Adds are limited to ten in ten minutes per person.
|
|
37
|
+
# @param id [String] The widget (composition) to add the document to
|
|
38
|
+
# @param add_ai_answers_knowledge_document_request [AddAiAnswersKnowledgeDocumentRequest]
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
41
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
42
|
+
# @return [Array<(AddAiAnswersKnowledgeDocument201Response, Integer, Hash)>] AddAiAnswersKnowledgeDocument201Response data, response status code and response headers
|
|
43
|
+
def add_ai_answers_knowledge_document_0_with_http_info(id, add_ai_answers_knowledge_document_request, opts = {})
|
|
44
|
+
if @api_client.config.debugging
|
|
45
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.add_ai_answers_knowledge_document_0 ...'
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'id' is set
|
|
48
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.add_ai_answers_knowledge_document_0"
|
|
50
|
+
end
|
|
51
|
+
# verify the required parameter 'add_ai_answers_knowledge_document_request' is set
|
|
52
|
+
if @api_client.config.client_side_validation && add_ai_answers_knowledge_document_request.nil?
|
|
53
|
+
fail ArgumentError, "Missing the required parameter 'add_ai_answers_knowledge_document_request' when calling CompositionsApi.add_ai_answers_knowledge_document_0"
|
|
54
|
+
end
|
|
55
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
56
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.add_ai_answers_knowledge_document_0, the character length must be smaller than or equal to 255.'
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
60
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.add_ai_answers_knowledge_document_0, the character length must be great than or equal to 1.'
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# resource path
|
|
64
|
+
local_var_path = '/compositions/{id}/adapters/ai-answers/knowledge/documents'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
65
|
+
|
|
66
|
+
# query parameters
|
|
67
|
+
query_params = opts[:query_params] || {}
|
|
68
|
+
|
|
69
|
+
# header parameters
|
|
70
|
+
header_params = opts[:header_params] || {}
|
|
71
|
+
# HTTP header 'Accept' (if needed)
|
|
72
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
73
|
+
# HTTP header 'Content-Type'
|
|
74
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
75
|
+
if !content_type.nil?
|
|
76
|
+
header_params['Content-Type'] = content_type
|
|
77
|
+
end
|
|
78
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
79
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
80
|
+
|
|
81
|
+
# form parameters
|
|
82
|
+
form_params = opts[:form_params] || {}
|
|
83
|
+
|
|
84
|
+
# http body (model)
|
|
85
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(add_ai_answers_knowledge_document_request)
|
|
86
|
+
|
|
87
|
+
# return_type
|
|
88
|
+
return_type = opts[:debug_return_type] || 'AddAiAnswersKnowledgeDocument201Response'
|
|
89
|
+
|
|
90
|
+
# auth_names
|
|
91
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
92
|
+
|
|
93
|
+
new_options = opts.merge(
|
|
94
|
+
:operation => :"CompositionsApi.add_ai_answers_knowledge_document_0",
|
|
95
|
+
:header_params => header_params,
|
|
96
|
+
:query_params => query_params,
|
|
97
|
+
:form_params => form_params,
|
|
98
|
+
:body => post_body,
|
|
99
|
+
:auth_names => auth_names,
|
|
100
|
+
:return_type => return_type
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
104
|
+
if @api_client.config.debugging
|
|
105
|
+
@api_client.config.logger.debug "API called: CompositionsApi#add_ai_answers_knowledge_document_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
106
|
+
end
|
|
107
|
+
return data, status_code, headers
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Check Composition Access
|
|
111
|
+
# Checks if the authenticated user can access a specific composition based on workspace context and permissions.
|
|
112
|
+
# @param id [String] Composition ID
|
|
113
|
+
# @param [Hash] opts the optional parameters
|
|
114
|
+
# @return [CheckCompositionAccessResponse]
|
|
115
|
+
def check_composition_access_0(id, opts = {})
|
|
116
|
+
data, _status_code, _headers = check_composition_access_0_with_http_info(id, opts)
|
|
117
|
+
data
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Check Composition Access
|
|
121
|
+
# Checks if the authenticated user can access a specific composition based on workspace context and permissions.
|
|
122
|
+
# @param id [String] Composition ID
|
|
123
|
+
# @param [Hash] opts the optional parameters
|
|
124
|
+
# @return [Array<(CheckCompositionAccessResponse, Integer, Hash)>] CheckCompositionAccessResponse data, response status code and response headers
|
|
125
|
+
def check_composition_access_0_with_http_info(id, opts = {})
|
|
126
|
+
if @api_client.config.debugging
|
|
127
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.check_composition_access_0 ...'
|
|
128
|
+
end
|
|
129
|
+
# verify the required parameter 'id' is set
|
|
130
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
131
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.check_composition_access_0"
|
|
132
|
+
end
|
|
133
|
+
# resource path
|
|
134
|
+
local_var_path = '/compositions/{id}/access'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
135
|
+
|
|
136
|
+
# query parameters
|
|
137
|
+
query_params = opts[:query_params] || {}
|
|
138
|
+
|
|
139
|
+
# header parameters
|
|
140
|
+
header_params = opts[:header_params] || {}
|
|
141
|
+
# HTTP header 'Accept' (if needed)
|
|
142
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
143
|
+
|
|
144
|
+
# form parameters
|
|
145
|
+
form_params = opts[:form_params] || {}
|
|
146
|
+
|
|
147
|
+
# http body (model)
|
|
148
|
+
post_body = opts[:debug_body]
|
|
149
|
+
|
|
150
|
+
# return_type
|
|
151
|
+
return_type = opts[:debug_return_type] || 'CheckCompositionAccessResponse'
|
|
152
|
+
|
|
153
|
+
# auth_names
|
|
154
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
155
|
+
|
|
156
|
+
new_options = opts.merge(
|
|
157
|
+
:operation => :"CompositionsApi.check_composition_access_0",
|
|
158
|
+
:header_params => header_params,
|
|
159
|
+
:query_params => query_params,
|
|
160
|
+
:form_params => form_params,
|
|
161
|
+
:body => post_body,
|
|
162
|
+
:auth_names => auth_names,
|
|
163
|
+
:return_type => return_type
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
167
|
+
if @api_client.config.debugging
|
|
168
|
+
@api_client.config.logger.debug "API called: CompositionsApi#check_composition_access_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
169
|
+
end
|
|
170
|
+
return data, status_code, headers
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Create Composition
|
|
174
|
+
# Creates a new composition. To make the composition for one of your managed users, send `managedUserId` or `managedUserExternalId`. The composition stays in your account and is yours to edit; the tag lets you list one user's compositions with `getAllCompositions`. The managed user must be yours and active: one that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`. The tag is set here and does not change afterwards. A copy made with `duplicateComposition` keeps the tag of the original. An editor session with the `creator` surface may call this to start a composition of a widget it built: it sends only `name`, `widgetId` (a widget made for the session's managed user) and `content`, and the composition is always made for that managed user. Send `databaseSchema` to give the composition tables of its own for what visitors send it (the shape, the allowed types and the limits are described on the field). A `databaseSchema` that cannot be used is refused before anything is created, with `400` and `INVALID_DATABASE_SCHEMA`. If the composition is created but its tables cannot be made just now, the answer is still `201` and `meta.warnings` says so. Leave `databaseSchema` out and the composition gets the tables its widget declares in its own source (`src/lib/meta/database.json`), if it declares any: they are made the same way, in a schema of the composition's own. A widget that keeps nothing leaves the composition without tables. If the widget's file cannot be used, or its tables cannot be made just now, the answer is still `201` and `meta.warnings` says so. The widget is read as it was when it was last published (as it is now, when it never was). The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one composition is created, not two.
|
|
175
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
176
|
+
# @param new_composition [NewComposition]
|
|
177
|
+
# @param [Hash] opts the optional parameters
|
|
178
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
179
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
180
|
+
# @return [CreateCompositionFromWidget201Response]
|
|
181
|
+
def create_composition_0(idempotency_key, new_composition, opts = {})
|
|
182
|
+
data, _status_code, _headers = create_composition_0_with_http_info(idempotency_key, new_composition, opts)
|
|
183
|
+
data
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Create Composition
|
|
187
|
+
# Creates a new composition. To make the composition for one of your managed users, send `managedUserId` or `managedUserExternalId`. The composition stays in your account and is yours to edit; the tag lets you list one user's compositions with `getAllCompositions`. The managed user must be yours and active: one that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`. The tag is set here and does not change afterwards. A copy made with `duplicateComposition` keeps the tag of the original. An editor session with the `creator` surface may call this to start a composition of a widget it built: it sends only `name`, `widgetId` (a widget made for the session's managed user) and `content`, and the composition is always made for that managed user. Send `databaseSchema` to give the composition tables of its own for what visitors send it (the shape, the allowed types and the limits are described on the field). A `databaseSchema` that cannot be used is refused before anything is created, with `400` and `INVALID_DATABASE_SCHEMA`. If the composition is created but its tables cannot be made just now, the answer is still `201` and `meta.warnings` says so. Leave `databaseSchema` out and the composition gets the tables its widget declares in its own source (`src/lib/meta/database.json`), if it declares any: they are made the same way, in a schema of the composition's own. A widget that keeps nothing leaves the composition without tables. If the widget's file cannot be used, or its tables cannot be made just now, the answer is still `201` and `meta.warnings` says so. The widget is read as it was when it was last published (as it is now, when it never was). The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one composition is created, not two.
|
|
188
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
189
|
+
# @param new_composition [NewComposition]
|
|
190
|
+
# @param [Hash] opts the optional parameters
|
|
191
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
192
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
193
|
+
# @return [Array<(CreateCompositionFromWidget201Response, Integer, Hash)>] CreateCompositionFromWidget201Response data, response status code and response headers
|
|
194
|
+
def create_composition_0_with_http_info(idempotency_key, new_composition, opts = {})
|
|
195
|
+
if @api_client.config.debugging
|
|
196
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.create_composition_0 ...'
|
|
197
|
+
end
|
|
198
|
+
# verify the required parameter 'idempotency_key' is set
|
|
199
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
200
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling CompositionsApi.create_composition_0"
|
|
201
|
+
end
|
|
202
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
|
|
203
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.create_composition_0, the character length must be smaller than or equal to 50.'
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
|
|
207
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.create_composition_0, the character length must be great than or equal to 8.'
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
|
|
211
|
+
if @api_client.config.client_side_validation && idempotency_key !~ pattern
|
|
212
|
+
fail ArgumentError, "invalid value for 'idempotency_key' when calling CompositionsApi.create_composition_0, must conform to the pattern #{pattern}."
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# verify the required parameter 'new_composition' is set
|
|
216
|
+
if @api_client.config.client_side_validation && new_composition.nil?
|
|
217
|
+
fail ArgumentError, "Missing the required parameter 'new_composition' when calling CompositionsApi.create_composition_0"
|
|
218
|
+
end
|
|
219
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
220
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.create_composition_0, the character length must be smaller than or equal to 255.'
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
224
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.create_composition_0, the character length must be great than or equal to 1.'
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# resource path
|
|
228
|
+
local_var_path = '/compositions'
|
|
229
|
+
|
|
230
|
+
# query parameters
|
|
231
|
+
query_params = opts[:query_params] || {}
|
|
232
|
+
|
|
233
|
+
# header parameters
|
|
234
|
+
header_params = opts[:header_params] || {}
|
|
235
|
+
# HTTP header 'Accept' (if needed)
|
|
236
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
237
|
+
# HTTP header 'Content-Type'
|
|
238
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
239
|
+
if !content_type.nil?
|
|
240
|
+
header_params['Content-Type'] = content_type
|
|
241
|
+
end
|
|
242
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
243
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
244
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
245
|
+
|
|
246
|
+
# form parameters
|
|
247
|
+
form_params = opts[:form_params] || {}
|
|
248
|
+
|
|
249
|
+
# http body (model)
|
|
250
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(new_composition)
|
|
251
|
+
|
|
252
|
+
# return_type
|
|
253
|
+
return_type = opts[:debug_return_type] || 'CreateCompositionFromWidget201Response'
|
|
254
|
+
|
|
255
|
+
# auth_names
|
|
256
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
257
|
+
|
|
258
|
+
new_options = opts.merge(
|
|
259
|
+
:operation => :"CompositionsApi.create_composition_0",
|
|
260
|
+
:header_params => header_params,
|
|
261
|
+
:query_params => query_params,
|
|
262
|
+
:form_params => form_params,
|
|
263
|
+
:body => post_body,
|
|
264
|
+
:auth_names => auth_names,
|
|
265
|
+
:return_type => return_type
|
|
266
|
+
)
|
|
267
|
+
|
|
268
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
269
|
+
if @api_client.config.debugging
|
|
270
|
+
@api_client.config.logger.debug "API called: CompositionsApi#create_composition_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
271
|
+
end
|
|
272
|
+
return data, status_code, headers
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# Add a content list item
|
|
276
|
+
# Creates one item in a widget content list without replacing the whole list. Item field keys are widget data (camelCase or snake_case are kept as sent). Partners use this to keep galleries in sync.
|
|
277
|
+
# @param id [String]
|
|
278
|
+
# @param list [String] List name from the content schema (`contentItems`) or `items`
|
|
279
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
280
|
+
# @param create_composition_content_item_request [CreateCompositionContentItemRequest]
|
|
281
|
+
# @param [Hash] opts the optional parameters
|
|
282
|
+
# @option opts [String] :if_match Optional content version from ETag
|
|
283
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
284
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
285
|
+
# @return [CreateCompositionContentItem201Response]
|
|
286
|
+
def create_composition_content_item_0(id, list, idempotency_key, create_composition_content_item_request, opts = {})
|
|
287
|
+
data, _status_code, _headers = create_composition_content_item_0_with_http_info(id, list, idempotency_key, create_composition_content_item_request, opts)
|
|
288
|
+
data
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# Add a content list item
|
|
292
|
+
# Creates one item in a widget content list without replacing the whole list. Item field keys are widget data (camelCase or snake_case are kept as sent). Partners use this to keep galleries in sync.
|
|
293
|
+
# @param id [String]
|
|
294
|
+
# @param list [String] List name from the content schema (`contentItems`) or `items`
|
|
295
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
296
|
+
# @param create_composition_content_item_request [CreateCompositionContentItemRequest]
|
|
297
|
+
# @param [Hash] opts the optional parameters
|
|
298
|
+
# @option opts [String] :if_match Optional content version from ETag
|
|
299
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
300
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
301
|
+
# @return [Array<(CreateCompositionContentItem201Response, Integer, Hash)>] CreateCompositionContentItem201Response data, response status code and response headers
|
|
302
|
+
def create_composition_content_item_0_with_http_info(id, list, idempotency_key, create_composition_content_item_request, opts = {})
|
|
303
|
+
if @api_client.config.debugging
|
|
304
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.create_composition_content_item_0 ...'
|
|
305
|
+
end
|
|
306
|
+
# verify the required parameter 'id' is set
|
|
307
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
308
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.create_composition_content_item_0"
|
|
309
|
+
end
|
|
310
|
+
# verify the required parameter 'list' is set
|
|
311
|
+
if @api_client.config.client_side_validation && list.nil?
|
|
312
|
+
fail ArgumentError, "Missing the required parameter 'list' when calling CompositionsApi.create_composition_content_item_0"
|
|
313
|
+
end
|
|
314
|
+
# verify the required parameter 'idempotency_key' is set
|
|
315
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
316
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling CompositionsApi.create_composition_content_item_0"
|
|
317
|
+
end
|
|
318
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
|
|
319
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.create_composition_content_item_0, the character length must be smaller than or equal to 50.'
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
|
|
323
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.create_composition_content_item_0, the character length must be great than or equal to 8.'
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
|
|
327
|
+
if @api_client.config.client_side_validation && idempotency_key !~ pattern
|
|
328
|
+
fail ArgumentError, "invalid value for 'idempotency_key' when calling CompositionsApi.create_composition_content_item_0, must conform to the pattern #{pattern}."
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
# verify the required parameter 'create_composition_content_item_request' is set
|
|
332
|
+
if @api_client.config.client_side_validation && create_composition_content_item_request.nil?
|
|
333
|
+
fail ArgumentError, "Missing the required parameter 'create_composition_content_item_request' when calling CompositionsApi.create_composition_content_item_0"
|
|
334
|
+
end
|
|
335
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
336
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.create_composition_content_item_0, the character length must be smaller than or equal to 255.'
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
340
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.create_composition_content_item_0, the character length must be great than or equal to 1.'
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
# resource path
|
|
344
|
+
local_var_path = '/compositions/{id}/content/{list}/items'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'list' + '}', CGI.escape(list.to_s))
|
|
345
|
+
|
|
346
|
+
# query parameters
|
|
347
|
+
query_params = opts[:query_params] || {}
|
|
348
|
+
|
|
349
|
+
# header parameters
|
|
350
|
+
header_params = opts[:header_params] || {}
|
|
351
|
+
# HTTP header 'Accept' (if needed)
|
|
352
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
353
|
+
# HTTP header 'Content-Type'
|
|
354
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
355
|
+
if !content_type.nil?
|
|
356
|
+
header_params['Content-Type'] = content_type
|
|
357
|
+
end
|
|
358
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
359
|
+
header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
|
|
360
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
361
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
362
|
+
|
|
363
|
+
# form parameters
|
|
364
|
+
form_params = opts[:form_params] || {}
|
|
365
|
+
|
|
366
|
+
# http body (model)
|
|
367
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_composition_content_item_request)
|
|
368
|
+
|
|
369
|
+
# return_type
|
|
370
|
+
return_type = opts[:debug_return_type] || 'CreateCompositionContentItem201Response'
|
|
371
|
+
|
|
372
|
+
# auth_names
|
|
373
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
374
|
+
|
|
375
|
+
new_options = opts.merge(
|
|
376
|
+
:operation => :"CompositionsApi.create_composition_content_item_0",
|
|
377
|
+
:header_params => header_params,
|
|
378
|
+
:query_params => query_params,
|
|
379
|
+
:form_params => form_params,
|
|
380
|
+
:body => post_body,
|
|
381
|
+
:auth_names => auth_names,
|
|
382
|
+
:return_type => return_type
|
|
383
|
+
)
|
|
384
|
+
|
|
385
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
386
|
+
if @api_client.config.debugging
|
|
387
|
+
@api_client.config.logger.debug "API called: CompositionsApi#create_composition_content_item_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
388
|
+
end
|
|
389
|
+
return data, status_code, headers
|
|
390
|
+
end
|
|
391
|
+
|
|
392
|
+
# Create Record In Composition Database
|
|
393
|
+
# Creates a new record in one of the composition's tables. Only the composition's own tables (made from its `databaseSchema` or from the tables its widget declares) can be reached; any other table name answers `404`.
|
|
394
|
+
# @param id [String] ID of the composition
|
|
395
|
+
# @param table [String] Name of the database table
|
|
396
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
397
|
+
# @param body [Object]
|
|
398
|
+
# @param [Hash] opts the optional parameters
|
|
399
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
400
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
401
|
+
# @return [CreateCompositionDatabaseRecord201Response]
|
|
402
|
+
def create_composition_database_record_0(id, table, idempotency_key, body, opts = {})
|
|
403
|
+
data, _status_code, _headers = create_composition_database_record_0_with_http_info(id, table, idempotency_key, body, opts)
|
|
404
|
+
data
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
# Create Record In Composition Database
|
|
408
|
+
# Creates a new record in one of the composition's tables. Only the composition's own tables (made from its `databaseSchema` or from the tables its widget declares) can be reached; any other table name answers `404`.
|
|
409
|
+
# @param id [String] ID of the composition
|
|
410
|
+
# @param table [String] Name of the database table
|
|
411
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
412
|
+
# @param body [Object]
|
|
413
|
+
# @param [Hash] opts the optional parameters
|
|
414
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
415
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
416
|
+
# @return [Array<(CreateCompositionDatabaseRecord201Response, Integer, Hash)>] CreateCompositionDatabaseRecord201Response data, response status code and response headers
|
|
417
|
+
def create_composition_database_record_0_with_http_info(id, table, idempotency_key, body, opts = {})
|
|
418
|
+
if @api_client.config.debugging
|
|
419
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.create_composition_database_record_0 ...'
|
|
420
|
+
end
|
|
421
|
+
# verify the required parameter 'id' is set
|
|
422
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
423
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.create_composition_database_record_0"
|
|
424
|
+
end
|
|
425
|
+
# verify the required parameter 'table' is set
|
|
426
|
+
if @api_client.config.client_side_validation && table.nil?
|
|
427
|
+
fail ArgumentError, "Missing the required parameter 'table' when calling CompositionsApi.create_composition_database_record_0"
|
|
428
|
+
end
|
|
429
|
+
# verify the required parameter 'idempotency_key' is set
|
|
430
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
431
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling CompositionsApi.create_composition_database_record_0"
|
|
432
|
+
end
|
|
433
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
|
|
434
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.create_composition_database_record_0, the character length must be smaller than or equal to 50.'
|
|
435
|
+
end
|
|
436
|
+
|
|
437
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
|
|
438
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.create_composition_database_record_0, the character length must be great than or equal to 8.'
|
|
439
|
+
end
|
|
440
|
+
|
|
441
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
|
|
442
|
+
if @api_client.config.client_side_validation && idempotency_key !~ pattern
|
|
443
|
+
fail ArgumentError, "invalid value for 'idempotency_key' when calling CompositionsApi.create_composition_database_record_0, must conform to the pattern #{pattern}."
|
|
444
|
+
end
|
|
445
|
+
|
|
446
|
+
# verify the required parameter 'body' is set
|
|
447
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
448
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling CompositionsApi.create_composition_database_record_0"
|
|
449
|
+
end
|
|
450
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
451
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.create_composition_database_record_0, the character length must be smaller than or equal to 255.'
|
|
452
|
+
end
|
|
453
|
+
|
|
454
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
455
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.create_composition_database_record_0, the character length must be great than or equal to 1.'
|
|
456
|
+
end
|
|
457
|
+
|
|
458
|
+
# resource path
|
|
459
|
+
local_var_path = '/compositions/{id}/database/{table}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'table' + '}', CGI.escape(table.to_s))
|
|
460
|
+
|
|
461
|
+
# query parameters
|
|
462
|
+
query_params = opts[:query_params] || {}
|
|
463
|
+
|
|
464
|
+
# header parameters
|
|
465
|
+
header_params = opts[:header_params] || {}
|
|
466
|
+
# HTTP header 'Accept' (if needed)
|
|
467
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
468
|
+
# HTTP header 'Content-Type'
|
|
469
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
470
|
+
if !content_type.nil?
|
|
471
|
+
header_params['Content-Type'] = content_type
|
|
472
|
+
end
|
|
473
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
474
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
475
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
476
|
+
|
|
477
|
+
# form parameters
|
|
478
|
+
form_params = opts[:form_params] || {}
|
|
479
|
+
|
|
480
|
+
# http body (model)
|
|
481
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
482
|
+
|
|
483
|
+
# return_type
|
|
484
|
+
return_type = opts[:debug_return_type] || 'CreateCompositionDatabaseRecord201Response'
|
|
485
|
+
|
|
486
|
+
# auth_names
|
|
487
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
488
|
+
|
|
489
|
+
new_options = opts.merge(
|
|
490
|
+
:operation => :"CompositionsApi.create_composition_database_record_0",
|
|
491
|
+
:header_params => header_params,
|
|
492
|
+
:query_params => query_params,
|
|
493
|
+
:form_params => form_params,
|
|
494
|
+
:body => post_body,
|
|
495
|
+
:auth_names => auth_names,
|
|
496
|
+
:return_type => return_type
|
|
497
|
+
)
|
|
498
|
+
|
|
499
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
500
|
+
if @api_client.config.debugging
|
|
501
|
+
@api_client.config.logger.debug "API called: CompositionsApi#create_composition_database_record_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
502
|
+
end
|
|
503
|
+
return data, status_code, headers
|
|
504
|
+
end
|
|
505
|
+
|
|
506
|
+
# Delete Composition
|
|
507
|
+
# Deletes a specific composition, and the data it keeps (the tables it declared and what visitors left in them).
|
|
508
|
+
# @param id [String] The ID of the composition to delete
|
|
509
|
+
# @param [Hash] opts the optional parameters
|
|
510
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
511
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
512
|
+
# @return [nil]
|
|
513
|
+
def delete_composition_0(id, opts = {})
|
|
514
|
+
delete_composition_0_with_http_info(id, opts)
|
|
515
|
+
nil
|
|
516
|
+
end
|
|
517
|
+
|
|
518
|
+
# Delete Composition
|
|
519
|
+
# Deletes a specific composition, and the data it keeps (the tables it declared and what visitors left in them).
|
|
520
|
+
# @param id [String] The ID of the composition to delete
|
|
521
|
+
# @param [Hash] opts the optional parameters
|
|
522
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
523
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
524
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
525
|
+
def delete_composition_0_with_http_info(id, opts = {})
|
|
526
|
+
if @api_client.config.debugging
|
|
527
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.delete_composition_0 ...'
|
|
528
|
+
end
|
|
529
|
+
# verify the required parameter 'id' is set
|
|
530
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
531
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.delete_composition_0"
|
|
532
|
+
end
|
|
533
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
534
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.delete_composition_0, the character length must be smaller than or equal to 255.'
|
|
535
|
+
end
|
|
536
|
+
|
|
537
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
538
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.delete_composition_0, the character length must be great than or equal to 1.'
|
|
539
|
+
end
|
|
540
|
+
|
|
541
|
+
# resource path
|
|
542
|
+
local_var_path = '/compositions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
543
|
+
|
|
544
|
+
# query parameters
|
|
545
|
+
query_params = opts[:query_params] || {}
|
|
546
|
+
|
|
547
|
+
# header parameters
|
|
548
|
+
header_params = opts[:header_params] || {}
|
|
549
|
+
# HTTP header 'Accept' (if needed)
|
|
550
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
551
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
552
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
553
|
+
|
|
554
|
+
# form parameters
|
|
555
|
+
form_params = opts[:form_params] || {}
|
|
556
|
+
|
|
557
|
+
# http body (model)
|
|
558
|
+
post_body = opts[:debug_body]
|
|
559
|
+
|
|
560
|
+
# return_type
|
|
561
|
+
return_type = opts[:debug_return_type]
|
|
562
|
+
|
|
563
|
+
# auth_names
|
|
564
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
565
|
+
|
|
566
|
+
new_options = opts.merge(
|
|
567
|
+
:operation => :"CompositionsApi.delete_composition_0",
|
|
568
|
+
:header_params => header_params,
|
|
569
|
+
:query_params => query_params,
|
|
570
|
+
:form_params => form_params,
|
|
571
|
+
:body => post_body,
|
|
572
|
+
:auth_names => auth_names,
|
|
573
|
+
:return_type => return_type
|
|
574
|
+
)
|
|
575
|
+
|
|
576
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
577
|
+
if @api_client.config.debugging
|
|
578
|
+
@api_client.config.logger.debug "API called: CompositionsApi#delete_composition_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
579
|
+
end
|
|
580
|
+
return data, status_code, headers
|
|
581
|
+
end
|
|
582
|
+
|
|
583
|
+
# Delete a content list item
|
|
584
|
+
# @param id [String]
|
|
585
|
+
# @param list [String]
|
|
586
|
+
# @param item_id [String]
|
|
587
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
588
|
+
# @param [Hash] opts the optional parameters
|
|
589
|
+
# @option opts [String] :if_match
|
|
590
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
591
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
592
|
+
# @return [DeleteCompositionContentItemResponse]
|
|
593
|
+
def delete_composition_content_item_0(id, list, item_id, idempotency_key, opts = {})
|
|
594
|
+
data, _status_code, _headers = delete_composition_content_item_0_with_http_info(id, list, item_id, idempotency_key, opts)
|
|
595
|
+
data
|
|
596
|
+
end
|
|
597
|
+
|
|
598
|
+
# Delete a content list item
|
|
599
|
+
# @param id [String]
|
|
600
|
+
# @param list [String]
|
|
601
|
+
# @param item_id [String]
|
|
602
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
603
|
+
# @param [Hash] opts the optional parameters
|
|
604
|
+
# @option opts [String] :if_match
|
|
605
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
606
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
607
|
+
# @return [Array<(DeleteCompositionContentItemResponse, Integer, Hash)>] DeleteCompositionContentItemResponse data, response status code and response headers
|
|
608
|
+
def delete_composition_content_item_0_with_http_info(id, list, item_id, idempotency_key, opts = {})
|
|
609
|
+
if @api_client.config.debugging
|
|
610
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.delete_composition_content_item_0 ...'
|
|
611
|
+
end
|
|
612
|
+
# verify the required parameter 'id' is set
|
|
613
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
614
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.delete_composition_content_item_0"
|
|
615
|
+
end
|
|
616
|
+
# verify the required parameter 'list' is set
|
|
617
|
+
if @api_client.config.client_side_validation && list.nil?
|
|
618
|
+
fail ArgumentError, "Missing the required parameter 'list' when calling CompositionsApi.delete_composition_content_item_0"
|
|
619
|
+
end
|
|
620
|
+
# verify the required parameter 'item_id' is set
|
|
621
|
+
if @api_client.config.client_side_validation && item_id.nil?
|
|
622
|
+
fail ArgumentError, "Missing the required parameter 'item_id' when calling CompositionsApi.delete_composition_content_item_0"
|
|
623
|
+
end
|
|
624
|
+
# verify the required parameter 'idempotency_key' is set
|
|
625
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
626
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling CompositionsApi.delete_composition_content_item_0"
|
|
627
|
+
end
|
|
628
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
|
|
629
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.delete_composition_content_item_0, the character length must be smaller than or equal to 50.'
|
|
630
|
+
end
|
|
631
|
+
|
|
632
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
|
|
633
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.delete_composition_content_item_0, the character length must be great than or equal to 8.'
|
|
634
|
+
end
|
|
635
|
+
|
|
636
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
|
|
637
|
+
if @api_client.config.client_side_validation && idempotency_key !~ pattern
|
|
638
|
+
fail ArgumentError, "invalid value for 'idempotency_key' when calling CompositionsApi.delete_composition_content_item_0, must conform to the pattern #{pattern}."
|
|
639
|
+
end
|
|
640
|
+
|
|
641
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
642
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.delete_composition_content_item_0, the character length must be smaller than or equal to 255.'
|
|
643
|
+
end
|
|
644
|
+
|
|
645
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
646
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.delete_composition_content_item_0, the character length must be great than or equal to 1.'
|
|
647
|
+
end
|
|
648
|
+
|
|
649
|
+
# resource path
|
|
650
|
+
local_var_path = '/compositions/{id}/content/{list}/items/{itemId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'list' + '}', CGI.escape(list.to_s)).sub('{' + 'itemId' + '}', CGI.escape(item_id.to_s))
|
|
651
|
+
|
|
652
|
+
# query parameters
|
|
653
|
+
query_params = opts[:query_params] || {}
|
|
654
|
+
|
|
655
|
+
# header parameters
|
|
656
|
+
header_params = opts[:header_params] || {}
|
|
657
|
+
# HTTP header 'Accept' (if needed)
|
|
658
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
659
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
660
|
+
header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
|
|
661
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
662
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
663
|
+
|
|
664
|
+
# form parameters
|
|
665
|
+
form_params = opts[:form_params] || {}
|
|
666
|
+
|
|
667
|
+
# http body (model)
|
|
668
|
+
post_body = opts[:debug_body]
|
|
669
|
+
|
|
670
|
+
# return_type
|
|
671
|
+
return_type = opts[:debug_return_type] || 'DeleteCompositionContentItemResponse'
|
|
672
|
+
|
|
673
|
+
# auth_names
|
|
674
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
675
|
+
|
|
676
|
+
new_options = opts.merge(
|
|
677
|
+
:operation => :"CompositionsApi.delete_composition_content_item_0",
|
|
678
|
+
:header_params => header_params,
|
|
679
|
+
:query_params => query_params,
|
|
680
|
+
:form_params => form_params,
|
|
681
|
+
:body => post_body,
|
|
682
|
+
:auth_names => auth_names,
|
|
683
|
+
:return_type => return_type
|
|
684
|
+
)
|
|
685
|
+
|
|
686
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
687
|
+
if @api_client.config.debugging
|
|
688
|
+
@api_client.config.logger.debug "API called: CompositionsApi#delete_composition_content_item_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
689
|
+
end
|
|
690
|
+
return data, status_code, headers
|
|
691
|
+
end
|
|
692
|
+
|
|
693
|
+
# Remove the composition data source binding
|
|
694
|
+
# Removes the binding. Asking again, or asking for a composition that had none, is not an error: the composition has no data source afterwards, and that is all `removed: true` says.
|
|
695
|
+
# @param id [String]
|
|
696
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
697
|
+
# @param [Hash] opts the optional parameters
|
|
698
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
699
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
700
|
+
# @return [DeleteCompositionDataSourceResponse]
|
|
701
|
+
def delete_composition_data_source_0(id, idempotency_key, opts = {})
|
|
702
|
+
data, _status_code, _headers = delete_composition_data_source_0_with_http_info(id, idempotency_key, opts)
|
|
703
|
+
data
|
|
704
|
+
end
|
|
705
|
+
|
|
706
|
+
# Remove the composition data source binding
|
|
707
|
+
# Removes the binding. Asking again, or asking for a composition that had none, is not an error: the composition has no data source afterwards, and that is all `removed: true` says.
|
|
708
|
+
# @param id [String]
|
|
709
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
710
|
+
# @param [Hash] opts the optional parameters
|
|
711
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
712
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
713
|
+
# @return [Array<(DeleteCompositionDataSourceResponse, Integer, Hash)>] DeleteCompositionDataSourceResponse data, response status code and response headers
|
|
714
|
+
def delete_composition_data_source_0_with_http_info(id, idempotency_key, opts = {})
|
|
715
|
+
if @api_client.config.debugging
|
|
716
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.delete_composition_data_source_0 ...'
|
|
717
|
+
end
|
|
718
|
+
# verify the required parameter 'id' is set
|
|
719
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
720
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.delete_composition_data_source_0"
|
|
721
|
+
end
|
|
722
|
+
# verify the required parameter 'idempotency_key' is set
|
|
723
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
724
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling CompositionsApi.delete_composition_data_source_0"
|
|
725
|
+
end
|
|
726
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
|
|
727
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.delete_composition_data_source_0, the character length must be smaller than or equal to 50.'
|
|
728
|
+
end
|
|
729
|
+
|
|
730
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
|
|
731
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.delete_composition_data_source_0, the character length must be great than or equal to 8.'
|
|
732
|
+
end
|
|
733
|
+
|
|
734
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
|
|
735
|
+
if @api_client.config.client_side_validation && idempotency_key !~ pattern
|
|
736
|
+
fail ArgumentError, "invalid value for 'idempotency_key' when calling CompositionsApi.delete_composition_data_source_0, must conform to the pattern #{pattern}."
|
|
737
|
+
end
|
|
738
|
+
|
|
739
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
740
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.delete_composition_data_source_0, the character length must be smaller than or equal to 255.'
|
|
741
|
+
end
|
|
742
|
+
|
|
743
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
744
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.delete_composition_data_source_0, the character length must be great than or equal to 1.'
|
|
745
|
+
end
|
|
746
|
+
|
|
747
|
+
# resource path
|
|
748
|
+
local_var_path = '/compositions/{id}/data-source'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
749
|
+
|
|
750
|
+
# query parameters
|
|
751
|
+
query_params = opts[:query_params] || {}
|
|
752
|
+
|
|
753
|
+
# header parameters
|
|
754
|
+
header_params = opts[:header_params] || {}
|
|
755
|
+
# HTTP header 'Accept' (if needed)
|
|
756
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
757
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
758
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
759
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
760
|
+
|
|
761
|
+
# form parameters
|
|
762
|
+
form_params = opts[:form_params] || {}
|
|
763
|
+
|
|
764
|
+
# http body (model)
|
|
765
|
+
post_body = opts[:debug_body]
|
|
766
|
+
|
|
767
|
+
# return_type
|
|
768
|
+
return_type = opts[:debug_return_type] || 'DeleteCompositionDataSourceResponse'
|
|
769
|
+
|
|
770
|
+
# auth_names
|
|
771
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
772
|
+
|
|
773
|
+
new_options = opts.merge(
|
|
774
|
+
:operation => :"CompositionsApi.delete_composition_data_source_0",
|
|
775
|
+
:header_params => header_params,
|
|
776
|
+
:query_params => query_params,
|
|
777
|
+
:form_params => form_params,
|
|
778
|
+
:body => post_body,
|
|
779
|
+
:auth_names => auth_names,
|
|
780
|
+
:return_type => return_type
|
|
781
|
+
)
|
|
782
|
+
|
|
783
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
784
|
+
if @api_client.config.debugging
|
|
785
|
+
@api_client.config.logger.debug "API called: CompositionsApi#delete_composition_data_source_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
786
|
+
end
|
|
787
|
+
return data, status_code, headers
|
|
788
|
+
end
|
|
789
|
+
|
|
790
|
+
# Delete Record From Composition Database
|
|
791
|
+
# Deletes a specific record from one of the composition's tables. Only the composition's own tables (made from its `databaseSchema` or from the tables its widget declares) can be reached; any other table name answers `404`.
|
|
792
|
+
# @param id [String] ID of the composition
|
|
793
|
+
# @param table [String] Name of the database table
|
|
794
|
+
# @param record_id [String] ID of the record to delete
|
|
795
|
+
# @param [Hash] opts the optional parameters
|
|
796
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
797
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
798
|
+
# @return [CreateCompositionDatabaseRecord201Response]
|
|
799
|
+
def delete_composition_database_record_0(id, table, record_id, opts = {})
|
|
800
|
+
data, _status_code, _headers = delete_composition_database_record_0_with_http_info(id, table, record_id, opts)
|
|
801
|
+
data
|
|
802
|
+
end
|
|
803
|
+
|
|
804
|
+
# Delete Record From Composition Database
|
|
805
|
+
# Deletes a specific record from one of the composition's tables. Only the composition's own tables (made from its `databaseSchema` or from the tables its widget declares) can be reached; any other table name answers `404`.
|
|
806
|
+
# @param id [String] ID of the composition
|
|
807
|
+
# @param table [String] Name of the database table
|
|
808
|
+
# @param record_id [String] ID of the record to delete
|
|
809
|
+
# @param [Hash] opts the optional parameters
|
|
810
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
811
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
812
|
+
# @return [Array<(CreateCompositionDatabaseRecord201Response, Integer, Hash)>] CreateCompositionDatabaseRecord201Response data, response status code and response headers
|
|
813
|
+
def delete_composition_database_record_0_with_http_info(id, table, record_id, opts = {})
|
|
814
|
+
if @api_client.config.debugging
|
|
815
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.delete_composition_database_record_0 ...'
|
|
816
|
+
end
|
|
817
|
+
# verify the required parameter 'id' is set
|
|
818
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
819
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.delete_composition_database_record_0"
|
|
820
|
+
end
|
|
821
|
+
# verify the required parameter 'table' is set
|
|
822
|
+
if @api_client.config.client_side_validation && table.nil?
|
|
823
|
+
fail ArgumentError, "Missing the required parameter 'table' when calling CompositionsApi.delete_composition_database_record_0"
|
|
824
|
+
end
|
|
825
|
+
# verify the required parameter 'record_id' is set
|
|
826
|
+
if @api_client.config.client_side_validation && record_id.nil?
|
|
827
|
+
fail ArgumentError, "Missing the required parameter 'record_id' when calling CompositionsApi.delete_composition_database_record_0"
|
|
828
|
+
end
|
|
829
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
830
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.delete_composition_database_record_0, the character length must be smaller than or equal to 255.'
|
|
831
|
+
end
|
|
832
|
+
|
|
833
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
834
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.delete_composition_database_record_0, the character length must be great than or equal to 1.'
|
|
835
|
+
end
|
|
836
|
+
|
|
837
|
+
# resource path
|
|
838
|
+
local_var_path = '/compositions/{id}/database/{table}/{recordId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'table' + '}', CGI.escape(table.to_s)).sub('{' + 'recordId' + '}', CGI.escape(record_id.to_s))
|
|
839
|
+
|
|
840
|
+
# query parameters
|
|
841
|
+
query_params = opts[:query_params] || {}
|
|
842
|
+
|
|
843
|
+
# header parameters
|
|
844
|
+
header_params = opts[:header_params] || {}
|
|
845
|
+
# HTTP header 'Accept' (if needed)
|
|
846
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
847
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
848
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
849
|
+
|
|
850
|
+
# form parameters
|
|
851
|
+
form_params = opts[:form_params] || {}
|
|
852
|
+
|
|
853
|
+
# http body (model)
|
|
854
|
+
post_body = opts[:debug_body]
|
|
855
|
+
|
|
856
|
+
# return_type
|
|
857
|
+
return_type = opts[:debug_return_type] || 'CreateCompositionDatabaseRecord201Response'
|
|
858
|
+
|
|
859
|
+
# auth_names
|
|
860
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
861
|
+
|
|
862
|
+
new_options = opts.merge(
|
|
863
|
+
:operation => :"CompositionsApi.delete_composition_database_record_0",
|
|
864
|
+
:header_params => header_params,
|
|
865
|
+
:query_params => query_params,
|
|
866
|
+
:form_params => form_params,
|
|
867
|
+
:body => post_body,
|
|
868
|
+
:auth_names => auth_names,
|
|
869
|
+
:return_type => return_type
|
|
870
|
+
)
|
|
871
|
+
|
|
872
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
873
|
+
if @api_client.config.debugging
|
|
874
|
+
@api_client.config.logger.debug "API called: CompositionsApi#delete_composition_database_record_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
875
|
+
end
|
|
876
|
+
return data, status_code, headers
|
|
877
|
+
end
|
|
878
|
+
|
|
879
|
+
# Describe What a Composition Keeps
|
|
880
|
+
# Names the tables a composition's widget keeps entries in (the votes, ratings, answers or sign-ups its visitors left), their columns, and how many entries each holds. Call it first to learn the table and column names that `readCompositionEntries` takes. A widget that only shows content keeps nothing of its own: the answer is `hasData: false` with no tables, and that is not an error. A table that could not be counted has `rows: null`, which is not zero. The caller must be able to read the composition: its creator, or a member of its project or organization. An editor session cannot call this route.
|
|
881
|
+
# @param id [String] ID of the composition
|
|
882
|
+
# @param [Hash] opts the optional parameters
|
|
883
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
884
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
885
|
+
# @return [CompositionEntriesDescriptionResponse]
|
|
886
|
+
def describe_composition_entries_0(id, opts = {})
|
|
887
|
+
data, _status_code, _headers = describe_composition_entries_0_with_http_info(id, opts)
|
|
888
|
+
data
|
|
889
|
+
end
|
|
890
|
+
|
|
891
|
+
# Describe What a Composition Keeps
|
|
892
|
+
# Names the tables a composition's widget keeps entries in (the votes, ratings, answers or sign-ups its visitors left), their columns, and how many entries each holds. Call it first to learn the table and column names that `readCompositionEntries` takes. A widget that only shows content keeps nothing of its own: the answer is `hasData: false` with no tables, and that is not an error. A table that could not be counted has `rows: null`, which is not zero. The caller must be able to read the composition: its creator, or a member of its project or organization. An editor session cannot call this route.
|
|
893
|
+
# @param id [String] ID of the composition
|
|
894
|
+
# @param [Hash] opts the optional parameters
|
|
895
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
896
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
897
|
+
# @return [Array<(CompositionEntriesDescriptionResponse, Integer, Hash)>] CompositionEntriesDescriptionResponse data, response status code and response headers
|
|
898
|
+
def describe_composition_entries_0_with_http_info(id, opts = {})
|
|
899
|
+
if @api_client.config.debugging
|
|
900
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.describe_composition_entries_0 ...'
|
|
901
|
+
end
|
|
902
|
+
# verify the required parameter 'id' is set
|
|
903
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
904
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.describe_composition_entries_0"
|
|
905
|
+
end
|
|
906
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
907
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.describe_composition_entries_0, the character length must be smaller than or equal to 255.'
|
|
908
|
+
end
|
|
909
|
+
|
|
910
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
911
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.describe_composition_entries_0, the character length must be great than or equal to 1.'
|
|
912
|
+
end
|
|
913
|
+
|
|
914
|
+
# resource path
|
|
915
|
+
local_var_path = '/compositions/{id}/entries'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
916
|
+
|
|
917
|
+
# query parameters
|
|
918
|
+
query_params = opts[:query_params] || {}
|
|
919
|
+
|
|
920
|
+
# header parameters
|
|
921
|
+
header_params = opts[:header_params] || {}
|
|
922
|
+
# HTTP header 'Accept' (if needed)
|
|
923
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
924
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
925
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
926
|
+
|
|
927
|
+
# form parameters
|
|
928
|
+
form_params = opts[:form_params] || {}
|
|
929
|
+
|
|
930
|
+
# http body (model)
|
|
931
|
+
post_body = opts[:debug_body]
|
|
932
|
+
|
|
933
|
+
# return_type
|
|
934
|
+
return_type = opts[:debug_return_type] || 'CompositionEntriesDescriptionResponse'
|
|
935
|
+
|
|
936
|
+
# auth_names
|
|
937
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
938
|
+
|
|
939
|
+
new_options = opts.merge(
|
|
940
|
+
:operation => :"CompositionsApi.describe_composition_entries_0",
|
|
941
|
+
:header_params => header_params,
|
|
942
|
+
:query_params => query_params,
|
|
943
|
+
:form_params => form_params,
|
|
944
|
+
:body => post_body,
|
|
945
|
+
:auth_names => auth_names,
|
|
946
|
+
:return_type => return_type
|
|
947
|
+
)
|
|
948
|
+
|
|
949
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
950
|
+
if @api_client.config.debugging
|
|
951
|
+
@api_client.config.logger.debug "API called: CompositionsApi#describe_composition_entries_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
952
|
+
end
|
|
953
|
+
return data, status_code, headers
|
|
954
|
+
end
|
|
955
|
+
|
|
956
|
+
# Duplicate Composition
|
|
957
|
+
# Creates a duplicate of an existing composition for the authenticated user. The duplicate is made after the answer: the call returns `202` with an `operationId`. Ask `GET /operations/{id}` for that operation until its `status` is `completed`; the new composition is named in `metadata.newCompositionId`. A problem with the duplicate's database (for example, tables that could not be made just now) is listed in `metadata.warnings`, which is absent when there is none. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one duplicate is made, not two.
|
|
958
|
+
# @param id [String] ID of the composition to duplicate
|
|
959
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
960
|
+
# @param [Hash] opts the optional parameters
|
|
961
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
962
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
963
|
+
# @option opts [DuplicateCompositionRequest] :duplicate_composition_request
|
|
964
|
+
# @return [DuplicateComposition202Response]
|
|
965
|
+
def duplicate_composition_0(id, idempotency_key, opts = {})
|
|
966
|
+
data, _status_code, _headers = duplicate_composition_0_with_http_info(id, idempotency_key, opts)
|
|
967
|
+
data
|
|
968
|
+
end
|
|
969
|
+
|
|
970
|
+
# Duplicate Composition
|
|
971
|
+
# Creates a duplicate of an existing composition for the authenticated user. The duplicate is made after the answer: the call returns `202` with an `operationId`. Ask `GET /operations/{id}` for that operation until its `status` is `completed`; the new composition is named in `metadata.newCompositionId`. A problem with the duplicate's database (for example, tables that could not be made just now) is listed in `metadata.warnings`, which is absent when there is none. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one duplicate is made, not two.
|
|
972
|
+
# @param id [String] ID of the composition to duplicate
|
|
973
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
974
|
+
# @param [Hash] opts the optional parameters
|
|
975
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
976
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
977
|
+
# @option opts [DuplicateCompositionRequest] :duplicate_composition_request
|
|
978
|
+
# @return [Array<(DuplicateComposition202Response, Integer, Hash)>] DuplicateComposition202Response data, response status code and response headers
|
|
979
|
+
def duplicate_composition_0_with_http_info(id, idempotency_key, opts = {})
|
|
980
|
+
if @api_client.config.debugging
|
|
981
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.duplicate_composition_0 ...'
|
|
982
|
+
end
|
|
983
|
+
# verify the required parameter 'id' is set
|
|
984
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
985
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.duplicate_composition_0"
|
|
986
|
+
end
|
|
987
|
+
# verify the required parameter 'idempotency_key' is set
|
|
988
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
989
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling CompositionsApi.duplicate_composition_0"
|
|
990
|
+
end
|
|
991
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
|
|
992
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.duplicate_composition_0, the character length must be smaller than or equal to 50.'
|
|
993
|
+
end
|
|
994
|
+
|
|
995
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
|
|
996
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.duplicate_composition_0, the character length must be great than or equal to 8.'
|
|
997
|
+
end
|
|
998
|
+
|
|
999
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
|
|
1000
|
+
if @api_client.config.client_side_validation && idempotency_key !~ pattern
|
|
1001
|
+
fail ArgumentError, "invalid value for 'idempotency_key' when calling CompositionsApi.duplicate_composition_0, must conform to the pattern #{pattern}."
|
|
1002
|
+
end
|
|
1003
|
+
|
|
1004
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
1005
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.duplicate_composition_0, the character length must be smaller than or equal to 255.'
|
|
1006
|
+
end
|
|
1007
|
+
|
|
1008
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
1009
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.duplicate_composition_0, the character length must be great than or equal to 1.'
|
|
1010
|
+
end
|
|
1011
|
+
|
|
1012
|
+
# resource path
|
|
1013
|
+
local_var_path = '/compositions/{id}/duplicate'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1014
|
+
|
|
1015
|
+
# query parameters
|
|
1016
|
+
query_params = opts[:query_params] || {}
|
|
1017
|
+
|
|
1018
|
+
# header parameters
|
|
1019
|
+
header_params = opts[:header_params] || {}
|
|
1020
|
+
# HTTP header 'Accept' (if needed)
|
|
1021
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1022
|
+
# HTTP header 'Content-Type'
|
|
1023
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1024
|
+
if !content_type.nil?
|
|
1025
|
+
header_params['Content-Type'] = content_type
|
|
1026
|
+
end
|
|
1027
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
1028
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
1029
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
1030
|
+
|
|
1031
|
+
# form parameters
|
|
1032
|
+
form_params = opts[:form_params] || {}
|
|
1033
|
+
|
|
1034
|
+
# http body (model)
|
|
1035
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'duplicate_composition_request'])
|
|
1036
|
+
|
|
1037
|
+
# return_type
|
|
1038
|
+
return_type = opts[:debug_return_type] || 'DuplicateComposition202Response'
|
|
1039
|
+
|
|
1040
|
+
# auth_names
|
|
1041
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
1042
|
+
|
|
1043
|
+
new_options = opts.merge(
|
|
1044
|
+
:operation => :"CompositionsApi.duplicate_composition_0",
|
|
1045
|
+
:header_params => header_params,
|
|
1046
|
+
:query_params => query_params,
|
|
1047
|
+
:form_params => form_params,
|
|
1048
|
+
:body => post_body,
|
|
1049
|
+
:auth_names => auth_names,
|
|
1050
|
+
:return_type => return_type
|
|
1051
|
+
)
|
|
1052
|
+
|
|
1053
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1054
|
+
if @api_client.config.debugging
|
|
1055
|
+
@api_client.config.logger.debug "API called: CompositionsApi#duplicate_composition_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1056
|
+
end
|
|
1057
|
+
return data, status_code, headers
|
|
1058
|
+
end
|
|
1059
|
+
|
|
1060
|
+
# See the documents a widget's AI answers from
|
|
1061
|
+
# The `ai-answers` adapter lets a widget answer a visitor's question with text an AI model writes from documents the widget's owner provides. This lists those documents, and how much room is left for more: `totals` carries the widget's limits next to what it uses. The list never contains what a document says, only which documents there are: their title, size and state. A `processing` document is not used to answer questions yet (or an add of it was interrupted: remove it and add it again). Add a document with `addAiAnswersKnowledgeDocument`; remove one with `removeAiAnswersKnowledgeDocument`. The caller must be allowed to see the widget: its owner, a partner for a customer it manages, or a Widgetic administrator. An API key needs the `content:read` scope.
|
|
1062
|
+
# @param id [String] The widget (composition) whose documents to list
|
|
1063
|
+
# @param [Hash] opts the optional parameters
|
|
1064
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1065
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1066
|
+
# @return [GetAiAnswersKnowledge200Response]
|
|
1067
|
+
def get_ai_answers_knowledge_0(id, opts = {})
|
|
1068
|
+
data, _status_code, _headers = get_ai_answers_knowledge_0_with_http_info(id, opts)
|
|
1069
|
+
data
|
|
1070
|
+
end
|
|
1071
|
+
|
|
1072
|
+
# See the documents a widget's AI answers from
|
|
1073
|
+
# The `ai-answers` adapter lets a widget answer a visitor's question with text an AI model writes from documents the widget's owner provides. This lists those documents, and how much room is left for more: `totals` carries the widget's limits next to what it uses. The list never contains what a document says, only which documents there are: their title, size and state. A `processing` document is not used to answer questions yet (or an add of it was interrupted: remove it and add it again). Add a document with `addAiAnswersKnowledgeDocument`; remove one with `removeAiAnswersKnowledgeDocument`. The caller must be allowed to see the widget: its owner, a partner for a customer it manages, or a Widgetic administrator. An API key needs the `content:read` scope.
|
|
1074
|
+
# @param id [String] The widget (composition) whose documents to list
|
|
1075
|
+
# @param [Hash] opts the optional parameters
|
|
1076
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1077
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1078
|
+
# @return [Array<(GetAiAnswersKnowledge200Response, Integer, Hash)>] GetAiAnswersKnowledge200Response data, response status code and response headers
|
|
1079
|
+
def get_ai_answers_knowledge_0_with_http_info(id, opts = {})
|
|
1080
|
+
if @api_client.config.debugging
|
|
1081
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.get_ai_answers_knowledge_0 ...'
|
|
1082
|
+
end
|
|
1083
|
+
# verify the required parameter 'id' is set
|
|
1084
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1085
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.get_ai_answers_knowledge_0"
|
|
1086
|
+
end
|
|
1087
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
1088
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_ai_answers_knowledge_0, the character length must be smaller than or equal to 255.'
|
|
1089
|
+
end
|
|
1090
|
+
|
|
1091
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
1092
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_ai_answers_knowledge_0, the character length must be great than or equal to 1.'
|
|
1093
|
+
end
|
|
1094
|
+
|
|
1095
|
+
# resource path
|
|
1096
|
+
local_var_path = '/compositions/{id}/adapters/ai-answers/knowledge'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1097
|
+
|
|
1098
|
+
# query parameters
|
|
1099
|
+
query_params = opts[:query_params] || {}
|
|
1100
|
+
|
|
1101
|
+
# header parameters
|
|
1102
|
+
header_params = opts[:header_params] || {}
|
|
1103
|
+
# HTTP header 'Accept' (if needed)
|
|
1104
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1105
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
1106
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
1107
|
+
|
|
1108
|
+
# form parameters
|
|
1109
|
+
form_params = opts[:form_params] || {}
|
|
1110
|
+
|
|
1111
|
+
# http body (model)
|
|
1112
|
+
post_body = opts[:debug_body]
|
|
1113
|
+
|
|
1114
|
+
# return_type
|
|
1115
|
+
return_type = opts[:debug_return_type] || 'GetAiAnswersKnowledge200Response'
|
|
1116
|
+
|
|
1117
|
+
# auth_names
|
|
1118
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
1119
|
+
|
|
1120
|
+
new_options = opts.merge(
|
|
1121
|
+
:operation => :"CompositionsApi.get_ai_answers_knowledge_0",
|
|
1122
|
+
:header_params => header_params,
|
|
1123
|
+
:query_params => query_params,
|
|
1124
|
+
:form_params => form_params,
|
|
1125
|
+
:body => post_body,
|
|
1126
|
+
:auth_names => auth_names,
|
|
1127
|
+
:return_type => return_type
|
|
1128
|
+
)
|
|
1129
|
+
|
|
1130
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1131
|
+
if @api_client.config.debugging
|
|
1132
|
+
@api_client.config.logger.debug "API called: CompositionsApi#get_ai_answers_knowledge_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1133
|
+
end
|
|
1134
|
+
return data, status_code, headers
|
|
1135
|
+
end
|
|
1136
|
+
|
|
1137
|
+
# Get All Compositions
|
|
1138
|
+
# Retrieves all compositions with pagination support. Pass `managedUserId` (Widgetic's id for one of your managed users) or `managedUserExternalId` (your own identifier for the user) to list only the compositions made for that managed user. The compositions of your other managed users, and your own, are left out. It combines with the other filters and with paging. A managed user that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`. An editor session with the `creator` surface may call this to list the compositions of ONE widget it built: it must send `widgetId`, and the answer holds only the compositions made for the session's managed user.
|
|
1139
|
+
# @param [Hash] opts the optional parameters
|
|
1140
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
1141
|
+
# @option opts [Integer] :size Number of items per page (default to 20)
|
|
1142
|
+
# @option opts [String] :sort The order of the list, as `<field>:<asc|desc>`. The field is `createdAt`, `updatedAt`, `name` or `status` (the snake_case spelling, such as `created_at`, is read too). `asc` or `desc` alone orders by `createdAt`. Default: `createdAt:desc`. Any other field is a 400.
|
|
1143
|
+
# @option opts [String] :widget_id Filter compositions by widget ID
|
|
1144
|
+
# @option opts [String] :workspace Filter by workspace
|
|
1145
|
+
# @option opts [String] :project_folder Only the compositions in this project (the project's id).
|
|
1146
|
+
# @option opts [String] :status Only the compositions in this status. Without it, every status is listed.
|
|
1147
|
+
# @option opts [String] :managed_user_id List only the compositions made for this managed user (Widgetic's id for the user). Send this or `managedUserExternalId`, not both. Send it as `managedUserId`; the snake_case spelling `managed_user_id` is refused with a 400, not ignored.
|
|
1148
|
+
# @option opts [String] :managed_user_external_id List only the compositions made for the managed user you registered with this `externalId` (your own identifier for the user). Send this or `managedUserId`, not both.
|
|
1149
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1150
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1151
|
+
# @return [GetAllCompositions200Response]
|
|
1152
|
+
def get_all_compositions_0(opts = {})
|
|
1153
|
+
data, _status_code, _headers = get_all_compositions_0_with_http_info(opts)
|
|
1154
|
+
data
|
|
1155
|
+
end
|
|
1156
|
+
|
|
1157
|
+
# Get All Compositions
|
|
1158
|
+
# Retrieves all compositions with pagination support. Pass `managedUserId` (Widgetic's id for one of your managed users) or `managedUserExternalId` (your own identifier for the user) to list only the compositions made for that managed user. The compositions of your other managed users, and your own, are left out. It combines with the other filters and with paging. A managed user that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`. An editor session with the `creator` surface may call this to list the compositions of ONE widget it built: it must send `widgetId`, and the answer holds only the compositions made for the session's managed user.
|
|
1159
|
+
# @param [Hash] opts the optional parameters
|
|
1160
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
1161
|
+
# @option opts [Integer] :size Number of items per page (default to 20)
|
|
1162
|
+
# @option opts [String] :sort The order of the list, as `<field>:<asc|desc>`. The field is `createdAt`, `updatedAt`, `name` or `status` (the snake_case spelling, such as `created_at`, is read too). `asc` or `desc` alone orders by `createdAt`. Default: `createdAt:desc`. Any other field is a 400.
|
|
1163
|
+
# @option opts [String] :widget_id Filter compositions by widget ID
|
|
1164
|
+
# @option opts [String] :workspace Filter by workspace
|
|
1165
|
+
# @option opts [String] :project_folder Only the compositions in this project (the project's id).
|
|
1166
|
+
# @option opts [String] :status Only the compositions in this status. Without it, every status is listed.
|
|
1167
|
+
# @option opts [String] :managed_user_id List only the compositions made for this managed user (Widgetic's id for the user). Send this or `managedUserExternalId`, not both. Send it as `managedUserId`; the snake_case spelling `managed_user_id` is refused with a 400, not ignored.
|
|
1168
|
+
# @option opts [String] :managed_user_external_id List only the compositions made for the managed user you registered with this `externalId` (your own identifier for the user). Send this or `managedUserId`, not both.
|
|
1169
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1170
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1171
|
+
# @return [Array<(GetAllCompositions200Response, Integer, Hash)>] GetAllCompositions200Response data, response status code and response headers
|
|
1172
|
+
def get_all_compositions_0_with_http_info(opts = {})
|
|
1173
|
+
if @api_client.config.debugging
|
|
1174
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.get_all_compositions_0 ...'
|
|
1175
|
+
end
|
|
1176
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
1177
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling CompositionsApi.get_all_compositions_0, must be greater than or equal to 1.'
|
|
1178
|
+
end
|
|
1179
|
+
|
|
1180
|
+
if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
|
|
1181
|
+
fail ArgumentError, 'invalid value for "opts[:"size"]" when calling CompositionsApi.get_all_compositions_0, must be smaller than or equal to 100.'
|
|
1182
|
+
end
|
|
1183
|
+
|
|
1184
|
+
if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] < 1
|
|
1185
|
+
fail ArgumentError, 'invalid value for "opts[:"size"]" when calling CompositionsApi.get_all_compositions_0, must be greater than or equal to 1.'
|
|
1186
|
+
end
|
|
1187
|
+
|
|
1188
|
+
allowable_values = ["true", "false"]
|
|
1189
|
+
if @api_client.config.client_side_validation && opts[:'workspace'] && !allowable_values.include?(opts[:'workspace'])
|
|
1190
|
+
fail ArgumentError, "invalid value for \"workspace\", must be one of #{allowable_values}"
|
|
1191
|
+
end
|
|
1192
|
+
allowable_values = ["draft", "published", "archived"]
|
|
1193
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
1194
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
1195
|
+
end
|
|
1196
|
+
if @api_client.config.client_side_validation && !opts[:'managed_user_external_id'].nil? && opts[:'managed_user_external_id'].to_s.length > 255
|
|
1197
|
+
fail ArgumentError, 'invalid value for "opts[:"managed_user_external_id"]" when calling CompositionsApi.get_all_compositions_0, the character length must be smaller than or equal to 255.'
|
|
1198
|
+
end
|
|
1199
|
+
|
|
1200
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
1201
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_all_compositions_0, the character length must be smaller than or equal to 255.'
|
|
1202
|
+
end
|
|
1203
|
+
|
|
1204
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
1205
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_all_compositions_0, the character length must be great than or equal to 1.'
|
|
1206
|
+
end
|
|
1207
|
+
|
|
1208
|
+
# resource path
|
|
1209
|
+
local_var_path = '/compositions'
|
|
1210
|
+
|
|
1211
|
+
# query parameters
|
|
1212
|
+
query_params = opts[:query_params] || {}
|
|
1213
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1214
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
|
1215
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
1216
|
+
query_params[:'widgetId'] = opts[:'widget_id'] if !opts[:'widget_id'].nil?
|
|
1217
|
+
query_params[:'workspace'] = opts[:'workspace'] if !opts[:'workspace'].nil?
|
|
1218
|
+
query_params[:'projectFolder'] = opts[:'project_folder'] if !opts[:'project_folder'].nil?
|
|
1219
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
1220
|
+
query_params[:'managedUserId'] = opts[:'managed_user_id'] if !opts[:'managed_user_id'].nil?
|
|
1221
|
+
query_params[:'managedUserExternalId'] = opts[:'managed_user_external_id'] if !opts[:'managed_user_external_id'].nil?
|
|
1222
|
+
|
|
1223
|
+
# header parameters
|
|
1224
|
+
header_params = opts[:header_params] || {}
|
|
1225
|
+
# HTTP header 'Accept' (if needed)
|
|
1226
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1227
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
1228
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
1229
|
+
|
|
1230
|
+
# form parameters
|
|
1231
|
+
form_params = opts[:form_params] || {}
|
|
1232
|
+
|
|
1233
|
+
# http body (model)
|
|
1234
|
+
post_body = opts[:debug_body]
|
|
1235
|
+
|
|
1236
|
+
# return_type
|
|
1237
|
+
return_type = opts[:debug_return_type] || 'GetAllCompositions200Response'
|
|
1238
|
+
|
|
1239
|
+
# auth_names
|
|
1240
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
1241
|
+
|
|
1242
|
+
new_options = opts.merge(
|
|
1243
|
+
:operation => :"CompositionsApi.get_all_compositions_0",
|
|
1244
|
+
:header_params => header_params,
|
|
1245
|
+
:query_params => query_params,
|
|
1246
|
+
:form_params => form_params,
|
|
1247
|
+
:body => post_body,
|
|
1248
|
+
:auth_names => auth_names,
|
|
1249
|
+
:return_type => return_type
|
|
1250
|
+
)
|
|
1251
|
+
|
|
1252
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1253
|
+
if @api_client.config.debugging
|
|
1254
|
+
@api_client.config.logger.debug "API called: CompositionsApi#get_all_compositions_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1255
|
+
end
|
|
1256
|
+
return data, status_code, headers
|
|
1257
|
+
end
|
|
1258
|
+
|
|
1259
|
+
# Get Composition
|
|
1260
|
+
# Retrieves a specific composition by its ID. The answer carries `direct`, which says whether the widget the composition is made from is drawn straight into your page (`true`) or inside a frame (`false`), or `null` while the widget has no published version. Read it before you go live: a widget drawn without a frame writes its entries from your own page, so the public entry route accepts them only from a website on the composition's allowed list, and refuses them while that list is empty (the public JSON of the composition stays open to every website). A widget in a frame writes from Widgetic's own frame and is accepted whatever the list says.
|
|
1261
|
+
# @param id [String] Composition ID
|
|
1262
|
+
# @param [Hash] opts the optional parameters
|
|
1263
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1264
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1265
|
+
# @return [CreateCompositionFromWidget201Response]
|
|
1266
|
+
def get_composition_by_id_0(id, opts = {})
|
|
1267
|
+
data, _status_code, _headers = get_composition_by_id_0_with_http_info(id, opts)
|
|
1268
|
+
data
|
|
1269
|
+
end
|
|
1270
|
+
|
|
1271
|
+
# Get Composition
|
|
1272
|
+
# Retrieves a specific composition by its ID. The answer carries `direct`, which says whether the widget the composition is made from is drawn straight into your page (`true`) or inside a frame (`false`), or `null` while the widget has no published version. Read it before you go live: a widget drawn without a frame writes its entries from your own page, so the public entry route accepts them only from a website on the composition's allowed list, and refuses them while that list is empty (the public JSON of the composition stays open to every website). A widget in a frame writes from Widgetic's own frame and is accepted whatever the list says.
|
|
1273
|
+
# @param id [String] Composition ID
|
|
1274
|
+
# @param [Hash] opts the optional parameters
|
|
1275
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1276
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1277
|
+
# @return [Array<(CreateCompositionFromWidget201Response, Integer, Hash)>] CreateCompositionFromWidget201Response data, response status code and response headers
|
|
1278
|
+
def get_composition_by_id_0_with_http_info(id, opts = {})
|
|
1279
|
+
if @api_client.config.debugging
|
|
1280
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.get_composition_by_id_0 ...'
|
|
1281
|
+
end
|
|
1282
|
+
# verify the required parameter 'id' is set
|
|
1283
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1284
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.get_composition_by_id_0"
|
|
1285
|
+
end
|
|
1286
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
1287
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_by_id_0, the character length must be smaller than or equal to 255.'
|
|
1288
|
+
end
|
|
1289
|
+
|
|
1290
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
1291
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_by_id_0, the character length must be great than or equal to 1.'
|
|
1292
|
+
end
|
|
1293
|
+
|
|
1294
|
+
# resource path
|
|
1295
|
+
local_var_path = '/compositions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1296
|
+
|
|
1297
|
+
# query parameters
|
|
1298
|
+
query_params = opts[:query_params] || {}
|
|
1299
|
+
|
|
1300
|
+
# header parameters
|
|
1301
|
+
header_params = opts[:header_params] || {}
|
|
1302
|
+
# HTTP header 'Accept' (if needed)
|
|
1303
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1304
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
1305
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
1306
|
+
|
|
1307
|
+
# form parameters
|
|
1308
|
+
form_params = opts[:form_params] || {}
|
|
1309
|
+
|
|
1310
|
+
# http body (model)
|
|
1311
|
+
post_body = opts[:debug_body]
|
|
1312
|
+
|
|
1313
|
+
# return_type
|
|
1314
|
+
return_type = opts[:debug_return_type] || 'CreateCompositionFromWidget201Response'
|
|
1315
|
+
|
|
1316
|
+
# auth_names
|
|
1317
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
1318
|
+
|
|
1319
|
+
new_options = opts.merge(
|
|
1320
|
+
:operation => :"CompositionsApi.get_composition_by_id_0",
|
|
1321
|
+
:header_params => header_params,
|
|
1322
|
+
:query_params => query_params,
|
|
1323
|
+
:form_params => form_params,
|
|
1324
|
+
:body => post_body,
|
|
1325
|
+
:auth_names => auth_names,
|
|
1326
|
+
:return_type => return_type
|
|
1327
|
+
)
|
|
1328
|
+
|
|
1329
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1330
|
+
if @api_client.config.debugging
|
|
1331
|
+
@api_client.config.logger.debug "API called: CompositionsApi#get_composition_by_id_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1332
|
+
end
|
|
1333
|
+
return data, status_code, headers
|
|
1334
|
+
end
|
|
1335
|
+
|
|
1336
|
+
# Get Current Content
|
|
1337
|
+
# Retrieves the current content of a composition
|
|
1338
|
+
# @param id [String] ID of the composition
|
|
1339
|
+
# @param [Hash] opts the optional parameters
|
|
1340
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1341
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1342
|
+
# @return [GetCompositionContentResponse]
|
|
1343
|
+
def get_composition_content_0(id, opts = {})
|
|
1344
|
+
data, _status_code, _headers = get_composition_content_0_with_http_info(id, opts)
|
|
1345
|
+
data
|
|
1346
|
+
end
|
|
1347
|
+
|
|
1348
|
+
# Get Current Content
|
|
1349
|
+
# Retrieves the current content of a composition
|
|
1350
|
+
# @param id [String] ID of the composition
|
|
1351
|
+
# @param [Hash] opts the optional parameters
|
|
1352
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1353
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1354
|
+
# @return [Array<(GetCompositionContentResponse, Integer, Hash)>] GetCompositionContentResponse data, response status code and response headers
|
|
1355
|
+
def get_composition_content_0_with_http_info(id, opts = {})
|
|
1356
|
+
if @api_client.config.debugging
|
|
1357
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.get_composition_content_0 ...'
|
|
1358
|
+
end
|
|
1359
|
+
# verify the required parameter 'id' is set
|
|
1360
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1361
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.get_composition_content_0"
|
|
1362
|
+
end
|
|
1363
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
1364
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_content_0, the character length must be smaller than or equal to 255.'
|
|
1365
|
+
end
|
|
1366
|
+
|
|
1367
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
1368
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_content_0, the character length must be great than or equal to 1.'
|
|
1369
|
+
end
|
|
1370
|
+
|
|
1371
|
+
# resource path
|
|
1372
|
+
local_var_path = '/compositions/{id}/content'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1373
|
+
|
|
1374
|
+
# query parameters
|
|
1375
|
+
query_params = opts[:query_params] || {}
|
|
1376
|
+
|
|
1377
|
+
# header parameters
|
|
1378
|
+
header_params = opts[:header_params] || {}
|
|
1379
|
+
# HTTP header 'Accept' (if needed)
|
|
1380
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1381
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
1382
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
1383
|
+
|
|
1384
|
+
# form parameters
|
|
1385
|
+
form_params = opts[:form_params] || {}
|
|
1386
|
+
|
|
1387
|
+
# http body (model)
|
|
1388
|
+
post_body = opts[:debug_body]
|
|
1389
|
+
|
|
1390
|
+
# return_type
|
|
1391
|
+
return_type = opts[:debug_return_type] || 'GetCompositionContentResponse'
|
|
1392
|
+
|
|
1393
|
+
# auth_names
|
|
1394
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
1395
|
+
|
|
1396
|
+
new_options = opts.merge(
|
|
1397
|
+
:operation => :"CompositionsApi.get_composition_content_0",
|
|
1398
|
+
:header_params => header_params,
|
|
1399
|
+
:query_params => query_params,
|
|
1400
|
+
:form_params => form_params,
|
|
1401
|
+
:body => post_body,
|
|
1402
|
+
:auth_names => auth_names,
|
|
1403
|
+
:return_type => return_type
|
|
1404
|
+
)
|
|
1405
|
+
|
|
1406
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1407
|
+
if @api_client.config.debugging
|
|
1408
|
+
@api_client.config.logger.debug "API called: CompositionsApi#get_composition_content_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1409
|
+
end
|
|
1410
|
+
return data, status_code, headers
|
|
1411
|
+
end
|
|
1412
|
+
|
|
1413
|
+
# Get Content Schema
|
|
1414
|
+
# Retrieves the content schema for a composition based on its widget type
|
|
1415
|
+
# @param id [String] ID of the composition
|
|
1416
|
+
# @param [Hash] opts the optional parameters
|
|
1417
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1418
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1419
|
+
# @return [GetCompositionContentSchemaResponse]
|
|
1420
|
+
def get_composition_content_schema_0(id, opts = {})
|
|
1421
|
+
data, _status_code, _headers = get_composition_content_schema_0_with_http_info(id, opts)
|
|
1422
|
+
data
|
|
1423
|
+
end
|
|
1424
|
+
|
|
1425
|
+
# Get Content Schema
|
|
1426
|
+
# Retrieves the content schema for a composition based on its widget type
|
|
1427
|
+
# @param id [String] ID of the composition
|
|
1428
|
+
# @param [Hash] opts the optional parameters
|
|
1429
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1430
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1431
|
+
# @return [Array<(GetCompositionContentSchemaResponse, Integer, Hash)>] GetCompositionContentSchemaResponse data, response status code and response headers
|
|
1432
|
+
def get_composition_content_schema_0_with_http_info(id, opts = {})
|
|
1433
|
+
if @api_client.config.debugging
|
|
1434
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.get_composition_content_schema_0 ...'
|
|
1435
|
+
end
|
|
1436
|
+
# verify the required parameter 'id' is set
|
|
1437
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1438
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.get_composition_content_schema_0"
|
|
1439
|
+
end
|
|
1440
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
1441
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_content_schema_0, the character length must be smaller than or equal to 255.'
|
|
1442
|
+
end
|
|
1443
|
+
|
|
1444
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
1445
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_content_schema_0, the character length must be great than or equal to 1.'
|
|
1446
|
+
end
|
|
1447
|
+
|
|
1448
|
+
# resource path
|
|
1449
|
+
local_var_path = '/compositions/{id}/schema/content'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1450
|
+
|
|
1451
|
+
# query parameters
|
|
1452
|
+
query_params = opts[:query_params] || {}
|
|
1453
|
+
|
|
1454
|
+
# header parameters
|
|
1455
|
+
header_params = opts[:header_params] || {}
|
|
1456
|
+
# HTTP header 'Accept' (if needed)
|
|
1457
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1458
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
1459
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
1460
|
+
|
|
1461
|
+
# form parameters
|
|
1462
|
+
form_params = opts[:form_params] || {}
|
|
1463
|
+
|
|
1464
|
+
# http body (model)
|
|
1465
|
+
post_body = opts[:debug_body]
|
|
1466
|
+
|
|
1467
|
+
# return_type
|
|
1468
|
+
return_type = opts[:debug_return_type] || 'GetCompositionContentSchemaResponse'
|
|
1469
|
+
|
|
1470
|
+
# auth_names
|
|
1471
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
1472
|
+
|
|
1473
|
+
new_options = opts.merge(
|
|
1474
|
+
:operation => :"CompositionsApi.get_composition_content_schema_0",
|
|
1475
|
+
:header_params => header_params,
|
|
1476
|
+
:query_params => query_params,
|
|
1477
|
+
:form_params => form_params,
|
|
1478
|
+
:body => post_body,
|
|
1479
|
+
:auth_names => auth_names,
|
|
1480
|
+
:return_type => return_type
|
|
1481
|
+
)
|
|
1482
|
+
|
|
1483
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1484
|
+
if @api_client.config.debugging
|
|
1485
|
+
@api_client.config.logger.debug "API called: CompositionsApi#get_composition_content_schema_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1486
|
+
end
|
|
1487
|
+
return data, status_code, headers
|
|
1488
|
+
end
|
|
1489
|
+
|
|
1490
|
+
# Read the composition data source binding
|
|
1491
|
+
# The data source that is bound to the composition: `url` and `refreshSeconds`. The answer's `data` is `null` when none is bound, and also when what is stored does not pass the rule for a public https address (a binding written by another path, such as the general embed-settings update, is never shown to a page unless it passes the same checks as this route).
|
|
1492
|
+
# @param id [String]
|
|
1493
|
+
# @param [Hash] opts the optional parameters
|
|
1494
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1495
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1496
|
+
# @return [GetCompositionDataSourceResponse]
|
|
1497
|
+
def get_composition_data_source_0(id, opts = {})
|
|
1498
|
+
data, _status_code, _headers = get_composition_data_source_0_with_http_info(id, opts)
|
|
1499
|
+
data
|
|
1500
|
+
end
|
|
1501
|
+
|
|
1502
|
+
# Read the composition data source binding
|
|
1503
|
+
# The data source that is bound to the composition: `url` and `refreshSeconds`. The answer's `data` is `null` when none is bound, and also when what is stored does not pass the rule for a public https address (a binding written by another path, such as the general embed-settings update, is never shown to a page unless it passes the same checks as this route).
|
|
1504
|
+
# @param id [String]
|
|
1505
|
+
# @param [Hash] opts the optional parameters
|
|
1506
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1507
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1508
|
+
# @return [Array<(GetCompositionDataSourceResponse, Integer, Hash)>] GetCompositionDataSourceResponse data, response status code and response headers
|
|
1509
|
+
def get_composition_data_source_0_with_http_info(id, opts = {})
|
|
1510
|
+
if @api_client.config.debugging
|
|
1511
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.get_composition_data_source_0 ...'
|
|
1512
|
+
end
|
|
1513
|
+
# verify the required parameter 'id' is set
|
|
1514
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1515
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.get_composition_data_source_0"
|
|
1516
|
+
end
|
|
1517
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
1518
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_data_source_0, the character length must be smaller than or equal to 255.'
|
|
1519
|
+
end
|
|
1520
|
+
|
|
1521
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
1522
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_data_source_0, the character length must be great than or equal to 1.'
|
|
1523
|
+
end
|
|
1524
|
+
|
|
1525
|
+
# resource path
|
|
1526
|
+
local_var_path = '/compositions/{id}/data-source'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1527
|
+
|
|
1528
|
+
# query parameters
|
|
1529
|
+
query_params = opts[:query_params] || {}
|
|
1530
|
+
|
|
1531
|
+
# header parameters
|
|
1532
|
+
header_params = opts[:header_params] || {}
|
|
1533
|
+
# HTTP header 'Accept' (if needed)
|
|
1534
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1535
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
1536
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
1537
|
+
|
|
1538
|
+
# form parameters
|
|
1539
|
+
form_params = opts[:form_params] || {}
|
|
1540
|
+
|
|
1541
|
+
# http body (model)
|
|
1542
|
+
post_body = opts[:debug_body]
|
|
1543
|
+
|
|
1544
|
+
# return_type
|
|
1545
|
+
return_type = opts[:debug_return_type] || 'GetCompositionDataSourceResponse'
|
|
1546
|
+
|
|
1547
|
+
# auth_names
|
|
1548
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
1549
|
+
|
|
1550
|
+
new_options = opts.merge(
|
|
1551
|
+
:operation => :"CompositionsApi.get_composition_data_source_0",
|
|
1552
|
+
:header_params => header_params,
|
|
1553
|
+
:query_params => query_params,
|
|
1554
|
+
:form_params => form_params,
|
|
1555
|
+
:body => post_body,
|
|
1556
|
+
:auth_names => auth_names,
|
|
1557
|
+
:return_type => return_type
|
|
1558
|
+
)
|
|
1559
|
+
|
|
1560
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1561
|
+
if @api_client.config.debugging
|
|
1562
|
+
@api_client.config.logger.debug "API called: CompositionsApi#get_composition_data_source_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1563
|
+
end
|
|
1564
|
+
return data, status_code, headers
|
|
1565
|
+
end
|
|
1566
|
+
|
|
1567
|
+
# Get Record From Composition Database
|
|
1568
|
+
# Retrieves a specific record from one of the composition's tables. Only the composition's own tables (made from its `databaseSchema` or from the tables its widget declares) can be reached; any other table name answers `404`.
|
|
1569
|
+
# @param id [String] ID of the composition
|
|
1570
|
+
# @param table [String] Name of the database table
|
|
1571
|
+
# @param record_id [String] ID of the record to retrieve
|
|
1572
|
+
# @param [Hash] opts the optional parameters
|
|
1573
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1574
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1575
|
+
# @return [CreateCompositionDatabaseRecord201Response]
|
|
1576
|
+
def get_composition_database_record_0(id, table, record_id, opts = {})
|
|
1577
|
+
data, _status_code, _headers = get_composition_database_record_0_with_http_info(id, table, record_id, opts)
|
|
1578
|
+
data
|
|
1579
|
+
end
|
|
1580
|
+
|
|
1581
|
+
# Get Record From Composition Database
|
|
1582
|
+
# Retrieves a specific record from one of the composition's tables. Only the composition's own tables (made from its `databaseSchema` or from the tables its widget declares) can be reached; any other table name answers `404`.
|
|
1583
|
+
# @param id [String] ID of the composition
|
|
1584
|
+
# @param table [String] Name of the database table
|
|
1585
|
+
# @param record_id [String] ID of the record to retrieve
|
|
1586
|
+
# @param [Hash] opts the optional parameters
|
|
1587
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1588
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1589
|
+
# @return [Array<(CreateCompositionDatabaseRecord201Response, Integer, Hash)>] CreateCompositionDatabaseRecord201Response data, response status code and response headers
|
|
1590
|
+
def get_composition_database_record_0_with_http_info(id, table, record_id, opts = {})
|
|
1591
|
+
if @api_client.config.debugging
|
|
1592
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.get_composition_database_record_0 ...'
|
|
1593
|
+
end
|
|
1594
|
+
# verify the required parameter 'id' is set
|
|
1595
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1596
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.get_composition_database_record_0"
|
|
1597
|
+
end
|
|
1598
|
+
# verify the required parameter 'table' is set
|
|
1599
|
+
if @api_client.config.client_side_validation && table.nil?
|
|
1600
|
+
fail ArgumentError, "Missing the required parameter 'table' when calling CompositionsApi.get_composition_database_record_0"
|
|
1601
|
+
end
|
|
1602
|
+
# verify the required parameter 'record_id' is set
|
|
1603
|
+
if @api_client.config.client_side_validation && record_id.nil?
|
|
1604
|
+
fail ArgumentError, "Missing the required parameter 'record_id' when calling CompositionsApi.get_composition_database_record_0"
|
|
1605
|
+
end
|
|
1606
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
1607
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_database_record_0, the character length must be smaller than or equal to 255.'
|
|
1608
|
+
end
|
|
1609
|
+
|
|
1610
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
1611
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_database_record_0, the character length must be great than or equal to 1.'
|
|
1612
|
+
end
|
|
1613
|
+
|
|
1614
|
+
# resource path
|
|
1615
|
+
local_var_path = '/compositions/{id}/database/{table}/{recordId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'table' + '}', CGI.escape(table.to_s)).sub('{' + 'recordId' + '}', CGI.escape(record_id.to_s))
|
|
1616
|
+
|
|
1617
|
+
# query parameters
|
|
1618
|
+
query_params = opts[:query_params] || {}
|
|
1619
|
+
|
|
1620
|
+
# header parameters
|
|
1621
|
+
header_params = opts[:header_params] || {}
|
|
1622
|
+
# HTTP header 'Accept' (if needed)
|
|
1623
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1624
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
1625
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
1626
|
+
|
|
1627
|
+
# form parameters
|
|
1628
|
+
form_params = opts[:form_params] || {}
|
|
1629
|
+
|
|
1630
|
+
# http body (model)
|
|
1631
|
+
post_body = opts[:debug_body]
|
|
1632
|
+
|
|
1633
|
+
# return_type
|
|
1634
|
+
return_type = opts[:debug_return_type] || 'CreateCompositionDatabaseRecord201Response'
|
|
1635
|
+
|
|
1636
|
+
# auth_names
|
|
1637
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
1638
|
+
|
|
1639
|
+
new_options = opts.merge(
|
|
1640
|
+
:operation => :"CompositionsApi.get_composition_database_record_0",
|
|
1641
|
+
:header_params => header_params,
|
|
1642
|
+
:query_params => query_params,
|
|
1643
|
+
:form_params => form_params,
|
|
1644
|
+
:body => post_body,
|
|
1645
|
+
:auth_names => auth_names,
|
|
1646
|
+
:return_type => return_type
|
|
1647
|
+
)
|
|
1648
|
+
|
|
1649
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1650
|
+
if @api_client.config.debugging
|
|
1651
|
+
@api_client.config.logger.debug "API called: CompositionsApi#get_composition_database_record_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1652
|
+
end
|
|
1653
|
+
return data, status_code, headers
|
|
1654
|
+
end
|
|
1655
|
+
|
|
1656
|
+
# Get All Records From Composition Database Table
|
|
1657
|
+
# Retrieves all records from one of the composition's tables. Only the composition's own tables (made from its `databaseSchema` or from the tables its widget declares) can be reached; any other table name answers `404`.
|
|
1658
|
+
# @param id [String] ID of the composition
|
|
1659
|
+
# @param table [String] Name of the database table
|
|
1660
|
+
# @param [Hash] opts the optional parameters
|
|
1661
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1662
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1663
|
+
# @return [GetCompositionDatabaseRecords200Response]
|
|
1664
|
+
def get_composition_database_records_0(id, table, opts = {})
|
|
1665
|
+
data, _status_code, _headers = get_composition_database_records_0_with_http_info(id, table, opts)
|
|
1666
|
+
data
|
|
1667
|
+
end
|
|
1668
|
+
|
|
1669
|
+
# Get All Records From Composition Database Table
|
|
1670
|
+
# Retrieves all records from one of the composition's tables. Only the composition's own tables (made from its `databaseSchema` or from the tables its widget declares) can be reached; any other table name answers `404`.
|
|
1671
|
+
# @param id [String] ID of the composition
|
|
1672
|
+
# @param table [String] Name of the database table
|
|
1673
|
+
# @param [Hash] opts the optional parameters
|
|
1674
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1675
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1676
|
+
# @return [Array<(GetCompositionDatabaseRecords200Response, Integer, Hash)>] GetCompositionDatabaseRecords200Response data, response status code and response headers
|
|
1677
|
+
def get_composition_database_records_0_with_http_info(id, table, opts = {})
|
|
1678
|
+
if @api_client.config.debugging
|
|
1679
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.get_composition_database_records_0 ...'
|
|
1680
|
+
end
|
|
1681
|
+
# verify the required parameter 'id' is set
|
|
1682
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1683
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.get_composition_database_records_0"
|
|
1684
|
+
end
|
|
1685
|
+
# verify the required parameter 'table' is set
|
|
1686
|
+
if @api_client.config.client_side_validation && table.nil?
|
|
1687
|
+
fail ArgumentError, "Missing the required parameter 'table' when calling CompositionsApi.get_composition_database_records_0"
|
|
1688
|
+
end
|
|
1689
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
1690
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_database_records_0, the character length must be smaller than or equal to 255.'
|
|
1691
|
+
end
|
|
1692
|
+
|
|
1693
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
1694
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_database_records_0, the character length must be great than or equal to 1.'
|
|
1695
|
+
end
|
|
1696
|
+
|
|
1697
|
+
# resource path
|
|
1698
|
+
local_var_path = '/compositions/{id}/database/{table}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'table' + '}', CGI.escape(table.to_s))
|
|
1699
|
+
|
|
1700
|
+
# query parameters
|
|
1701
|
+
query_params = opts[:query_params] || {}
|
|
1702
|
+
|
|
1703
|
+
# header parameters
|
|
1704
|
+
header_params = opts[:header_params] || {}
|
|
1705
|
+
# HTTP header 'Accept' (if needed)
|
|
1706
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1707
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
1708
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
1709
|
+
|
|
1710
|
+
# form parameters
|
|
1711
|
+
form_params = opts[:form_params] || {}
|
|
1712
|
+
|
|
1713
|
+
# http body (model)
|
|
1714
|
+
post_body = opts[:debug_body]
|
|
1715
|
+
|
|
1716
|
+
# return_type
|
|
1717
|
+
return_type = opts[:debug_return_type] || 'GetCompositionDatabaseRecords200Response'
|
|
1718
|
+
|
|
1719
|
+
# auth_names
|
|
1720
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
1721
|
+
|
|
1722
|
+
new_options = opts.merge(
|
|
1723
|
+
:operation => :"CompositionsApi.get_composition_database_records_0",
|
|
1724
|
+
:header_params => header_params,
|
|
1725
|
+
:query_params => query_params,
|
|
1726
|
+
:form_params => form_params,
|
|
1727
|
+
:body => post_body,
|
|
1728
|
+
:auth_names => auth_names,
|
|
1729
|
+
:return_type => return_type
|
|
1730
|
+
)
|
|
1731
|
+
|
|
1732
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1733
|
+
if @api_client.config.debugging
|
|
1734
|
+
@api_client.config.logger.debug "API called: CompositionsApi#get_composition_database_records_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1735
|
+
end
|
|
1736
|
+
return data, status_code, headers
|
|
1737
|
+
end
|
|
1738
|
+
|
|
1739
|
+
# Get Composition Design
|
|
1740
|
+
# Retrieves only the design field from a composition.
|
|
1741
|
+
# @param id [String] ID of the composition
|
|
1742
|
+
# @param [Hash] opts the optional parameters
|
|
1743
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1744
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1745
|
+
# @return [GetCompositionDesignResponse]
|
|
1746
|
+
def get_composition_design_0(id, opts = {})
|
|
1747
|
+
data, _status_code, _headers = get_composition_design_0_with_http_info(id, opts)
|
|
1748
|
+
data
|
|
1749
|
+
end
|
|
1750
|
+
|
|
1751
|
+
# Get Composition Design
|
|
1752
|
+
# Retrieves only the design field from a composition.
|
|
1753
|
+
# @param id [String] ID of the composition
|
|
1754
|
+
# @param [Hash] opts the optional parameters
|
|
1755
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1756
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1757
|
+
# @return [Array<(GetCompositionDesignResponse, Integer, Hash)>] GetCompositionDesignResponse data, response status code and response headers
|
|
1758
|
+
def get_composition_design_0_with_http_info(id, opts = {})
|
|
1759
|
+
if @api_client.config.debugging
|
|
1760
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.get_composition_design_0 ...'
|
|
1761
|
+
end
|
|
1762
|
+
# verify the required parameter 'id' is set
|
|
1763
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1764
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.get_composition_design_0"
|
|
1765
|
+
end
|
|
1766
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
1767
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_design_0, the character length must be smaller than or equal to 255.'
|
|
1768
|
+
end
|
|
1769
|
+
|
|
1770
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
1771
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_design_0, the character length must be great than or equal to 1.'
|
|
1772
|
+
end
|
|
1773
|
+
|
|
1774
|
+
# resource path
|
|
1775
|
+
local_var_path = '/compositions/{id}/design'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1776
|
+
|
|
1777
|
+
# query parameters
|
|
1778
|
+
query_params = opts[:query_params] || {}
|
|
1779
|
+
|
|
1780
|
+
# header parameters
|
|
1781
|
+
header_params = opts[:header_params] || {}
|
|
1782
|
+
# HTTP header 'Accept' (if needed)
|
|
1783
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1784
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
1785
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
1786
|
+
|
|
1787
|
+
# form parameters
|
|
1788
|
+
form_params = opts[:form_params] || {}
|
|
1789
|
+
|
|
1790
|
+
# http body (model)
|
|
1791
|
+
post_body = opts[:debug_body]
|
|
1792
|
+
|
|
1793
|
+
# return_type
|
|
1794
|
+
return_type = opts[:debug_return_type] || 'GetCompositionDesignResponse'
|
|
1795
|
+
|
|
1796
|
+
# auth_names
|
|
1797
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
1798
|
+
|
|
1799
|
+
new_options = opts.merge(
|
|
1800
|
+
:operation => :"CompositionsApi.get_composition_design_0",
|
|
1801
|
+
:header_params => header_params,
|
|
1802
|
+
:query_params => query_params,
|
|
1803
|
+
:form_params => form_params,
|
|
1804
|
+
:body => post_body,
|
|
1805
|
+
:auth_names => auth_names,
|
|
1806
|
+
:return_type => return_type
|
|
1807
|
+
)
|
|
1808
|
+
|
|
1809
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1810
|
+
if @api_client.config.debugging
|
|
1811
|
+
@api_client.config.logger.debug "API called: CompositionsApi#get_composition_design_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1812
|
+
end
|
|
1813
|
+
return data, status_code, headers
|
|
1814
|
+
end
|
|
1815
|
+
|
|
1816
|
+
# Get Design Schema
|
|
1817
|
+
# Retrieves the design schema for a composition based on its widget type
|
|
1818
|
+
# @param id [String] ID of the composition
|
|
1819
|
+
# @param [Hash] opts the optional parameters
|
|
1820
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1821
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1822
|
+
# @return [GetCompositionDesignSchemaResponse]
|
|
1823
|
+
def get_composition_design_schema_0(id, opts = {})
|
|
1824
|
+
data, _status_code, _headers = get_composition_design_schema_0_with_http_info(id, opts)
|
|
1825
|
+
data
|
|
1826
|
+
end
|
|
1827
|
+
|
|
1828
|
+
# Get Design Schema
|
|
1829
|
+
# Retrieves the design schema for a composition based on its widget type
|
|
1830
|
+
# @param id [String] ID of the composition
|
|
1831
|
+
# @param [Hash] opts the optional parameters
|
|
1832
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1833
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1834
|
+
# @return [Array<(GetCompositionDesignSchemaResponse, Integer, Hash)>] GetCompositionDesignSchemaResponse data, response status code and response headers
|
|
1835
|
+
def get_composition_design_schema_0_with_http_info(id, opts = {})
|
|
1836
|
+
if @api_client.config.debugging
|
|
1837
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.get_composition_design_schema_0 ...'
|
|
1838
|
+
end
|
|
1839
|
+
# verify the required parameter 'id' is set
|
|
1840
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1841
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.get_composition_design_schema_0"
|
|
1842
|
+
end
|
|
1843
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
1844
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_design_schema_0, the character length must be smaller than or equal to 255.'
|
|
1845
|
+
end
|
|
1846
|
+
|
|
1847
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
1848
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_design_schema_0, the character length must be great than or equal to 1.'
|
|
1849
|
+
end
|
|
1850
|
+
|
|
1851
|
+
# resource path
|
|
1852
|
+
local_var_path = '/compositions/{id}/schema/design'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1853
|
+
|
|
1854
|
+
# query parameters
|
|
1855
|
+
query_params = opts[:query_params] || {}
|
|
1856
|
+
|
|
1857
|
+
# header parameters
|
|
1858
|
+
header_params = opts[:header_params] || {}
|
|
1859
|
+
# HTTP header 'Accept' (if needed)
|
|
1860
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1861
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
1862
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
1863
|
+
|
|
1864
|
+
# form parameters
|
|
1865
|
+
form_params = opts[:form_params] || {}
|
|
1866
|
+
|
|
1867
|
+
# http body (model)
|
|
1868
|
+
post_body = opts[:debug_body]
|
|
1869
|
+
|
|
1870
|
+
# return_type
|
|
1871
|
+
return_type = opts[:debug_return_type] || 'GetCompositionDesignSchemaResponse'
|
|
1872
|
+
|
|
1873
|
+
# auth_names
|
|
1874
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
1875
|
+
|
|
1876
|
+
new_options = opts.merge(
|
|
1877
|
+
:operation => :"CompositionsApi.get_composition_design_schema_0",
|
|
1878
|
+
:header_params => header_params,
|
|
1879
|
+
:query_params => query_params,
|
|
1880
|
+
:form_params => form_params,
|
|
1881
|
+
:body => post_body,
|
|
1882
|
+
:auth_names => auth_names,
|
|
1883
|
+
:return_type => return_type
|
|
1884
|
+
)
|
|
1885
|
+
|
|
1886
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1887
|
+
if @api_client.config.debugging
|
|
1888
|
+
@api_client.config.logger.debug "API called: CompositionsApi#get_composition_design_schema_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1889
|
+
end
|
|
1890
|
+
return data, status_code, headers
|
|
1891
|
+
end
|
|
1892
|
+
|
|
1893
|
+
# Get Embed Schema
|
|
1894
|
+
# Retrieves the definition of the composition's Embed tab: which settings exist, what each one holds, what it defaults to, and when its control is shown. It is the third tab beside `schema/content` and `schema/design`, in the same format (`componentGroups` → `components` → `propertyGroups` → `properties`, each property with a `type`, a `defaultValue` and an `inputController`), so a client that draws those two tabs draws this one with the same code. The schema is the same for every composition (it is the one Widgetic's own Embed Editor draws). The composition id decides who may ask: the caller must be able to read the composition. Reading and saving the values: - `GET /compositions/{id}/embed-settings` returns what the composition saved. A composition whose Embed tab was never saved has nothing to return; seed the form from `defaults`, which holds the `defaultValue` of every setting that declares one. - `PUT /compositions/{id}` with `embedSettings` saves them. The gateway stores `embedSettings` as given and does not check it against this schema; the schema is how a client knows what to put there. A property's `visibilityCondition` says when its control is shown: `condition` is a comparison of the current values of the properties named in `dependsOn` (`useIframe === false`, `embedTarget === 'mixed' && keepDimensions === false`). While it is false the Embed Editor does not show the control. A colour picker with `showOpacityControls` saves its opacity next to the colour, under the key `<name>_opacity` as a number from 0 to 1 (`overlayBackgroundColor` → `overlayBackgroundColor_opacity`). Its `defaultTransparency` is a percentage and the saved value a fraction (50 → 0.5).
|
|
1895
|
+
# @param id [String] ID of the composition
|
|
1896
|
+
# @param [Hash] opts the optional parameters
|
|
1897
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1898
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1899
|
+
# @return [GetCompositionEmbedSchemaResponse]
|
|
1900
|
+
def get_composition_embed_schema_0(id, opts = {})
|
|
1901
|
+
data, _status_code, _headers = get_composition_embed_schema_0_with_http_info(id, opts)
|
|
1902
|
+
data
|
|
1903
|
+
end
|
|
1904
|
+
|
|
1905
|
+
# Get Embed Schema
|
|
1906
|
+
# Retrieves the definition of the composition's Embed tab: which settings exist, what each one holds, what it defaults to, and when its control is shown. It is the third tab beside `schema/content` and `schema/design`, in the same format (`componentGroups` → `components` → `propertyGroups` → `properties`, each property with a `type`, a `defaultValue` and an `inputController`), so a client that draws those two tabs draws this one with the same code. The schema is the same for every composition (it is the one Widgetic's own Embed Editor draws). The composition id decides who may ask: the caller must be able to read the composition. Reading and saving the values: - `GET /compositions/{id}/embed-settings` returns what the composition saved. A composition whose Embed tab was never saved has nothing to return; seed the form from `defaults`, which holds the `defaultValue` of every setting that declares one. - `PUT /compositions/{id}` with `embedSettings` saves them. The gateway stores `embedSettings` as given and does not check it against this schema; the schema is how a client knows what to put there. A property's `visibilityCondition` says when its control is shown: `condition` is a comparison of the current values of the properties named in `dependsOn` (`useIframe === false`, `embedTarget === 'mixed' && keepDimensions === false`). While it is false the Embed Editor does not show the control. A colour picker with `showOpacityControls` saves its opacity next to the colour, under the key `<name>_opacity` as a number from 0 to 1 (`overlayBackgroundColor` → `overlayBackgroundColor_opacity`). Its `defaultTransparency` is a percentage and the saved value a fraction (50 → 0.5).
|
|
1907
|
+
# @param id [String] ID of the composition
|
|
1908
|
+
# @param [Hash] opts the optional parameters
|
|
1909
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1910
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1911
|
+
# @return [Array<(GetCompositionEmbedSchemaResponse, Integer, Hash)>] GetCompositionEmbedSchemaResponse data, response status code and response headers
|
|
1912
|
+
def get_composition_embed_schema_0_with_http_info(id, opts = {})
|
|
1913
|
+
if @api_client.config.debugging
|
|
1914
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.get_composition_embed_schema_0 ...'
|
|
1915
|
+
end
|
|
1916
|
+
# verify the required parameter 'id' is set
|
|
1917
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1918
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.get_composition_embed_schema_0"
|
|
1919
|
+
end
|
|
1920
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
1921
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_embed_schema_0, the character length must be smaller than or equal to 255.'
|
|
1922
|
+
end
|
|
1923
|
+
|
|
1924
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
1925
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_embed_schema_0, the character length must be great than or equal to 1.'
|
|
1926
|
+
end
|
|
1927
|
+
|
|
1928
|
+
# resource path
|
|
1929
|
+
local_var_path = '/compositions/{id}/schema/embed'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1930
|
+
|
|
1931
|
+
# query parameters
|
|
1932
|
+
query_params = opts[:query_params] || {}
|
|
1933
|
+
|
|
1934
|
+
# header parameters
|
|
1935
|
+
header_params = opts[:header_params] || {}
|
|
1936
|
+
# HTTP header 'Accept' (if needed)
|
|
1937
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1938
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
1939
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
1940
|
+
|
|
1941
|
+
# form parameters
|
|
1942
|
+
form_params = opts[:form_params] || {}
|
|
1943
|
+
|
|
1944
|
+
# http body (model)
|
|
1945
|
+
post_body = opts[:debug_body]
|
|
1946
|
+
|
|
1947
|
+
# return_type
|
|
1948
|
+
return_type = opts[:debug_return_type] || 'GetCompositionEmbedSchemaResponse'
|
|
1949
|
+
|
|
1950
|
+
# auth_names
|
|
1951
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
1952
|
+
|
|
1953
|
+
new_options = opts.merge(
|
|
1954
|
+
:operation => :"CompositionsApi.get_composition_embed_schema_0",
|
|
1955
|
+
:header_params => header_params,
|
|
1956
|
+
:query_params => query_params,
|
|
1957
|
+
:form_params => form_params,
|
|
1958
|
+
:body => post_body,
|
|
1959
|
+
:auth_names => auth_names,
|
|
1960
|
+
:return_type => return_type
|
|
1961
|
+
)
|
|
1962
|
+
|
|
1963
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1964
|
+
if @api_client.config.debugging
|
|
1965
|
+
@api_client.config.logger.debug "API called: CompositionsApi#get_composition_embed_schema_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1966
|
+
end
|
|
1967
|
+
return data, status_code, headers
|
|
1968
|
+
end
|
|
1969
|
+
|
|
1970
|
+
# Get Composition Embed Settings
|
|
1971
|
+
# Retrieves only the embedSettings field from a composition.
|
|
1972
|
+
# @param id [String] ID of the composition
|
|
1973
|
+
# @param [Hash] opts the optional parameters
|
|
1974
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1975
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1976
|
+
# @return [GetCompositionEmbedSettingsResponse]
|
|
1977
|
+
def get_composition_embed_settings_0(id, opts = {})
|
|
1978
|
+
data, _status_code, _headers = get_composition_embed_settings_0_with_http_info(id, opts)
|
|
1979
|
+
data
|
|
1980
|
+
end
|
|
1981
|
+
|
|
1982
|
+
# Get Composition Embed Settings
|
|
1983
|
+
# Retrieves only the embedSettings field from a composition.
|
|
1984
|
+
# @param id [String] ID of the composition
|
|
1985
|
+
# @param [Hash] opts the optional parameters
|
|
1986
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1987
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
1988
|
+
# @return [Array<(GetCompositionEmbedSettingsResponse, Integer, Hash)>] GetCompositionEmbedSettingsResponse data, response status code and response headers
|
|
1989
|
+
def get_composition_embed_settings_0_with_http_info(id, opts = {})
|
|
1990
|
+
if @api_client.config.debugging
|
|
1991
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.get_composition_embed_settings_0 ...'
|
|
1992
|
+
end
|
|
1993
|
+
# verify the required parameter 'id' is set
|
|
1994
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1995
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.get_composition_embed_settings_0"
|
|
1996
|
+
end
|
|
1997
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
1998
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_embed_settings_0, the character length must be smaller than or equal to 255.'
|
|
1999
|
+
end
|
|
2000
|
+
|
|
2001
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
2002
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_embed_settings_0, the character length must be great than or equal to 1.'
|
|
2003
|
+
end
|
|
2004
|
+
|
|
2005
|
+
# resource path
|
|
2006
|
+
local_var_path = '/compositions/{id}/embed-settings'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
2007
|
+
|
|
2008
|
+
# query parameters
|
|
2009
|
+
query_params = opts[:query_params] || {}
|
|
2010
|
+
|
|
2011
|
+
# header parameters
|
|
2012
|
+
header_params = opts[:header_params] || {}
|
|
2013
|
+
# HTTP header 'Accept' (if needed)
|
|
2014
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2015
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
2016
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
2017
|
+
|
|
2018
|
+
# form parameters
|
|
2019
|
+
form_params = opts[:form_params] || {}
|
|
2020
|
+
|
|
2021
|
+
# http body (model)
|
|
2022
|
+
post_body = opts[:debug_body]
|
|
2023
|
+
|
|
2024
|
+
# return_type
|
|
2025
|
+
return_type = opts[:debug_return_type] || 'GetCompositionEmbedSettingsResponse'
|
|
2026
|
+
|
|
2027
|
+
# auth_names
|
|
2028
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
2029
|
+
|
|
2030
|
+
new_options = opts.merge(
|
|
2031
|
+
:operation => :"CompositionsApi.get_composition_embed_settings_0",
|
|
2032
|
+
:header_params => header_params,
|
|
2033
|
+
:query_params => query_params,
|
|
2034
|
+
:form_params => form_params,
|
|
2035
|
+
:body => post_body,
|
|
2036
|
+
:auth_names => auth_names,
|
|
2037
|
+
:return_type => return_type
|
|
2038
|
+
)
|
|
2039
|
+
|
|
2040
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2041
|
+
if @api_client.config.debugging
|
|
2042
|
+
@api_client.config.logger.debug "API called: CompositionsApi#get_composition_embed_settings_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2043
|
+
end
|
|
2044
|
+
return data, status_code, headers
|
|
2045
|
+
end
|
|
2046
|
+
|
|
2047
|
+
# Get Composition Preview
|
|
2048
|
+
# Returns the address of the page an editor shows the composition in: the page of the widget's published version on the CDN, with the widget and version it is. Load it in a frame, then send the frame what to show (the content, design and embed settings you read from the composition, and every change the user makes) with `postMessage`: `{ type: 'widgetic:update', design }`, `{ type: 'widgetic:update', content }` or `{ type: 'widgetic:update', contentItems }`. The version is the one embeds show, so the editor previews what a visitor gets. The address does not carry the composition id: an embed uses the id to fetch the saved composition itself, while an editor sends the current state (unsaved changes included). A widget that has never been published has no page to show: the answer is 409 `WIDGET_NOT_PUBLISHED`.
|
|
2049
|
+
# @param id [String] ID of the composition
|
|
2050
|
+
# @param [Hash] opts the optional parameters
|
|
2051
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2052
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2053
|
+
# @return [GetCompositionPreviewResponse]
|
|
2054
|
+
def get_composition_preview_0(id, opts = {})
|
|
2055
|
+
data, _status_code, _headers = get_composition_preview_0_with_http_info(id, opts)
|
|
2056
|
+
data
|
|
2057
|
+
end
|
|
2058
|
+
|
|
2059
|
+
# Get Composition Preview
|
|
2060
|
+
# Returns the address of the page an editor shows the composition in: the page of the widget's published version on the CDN, with the widget and version it is. Load it in a frame, then send the frame what to show (the content, design and embed settings you read from the composition, and every change the user makes) with `postMessage`: `{ type: 'widgetic:update', design }`, `{ type: 'widgetic:update', content }` or `{ type: 'widgetic:update', contentItems }`. The version is the one embeds show, so the editor previews what a visitor gets. The address does not carry the composition id: an embed uses the id to fetch the saved composition itself, while an editor sends the current state (unsaved changes included). A widget that has never been published has no page to show: the answer is 409 `WIDGET_NOT_PUBLISHED`.
|
|
2061
|
+
# @param id [String] ID of the composition
|
|
2062
|
+
# @param [Hash] opts the optional parameters
|
|
2063
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2064
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2065
|
+
# @return [Array<(GetCompositionPreviewResponse, Integer, Hash)>] GetCompositionPreviewResponse data, response status code and response headers
|
|
2066
|
+
def get_composition_preview_0_with_http_info(id, opts = {})
|
|
2067
|
+
if @api_client.config.debugging
|
|
2068
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.get_composition_preview_0 ...'
|
|
2069
|
+
end
|
|
2070
|
+
# verify the required parameter 'id' is set
|
|
2071
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
2072
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.get_composition_preview_0"
|
|
2073
|
+
end
|
|
2074
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
2075
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_preview_0, the character length must be smaller than or equal to 255.'
|
|
2076
|
+
end
|
|
2077
|
+
|
|
2078
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
2079
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_preview_0, the character length must be great than or equal to 1.'
|
|
2080
|
+
end
|
|
2081
|
+
|
|
2082
|
+
# resource path
|
|
2083
|
+
local_var_path = '/compositions/{id}/preview'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
2084
|
+
|
|
2085
|
+
# query parameters
|
|
2086
|
+
query_params = opts[:query_params] || {}
|
|
2087
|
+
|
|
2088
|
+
# header parameters
|
|
2089
|
+
header_params = opts[:header_params] || {}
|
|
2090
|
+
# HTTP header 'Accept' (if needed)
|
|
2091
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2092
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
2093
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
2094
|
+
|
|
2095
|
+
# form parameters
|
|
2096
|
+
form_params = opts[:form_params] || {}
|
|
2097
|
+
|
|
2098
|
+
# http body (model)
|
|
2099
|
+
post_body = opts[:debug_body]
|
|
2100
|
+
|
|
2101
|
+
# return_type
|
|
2102
|
+
return_type = opts[:debug_return_type] || 'GetCompositionPreviewResponse'
|
|
2103
|
+
|
|
2104
|
+
# auth_names
|
|
2105
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
2106
|
+
|
|
2107
|
+
new_options = opts.merge(
|
|
2108
|
+
:operation => :"CompositionsApi.get_composition_preview_0",
|
|
2109
|
+
:header_params => header_params,
|
|
2110
|
+
:query_params => query_params,
|
|
2111
|
+
:form_params => form_params,
|
|
2112
|
+
:body => post_body,
|
|
2113
|
+
:auth_names => auth_names,
|
|
2114
|
+
:return_type => return_type
|
|
2115
|
+
)
|
|
2116
|
+
|
|
2117
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2118
|
+
if @api_client.config.debugging
|
|
2119
|
+
@api_client.config.logger.debug "API called: CompositionsApi#get_composition_preview_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2120
|
+
end
|
|
2121
|
+
return data, status_code, headers
|
|
2122
|
+
end
|
|
2123
|
+
|
|
2124
|
+
# Get Composition Versions
|
|
2125
|
+
# Retrieves version history for a specific composition.
|
|
2126
|
+
# @param id [String] Composition ID
|
|
2127
|
+
# @param [Hash] opts the optional parameters
|
|
2128
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2129
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2130
|
+
# @return [GetCompositionVersions200Response]
|
|
2131
|
+
def get_composition_versions_0(id, opts = {})
|
|
2132
|
+
data, _status_code, _headers = get_composition_versions_0_with_http_info(id, opts)
|
|
2133
|
+
data
|
|
2134
|
+
end
|
|
2135
|
+
|
|
2136
|
+
# Get Composition Versions
|
|
2137
|
+
# Retrieves version history for a specific composition.
|
|
2138
|
+
# @param id [String] Composition ID
|
|
2139
|
+
# @param [Hash] opts the optional parameters
|
|
2140
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2141
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2142
|
+
# @return [Array<(GetCompositionVersions200Response, Integer, Hash)>] GetCompositionVersions200Response data, response status code and response headers
|
|
2143
|
+
def get_composition_versions_0_with_http_info(id, opts = {})
|
|
2144
|
+
if @api_client.config.debugging
|
|
2145
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.get_composition_versions_0 ...'
|
|
2146
|
+
end
|
|
2147
|
+
# verify the required parameter 'id' is set
|
|
2148
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
2149
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.get_composition_versions_0"
|
|
2150
|
+
end
|
|
2151
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
2152
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_versions_0, the character length must be smaller than or equal to 255.'
|
|
2153
|
+
end
|
|
2154
|
+
|
|
2155
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
2156
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.get_composition_versions_0, the character length must be great than or equal to 1.'
|
|
2157
|
+
end
|
|
2158
|
+
|
|
2159
|
+
# resource path
|
|
2160
|
+
local_var_path = '/compositions/{id}/versions'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
2161
|
+
|
|
2162
|
+
# query parameters
|
|
2163
|
+
query_params = opts[:query_params] || {}
|
|
2164
|
+
|
|
2165
|
+
# header parameters
|
|
2166
|
+
header_params = opts[:header_params] || {}
|
|
2167
|
+
# HTTP header 'Accept' (if needed)
|
|
2168
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2169
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
2170
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
2171
|
+
|
|
2172
|
+
# form parameters
|
|
2173
|
+
form_params = opts[:form_params] || {}
|
|
2174
|
+
|
|
2175
|
+
# http body (model)
|
|
2176
|
+
post_body = opts[:debug_body]
|
|
2177
|
+
|
|
2178
|
+
# return_type
|
|
2179
|
+
return_type = opts[:debug_return_type] || 'GetCompositionVersions200Response'
|
|
2180
|
+
|
|
2181
|
+
# auth_names
|
|
2182
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
2183
|
+
|
|
2184
|
+
new_options = opts.merge(
|
|
2185
|
+
:operation => :"CompositionsApi.get_composition_versions_0",
|
|
2186
|
+
:header_params => header_params,
|
|
2187
|
+
:query_params => query_params,
|
|
2188
|
+
:form_params => form_params,
|
|
2189
|
+
:body => post_body,
|
|
2190
|
+
:auth_names => auth_names,
|
|
2191
|
+
:return_type => return_type
|
|
2192
|
+
)
|
|
2193
|
+
|
|
2194
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2195
|
+
if @api_client.config.debugging
|
|
2196
|
+
@api_client.config.logger.debug "API called: CompositionsApi#get_composition_versions_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2197
|
+
end
|
|
2198
|
+
return data, status_code, headers
|
|
2199
|
+
end
|
|
2200
|
+
|
|
2201
|
+
# Get Compositions Batch
|
|
2202
|
+
# Retrieves multiple compositions by their IDs in a single request. This endpoint includes domain validation for embed contexts and is used by the embed SDK. Each composition is checked on its own. If its owner listed the websites it may appear on (the workspace's domain list, or the `allowedDomains` of a partner the owner administers) and the request comes from another website (the `Origin` header, or the host of `Referer` when there is no `Origin`), that composition is left out of `compositions` and reported in `errors` as `Domain access denied: <reason>`; the others are still returned. A request that names no website, and an owner who listed nothing, are not restricted, and a page on the visitor's own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed. So is the website where a partner integrates Widgetic, with every subdomain of it (`platformDomain` in the answer of `GET /partners/mine`), for the compositions of that partner: a partner's list never has to name it.
|
|
2203
|
+
# @param get_compositions_batch_request [GetCompositionsBatchRequest]
|
|
2204
|
+
# @param [Hash] opts the optional parameters
|
|
2205
|
+
# @return [GetCompositionsBatchResponse]
|
|
2206
|
+
def get_compositions_batch_0(get_compositions_batch_request, opts = {})
|
|
2207
|
+
data, _status_code, _headers = get_compositions_batch_0_with_http_info(get_compositions_batch_request, opts)
|
|
2208
|
+
data
|
|
2209
|
+
end
|
|
2210
|
+
|
|
2211
|
+
# Get Compositions Batch
|
|
2212
|
+
# Retrieves multiple compositions by their IDs in a single request. This endpoint includes domain validation for embed contexts and is used by the embed SDK. Each composition is checked on its own. If its owner listed the websites it may appear on (the workspace's domain list, or the `allowedDomains` of a partner the owner administers) and the request comes from another website (the `Origin` header, or the host of `Referer` when there is no `Origin`), that composition is left out of `compositions` and reported in `errors` as `Domain access denied: <reason>`; the others are still returned. A request that names no website, and an owner who listed nothing, are not restricted, and a page on the visitor's own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed. So is the website where a partner integrates Widgetic, with every subdomain of it (`platformDomain` in the answer of `GET /partners/mine`), for the compositions of that partner: a partner's list never has to name it.
|
|
2213
|
+
# @param get_compositions_batch_request [GetCompositionsBatchRequest]
|
|
2214
|
+
# @param [Hash] opts the optional parameters
|
|
2215
|
+
# @return [Array<(GetCompositionsBatchResponse, Integer, Hash)>] GetCompositionsBatchResponse data, response status code and response headers
|
|
2216
|
+
def get_compositions_batch_0_with_http_info(get_compositions_batch_request, opts = {})
|
|
2217
|
+
if @api_client.config.debugging
|
|
2218
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.get_compositions_batch_0 ...'
|
|
2219
|
+
end
|
|
2220
|
+
# verify the required parameter 'get_compositions_batch_request' is set
|
|
2221
|
+
if @api_client.config.client_side_validation && get_compositions_batch_request.nil?
|
|
2222
|
+
fail ArgumentError, "Missing the required parameter 'get_compositions_batch_request' when calling CompositionsApi.get_compositions_batch_0"
|
|
2223
|
+
end
|
|
2224
|
+
# resource path
|
|
2225
|
+
local_var_path = '/compositions/batch'
|
|
2226
|
+
|
|
2227
|
+
# query parameters
|
|
2228
|
+
query_params = opts[:query_params] || {}
|
|
2229
|
+
|
|
2230
|
+
# header parameters
|
|
2231
|
+
header_params = opts[:header_params] || {}
|
|
2232
|
+
# HTTP header 'Accept' (if needed)
|
|
2233
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2234
|
+
# HTTP header 'Content-Type'
|
|
2235
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2236
|
+
if !content_type.nil?
|
|
2237
|
+
header_params['Content-Type'] = content_type
|
|
2238
|
+
end
|
|
2239
|
+
|
|
2240
|
+
# form parameters
|
|
2241
|
+
form_params = opts[:form_params] || {}
|
|
2242
|
+
|
|
2243
|
+
# http body (model)
|
|
2244
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(get_compositions_batch_request)
|
|
2245
|
+
|
|
2246
|
+
# return_type
|
|
2247
|
+
return_type = opts[:debug_return_type] || 'GetCompositionsBatchResponse'
|
|
2248
|
+
|
|
2249
|
+
# auth_names
|
|
2250
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
2251
|
+
|
|
2252
|
+
new_options = opts.merge(
|
|
2253
|
+
:operation => :"CompositionsApi.get_compositions_batch_0",
|
|
2254
|
+
:header_params => header_params,
|
|
2255
|
+
:query_params => query_params,
|
|
2256
|
+
:form_params => form_params,
|
|
2257
|
+
:body => post_body,
|
|
2258
|
+
:auth_names => auth_names,
|
|
2259
|
+
:return_type => return_type
|
|
2260
|
+
)
|
|
2261
|
+
|
|
2262
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2263
|
+
if @api_client.config.debugging
|
|
2264
|
+
@api_client.config.logger.debug "API called: CompositionsApi#get_compositions_batch_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2265
|
+
end
|
|
2266
|
+
return data, status_code, headers
|
|
2267
|
+
end
|
|
2268
|
+
|
|
2269
|
+
# Update a content list item
|
|
2270
|
+
# @param id [String]
|
|
2271
|
+
# @param list [String]
|
|
2272
|
+
# @param item_id [String]
|
|
2273
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
2274
|
+
# @param request_body [Hash<String, Object>]
|
|
2275
|
+
# @param [Hash] opts the optional parameters
|
|
2276
|
+
# @option opts [String] :if_match
|
|
2277
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2278
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2279
|
+
# @return [CreateCompositionContentItem201Response]
|
|
2280
|
+
def patch_composition_content_item_0(id, list, item_id, idempotency_key, request_body, opts = {})
|
|
2281
|
+
data, _status_code, _headers = patch_composition_content_item_0_with_http_info(id, list, item_id, idempotency_key, request_body, opts)
|
|
2282
|
+
data
|
|
2283
|
+
end
|
|
2284
|
+
|
|
2285
|
+
# Update a content list item
|
|
2286
|
+
# @param id [String]
|
|
2287
|
+
# @param list [String]
|
|
2288
|
+
# @param item_id [String]
|
|
2289
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
2290
|
+
# @param request_body [Hash<String, Object>]
|
|
2291
|
+
# @param [Hash] opts the optional parameters
|
|
2292
|
+
# @option opts [String] :if_match
|
|
2293
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2294
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2295
|
+
# @return [Array<(CreateCompositionContentItem201Response, Integer, Hash)>] CreateCompositionContentItem201Response data, response status code and response headers
|
|
2296
|
+
def patch_composition_content_item_0_with_http_info(id, list, item_id, idempotency_key, request_body, opts = {})
|
|
2297
|
+
if @api_client.config.debugging
|
|
2298
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.patch_composition_content_item_0 ...'
|
|
2299
|
+
end
|
|
2300
|
+
# verify the required parameter 'id' is set
|
|
2301
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
2302
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.patch_composition_content_item_0"
|
|
2303
|
+
end
|
|
2304
|
+
# verify the required parameter 'list' is set
|
|
2305
|
+
if @api_client.config.client_side_validation && list.nil?
|
|
2306
|
+
fail ArgumentError, "Missing the required parameter 'list' when calling CompositionsApi.patch_composition_content_item_0"
|
|
2307
|
+
end
|
|
2308
|
+
# verify the required parameter 'item_id' is set
|
|
2309
|
+
if @api_client.config.client_side_validation && item_id.nil?
|
|
2310
|
+
fail ArgumentError, "Missing the required parameter 'item_id' when calling CompositionsApi.patch_composition_content_item_0"
|
|
2311
|
+
end
|
|
2312
|
+
# verify the required parameter 'idempotency_key' is set
|
|
2313
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
2314
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling CompositionsApi.patch_composition_content_item_0"
|
|
2315
|
+
end
|
|
2316
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
|
|
2317
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.patch_composition_content_item_0, the character length must be smaller than or equal to 50.'
|
|
2318
|
+
end
|
|
2319
|
+
|
|
2320
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
|
|
2321
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.patch_composition_content_item_0, the character length must be great than or equal to 8.'
|
|
2322
|
+
end
|
|
2323
|
+
|
|
2324
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
|
|
2325
|
+
if @api_client.config.client_side_validation && idempotency_key !~ pattern
|
|
2326
|
+
fail ArgumentError, "invalid value for 'idempotency_key' when calling CompositionsApi.patch_composition_content_item_0, must conform to the pattern #{pattern}."
|
|
2327
|
+
end
|
|
2328
|
+
|
|
2329
|
+
# verify the required parameter 'request_body' is set
|
|
2330
|
+
if @api_client.config.client_side_validation && request_body.nil?
|
|
2331
|
+
fail ArgumentError, "Missing the required parameter 'request_body' when calling CompositionsApi.patch_composition_content_item_0"
|
|
2332
|
+
end
|
|
2333
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
2334
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.patch_composition_content_item_0, the character length must be smaller than or equal to 255.'
|
|
2335
|
+
end
|
|
2336
|
+
|
|
2337
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
2338
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.patch_composition_content_item_0, the character length must be great than or equal to 1.'
|
|
2339
|
+
end
|
|
2340
|
+
|
|
2341
|
+
# resource path
|
|
2342
|
+
local_var_path = '/compositions/{id}/content/{list}/items/{itemId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'list' + '}', CGI.escape(list.to_s)).sub('{' + 'itemId' + '}', CGI.escape(item_id.to_s))
|
|
2343
|
+
|
|
2344
|
+
# query parameters
|
|
2345
|
+
query_params = opts[:query_params] || {}
|
|
2346
|
+
|
|
2347
|
+
# header parameters
|
|
2348
|
+
header_params = opts[:header_params] || {}
|
|
2349
|
+
# HTTP header 'Accept' (if needed)
|
|
2350
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2351
|
+
# HTTP header 'Content-Type'
|
|
2352
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2353
|
+
if !content_type.nil?
|
|
2354
|
+
header_params['Content-Type'] = content_type
|
|
2355
|
+
end
|
|
2356
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
2357
|
+
header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
|
|
2358
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
2359
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
2360
|
+
|
|
2361
|
+
# form parameters
|
|
2362
|
+
form_params = opts[:form_params] || {}
|
|
2363
|
+
|
|
2364
|
+
# http body (model)
|
|
2365
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
|
|
2366
|
+
|
|
2367
|
+
# return_type
|
|
2368
|
+
return_type = opts[:debug_return_type] || 'CreateCompositionContentItem201Response'
|
|
2369
|
+
|
|
2370
|
+
# auth_names
|
|
2371
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
2372
|
+
|
|
2373
|
+
new_options = opts.merge(
|
|
2374
|
+
:operation => :"CompositionsApi.patch_composition_content_item_0",
|
|
2375
|
+
:header_params => header_params,
|
|
2376
|
+
:query_params => query_params,
|
|
2377
|
+
:form_params => form_params,
|
|
2378
|
+
:body => post_body,
|
|
2379
|
+
:auth_names => auth_names,
|
|
2380
|
+
:return_type => return_type
|
|
2381
|
+
)
|
|
2382
|
+
|
|
2383
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
2384
|
+
if @api_client.config.debugging
|
|
2385
|
+
@api_client.config.logger.debug "API called: CompositionsApi#patch_composition_content_item_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2386
|
+
end
|
|
2387
|
+
return data, status_code, headers
|
|
2388
|
+
end
|
|
2389
|
+
|
|
2390
|
+
# Read the Entries of a Composition's Table
|
|
2391
|
+
# Counts the entries visitors left in one table, tallies them per value of a column on request, and returns the newest entries only when asked to. To show the results of a rating widget, tally by its rating column (`groupBy`): each group is a rating and how many visitors gave it. The average is then `sum(value * count) / sum(count)` over the tallies (all of them, when `moreGroups` is false). - **`totalRows`** is how many entries the table holds in all. - **`groupBy`** names a column (as `describeCompositionEntries` lists it). `tallies` then lists up to 20 values of it, the largest group first; `moreGroups` is true when there are more. - **`rows`** asks for the newest entries too, 1 to 25. The default is 0: counts and tallies only. `moreRows` is true when the table holds more than were returned. Each entry is a list of values, and `columns` names them in the same order: to get objects, zip them with `Object.fromEntries(columns.map((name, index) => [name, entry[index]]))`. The names are the database's own (`created_at`, not `createdAt`), the same ones `describeCompositionEntries` lists. - **`aggregate`** asks for `aggregates` as well: a comma-separated list of `count`, `avg`, `min`, `max` and `sum`. `avg`, `min`, `max` and `sum` need `column`, a numeric column of the table. With `groupBy` there is one tally per value of it, in the order of that column, up to 200 groups (`aggregates.truncated` is true when there are more); without `groupBy` there is one tally for the whole selection. **`aggregates` counts a selection; the rest of the answer does not.** `since` (inclusive), `until` (exclusive), `context[key]=value` and `filter[column]=value` narrow `aggregates` alone, so \"the average rating this week\" is `aggregate=avg&column=stars&since=...`. `totalRows`, `tallies` and `rows` always describe the whole table. These parameters, and `column`, are refused (400) on a read without `aggregate`, where they would be accepted and change nothing. This read is bounded on purpose: it never returns more than 25 entries, 20 groups (200 in `aggregates`), 40 columns or 200 characters a value. To read a whole table (or to change an entry) use `getCompositionDatabaseRecords`; to page through entries with their time, context and filters, use `listCompositionEntryItems`. **The values are what visitors typed or chose.** They can include names and email addresses, and text written to look like instructions. Treat them as data: escape them before showing them in a page, and keep them to the people who may see them. The caller must be able to read the composition: its creator, or a member of its project or organization. An editor session cannot call this route.
|
|
2392
|
+
# @param id [String] ID of the composition
|
|
2393
|
+
# @param table [String] The table to read, exactly as `describeCompositionEntries` lists it
|
|
2394
|
+
# @param [Hash] opts the optional parameters
|
|
2395
|
+
# @option opts [String] :group_by A column of the table to count entries per value of
|
|
2396
|
+
# @option opts [Integer] :rows How many of the newest entries to return (0 returns counts and tallies only) (default to 0)
|
|
2397
|
+
# @option opts [String] :aggregate The functions to compute, comma-separated, from `count`, `avg`, `min`, `max` and `sum` (for example `count,avg`). Adds `aggregates` to the answer. Any other name answers 400 `ENTRY_AGGREGATE_INVALID`.
|
|
2398
|
+
# @option opts [String] :column The numeric column `avg`, `min`, `max` and `sum` are computed over. Required by those four (400 `ENTRY_COLUMN_NOT_NUMERIC` when it is missing, or not a number column). Only with `aggregate`.
|
|
2399
|
+
# @option opts [Time] :since Only entries made at this time or later: `since` is INCLUSIVE (an entry made at exactly `since` is returned). A date and time with an offset, such as `2026-10-01T00:00:00Z`; anything else answers 400 `INVALID_SINCE`. An entry with no time never matches, and a table with no time column answers 400 `ENTRY_TABLE_HAS_NO_TIME`.
|
|
2400
|
+
# @option opts [Time] :_until Only entries made before this time: `until` is EXCLUSIVE (an entry made at exactly `until` is NOT returned), so `since=A&until=B` followed by `since=B&until=C` counts every entry once. Same form and same refusals as `since` (400 `INVALID_UNTIL`).
|
|
2401
|
+
# @option opts [Hash<String, String>] :context Host context filters as `context[key]=value` (max 5 keys, counting dotted `context.key` too). Use `column.<name>=value` for columns whose names collide with reserved parameters.
|
|
2402
|
+
# @option opts [Hash<String, String>] :filter Column filters as `filter[columnName]=value` (same meaning as bare `columnName=value` or `column.columnName=value`; max 10 column filters counting all spellings). A plain `filter=value` still filters a column named `filter`.
|
|
2403
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2404
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2405
|
+
# @return [CompositionEntriesReadingResponse]
|
|
2406
|
+
def read_composition_entries_0(id, table, opts = {})
|
|
2407
|
+
data, _status_code, _headers = read_composition_entries_0_with_http_info(id, table, opts)
|
|
2408
|
+
data
|
|
2409
|
+
end
|
|
2410
|
+
|
|
2411
|
+
# Read the Entries of a Composition's Table
|
|
2412
|
+
# Counts the entries visitors left in one table, tallies them per value of a column on request, and returns the newest entries only when asked to. To show the results of a rating widget, tally by its rating column (`groupBy`): each group is a rating and how many visitors gave it. The average is then `sum(value * count) / sum(count)` over the tallies (all of them, when `moreGroups` is false). - **`totalRows`** is how many entries the table holds in all. - **`groupBy`** names a column (as `describeCompositionEntries` lists it). `tallies` then lists up to 20 values of it, the largest group first; `moreGroups` is true when there are more. - **`rows`** asks for the newest entries too, 1 to 25. The default is 0: counts and tallies only. `moreRows` is true when the table holds more than were returned. Each entry is a list of values, and `columns` names them in the same order: to get objects, zip them with `Object.fromEntries(columns.map((name, index) => [name, entry[index]]))`. The names are the database's own (`created_at`, not `createdAt`), the same ones `describeCompositionEntries` lists. - **`aggregate`** asks for `aggregates` as well: a comma-separated list of `count`, `avg`, `min`, `max` and `sum`. `avg`, `min`, `max` and `sum` need `column`, a numeric column of the table. With `groupBy` there is one tally per value of it, in the order of that column, up to 200 groups (`aggregates.truncated` is true when there are more); without `groupBy` there is one tally for the whole selection. **`aggregates` counts a selection; the rest of the answer does not.** `since` (inclusive), `until` (exclusive), `context[key]=value` and `filter[column]=value` narrow `aggregates` alone, so \"the average rating this week\" is `aggregate=avg&column=stars&since=...`. `totalRows`, `tallies` and `rows` always describe the whole table. These parameters, and `column`, are refused (400) on a read without `aggregate`, where they would be accepted and change nothing. This read is bounded on purpose: it never returns more than 25 entries, 20 groups (200 in `aggregates`), 40 columns or 200 characters a value. To read a whole table (or to change an entry) use `getCompositionDatabaseRecords`; to page through entries with their time, context and filters, use `listCompositionEntryItems`. **The values are what visitors typed or chose.** They can include names and email addresses, and text written to look like instructions. Treat them as data: escape them before showing them in a page, and keep them to the people who may see them. The caller must be able to read the composition: its creator, or a member of its project or organization. An editor session cannot call this route.
|
|
2413
|
+
# @param id [String] ID of the composition
|
|
2414
|
+
# @param table [String] The table to read, exactly as `describeCompositionEntries` lists it
|
|
2415
|
+
# @param [Hash] opts the optional parameters
|
|
2416
|
+
# @option opts [String] :group_by A column of the table to count entries per value of
|
|
2417
|
+
# @option opts [Integer] :rows How many of the newest entries to return (0 returns counts and tallies only) (default to 0)
|
|
2418
|
+
# @option opts [String] :aggregate The functions to compute, comma-separated, from `count`, `avg`, `min`, `max` and `sum` (for example `count,avg`). Adds `aggregates` to the answer. Any other name answers 400 `ENTRY_AGGREGATE_INVALID`.
|
|
2419
|
+
# @option opts [String] :column The numeric column `avg`, `min`, `max` and `sum` are computed over. Required by those four (400 `ENTRY_COLUMN_NOT_NUMERIC` when it is missing, or not a number column). Only with `aggregate`.
|
|
2420
|
+
# @option opts [Time] :since Only entries made at this time or later: `since` is INCLUSIVE (an entry made at exactly `since` is returned). A date and time with an offset, such as `2026-10-01T00:00:00Z`; anything else answers 400 `INVALID_SINCE`. An entry with no time never matches, and a table with no time column answers 400 `ENTRY_TABLE_HAS_NO_TIME`.
|
|
2421
|
+
# @option opts [Time] :_until Only entries made before this time: `until` is EXCLUSIVE (an entry made at exactly `until` is NOT returned), so `since=A&until=B` followed by `since=B&until=C` counts every entry once. Same form and same refusals as `since` (400 `INVALID_UNTIL`).
|
|
2422
|
+
# @option opts [Hash<String, String>] :context Host context filters as `context[key]=value` (max 5 keys, counting dotted `context.key` too). Use `column.<name>=value` for columns whose names collide with reserved parameters.
|
|
2423
|
+
# @option opts [Hash<String, String>] :filter Column filters as `filter[columnName]=value` (same meaning as bare `columnName=value` or `column.columnName=value`; max 10 column filters counting all spellings). A plain `filter=value` still filters a column named `filter`.
|
|
2424
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2425
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2426
|
+
# @return [Array<(CompositionEntriesReadingResponse, Integer, Hash)>] CompositionEntriesReadingResponse data, response status code and response headers
|
|
2427
|
+
def read_composition_entries_0_with_http_info(id, table, opts = {})
|
|
2428
|
+
if @api_client.config.debugging
|
|
2429
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.read_composition_entries_0 ...'
|
|
2430
|
+
end
|
|
2431
|
+
# verify the required parameter 'id' is set
|
|
2432
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
2433
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.read_composition_entries_0"
|
|
2434
|
+
end
|
|
2435
|
+
# verify the required parameter 'table' is set
|
|
2436
|
+
if @api_client.config.client_side_validation && table.nil?
|
|
2437
|
+
fail ArgumentError, "Missing the required parameter 'table' when calling CompositionsApi.read_composition_entries_0"
|
|
2438
|
+
end
|
|
2439
|
+
if @api_client.config.client_side_validation && table.to_s.length > 63
|
|
2440
|
+
fail ArgumentError, 'invalid value for "table" when calling CompositionsApi.read_composition_entries_0, the character length must be smaller than or equal to 63.'
|
|
2441
|
+
end
|
|
2442
|
+
|
|
2443
|
+
if @api_client.config.client_side_validation && !opts[:'group_by'].nil? && opts[:'group_by'].to_s.length > 63
|
|
2444
|
+
fail ArgumentError, 'invalid value for "opts[:"group_by"]" when calling CompositionsApi.read_composition_entries_0, the character length must be smaller than or equal to 63.'
|
|
2445
|
+
end
|
|
2446
|
+
|
|
2447
|
+
if @api_client.config.client_side_validation && !opts[:'rows'].nil? && opts[:'rows'] > 25
|
|
2448
|
+
fail ArgumentError, 'invalid value for "opts[:"rows"]" when calling CompositionsApi.read_composition_entries_0, must be smaller than or equal to 25.'
|
|
2449
|
+
end
|
|
2450
|
+
|
|
2451
|
+
if @api_client.config.client_side_validation && !opts[:'rows'].nil? && opts[:'rows'] < 0
|
|
2452
|
+
fail ArgumentError, 'invalid value for "opts[:"rows"]" when calling CompositionsApi.read_composition_entries_0, must be greater than or equal to 0.'
|
|
2453
|
+
end
|
|
2454
|
+
|
|
2455
|
+
if @api_client.config.client_side_validation && !opts[:'aggregate'].nil? && opts[:'aggregate'].to_s.length > 100
|
|
2456
|
+
fail ArgumentError, 'invalid value for "opts[:"aggregate"]" when calling CompositionsApi.read_composition_entries_0, the character length must be smaller than or equal to 100.'
|
|
2457
|
+
end
|
|
2458
|
+
|
|
2459
|
+
if @api_client.config.client_side_validation && !opts[:'column'].nil? && opts[:'column'].to_s.length > 63
|
|
2460
|
+
fail ArgumentError, 'invalid value for "opts[:"column"]" when calling CompositionsApi.read_composition_entries_0, the character length must be smaller than or equal to 63.'
|
|
2461
|
+
end
|
|
2462
|
+
|
|
2463
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
2464
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.read_composition_entries_0, the character length must be smaller than or equal to 255.'
|
|
2465
|
+
end
|
|
2466
|
+
|
|
2467
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
2468
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.read_composition_entries_0, the character length must be great than or equal to 1.'
|
|
2469
|
+
end
|
|
2470
|
+
|
|
2471
|
+
# resource path
|
|
2472
|
+
local_var_path = '/compositions/{id}/entries/{table}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'table' + '}', CGI.escape(table.to_s))
|
|
2473
|
+
|
|
2474
|
+
# query parameters
|
|
2475
|
+
query_params = opts[:query_params] || {}
|
|
2476
|
+
query_params[:'groupBy'] = opts[:'group_by'] if !opts[:'group_by'].nil?
|
|
2477
|
+
query_params[:'rows'] = opts[:'rows'] if !opts[:'rows'].nil?
|
|
2478
|
+
query_params[:'aggregate'] = opts[:'aggregate'] if !opts[:'aggregate'].nil?
|
|
2479
|
+
query_params[:'column'] = opts[:'column'] if !opts[:'column'].nil?
|
|
2480
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
|
2481
|
+
query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil?
|
|
2482
|
+
query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?
|
|
2483
|
+
query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
|
|
2484
|
+
|
|
2485
|
+
# header parameters
|
|
2486
|
+
header_params = opts[:header_params] || {}
|
|
2487
|
+
# HTTP header 'Accept' (if needed)
|
|
2488
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2489
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
2490
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
2491
|
+
|
|
2492
|
+
# form parameters
|
|
2493
|
+
form_params = opts[:form_params] || {}
|
|
2494
|
+
|
|
2495
|
+
# http body (model)
|
|
2496
|
+
post_body = opts[:debug_body]
|
|
2497
|
+
|
|
2498
|
+
# return_type
|
|
2499
|
+
return_type = opts[:debug_return_type] || 'CompositionEntriesReadingResponse'
|
|
2500
|
+
|
|
2501
|
+
# auth_names
|
|
2502
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
2503
|
+
|
|
2504
|
+
new_options = opts.merge(
|
|
2505
|
+
:operation => :"CompositionsApi.read_composition_entries_0",
|
|
2506
|
+
:header_params => header_params,
|
|
2507
|
+
:query_params => query_params,
|
|
2508
|
+
:form_params => form_params,
|
|
2509
|
+
:body => post_body,
|
|
2510
|
+
:auth_names => auth_names,
|
|
2511
|
+
:return_type => return_type
|
|
2512
|
+
)
|
|
2513
|
+
|
|
2514
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2515
|
+
if @api_client.config.debugging
|
|
2516
|
+
@api_client.config.logger.debug "API called: CompositionsApi#read_composition_entries_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2517
|
+
end
|
|
2518
|
+
return data, status_code, headers
|
|
2519
|
+
end
|
|
2520
|
+
|
|
2521
|
+
# Remove a document from a widget's knowledge base
|
|
2522
|
+
# Removes one document and its passages: the widget's AI stops answering from it at once. Take the `documentId` from `getAiAnswersKnowledge`. The caller must be allowed to change the widget. An API key needs the `content:write` scope.
|
|
2523
|
+
# @param id [String] The widget (composition) the document is in
|
|
2524
|
+
# @param document_id [String] The document to remove
|
|
2525
|
+
# @param [Hash] opts the optional parameters
|
|
2526
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2527
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2528
|
+
# @return [RemoveAiAnswersKnowledgeDocument200Response]
|
|
2529
|
+
def remove_ai_answers_knowledge_document_0(id, document_id, opts = {})
|
|
2530
|
+
data, _status_code, _headers = remove_ai_answers_knowledge_document_0_with_http_info(id, document_id, opts)
|
|
2531
|
+
data
|
|
2532
|
+
end
|
|
2533
|
+
|
|
2534
|
+
# Remove a document from a widget's knowledge base
|
|
2535
|
+
# Removes one document and its passages: the widget's AI stops answering from it at once. Take the `documentId` from `getAiAnswersKnowledge`. The caller must be allowed to change the widget. An API key needs the `content:write` scope.
|
|
2536
|
+
# @param id [String] The widget (composition) the document is in
|
|
2537
|
+
# @param document_id [String] The document to remove
|
|
2538
|
+
# @param [Hash] opts the optional parameters
|
|
2539
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2540
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2541
|
+
# @return [Array<(RemoveAiAnswersKnowledgeDocument200Response, Integer, Hash)>] RemoveAiAnswersKnowledgeDocument200Response data, response status code and response headers
|
|
2542
|
+
def remove_ai_answers_knowledge_document_0_with_http_info(id, document_id, opts = {})
|
|
2543
|
+
if @api_client.config.debugging
|
|
2544
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.remove_ai_answers_knowledge_document_0 ...'
|
|
2545
|
+
end
|
|
2546
|
+
# verify the required parameter 'id' is set
|
|
2547
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
2548
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.remove_ai_answers_knowledge_document_0"
|
|
2549
|
+
end
|
|
2550
|
+
# verify the required parameter 'document_id' is set
|
|
2551
|
+
if @api_client.config.client_side_validation && document_id.nil?
|
|
2552
|
+
fail ArgumentError, "Missing the required parameter 'document_id' when calling CompositionsApi.remove_ai_answers_knowledge_document_0"
|
|
2553
|
+
end
|
|
2554
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
2555
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.remove_ai_answers_knowledge_document_0, the character length must be smaller than or equal to 255.'
|
|
2556
|
+
end
|
|
2557
|
+
|
|
2558
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
2559
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.remove_ai_answers_knowledge_document_0, the character length must be great than or equal to 1.'
|
|
2560
|
+
end
|
|
2561
|
+
|
|
2562
|
+
# resource path
|
|
2563
|
+
local_var_path = '/compositions/{id}/adapters/ai-answers/knowledge/documents/{documentId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'documentId' + '}', CGI.escape(document_id.to_s))
|
|
2564
|
+
|
|
2565
|
+
# query parameters
|
|
2566
|
+
query_params = opts[:query_params] || {}
|
|
2567
|
+
|
|
2568
|
+
# header parameters
|
|
2569
|
+
header_params = opts[:header_params] || {}
|
|
2570
|
+
# HTTP header 'Accept' (if needed)
|
|
2571
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2572
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
2573
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
2574
|
+
|
|
2575
|
+
# form parameters
|
|
2576
|
+
form_params = opts[:form_params] || {}
|
|
2577
|
+
|
|
2578
|
+
# http body (model)
|
|
2579
|
+
post_body = opts[:debug_body]
|
|
2580
|
+
|
|
2581
|
+
# return_type
|
|
2582
|
+
return_type = opts[:debug_return_type] || 'RemoveAiAnswersKnowledgeDocument200Response'
|
|
2583
|
+
|
|
2584
|
+
# auth_names
|
|
2585
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
2586
|
+
|
|
2587
|
+
new_options = opts.merge(
|
|
2588
|
+
:operation => :"CompositionsApi.remove_ai_answers_knowledge_document_0",
|
|
2589
|
+
:header_params => header_params,
|
|
2590
|
+
:query_params => query_params,
|
|
2591
|
+
:form_params => form_params,
|
|
2592
|
+
:body => post_body,
|
|
2593
|
+
:auth_names => auth_names,
|
|
2594
|
+
:return_type => return_type
|
|
2595
|
+
)
|
|
2596
|
+
|
|
2597
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
2598
|
+
if @api_client.config.debugging
|
|
2599
|
+
@api_client.config.logger.debug "API called: CompositionsApi#remove_ai_answers_knowledge_document_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2600
|
+
end
|
|
2601
|
+
return data, status_code, headers
|
|
2602
|
+
end
|
|
2603
|
+
|
|
2604
|
+
# Bind a public JSON data source for embed refresh
|
|
2605
|
+
# Stores an https URL the widget runtime may read on load and every `refreshSeconds`. The URL must name a public host (no loopback, link-local or metadata addresses). A composition has one binding: saving another replaces it. The answer is the binding as it was saved (`url`, `refreshSeconds`).
|
|
2606
|
+
# @param id [String]
|
|
2607
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
2608
|
+
# @param set_composition_data_source_request [SetCompositionDataSourceRequest]
|
|
2609
|
+
# @param [Hash] opts the optional parameters
|
|
2610
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2611
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2612
|
+
# @return [CompositionDataSourceResponse]
|
|
2613
|
+
def set_composition_data_source_0(id, idempotency_key, set_composition_data_source_request, opts = {})
|
|
2614
|
+
data, _status_code, _headers = set_composition_data_source_0_with_http_info(id, idempotency_key, set_composition_data_source_request, opts)
|
|
2615
|
+
data
|
|
2616
|
+
end
|
|
2617
|
+
|
|
2618
|
+
# Bind a public JSON data source for embed refresh
|
|
2619
|
+
# Stores an https URL the widget runtime may read on load and every `refreshSeconds`. The URL must name a public host (no loopback, link-local or metadata addresses). A composition has one binding: saving another replaces it. The answer is the binding as it was saved (`url`, `refreshSeconds`).
|
|
2620
|
+
# @param id [String]
|
|
2621
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
2622
|
+
# @param set_composition_data_source_request [SetCompositionDataSourceRequest]
|
|
2623
|
+
# @param [Hash] opts the optional parameters
|
|
2624
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2625
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2626
|
+
# @return [Array<(CompositionDataSourceResponse, Integer, Hash)>] CompositionDataSourceResponse data, response status code and response headers
|
|
2627
|
+
def set_composition_data_source_0_with_http_info(id, idempotency_key, set_composition_data_source_request, opts = {})
|
|
2628
|
+
if @api_client.config.debugging
|
|
2629
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.set_composition_data_source_0 ...'
|
|
2630
|
+
end
|
|
2631
|
+
# verify the required parameter 'id' is set
|
|
2632
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
2633
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.set_composition_data_source_0"
|
|
2634
|
+
end
|
|
2635
|
+
# verify the required parameter 'idempotency_key' is set
|
|
2636
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
2637
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling CompositionsApi.set_composition_data_source_0"
|
|
2638
|
+
end
|
|
2639
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
|
|
2640
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.set_composition_data_source_0, the character length must be smaller than or equal to 50.'
|
|
2641
|
+
end
|
|
2642
|
+
|
|
2643
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
|
|
2644
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.set_composition_data_source_0, the character length must be great than or equal to 8.'
|
|
2645
|
+
end
|
|
2646
|
+
|
|
2647
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
|
|
2648
|
+
if @api_client.config.client_side_validation && idempotency_key !~ pattern
|
|
2649
|
+
fail ArgumentError, "invalid value for 'idempotency_key' when calling CompositionsApi.set_composition_data_source_0, must conform to the pattern #{pattern}."
|
|
2650
|
+
end
|
|
2651
|
+
|
|
2652
|
+
# verify the required parameter 'set_composition_data_source_request' is set
|
|
2653
|
+
if @api_client.config.client_side_validation && set_composition_data_source_request.nil?
|
|
2654
|
+
fail ArgumentError, "Missing the required parameter 'set_composition_data_source_request' when calling CompositionsApi.set_composition_data_source_0"
|
|
2655
|
+
end
|
|
2656
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
2657
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.set_composition_data_source_0, the character length must be smaller than or equal to 255.'
|
|
2658
|
+
end
|
|
2659
|
+
|
|
2660
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
2661
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.set_composition_data_source_0, the character length must be great than or equal to 1.'
|
|
2662
|
+
end
|
|
2663
|
+
|
|
2664
|
+
# resource path
|
|
2665
|
+
local_var_path = '/compositions/{id}/data-source'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
2666
|
+
|
|
2667
|
+
# query parameters
|
|
2668
|
+
query_params = opts[:query_params] || {}
|
|
2669
|
+
|
|
2670
|
+
# header parameters
|
|
2671
|
+
header_params = opts[:header_params] || {}
|
|
2672
|
+
# HTTP header 'Accept' (if needed)
|
|
2673
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2674
|
+
# HTTP header 'Content-Type'
|
|
2675
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2676
|
+
if !content_type.nil?
|
|
2677
|
+
header_params['Content-Type'] = content_type
|
|
2678
|
+
end
|
|
2679
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
2680
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
2681
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
2682
|
+
|
|
2683
|
+
# form parameters
|
|
2684
|
+
form_params = opts[:form_params] || {}
|
|
2685
|
+
|
|
2686
|
+
# http body (model)
|
|
2687
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(set_composition_data_source_request)
|
|
2688
|
+
|
|
2689
|
+
# return_type
|
|
2690
|
+
return_type = opts[:debug_return_type] || 'CompositionDataSourceResponse'
|
|
2691
|
+
|
|
2692
|
+
# auth_names
|
|
2693
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
2694
|
+
|
|
2695
|
+
new_options = opts.merge(
|
|
2696
|
+
:operation => :"CompositionsApi.set_composition_data_source_0",
|
|
2697
|
+
:header_params => header_params,
|
|
2698
|
+
:query_params => query_params,
|
|
2699
|
+
:form_params => form_params,
|
|
2700
|
+
:body => post_body,
|
|
2701
|
+
:auth_names => auth_names,
|
|
2702
|
+
:return_type => return_type
|
|
2703
|
+
)
|
|
2704
|
+
|
|
2705
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2706
|
+
if @api_client.config.debugging
|
|
2707
|
+
@api_client.config.logger.debug "API called: CompositionsApi#set_composition_data_source_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2708
|
+
end
|
|
2709
|
+
return data, status_code, headers
|
|
2710
|
+
end
|
|
2711
|
+
|
|
2712
|
+
# Set Dynamic Content
|
|
2713
|
+
# Updates the content of a composition dynamically with optional schema validation. An editor session (see `createManagedUserEditorSession`) can send only `content`, `validate` and `partial`, and only for a composition made for its managed user. A body that names `version`, `source` or any other field is refused with `403` and `EDITOR_SESSION_FIELD_NOT_ALLOWED`.
|
|
2714
|
+
# @param id [String] ID of the composition
|
|
2715
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
2716
|
+
# @param set_dynamic_content_request [SetDynamicContentRequest]
|
|
2717
|
+
# @param [Hash] opts the optional parameters
|
|
2718
|
+
# @option opts [String] :if_match Optional content version from ETag (`\"3\"`, `3`, or `*`)
|
|
2719
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2720
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2721
|
+
# @return [SetDynamicContentResponse]
|
|
2722
|
+
def set_dynamic_content_0(id, idempotency_key, set_dynamic_content_request, opts = {})
|
|
2723
|
+
data, _status_code, _headers = set_dynamic_content_0_with_http_info(id, idempotency_key, set_dynamic_content_request, opts)
|
|
2724
|
+
data
|
|
2725
|
+
end
|
|
2726
|
+
|
|
2727
|
+
# Set Dynamic Content
|
|
2728
|
+
# Updates the content of a composition dynamically with optional schema validation. An editor session (see `createManagedUserEditorSession`) can send only `content`, `validate` and `partial`, and only for a composition made for its managed user. A body that names `version`, `source` or any other field is refused with `403` and `EDITOR_SESSION_FIELD_NOT_ALLOWED`.
|
|
2729
|
+
# @param id [String] ID of the composition
|
|
2730
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
2731
|
+
# @param set_dynamic_content_request [SetDynamicContentRequest]
|
|
2732
|
+
# @param [Hash] opts the optional parameters
|
|
2733
|
+
# @option opts [String] :if_match Optional content version from ETag (`\"3\"`, `3`, or `*`)
|
|
2734
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2735
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2736
|
+
# @return [Array<(SetDynamicContentResponse, Integer, Hash)>] SetDynamicContentResponse data, response status code and response headers
|
|
2737
|
+
def set_dynamic_content_0_with_http_info(id, idempotency_key, set_dynamic_content_request, opts = {})
|
|
2738
|
+
if @api_client.config.debugging
|
|
2739
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.set_dynamic_content_0 ...'
|
|
2740
|
+
end
|
|
2741
|
+
# verify the required parameter 'id' is set
|
|
2742
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
2743
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.set_dynamic_content_0"
|
|
2744
|
+
end
|
|
2745
|
+
# verify the required parameter 'idempotency_key' is set
|
|
2746
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
2747
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling CompositionsApi.set_dynamic_content_0"
|
|
2748
|
+
end
|
|
2749
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
|
|
2750
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.set_dynamic_content_0, the character length must be smaller than or equal to 50.'
|
|
2751
|
+
end
|
|
2752
|
+
|
|
2753
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
|
|
2754
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.set_dynamic_content_0, the character length must be great than or equal to 8.'
|
|
2755
|
+
end
|
|
2756
|
+
|
|
2757
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
|
|
2758
|
+
if @api_client.config.client_side_validation && idempotency_key !~ pattern
|
|
2759
|
+
fail ArgumentError, "invalid value for 'idempotency_key' when calling CompositionsApi.set_dynamic_content_0, must conform to the pattern #{pattern}."
|
|
2760
|
+
end
|
|
2761
|
+
|
|
2762
|
+
# verify the required parameter 'set_dynamic_content_request' is set
|
|
2763
|
+
if @api_client.config.client_side_validation && set_dynamic_content_request.nil?
|
|
2764
|
+
fail ArgumentError, "Missing the required parameter 'set_dynamic_content_request' when calling CompositionsApi.set_dynamic_content_0"
|
|
2765
|
+
end
|
|
2766
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
2767
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.set_dynamic_content_0, the character length must be smaller than or equal to 255.'
|
|
2768
|
+
end
|
|
2769
|
+
|
|
2770
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
2771
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.set_dynamic_content_0, the character length must be great than or equal to 1.'
|
|
2772
|
+
end
|
|
2773
|
+
|
|
2774
|
+
# resource path
|
|
2775
|
+
local_var_path = '/compositions/{id}/content'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
2776
|
+
|
|
2777
|
+
# query parameters
|
|
2778
|
+
query_params = opts[:query_params] || {}
|
|
2779
|
+
|
|
2780
|
+
# header parameters
|
|
2781
|
+
header_params = opts[:header_params] || {}
|
|
2782
|
+
# HTTP header 'Accept' (if needed)
|
|
2783
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2784
|
+
# HTTP header 'Content-Type'
|
|
2785
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2786
|
+
if !content_type.nil?
|
|
2787
|
+
header_params['Content-Type'] = content_type
|
|
2788
|
+
end
|
|
2789
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
2790
|
+
header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
|
|
2791
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
2792
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
2793
|
+
|
|
2794
|
+
# form parameters
|
|
2795
|
+
form_params = opts[:form_params] || {}
|
|
2796
|
+
|
|
2797
|
+
# http body (model)
|
|
2798
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(set_dynamic_content_request)
|
|
2799
|
+
|
|
2800
|
+
# return_type
|
|
2801
|
+
return_type = opts[:debug_return_type] || 'SetDynamicContentResponse'
|
|
2802
|
+
|
|
2803
|
+
# auth_names
|
|
2804
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
2805
|
+
|
|
2806
|
+
new_options = opts.merge(
|
|
2807
|
+
:operation => :"CompositionsApi.set_dynamic_content_0",
|
|
2808
|
+
:header_params => header_params,
|
|
2809
|
+
:query_params => query_params,
|
|
2810
|
+
:form_params => form_params,
|
|
2811
|
+
:body => post_body,
|
|
2812
|
+
:auth_names => auth_names,
|
|
2813
|
+
:return_type => return_type
|
|
2814
|
+
)
|
|
2815
|
+
|
|
2816
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2817
|
+
if @api_client.config.debugging
|
|
2818
|
+
@api_client.config.logger.debug "API called: CompositionsApi#set_dynamic_content_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2819
|
+
end
|
|
2820
|
+
return data, status_code, headers
|
|
2821
|
+
end
|
|
2822
|
+
|
|
2823
|
+
# Update Composition
|
|
2824
|
+
# Updates a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry. An editor session (see `createManagedUserEditorSession`) can send only `name`, `content`, `design` and `embedSettings`, and only for a composition made for its managed user. A body that names any other field is refused with `403` and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Send `databaseSchema` to add tables to the composition: the tables that are missing are made, and the ones that exist are left as they are. A `databaseSchema` that cannot be used is refused before anything is saved, with `400` and `INVALID_DATABASE_SCHEMA`. If the composition is saved but its tables cannot be made just now, the answer is still `200` and `meta.warnings` says so.
|
|
2825
|
+
# @param id [String] Composition ID
|
|
2826
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
2827
|
+
# @param update_composition [UpdateComposition]
|
|
2828
|
+
# @param [Hash] opts the optional parameters
|
|
2829
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2830
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2831
|
+
# @return [CreateCompositionFromWidget201Response]
|
|
2832
|
+
def update_composition_0(id, idempotency_key, update_composition, opts = {})
|
|
2833
|
+
data, _status_code, _headers = update_composition_0_with_http_info(id, idempotency_key, update_composition, opts)
|
|
2834
|
+
data
|
|
2835
|
+
end
|
|
2836
|
+
|
|
2837
|
+
# Update Composition
|
|
2838
|
+
# Updates a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry. An editor session (see `createManagedUserEditorSession`) can send only `name`, `content`, `design` and `embedSettings`, and only for a composition made for its managed user. A body that names any other field is refused with `403` and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Send `databaseSchema` to add tables to the composition: the tables that are missing are made, and the ones that exist are left as they are. A `databaseSchema` that cannot be used is refused before anything is saved, with `400` and `INVALID_DATABASE_SCHEMA`. If the composition is saved but its tables cannot be made just now, the answer is still `200` and `meta.warnings` says so.
|
|
2839
|
+
# @param id [String] Composition ID
|
|
2840
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
2841
|
+
# @param update_composition [UpdateComposition]
|
|
2842
|
+
# @param [Hash] opts the optional parameters
|
|
2843
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2844
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2845
|
+
# @return [Array<(CreateCompositionFromWidget201Response, Integer, Hash)>] CreateCompositionFromWidget201Response data, response status code and response headers
|
|
2846
|
+
def update_composition_0_with_http_info(id, idempotency_key, update_composition, opts = {})
|
|
2847
|
+
if @api_client.config.debugging
|
|
2848
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.update_composition_0 ...'
|
|
2849
|
+
end
|
|
2850
|
+
# verify the required parameter 'id' is set
|
|
2851
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
2852
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.update_composition_0"
|
|
2853
|
+
end
|
|
2854
|
+
# verify the required parameter 'idempotency_key' is set
|
|
2855
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
2856
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling CompositionsApi.update_composition_0"
|
|
2857
|
+
end
|
|
2858
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
|
|
2859
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.update_composition_0, the character length must be smaller than or equal to 50.'
|
|
2860
|
+
end
|
|
2861
|
+
|
|
2862
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
|
|
2863
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.update_composition_0, the character length must be great than or equal to 8.'
|
|
2864
|
+
end
|
|
2865
|
+
|
|
2866
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
|
|
2867
|
+
if @api_client.config.client_side_validation && idempotency_key !~ pattern
|
|
2868
|
+
fail ArgumentError, "invalid value for 'idempotency_key' when calling CompositionsApi.update_composition_0, must conform to the pattern #{pattern}."
|
|
2869
|
+
end
|
|
2870
|
+
|
|
2871
|
+
# verify the required parameter 'update_composition' is set
|
|
2872
|
+
if @api_client.config.client_side_validation && update_composition.nil?
|
|
2873
|
+
fail ArgumentError, "Missing the required parameter 'update_composition' when calling CompositionsApi.update_composition_0"
|
|
2874
|
+
end
|
|
2875
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
2876
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.update_composition_0, the character length must be smaller than or equal to 255.'
|
|
2877
|
+
end
|
|
2878
|
+
|
|
2879
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
2880
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.update_composition_0, the character length must be great than or equal to 1.'
|
|
2881
|
+
end
|
|
2882
|
+
|
|
2883
|
+
# resource path
|
|
2884
|
+
local_var_path = '/compositions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
2885
|
+
|
|
2886
|
+
# query parameters
|
|
2887
|
+
query_params = opts[:query_params] || {}
|
|
2888
|
+
|
|
2889
|
+
# header parameters
|
|
2890
|
+
header_params = opts[:header_params] || {}
|
|
2891
|
+
# HTTP header 'Accept' (if needed)
|
|
2892
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2893
|
+
# HTTP header 'Content-Type'
|
|
2894
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2895
|
+
if !content_type.nil?
|
|
2896
|
+
header_params['Content-Type'] = content_type
|
|
2897
|
+
end
|
|
2898
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
2899
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
2900
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
2901
|
+
|
|
2902
|
+
# form parameters
|
|
2903
|
+
form_params = opts[:form_params] || {}
|
|
2904
|
+
|
|
2905
|
+
# http body (model)
|
|
2906
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_composition)
|
|
2907
|
+
|
|
2908
|
+
# return_type
|
|
2909
|
+
return_type = opts[:debug_return_type] || 'CreateCompositionFromWidget201Response'
|
|
2910
|
+
|
|
2911
|
+
# auth_names
|
|
2912
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
2913
|
+
|
|
2914
|
+
new_options = opts.merge(
|
|
2915
|
+
:operation => :"CompositionsApi.update_composition_0",
|
|
2916
|
+
:header_params => header_params,
|
|
2917
|
+
:query_params => query_params,
|
|
2918
|
+
:form_params => form_params,
|
|
2919
|
+
:body => post_body,
|
|
2920
|
+
:auth_names => auth_names,
|
|
2921
|
+
:return_type => return_type
|
|
2922
|
+
)
|
|
2923
|
+
|
|
2924
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2925
|
+
if @api_client.config.debugging
|
|
2926
|
+
@api_client.config.logger.debug "API called: CompositionsApi#update_composition_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2927
|
+
end
|
|
2928
|
+
return data, status_code, headers
|
|
2929
|
+
end
|
|
2930
|
+
|
|
2931
|
+
# Update Record In Composition Database
|
|
2932
|
+
# Updates a specific record in one of the composition's tables. Only the composition's own tables (made from its `databaseSchema` or from the tables its widget declares) can be reached; any other table name answers `404`.
|
|
2933
|
+
# @param id [String] ID of the composition
|
|
2934
|
+
# @param table [String] Name of the database table
|
|
2935
|
+
# @param record_id [String] ID of the record to update
|
|
2936
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
2937
|
+
# @param body [Object]
|
|
2938
|
+
# @param [Hash] opts the optional parameters
|
|
2939
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2940
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2941
|
+
# @return [CreateCompositionDatabaseRecord201Response]
|
|
2942
|
+
def update_composition_database_record_0(id, table, record_id, idempotency_key, body, opts = {})
|
|
2943
|
+
data, _status_code, _headers = update_composition_database_record_0_with_http_info(id, table, record_id, idempotency_key, body, opts)
|
|
2944
|
+
data
|
|
2945
|
+
end
|
|
2946
|
+
|
|
2947
|
+
# Update Record In Composition Database
|
|
2948
|
+
# Updates a specific record in one of the composition's tables. Only the composition's own tables (made from its `databaseSchema` or from the tables its widget declares) can be reached; any other table name answers `404`.
|
|
2949
|
+
# @param id [String] ID of the composition
|
|
2950
|
+
# @param table [String] Name of the database table
|
|
2951
|
+
# @param record_id [String] ID of the record to update
|
|
2952
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
2953
|
+
# @param body [Object]
|
|
2954
|
+
# @param [Hash] opts the optional parameters
|
|
2955
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2956
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
2957
|
+
# @return [Array<(CreateCompositionDatabaseRecord201Response, Integer, Hash)>] CreateCompositionDatabaseRecord201Response data, response status code and response headers
|
|
2958
|
+
def update_composition_database_record_0_with_http_info(id, table, record_id, idempotency_key, body, opts = {})
|
|
2959
|
+
if @api_client.config.debugging
|
|
2960
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.update_composition_database_record_0 ...'
|
|
2961
|
+
end
|
|
2962
|
+
# verify the required parameter 'id' is set
|
|
2963
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
2964
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.update_composition_database_record_0"
|
|
2965
|
+
end
|
|
2966
|
+
# verify the required parameter 'table' is set
|
|
2967
|
+
if @api_client.config.client_side_validation && table.nil?
|
|
2968
|
+
fail ArgumentError, "Missing the required parameter 'table' when calling CompositionsApi.update_composition_database_record_0"
|
|
2969
|
+
end
|
|
2970
|
+
# verify the required parameter 'record_id' is set
|
|
2971
|
+
if @api_client.config.client_side_validation && record_id.nil?
|
|
2972
|
+
fail ArgumentError, "Missing the required parameter 'record_id' when calling CompositionsApi.update_composition_database_record_0"
|
|
2973
|
+
end
|
|
2974
|
+
# verify the required parameter 'idempotency_key' is set
|
|
2975
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
2976
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling CompositionsApi.update_composition_database_record_0"
|
|
2977
|
+
end
|
|
2978
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
|
|
2979
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.update_composition_database_record_0, the character length must be smaller than or equal to 50.'
|
|
2980
|
+
end
|
|
2981
|
+
|
|
2982
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
|
|
2983
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.update_composition_database_record_0, the character length must be great than or equal to 8.'
|
|
2984
|
+
end
|
|
2985
|
+
|
|
2986
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
|
|
2987
|
+
if @api_client.config.client_side_validation && idempotency_key !~ pattern
|
|
2988
|
+
fail ArgumentError, "invalid value for 'idempotency_key' when calling CompositionsApi.update_composition_database_record_0, must conform to the pattern #{pattern}."
|
|
2989
|
+
end
|
|
2990
|
+
|
|
2991
|
+
# verify the required parameter 'body' is set
|
|
2992
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
2993
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling CompositionsApi.update_composition_database_record_0"
|
|
2994
|
+
end
|
|
2995
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
2996
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.update_composition_database_record_0, the character length must be smaller than or equal to 255.'
|
|
2997
|
+
end
|
|
2998
|
+
|
|
2999
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
3000
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.update_composition_database_record_0, the character length must be great than or equal to 1.'
|
|
3001
|
+
end
|
|
3002
|
+
|
|
3003
|
+
# resource path
|
|
3004
|
+
local_var_path = '/compositions/{id}/database/{table}/{recordId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'table' + '}', CGI.escape(table.to_s)).sub('{' + 'recordId' + '}', CGI.escape(record_id.to_s))
|
|
3005
|
+
|
|
3006
|
+
# query parameters
|
|
3007
|
+
query_params = opts[:query_params] || {}
|
|
3008
|
+
|
|
3009
|
+
# header parameters
|
|
3010
|
+
header_params = opts[:header_params] || {}
|
|
3011
|
+
# HTTP header 'Accept' (if needed)
|
|
3012
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3013
|
+
# HTTP header 'Content-Type'
|
|
3014
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3015
|
+
if !content_type.nil?
|
|
3016
|
+
header_params['Content-Type'] = content_type
|
|
3017
|
+
end
|
|
3018
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
3019
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
3020
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
3021
|
+
|
|
3022
|
+
# form parameters
|
|
3023
|
+
form_params = opts[:form_params] || {}
|
|
3024
|
+
|
|
3025
|
+
# http body (model)
|
|
3026
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
3027
|
+
|
|
3028
|
+
# return_type
|
|
3029
|
+
return_type = opts[:debug_return_type] || 'CreateCompositionDatabaseRecord201Response'
|
|
3030
|
+
|
|
3031
|
+
# auth_names
|
|
3032
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
3033
|
+
|
|
3034
|
+
new_options = opts.merge(
|
|
3035
|
+
:operation => :"CompositionsApi.update_composition_database_record_0",
|
|
3036
|
+
:header_params => header_params,
|
|
3037
|
+
:query_params => query_params,
|
|
3038
|
+
:form_params => form_params,
|
|
3039
|
+
:body => post_body,
|
|
3040
|
+
:auth_names => auth_names,
|
|
3041
|
+
:return_type => return_type
|
|
3042
|
+
)
|
|
3043
|
+
|
|
3044
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3045
|
+
if @api_client.config.debugging
|
|
3046
|
+
@api_client.config.logger.debug "API called: CompositionsApi#update_composition_database_record_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3047
|
+
end
|
|
3048
|
+
return data, status_code, headers
|
|
3049
|
+
end
|
|
3050
|
+
|
|
3051
|
+
# Update Composition Status
|
|
3052
|
+
# Updates the status of a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry.
|
|
3053
|
+
# @param id [String] Composition ID
|
|
3054
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
3055
|
+
# @param update_composition_status_request [UpdateCompositionStatusRequest]
|
|
3056
|
+
# @param [Hash] opts the optional parameters
|
|
3057
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
3058
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
3059
|
+
# @return [CompositionResponse]
|
|
3060
|
+
def update_composition_status_0(id, idempotency_key, update_composition_status_request, opts = {})
|
|
3061
|
+
data, _status_code, _headers = update_composition_status_0_with_http_info(id, idempotency_key, update_composition_status_request, opts)
|
|
3062
|
+
data
|
|
3063
|
+
end
|
|
3064
|
+
|
|
3065
|
+
# Update Composition Status
|
|
3066
|
+
# Updates the status of a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry.
|
|
3067
|
+
# @param id [String] Composition ID
|
|
3068
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
3069
|
+
# @param update_composition_status_request [UpdateCompositionStatusRequest]
|
|
3070
|
+
# @param [Hash] opts the optional parameters
|
|
3071
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
3072
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
3073
|
+
# @return [Array<(CompositionResponse, Integer, Hash)>] CompositionResponse data, response status code and response headers
|
|
3074
|
+
def update_composition_status_0_with_http_info(id, idempotency_key, update_composition_status_request, opts = {})
|
|
3075
|
+
if @api_client.config.debugging
|
|
3076
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.update_composition_status_0 ...'
|
|
3077
|
+
end
|
|
3078
|
+
# verify the required parameter 'id' is set
|
|
3079
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
3080
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.update_composition_status_0"
|
|
3081
|
+
end
|
|
3082
|
+
# verify the required parameter 'idempotency_key' is set
|
|
3083
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
3084
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling CompositionsApi.update_composition_status_0"
|
|
3085
|
+
end
|
|
3086
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
|
|
3087
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.update_composition_status_0, the character length must be smaller than or equal to 50.'
|
|
3088
|
+
end
|
|
3089
|
+
|
|
3090
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
|
|
3091
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.update_composition_status_0, the character length must be great than or equal to 8.'
|
|
3092
|
+
end
|
|
3093
|
+
|
|
3094
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
|
|
3095
|
+
if @api_client.config.client_side_validation && idempotency_key !~ pattern
|
|
3096
|
+
fail ArgumentError, "invalid value for 'idempotency_key' when calling CompositionsApi.update_composition_status_0, must conform to the pattern #{pattern}."
|
|
3097
|
+
end
|
|
3098
|
+
|
|
3099
|
+
# verify the required parameter 'update_composition_status_request' is set
|
|
3100
|
+
if @api_client.config.client_side_validation && update_composition_status_request.nil?
|
|
3101
|
+
fail ArgumentError, "Missing the required parameter 'update_composition_status_request' when calling CompositionsApi.update_composition_status_0"
|
|
3102
|
+
end
|
|
3103
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
3104
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.update_composition_status_0, the character length must be smaller than or equal to 255.'
|
|
3105
|
+
end
|
|
3106
|
+
|
|
3107
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
3108
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.update_composition_status_0, the character length must be great than or equal to 1.'
|
|
3109
|
+
end
|
|
3110
|
+
|
|
3111
|
+
# resource path
|
|
3112
|
+
local_var_path = '/compositions/{id}/status'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
3113
|
+
|
|
3114
|
+
# query parameters
|
|
3115
|
+
query_params = opts[:query_params] || {}
|
|
3116
|
+
|
|
3117
|
+
# header parameters
|
|
3118
|
+
header_params = opts[:header_params] || {}
|
|
3119
|
+
# HTTP header 'Accept' (if needed)
|
|
3120
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3121
|
+
# HTTP header 'Content-Type'
|
|
3122
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3123
|
+
if !content_type.nil?
|
|
3124
|
+
header_params['Content-Type'] = content_type
|
|
3125
|
+
end
|
|
3126
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
3127
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
3128
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
3129
|
+
|
|
3130
|
+
# form parameters
|
|
3131
|
+
form_params = opts[:form_params] || {}
|
|
3132
|
+
|
|
3133
|
+
# http body (model)
|
|
3134
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_composition_status_request)
|
|
3135
|
+
|
|
3136
|
+
# return_type
|
|
3137
|
+
return_type = opts[:debug_return_type] || 'CompositionResponse'
|
|
3138
|
+
|
|
3139
|
+
# auth_names
|
|
3140
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
3141
|
+
|
|
3142
|
+
new_options = opts.merge(
|
|
3143
|
+
:operation => :"CompositionsApi.update_composition_status_0",
|
|
3144
|
+
:header_params => header_params,
|
|
3145
|
+
:query_params => query_params,
|
|
3146
|
+
:form_params => form_params,
|
|
3147
|
+
:body => post_body,
|
|
3148
|
+
:auth_names => auth_names,
|
|
3149
|
+
:return_type => return_type
|
|
3150
|
+
)
|
|
3151
|
+
|
|
3152
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3153
|
+
if @api_client.config.debugging
|
|
3154
|
+
@api_client.config.logger.debug "API called: CompositionsApi#update_composition_status_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3155
|
+
end
|
|
3156
|
+
return data, status_code, headers
|
|
3157
|
+
end
|
|
3158
|
+
|
|
3159
|
+
# Validate Content
|
|
3160
|
+
# Checks content against the composition's widget schema without saving it. Send what a content update (`PUT /compositions/{id}/content`) would store, `{ \"design\": {...}, \"content\": {...} }`, or the widget's values alone. Each value is checked by the kind of field the widget declares for it: text, a number within the limits of its slider, true or false, one of the choices of a dropdown, a color, a font, the address of an image, a date. The items of the widget's list are checked the same way, and their number against the limits of the list. A value that cannot be what the field holds, or a number outside its range, is an error and `valid` is false. Text longer than the field takes, a number or true/false sent as text, and a name the widget has no field for are warnings, and `valid` stays true. The design is not checked here. Nothing is saved and nothing in the body is changed.
|
|
3161
|
+
# @param id [String] ID of the composition
|
|
3162
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
3163
|
+
# @param request_body [Hash<String, Object>]
|
|
3164
|
+
# @param [Hash] opts the optional parameters
|
|
3165
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
3166
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
3167
|
+
# @return [ValidateCompositionContentResponse]
|
|
3168
|
+
def validate_composition_content_0(id, idempotency_key, request_body, opts = {})
|
|
3169
|
+
data, _status_code, _headers = validate_composition_content_0_with_http_info(id, idempotency_key, request_body, opts)
|
|
3170
|
+
data
|
|
3171
|
+
end
|
|
3172
|
+
|
|
3173
|
+
# Validate Content
|
|
3174
|
+
# Checks content against the composition's widget schema without saving it. Send what a content update (`PUT /compositions/{id}/content`) would store, `{ \"design\": {...}, \"content\": {...} }`, or the widget's values alone. Each value is checked by the kind of field the widget declares for it: text, a number within the limits of its slider, true or false, one of the choices of a dropdown, a color, a font, the address of an image, a date. The items of the widget's list are checked the same way, and their number against the limits of the list. A value that cannot be what the field holds, or a number outside its range, is an error and `valid` is false. Text longer than the field takes, a number or true/false sent as text, and a name the widget has no field for are warnings, and `valid` stays true. The design is not checked here. Nothing is saved and nothing in the body is changed.
|
|
3175
|
+
# @param id [String] ID of the composition
|
|
3176
|
+
# @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
3177
|
+
# @param request_body [Hash<String, Object>]
|
|
3178
|
+
# @param [Hash] opts the optional parameters
|
|
3179
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
3180
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: a list shows only theirs, a composition the call makes is filed under them, and a composition of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
|
|
3181
|
+
# @return [Array<(ValidateCompositionContentResponse, Integer, Hash)>] ValidateCompositionContentResponse data, response status code and response headers
|
|
3182
|
+
def validate_composition_content_0_with_http_info(id, idempotency_key, request_body, opts = {})
|
|
3183
|
+
if @api_client.config.debugging
|
|
3184
|
+
@api_client.config.logger.debug 'Calling API: CompositionsApi.validate_composition_content_0 ...'
|
|
3185
|
+
end
|
|
3186
|
+
# verify the required parameter 'id' is set
|
|
3187
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
3188
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling CompositionsApi.validate_composition_content_0"
|
|
3189
|
+
end
|
|
3190
|
+
# verify the required parameter 'idempotency_key' is set
|
|
3191
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
3192
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling CompositionsApi.validate_composition_content_0"
|
|
3193
|
+
end
|
|
3194
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
|
|
3195
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.validate_composition_content_0, the character length must be smaller than or equal to 50.'
|
|
3196
|
+
end
|
|
3197
|
+
|
|
3198
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
|
|
3199
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling CompositionsApi.validate_composition_content_0, the character length must be great than or equal to 8.'
|
|
3200
|
+
end
|
|
3201
|
+
|
|
3202
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
|
|
3203
|
+
if @api_client.config.client_side_validation && idempotency_key !~ pattern
|
|
3204
|
+
fail ArgumentError, "invalid value for 'idempotency_key' when calling CompositionsApi.validate_composition_content_0, must conform to the pattern #{pattern}."
|
|
3205
|
+
end
|
|
3206
|
+
|
|
3207
|
+
# verify the required parameter 'request_body' is set
|
|
3208
|
+
if @api_client.config.client_side_validation && request_body.nil?
|
|
3209
|
+
fail ArgumentError, "Missing the required parameter 'request_body' when calling CompositionsApi.validate_composition_content_0"
|
|
3210
|
+
end
|
|
3211
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
3212
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.validate_composition_content_0, the character length must be smaller than or equal to 255.'
|
|
3213
|
+
end
|
|
3214
|
+
|
|
3215
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
3216
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling CompositionsApi.validate_composition_content_0, the character length must be great than or equal to 1.'
|
|
3217
|
+
end
|
|
3218
|
+
|
|
3219
|
+
# resource path
|
|
3220
|
+
local_var_path = '/compositions/{id}/content/validate'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
3221
|
+
|
|
3222
|
+
# query parameters
|
|
3223
|
+
query_params = opts[:query_params] || {}
|
|
3224
|
+
|
|
3225
|
+
# header parameters
|
|
3226
|
+
header_params = opts[:header_params] || {}
|
|
3227
|
+
# HTTP header 'Accept' (if needed)
|
|
3228
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3229
|
+
# HTTP header 'Content-Type'
|
|
3230
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3231
|
+
if !content_type.nil?
|
|
3232
|
+
header_params['Content-Type'] = content_type
|
|
3233
|
+
end
|
|
3234
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
3235
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
3236
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
3237
|
+
|
|
3238
|
+
# form parameters
|
|
3239
|
+
form_params = opts[:form_params] || {}
|
|
3240
|
+
|
|
3241
|
+
# http body (model)
|
|
3242
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
|
|
3243
|
+
|
|
3244
|
+
# return_type
|
|
3245
|
+
return_type = opts[:debug_return_type] || 'ValidateCompositionContentResponse'
|
|
3246
|
+
|
|
3247
|
+
# auth_names
|
|
3248
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
3249
|
+
|
|
3250
|
+
new_options = opts.merge(
|
|
3251
|
+
:operation => :"CompositionsApi.validate_composition_content_0",
|
|
3252
|
+
:header_params => header_params,
|
|
3253
|
+
:query_params => query_params,
|
|
3254
|
+
:form_params => form_params,
|
|
3255
|
+
:body => post_body,
|
|
3256
|
+
:auth_names => auth_names,
|
|
3257
|
+
:return_type => return_type
|
|
3258
|
+
)
|
|
3259
|
+
|
|
3260
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3261
|
+
if @api_client.config.debugging
|
|
3262
|
+
@api_client.config.logger.debug "API called: CompositionsApi#validate_composition_content_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3263
|
+
end
|
|
3264
|
+
return data, status_code, headers
|
|
3265
|
+
end
|
|
3266
|
+
end
|
|
3267
|
+
end
|