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,1895 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Widgetic API Gateway
|
|
3
|
+
|
|
4
|
+
#API documentation for the Widgetic API Gateway
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for ApiSdkRb::PartnerApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'PartnerApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = ApiSdkRb::PartnerApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of PartnerApi' do
|
|
30
|
+
it 'should create an instance of PartnerApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(ApiSdkRb::PartnerApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for add_ai_answers_knowledge_document
|
|
36
|
+
# Add a document for a widget's AI to answer from
|
|
37
|
+
# Gives the widget's AI a document to answer visitors' questions from. Send the title and the plain text. The call returns once the document is ready to be used, which takes a few seconds, longer for a long text. **How it is used.** The text is cleaned, cut into short passages and each passage is turned into numbers (an embedding) so the widget can find the passages nearest to a question. When a visitor asks, the nearest passages and the question are shown to an AI model, which writes the answer from them and from nothing else; if the documents say nothing about the question the visitor is told so, and the owner is not charged for that question. The titles of the documents an answer used are shown to the visitor as its sources. **What leaves Widgetic.** The text of a document is sent to OpenAI to be embedded when it is added, and the passages used for a question are sent to the AI model that writes the answer. Say so in your privacy policy. **Treat every document as public.** An answer can quote or paraphrase anything a document says, to any visitor of the widget. Do not add passwords, keys, personal data or anything that must stay private. **Limits.** A widget holds up to 20 documents, each up to 100000 characters, and up to 400000 characters in all (`getAiAnswersKnowledge` reports the current numbers). 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.
|
|
38
|
+
# @param id The widget (composition) to add the document to
|
|
39
|
+
# @param add_ai_answers_knowledge_document_request
|
|
40
|
+
# @param [Hash] opts the optional parameters
|
|
41
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: 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
|
+
# @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.
|
|
43
|
+
# @return [AddAiAnswersKnowledgeDocument201Response]
|
|
44
|
+
describe 'add_ai_answers_knowledge_document test' do
|
|
45
|
+
it 'should work' do
|
|
46
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# unit tests for add_personal_workspace_domain
|
|
51
|
+
# Allow a website to show your widgets
|
|
52
|
+
# Adds a website to an account's own list. Give a website name such as `example.com`, or `*.example.com` for a website and all of its subdomains. A scheme, a port, a path, capital letters and a leading `www.` are dropped, so `https://www.Example.com/shop` is kept as `example.com`, and `example.com` covers `www.example.com` too. Something that is not a website name is refused, not stored. Until the first website is added nothing is restricted, and a widget can be shown anywhere. Once the list has one, a widget of the account is shown on the listed websites (and on Widgetic's own) and nowhere else. A page on your own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed, so there is nothing to add to test locally. So is the website where a partner your account administers integrates Widgetic, with every subdomain of it (`platformDomain` in the answer of `GET /partners/mine`), so there is nothing to add for it either and a list can never lock it out. A change can take about 15 seconds to reach every server. The list is a safeguard against other websites showing your widgets in a visitor's browser. It is not access control: anyone who knows a widget's id can still fetch its published content with a plain request that names no website. There is no limit on the list of an account that administers a partner, so a partner can add the website of each of its customers as they publish on their own domain, one call each. Any other account can list at most 50 websites, and the 51st is answered with a 409 (`BUSINESS_STATE_CONFLICT`). A wildcard such as `*.example.com` counts as one website, not one per subdomain, so use it instead of listing each subdomain. A page that frames a widget can name only so many websites to the browser (about fifty of ordinary length). Past that, the browser no longer checks the list for that page; the lookup that the Embed SDK makes for the widget still refuses every website that is not on the list.
|
|
53
|
+
# @param id The account the list belongs to. For your own, your own user id
|
|
54
|
+
# @param add_domain_request
|
|
55
|
+
# @param [Hash] opts the optional parameters
|
|
56
|
+
# @return [PersonalWorkspaceDomainResultResponse]
|
|
57
|
+
describe 'add_personal_workspace_domain test' do
|
|
58
|
+
it 'should work' do
|
|
59
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# unit tests for call_public_composition_adapter
|
|
64
|
+
# Call a gateway operation of an adapter a published widget uses
|
|
65
|
+
# The door a widget's adapter module calls, from the visitor's browser, for the operations that cannot run in the browser: anything with a secret, a charge in credits or the owner's storage behind it. A widget that uses such an adapter is handed the address of this route as `adapters.url` in its `widgetic:host` message (see the host bridge contract) and calls `{adapters.url}/{adapterId}/{operation}`. It is not meant to be called by hand, and it takes no API key. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/adapters/{adapterId}/{operation}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **What it serves.** Only an adapter, and a version of it, that the widget's LIVE manifest (what the version that is published uses) lists, and only an operation that runs on the gateway. Anything else is one 404 `ADAPTER_NOT_AVAILABLE`, whatever the reason, so the route is no way to ask what a widget contains. An adapter an administrator stopped offering to NEW widgets keeps serving the widgets that already use it. **Who may call.** The same rule as the entry route: a permitted `Origin` header, which is the artifact origin the widget runs from or a website the owner allowed (or the owner's own platform). Page script cannot forge it. A request without a permitted `Origin` is 403 `ORIGIN_NOT_ALLOWED`. A composition that is not served (unpublished, or its owner's plan does not serve it) is 404, with the codes of the other public embed routes. When the partner of the owner signs the host context, a context that is not signed as the partner requires is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`, `CONTEXT_SIGNATURE_INVALID` or `CONTEXT_SIGNATURE_EXPIRED`. **Cost and retries.** An operation priced in credits is charged to the owner of the widget (for a customer a partner manages, to the partner's administrator, within the monthly credits set for that customer), once for each `requestId`, before it runs, and given back if it does not answer. A `requestId` that was charged and not given back is 409 `REQUEST_ALREADY_USED` and the operation is NOT run a second time; one whose charge was given back may be tried again with the same `requestId`. A visitor never sees an owner's balance: a feature that cannot be used because its owner has no credits left, because the customer's monthly credits are spent, or because an administrator stopped the adapter, is the same 503 `ADAPTER_UNAVAILABLE` as every other \"not right now\". The owner is told through a notice. **Limits.** In front of everything, 120 calls a minute for each visitor address and composition and 600 a minute for a composition (429 `RATE_LIMITED`). Then, for each operation of a widget, a rate for each visitor address a minute and a cap for the widget a day: 30 and 5000 for an operation that is free, 10 and 500 for one that costs credits, unless the adapter says otherwise (never above 120 and 100000). A visitor over the rate is 429 `RATE_LIMITED`; a widget over its cap is 429 `WIDGET_LIMIT_REACHED`. Both carry a `Retry-After` header. The body is at most 64 KiB (413 `PAYLOAD_TOO_LARGE`) and JSON (415 `UNSUPPORTED_MEDIA_TYPE`); an operation has 30 seconds to answer (504 `ADAPTER_TIMEOUT`, and the charge is given back).
|
|
66
|
+
# @param composition_id
|
|
67
|
+
# @param adapter_id The id of the adapter, the name its module is known by, for example `upload`.
|
|
68
|
+
# @param operation The name of one operation of the adapter, as its documentation gives it.
|
|
69
|
+
# @param public_adapter_call_request
|
|
70
|
+
# @param [Hash] opts the optional parameters
|
|
71
|
+
# @return [PublicAdapterCallResult]
|
|
72
|
+
describe 'call_public_composition_adapter test' do
|
|
73
|
+
it 'should work' do
|
|
74
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# unit tests for check_composition_access
|
|
79
|
+
# Check Composition Access
|
|
80
|
+
# Checks if the authenticated user can access a specific composition based on workspace context and permissions.
|
|
81
|
+
# @param id Composition ID
|
|
82
|
+
# @param [Hash] opts the optional parameters
|
|
83
|
+
# @return [CheckCompositionAccessResponse]
|
|
84
|
+
describe 'check_composition_access test' do
|
|
85
|
+
it 'should work' do
|
|
86
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# unit tests for copy_preset_for_managed_user
|
|
91
|
+
# Give a managed user a copy of one of your presets
|
|
92
|
+
# Copies the preset `key` (see `setPartnerPreset`) onto a new canvas for one of your managed users, so their widget creator opens on a widget of their own that starts from yours. The copy is a draft widget in your account, filed under the managed user: `getAllWidgets` with `managedUserId` lists it, and no other managed user's editor can reach it. The copy carries the preset's code, design and content schemas, and thumbnail, and starts from a fork of its code repository, so the user's chat edits begin where yours left off. It does not carry the preset's database or its compositions. It is not a preset itself, and changing or removing the preset afterwards never touches it. To start a composition (the content and design editor) instead, you do not need a copy: call `createComposition` with the preset's `widgetId` (from `listPartnerPresets`) and the managed user. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one copy is made, not two. A copy that could not be made leaves nothing behind (503 `PRESET_COPY_FAILED`). The managed user must be yours and active.
|
|
93
|
+
# @param id The managed user to give the copy to (Widgetic's id for the user)
|
|
94
|
+
# @param key The key of the preset to copy
|
|
95
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
96
|
+
# @param [Hash] opts the optional parameters
|
|
97
|
+
# @option opts [CopyPartnerPresetRequest] :copy_partner_preset_request
|
|
98
|
+
# @return [PartnerPresetCopyResponse]
|
|
99
|
+
describe 'copy_preset_for_managed_user test' do
|
|
100
|
+
it 'should work' do
|
|
101
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# unit tests for create_canvas
|
|
106
|
+
# Create Canvas
|
|
107
|
+
# Creates a new canvas with the specified properties. To make the canvas for one of your managed users, send `managedUserId` or `managedUserExternalId`. The canvas stays in your account and is yours to edit; the tag lets you list one user's canvases with `getAllCanvases`. The managed user must be yours and active: one that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`. The tag is set here and does not change afterwards. Called with an editor session, the canvas is always made for the session's managed user.
|
|
108
|
+
# @param create_canvas_request
|
|
109
|
+
# @param [Hash] opts the optional parameters
|
|
110
|
+
# @return [CanvasResponse]
|
|
111
|
+
describe 'create_canvas test' do
|
|
112
|
+
it 'should work' do
|
|
113
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# unit tests for create_composition
|
|
118
|
+
# Create Composition
|
|
119
|
+
# 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.
|
|
120
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
121
|
+
# @param new_composition
|
|
122
|
+
# @param [Hash] opts the optional parameters
|
|
123
|
+
# @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.
|
|
124
|
+
# @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.
|
|
125
|
+
# @return [CreateCompositionFromWidget201Response]
|
|
126
|
+
describe 'create_composition test' do
|
|
127
|
+
it 'should work' do
|
|
128
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# unit tests for create_composition_content_item
|
|
133
|
+
# Add a content list item
|
|
134
|
+
# 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.
|
|
135
|
+
# @param id
|
|
136
|
+
# @param list List name from the content schema (`contentItems`) or `items`
|
|
137
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
138
|
+
# @param create_composition_content_item_request
|
|
139
|
+
# @param [Hash] opts the optional parameters
|
|
140
|
+
# @option opts [String] :if_match Optional content version from ETag
|
|
141
|
+
# @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.
|
|
142
|
+
# @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.
|
|
143
|
+
# @return [CreateCompositionContentItem201Response]
|
|
144
|
+
describe 'create_composition_content_item test' do
|
|
145
|
+
it 'should work' do
|
|
146
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# unit tests for create_composition_database_record
|
|
151
|
+
# Create Record In Composition Database
|
|
152
|
+
# 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`.
|
|
153
|
+
# @param id ID of the composition
|
|
154
|
+
# @param table Name of the database table
|
|
155
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
156
|
+
# @param body
|
|
157
|
+
# @param [Hash] opts the optional parameters
|
|
158
|
+
# @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.
|
|
159
|
+
# @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.
|
|
160
|
+
# @return [CreateCompositionDatabaseRecord201Response]
|
|
161
|
+
describe 'create_composition_database_record test' do
|
|
162
|
+
it 'should work' do
|
|
163
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# unit tests for create_composition_from_preset
|
|
168
|
+
# Create a composition from one of your presets in one call
|
|
169
|
+
# Validates the name, optional content, design, embed settings and locale, then creates a draft composition filed under the managed user, built on the preset's widget, in a single insert. A failure never leaves a half-made composition. The preset's widget must be published. The managed user must be yours and active. A widget that keeps what visitors send (a form, a vote, a rating) declares its tables in its own source (`src/lib/meta/database.json`); they are made for the composition here, in a schema of its own, as the widget was when it was last published. A widget that keeps nothing leaves the composition without tables. If the tables cannot be made just now, or the widget's file cannot be used, the composition is still created (`201`) and `meta.warnings` says why; the tables are made the next time the widget is generated. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one composition is created, not two.
|
|
170
|
+
# @param id
|
|
171
|
+
# @param key
|
|
172
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
173
|
+
# @param create_composition_from_preset_request
|
|
174
|
+
# @param [Hash] opts the optional parameters
|
|
175
|
+
# @return [CreateCompositionFromWidget201Response]
|
|
176
|
+
describe 'create_composition_from_preset test' do
|
|
177
|
+
it 'should work' do
|
|
178
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# unit tests for create_composition_from_widget
|
|
183
|
+
# Create a composition for a widget in one call
|
|
184
|
+
# After a managed user publishes a widget from the creator, call this with the widget id, the customer's managed user (when the widget is not already filed under one), and optional content, design, embed settings and locale. Every input is validated before a single insert; a failure never leaves a half-made composition. When the widget is already tagged with a managed user, you may omit `managedUserId`. When you send it, it must match that tag. A widget that keeps what visitors send (a form, a vote, a rating) declares its tables in its own source (`src/lib/meta/database.json`); they are made for the composition here, in a schema of its own, as the widget was when it was last published. A widget that keeps nothing leaves the composition without tables. If the tables cannot be made just now, or the widget's file cannot be used, the composition is still created (`201`) and `meta.warnings` says why; the tables are made the next time the widget is generated. The widget must be published. The `Idempotency-Key` header is required.
|
|
185
|
+
# @param id The widget id
|
|
186
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
187
|
+
# @param create_composition_from_widget_request
|
|
188
|
+
# @param [Hash] opts the optional parameters
|
|
189
|
+
# @return [CreateCompositionFromWidget201Response]
|
|
190
|
+
describe 'create_composition_from_widget test' do
|
|
191
|
+
it 'should work' do
|
|
192
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# unit tests for create_managed_user
|
|
197
|
+
# Create Managed User
|
|
198
|
+
# Creates a new managed user for a partner account. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one managed user is created, not two.
|
|
199
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
200
|
+
# @param new_managed_user
|
|
201
|
+
# @param [Hash] opts the optional parameters
|
|
202
|
+
# @return [ManagedUserResponse]
|
|
203
|
+
describe 'create_managed_user test' do
|
|
204
|
+
it 'should work' do
|
|
205
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# unit tests for create_managed_user_editor_session
|
|
210
|
+
# Create an editor session for a managed user
|
|
211
|
+
# Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic's editor pieces, such as the File Browser and the composition editor, without your API key ever reaching that browser. Call this from your server when the page that hosts the editor opens, and hand the `token` in the answer to that page. The token is shown once. It starts with `wgt_ses_` and the browser sends it as `Authorization: Bearer <token>`. It can do only what the `surfaces` you name allow, and only for this managed user: - `files`: upload a file (`uploadsPost`) and list the files uploaded for this user (`uploadsGet`). Every file is filed for this user and stored in your own storage destination, never in Widgetic's: a file a customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not optional, so no session, whatever its surfaces, can be made until you have set a destination (`setPartnerStorageDestination`); until then it is refused with 409 and `PARTNER_STORAGE_REQUIRED`, and when the destination cannot be used with 503 and `STORAGE_DESTINATION_UNAVAILABLE`. A destination you remove after the session was made stops its uploads too (the same 409; the browser is only told that the feature is not available right now). To keep a customer from uploading, leave `files` out of the session and hand the editors your own media library instead (`mediaLibrary`). - `editor`: edit one of this user's compositions: read it (`getCompositionById`, its content, design, embed settings and schemas), check a content change (`validateCompositionContent`), and change its name, content, design and embed settings (`updateComposition`, `setDynamicContent`). It can reach only compositions you created for this managed user (tag them with `managedUserId` when you create them); any other composition, including another of your users', answers 404. - `creator`: use Widgetic's widget creator for this user, including its AI. Draw on canvases and save them (`getAllCanvases`, `getCanvas`, `createCanvas`, `updateCanvas`, `previewDeleteCanvas`, `deleteCanvas`); make, change, copy and delete the widgets on them (`createWidget`, `getWidgets`, `getWidgetsBatch`, `updateWidget`, `uploadWidgetThumbnail`, `duplicateWidget`, `deleteWidget`); list and make the compositions of a widget it built (`getAllCompositions`, `createComposition`), which is how it shows the widget with sample values; keep the conversation of each widget (`getConversationsByWidgetId`, `createConversationForWidget`, `updateConversation`, `getMessages`, `createMessage`, `updateMessage`, `restoreCheckpoint`); and read a widget's schemas and give it its repository (`getWidgetContentSchema`, `getWidgetDesignSchema`, `updateWidgetRepository`). The AI that builds a widget is part of it: list the models (`agentModelsGet`), open the widget's repository (`agentRepositoriesPost`, `agentRepositoriesRepoIdGet`), start a generation and follow or cancel it (`agentCodeGeneratePost`, `operationsStreamGet`, `operationsIdGet`, `operationsIdCancelPost`), build and preview the result (`agentWidgetBuilderRepoHeadWidgetIdGet`, `buildWidgetFromRepo`, `previewWidgetVersion`), publish a version of the widget and move between its versions (`agentWidgetBuilderPublishWidgetIdPost`, `getWidgetPublishHistory`, `setWidgetPublishHistoryLive`, `renameWidgetPublishHistoryTitle`), and turn a stroke or a sentence into a decision (`agentShapeRecognizePost`, `agentDesignResolvePost`). It can also offer the customer your presets as starting points: read them and ask for a copy for this customer (`listMyPresets`, `copyMyPreset`; you choose the presets with `setPartnerPreset`). What the session makes is filed for this managed user, and the lists it reads hold only this user's canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories, uploaded files and operations made for this managed user (tag the canvases and widgets you create with `managedUserId`); any other canvas, widget, composition, conversation, message, repository, file or operation, including another of your users', answers 404. The creator also saves the composition it is editing (`updateComposition`, from the `editor` surface) and attaches pictures to its chat (`uploadsPost`, from the `files` surface), and the surfaces do not imply one another: to open the whole creator for a user, ask for `creator`, `editor` and `files` together. A generation or a build one user starts can be followed and cancelled by that user and by you, never by another of your users. The AI is paid for by your account, as your own calls are: its credits and allowances are yours. A session cannot make a widget public (publishing a version does not), file one under a project or an organization, or set anything the creator does not set: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Everything else is refused with 403 and `EDITOR_SESSION_ROUTE_NOT_ALLOWED`: a session cannot read your account, make more sessions, change your presets or delete a composition, and a session without the `creator` surface cannot create or list compositions. Create the composition yourself with your API key, then open the editor on it. A session ends at `expiresAt` (at most four hours), when you end it (`revokeManagedUserEditorSession`), or when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at once (`429 EDITOR_SESSION_LIMIT_REACHED`). A session that is bound to a web page (`allowedOrigin`) is refused from any other origin. The AI the session runs is paid for with your credits. Set `maxCredits` to hold the session to a number of them: once its generations have taken that many (a generation that fails is refunded and does not count), the next one is refused with 402 and `EDITOR_SESSION_CREDIT_LIMIT_REACHED`, and the browser is told only that the feature is not available right now. Without it, the limit Widgetic has set for your account applies when it has set one (the same limit for every session you make, and `maxCredits: null` asks for none), and otherwise the credits of your account are the only ceiling. What each of your users' sessions has spent is in `getManagedUserUsage`. Each call makes a new session. It does not take an `Idempotency-Key`: the answer holds the token, and the token is never stored where a retry could read it back. The answer is sent with `Cache-Control: no-store`.
|
|
212
|
+
# @param id The managed user the session is for (Widgetic's id for the user)
|
|
213
|
+
# @param new_editor_session
|
|
214
|
+
# @param [Hash] opts the optional parameters
|
|
215
|
+
# @return [EditorSessionResponse]
|
|
216
|
+
describe 'create_managed_user_editor_session test' do
|
|
217
|
+
it 'should work' do
|
|
218
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# unit tests for create_partner_extra_credits_invoice
|
|
223
|
+
# Buy extra credits for a partner
|
|
224
|
+
# Asks Widgetic for an invoice for extra credits, on top of the credits of the contract. Name the dollars; the invoice is for the most whole credits they buy at the **list price** of a credit (the price a contract may lower belongs to the contract), so it is never for more than you asked: 12.34 buys 123 credits and the invoice says 12.30. The smallest purchase is 10 dollars and one request buys at most 100000 (ask Widgetic for an invoice for more). Pay the invoice with the link in the answer. When it is paid the credits are added **once, for good**, to the account of the person who administers the partner, which is the account everything the partner builds is charged to (`getPartnerCreditBalance` shows it). Extra credits **do not expire**, unlike the credits of a contract period, which end with it. Nothing is added before the invoice is paid, and an unpaid invoice for extra credits never stops the partner: only an unpaid invoice of the contract does (`payment_arrears`). Allowed whatever the partner's standing: a partner that has run out of credits, or is stopped for an unpaid contract invoice, can still buy. No contract is needed. An `Idempotency-Key` is required, and it is what makes a retry safe: the same key with the same body returns the invoice already issued, the same key with a different body is refused with 422, and a duplicate that arrives while the first is still running is refused with 409. Use one key per purchase you mean to make, and a new key for the next one. At most 10 requests an hour. Who may ask: the person who administers the partner, or a Widgetic administrator. A key limited to scopes needs `billing:write`.
|
|
225
|
+
# @param partner_id Partner ID
|
|
226
|
+
# @param idempotency_key A key of your own for this purchase, so that a retry cannot make a second invoice
|
|
227
|
+
# @param request_extra_credits
|
|
228
|
+
# @param [Hash] opts the optional parameters
|
|
229
|
+
# @return [PartnerExtraCreditsInvoiceResponse]
|
|
230
|
+
describe 'create_partner_extra_credits_invoice test' do
|
|
231
|
+
it 'should work' do
|
|
232
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# unit tests for create_public_composition_entry
|
|
237
|
+
# Append a visitor entry through the gateway
|
|
238
|
+
# Public append-only write into a published composition database. No API key. The browser must send a permitted `Origin` header (the artifact iframe origin or a website the owner allowed). When the request comes from the shared artifact origin, it must also carry the per-composition write token (`X-Widgetic-Write-Token` header or `writeToken` body field, handed to the widget in `widgetic:host` as `entries.writeToken` and returned as `entryWriteToken` on `getPublicCompositionEmbed`). Host `context` is stored for partner attribution; it is not authenticated unless the partner signs it (see **Signed context**). Request bodies are limited to 16 KB before parsing. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/entries/{table}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **Signed context.** A partner that wants to trust `context` (to bill a customer by it, say) makes a signing secret (`rotatePartnerEntryContextSecret`), and its server signs the context it hands to the embed. The signature travels inside `context` as two reserved keys, `widgetic_exp` (UTC seconds, at most seven days ahead) and `widgetic_sig`. The gateway checks them after the `Origin` and before anything else is judged, stored or announced, and keeps and announces the context WITHOUT them. A context that is not signed as the partner requires is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`, `CONTEXT_SIGNATURE_INVALID` or `CONTEXT_SIGNATURE_EXPIRED`; when the check cannot be made just now the answer is a retryable 503 `CONTEXT_SIGNATURE_UNAVAILABLE`, never an unchecked entry. Until a partner makes a secret nothing changes: the two keys are dropped and the rest is taken as it came. A signature is good until its `widgetic_exp` and may be used again until then, so a partner that must count each submission once keeps a unique value of its own (a `submissionId`, say) in the context. The recipe and a test vector are in the description of `rotatePartnerEntryContextSecret`.
|
|
239
|
+
# @param composition_id
|
|
240
|
+
# @param table
|
|
241
|
+
# @param public_composition_entry_request
|
|
242
|
+
# @param [Hash] opts the optional parameters
|
|
243
|
+
# @option opts [String] :x_widgetic_write_token Signed per-composition write token handed to the widget in `widgetic:host` as `entries.writeToken` (and returned by `GET /embed/compositions/{compositionId}` as `entryWriteToken`). Required when the request comes from the shared Widgetic artifact origin; verified whenever present.
|
|
244
|
+
# @return [PublicCompositionEntryCreated]
|
|
245
|
+
describe 'create_public_composition_entry test' do
|
|
246
|
+
it 'should work' do
|
|
247
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# unit tests for create_user_api_key
|
|
252
|
+
# Create an API key
|
|
253
|
+
# Makes a new API key for an account and returns its secret in `key`. That is the only time the secret is shown: Widgetic keeps a hash, so a key that was not stored cannot be recovered, only replaced. To rotate a key, make the new one, switch the integration over to it, then delete the old one. Only a person signed in on widgetic.com can make a key: a request made with an API key, or with an SDK token, is refused with 403. That way a leaked key cannot be used to make a second one that survives its revocation. Make keys from the dashboard; a key can still list, rename, switch off and delete keys. An `Idempotency-Key` header is required (8 to 50 characters: letters, digits, `-` and `_`). A retry with the same header and the same body returns the same answer instead of making a second key, and the same header with a different body is refused with 422. Make keys one at a time: two requests for the same account that run at the same moment can overwrite each other. A key can be limited to what it needs. Send a `preset` (`read_only`, `content` or `full_access`) or a list of `scopes`, never both. Send neither for a key that can do everything its owner can, as every key made before scopes existed. A limited key is refused with 403 and the code `API_KEY_SCOPE_MISSING` on anything outside its scopes, so a key held by a build server or by a partner's backend can be given only the part of the API it uses. The scopes of a key are fixed when it is made: to widen one, make a new key and delete the old one. A limited key cannot make, change or delete keys, exchange tokens or reach the administration routes. The list of scopes is in the `ApiKeyScope` schema. Accounts with API access (Solo, Teams and partner accounts) have no limit on how many keys they hold. An account on a plan without API access cannot make one (a partner account is not asked about a plan).
|
|
254
|
+
# @param id The account the key is for. For your own, your own user id
|
|
255
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
256
|
+
# @param create_user_api_key_request
|
|
257
|
+
# @param [Hash] opts the optional parameters
|
|
258
|
+
# @return [CreatedUserApiKeyResponse]
|
|
259
|
+
describe 'create_user_api_key test' do
|
|
260
|
+
it 'should work' do
|
|
261
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# unit tests for create_widget
|
|
266
|
+
# Create Widget
|
|
267
|
+
# Creates a widget for your account: a named record with a type and some starting content, on a canvas of its own (or one of yours that you name). It costs no credits and has no code yet; the code is generated for it afterwards. The new widget is yours, and you can list it with `getWidgets`. A widget is a draft until you say otherwise (`isDraft: false`). If a step after the widget was saved does not go through, the widget is still created, and `data.warnings` says what did not. Read it before relying on the widget. A widget can be placed on one of your canvases (`canvasId`), in a project you can edit (`projectId`) or in an organization where you may create widgets (`organizationId`). Naming anything you cannot use is refused with 403, and the answer is the same whether it exists or not. To make the widget for one of your managed users, send `managedUserId` or `managedUserExternalId`. The widget stays in your account and is yours to edit; the tag lets you list one user's widgets with `getWidgets`. The managed user must be yours and active: one that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`. The tag is set here and does not change afterwards. This call has a limit of its own: 120 per minute for each account (ask Widgetic if you need more). Past that the call is answered with 429 and a `Retry-After`. A widget has no database of its own: what the visitors of a composition leave is kept in the tables of that composition, made when the composition is. The `Idempotency-Key` header is required; send the same key when you retry, so one widget is created, not two.
|
|
268
|
+
# @param idempotency_key A unique value (a UUID is fine) that makes a retry of this request safe.
|
|
269
|
+
# @param new_widget
|
|
270
|
+
# @param [Hash] opts the optional parameters
|
|
271
|
+
# @return [CreateWidget201Response]
|
|
272
|
+
describe 'create_widget test' do
|
|
273
|
+
it 'should work' do
|
|
274
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
275
|
+
end
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# unit tests for delete_canvas
|
|
279
|
+
# Delete Canvas
|
|
280
|
+
# Deletes a canvas together with every widget on it. Called with an editor session, only a canvas whose widgets were all made for the session's managed user can be deleted; one that also holds somebody else's widgets is refused with 409 and `CANVAS_HAS_OTHER_WIDGETS`, and nothing is deleted. Delete such a canvas with your API key.
|
|
281
|
+
# @param id ID of the canvas
|
|
282
|
+
# @param [Hash] opts the optional parameters
|
|
283
|
+
# @return [CanvasResponse]
|
|
284
|
+
describe 'delete_canvas test' do
|
|
285
|
+
it 'should work' do
|
|
286
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# unit tests for delete_composition
|
|
291
|
+
# Delete Composition
|
|
292
|
+
# Deletes a specific composition, and the data it keeps (the tables it declared and what visitors left in them).
|
|
293
|
+
# @param id The ID of the composition to delete
|
|
294
|
+
# @param [Hash] opts the optional parameters
|
|
295
|
+
# @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.
|
|
296
|
+
# @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.
|
|
297
|
+
# @return [nil]
|
|
298
|
+
describe 'delete_composition test' do
|
|
299
|
+
it 'should work' do
|
|
300
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
301
|
+
end
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
# unit tests for delete_composition_content_item
|
|
305
|
+
# Delete a content list item
|
|
306
|
+
# @param id
|
|
307
|
+
# @param list
|
|
308
|
+
# @param item_id
|
|
309
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
310
|
+
# @param [Hash] opts the optional parameters
|
|
311
|
+
# @option opts [String] :if_match
|
|
312
|
+
# @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.
|
|
313
|
+
# @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.
|
|
314
|
+
# @return [DeleteCompositionContentItemResponse]
|
|
315
|
+
describe 'delete_composition_content_item test' do
|
|
316
|
+
it 'should work' do
|
|
317
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
318
|
+
end
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
# unit tests for delete_composition_data_source
|
|
322
|
+
# Remove the composition data source binding
|
|
323
|
+
# 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.
|
|
324
|
+
# @param id
|
|
325
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
326
|
+
# @param [Hash] opts the optional parameters
|
|
327
|
+
# @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.
|
|
328
|
+
# @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.
|
|
329
|
+
# @return [DeleteCompositionDataSourceResponse]
|
|
330
|
+
describe 'delete_composition_data_source test' do
|
|
331
|
+
it 'should work' do
|
|
332
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
333
|
+
end
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
# unit tests for delete_composition_database_record
|
|
337
|
+
# Delete Record From Composition Database
|
|
338
|
+
# 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`.
|
|
339
|
+
# @param id ID of the composition
|
|
340
|
+
# @param table Name of the database table
|
|
341
|
+
# @param record_id ID of the record to delete
|
|
342
|
+
# @param [Hash] opts the optional parameters
|
|
343
|
+
# @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.
|
|
344
|
+
# @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.
|
|
345
|
+
# @return [CreateCompositionDatabaseRecord201Response]
|
|
346
|
+
describe 'delete_composition_database_record test' do
|
|
347
|
+
it 'should work' do
|
|
348
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
349
|
+
end
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
# unit tests for delete_composition_entry_items
|
|
353
|
+
# Delete composition entry items by id or host context
|
|
354
|
+
# Delete by comma-separated ids (1–100) or by context filters (not both). Rate limit 30 requests per minute.
|
|
355
|
+
# @param id
|
|
356
|
+
# @param table
|
|
357
|
+
# @param [Hash] opts the optional parameters
|
|
358
|
+
# @option opts [String] :ids
|
|
359
|
+
# @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.
|
|
360
|
+
# @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`.
|
|
361
|
+
# @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.
|
|
362
|
+
# @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.
|
|
363
|
+
# @return [CompositionEntryDeleteSuccess]
|
|
364
|
+
describe 'delete_composition_entry_items test' do
|
|
365
|
+
it 'should work' do
|
|
366
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
367
|
+
end
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
# unit tests for delete_managed_user
|
|
371
|
+
# Delete Managed User
|
|
372
|
+
# Deletes a managed user by ID. Its editor sessions end with it. What was filed under it (compositions, widgets, uploads) stays in your account, untagged.
|
|
373
|
+
# @param id ID of the managed user to delete
|
|
374
|
+
# @param [Hash] opts the optional parameters
|
|
375
|
+
# @return [DeleteManagedUser200Response]
|
|
376
|
+
describe 'delete_managed_user test' do
|
|
377
|
+
it 'should work' do
|
|
378
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
379
|
+
end
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
# unit tests for delete_personal_workspace_domain
|
|
383
|
+
# Stop allowing a website to show your widgets
|
|
384
|
+
# Removes one entry from an account's own list. When it was the last one, nothing is restricted any more and a widget can be shown anywhere again. A change can take about 15 seconds to reach every server.
|
|
385
|
+
# @param id The account the list belongs to. For your own, your own user id
|
|
386
|
+
# @param domain_id The `id` of the entry, as the list shows it
|
|
387
|
+
# @param [Hash] opts the optional parameters
|
|
388
|
+
# @return [DeletePersonalWorkspaceDomainResponse]
|
|
389
|
+
describe 'delete_personal_workspace_domain test' do
|
|
390
|
+
it 'should work' do
|
|
391
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
392
|
+
end
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
# unit tests for delete_user_api_key
|
|
396
|
+
# Delete an API key
|
|
397
|
+
# Deletes a key and the record of what it was used for. The key stops working at once on the server that took the request and within a minute on the others, and cannot be brought back: make a new one instead. To stop a key without losing it, switch it off with `updateUserApiKey`.
|
|
398
|
+
# @param id The account the key belongs to
|
|
399
|
+
# @param key_id The `keyId` of the key, as the list shows it
|
|
400
|
+
# @param [Hash] opts the optional parameters
|
|
401
|
+
# @return [DeleteUserApiKeyResponse]
|
|
402
|
+
describe 'delete_user_api_key test' do
|
|
403
|
+
it 'should work' do
|
|
404
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
405
|
+
end
|
|
406
|
+
end
|
|
407
|
+
|
|
408
|
+
# unit tests for describe_composition_entries
|
|
409
|
+
# Describe What a Composition Keeps
|
|
410
|
+
# 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.
|
|
411
|
+
# @param id ID of the composition
|
|
412
|
+
# @param [Hash] opts the optional parameters
|
|
413
|
+
# @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.
|
|
414
|
+
# @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.
|
|
415
|
+
# @return [CompositionEntriesDescriptionResponse]
|
|
416
|
+
describe 'describe_composition_entries test' do
|
|
417
|
+
it 'should work' do
|
|
418
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
419
|
+
end
|
|
420
|
+
end
|
|
421
|
+
|
|
422
|
+
# unit tests for duplicate_composition
|
|
423
|
+
# Duplicate Composition
|
|
424
|
+
# 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.
|
|
425
|
+
# @param id ID of the composition to duplicate
|
|
426
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
427
|
+
# @param [Hash] opts the optional parameters
|
|
428
|
+
# @option opts [String] :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.
|
|
429
|
+
# @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.
|
|
430
|
+
# @option opts [DuplicateCompositionRequest] :duplicate_composition_request
|
|
431
|
+
# @return [DuplicateComposition202Response]
|
|
432
|
+
describe 'duplicate_composition test' do
|
|
433
|
+
it 'should work' do
|
|
434
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
435
|
+
end
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
# unit tests for export_composition_entry_items
|
|
439
|
+
# Export composition entry items
|
|
440
|
+
# Streams up to 50,000 matching rows in batches of 1,000. Tables without cursor paging export at most one batch; when more rows exist the response sets `X-Widgetic-Export-Truncated: true`. Rate limit 20 requests per minute.
|
|
441
|
+
# @param id
|
|
442
|
+
# @param table
|
|
443
|
+
# @param [Hash] opts the optional parameters
|
|
444
|
+
# @option opts [String] :format
|
|
445
|
+
# @option opts [String] :order `desc` (the default) lists the newest entry first, `asc` the oldest. Entries are sorted by their time, then by their id (compared as text, byte by byte) in the same direction, so the order of two entries made at the same instant is always the same; an entry with no time counts as the oldest. A table with no time column is sorted by its id. The managed-user feed sorts by time, then by composition id, table and id.
|
|
446
|
+
# @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`.
|
|
447
|
+
# @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`).
|
|
448
|
+
# @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.
|
|
449
|
+
# @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`.
|
|
450
|
+
# @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.
|
|
451
|
+
# @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.
|
|
452
|
+
# @return [String]
|
|
453
|
+
describe 'export_composition_entry_items test' do
|
|
454
|
+
it 'should work' do
|
|
455
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
456
|
+
end
|
|
457
|
+
end
|
|
458
|
+
|
|
459
|
+
# unit tests for get_ai_answers_knowledge
|
|
460
|
+
# See the documents a widget's AI answers from
|
|
461
|
+
# 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.
|
|
462
|
+
# @param id The widget (composition) whose documents to list
|
|
463
|
+
# @param [Hash] opts the optional parameters
|
|
464
|
+
# @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.
|
|
465
|
+
# @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.
|
|
466
|
+
# @return [GetAiAnswersKnowledge200Response]
|
|
467
|
+
describe 'get_ai_answers_knowledge test' do
|
|
468
|
+
it 'should work' do
|
|
469
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
470
|
+
end
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
# unit tests for get_all_canvases
|
|
474
|
+
# Get All Canvases
|
|
475
|
+
# Retrieves all canvases with pagination support and filtering options. Pass `managedUserId` (Widgetic's id for one of your managed users) or `managedUserExternalId` (your own identifier for the user) to list only the canvases made for that managed user. The canvases of your other managed users, and your own, are left out. A managed user that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`. Called with an editor session, the list is always the session's managed user's.
|
|
476
|
+
# @param [Hash] opts the optional parameters
|
|
477
|
+
# @option opts [Integer] :page Page number for pagination
|
|
478
|
+
# @option opts [Integer] :size Number of items per page
|
|
479
|
+
# @option opts [String] :sort Sort field and direction (e.g., \"created_at:desc\")
|
|
480
|
+
# @option opts [Time] :created_after Filter canvases created after the specified date (ISO 8601 format)
|
|
481
|
+
# @option opts [Time] :created_before Filter canvases created before the specified date (ISO 8601 format)
|
|
482
|
+
# @option opts [Time] :updated_after Filter canvases updated after the specified date (ISO 8601 format)
|
|
483
|
+
# @option opts [Time] :updated_before Filter canvases updated before the specified date (ISO 8601 format)
|
|
484
|
+
# @option opts [String] :managed_user_id List only the canvases made for this managed user (Widgetic's id for the user). Send this or `managedUserExternalId`, not both.
|
|
485
|
+
# @option opts [String] :managed_user_external_id List only the canvases made for the managed user you registered with this `externalId` (your own identifier for the user). Send this or `managedUserId`, not both.
|
|
486
|
+
# @return [GetAllCanvasesResponse]
|
|
487
|
+
describe 'get_all_canvases test' do
|
|
488
|
+
it 'should work' do
|
|
489
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
490
|
+
end
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
# unit tests for get_all_compositions
|
|
494
|
+
# Get All Compositions
|
|
495
|
+
# 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.
|
|
496
|
+
# @param [Hash] opts the optional parameters
|
|
497
|
+
# @option opts [Integer] :page Page number for pagination
|
|
498
|
+
# @option opts [Integer] :size Number of items per page
|
|
499
|
+
# @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.
|
|
500
|
+
# @option opts [String] :widget_id Filter compositions by widget ID
|
|
501
|
+
# @option opts [String] :workspace Filter by workspace
|
|
502
|
+
# @option opts [String] :project_folder Only the compositions in this project (the project's id).
|
|
503
|
+
# @option opts [String] :status Only the compositions in this status. Without it, every status is listed.
|
|
504
|
+
# @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.
|
|
505
|
+
# @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.
|
|
506
|
+
# @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.
|
|
507
|
+
# @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.
|
|
508
|
+
# @return [GetAllCompositions200Response]
|
|
509
|
+
describe 'get_all_compositions test' do
|
|
510
|
+
it 'should work' do
|
|
511
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
512
|
+
end
|
|
513
|
+
end
|
|
514
|
+
|
|
515
|
+
# unit tests for get_all_managed_users
|
|
516
|
+
# Get Managed Users
|
|
517
|
+
# Retrieve the managed users you manage, with pagination support. (Admins see every partner's managed users.)
|
|
518
|
+
# @param [Hash] opts the optional parameters
|
|
519
|
+
# @option opts [Integer] :page Page number for pagination
|
|
520
|
+
# @option opts [Integer] :size Number of items per page
|
|
521
|
+
# @option opts [String] :sort Sort field and direction, `<field>:<asc|desc>`. The field is `createdAt`, `updatedAt` or `externalId` (the snake_case spellings `created_at`, `updated_at` and `external_id` work too); `asc` or `desc` alone sorts by `createdAt`. Any other field is a 400.
|
|
522
|
+
# @return [GetAllManagedUsers200Response]
|
|
523
|
+
describe 'get_all_managed_users test' do
|
|
524
|
+
it 'should work' do
|
|
525
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
526
|
+
end
|
|
527
|
+
end
|
|
528
|
+
|
|
529
|
+
# unit tests for get_canvas
|
|
530
|
+
# Get Canvas
|
|
531
|
+
# Retrieves a specific canvas by ID.
|
|
532
|
+
# @param id ID of the canvas
|
|
533
|
+
# @param [Hash] opts the optional parameters
|
|
534
|
+
# @return [CanvasResponse]
|
|
535
|
+
describe 'get_canvas test' do
|
|
536
|
+
it 'should work' do
|
|
537
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
538
|
+
end
|
|
539
|
+
end
|
|
540
|
+
|
|
541
|
+
# unit tests for get_composition_by_id
|
|
542
|
+
# Get Composition
|
|
543
|
+
# 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.
|
|
544
|
+
# @param id Composition ID
|
|
545
|
+
# @param [Hash] opts the optional parameters
|
|
546
|
+
# @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.
|
|
547
|
+
# @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.
|
|
548
|
+
# @return [CreateCompositionFromWidget201Response]
|
|
549
|
+
describe 'get_composition_by_id test' do
|
|
550
|
+
it 'should work' do
|
|
551
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
552
|
+
end
|
|
553
|
+
end
|
|
554
|
+
|
|
555
|
+
# unit tests for get_composition_content
|
|
556
|
+
# Get Current Content
|
|
557
|
+
# Retrieves the current content of a composition
|
|
558
|
+
# @param id ID of the composition
|
|
559
|
+
# @param [Hash] opts the optional parameters
|
|
560
|
+
# @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.
|
|
561
|
+
# @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.
|
|
562
|
+
# @return [GetCompositionContentResponse]
|
|
563
|
+
describe 'get_composition_content test' do
|
|
564
|
+
it 'should work' do
|
|
565
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
566
|
+
end
|
|
567
|
+
end
|
|
568
|
+
|
|
569
|
+
# unit tests for get_composition_content_schema
|
|
570
|
+
# Get Content Schema
|
|
571
|
+
# Retrieves the content schema for a composition based on its widget type
|
|
572
|
+
# @param id ID of the composition
|
|
573
|
+
# @param [Hash] opts the optional parameters
|
|
574
|
+
# @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.
|
|
575
|
+
# @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.
|
|
576
|
+
# @return [GetCompositionContentSchemaResponse]
|
|
577
|
+
describe 'get_composition_content_schema test' do
|
|
578
|
+
it 'should work' do
|
|
579
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
580
|
+
end
|
|
581
|
+
end
|
|
582
|
+
|
|
583
|
+
# unit tests for get_composition_data_source
|
|
584
|
+
# Read the composition data source binding
|
|
585
|
+
# 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).
|
|
586
|
+
# @param id
|
|
587
|
+
# @param [Hash] opts the optional parameters
|
|
588
|
+
# @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.
|
|
589
|
+
# @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.
|
|
590
|
+
# @return [GetCompositionDataSourceResponse]
|
|
591
|
+
describe 'get_composition_data_source test' do
|
|
592
|
+
it 'should work' do
|
|
593
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
594
|
+
end
|
|
595
|
+
end
|
|
596
|
+
|
|
597
|
+
# unit tests for get_composition_database_record
|
|
598
|
+
# Get Record From Composition Database
|
|
599
|
+
# 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`.
|
|
600
|
+
# @param id ID of the composition
|
|
601
|
+
# @param table Name of the database table
|
|
602
|
+
# @param record_id ID of the record to retrieve
|
|
603
|
+
# @param [Hash] opts the optional parameters
|
|
604
|
+
# @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.
|
|
605
|
+
# @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.
|
|
606
|
+
# @return [CreateCompositionDatabaseRecord201Response]
|
|
607
|
+
describe 'get_composition_database_record test' do
|
|
608
|
+
it 'should work' do
|
|
609
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
610
|
+
end
|
|
611
|
+
end
|
|
612
|
+
|
|
613
|
+
# unit tests for get_composition_database_records
|
|
614
|
+
# Get All Records From Composition Database Table
|
|
615
|
+
# 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`.
|
|
616
|
+
# @param id ID of the composition
|
|
617
|
+
# @param table Name of the database table
|
|
618
|
+
# @param [Hash] opts the optional parameters
|
|
619
|
+
# @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.
|
|
620
|
+
# @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.
|
|
621
|
+
# @return [GetCompositionDatabaseRecords200Response]
|
|
622
|
+
describe 'get_composition_database_records test' do
|
|
623
|
+
it 'should work' do
|
|
624
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
625
|
+
end
|
|
626
|
+
end
|
|
627
|
+
|
|
628
|
+
# unit tests for get_composition_design
|
|
629
|
+
# Get Composition Design
|
|
630
|
+
# Retrieves only the design field from a composition.
|
|
631
|
+
# @param id ID of the composition
|
|
632
|
+
# @param [Hash] opts the optional parameters
|
|
633
|
+
# @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.
|
|
634
|
+
# @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.
|
|
635
|
+
# @return [GetCompositionDesignResponse]
|
|
636
|
+
describe 'get_composition_design test' do
|
|
637
|
+
it 'should work' do
|
|
638
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
639
|
+
end
|
|
640
|
+
end
|
|
641
|
+
|
|
642
|
+
# unit tests for get_composition_design_schema
|
|
643
|
+
# Get Design Schema
|
|
644
|
+
# Retrieves the design schema for a composition based on its widget type
|
|
645
|
+
# @param id ID of the composition
|
|
646
|
+
# @param [Hash] opts the optional parameters
|
|
647
|
+
# @option opts [String] :x_managed_user_id The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: 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.
|
|
648
|
+
# @option opts [String] :x_managed_user_external_id Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions: 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.
|
|
649
|
+
# @return [GetCompositionDesignSchemaResponse]
|
|
650
|
+
describe 'get_composition_design_schema test' do
|
|
651
|
+
it 'should work' do
|
|
652
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
653
|
+
end
|
|
654
|
+
end
|
|
655
|
+
|
|
656
|
+
# unit tests for get_composition_embed_schema
|
|
657
|
+
# Get Embed Schema
|
|
658
|
+
# 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).
|
|
659
|
+
# @param id ID of the composition
|
|
660
|
+
# @param [Hash] opts the optional parameters
|
|
661
|
+
# @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.
|
|
662
|
+
# @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.
|
|
663
|
+
# @return [GetCompositionEmbedSchemaResponse]
|
|
664
|
+
describe 'get_composition_embed_schema test' do
|
|
665
|
+
it 'should work' do
|
|
666
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
667
|
+
end
|
|
668
|
+
end
|
|
669
|
+
|
|
670
|
+
# unit tests for get_composition_embed_settings
|
|
671
|
+
# Get Composition Embed Settings
|
|
672
|
+
# Retrieves only the embedSettings field from a composition.
|
|
673
|
+
# @param id ID of the composition
|
|
674
|
+
# @param [Hash] opts the optional parameters
|
|
675
|
+
# @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.
|
|
676
|
+
# @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.
|
|
677
|
+
# @return [GetCompositionEmbedSettingsResponse]
|
|
678
|
+
describe 'get_composition_embed_settings test' do
|
|
679
|
+
it 'should work' do
|
|
680
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
681
|
+
end
|
|
682
|
+
end
|
|
683
|
+
|
|
684
|
+
# unit tests for get_composition_preview
|
|
685
|
+
# Get Composition Preview
|
|
686
|
+
# 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`.
|
|
687
|
+
# @param id ID of the composition
|
|
688
|
+
# @param [Hash] opts the optional parameters
|
|
689
|
+
# @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.
|
|
690
|
+
# @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.
|
|
691
|
+
# @return [GetCompositionPreviewResponse]
|
|
692
|
+
describe 'get_composition_preview test' do
|
|
693
|
+
it 'should work' do
|
|
694
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
695
|
+
end
|
|
696
|
+
end
|
|
697
|
+
|
|
698
|
+
# unit tests for get_composition_versions
|
|
699
|
+
# Get Composition Versions
|
|
700
|
+
# Retrieves version history for a specific composition.
|
|
701
|
+
# @param id Composition ID
|
|
702
|
+
# @param [Hash] opts the optional parameters
|
|
703
|
+
# @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.
|
|
704
|
+
# @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.
|
|
705
|
+
# @return [GetCompositionVersions200Response]
|
|
706
|
+
describe 'get_composition_versions test' do
|
|
707
|
+
it 'should work' do
|
|
708
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
709
|
+
end
|
|
710
|
+
end
|
|
711
|
+
|
|
712
|
+
# unit tests for get_compositions_batch
|
|
713
|
+
# Get Compositions Batch
|
|
714
|
+
# 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.
|
|
715
|
+
# @param get_compositions_batch_request
|
|
716
|
+
# @param [Hash] opts the optional parameters
|
|
717
|
+
# @return [GetCompositionsBatchResponse]
|
|
718
|
+
describe 'get_compositions_batch test' do
|
|
719
|
+
it 'should work' do
|
|
720
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
721
|
+
end
|
|
722
|
+
end
|
|
723
|
+
|
|
724
|
+
# unit tests for get_invoices_by_partner_id
|
|
725
|
+
# List a partner's invoices
|
|
726
|
+
# Lists the invoices issued to a partner, newest first. Each carries the price (`subtotal`), the tax on it (`taxAmount`) and what is paid (`total`), its status as the payment provider reports it, why the last payment failed (`failureReason`), and the page where it is paid (`hostedInvoiceUrl`). A partner reads its own: the caller must be the person who administers the partner (an API key of that account works), and anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can read any partner's and see exactly what the partner sees; the full records, with the internal fields, are `getAllInvoices` filtered by partner. The page is always bounded: `limit` defaults to 50 and is capped at 100, `offset` defaults to 0.
|
|
727
|
+
# @param partner_id The partner whose invoices to list
|
|
728
|
+
# @param [Hash] opts the optional parameters
|
|
729
|
+
# @option opts [String] :status Only invoices with this status
|
|
730
|
+
# @option opts [Integer] :limit Maximum number of invoices to return
|
|
731
|
+
# @option opts [Integer] :offset Number of invoices to skip
|
|
732
|
+
# @return [GetInvoicesByPartnerId200Response]
|
|
733
|
+
describe 'get_invoices_by_partner_id test' do
|
|
734
|
+
it 'should work' do
|
|
735
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
736
|
+
end
|
|
737
|
+
end
|
|
738
|
+
|
|
739
|
+
# unit tests for get_managed_user_by_id
|
|
740
|
+
# Get Managed User By ID
|
|
741
|
+
# Retrieves a specific managed user by ID.
|
|
742
|
+
# @param id ID of the managed user to retrieve
|
|
743
|
+
# @param [Hash] opts the optional parameters
|
|
744
|
+
# @return [ManagedUserResponse]
|
|
745
|
+
describe 'get_managed_user_by_id test' do
|
|
746
|
+
it 'should work' do
|
|
747
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
748
|
+
end
|
|
749
|
+
end
|
|
750
|
+
|
|
751
|
+
# unit tests for get_managed_user_design_defaults
|
|
752
|
+
# Read design defaults for one managed user
|
|
753
|
+
# @param id
|
|
754
|
+
# @param [Hash] opts the optional parameters
|
|
755
|
+
# @return [GetPartnerDesignDefaults200Response]
|
|
756
|
+
describe 'get_managed_user_design_defaults test' do
|
|
757
|
+
it 'should work' do
|
|
758
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
759
|
+
end
|
|
760
|
+
end
|
|
761
|
+
|
|
762
|
+
# unit tests for get_managed_user_entitlements
|
|
763
|
+
# Get managed user entitlements
|
|
764
|
+
# Retrieves all entitlements for a managed user (admin or partner access).
|
|
765
|
+
# @param managed_user_id Managed user ID
|
|
766
|
+
# @param [Hash] opts the optional parameters
|
|
767
|
+
# @option opts [Boolean] :include_expired Include expired entitlements in results
|
|
768
|
+
# @option opts [String] :feature Filter by specific feature
|
|
769
|
+
# @option opts [String] :source Filter by entitlement source
|
|
770
|
+
# @return [GetManagedUserEntitlementsResponse]
|
|
771
|
+
describe 'get_managed_user_entitlements test' do
|
|
772
|
+
it 'should work' do
|
|
773
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
774
|
+
end
|
|
775
|
+
end
|
|
776
|
+
|
|
777
|
+
# unit tests for get_managed_user_limits
|
|
778
|
+
# Read monthly credit cap and usage for one managed user
|
|
779
|
+
# @param id
|
|
780
|
+
# @param [Hash] opts the optional parameters
|
|
781
|
+
# @return [GetManagedUserLimits200Response]
|
|
782
|
+
describe 'get_managed_user_limits test' do
|
|
783
|
+
it 'should work' do
|
|
784
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
785
|
+
end
|
|
786
|
+
end
|
|
787
|
+
|
|
788
|
+
# unit tests for get_managed_user_storage_usage
|
|
789
|
+
# Storage used by one managed user's uploads
|
|
790
|
+
# @param id
|
|
791
|
+
# @param [Hash] opts the optional parameters
|
|
792
|
+
# @return [GetManagedUserStorageUsage200Response]
|
|
793
|
+
describe 'get_managed_user_storage_usage test' do
|
|
794
|
+
it 'should work' do
|
|
795
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
796
|
+
end
|
|
797
|
+
end
|
|
798
|
+
|
|
799
|
+
# unit tests for get_managed_user_usage
|
|
800
|
+
# What a managed user's editor sessions spent
|
|
801
|
+
# Says how many credits the editor sessions of one of your managed users took from your account over a period, in total and for each operation. A generation costs one credit, taken from your account when it starts; one that fails is refunded and is counted as refunded, not as spent. Only what was spent through editor sessions is here, and only since usage was first recorded: what you spend with your API key, and anything from before, is not. Use it to see which of your users spend the most, or to charge them for it. To hold one session to a number of credits, set `max_credits` when you make it (`createManagedUserEditorSession`). The period runs from `startDate` (included) to `endDate` (not included): the 30 days before now when you give neither, and at most 366 days. A date without a time is midnight UTC at the start of that day, so for all of October give `startDate=2026-10-01` and `endDate=2026-11-01`.
|
|
802
|
+
# @param id The managed user whose usage you want (Widgetic's id for the user)
|
|
803
|
+
# @param [Hash] opts the optional parameters
|
|
804
|
+
# @option opts [String] :start_date Start of the period, included: an ISO 8601 date (`2026-10-01`) or date-time with its offset (`2026-10-01T08:00:00Z`). Default: 30 days before `endDate`.
|
|
805
|
+
# @option opts [String] :end_date End of the period, not included, in the same forms. Default: now. It must be after `startDate`, by at most 366 days.
|
|
806
|
+
# @return [ManagedUserUsageResponse]
|
|
807
|
+
describe 'get_managed_user_usage test' do
|
|
808
|
+
it 'should work' do
|
|
809
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
810
|
+
end
|
|
811
|
+
end
|
|
812
|
+
|
|
813
|
+
# unit tests for get_managed_users_by_manager_id
|
|
814
|
+
# Get Managed Users By Manager
|
|
815
|
+
# Retrieve managed users for a specific manager with pagination support.
|
|
816
|
+
# @param manager_id ID of the manager
|
|
817
|
+
# @param [Hash] opts the optional parameters
|
|
818
|
+
# @option opts [Integer] :page Page number for pagination
|
|
819
|
+
# @option opts [Integer] :size Number of items per page
|
|
820
|
+
# @option opts [String] :sort Sort field and direction, `<field>:<asc|desc>`. The field is `createdAt`, `updatedAt` or `externalId` (the snake_case spellings `created_at`, `updated_at` and `external_id` work too); `asc` or `desc` alone sorts by `createdAt`. Any other field is a 400.
|
|
821
|
+
# @return [GetManagedUsersByManagerIdResponse]
|
|
822
|
+
describe 'get_managed_users_by_manager_id test' do
|
|
823
|
+
it 'should work' do
|
|
824
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
825
|
+
end
|
|
826
|
+
end
|
|
827
|
+
|
|
828
|
+
# unit tests for get_my_partners
|
|
829
|
+
# Find the partner you administer
|
|
830
|
+
# Returns the partner (nearly always one) that the signed-in account administers, with the id every other partner route asks for and the standing it is in: `active`, `inactive` (not activated yet), `suspended` (paused, with the reason Widgetic gave) or `payment_arrears` (a contract invoice is past its due date and unpaid, since `overdueSince`; the partner is stopped until it is paid). A partner API key is that account's key, so it reads its own partner here. An account that administers no partner is not refused: it gets `standing: not_a_partner` and an empty list, so a dashboard can tell \"this is not a partner account\" from \"something failed\". The call stays open while the partner is paused, not yet active or in payment arrears: that is when its dashboard has to say why.
|
|
831
|
+
# @param [Hash] opts the optional parameters
|
|
832
|
+
# @return [MyPartnersResponse]
|
|
833
|
+
describe 'get_my_partners test' do
|
|
834
|
+
it 'should work' do
|
|
835
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
836
|
+
end
|
|
837
|
+
end
|
|
838
|
+
|
|
839
|
+
# unit tests for get_partner_adapter_connections
|
|
840
|
+
# See which adapter keys a partner has connected
|
|
841
|
+
# Widget adapters are capabilities a widget can use, and some of them act through a service the account that made the widget has with a provider: an adapter that sends email needs an email provider key, one that sends texts needs an SMS provider key. For the widgets of the customers a partner manages, those keys are the partner's. This lists every key an adapter takes from a partner and whether the partner has connected it. An empty list means no adapter takes a key from a partner at the moment. The list never contains a key: only whether one is connected and when it was last set. Connect a key with `setPartnerAdapterConnection`; take it away with `removePartnerAdapterConnection`. A managed customer never holds a key: the widgets of a managed customer use the partner's, and never the personal key of the person who administers the partner. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
|
|
842
|
+
# @param partner_id The partner whose adapter keys to list
|
|
843
|
+
# @param [Hash] opts the optional parameters
|
|
844
|
+
# @return [GetUserAdapterConnections200Response]
|
|
845
|
+
describe 'get_partner_adapter_connections test' do
|
|
846
|
+
it 'should work' do
|
|
847
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
848
|
+
end
|
|
849
|
+
end
|
|
850
|
+
|
|
851
|
+
# unit tests for get_partner_analytics_by_managed_user
|
|
852
|
+
# What each managed user's widgets did
|
|
853
|
+
# Lists every one of your managed users with what their widgets and compositions did in a period: views, interactions and visitors, and how many widgets and compositions they have made. A managed user whose widgets were not viewed is listed too, with zeros. The most viewed come first, and `page.hasMore` says whether more follow. Only the compositions made for a managed user count for it: file them under the user when you create them (`managedUserId` on `createComposition`), or let the user's editor session do it, which files everything under its user. What a visitor did with a composition that is not filed under anyone is in the summary of the whole account (`getPartnerAnalyticsSummary`) and in no managed user's row. The period works as it does for `getPartnerAnalyticsSummary`. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
|
|
854
|
+
# @param partner_id The partner whose managed users to report on
|
|
855
|
+
# @param [Hash] opts the optional parameters
|
|
856
|
+
# @option opts [String] :start_date Start of the period, included. An ISO 8601 date (`2026-10-01`) or date-time with its offset. Default 30 days before `endDate`.
|
|
857
|
+
# @option opts [String] :end_date End of the period, not included, in the same forms. Default now. At most 366 days after `startDate`.
|
|
858
|
+
# @option opts [Integer] :limit How many managed users to list at most
|
|
859
|
+
# @option opts [Integer] :offset How many managed users to skip
|
|
860
|
+
# @return [PartnerAnalyticsByManagedUserResponse]
|
|
861
|
+
describe 'get_partner_analytics_by_managed_user test' do
|
|
862
|
+
it 'should work' do
|
|
863
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
864
|
+
end
|
|
865
|
+
end
|
|
866
|
+
|
|
867
|
+
# unit tests for get_partner_analytics_summary
|
|
868
|
+
# What was done with a partner's published widgets
|
|
869
|
+
# Counts what the visitors of the compositions made through your account did in a period: how many times a composition was **viewed**, how many times a visitor **interacted** with one, and how many different visitors there were. It covers every composition of your account, your own and the ones made for your managed users; narrow it to one managed user with `managedUserId` or `managedUserExternalId` (not both). The numbers come from the events the embedded widgets send while they are shown (the Widgetic embed SDK sends them by itself), counted when you ask. Only views and interactions are counted; the events that describe a visit (its start, its end, the device and the referrer) are not. The period runs from `startDate` (included) to `endDate` (not included): the 30 days before now when you give neither, and at most 366 days. A date without a time is midnight UTC at the start of that day, so for all of October give `startDate=2026-10-01` and `endDate=2026-11-01`. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
|
|
870
|
+
# @param partner_id The partner whose widgets to report on
|
|
871
|
+
# @param [Hash] opts the optional parameters
|
|
872
|
+
# @option opts [String] :start_date Start of the period, included. An ISO 8601 date (`2026-10-01`) or date-time with its offset (`2026-10-01T08:00:00Z`). Default 30 days before `endDate`.
|
|
873
|
+
# @option opts [String] :end_date End of the period, not included, in the same forms. Default now. It must be after `startDate`, by at most 366 days.
|
|
874
|
+
# @option opts [String] :managed_user_id Report only on this managed user (Widgetic's id for the user). Send this or `managedUserExternalId`, not both.
|
|
875
|
+
# @option opts [String] :managed_user_external_id Report only on the managed user you registered with this `externalId` (your own identifier for the user). Send this or `managedUserId`, not both.
|
|
876
|
+
# @return [PartnerAnalyticsSummaryResponse]
|
|
877
|
+
describe 'get_partner_analytics_summary test' do
|
|
878
|
+
it 'should work' do
|
|
879
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
880
|
+
end
|
|
881
|
+
end
|
|
882
|
+
|
|
883
|
+
# unit tests for get_partner_analytics_timeline
|
|
884
|
+
# What was done with a partner's widgets, day by day
|
|
885
|
+
# Counts views, interactions and visitors for each day of a period (UTC days), oldest first, for a chart. Every day of the period is in the list, also one on which nothing happened (all zeros), so the list can be drawn as it is. Narrow it to one managed user with `managedUserId` or `managedUserExternalId` (not both). The period works as it does for `getPartnerAnalyticsSummary`; `startDate` and `endDate` are best given as dates, so that the first and the last day are whole days. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
|
|
886
|
+
# @param partner_id The partner whose widgets to report on
|
|
887
|
+
# @param [Hash] opts the optional parameters
|
|
888
|
+
# @option opts [String] :start_date Start of the period, included. An ISO 8601 date (`2026-10-01`) or date-time with its offset. Default 30 days before `endDate`.
|
|
889
|
+
# @option opts [String] :end_date End of the period, not included, in the same forms. Default now. At most 366 days after `startDate`.
|
|
890
|
+
# @option opts [String] :managed_user_id Report only on this managed user (Widgetic's id for the user). Send this or `managedUserExternalId`, not both.
|
|
891
|
+
# @option opts [String] :managed_user_external_id Report only on the managed user you registered with this `externalId`. Send this or `managedUserId`, not both.
|
|
892
|
+
# @return [PartnerAnalyticsTimelineResponse]
|
|
893
|
+
describe 'get_partner_analytics_timeline test' do
|
|
894
|
+
it 'should work' do
|
|
895
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
896
|
+
end
|
|
897
|
+
end
|
|
898
|
+
|
|
899
|
+
# unit tests for get_partner_analytics_top_widgets
|
|
900
|
+
# Which widgets were viewed the most
|
|
901
|
+
# Lists the widgets whose compositions were viewed the most in a period, with their views, interactions, visitors and how many of their compositions were viewed. A widget that nobody viewed or used is not listed. The most viewed come first (then the most used), and at most `limit` are listed. Narrow it to one managed user with `managedUserId` or `managedUserExternalId` (not both). The period works as it does for `getPartnerAnalyticsSummary`. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
|
|
902
|
+
# @param partner_id The partner whose widgets to report on
|
|
903
|
+
# @param [Hash] opts the optional parameters
|
|
904
|
+
# @option opts [String] :start_date Start of the period, included. An ISO 8601 date (`2026-10-01`) or date-time with its offset. Default 30 days before `endDate`.
|
|
905
|
+
# @option opts [String] :end_date End of the period, not included, in the same forms. Default now. At most 366 days after `startDate`.
|
|
906
|
+
# @option opts [String] :managed_user_id Report only on this managed user (Widgetic's id for the user). Send this or `managedUserExternalId`, not both.
|
|
907
|
+
# @option opts [String] :managed_user_external_id Report only on the managed user you registered with this `externalId`. Send this or `managedUserId`, not both.
|
|
908
|
+
# @option opts [Integer] :limit How many widgets to list at most
|
|
909
|
+
# @return [PartnerAnalyticsTopWidgetsResponse]
|
|
910
|
+
describe 'get_partner_analytics_top_widgets test' do
|
|
911
|
+
it 'should work' do
|
|
912
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
913
|
+
end
|
|
914
|
+
end
|
|
915
|
+
|
|
916
|
+
# unit tests for get_partner_billing_overview
|
|
917
|
+
# Get comprehensive partner billing overview
|
|
918
|
+
# Retrieves the partner's credits (`operationalCredits`), the partner's contract terms (`partnerCustomization`, the same fields as `getPartnerContract`) and billing integration status. Internal negotiation notes are not part of it. `operationalCredits` is the one account a partner has for its credits: the account of the person who administers it. It holds `balance` (the same balance `getPartnerCreditBalance` reads), `reservedBalance`, `availableBalance` (what a new operation can use) and `recentTransactions` (the ten newest entries of the ledger `getPartnerCreditTransactions` lists). A partner with no administrator has no account, and reads 0 and an empty list.
|
|
919
|
+
# @param partner_id Partner ID
|
|
920
|
+
# @param [Hash] opts the optional parameters
|
|
921
|
+
# @return [GetPartnerBillingOverview200Response]
|
|
922
|
+
describe 'get_partner_billing_overview test' do
|
|
923
|
+
it 'should work' do
|
|
924
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
925
|
+
end
|
|
926
|
+
end
|
|
927
|
+
|
|
928
|
+
# unit tests for get_partner_contract
|
|
929
|
+
# Get a partner's contract
|
|
930
|
+
# Returns the commercial terms agreed with the partner: price, included credits and storage, billing cycle, commitment, support level, and the dates the contract runs between. A partner reads its own: the caller must be the person who administers the partner (an API key of that account works), and anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can read any partner's. Responds 404 while no contract has been recorded for the partner, which is the case until Widgetic sets its terms.
|
|
931
|
+
# @param partner_id The partner whose contract to read
|
|
932
|
+
# @param [Hash] opts the optional parameters
|
|
933
|
+
# @return [PartnerContractResponse]
|
|
934
|
+
describe 'get_partner_contract test' do
|
|
935
|
+
it 'should work' do
|
|
936
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
937
|
+
end
|
|
938
|
+
end
|
|
939
|
+
|
|
940
|
+
# unit tests for get_partner_credit_balance
|
|
941
|
+
# Get partner credit balance
|
|
942
|
+
# Returns the credits the partner has, and how much of that is reserved by operations that are still running. A partner has ONE account for its credits: the account of the person who administers it, the same account its API key acts as. There is nothing else to create or to fund. What its customers' editor sessions and its own API calls spend comes out of that account, and the credits a paid invoice carries are added to it, so this is the same balance `getUserCreditBalance` reads for that person. A partner with no administrator has no account to hold credits, and reads a balance of 0. Access: the person who administers the partner, or a Widgetic administrator.
|
|
943
|
+
# @param partner_id Partner ID
|
|
944
|
+
# @param [Hash] opts the optional parameters
|
|
945
|
+
# @return [AccountCreditBalanceResponse]
|
|
946
|
+
describe 'get_partner_credit_balance test' do
|
|
947
|
+
it 'should work' do
|
|
948
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
949
|
+
end
|
|
950
|
+
end
|
|
951
|
+
|
|
952
|
+
# unit tests for get_partner_credit_transactions
|
|
953
|
+
# Get partner credit transaction history
|
|
954
|
+
# Lists what happened to the partner's credits, newest first: the entries of the credit ledger of the account of the person who administers it, the one account a partner has for its credits. Every operation that spends credits is a `debit` entry, and the credits an invoice carried arrive as `credit` entries when the invoice is paid, so this is also how the partner's usage is read. It is the same ledger `getUserCreditTransactions` reads for that person. A partner with no administrator has no account, and an empty ledger. The page is always bounded: `limit` defaults to 20 and is capped at 100, `offset` defaults to 0. Access: the person who administers the partner, or a Widgetic administrator.
|
|
955
|
+
# @param partner_id Partner ID
|
|
956
|
+
# @param [Hash] opts the optional parameters
|
|
957
|
+
# @option opts [Integer] :limit Number of transactions to return
|
|
958
|
+
# @option opts [Integer] :offset Number of transactions to skip
|
|
959
|
+
# @option opts [String] :type Only entries of this type, for instance `debit` for the credits spent. The types are listed on `AccountCreditTransaction`.
|
|
960
|
+
# @return [GetPartnerCreditTransactions200Response]
|
|
961
|
+
describe 'get_partner_credit_transactions test' do
|
|
962
|
+
it 'should work' do
|
|
963
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
964
|
+
end
|
|
965
|
+
end
|
|
966
|
+
|
|
967
|
+
# unit tests for get_partner_data_database
|
|
968
|
+
# See the Neon database a partner keeps the data of its compositions in
|
|
969
|
+
# Returns the database set with `setPartnerDataDatabase`, without its password: the host, the database and the role, when it last passed the check, and why the latest re-check failed if it did. Responds 404 while the partner has no database of its own, which means the data of its compositions is kept by Widgetic. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
|
|
970
|
+
# @param partner_id The partner whose database to read
|
|
971
|
+
# @param [Hash] opts the optional parameters
|
|
972
|
+
# @return [PartnerDataDatabaseResponse]
|
|
973
|
+
describe 'get_partner_data_database test' do
|
|
974
|
+
it 'should work' do
|
|
975
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
976
|
+
end
|
|
977
|
+
end
|
|
978
|
+
|
|
979
|
+
# unit tests for get_partner_design_defaults
|
|
980
|
+
# Read partner-wide design defaults
|
|
981
|
+
# @param partner_id
|
|
982
|
+
# @param [Hash] opts the optional parameters
|
|
983
|
+
# @return [GetPartnerDesignDefaults200Response]
|
|
984
|
+
describe 'get_partner_design_defaults test' do
|
|
985
|
+
it 'should work' do
|
|
986
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
987
|
+
end
|
|
988
|
+
end
|
|
989
|
+
|
|
990
|
+
# unit tests for get_partner_entitlements
|
|
991
|
+
# Get partner entitlements
|
|
992
|
+
# Retrieves all entitlements for a partner (admin or partner access).
|
|
993
|
+
# @param partner_id Partner ID
|
|
994
|
+
# @param [Hash] opts the optional parameters
|
|
995
|
+
# @option opts [Boolean] :include_expired Include expired entitlements in results
|
|
996
|
+
# @option opts [String] :feature Filter by specific feature
|
|
997
|
+
# @option opts [String] :source Filter by entitlement source
|
|
998
|
+
# @return [GetPartnerEntitlementsResponse]
|
|
999
|
+
describe 'get_partner_entitlements test' do
|
|
1000
|
+
it 'should work' do
|
|
1001
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1002
|
+
end
|
|
1003
|
+
end
|
|
1004
|
+
|
|
1005
|
+
# unit tests for get_partner_entry_context_signing
|
|
1006
|
+
# See how the context of your embeds is signed
|
|
1007
|
+
# Says whether you have a secret to sign the `context` of your embeds with, when it was made, whether the secret it replaced is still accepted, and whether an entry without a valid signature is refused (`required`). The secret itself is never part of the answer: it is shown once, when it is made (`rotatePartnerEntryContextSecret`, which also explains what signing is for and how to sign). Signing covers the entries written through the gateway into the compositions of your managed users and into those of your own account. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
|
|
1008
|
+
# @param partner_id The partner whose context signing to read
|
|
1009
|
+
# @param [Hash] opts the optional parameters
|
|
1010
|
+
# @return [PartnerEntryContextSigningResponse]
|
|
1011
|
+
describe 'get_partner_entry_context_signing test' do
|
|
1012
|
+
it 'should work' do
|
|
1013
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1014
|
+
end
|
|
1015
|
+
end
|
|
1016
|
+
|
|
1017
|
+
# unit tests for get_partner_notification_settings
|
|
1018
|
+
# Where your notifications go
|
|
1019
|
+
# Returns who gets the emails, which events you want by email and by webhook, the address of your webhook, and whether it has a secret to sign with. The secret itself is never returned: it is shown once, when it is made. `events` lists every kind of event there is, for a settings screen. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
|
|
1020
|
+
# @param partner_id The partner whose notification settings to read
|
|
1021
|
+
# @param [Hash] opts the optional parameters
|
|
1022
|
+
# @return [PartnerNotificationSettingsResponse]
|
|
1023
|
+
describe 'get_partner_notification_settings test' do
|
|
1024
|
+
it 'should work' do
|
|
1025
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1026
|
+
end
|
|
1027
|
+
end
|
|
1028
|
+
|
|
1029
|
+
# unit tests for get_partner_storage_destination
|
|
1030
|
+
# Get where a partner's uploaded files are stored
|
|
1031
|
+
# Returns the partner's storage destination without its secret: the endpoint, bucket, folder and public address, the last four characters of the access key id, when the destination last passed the check, and why the latest re-check failed if it did. Responds 404 while the partner has no destination, which means the partner cannot be activated, its uploads are refused, and no editor session is made for its customers until a destination is set. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
1032
|
+
# @param partner_id The partner whose storage destination to read
|
|
1033
|
+
# @param [Hash] opts the optional parameters
|
|
1034
|
+
# @return [PartnerStorageDestinationResponse]
|
|
1035
|
+
describe 'get_partner_storage_destination test' do
|
|
1036
|
+
it 'should work' do
|
|
1037
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1038
|
+
end
|
|
1039
|
+
end
|
|
1040
|
+
|
|
1041
|
+
# unit tests for get_partner_storage_usage
|
|
1042
|
+
# What a partner's customers store
|
|
1043
|
+
# Says how many files, and how many bytes, your account keeps, in total and for each of your managed users, and how much of it is in Widgetic's storage and how much in your own storage destination (`setPartnerStorageDestination`). Use it to see which customers store the most, or to charge them for it. A file is counted for a managed user when it was filed under that user: by naming `managed_user_id` or `managed_user_external_id` when you upload it (`uploadsPost`, or the metadata of a resumable upload), or because it was uploaded through that user's editor session, which files everything under its user. The files that are not filed under anyone (your own, and the ones uploaded without naming a managed user) are the row whose `managedUserId` is null. Deleted files are not counted. To list the files of one managed user, use the `managed_user_id` filter of `uploadsGet`. The answer is counted when you ask, so it is always current. The groups are ordered by size, the heaviest first, and `page.hasMore` says whether more follow. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
|
|
1044
|
+
# @param partner_id The partner whose storage to report on
|
|
1045
|
+
# @param [Hash] opts the optional parameters
|
|
1046
|
+
# @option opts [Integer] :limit How many managed users to list at most
|
|
1047
|
+
# @option opts [Integer] :offset How many managed users to skip
|
|
1048
|
+
# @return [PartnerStorageUsageResponse]
|
|
1049
|
+
describe 'get_partner_storage_usage test' do
|
|
1050
|
+
it 'should work' do
|
|
1051
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1052
|
+
end
|
|
1053
|
+
end
|
|
1054
|
+
|
|
1055
|
+
# unit tests for get_personal_workspace_domains
|
|
1056
|
+
# List the websites allowed to show your widgets
|
|
1057
|
+
# Lists the websites on an account's own list, newest first. It is the list Widgetic checks when a widget of the account is embedded: when it holds at least one website, the widget is shown on those websites (and on Widgetic's own) and nowhere else; when it is empty, the widget can be shown anywhere. If the account administers a partner, the websites set on the partner record by Widgetic are added to them. Widgets that belong to an organization use the organization's list instead. The answer holds the whole list, however long it is: a partner's list has no limit.
|
|
1058
|
+
# @param id The account the list belongs to. For your own, your own user id
|
|
1059
|
+
# @param [Hash] opts the optional parameters
|
|
1060
|
+
# @return [GetPersonalWorkspaceDomains200Response]
|
|
1061
|
+
describe 'get_personal_workspace_domains test' do
|
|
1062
|
+
it 'should work' do
|
|
1063
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1064
|
+
end
|
|
1065
|
+
end
|
|
1066
|
+
|
|
1067
|
+
# unit tests for get_public_composition_embed
|
|
1068
|
+
# Resolve a composition UUID to a published widget URL
|
|
1069
|
+
# Public customer embed lookup. No API key. Used by embed-sdk.js on third-party sites. If the composition's owner listed the websites it may appear on (the workspace's domain list, or the `allowedDomains` of a partner the owner administers), a request from any other website is refused with 403 `DOMAIN_NOT_ALLOWED`. The website is read from the `Origin` header, or the host of `Referer` when there is no `Origin`; a request that names neither (a server, a tool) is not refused. An owner who listed nothing is not restricted, and a page on the visitor's own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed. So is the website where a partner integrates Widgetic, with every subdomain of it (`platformDomain` in the answer of `GET /partners/mine`), for the widgets of that partner: a partner's list never has to name it. The list stops other websites from showing the embed in a visitor's browser; it does not hide the published content from someone who holds the composition ID. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **Limit.** 500 calls for each visitor address and browser in one counting window, shared with the frame and the status routes. Over it the answer is 429 `RATE_LIMITED` with a `Retry-After` header.
|
|
1070
|
+
# @param composition_id
|
|
1071
|
+
# @param [Hash] opts the optional parameters
|
|
1072
|
+
# @return [GetPublicCompositionEmbed200Response]
|
|
1073
|
+
describe 'get_public_composition_embed test' do
|
|
1074
|
+
it 'should work' do
|
|
1075
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1076
|
+
end
|
|
1077
|
+
end
|
|
1078
|
+
|
|
1079
|
+
# unit tests for get_public_composition_iframe
|
|
1080
|
+
# Embed a published composition with its saved values
|
|
1081
|
+
# Public HTML wrapper with an inner published artifact iframe. No API key or SDK required. If the composition's owner listed the websites it may appear on, the page is sent with `Content-Security-Policy: frame-ancestors` naming those websites (and Widgetic's own, and the website where the partner the owner administers integrates Widgetic, with its subdomains), so a browser refuses to show it inside any other website whatever `Referer` policy that website uses. Opening the address directly still works. An owner who listed nothing is not restricted. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/frame`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag.
|
|
1082
|
+
# @param composition_id
|
|
1083
|
+
# @param [Hash] opts the optional parameters
|
|
1084
|
+
# @return [String]
|
|
1085
|
+
describe 'get_public_composition_iframe test' do
|
|
1086
|
+
it 'should work' do
|
|
1087
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1088
|
+
end
|
|
1089
|
+
end
|
|
1090
|
+
|
|
1091
|
+
# unit tests for get_user_adapter_connections
|
|
1092
|
+
# See which adapter keys an account has connected
|
|
1093
|
+
# Widget adapters are capabilities a widget can use, and some of them act through a service the owner has an account with: an adapter that sends email needs the owner's email provider key, one that sends texts needs the owner's SMS provider key. This lists every key an adapter takes from an owner and whether this account has connected it, so a settings page can show what is missing. An empty list means no adapter takes a key from an owner at the moment. The list never contains a key: only whether one is connected and when it was last set. Connect a key with `setUserAdapterConnection`; take it away with `removeUserAdapterConnection`. The widgets of customers a partner manages use the partner's keys instead (`getPartnerAdapterConnections`). The caller must be the account itself (an API key of that account works, with the `account:read` scope), or a Widgetic administrator.
|
|
1094
|
+
# @param user_id The account whose adapter keys to list. For your own, your own user id
|
|
1095
|
+
# @param [Hash] opts the optional parameters
|
|
1096
|
+
# @return [GetUserAdapterConnections200Response]
|
|
1097
|
+
describe 'get_user_adapter_connections test' do
|
|
1098
|
+
it 'should work' do
|
|
1099
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1100
|
+
end
|
|
1101
|
+
end
|
|
1102
|
+
|
|
1103
|
+
# unit tests for get_user_api_key_usage_logs
|
|
1104
|
+
# Read what an API key was used for
|
|
1105
|
+
# Lists the calls made with one key, newest first: when, which path and method, and the status each ended with. Use it to see whether a key is still in use before deleting it, or to see what a key that should not be in use has been doing.
|
|
1106
|
+
# @param id The account the key belongs to
|
|
1107
|
+
# @param key_id The `keyId` of the key, as the list shows it
|
|
1108
|
+
# @param [Hash] opts the optional parameters
|
|
1109
|
+
# @option opts [Integer] :limit How many calls to return, newest first
|
|
1110
|
+
# @return [GetUserApiKeyUsageLogsResponse]
|
|
1111
|
+
describe 'get_user_api_key_usage_logs test' do
|
|
1112
|
+
it 'should work' do
|
|
1113
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1114
|
+
end
|
|
1115
|
+
end
|
|
1116
|
+
|
|
1117
|
+
# unit tests for get_user_api_keys
|
|
1118
|
+
# List the API keys of an account
|
|
1119
|
+
# Lists the API keys of an account, in the order they were made: name, the first characters of the key, when it was made, when it expires, when it was last used, whether it is switched on and what it is limited to (`scopes` and `preset`). The secret of a key is never part of the list. A caller can list its own account's keys; Widgetic staff can list any account's.
|
|
1120
|
+
# @param id The account the keys belong to. For your own keys, your own user id
|
|
1121
|
+
# @param [Hash] opts the optional parameters
|
|
1122
|
+
# @return [GetUserApiKeys200Response]
|
|
1123
|
+
describe 'get_user_api_keys test' do
|
|
1124
|
+
it 'should work' do
|
|
1125
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1126
|
+
end
|
|
1127
|
+
end
|
|
1128
|
+
|
|
1129
|
+
# unit tests for get_user_credit_balance
|
|
1130
|
+
# Get an account's credit balance
|
|
1131
|
+
# Returns the credits an account holds: the balance, and how much of it is reserved by operations that are still running. An account reads its own balance; with a partner's API key, that is the account of the person who administers the partner. Widgetic administrators can read any account's. An account that has never held credits reads a balance of 0. `getPartnerCreditBalance` reads this same balance by partner id.
|
|
1132
|
+
# @param user_id The account whose balance to read
|
|
1133
|
+
# @param [Hash] opts the optional parameters
|
|
1134
|
+
# @return [AccountCreditBalanceResponse]
|
|
1135
|
+
describe 'get_user_credit_balance test' do
|
|
1136
|
+
it 'should work' do
|
|
1137
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1138
|
+
end
|
|
1139
|
+
end
|
|
1140
|
+
|
|
1141
|
+
# unit tests for get_user_credit_transactions
|
|
1142
|
+
# List an account's credit ledger
|
|
1143
|
+
# Lists the entries of an account's credit ledger, newest first. This is also how an account's usage is read: every operation that spends credits is a `debit` entry, so summing the `debit` entries over a period gives the credits consumed in it, and the other types give what was added. An account reads its own ledger; with a partner's API key, that is the account of the person who administers the partner. Widgetic administrators can read any account's. `getPartnerCreditTransactions` reads this same ledger by partner id. The page is always bounded: `limit` defaults to 100 and is capped at 500, `offset` defaults to 0.
|
|
1144
|
+
# @param user_id The account whose ledger to read
|
|
1145
|
+
# @param [Hash] opts the optional parameters
|
|
1146
|
+
# @option opts [String] :transaction_type Only entries of this type, for instance `debit` for the credits spent. The types are listed on `AccountCreditTransaction`.
|
|
1147
|
+
# @option opts [Integer] :limit Maximum number of entries to return
|
|
1148
|
+
# @option opts [Integer] :offset Number of entries to skip
|
|
1149
|
+
# @return [GetPartnerCreditTransactions200Response]
|
|
1150
|
+
describe 'get_user_credit_transactions test' do
|
|
1151
|
+
it 'should work' do
|
|
1152
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1153
|
+
end
|
|
1154
|
+
end
|
|
1155
|
+
|
|
1156
|
+
# unit tests for get_widgets
|
|
1157
|
+
# List Widgets
|
|
1158
|
+
# Lists the widgets your account owns, newest first. A widget is the reusable piece a composition is made from; this is your own library, not a catalogue of Widgetic's widgets. Pass `page` (counting from 1) and `size` (1 to 100, 20 when left out) to read the list one page at a time. `meta` then carries `total`, `hasNextPage` and `hasPreviousPage`, so a client can walk the list to its end. A page past the end is an empty list. Without `page` and `size` the call returns the whole list in one response, which only suits an account with a few widgets. Pass `canvasId` to list only the widgets on one of your canvases. That list is always returned whole, whatever `page` and `size` say. Pass `managedUserId` (Widgetic's id for one of your managed users) or `managedUserExternalId` (your own identifier for the user) to list only the widgets made for that managed user. The widgets of your other managed users, and your own, are left out. It combines with `page`, `size` and `canvasId`. A managed user that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`.
|
|
1159
|
+
# @param [Hash] opts the optional parameters
|
|
1160
|
+
# @option opts [Integer] :page Page to return, counting from 1. Giving `page` or `size` turns paging on.
|
|
1161
|
+
# @option opts [Integer] :size How many widgets a page holds (20 when `page` is given without it). Giving `page` or `size` turns paging on.
|
|
1162
|
+
# @option opts [String] :canvas_id List only the widgets on this canvas. The list is returned whole.
|
|
1163
|
+
# @option opts [String] :managed_user_id List only the widgets made for this managed user (Widgetic's id for the user). Send this or `managedUserExternalId`, not both.
|
|
1164
|
+
# @option opts [String] :managed_user_external_id List only the widgets made for the managed user you registered with this `externalId` (your own identifier for the user). Send this or `managedUserId`, not both.
|
|
1165
|
+
# @return [GetWidgets200Response]
|
|
1166
|
+
describe 'get_widgets test' do
|
|
1167
|
+
it 'should work' do
|
|
1168
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1169
|
+
end
|
|
1170
|
+
end
|
|
1171
|
+
|
|
1172
|
+
# unit tests for get_widgets_batch
|
|
1173
|
+
# Get Widgets Batch
|
|
1174
|
+
# Retrieves multiple widgets by their IDs in a single request. An id that is not found, or that is not yours, is reported in `errors` exactly like one that does not exist. Called with an editor session, only the widgets made for the session's managed user are returned.
|
|
1175
|
+
# @param get_widgets_batch_request
|
|
1176
|
+
# @param [Hash] opts the optional parameters
|
|
1177
|
+
# @return [GetWidgetsBatchResponse]
|
|
1178
|
+
describe 'get_widgets_batch test' do
|
|
1179
|
+
it 'should work' do
|
|
1180
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1181
|
+
end
|
|
1182
|
+
end
|
|
1183
|
+
|
|
1184
|
+
# unit tests for list_composition_entry_items
|
|
1185
|
+
# List composition entry items with paging and filters
|
|
1186
|
+
# Reads one widget table with cursor paging (time then id in byte order), optional since/until on the time column, and up to five context filters plus ten column filters. Rate limit 120 requests per minute. Each read batch uses a 5 s statement timeout.
|
|
1187
|
+
# @param id
|
|
1188
|
+
# @param table
|
|
1189
|
+
# @param [Hash] opts the optional parameters
|
|
1190
|
+
# @option opts [Integer] :limit
|
|
1191
|
+
# @option opts [String] :order `desc` (the default) lists the newest entry first, `asc` the oldest. Entries are sorted by their time, then by their id (compared as text, byte by byte) in the same direction, so the order of two entries made at the same instant is always the same; an entry with no time counts as the oldest. A table with no time column is sorted by its id. The managed-user feed sorts by time, then by composition id, table and id.
|
|
1192
|
+
# @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`.
|
|
1193
|
+
# @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`).
|
|
1194
|
+
# @option opts [String] :cursor
|
|
1195
|
+
# @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.
|
|
1196
|
+
# @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`.
|
|
1197
|
+
# @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.
|
|
1198
|
+
# @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.
|
|
1199
|
+
# @return [CompositionEntryItemsPageSuccess]
|
|
1200
|
+
describe 'list_composition_entry_items test' do
|
|
1201
|
+
it 'should work' do
|
|
1202
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1203
|
+
end
|
|
1204
|
+
end
|
|
1205
|
+
|
|
1206
|
+
# unit tests for list_managed_user_entries
|
|
1207
|
+
# List entries across a managed user's compositions
|
|
1208
|
+
# Merges eligible tables (time and id columns) across the managed user's compositions in global time order, then compositionId, table, and id (byte order). Only tables with both a time and an id column take part. Rate limit 30 requests per minute.
|
|
1209
|
+
# @param id
|
|
1210
|
+
# @param [Hash] opts the optional parameters
|
|
1211
|
+
# @option opts [String] :composition_id
|
|
1212
|
+
# @option opts [String] :table
|
|
1213
|
+
# @option opts [Integer] :limit
|
|
1214
|
+
# @option opts [String] :order `desc` (the default) lists the newest entry first, `asc` the oldest. Entries are sorted by their time, then by their id (compared as text, byte by byte) in the same direction, so the order of two entries made at the same instant is always the same; an entry with no time counts as the oldest. A table with no time column is sorted by its id. The managed-user feed sorts by time, then by composition id, table and id.
|
|
1215
|
+
# @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`.
|
|
1216
|
+
# @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`).
|
|
1217
|
+
# @option opts [String] :cursor
|
|
1218
|
+
# @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.
|
|
1219
|
+
# @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`.
|
|
1220
|
+
# @return [ManagedUserEntriesPageSuccess]
|
|
1221
|
+
describe 'list_managed_user_entries test' do
|
|
1222
|
+
it 'should work' do
|
|
1223
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1224
|
+
end
|
|
1225
|
+
end
|
|
1226
|
+
|
|
1227
|
+
# unit tests for list_partner_notification_deliveries
|
|
1228
|
+
# How your notifications reached you
|
|
1229
|
+
# Lists the sends of your notifications, the newest first: each email to one address and each call to your webhook, with whether it was delivered, when it is tried again if not, how many attempts it had, and why the last one failed. Use it to find out why a webhook of yours did not receive an event. An email counts as delivered when it was handed to the mail service; a call to your webhook counts as delivered when your endpoint answered with a 2xx status. Anything else is tried again, after 1 minute, then 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours and a day, eight attempts in all, because your address is read again at each attempt and you may have mended it. Two answers end the delivery at once: `410 Gone` and `413 Payload Too Large`. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
|
|
1230
|
+
# @param partner_id The partner whose deliveries to list
|
|
1231
|
+
# @param [Hash] opts the optional parameters
|
|
1232
|
+
# @option opts [Integer] :limit How many deliveries to list at most
|
|
1233
|
+
# @return [PartnerNotificationDeliveryLogResponse]
|
|
1234
|
+
describe 'list_partner_notification_deliveries test' do
|
|
1235
|
+
it 'should work' do
|
|
1236
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1237
|
+
end
|
|
1238
|
+
end
|
|
1239
|
+
|
|
1240
|
+
# unit tests for list_partner_notifications
|
|
1241
|
+
# What your partner account was told
|
|
1242
|
+
# Lists the notifications of a partner, the newest first: the invoices Widgetic issued and their payments, the reminders to pay them, a warning when your credits run low, and the changes to the standing of the account (activated, paused, resumed). It is the same list your dashboard shows, and each entry is what your webhook receives as `data` when you have one (`updatePartnerNotificationSettings`). A page holds `limit` notifications (20 by default, at most 100). When there are older ones `nextBefore` is set: ask again with it as `before` to get the next page. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
|
|
1243
|
+
# @param partner_id The partner whose notifications to list
|
|
1244
|
+
# @param [Hash] opts the optional parameters
|
|
1245
|
+
# @option opts [Integer] :limit How many notifications to list at most
|
|
1246
|
+
# @option opts [Time] :before Only the notifications made before this moment. Give the `nextBefore` of the previous page.
|
|
1247
|
+
# @return [PartnerNotificationPageResponse]
|
|
1248
|
+
describe 'list_partner_notifications test' do
|
|
1249
|
+
it 'should work' do
|
|
1250
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1251
|
+
end
|
|
1252
|
+
end
|
|
1253
|
+
|
|
1254
|
+
# unit tests for list_partner_presets
|
|
1255
|
+
# List the widgets a partner offers as presets
|
|
1256
|
+
# Returns the partner's presets, ordered by `position` and then by `key`: the widgets it offers its managed users as starting points. The list is the same for every managed user. Use a preset in one of two ways: - **Make a composition of it** (the content and design editor): call `createComposition` with the preset's `widgetId` and the managed user. The widget itself stays yours; a composition is the user's own content. - **Give the user a copy to build on** (the widget creator): call `copyPresetForManagedUser`. The user gets a widget and a canvas of their own. Presets are not the same as the widgets Widgetic puts on every new Widgetic account. Those are chosen by Widgetic and are copied at sign-up. A preset here is yours, and is copied only when you ask. The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator.
|
|
1257
|
+
# @param partner_id The partner whose presets to list
|
|
1258
|
+
# @param [Hash] opts the optional parameters
|
|
1259
|
+
# @return [ListPartnerPresets200Response]
|
|
1260
|
+
describe 'list_partner_presets test' do
|
|
1261
|
+
it 'should work' do
|
|
1262
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1263
|
+
end
|
|
1264
|
+
end
|
|
1265
|
+
|
|
1266
|
+
# unit tests for operations_id_get
|
|
1267
|
+
# Get operation status
|
|
1268
|
+
# Follows work that carries on after the response that started it. Duplicating a composition, for one, answers 202 with an `operationId`: ask for that operation until its `status` is `completed` (or `failed`, with the reason in `error`). A finished duplication names the new composition in `metadata.newCompositionId`. An operation belongs to the user who started it. Asking for somebody else's operation answers 404, exactly as for one that does not exist. Administrators may read any operation.
|
|
1269
|
+
# @param id Operation identifier returned when the job was created.
|
|
1270
|
+
# @param [Hash] opts the optional parameters
|
|
1271
|
+
# @return [OperationsIdGetResponse]
|
|
1272
|
+
describe 'operations_id_get test' do
|
|
1273
|
+
it 'should work' do
|
|
1274
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1275
|
+
end
|
|
1276
|
+
end
|
|
1277
|
+
|
|
1278
|
+
# unit tests for patch_composition_content_item
|
|
1279
|
+
# Update a content list item
|
|
1280
|
+
# @param id
|
|
1281
|
+
# @param list
|
|
1282
|
+
# @param item_id
|
|
1283
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
1284
|
+
# @param request_body
|
|
1285
|
+
# @param [Hash] opts the optional parameters
|
|
1286
|
+
# @option opts [String] :if_match
|
|
1287
|
+
# @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.
|
|
1288
|
+
# @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.
|
|
1289
|
+
# @return [CreateCompositionContentItem201Response]
|
|
1290
|
+
describe 'patch_composition_content_item test' do
|
|
1291
|
+
it 'should work' do
|
|
1292
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1293
|
+
end
|
|
1294
|
+
end
|
|
1295
|
+
|
|
1296
|
+
# unit tests for post_public_composition_embed_status
|
|
1297
|
+
# Batch-check whether compositions are currently served for embed
|
|
1298
|
+
# Public batch health check for embed-sdk.js. No API key. Uses the same serving gate and domain policy as `GET /embed/compositions/{compositionId}`: the caller's website is read from `Origin`, or the host of `Referer` when there is no `Origin`. A request that names neither (a server or tool) is not refused for domain reasons. **Address.** `https://api.widgetic.com/embed/compositions/status`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **Limit.** The route counts against the same limit as the lookup and the frame routes: 500 calls for each visitor address and browser in one counting window. A call is ONE hit whatever the number of `ids` it carries (up to 100), so a server that checks many compositions spends one call for each hundred of them. A visitor who is over the limit gets 429 `RATE_LIMITED` for the WHOLE call, with a `Retry-After` header and no state for any id: there is no per-composition rate-limit state in the answer.
|
|
1299
|
+
# @param post_public_composition_embed_status_request
|
|
1300
|
+
# @param [Hash] opts the optional parameters
|
|
1301
|
+
# @return [PostPublicCompositionEmbedStatus200Response]
|
|
1302
|
+
describe 'post_public_composition_embed_status test' do
|
|
1303
|
+
it 'should work' do
|
|
1304
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1305
|
+
end
|
|
1306
|
+
end
|
|
1307
|
+
|
|
1308
|
+
# unit tests for read_composition_entries
|
|
1309
|
+
# Read the Entries of a Composition's Table
|
|
1310
|
+
# 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.
|
|
1311
|
+
# @param id ID of the composition
|
|
1312
|
+
# @param table The table to read, exactly as `describeCompositionEntries` lists it
|
|
1313
|
+
# @param [Hash] opts the optional parameters
|
|
1314
|
+
# @option opts [String] :group_by A column of the table to count entries per value of
|
|
1315
|
+
# @option opts [Integer] :rows How many of the newest entries to return (0 returns counts and tallies only)
|
|
1316
|
+
# @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`.
|
|
1317
|
+
# @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`.
|
|
1318
|
+
# @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`.
|
|
1319
|
+
# @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`).
|
|
1320
|
+
# @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.
|
|
1321
|
+
# @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`.
|
|
1322
|
+
# @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.
|
|
1323
|
+
# @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.
|
|
1324
|
+
# @return [CompositionEntriesReadingResponse]
|
|
1325
|
+
describe 'read_composition_entries test' do
|
|
1326
|
+
it 'should work' do
|
|
1327
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1328
|
+
end
|
|
1329
|
+
end
|
|
1330
|
+
|
|
1331
|
+
# unit tests for remove_ai_answers_knowledge_document
|
|
1332
|
+
# Remove a document from a widget's knowledge base
|
|
1333
|
+
# 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.
|
|
1334
|
+
# @param id The widget (composition) the document is in
|
|
1335
|
+
# @param document_id The document to remove
|
|
1336
|
+
# @param [Hash] opts the optional parameters
|
|
1337
|
+
# @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.
|
|
1338
|
+
# @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.
|
|
1339
|
+
# @return [RemoveAiAnswersKnowledgeDocument200Response]
|
|
1340
|
+
describe 'remove_ai_answers_knowledge_document test' do
|
|
1341
|
+
it 'should work' do
|
|
1342
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1343
|
+
end
|
|
1344
|
+
end
|
|
1345
|
+
|
|
1346
|
+
# unit tests for remove_partner_adapter_connection
|
|
1347
|
+
# Remove an adapter key from a partner
|
|
1348
|
+
# Removes a key an adapter was given. The adapter stops working for the widgets of the partner's customers that need it: their visitors are told the feature is unavailable. Nothing else of the widgets changes, and connecting a key again brings them back. Removing a key that is not connected answers 200 with `removed: false`: the state asked for is the state it is in. A key of an adapter that has since been retired from the catalog can still be removed. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
1349
|
+
# @param partner_id The partner that keeps the key
|
|
1350
|
+
# @param adapter_id The adapter the key is for
|
|
1351
|
+
# @param credential_key The key's name within the adapter
|
|
1352
|
+
# @param [Hash] opts the optional parameters
|
|
1353
|
+
# @return [RemoveUserAdapterConnection200Response]
|
|
1354
|
+
describe 'remove_partner_adapter_connection test' do
|
|
1355
|
+
it 'should work' do
|
|
1356
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1357
|
+
end
|
|
1358
|
+
end
|
|
1359
|
+
|
|
1360
|
+
# unit tests for remove_partner_data_database
|
|
1361
|
+
# Stop keeping the data of a partner's compositions in its own database
|
|
1362
|
+
# Removes the partner's database from Widgetic: Widgetic forgets the connection string, and from then on the data of the partner's compositions is kept in Widgetic's database again. Nothing in your database is deleted. Removing is refused with 409 `PARTNER_DATABASE_HOLDS_DATA` while any composition of the partner keeps its data in your database: it would read as empty from then on, and what it holds would stay where nothing reads it. Delete the compositions you no longer need, or keep the database. If Widgetic cannot check what your database holds (it cannot be reached) the answer is 503 `PARTNER_DATABASE_UNAVAILABLE`; check it with `verifyPartnerDataDatabase`, or set the same database again to repair its connection. Removing a database the partner does not have is not an error: the answer is `removed: false`. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
1363
|
+
# @param partner_id The partner whose database to remove
|
|
1364
|
+
# @param [Hash] opts the optional parameters
|
|
1365
|
+
# @return [PartnerDataDatabaseRemovalResponse]
|
|
1366
|
+
describe 'remove_partner_data_database test' do
|
|
1367
|
+
it 'should work' do
|
|
1368
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1369
|
+
end
|
|
1370
|
+
end
|
|
1371
|
+
|
|
1372
|
+
# unit tests for remove_partner_preset
|
|
1373
|
+
# Take a widget off the partner's presets
|
|
1374
|
+
# Removes the preset under `key`. The widget itself is not touched, and neither are the copies and the compositions already made from it. Removing a preset the partner does not have is not an error: the answer is `removed: false`.
|
|
1375
|
+
# @param partner_id The partner whose preset to remove
|
|
1376
|
+
# @param key The key of the preset to remove
|
|
1377
|
+
# @param [Hash] opts the optional parameters
|
|
1378
|
+
# @return [PartnerPresetRemovalResponse]
|
|
1379
|
+
describe 'remove_partner_preset test' do
|
|
1380
|
+
it 'should work' do
|
|
1381
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1382
|
+
end
|
|
1383
|
+
end
|
|
1384
|
+
|
|
1385
|
+
# unit tests for remove_partner_storage_destination
|
|
1386
|
+
# Stop storing a partner's uploaded files in its own bucket
|
|
1387
|
+
# Removes the partner's storage destination. Partner storage is not optional, so after this every upload of the account, on any route, and the uploads of your customers' editor sessions are refused (409 `PARTNER_STORAGE_REQUIRED`) until a destination is set again, and no editor session can be made. Files already in the partner's bucket are not touched and are not moved: they stay where they are, at the addresses they were given. Removing a destination the partner does not have is not an error: the answer is `removed: false`. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
1388
|
+
# @param partner_id The partner whose storage destination to remove
|
|
1389
|
+
# @param [Hash] opts the optional parameters
|
|
1390
|
+
# @return [PartnerStorageRemovalResponse]
|
|
1391
|
+
describe 'remove_partner_storage_destination test' do
|
|
1392
|
+
it 'should work' do
|
|
1393
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1394
|
+
end
|
|
1395
|
+
end
|
|
1396
|
+
|
|
1397
|
+
# unit tests for remove_user_adapter_connection
|
|
1398
|
+
# Remove an adapter key from an account
|
|
1399
|
+
# Removes a key an adapter was given. The adapter stops working for the widgets that need it: their visitors are told the feature is unavailable. Nothing else of the widgets changes, and connecting a key again brings them back. Removing a key that is not connected answers 200 with `removed: false`: the state asked for is the state it is in. A key of an adapter that has since been retired from the catalog can still be removed. This needs an API key with full access. The caller must be the account itself or a Widgetic administrator.
|
|
1400
|
+
# @param user_id The account that keeps the key. For your own, your own user id
|
|
1401
|
+
# @param adapter_id The adapter the key is for
|
|
1402
|
+
# @param credential_key The key's name within the adapter
|
|
1403
|
+
# @param [Hash] opts the optional parameters
|
|
1404
|
+
# @return [RemoveUserAdapterConnection200Response]
|
|
1405
|
+
describe 'remove_user_adapter_connection test' do
|
|
1406
|
+
it 'should work' do
|
|
1407
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1408
|
+
end
|
|
1409
|
+
end
|
|
1410
|
+
|
|
1411
|
+
# unit tests for replay_partner_notification_delivery
|
|
1412
|
+
# Send a webhook delivery again
|
|
1413
|
+
# Sends one earlier **webhook** delivery again to your **current** webhook address, with the same event `id` (`webhook-id`) as the original notification so a receiver that remembers ids can ignore a duplicate, and a new `createdAt` and signature made with your current secret. The attempt is recorded in the delivery log as a new row that points at the delivery you replayed. Set a webhook address (and secret) under notification settings before you replay. Changing the settings needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
1414
|
+
# @param partner_id The partner whose delivery to replay
|
|
1415
|
+
# @param delivery_id The delivery to send again (must be a webhook delivery of this partner)
|
|
1416
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
1417
|
+
# @param [Hash] opts the optional parameters
|
|
1418
|
+
# @return [PartnerNotificationDeliveryResponse]
|
|
1419
|
+
describe 'replay_partner_notification_delivery test' do
|
|
1420
|
+
it 'should work' do
|
|
1421
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1422
|
+
end
|
|
1423
|
+
end
|
|
1424
|
+
|
|
1425
|
+
# unit tests for revoke_managed_user_editor_session
|
|
1426
|
+
# End one editor session of a managed user
|
|
1427
|
+
# Ends the session at once: its token stops working on the next request (on another server of ours, within a few seconds). Ending a session that has already ended is fine.
|
|
1428
|
+
# @param id The managed user the session is for
|
|
1429
|
+
# @param session_id The `sessionId` of the session, from `createManagedUserEditorSession`
|
|
1430
|
+
# @param [Hash] opts the optional parameters
|
|
1431
|
+
# @return [DeleteManagedUser200Response]
|
|
1432
|
+
describe 'revoke_managed_user_editor_session test' do
|
|
1433
|
+
it 'should work' do
|
|
1434
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1435
|
+
end
|
|
1436
|
+
end
|
|
1437
|
+
|
|
1438
|
+
# unit tests for revoke_managed_user_editor_sessions
|
|
1439
|
+
# End every editor session of a managed user
|
|
1440
|
+
# Ends all of the managed user's live editor sessions at once, for example when the user signs out of your platform. Their tokens stop working on the next request (on another server of ours, within a few seconds). It is fine to call it for a user who has none.
|
|
1441
|
+
# @param id The managed user whose sessions end
|
|
1442
|
+
# @param [Hash] opts the optional parameters
|
|
1443
|
+
# @return [RevokeManagedUserEditorSessionsResponse]
|
|
1444
|
+
describe 'revoke_managed_user_editor_sessions test' do
|
|
1445
|
+
it 'should work' do
|
|
1446
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1447
|
+
end
|
|
1448
|
+
end
|
|
1449
|
+
|
|
1450
|
+
# unit tests for rotate_partner_entry_context_secret
|
|
1451
|
+
# Make a secret to sign the context of your embeds
|
|
1452
|
+
# Makes a secret to sign the `context` of your embeds with, and returns it in `secret`: **keep it now, it is shown once** and cannot be read again. Keep it on your server only: whoever holds it can write contexts your compositions accept. Call this again to make a new secret; the one it replaces is still accepted for a day, so that your server can switch without an entry being refused (making another within that day ends the overlap with the first). **What signing is for.** `<widgetic composition-id=\"...\" context='{\"customerId\":\"c_42\"}'>` hands attribution to a widget, which sends it with every entry it saves. The page is yours but the browser is the visitor's: anybody can change that attribute and file an entry under another customer's id. When your server signs the context, the gateway refuses an entry whose context was changed, and the entries you keep hold attribution your server wrote. **How to sign** (on your server, for each page you render): 1. Take the context to give the widget. It may hold text and whole numbers only (within ±2^53, written without a fraction or an exponent). 2. Choose when the signature stops being good: `widgetic_exp`, in seconds since 1970 (UTC), no more than seven days from now. A minute of difference between clocks is forgiven. 3. Write the text to sign, with no spaces except those inside values: `widgetic-context.v1.<compositionId>.<widgetic_exp>.<json>`. `<compositionId>` is the id of the composition in lower case. `<json>` is the context as JSON with the keys in character-code order (so `Z` comes before `a`, and `10` before `9`), no spaces, strings escaped as JSON escapes them, and the two keys of the signature left out. 4. Sign that text: HMAC-SHA256 with the 32 bytes the secret stands for (the base64 text after `ctxsec_`), and write the result as base64url without padding. 5. Give the widget the context with two keys added: `widgetic_exp` and `widgetic_sig` (the signature). The whole attribute, the two keys included, stays within the limits of any context: at most 20 keys, 2048 bytes of JSON, strings up to 500 characters. The two keys take two of the 20 keys and 87 bytes of the 2048. A test vector, to check your code against before you rely on it. Secret `ctxsec_AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8=` (the bytes 0 to 31), composition `7c9e6679-7425-40de-944b-e07fc1f90ae7`, `widgetic_exp` 1792000000 and context `{\"customerId\":\"c_42\",\"plan\":\"pro\",\"seats\":3}` sign the text `widgetic-context.v1.7c9e6679-7425-40de-944b-e07fc1f90ae7.1792000000.{\"customerId\":\"c_42\",\"plan\":\"pro\",\"seats\":3}` and give the signature `j6g7151F54tl9C8oEY9levaYSppHME4fAPZ7WPwL8C8`. (The secret is the example's, not a real one.) **What the gateway does with an entry.** When you have a secret, an entry whose context carries a signature is checked: a signature that does not match is refused with 403 `CONTEXT_SIGNATURE_INVALID`, and one that is past `widgetic_exp` with 403 `CONTEXT_SIGNATURE_EXPIRED`. When you also require signatures (`updatePartnerEntryContextSigning`) an entry whose context carries none is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`. The two keys are taken out before the entry is stored or announced: your entries and your `entry.created` events hold the context you wrote. A change you make reaches every part of the gateway within a minute. **What it does not do.** A signed context that has been seen (a page's source is public) can be sent again by anyone until `widgetic_exp`; when you must not accept the same context twice, put a value that is new for each page view in it (a `submissionId` you made up) and keep the ones you have seen. The signature covers the entries that reach Widgetic's gateway: a row that gets into a table another way (your own code writing straight into a database you brought, or the record calls of the composition's owner) does not pass through it, and carries no context. Retry this call with the same `Idempotency-Key` if its answer was lost: the answer, secret included, is then given again, and no second secret is made. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
1453
|
+
# @param partner_id The partner whose secret to make
|
|
1454
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
1455
|
+
# @param [Hash] opts the optional parameters
|
|
1456
|
+
# @return [PartnerEntryContextSecretResponse]
|
|
1457
|
+
describe 'rotate_partner_entry_context_secret test' do
|
|
1458
|
+
it 'should work' do
|
|
1459
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1460
|
+
end
|
|
1461
|
+
end
|
|
1462
|
+
|
|
1463
|
+
# unit tests for rotate_partner_webhook_secret
|
|
1464
|
+
# Make a new secret for your webhook
|
|
1465
|
+
# Makes a new secret to sign your webhook with, and returns it in `webhookSecret`: **keep it now, it is shown once** and cannot be read again. Use it when the secret was lost, or may have leaked. The secret you had keeps signing beside the new one for a day, so that your receiver can switch without a call being rejected: during that day each call carries two signatures (see `updatePartnerNotificationSettings` for how they are verified). Rotating again within the day ends the overlap with the first secret. Retry this call with the same `Idempotency-Key` if its answer was lost: the answer, secret included, is then given again, and no second secret is made. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
1466
|
+
# @param partner_id The partner whose webhook secret to replace
|
|
1467
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
1468
|
+
# @param [Hash] opts the optional parameters
|
|
1469
|
+
# @return [PartnerNotificationSettingsChangeResponse]
|
|
1470
|
+
describe 'rotate_partner_webhook_secret test' do
|
|
1471
|
+
it 'should work' do
|
|
1472
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1473
|
+
end
|
|
1474
|
+
end
|
|
1475
|
+
|
|
1476
|
+
# unit tests for send_partner_notification_test_event
|
|
1477
|
+
# Send a test event to your webhook
|
|
1478
|
+
# Sends ONE signed call, right now, to the webhook address you saved under notification settings, with a sample of what an event of the type you name carries, and answers how it went: whether your receiver answered with a 2xx status, which status, how long it took, and why not when it did not arrive. Use it to write and try your receiver (above all the signature check) before a real event happens. The call is made like every other: it is signed with your current secret (and the previous one while a rotation overlaps), it carries the headers `webhook-id`, `webhook-timestamp`, `webhook-signature` and `x-widgetic-event` (the event type), and its body is `{ \"id\", \"type\", \"createdAt\", \"partnerId\", \"data\" }`. Three things differ. `id` starts with `evt_test_` and is new every time, so a receiver that remembers ids can tell a test from an event and drop it. `data` holds made-up values of the shape a real event of that type carries (`PartnerNotification` describes each), never anything about your account. And the call is made once: it is not tried again, nothing is stored, and it appears neither in the delivery log nor in the notification list. It is sent whatever `webhookEvents` says: a test is not filtered by what you subscribed to. The answer is 200 whether or not your receiver took the call (read `delivered`); a call that gets no answer within ten seconds is given up and reported as a `timeout`. A webhook address and a signing secret must be saved first (`updatePartnerNotificationSettings`); until then the answer is 409. This needs an API key with full access, and `Idempotency-Key` is required: a retry with the same key gets the first answer back and no second call is made. The caller must be the person who administers the partner, or a Widgetic administrator. Five tests a minute.
|
|
1479
|
+
# @param partner_id The partner whose webhook to try
|
|
1480
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
1481
|
+
# @param partner_notification_test_event_request
|
|
1482
|
+
# @param [Hash] opts the optional parameters
|
|
1483
|
+
# @return [PartnerNotificationTestEventResultResponse]
|
|
1484
|
+
describe 'send_partner_notification_test_event test' do
|
|
1485
|
+
it 'should work' do
|
|
1486
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1487
|
+
end
|
|
1488
|
+
end
|
|
1489
|
+
|
|
1490
|
+
# unit tests for set_composition_data_source
|
|
1491
|
+
# Bind a public JSON data source for embed refresh
|
|
1492
|
+
# 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`).
|
|
1493
|
+
# @param id
|
|
1494
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
1495
|
+
# @param set_composition_data_source_request
|
|
1496
|
+
# @param [Hash] opts the optional parameters
|
|
1497
|
+
# @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.
|
|
1498
|
+
# @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.
|
|
1499
|
+
# @return [CompositionDataSourceResponse]
|
|
1500
|
+
describe 'set_composition_data_source test' do
|
|
1501
|
+
it 'should work' do
|
|
1502
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1503
|
+
end
|
|
1504
|
+
end
|
|
1505
|
+
|
|
1506
|
+
# unit tests for set_dynamic_content
|
|
1507
|
+
# Set Dynamic Content
|
|
1508
|
+
# 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`.
|
|
1509
|
+
# @param id ID of the composition
|
|
1510
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
1511
|
+
# @param set_dynamic_content_request
|
|
1512
|
+
# @param [Hash] opts the optional parameters
|
|
1513
|
+
# @option opts [String] :if_match Optional content version from ETag (`\"3\"`, `3`, or `*`)
|
|
1514
|
+
# @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.
|
|
1515
|
+
# @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.
|
|
1516
|
+
# @return [SetDynamicContentResponse]
|
|
1517
|
+
describe 'set_dynamic_content test' do
|
|
1518
|
+
it 'should work' do
|
|
1519
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1520
|
+
end
|
|
1521
|
+
end
|
|
1522
|
+
|
|
1523
|
+
# unit tests for set_managed_user_design_defaults
|
|
1524
|
+
# Set or clear design defaults for one managed user
|
|
1525
|
+
# Send `{ \"design\": { ... } }` to store a JSON object (at most 64 KB, nesting depth 32), or `{ \"design\": null }` to remove the override. New compositions for this customer merge this layer over the partner default and under the request body.
|
|
1526
|
+
# @param id
|
|
1527
|
+
# @param set_partner_design_defaults_request
|
|
1528
|
+
# @param [Hash] opts the optional parameters
|
|
1529
|
+
# @return [GetPartnerDesignDefaults200Response]
|
|
1530
|
+
describe 'set_managed_user_design_defaults test' do
|
|
1531
|
+
it 'should work' do
|
|
1532
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1533
|
+
end
|
|
1534
|
+
end
|
|
1535
|
+
|
|
1536
|
+
# unit tests for set_managed_user_limits
|
|
1537
|
+
# Set or clear the monthly credit cap for one managed user
|
|
1538
|
+
# Send monthlyCredits as a whole number from 0 up to 2147483647 to cap what this customer's editor sessions may spend in a UTC calendar month, or null to remove the cap. The cap counts the credits the customer's sessions spent that month (refunded credits do not count) and applies to all of the customer's sessions together, beside any `max_credits` a single session was given. A cap of 0 stops all paid work by this customer until you raise it. The cap starts counting from the first of the month (UTC); a cap set below what was already spent this month stops further work at once.
|
|
1539
|
+
# @param id
|
|
1540
|
+
# @param set_managed_user_limits_request
|
|
1541
|
+
# @param [Hash] opts the optional parameters
|
|
1542
|
+
# @return [GetManagedUserLimits200Response]
|
|
1543
|
+
describe 'set_managed_user_limits test' do
|
|
1544
|
+
it 'should work' do
|
|
1545
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1546
|
+
end
|
|
1547
|
+
end
|
|
1548
|
+
|
|
1549
|
+
# unit tests for set_partner_adapter_connection
|
|
1550
|
+
# Connect an adapter key to a partner
|
|
1551
|
+
# Gives an adapter the key it needs to act through a service the partner has an account with, for the widgets of the customers the partner manages. Take the `adapterId` and `credentialKey` from `getPartnerAdapterConnections`. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this partner, this adapter and this credential, so that a stored value cannot be moved to another. It is never returned, never logged and never shown to a visitor of a widget or to your customers. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on the partner's behalf, and discards it. To cut that off, remove the key here, or revoke it with the provider. **What is checked.** That the adapter exists and takes this credential, that a partner may keep it (some are for an owner only) and that the text is one line of at most 2048 characters. Whether the provider accepts the key is not checked here: it shows the first time a widget uses it. A widget whose adapter has no key connected is not charged and does not run that adapter: its visitors are told the feature is unavailable, and the partner is told once a day what to connect. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator. A retry is harmless: saving the same key twice only refreshes when it was set.
|
|
1552
|
+
# @param partner_id The partner that keeps the key
|
|
1553
|
+
# @param adapter_id The adapter the key is for
|
|
1554
|
+
# @param credential_key The key's name within the adapter
|
|
1555
|
+
# @param set_adapter_connection_request
|
|
1556
|
+
# @param [Hash] opts the optional parameters
|
|
1557
|
+
# @return [SetUserAdapterConnection200Response]
|
|
1558
|
+
describe 'set_partner_adapter_connection test' do
|
|
1559
|
+
it 'should work' do
|
|
1560
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1561
|
+
end
|
|
1562
|
+
end
|
|
1563
|
+
|
|
1564
|
+
# unit tests for set_partner_data_database
|
|
1565
|
+
# Keep the data of a partner's compositions in a Neon database of its own
|
|
1566
|
+
# Points the partner at a Neon database of its own. From then on, what visitors leave in the compositions of the partner's managed users, and of the compositions made in the partner's own account (the votes, ratings, answers and form submissions of the widgets that collect them), is stored in that database and nowhere else. Widgetic's own database is not used for them any more, and nothing of it is copied there. **What to give.** The connection string of a Neon database and a role made for this, as Neon shows it under *Connect* (`postgresql://<role>:<password>@ep-<name>.<region>.aws.neon.tech/<database>`). Only Neon databases are accepted; a string for any other host is refused with 400. What the database needs: - an empty database of its own, so that nothing else of yours shares it. Widgetic makes one schema in it for each composition (named `comp_` followed by the composition's id). In that schema go the tables the widget declares for what its visitors leave, and two small tables of Widgetic's own, whose names start with `_widgetic_`: the context a host page sent with an entry, and how far Widgetic has read the entries to tell you about new ones. It touches nothing else; - a role that may create schemas and tables in it (the CREATE privilege on the database). The role Neon makes with a project has it. A role made in the Neon console can also read and write every other database of the same project, so if you keep other data in Neon give Widgetic a project of its own, or make the role with SQL (`CREATE ROLE ... LOGIN PASSWORD ...`) and grant it only the CREATE privilege on this database; - connections from anywhere: Widgetic's addresses are not fixed, so a Neon project that only accepts connections from an allow list of addresses cannot be used. A suspended compute is fine: it wakes on the first request. **It is checked before it is saved.** Widgetic makes a schema in your database, creates a table in it, writes a row, reads it back, and removes the schema again, all in one step, so that nothing is left if anything fails. If it cannot be done nothing is saved and the answer is 422 `PARTNER_DATABASE_UNVERIFIED`: `details.reason` says why (`INVALID_CREDENTIALS`, `DATABASE_NOT_FOUND`, `ACCESS_DENIED`, `ACCESS_BLOCKED`, `ENDPOINT_NOT_FOUND`, `ENDPOINT_UNREACHABLE`, `TIMEOUT`, `READ_ONLY`, `RATE_LIMITED`, `DATABASE_UNAVAILABLE`, `PROBE_MISMATCH` or `DATABASE_ERROR`) and `message` says what to do. **Existing data does not move.** The data of a composition lives in one database. If any composition of the partner already keeps data somewhere else (in Widgetic's database, or in the database you had set), and the new database does not hold it, the change is refused with 409 `PARTNER_DATABASE_HOLDS_DATA` and nothing is changed: those compositions would read as empty from then on. `details.compositionsWithData` says how many. Set your database before your customers collect data, or delete the compositions you no longer need. Saving the same database again (a new password) moves nothing and is never refused. **It is never a fallback.** Once a database is set, a request that needs it while it cannot be used (the password was changed, the project was deleted) is refused with 503 `PARTNER_DATABASE_UNAVAILABLE`. What the visitor sent is not stored with Widgetic instead. Fix the connection and set the database again, or check it with `verifyPartnerDataDatabase`. **When it takes effect.** A change reaches every part of Widgetic within about a minute. **What Widgetic keeps.** The connection string is stored encrypted and is never returned or logged; a response shows the host, the database and the role, never the password. Widgetic's servers open it to read and write the data of your compositions while they handle a request for it. To cut that off, change the role's password in Neon: the compositions stop saving until you set the new string. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator. A retry is harmless: saving the same database twice only refreshes when it was checked and saved.
|
|
1567
|
+
# @param partner_id The partner whose database to set
|
|
1568
|
+
# @param set_partner_data_database_request
|
|
1569
|
+
# @param [Hash] opts the optional parameters
|
|
1570
|
+
# @return [PartnerDataDatabaseResponse]
|
|
1571
|
+
describe 'set_partner_data_database test' do
|
|
1572
|
+
it 'should work' do
|
|
1573
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1574
|
+
end
|
|
1575
|
+
end
|
|
1576
|
+
|
|
1577
|
+
# unit tests for set_partner_design_defaults
|
|
1578
|
+
# Set or clear partner-wide design defaults
|
|
1579
|
+
# Send `{ \"design\": { ... } }` or `{ \"design\": null }` to remove. New compositions merge this layer over the widget base and under each managed user's default and the request body.
|
|
1580
|
+
# @param partner_id
|
|
1581
|
+
# @param set_partner_design_defaults_request
|
|
1582
|
+
# @param [Hash] opts the optional parameters
|
|
1583
|
+
# @return [GetPartnerDesignDefaults200Response]
|
|
1584
|
+
describe 'set_partner_design_defaults test' do
|
|
1585
|
+
it 'should work' do
|
|
1586
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1587
|
+
end
|
|
1588
|
+
end
|
|
1589
|
+
|
|
1590
|
+
# unit tests for set_partner_preset
|
|
1591
|
+
# Make a widget a preset, or replace a preset
|
|
1592
|
+
# Offers one of the partner's own widgets as a preset under `key`. If the partner already has a preset under that key it is replaced, so sending the same request twice is safe. Saving replaces the whole preset: a `title`, `description` or `position` you leave out goes back to its default. Keys are 1 to 64 characters: lowercase letters, digits, hyphens and underscores, the first a letter or a digit (`rating`, `quiz-3`). The widget must belong to the partner's account; a widget that does not exist and one that belongs to somebody else are refused in the same way (404 `PRESET_WIDGET_NOT_FOUND`). A widget is a preset under at most one key (409 `PRESET_WIDGET_ALREADY_USED`; `details.key` says which), and an account can have at most 100 presets (409 `PRESET_LIMIT_REACHED`). Later changes to the widget reach new copies and new compositions; copies made earlier are not touched. Deleting the widget removes its preset.
|
|
1593
|
+
# @param partner_id The partner whose preset to set
|
|
1594
|
+
# @param key The name your code uses for the preset
|
|
1595
|
+
# @param set_partner_preset_request
|
|
1596
|
+
# @param [Hash] opts the optional parameters
|
|
1597
|
+
# @return [PartnerPresetResponse]
|
|
1598
|
+
describe 'set_partner_preset test' do
|
|
1599
|
+
it 'should work' do
|
|
1600
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1601
|
+
end
|
|
1602
|
+
end
|
|
1603
|
+
|
|
1604
|
+
# unit tests for set_partner_storage_destination
|
|
1605
|
+
# Set where a partner's uploaded files are stored
|
|
1606
|
+
# Points the partner at a bucket of its own on an S3-compatible service (Cloudflare R2, Amazon S3, Wasabi, MinIO and the like). From then on, every file the account that administers the partner stores is kept in that bucket instead of with Widgetic, whichever way it arrives: a file sent with `uploadsPost` (with an API key, an SDK token, an editor session or from the Widgetic website), a resumable upload, the media library, and the files the agent tools and the MCP server save. It takes none of the account's storage allowance, and its `url` is served from `publicBaseUrl`. The chunks of a resumable upload wait in Widgetic's temporary staging area until it is completed and are removed then: the finished file is stored in your bucket and nowhere else. A destination is required. Partner storage is not optional: your customers' files, and your own however they arrive, are kept in this destination and nowhere else. An editor session (`createManagedUserEditorSession`) of any surface cannot be made until a destination is set (409 `PARTNER_STORAGE_REQUIRED`), a destination removed later stops the uploads of the sessions already made (the same 409), and your own upload with no destination (on any route, including a resumable upload, which is refused when it is started) is refused in the same way instead of being stored with Widgetic. A partner cannot be activated until it has a destination that works. The destination is checked before it is saved. Widgetic writes a small test file under `<keyPrefix>widgetic-check/`, reads it back from `<publicBaseUrl>/<its key>`, and deletes it. If any step fails nothing is saved and the answer is 422 `STORAGE_DESTINATION_UNVERIFIED`: `details.step` says where (`endpoint`, `write` or `public_read`), `details.reason` says why, and `param` names the field most likely to be wrong. What the bucket needs: - an access key that may put objects into it (it may also delete objects, which lets the test file be cleaned up, but that is not required); - its files publicly readable at `publicBaseUrl`, either because the bucket is public or through a CDN. The secret access key is stored encrypted and is never returned or logged; a response shows only the last four characters of the access key id (`accessKeyHint`). Saving replaces the whole destination, so send every field again, including the secret. Files already stored stay where they are, and keep working for as long as that bucket stays publicly readable. Once a destination is set, an upload is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 `STORAGE_DESTINATION_UNAVAILABLE`, and when the bucket rejects the file with 502 `STORAGE_DESTINATION_WRITE_FAILED`. The caller must be the person who administers the partner (an API key of that account works); anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can set any partner's.
|
|
1607
|
+
# @param partner_id The partner whose storage destination to set
|
|
1608
|
+
# @param set_partner_storage_destination_request
|
|
1609
|
+
# @param [Hash] opts the optional parameters
|
|
1610
|
+
# @return [PartnerStorageDestinationResponse]
|
|
1611
|
+
describe 'set_partner_storage_destination test' do
|
|
1612
|
+
it 'should work' do
|
|
1613
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1614
|
+
end
|
|
1615
|
+
end
|
|
1616
|
+
|
|
1617
|
+
# unit tests for set_user_adapter_connection
|
|
1618
|
+
# Connect an adapter key to an account
|
|
1619
|
+
# Gives an adapter the key it needs to act through a service you have an account with, for the widgets you made. Take the `adapterId` and `credentialKey` from `getUserAdapterConnections`. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this account, this adapter and this credential, so that a stored value cannot be moved to another. It is never returned, never logged and never shown to a visitor of a widget. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on your behalf, and discards it. To cut that off, remove the key here, or revoke it with the provider. **What is checked.** That the adapter exists and takes this credential, that an owner may keep it (some are for a partner only) and that the text is one line of at most 2048 characters. Whether the provider accepts the key is not checked here: it shows the first time a widget uses it, and the widget tells its owner. A widget whose adapter has no key connected is not charged and does not run that adapter: its visitors are told the feature is unavailable, and the owner is told once a day what to connect. This needs an API key with full access. The caller must be the account itself or a Widgetic administrator. A retry is harmless: saving the same key twice only refreshes when it was set.
|
|
1620
|
+
# @param user_id The account that keeps the key. For your own, your own user id
|
|
1621
|
+
# @param adapter_id The adapter the key is for
|
|
1622
|
+
# @param credential_key The key's name within the adapter
|
|
1623
|
+
# @param set_adapter_connection_request
|
|
1624
|
+
# @param [Hash] opts the optional parameters
|
|
1625
|
+
# @return [SetUserAdapterConnection200Response]
|
|
1626
|
+
describe 'set_user_adapter_connection test' do
|
|
1627
|
+
it 'should work' do
|
|
1628
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1629
|
+
end
|
|
1630
|
+
end
|
|
1631
|
+
|
|
1632
|
+
# unit tests for update_canvas
|
|
1633
|
+
# Update Canvas
|
|
1634
|
+
# Updates an existing canvas with the specified properties.
|
|
1635
|
+
# @param id ID of the canvas to update
|
|
1636
|
+
# @param update_canvas_request
|
|
1637
|
+
# @param [Hash] opts the optional parameters
|
|
1638
|
+
# @return [CanvasResponse]
|
|
1639
|
+
describe 'update_canvas test' do
|
|
1640
|
+
it 'should work' do
|
|
1641
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1642
|
+
end
|
|
1643
|
+
end
|
|
1644
|
+
|
|
1645
|
+
# unit tests for update_composition
|
|
1646
|
+
# Update Composition
|
|
1647
|
+
# 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.
|
|
1648
|
+
# @param id Composition ID
|
|
1649
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
1650
|
+
# @param update_composition
|
|
1651
|
+
# @param [Hash] opts the optional parameters
|
|
1652
|
+
# @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.
|
|
1653
|
+
# @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.
|
|
1654
|
+
# @return [CreateCompositionFromWidget201Response]
|
|
1655
|
+
describe 'update_composition test' do
|
|
1656
|
+
it 'should work' do
|
|
1657
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1658
|
+
end
|
|
1659
|
+
end
|
|
1660
|
+
|
|
1661
|
+
# unit tests for update_composition_database_record
|
|
1662
|
+
# Update Record In Composition Database
|
|
1663
|
+
# 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`.
|
|
1664
|
+
# @param id ID of the composition
|
|
1665
|
+
# @param table Name of the database table
|
|
1666
|
+
# @param record_id ID of the record to update
|
|
1667
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
1668
|
+
# @param body
|
|
1669
|
+
# @param [Hash] opts the optional parameters
|
|
1670
|
+
# @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.
|
|
1671
|
+
# @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.
|
|
1672
|
+
# @return [CreateCompositionDatabaseRecord201Response]
|
|
1673
|
+
describe 'update_composition_database_record test' do
|
|
1674
|
+
it 'should work' do
|
|
1675
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1676
|
+
end
|
|
1677
|
+
end
|
|
1678
|
+
|
|
1679
|
+
# unit tests for update_composition_status
|
|
1680
|
+
# Update Composition Status
|
|
1681
|
+
# Updates the status of a specific composition. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry.
|
|
1682
|
+
# @param id Composition ID
|
|
1683
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
1684
|
+
# @param update_composition_status_request
|
|
1685
|
+
# @param [Hash] opts the optional parameters
|
|
1686
|
+
# @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.
|
|
1687
|
+
# @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.
|
|
1688
|
+
# @return [CompositionResponse]
|
|
1689
|
+
describe 'update_composition_status test' do
|
|
1690
|
+
it 'should work' do
|
|
1691
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1692
|
+
end
|
|
1693
|
+
end
|
|
1694
|
+
|
|
1695
|
+
# unit tests for update_managed_user
|
|
1696
|
+
# Update Managed User
|
|
1697
|
+
# Updates an existing managed user. Only `externalId`, `metadata` and `isActive` can change, and `metadata` is replaced as a whole, so send all of it. `isActive: false` switches the managed user off: what it already has stays, and nothing new can be filed under it until you send `isActive: true`. Switching it off also ends all of its editor sessions, and they do not come back when you switch it on again. The `Idempotency-Key` header is required (`400` without it).
|
|
1698
|
+
# @param id ID of the managed user to update
|
|
1699
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
1700
|
+
# @param update_managed_user
|
|
1701
|
+
# @param [Hash] opts the optional parameters
|
|
1702
|
+
# @return [ManagedUserResponse]
|
|
1703
|
+
describe 'update_managed_user test' do
|
|
1704
|
+
it 'should work' do
|
|
1705
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1706
|
+
end
|
|
1707
|
+
end
|
|
1708
|
+
|
|
1709
|
+
# unit tests for update_partner_entry_context_signing
|
|
1710
|
+
# Require a signed context, or stop requiring it
|
|
1711
|
+
# Chooses what the gateway does with an entry whose `context` carries no valid signature. With `required: false` (the default) an entry that carries a signature is checked and refused when the signature is wrong or out of date, and an entry that carries none is accepted, as it always was. With `required: true` an entry without a valid signature is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`: use it once every page of yours that embeds a composition signs its context. Signatures cannot be required before you have made a secret (`rotatePartnerEntryContextSecret`): the answer is 409, so that you cannot lock your own compositions out of taking entries. The change reaches every part of the gateway within a minute. Saving the same choice twice leaves the same state, so a retry is harmless and `Idempotency-Key` is optional. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
1712
|
+
# @param partner_id The partner whose context signing to change
|
|
1713
|
+
# @param update_partner_entry_context_signing_request
|
|
1714
|
+
# @param [Hash] opts the optional parameters
|
|
1715
|
+
# @option opts [String] :idempotency_key Optional: without it the call is carried out every time it is sent. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` 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`).
|
|
1716
|
+
# @return [PartnerEntryContextSigningResponse]
|
|
1717
|
+
describe 'update_partner_entry_context_signing test' do
|
|
1718
|
+
it 'should work' do
|
|
1719
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1720
|
+
end
|
|
1721
|
+
end
|
|
1722
|
+
|
|
1723
|
+
# unit tests for update_partner_notification_settings
|
|
1724
|
+
# Choose where your notifications go
|
|
1725
|
+
# Changes who gets the emails, which events you want by email and by webhook, and the address of your webhook. A key you leave out of the body is left as it was; send only what changes. **Email.** `emailRecipients` is the list of addresses (at most five). While it is empty the emails about invoices go to the billing emails of your billing profile (your contact email when there are none), and the others to your contact email. The events about money and about the standing of your account are always emailed, whatever `emailEvents` says; it narrows the others. **Webhook.** `webhookUrl` is where Widgetic sends a signed `POST` for each event, so that your own system can act on it (mark an invoice paid, warn your team that credits are low). The address must be `https` on the standard port, on a public site, and must not redirect. Setting an address when you have no secret yet makes one, and the answer carries it as `webhookSecret`: **keep it now, it is shown once**. `webhookEvents` narrows what is sent. Each call has a JSON body, `{ \"id\": \"evt_...\", \"type\": \"invoice.paid\", \"createdAt\": \"...\", \"partnerId\": \"...\", \"data\": { ... } }` (`data` is the `data` of `PartnerNotification`), and these headers: `webhook-id` (the same as `id`, and the same on every retry), `webhook-timestamp` (seconds since 1970) and `webhook-signature` (`v1,` and a base64 HMAC-SHA256). It is the Standard Webhooks scheme, so any of its libraries verifies it. By hand: take your secret without the `whsec_` prefix, decode it from base64, and sign the text `<webhook-id>.<webhook-timestamp>.<the raw body>` with it; the header holds `v1,<base64 of the result>` (two signatures separated by a space while a rotated secret overlaps). Reject a `webhook-timestamp` that is more than five minutes old. Answer with a 2xx status within ten seconds. Anything else is tried again, eight attempts in all over about two days (`listPartnerNotificationDeliveries` shows each). Delivery is at least once: if your answer was lost the same event arrives again with the same `id`, so drop what you have already handled by it. Changing the settings needs an API key with full access: they decide where your notifications go. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
1726
|
+
# @param partner_id The partner whose notification settings to change
|
|
1727
|
+
# @param update_partner_notification_settings_request
|
|
1728
|
+
# @param [Hash] opts the optional parameters
|
|
1729
|
+
# @option opts [String] :idempotency_key Optional: without it the call is carried out every time it is sent. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` 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`).
|
|
1730
|
+
# @return [PartnerNotificationSettingsChangeResponse]
|
|
1731
|
+
describe 'update_partner_notification_settings test' do
|
|
1732
|
+
it 'should work' do
|
|
1733
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1734
|
+
end
|
|
1735
|
+
end
|
|
1736
|
+
|
|
1737
|
+
# unit tests for update_personal_workspace_domain
|
|
1738
|
+
# Change a website on your list
|
|
1739
|
+
# Replaces the website of one entry on an account's own list. The same rules apply as when adding one (`addPersonalWorkspaceDomain`): a website name such as `example.com` or `*.example.com`, kept in its cleaned form, and refused when it is not a website name or is already on the list.
|
|
1740
|
+
# @param id The account the list belongs to. For your own, your own user id
|
|
1741
|
+
# @param domain_id The `id` of the entry, as the list shows it
|
|
1742
|
+
# @param update_domain_request
|
|
1743
|
+
# @param [Hash] opts the optional parameters
|
|
1744
|
+
# @return [PersonalWorkspaceDomainResultResponse]
|
|
1745
|
+
describe 'update_personal_workspace_domain test' do
|
|
1746
|
+
it 'should work' do
|
|
1747
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1748
|
+
end
|
|
1749
|
+
end
|
|
1750
|
+
|
|
1751
|
+
# unit tests for update_user_api_key
|
|
1752
|
+
# Rename an API key, or switch it off or on
|
|
1753
|
+
# Renames a key, or switches it off (`isActive: false`) or back on. A key that is switched off is refused at once by the server that took the request and within a minute by the others, and can be switched on again; deleting is for a key that is not coming back. The secret, the expiry and the scopes of a key cannot be changed. Only a key with full access can make these requests: a key limited to some scopes is refused with 403 and the code `API_KEY_SCOPE_MISSING`. Renaming and switching off can be done with an API key. Switching a key on needs a person signed in on widgetic.com: a request that asks for it with an API key or an SDK token is refused with 403, so a leaked key cannot bring a dormant key back to life.
|
|
1754
|
+
# @param id The account the key belongs to
|
|
1755
|
+
# @param key_id The `keyId` of the key, as the list shows it
|
|
1756
|
+
# @param update_user_api_key_request
|
|
1757
|
+
# @param [Hash] opts the optional parameters
|
|
1758
|
+
# @return [UserApiKeyResponse]
|
|
1759
|
+
describe 'update_user_api_key test' do
|
|
1760
|
+
it 'should work' do
|
|
1761
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1762
|
+
end
|
|
1763
|
+
end
|
|
1764
|
+
|
|
1765
|
+
# unit tests for upload_public_composition_adapter_file
|
|
1766
|
+
# Send the file a visitor chose through the upload adapter of a published widget
|
|
1767
|
+
# The second of the two calls the `upload` adapter's module makes from the visitor's browser (the first, the `begin-upload` operation of `callPublicCompositionAdapter`, answers with the ticket this route takes). The module sends the file itself, as the body, with its media type as the `Content-Type`. It is not meant to be called by hand, and it takes no API key. **Address.** `https://api.widgetic.com/embed/compositions/{compositionId}/adapters/upload/files/{ticket}`: the root of the API host, NOT under `/v1`. A client generated from this description for `https://api.widgetic.com/v1` must be given the base address `https://api.widgetic.com` for the calls of the `Public Embed` tag. **The ticket.** Single-use and valid for ten minutes, given for one file: its name, its media type and its exact size are what the visitor said when the ticket was asked for, after the widget's owner's settings (the kinds of file they take, the largest size) were applied. The `Content-Type` and the `Content-Length` of this request must be those, and the body must be exactly that many bytes (400 `UPLOAD_FILE_CHANGED` otherwise). The gateway never believes the type it was told: the first bytes of the file must be a file of that type and one the owner accepts (422 otherwise). A ticket whose file was stored and is sent again is answered with the same file, so a visitor whose connection dropped after the file landed does not store it twice; a ticket whose attempt failed is spent, and the module asks for a new one. **What it stores.** The file goes to the widget owner's storage: Widgetic's, or the partner's own bucket for a widget of a customer a partner manages. It counts against the owner's storage allowance and is filed in the folder the owner chose, as a file sent by a visitor, which the owner's own file list leaves out. A full allowance, a partner's storage that cannot be used and a stopped feature are all the same 503 `UPLOAD_UNAVAILABLE` to a visitor, and the owner is told through a notice. **Who may call.** The same rule as the entry route: a permitted `Origin` header, which is the artifact origin the widget runs from or a website the owner allowed (or the owner's own platform). A request without a permitted `Origin` is 403 `ORIGIN_NOT_ALLOWED`. A composition that is not served (unpublished, or its owner's plan does not serve it) is 404, with the codes of the other public embed routes. **Limits.** 30 requests a minute for each visitor address and composition and 240 a minute for a composition (429 `RATE_LIMITED`, with a `Retry-After` header); at most 10 MB for a file, and only so many files held in memory at once on each gateway process (503 `UPLOAD_BUSY`, with a `Retry-After`). A file that does not arrive within two minutes is 408 `UPLOAD_TIMEOUT`. Every answer but a success closes the connection, so a client that is refused before it has sent the file reads the answer and stops.
|
|
1768
|
+
# @param composition_id
|
|
1769
|
+
# @param ticket The ticket the `begin-upload` operation answered with.
|
|
1770
|
+
# @param body
|
|
1771
|
+
# @param [Hash] opts the optional parameters
|
|
1772
|
+
# @return [PublicAdapterFileResult]
|
|
1773
|
+
describe 'upload_public_composition_adapter_file test' do
|
|
1774
|
+
it 'should work' do
|
|
1775
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1776
|
+
end
|
|
1777
|
+
end
|
|
1778
|
+
|
|
1779
|
+
# unit tests for uploads_get
|
|
1780
|
+
# List the account's uploads
|
|
1781
|
+
# The files the account has uploaded, newest first. Deleted files are not listed. Returns at most `limit` files and has no further pages: a client that needs more narrows the list instead, for example to one managed user's files with `managedUserId` or `managedUserExternalId`. The files that visitors sent through a widget's upload adapter (`source` is `widget-visitor-upload`) are not part of this list, so that a popular widget does not push the account's own files out of it; naming one widget with `widgetId` lists what visitors sent to that widget as well.
|
|
1782
|
+
# @param [Hash] opts the optional parameters
|
|
1783
|
+
# @option opts [Integer] :limit Maximum number of files to return
|
|
1784
|
+
# @option opts [String] :managed_user_id List only the files uploaded for this managed user (Widgetic's id for the user). Send this or `managedUserExternalId`, not both.
|
|
1785
|
+
# @option opts [String] :managed_user_external_id List only the files uploaded for the managed user you registered with this `externalId` (your own identifier for the user). Send this or `managedUserId`, not both.
|
|
1786
|
+
# @return [UploadsGet200Response]
|
|
1787
|
+
describe 'uploads_get test' do
|
|
1788
|
+
it 'should work' do
|
|
1789
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1790
|
+
end
|
|
1791
|
+
end
|
|
1792
|
+
|
|
1793
|
+
# unit tests for uploads_id_delete
|
|
1794
|
+
# Delete an upload
|
|
1795
|
+
# Removes the stored file and the upload row. A file in Widgetic's own storage gives back the space it took from your storage allowance; a file in your own bucket is removed from your bucket. Deleting an upload that is already gone succeeds the same way as the first delete. An upload that belongs to another account is not found. If the storage cannot be reached the call fails and nothing is marked deleted, so it can be repeated.
|
|
1796
|
+
# @param id
|
|
1797
|
+
# @param [Hash] opts the optional parameters
|
|
1798
|
+
# @return [UploadsIdDelete200Response]
|
|
1799
|
+
describe 'uploads_id_delete test' do
|
|
1800
|
+
it 'should work' do
|
|
1801
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1802
|
+
end
|
|
1803
|
+
end
|
|
1804
|
+
|
|
1805
|
+
# unit tests for uploads_id_get
|
|
1806
|
+
# Get an upload by id
|
|
1807
|
+
# The details of one of the account's uploads. An upload that belongs to another account is not found.
|
|
1808
|
+
# @param id The upload to read
|
|
1809
|
+
# @param [Hash] opts the optional parameters
|
|
1810
|
+
# @return [UploadResponse]
|
|
1811
|
+
describe 'uploads_id_get test' do
|
|
1812
|
+
it 'should work' do
|
|
1813
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1814
|
+
end
|
|
1815
|
+
end
|
|
1816
|
+
|
|
1817
|
+
# unit tests for uploads_limits_get
|
|
1818
|
+
# Upload size limits and accepted file types
|
|
1819
|
+
# The size limit and the accepted file types of the upload endpoints. Read them from here rather than hard-coding thresholds: they are configuration and can change. The limits are the same for every account, whatever its plan: `multipart_max_bytes` for a file sent in one request (10 MB) and `tus_max_bytes` for a resumable upload (250 MB).
|
|
1820
|
+
# @param [Hash] opts the optional parameters
|
|
1821
|
+
# @return [UploadLimitsResponse]
|
|
1822
|
+
describe 'uploads_limits_get test' do
|
|
1823
|
+
it 'should work' do
|
|
1824
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1825
|
+
end
|
|
1826
|
+
end
|
|
1827
|
+
|
|
1828
|
+
# unit tests for uploads_post
|
|
1829
|
+
# Upload a file
|
|
1830
|
+
# Stores one file for the account and returns its public address. This is how a user's own images, video and PDFs reach a widget's content. Send a `multipart/form-data` request with the file in the field named `file`. The file counts against the storage of the workspace it is uploaded in, and a full workspace is refused with 413 and `QUOTA_STORAGE_EXCEEDED`. For a person signed in on widgetic.com that is the workspace they are currently working in: inside a team, the team's shared storage; inside their own workspace, their own allowance. An organization API key, and a Shopify store's session, always work in that team's shared storage. A personal API key or an SDK token always uses the account's own allowance. The two never add up and one never lends room to the other. A file over the size limit is refused with 413 and `UPLOAD_TOO_LARGE`, and a type that is not accepted with 415 and `UPLOAD_UNSUPPORTED_TYPE`; `uploadsLimitsGet` lists the size limit and the accepted types. A file is judged by what is in it, not by the type it is sent as. A file that is not the type it claims (a web page sent as `image/png`) is refused with 415 and `UPLOAD_UNSUPPORTED_TYPE`, and a picture sent under the wrong picture type is stored under the type it really is, which `mime_type` in the answer says. An SVG is rewritten as it is stored: script, `foreignObject`, animation and references to other addresses are taken out, it must be UTF-8 and at most 2 MB, and the stored file can be larger or smaller than the one sent. Anything that is not an image, audio or video (a PDF, for example) is served as a download rather than shown in a page. When the full storage is a Shopify store's team's, extra storage cannot be added through Shopify yet, so the message ends by saying so and what to do instead: delete files, or contact support. On a Solo plan it names the Teams plan (which holds more) and `error.details.planPageUrl` is the address of the plan page on Shopify. `error.suggestedAction` says the same in a few words, instead of the usual \"upgrade your storage plan\". Any other team, and a person's own workspace, get the shorter message. To upload the file for one of your managed users, send `managedUserId` (Widgetic's id for the user) or `managedUserExternalId` (your own identifier for the user), not both. The file stays in your account and counts against its allowance; the tag lets you list one user's files with `uploadsGet`. The managed user must be yours and active: one that is not yours, or does not exist, is refused with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`, before the file is stored. The tag is set here and does not change afterwards. Called with an editor session (`createManagedUserEditorSession`), the file is always filed for the session's own managed user and is always media for widget content: naming another managed user is refused with 403 and `MANAGED_USER_SESSION_MISMATCH`, and `contextType`, `source`, `widgetId` and `conversationId` are ignored. A full storage allowance is refused with the same 413 and `QUOTA_STORAGE_EXCEEDED`, but the message only says that it is not available right now (not how much is stored: that is the partner's business) and `error.details.limit` is `storage`. An account that administers a partner with a storage destination (`setPartnerStorageDestination`) has its files stored in the partner's own bucket instead. Such a file takes none of the allowance, its `url` is served from the partner's public address, and its `storage_key` is the key in the partner's bucket. The file is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 and `STORAGE_DESTINATION_UNAVAILABLE`, and when the partner's storage rejects the file with 502 and `STORAGE_DESTINATION_WRITE_FAILED`. Partner storage is not optional, and it does not depend on how the file arrives. A partner's own uploads (with its API key, an SDK token, or from the Widgetic website, the resumable route and the media library alike) and the uploads of its customers' editor sessions are kept in the partner's own storage or not at all, so a partner with no destination (or one that removed it after the session was made) has them refused with 409 and `PARTNER_STORAGE_REQUIRED`; they are never stored with Widgetic. An editor session's browser is only told that the feature is not available right now.
|
|
1831
|
+
# @param file The file to store
|
|
1832
|
+
# @param [Hash] opts the optional parameters
|
|
1833
|
+
# @option opts [String] :context_type What the file is for. Send `content-property` for media that becomes widget content (images, video and PDF); the other values are used by Widgetic's own editor.
|
|
1834
|
+
# @option opts [String] :source Which part of the product, or which client, the file comes from
|
|
1835
|
+
# @option opts [String] :managed_user_id Upload the file for one of your managed users, by Widgetic's id for the user. Send this or `managedUserExternalId`, not both.
|
|
1836
|
+
# @option opts [String] :managed_user_external_id The same, by your own identifier for the user, the `externalId` you gave when you created the managed user. Send this or `managedUserId`, not both.
|
|
1837
|
+
# @option opts [String] :purpose Where in your product you use the file. It is kept with the file, so that a customer's storage can be counted by purpose (`getManagedUserStorageUsage`). Optional; any other value is refused with 400 and `UPLOAD_INVALID_PURPOSE`.
|
|
1838
|
+
# @return [UploadResponse]
|
|
1839
|
+
describe 'uploads_post test' do
|
|
1840
|
+
it 'should work' do
|
|
1841
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1842
|
+
end
|
|
1843
|
+
end
|
|
1844
|
+
|
|
1845
|
+
# unit tests for validate_composition_content
|
|
1846
|
+
# Validate Content
|
|
1847
|
+
# 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.
|
|
1848
|
+
# @param id ID of the composition
|
|
1849
|
+
# @param idempotency_key Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
|
|
1850
|
+
# @param request_body
|
|
1851
|
+
# @param [Hash] opts the optional parameters
|
|
1852
|
+
# @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.
|
|
1853
|
+
# @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.
|
|
1854
|
+
# @return [ValidateCompositionContentResponse]
|
|
1855
|
+
describe 'validate_composition_content test' do
|
|
1856
|
+
it 'should work' do
|
|
1857
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1858
|
+
end
|
|
1859
|
+
end
|
|
1860
|
+
|
|
1861
|
+
# unit tests for validate_token
|
|
1862
|
+
# Validate current authentication token
|
|
1863
|
+
# @param [Hash] opts the optional parameters
|
|
1864
|
+
# @return [ValidateToken200Response]
|
|
1865
|
+
describe 'validate_token test' do
|
|
1866
|
+
it 'should work' do
|
|
1867
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1868
|
+
end
|
|
1869
|
+
end
|
|
1870
|
+
|
|
1871
|
+
# unit tests for verify_partner_data_database
|
|
1872
|
+
# Check that a partner's own database still works
|
|
1873
|
+
# Runs the same check as `setPartnerDataDatabase` against the database already saved: a schema is made in it, a table created, a row written and read back, and the schema removed again. Use it after changing the role's password or the project's settings in Neon, or when saving is failing with 503 `PARTNER_DATABASE_UNAVAILABLE`. The result is recorded either way. A pass refreshes `verifiedAt` and clears `lastVerificationError`; a failure answers 422 `PARTNER_DATABASE_UNVERIFIED` and is recorded in `lastVerificationError` and `lastVerificationFailedAt`, so the database shows what went wrong the next time it is read. A failed check does not remove the database. `details.reason` is one of the reasons `setPartnerDataDatabase` lists, or `STORED_STRING_UNREADABLE` when the connection string Widgetic stored can no longer be read: set the database again, with its connection string. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
1874
|
+
# @param partner_id The partner whose database to check
|
|
1875
|
+
# @param [Hash] opts the optional parameters
|
|
1876
|
+
# @return [PartnerDataDatabaseResponse]
|
|
1877
|
+
describe 'verify_partner_data_database test' do
|
|
1878
|
+
it 'should work' do
|
|
1879
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1880
|
+
end
|
|
1881
|
+
end
|
|
1882
|
+
|
|
1883
|
+
# unit tests for verify_partner_storage_destination
|
|
1884
|
+
# Check that a partner's storage destination still works
|
|
1885
|
+
# Runs the same check as `setPartnerStorageDestination` against the destination already saved: a test file is written, read back from the public address and deleted. Use it after rotating a key or changing a bucket policy, or when uploads are failing with 502 or 503. The result is recorded either way. A pass refreshes `verifiedAt` and clears `lastVerificationError`; a failure answers 422 `STORAGE_DESTINATION_UNVERIFIED` and is recorded in `lastVerificationError` and `lastVerificationFailedAt`, so the destination shows what went wrong the next time it is read. A failed check does not remove the destination or stop uploads from using it. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
1886
|
+
# @param partner_id The partner whose storage destination to check
|
|
1887
|
+
# @param [Hash] opts the optional parameters
|
|
1888
|
+
# @return [PartnerStorageDestinationResponse]
|
|
1889
|
+
describe 'verify_partner_storage_destination test' do
|
|
1890
|
+
it 'should work' do
|
|
1891
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1892
|
+
end
|
|
1893
|
+
end
|
|
1894
|
+
|
|
1895
|
+
end
|