api-sdk-rb 1.11.66 → 1.11.133
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +294 -285
- data/docs/{GetPartnerCreditTransactions200Response.md → AccountCreditTransactionListResponse.md} +2 -2
- data/docs/AdapterConnection.md +7 -1
- data/docs/{GetUserAdapterConnections200Response.md → AdapterConnectionListResponse.md} +2 -2
- data/docs/{RemoveUserAdapterConnection200Response.md → AdapterConnectionRemovalResponse.md} +2 -2
- data/docs/{SetUserAdapterConnection200Response.md → AdapterConnectionResponse.md} +2 -2
- data/docs/{AddAiAnswersKnowledgeDocument201Response.md → AiAnswersKnowledgeDocumentResponse.md} +2 -2
- data/docs/BrandColor.md +22 -0
- data/docs/BrandFont.md +24 -0
- data/docs/BrandKitApi.md +593 -0
- data/docs/BrandKitAssetView.md +42 -0
- data/docs/BrandKitFigmaSource.md +26 -0
- data/docs/BrandKitTokens.md +26 -0
- data/docs/BrandKitTokensFonts.md +24 -0
- data/docs/BrandKitView.md +36 -0
- data/docs/BrandKitViewOwner.md +20 -0
- data/docs/{OperationsIdGetResponse.md → BrandKitViewResponse.md} +3 -3
- data/docs/BrandSpacing.md +32 -0
- data/docs/BrandTextStyle.md +22 -0
- data/docs/CanvasesApi.md +45 -45
- data/docs/Composition.md +5 -1
- data/docs/{CreateCompositionDatabaseRecord201Response.md → CompositionDatabaseRecordResponse.md} +2 -2
- data/docs/CompositionLastEditedBy.md +20 -0
- data/docs/CompositionsApi.md +821 -473
- data/docs/ConfirmAdapterConnectionRequest.md +18 -0
- data/docs/{CreateCompositionContentItem201Response.md → ContentItemWriteResultResponse.md} +2 -2
- data/docs/CreateWidget201ResponseData.md +2 -4
- data/docs/CreateWorkspaceWorkflowFromPresetRequest.md +20 -0
- data/docs/CreateWorkspaceWorkflowRequest.md +22 -0
- data/docs/CreditsApi.md +20 -20
- data/docs/DeleteUpload200Response.md +22 -0
- data/docs/{UploadsIdDelete200ResponseData.md → DeleteUpload200ResponseData.md} +2 -2
- data/docs/DeleteWorkspaceWorkflow200Response.md +22 -0
- data/docs/{GetPartnerDesignDefaults200Response.md → DesignDefaultsResponse.md} +2 -2
- data/docs/EntitlementsApi.md +18 -18
- data/docs/GetOperationResponse.md +22 -0
- data/docs/{OperationsIdGetResponseData.md → GetOperationResponseData.md} +3 -3
- data/docs/GetOperationResponseDataMetadata.md +24 -0
- data/docs/GetPublicCompositionEmbed200Response.md +7 -1
- data/docs/GetPublicCompositionEmbed200ResponseAdapters.md +20 -0
- data/docs/GetPublicCompositionEmbed200ResponseAdaptersCaptcha.md +18 -0
- data/docs/GetPublicCompositionEmbed200ResponseEntries.md +20 -0
- data/docs/GetPublicCompositionEmbed200ResponseMedia.md +18 -0
- data/docs/GetWorkspaceWorkflowStats200Response.md +22 -0
- data/docs/GetWorkspaceWorkflowVersion200Response.md +22 -0
- data/docs/InvoicesApi.md +9 -9
- data/docs/ListPartnerWorkflowPresets200Response.md +22 -0
- data/docs/{UploadsGet200Response.md → ListUploads200Response.md} +2 -2
- data/docs/ListWorkspaceWorkflowCompositionOptions200Response.md +22 -0
- data/docs/ListWorkspaceWorkflowPresets200Response.md +22 -0
- data/docs/ListWorkspaceWorkflowVersions200Response.md +22 -0
- data/docs/ListWorkspaceWorkflows200Response.md +22 -0
- data/docs/{GetManagedUserLimits200Response.md → ManagedUserLimitsResponse.md} +2 -2
- data/docs/{DeleteManagedUser200Response.md → ManagedUserRemovalResponse.md} +2 -2
- data/docs/ManagedUsersApi.md +261 -171
- data/docs/NewComposition.md +1 -1
- data/docs/NewEditorSession.md +1 -1
- data/docs/OfferWorkflowPresetRequest.md +24 -0
- data/docs/OfferedWorkflowPreset.md +40 -0
- data/docs/OfferedWorkflowPresetList.md +18 -0
- data/docs/OfferedWorkflowPresetWidget.md +22 -0
- data/docs/OperationsApi.md +11 -11
- data/docs/PartnerCustomization.md +2 -2
- data/docs/PartnerNotification.md +1 -1
- data/docs/PartnersApi.md +644 -352
- data/docs/PatchBrandKitAssetRequest.md +24 -0
- data/docs/PatchBrandKitRequest.md +30 -0
- data/docs/PatchBrandKitRequestFonts.md +24 -0
- data/docs/PatchBrandKitRequestSpacing.md +32 -0
- data/docs/PostBrandKitIconRequest.md +20 -0
- data/docs/PublicEmbedApi.md +324 -58
- data/docs/PublicWorkflow.md +36 -0
- data/docs/PublicWorkflowEventsAccepted.md +22 -0
- data/docs/PublicWorkflowEventsRequest.md +24 -0
- data/docs/PublicWorkflowEventsRequestEventsInner.md +24 -0
- data/docs/PublicWorkflowEventsRequestHeightsInner.md +20 -0
- data/docs/{CreateCompositionFromWidget201Response.md → PublicWorkflowResponse.md} +3 -3
- data/docs/PublicWorkflowTranslation.md +20 -0
- data/docs/PublishWorkspaceWorkflow200Response.md +22 -0
- data/docs/PublishWorkspaceWorkflowRequest.md +18 -0
- data/docs/PutBrandKitRequest.md +22 -0
- data/docs/RemovePartnerWorkflowPreset200Response.md +22 -0
- data/docs/ReportPublicWorkflowEvents200Response.md +22 -0
- data/docs/SaveWorkspaceWorkflowRequest.md +24 -0
- data/docs/SetAdapterConnectionRequest.md +1 -1
- data/docs/SetPartnerWorkflowPreset200Response.md +22 -0
- data/docs/TokensApi.md +11 -9
- data/docs/UpdateComposition.md +1 -1
- data/docs/Upload.md +1 -1
- data/docs/UploadLimits.md +3 -3
- data/docs/UploadsApi.md +85 -85
- data/docs/UsersApi.md +191 -115
- data/docs/Widget.md +2 -4
- data/docs/WidgetClarification.md +22 -0
- data/docs/WidgetClarificationOption.md +22 -0
- data/docs/WidgetClarificationQuestion.md +26 -0
- data/docs/WidgetNextStep.md +24 -0
- data/docs/WidgetPlan.md +26 -0
- data/docs/WidgetPlanDecisions.md +32 -0
- data/docs/WidgetPlanDecisionsAdaptersInner.md +20 -0
- data/docs/WidgetPlanDecisionsLibrariesInner.md +22 -0
- data/docs/WidgetPlanDecisionsResponsive.md +22 -0
- data/docs/WidgetPlanTask.md +24 -0
- data/docs/WidgetsApi.md +38 -38
- data/docs/Workflow.md +50 -0
- data/docs/WorkflowCompositionAction.md +24 -0
- data/docs/WorkflowCompositionField.md +24 -0
- data/docs/WorkflowCompositionOption.md +30 -0
- data/docs/WorkflowCompositionOptionActions.md +22 -0
- data/docs/WorkflowCompositionOptionInputs.md +24 -0
- data/docs/WorkflowCompositionOptions.md +24 -0
- data/docs/WorkflowConditionCase.md +24 -0
- data/docs/WorkflowConditionTest.md +22 -0
- data/docs/WorkflowCounter.md +20 -0
- data/docs/WorkflowDetail.md +60 -0
- data/docs/WorkflowDetailAllOfLastEditedBy.md +20 -0
- data/docs/WorkflowDetailResponse.md +22 -0
- data/docs/WorkflowEdge.md +24 -0
- data/docs/WorkflowFailureReason.md +15 -0
- data/docs/WorkflowFailureReasonCounter.md +22 -0
- data/docs/WorkflowFieldReference.md +22 -0
- data/docs/WorkflowGraph.md +22 -0
- data/docs/WorkflowIssue.md +28 -0
- data/docs/WorkflowList.md +24 -0
- data/docs/WorkflowNode.md +30 -0
- data/docs/WorkflowNodePosition.md +20 -0
- data/docs/WorkflowPresetChoice.md +26 -0
- data/docs/WorkflowPresetChoices.md +18 -0
- data/docs/WorkflowPresetRemoval.md +18 -0
- data/docs/WorkflowPresetWidget.md +20 -0
- data/docs/WorkflowPublishResult.md +22 -0
- data/docs/WorkflowRemoved.md +18 -0
- data/docs/WorkflowResponse.md +22 -0
- data/docs/WorkflowSchedule.md +24 -0
- data/docs/WorkflowStats.md +34 -0
- data/docs/WorkflowStatus.md +15 -0
- data/docs/WorkflowTrigger.md +28 -0
- data/docs/WorkflowTriggerValuesInner.md +20 -0
- data/docs/WorkflowVersion.md +28 -0
- data/docs/WorkflowVersionDetail.md +32 -0
- data/docs/WorkflowVersionList.md +18 -0
- data/docs/WorkflowVersionPublishedBy.md +20 -0
- data/docs/WorkflowsApi.md +1527 -0
- data/lib/api-sdk-rb/api/brand_kit_api.rb +581 -0
- data/lib/api-sdk-rb/api/canvases_api.rb +39 -39
- data/lib/api-sdk-rb/api/compositions_api.rb +993 -565
- data/lib/api-sdk-rb/api/credits_api.rb +20 -20
- data/lib/api-sdk-rb/api/entitlements_api.rb +14 -14
- data/lib/api-sdk-rb/api/invoices_api.rb +10 -10
- data/lib/api-sdk-rb/api/managed_users_api.rb +278 -172
- data/lib/api-sdk-rb/api/operations_api.rb +10 -10
- data/lib/api-sdk-rb/api/partners_api.rb +668 -352
- data/lib/api-sdk-rb/api/public_embed_api.rb +339 -62
- data/lib/api-sdk-rb/api/tokens_api.rb +8 -6
- data/lib/api-sdk-rb/api/uploads_api.rb +96 -96
- data/lib/api-sdk-rb/api/users_api.rb +213 -119
- data/lib/api-sdk-rb/api/widgets_api.rb +40 -40
- data/lib/api-sdk-rb/api/workflows_api.rb +1775 -0
- data/lib/api-sdk-rb/configuration.rb +11 -23
- data/lib/api-sdk-rb/models/{get_user_adapter_connections200_response.rb → account_credit_transaction_list_response.rb} +4 -4
- data/lib/api-sdk-rb/models/adapter_connection.rb +48 -5
- data/lib/api-sdk-rb/models/{get_partner_credit_transactions200_response.rb → adapter_connection_list_response.rb} +4 -4
- data/lib/api-sdk-rb/models/adapter_connection_removal_response.rb +246 -0
- data/lib/api-sdk-rb/models/{delete_managed_user200_response.rb → adapter_connection_response.rb} +4 -4
- data/lib/api-sdk-rb/models/ai_answers_knowledge_document_response.rb +246 -0
- data/lib/api-sdk-rb/models/brand_color.rb +329 -0
- data/lib/api-sdk-rb/models/brand_font.rb +357 -0
- data/lib/api-sdk-rb/models/brand_kit_asset_view.rb +409 -0
- data/lib/api-sdk-rb/models/brand_kit_figma_source.rb +277 -0
- data/lib/api-sdk-rb/models/brand_kit_tokens.rb +335 -0
- data/lib/api-sdk-rb/models/brand_kit_tokens_fonts.rb +241 -0
- data/lib/api-sdk-rb/models/brand_kit_view.rb +344 -0
- data/lib/api-sdk-rb/models/brand_kit_view_owner.rb +267 -0
- data/lib/api-sdk-rb/models/brand_kit_view_response.rb +247 -0
- data/lib/api-sdk-rb/models/brand_spacing.rb +557 -0
- data/lib/api-sdk-rb/models/brand_text_style.rb +344 -0
- data/lib/api-sdk-rb/models/composition.rb +26 -5
- data/lib/api-sdk-rb/models/{create_composition_database_record201_response.rb → composition_database_record_response.rb} +3 -3
- data/lib/api-sdk-rb/models/composition_last_edited_by.rb +242 -0
- data/lib/api-sdk-rb/models/confirm_adapter_connection_request.rb +241 -0
- data/lib/api-sdk-rb/models/content_item_write_result_response.rb +246 -0
- data/lib/api-sdk-rb/models/create_widget201_response_data.rb +9 -20
- data/lib/api-sdk-rb/models/create_workspace_workflow_from_preset_request.rb +278 -0
- data/lib/api-sdk-rb/models/create_workspace_workflow_request.rb +271 -0
- data/lib/api-sdk-rb/models/{operations_id_get_response.rb → delete_upload200_response.rb} +4 -5
- data/lib/api-sdk-rb/models/{uploads_id_delete200_response_data.rb → delete_upload200_response_data.rb} +3 -3
- data/lib/api-sdk-rb/models/delete_workspace_workflow200_response.rb +246 -0
- data/lib/api-sdk-rb/models/design_defaults_response.rb +246 -0
- data/lib/api-sdk-rb/models/get_operation_response.rb +247 -0
- data/lib/api-sdk-rb/models/{operations_id_get_response_data.rb → get_operation_response_data.rb} +5 -8
- data/lib/api-sdk-rb/models/get_operation_response_data_metadata.rb +283 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response.rb +29 -2
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_adapters.rb +225 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_adapters_captcha.rb +216 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_entries.rb +224 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_media.rb +216 -0
- data/lib/api-sdk-rb/models/get_workspace_workflow_stats200_response.rb +246 -0
- data/lib/api-sdk-rb/models/{create_composition_from_widget201_response.rb → get_workspace_workflow_version200_response.rb} +4 -4
- data/lib/api-sdk-rb/models/list_partner_workflow_presets200_response.rb +246 -0
- data/lib/api-sdk-rb/models/{uploads_get200_response.rb → list_uploads200_response.rb} +3 -3
- data/lib/api-sdk-rb/models/list_workspace_workflow_composition_options200_response.rb +246 -0
- data/lib/api-sdk-rb/models/{create_composition_content_item201_response.rb → list_workspace_workflow_presets200_response.rb} +4 -4
- data/lib/api-sdk-rb/models/{add_ai_answers_knowledge_document201_response.rb → list_workspace_workflow_versions200_response.rb} +4 -4
- data/lib/api-sdk-rb/models/list_workspace_workflows200_response.rb +246 -0
- data/lib/api-sdk-rb/models/{get_managed_user_limits200_response.rb → managed_user_limits_response.rb} +3 -3
- data/lib/api-sdk-rb/models/{uploads_id_delete200_response.rb → managed_user_removal_response.rb} +4 -4
- data/lib/api-sdk-rb/models/new_composition.rb +1 -1
- data/lib/api-sdk-rb/models/new_editor_session.rb +1 -1
- data/lib/api-sdk-rb/models/offer_workflow_preset_request.rb +322 -0
- data/lib/api-sdk-rb/models/offered_workflow_preset.rb +423 -0
- data/lib/api-sdk-rb/models/offered_workflow_preset_list.rb +223 -0
- data/lib/api-sdk-rb/models/offered_workflow_preset_widget.rb +251 -0
- data/lib/api-sdk-rb/models/partner_notification.rb +1 -1
- data/lib/api-sdk-rb/models/partner_notification_event_type.rb +5 -1
- data/lib/api-sdk-rb/models/patch_brand_kit_asset_request.rb +289 -0
- data/lib/api-sdk-rb/models/patch_brand_kit_request.rb +363 -0
- data/lib/api-sdk-rb/models/patch_brand_kit_request_fonts.rb +242 -0
- data/lib/api-sdk-rb/models/patch_brand_kit_request_spacing.rb +502 -0
- data/lib/api-sdk-rb/models/post_brand_kit_icon_request.rb +237 -0
- data/lib/api-sdk-rb/models/public_workflow.rb +351 -0
- data/lib/api-sdk-rb/models/public_workflow_events_accepted.rb +242 -0
- data/lib/api-sdk-rb/models/public_workflow_events_request.rb +301 -0
- data/lib/api-sdk-rb/models/public_workflow_events_request_events_inner.rb +354 -0
- data/lib/api-sdk-rb/models/public_workflow_events_request_heights_inner.rb +267 -0
- data/lib/api-sdk-rb/models/public_workflow_response.rb +246 -0
- data/lib/api-sdk-rb/models/public_workflow_translation.rb +242 -0
- data/lib/api-sdk-rb/models/{set_user_adapter_connection200_response.rb → publish_workspace_workflow200_response.rb} +4 -4
- data/lib/api-sdk-rb/models/publish_workspace_workflow_request.rb +240 -0
- data/lib/api-sdk-rb/models/put_brand_kit_request.rb +239 -0
- data/lib/api-sdk-rb/models/{remove_user_adapter_connection200_response.rb → remove_partner_workflow_preset200_response.rb} +4 -4
- data/lib/api-sdk-rb/models/report_public_workflow_events200_response.rb +246 -0
- data/lib/api-sdk-rb/models/save_workspace_workflow_request.rb +296 -0
- data/lib/api-sdk-rb/models/set_adapter_connection_request.rb +1 -1
- data/lib/api-sdk-rb/models/{get_partner_design_defaults200_response.rb → set_partner_workflow_preset200_response.rb} +4 -4
- data/lib/api-sdk-rb/models/update_composition.rb +1 -1
- data/lib/api-sdk-rb/models/upload.rb +1 -1
- data/lib/api-sdk-rb/models/upload_limits.rb +3 -3
- data/lib/api-sdk-rb/models/widget.rb +9 -20
- data/lib/api-sdk-rb/models/widget_clarification.rb +279 -0
- data/lib/api-sdk-rb/models/widget_clarification_option.rb +256 -0
- data/lib/api-sdk-rb/models/widget_clarification_question.rb +329 -0
- data/lib/api-sdk-rb/models/widget_next_step.rb +307 -0
- data/lib/api-sdk-rb/models/widget_plan.rb +306 -0
- data/lib/api-sdk-rb/models/widget_plan_decisions.rb +346 -0
- data/lib/api-sdk-rb/models/widget_plan_decisions_adapters_inner.rb +237 -0
- data/lib/api-sdk-rb/models/widget_plan_decisions_libraries_inner.rb +255 -0
- data/lib/api-sdk-rb/models/widget_plan_decisions_responsive.rb +311 -0
- data/lib/api-sdk-rb/models/widget_plan_task.rb +320 -0
- data/lib/api-sdk-rb/models/workflow.rb +509 -0
- data/lib/api-sdk-rb/models/workflow_composition_action.rb +266 -0
- data/lib/api-sdk-rb/models/workflow_composition_field.rb +303 -0
- data/lib/api-sdk-rb/models/workflow_composition_option.rb +316 -0
- data/lib/api-sdk-rb/models/workflow_composition_option_actions.rb +284 -0
- data/lib/api-sdk-rb/models/workflow_composition_option_inputs.rb +304 -0
- data/lib/api-sdk-rb/models/workflow_composition_options.rb +271 -0
- data/lib/api-sdk-rb/models/workflow_condition_case.rb +322 -0
- data/lib/api-sdk-rb/models/workflow_condition_test.rb +284 -0
- data/lib/api-sdk-rb/models/workflow_counter.rb +238 -0
- data/lib/api-sdk-rb/models/workflow_detail.rb +580 -0
- data/lib/api-sdk-rb/models/workflow_detail_all_of_last_edited_by.rb +242 -0
- data/lib/api-sdk-rb/models/workflow_detail_response.rb +246 -0
- data/lib/api-sdk-rb/models/workflow_edge.rb +292 -0
- data/lib/api-sdk-rb/models/workflow_failure_reason.rb +42 -0
- data/lib/api-sdk-rb/models/workflow_failure_reason_counter.rb +277 -0
- data/lib/api-sdk-rb/models/workflow_field_reference.rb +300 -0
- data/lib/api-sdk-rb/models/workflow_graph.rb +330 -0
- data/lib/api-sdk-rb/models/workflow_issue.rb +309 -0
- data/lib/api-sdk-rb/models/workflow_list.rb +271 -0
- data/lib/api-sdk-rb/models/workflow_node.rb +343 -0
- data/lib/api-sdk-rb/models/workflow_node_position.rb +238 -0
- data/lib/api-sdk-rb/models/workflow_preset_choice.rb +288 -0
- data/lib/api-sdk-rb/models/workflow_preset_choices.rb +224 -0
- data/lib/api-sdk-rb/models/workflow_preset_removal.rb +222 -0
- data/lib/api-sdk-rb/models/workflow_preset_widget.rb +234 -0
- data/lib/api-sdk-rb/models/workflow_publish_result.rb +256 -0
- data/lib/api-sdk-rb/models/workflow_removed.rb +221 -0
- data/lib/api-sdk-rb/models/workflow_response.rb +246 -0
- data/lib/api-sdk-rb/models/workflow_schedule.rb +298 -0
- data/lib/api-sdk-rb/models/workflow_stats.rb +347 -0
- data/lib/api-sdk-rb/models/workflow_status.rb +42 -0
- data/lib/api-sdk-rb/models/workflow_trigger.rb +303 -0
- data/lib/api-sdk-rb/models/workflow_trigger_values_inner.rb +271 -0
- data/lib/api-sdk-rb/models/workflow_version.rb +316 -0
- data/lib/api-sdk-rb/models/workflow_version_detail.rb +354 -0
- data/lib/api-sdk-rb/models/workflow_version_list.rb +224 -0
- data/lib/api-sdk-rb/models/workflow_version_published_by.rb +225 -0
- data/lib/api-sdk-rb/version.rb +1 -1
- data/lib/api-sdk-rb.rb +116 -17
- data/spec/api/brand_kit_api_spec.rb +136 -0
- data/spec/api/canvases_api_spec.rb +10 -10
- data/spec/api/compositions_api_spec.rb +227 -149
- data/spec/api/credits_api_spec.rb +5 -5
- data/spec/api/entitlements_api_spec.rb +4 -4
- data/spec/api/invoices_api_spec.rb +2 -2
- data/spec/api/managed_users_api_spec.rb +63 -42
- data/spec/api/operations_api_spec.rb +3 -3
- data/spec/api/partners_api_spec.rb +138 -84
- data/spec/api/public_embed_api_spec.rb +66 -15
- data/spec/api/tokens_api_spec.rb +3 -2
- data/spec/api/uploads_api_spec.rb +24 -24
- data/spec/api/users_api_spec.rb +43 -28
- data/spec/api/widgets_api_spec.rb +9 -9
- data/spec/api/workflows_api_spec.rb +339 -0
- data/spec/models/account_credit_transaction_list_response_spec.rb +48 -0
- data/spec/models/adapter_connection_list_response_spec.rb +48 -0
- data/spec/models/{get_managed_user_limits200_response_spec.rb → adapter_connection_removal_response_spec.rb} +6 -6
- data/spec/models/{delete_managed_user200_response_spec.rb → adapter_connection_response_spec.rb} +6 -6
- data/spec/models/adapter_connection_spec.rb +18 -0
- data/spec/models/ai_answers_knowledge_document_response_spec.rb +48 -0
- data/spec/models/brand_color_spec.rb +52 -0
- data/spec/models/brand_font_spec.rb +62 -0
- data/spec/models/brand_kit_asset_view_spec.rb +120 -0
- data/spec/models/brand_kit_figma_source_spec.rb +60 -0
- data/spec/models/brand_kit_tokens_fonts_spec.rb +54 -0
- data/spec/models/brand_kit_tokens_spec.rb +60 -0
- data/spec/models/brand_kit_view_owner_spec.rb +46 -0
- data/spec/models/{uploads_get200_response_spec.rb → brand_kit_view_response_spec.rb} +6 -6
- data/spec/models/brand_kit_view_spec.rb +90 -0
- data/spec/models/brand_spacing_spec.rb +78 -0
- data/spec/models/brand_text_style_spec.rb +52 -0
- data/spec/models/composition_database_record_response_spec.rb +48 -0
- data/spec/models/composition_last_edited_by_spec.rb +42 -0
- data/spec/models/composition_spec.rb +12 -0
- data/spec/models/confirm_adapter_connection_request_spec.rb +36 -0
- data/spec/models/content_item_write_result_response_spec.rb +48 -0
- data/spec/models/create_widget201_response_data_spec.rb +1 -7
- data/spec/models/create_workspace_workflow_from_preset_request_spec.rb +42 -0
- data/spec/models/create_workspace_workflow_request_spec.rb +48 -0
- data/spec/models/{uploads_id_delete200_response_data_spec.rb → delete_upload200_response_data_spec.rb} +6 -6
- data/spec/models/{operations_id_get_response_spec.rb → delete_upload200_response_spec.rb} +6 -6
- data/spec/models/delete_workspace_workflow200_response_spec.rb +48 -0
- data/spec/models/design_defaults_response_spec.rb +48 -0
- data/spec/models/editor_session_spec.rb +1 -1
- data/spec/models/get_operation_response_data_metadata_spec.rb +58 -0
- data/spec/models/{operations_id_get_response_data_spec.rb → get_operation_response_data_spec.rb} +6 -6
- data/spec/models/get_operation_response_spec.rb +48 -0
- data/spec/models/get_public_composition_embed200_response_adapters_captcha_spec.rb +36 -0
- data/spec/models/get_public_composition_embed200_response_adapters_spec.rb +42 -0
- data/spec/models/get_public_composition_embed200_response_entries_spec.rb +42 -0
- data/spec/models/get_public_composition_embed200_response_media_spec.rb +36 -0
- data/spec/models/get_public_composition_embed200_response_spec.rb +18 -0
- data/spec/models/{get_user_adapter_connections200_response_spec.rb → get_workspace_workflow_stats200_response_spec.rb} +6 -6
- data/spec/models/{remove_user_adapter_connection200_response_spec.rb → get_workspace_workflow_version200_response_spec.rb} +6 -6
- data/spec/models/list_partner_workflow_presets200_response_spec.rb +48 -0
- data/spec/models/list_uploads200_response_spec.rb +48 -0
- data/spec/models/{create_composition_database_record201_response_spec.rb → list_workspace_workflow_composition_options200_response_spec.rb} +6 -6
- data/spec/models/{get_partner_credit_transactions200_response_spec.rb → list_workspace_workflow_presets200_response_spec.rb} +6 -6
- data/spec/models/{add_ai_answers_knowledge_document201_response_spec.rb → list_workspace_workflow_versions200_response_spec.rb} +6 -6
- data/spec/models/list_workspace_workflows200_response_spec.rb +48 -0
- data/spec/models/managed_user_limits_response_spec.rb +48 -0
- data/spec/models/{uploads_id_delete200_response_spec.rb → managed_user_removal_response_spec.rb} +6 -6
- data/spec/models/new_editor_session_spec.rb +1 -1
- data/spec/models/offer_workflow_preset_request_spec.rb +54 -0
- data/spec/models/offered_workflow_preset_list_spec.rb +36 -0
- data/spec/models/offered_workflow_preset_spec.rb +106 -0
- data/spec/models/offered_workflow_preset_widget_spec.rb +48 -0
- data/spec/models/patch_brand_kit_asset_request_spec.rb +62 -0
- data/spec/models/patch_brand_kit_request_fonts_spec.rb +54 -0
- data/spec/models/patch_brand_kit_request_spacing_spec.rb +78 -0
- data/spec/models/patch_brand_kit_request_spec.rb +72 -0
- data/spec/models/post_brand_kit_icon_request_spec.rb +42 -0
- data/spec/models/public_workflow_events_accepted_spec.rb +48 -0
- data/spec/models/public_workflow_events_request_events_inner_spec.rb +62 -0
- data/spec/models/public_workflow_events_request_heights_inner_spec.rb +42 -0
- data/spec/models/public_workflow_events_request_spec.rb +54 -0
- data/spec/models/public_workflow_response_spec.rb +48 -0
- data/spec/models/public_workflow_spec.rb +94 -0
- data/spec/models/public_workflow_translation_spec.rb +42 -0
- data/spec/models/{get_partner_design_defaults200_response_spec.rb → publish_workspace_workflow200_response_spec.rb} +6 -6
- data/spec/models/publish_workspace_workflow_request_spec.rb +36 -0
- data/spec/models/put_brand_kit_request_spec.rb +48 -0
- data/spec/models/{create_composition_from_widget201_response_spec.rb → remove_partner_workflow_preset200_response_spec.rb} +6 -6
- data/spec/models/report_public_workflow_events200_response_spec.rb +48 -0
- data/spec/models/save_workspace_workflow_request_spec.rb +54 -0
- data/spec/models/{set_user_adapter_connection200_response_spec.rb → set_partner_workflow_preset200_response_spec.rb} +6 -6
- data/spec/models/widget_clarification_option_spec.rb +48 -0
- data/spec/models/widget_clarification_question_spec.rb +60 -0
- data/spec/models/widget_clarification_spec.rb +48 -0
- data/spec/models/widget_next_step_spec.rb +58 -0
- data/spec/models/widget_plan_decisions_adapters_inner_spec.rb +42 -0
- data/spec/models/widget_plan_decisions_libraries_inner_spec.rb +48 -0
- data/spec/models/widget_plan_decisions_responsive_spec.rb +48 -0
- data/spec/models/widget_plan_decisions_spec.rb +78 -0
- data/spec/models/widget_plan_spec.rb +60 -0
- data/spec/models/widget_plan_task_spec.rb +62 -0
- data/spec/models/widget_spec.rb +1 -7
- data/spec/models/workflow_composition_action_spec.rb +54 -0
- data/spec/models/workflow_composition_field_spec.rb +58 -0
- data/spec/models/workflow_composition_option_actions_spec.rb +52 -0
- data/spec/models/workflow_composition_option_inputs_spec.rb +58 -0
- data/spec/models/workflow_composition_option_spec.rb +72 -0
- data/spec/models/workflow_composition_options_spec.rb +54 -0
- data/spec/models/workflow_condition_case_spec.rb +58 -0
- data/spec/models/workflow_condition_test_spec.rb +52 -0
- data/spec/models/workflow_counter_spec.rb +42 -0
- data/spec/models/workflow_detail_all_of_last_edited_by_spec.rb +42 -0
- data/spec/models/workflow_detail_response_spec.rb +48 -0
- data/spec/models/workflow_detail_spec.rb +162 -0
- data/spec/models/workflow_edge_spec.rb +54 -0
- data/spec/models/workflow_failure_reason_counter_spec.rb +48 -0
- data/spec/models/workflow_failure_reason_spec.rb +30 -0
- data/spec/models/workflow_field_reference_spec.rb +56 -0
- data/spec/models/workflow_graph_spec.rb +52 -0
- data/spec/models/workflow_issue_spec.rb +70 -0
- data/spec/models/{create_composition_content_item201_response_spec.rb → workflow_list_spec.rb} +15 -9
- data/spec/models/workflow_node_position_spec.rb +42 -0
- data/spec/models/workflow_node_spec.rb +76 -0
- data/spec/models/workflow_preset_choice_spec.rb +60 -0
- data/spec/models/workflow_preset_choices_spec.rb +36 -0
- data/spec/models/workflow_preset_removal_spec.rb +36 -0
- data/spec/models/workflow_preset_widget_spec.rb +42 -0
- data/spec/models/workflow_publish_result_spec.rb +48 -0
- data/spec/models/workflow_removed_spec.rb +36 -0
- data/spec/models/workflow_response_spec.rb +48 -0
- data/spec/models/workflow_schedule_spec.rb +62 -0
- data/spec/models/workflow_spec.rb +132 -0
- data/spec/models/workflow_stats_spec.rb +84 -0
- data/spec/models/workflow_status_spec.rb +30 -0
- data/spec/models/workflow_trigger_spec.rb +70 -0
- data/spec/models/workflow_trigger_values_inner_spec.rb +46 -0
- data/spec/models/workflow_version_detail_spec.rb +78 -0
- data/spec/models/workflow_version_list_spec.rb +36 -0
- data/spec/models/workflow_version_published_by_spec.rb +42 -0
- data/spec/models/workflow_version_spec.rb +66 -0
- metadata +476 -80
- data/docs/PartnerApi.md +0 -9892
- data/docs/UploadsIdDelete200Response.md +0 -22
- data/lib/api-sdk-rb/api/partner_api.rb +0 -10693
- data/spec/api/partner_api_spec.rb +0 -1895
|
@@ -32,44 +32,59 @@ describe 'PartnersApi' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
# unit tests for
|
|
35
|
+
# unit tests for confirm_partner_adapter_connection
|
|
36
|
+
# Confirm a partner's adapter address with the code that was emailed to it
|
|
37
|
+
# Some credentials are an email address Widgetic sends a widget's messages to (`confirmation: email_code` in `getPartnerAdapterConnections`). Saving one with `setPartnerAdapterConnection` emails a six-digit code to it; this gives the code back. Only then is the address used: until it is confirmed, the widgets of the partner's customers that need it are not charged and their visitors are told the feature is unavailable. The code works for 30 minutes and for five wrong tries. After that, save the address again and a new code is emailed (not sooner than a minute after the last one). A code that is not made of digits is refused without counting as a try. Confirming an address that is already confirmed answers 200 with the same state, so a retry of a request that went through is harmless. Saving a different address, or the same one before it was confirmed, starts again. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
38
|
+
# @param partner_id The partner that keeps the address
|
|
39
|
+
# @param adapter_id The adapter the address is for
|
|
40
|
+
# @param credential_key The credential's name within the adapter
|
|
41
|
+
# @param confirm_adapter_connection_request
|
|
42
|
+
# @param [Hash] opts the optional parameters
|
|
43
|
+
# @return [AdapterConnectionResponse]
|
|
44
|
+
describe 'confirm_partner_adapter_connection 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 create_partner_extra_credits_invoice
|
|
36
51
|
# Buy extra credits for a partner
|
|
37
|
-
# 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`).
|
|
52
|
+
# 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`). Available only to partners that have an active paid contract in force with Widgetic (`NO_PAID_CONTRACT` when none is in force) and no overdue contract invoice (`CONTRACT_INVOICE_OVERDUE` while a contract invoice is past its due day). A partner that has run out of credits during its period can buy more at the list price. 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`.
|
|
38
53
|
# @param partner_id Partner ID
|
|
39
54
|
# @param idempotency_key A key of your own for this purchase, so that a retry cannot make a second invoice
|
|
40
55
|
# @param request_extra_credits
|
|
41
56
|
# @param [Hash] opts the optional parameters
|
|
42
57
|
# @return [PartnerExtraCreditsInvoiceResponse]
|
|
43
|
-
describe '
|
|
58
|
+
describe 'create_partner_extra_credits_invoice test' do
|
|
44
59
|
it 'should work' do
|
|
45
60
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
46
61
|
end
|
|
47
62
|
end
|
|
48
63
|
|
|
49
|
-
# unit tests for
|
|
64
|
+
# unit tests for get_my_partners
|
|
50
65
|
# Find the partner you administer
|
|
51
66
|
# 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.
|
|
52
67
|
# @param [Hash] opts the optional parameters
|
|
53
68
|
# @return [MyPartnersResponse]
|
|
54
|
-
describe '
|
|
69
|
+
describe 'get_my_partners test' do
|
|
55
70
|
it 'should work' do
|
|
56
71
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
72
|
end
|
|
58
73
|
end
|
|
59
74
|
|
|
60
|
-
# unit tests for
|
|
75
|
+
# unit tests for get_partner_adapter_connections
|
|
61
76
|
# See which adapter keys a partner has connected
|
|
62
77
|
# 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.
|
|
63
78
|
# @param partner_id The partner whose adapter keys to list
|
|
64
79
|
# @param [Hash] opts the optional parameters
|
|
65
|
-
# @return [
|
|
66
|
-
describe '
|
|
80
|
+
# @return [AdapterConnectionListResponse]
|
|
81
|
+
describe 'get_partner_adapter_connections test' do
|
|
67
82
|
it 'should work' do
|
|
68
83
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
69
84
|
end
|
|
70
85
|
end
|
|
71
86
|
|
|
72
|
-
# unit tests for
|
|
87
|
+
# unit tests for get_partner_analytics_by_managed_user
|
|
73
88
|
# What each managed user's widgets did
|
|
74
89
|
# 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.
|
|
75
90
|
# @param partner_id The partner whose managed users to report on
|
|
@@ -79,13 +94,13 @@ describe 'PartnersApi' do
|
|
|
79
94
|
# @option opts [Integer] :limit How many managed users to list at most
|
|
80
95
|
# @option opts [Integer] :offset How many managed users to skip
|
|
81
96
|
# @return [PartnerAnalyticsByManagedUserResponse]
|
|
82
|
-
describe '
|
|
97
|
+
describe 'get_partner_analytics_by_managed_user test' do
|
|
83
98
|
it 'should work' do
|
|
84
99
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
85
100
|
end
|
|
86
101
|
end
|
|
87
102
|
|
|
88
|
-
# unit tests for
|
|
103
|
+
# unit tests for get_partner_analytics_summary
|
|
89
104
|
# What was done with a partner's published widgets
|
|
90
105
|
# 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.
|
|
91
106
|
# @param partner_id The partner whose widgets to report on
|
|
@@ -95,13 +110,13 @@ describe 'PartnersApi' do
|
|
|
95
110
|
# @option opts [String] :managed_user_id Report only on this managed user (Widgetic's id for the user). Send this or `managedUserExternalId`, not both.
|
|
96
111
|
# @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.
|
|
97
112
|
# @return [PartnerAnalyticsSummaryResponse]
|
|
98
|
-
describe '
|
|
113
|
+
describe 'get_partner_analytics_summary test' do
|
|
99
114
|
it 'should work' do
|
|
100
115
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
101
116
|
end
|
|
102
117
|
end
|
|
103
118
|
|
|
104
|
-
# unit tests for
|
|
119
|
+
# unit tests for get_partner_analytics_timeline
|
|
105
120
|
# What was done with a partner's widgets, day by day
|
|
106
121
|
# 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.
|
|
107
122
|
# @param partner_id The partner whose widgets to report on
|
|
@@ -111,13 +126,13 @@ describe 'PartnersApi' do
|
|
|
111
126
|
# @option opts [String] :managed_user_id Report only on this managed user (Widgetic's id for the user). Send this or `managedUserExternalId`, not both.
|
|
112
127
|
# @option opts [String] :managed_user_external_id Report only on the managed user you registered with this `externalId`. Send this or `managedUserId`, not both.
|
|
113
128
|
# @return [PartnerAnalyticsTimelineResponse]
|
|
114
|
-
describe '
|
|
129
|
+
describe 'get_partner_analytics_timeline test' do
|
|
115
130
|
it 'should work' do
|
|
116
131
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
117
132
|
end
|
|
118
133
|
end
|
|
119
134
|
|
|
120
|
-
# unit tests for
|
|
135
|
+
# unit tests for get_partner_analytics_top_widgets
|
|
121
136
|
# Which widgets were viewed the most
|
|
122
137
|
# 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.
|
|
123
138
|
# @param partner_id The partner whose widgets to report on
|
|
@@ -128,49 +143,49 @@ describe 'PartnersApi' do
|
|
|
128
143
|
# @option opts [String] :managed_user_external_id Report only on the managed user you registered with this `externalId`. Send this or `managedUserId`, not both.
|
|
129
144
|
# @option opts [Integer] :limit How many widgets to list at most
|
|
130
145
|
# @return [PartnerAnalyticsTopWidgetsResponse]
|
|
131
|
-
describe '
|
|
146
|
+
describe 'get_partner_analytics_top_widgets test' do
|
|
132
147
|
it 'should work' do
|
|
133
148
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
134
149
|
end
|
|
135
150
|
end
|
|
136
151
|
|
|
137
|
-
# unit tests for
|
|
152
|
+
# unit tests for get_partner_billing_overview
|
|
138
153
|
# Get comprehensive partner billing overview
|
|
139
154
|
# 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.
|
|
140
155
|
# @param partner_id Partner ID
|
|
141
156
|
# @param [Hash] opts the optional parameters
|
|
142
157
|
# @return [GetPartnerBillingOverview200Response]
|
|
143
|
-
describe '
|
|
158
|
+
describe 'get_partner_billing_overview test' do
|
|
144
159
|
it 'should work' do
|
|
145
160
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
146
161
|
end
|
|
147
162
|
end
|
|
148
163
|
|
|
149
|
-
# unit tests for
|
|
164
|
+
# unit tests for get_partner_contract
|
|
150
165
|
# Get a partner's contract
|
|
151
166
|
# 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.
|
|
152
167
|
# @param partner_id The partner whose contract to read
|
|
153
168
|
# @param [Hash] opts the optional parameters
|
|
154
169
|
# @return [PartnerContractResponse]
|
|
155
|
-
describe '
|
|
170
|
+
describe 'get_partner_contract test' do
|
|
156
171
|
it 'should work' do
|
|
157
172
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
158
173
|
end
|
|
159
174
|
end
|
|
160
175
|
|
|
161
|
-
# unit tests for
|
|
176
|
+
# unit tests for get_partner_credit_balance
|
|
162
177
|
# Get partner credit balance
|
|
163
178
|
# 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.
|
|
164
179
|
# @param partner_id Partner ID
|
|
165
180
|
# @param [Hash] opts the optional parameters
|
|
166
181
|
# @return [AccountCreditBalanceResponse]
|
|
167
|
-
describe '
|
|
182
|
+
describe 'get_partner_credit_balance test' do
|
|
168
183
|
it 'should work' do
|
|
169
184
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
170
185
|
end
|
|
171
186
|
end
|
|
172
187
|
|
|
173
|
-
# unit tests for
|
|
188
|
+
# unit tests for get_partner_credit_transactions
|
|
174
189
|
# Get partner credit transaction history
|
|
175
190
|
# 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.
|
|
176
191
|
# @param partner_id Partner ID
|
|
@@ -178,100 +193,100 @@ describe 'PartnersApi' do
|
|
|
178
193
|
# @option opts [Integer] :limit Number of transactions to return
|
|
179
194
|
# @option opts [Integer] :offset Number of transactions to skip
|
|
180
195
|
# @option opts [String] :type Only entries of this type, for instance `debit` for the credits spent. The types are listed on `AccountCreditTransaction`.
|
|
181
|
-
# @return [
|
|
182
|
-
describe '
|
|
196
|
+
# @return [AccountCreditTransactionListResponse]
|
|
197
|
+
describe 'get_partner_credit_transactions test' do
|
|
183
198
|
it 'should work' do
|
|
184
199
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
185
200
|
end
|
|
186
201
|
end
|
|
187
202
|
|
|
188
|
-
# unit tests for
|
|
203
|
+
# unit tests for get_partner_data_database
|
|
189
204
|
# See the Neon database a partner keeps the data of its compositions in
|
|
190
205
|
# 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.
|
|
191
206
|
# @param partner_id The partner whose database to read
|
|
192
207
|
# @param [Hash] opts the optional parameters
|
|
193
208
|
# @return [PartnerDataDatabaseResponse]
|
|
194
|
-
describe '
|
|
209
|
+
describe 'get_partner_data_database test' do
|
|
195
210
|
it 'should work' do
|
|
196
211
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
197
212
|
end
|
|
198
213
|
end
|
|
199
214
|
|
|
200
|
-
# unit tests for
|
|
215
|
+
# unit tests for get_partner_design_defaults
|
|
201
216
|
# Read partner-wide design defaults
|
|
202
217
|
# @param partner_id
|
|
203
218
|
# @param [Hash] opts the optional parameters
|
|
204
|
-
# @return [
|
|
205
|
-
describe '
|
|
219
|
+
# @return [DesignDefaultsResponse]
|
|
220
|
+
describe 'get_partner_design_defaults test' do
|
|
206
221
|
it 'should work' do
|
|
207
222
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
208
223
|
end
|
|
209
224
|
end
|
|
210
225
|
|
|
211
|
-
# unit tests for
|
|
226
|
+
# unit tests for get_partner_entry_context_signing
|
|
212
227
|
# See how the context of your embeds is signed
|
|
213
228
|
# 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.
|
|
214
229
|
# @param partner_id The partner whose context signing to read
|
|
215
230
|
# @param [Hash] opts the optional parameters
|
|
216
231
|
# @return [PartnerEntryContextSigningResponse]
|
|
217
|
-
describe '
|
|
232
|
+
describe 'get_partner_entry_context_signing test' do
|
|
218
233
|
it 'should work' do
|
|
219
234
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
220
235
|
end
|
|
221
236
|
end
|
|
222
237
|
|
|
223
|
-
# unit tests for
|
|
238
|
+
# unit tests for get_partner_notification_settings
|
|
224
239
|
# Where your notifications go
|
|
225
240
|
# 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.
|
|
226
241
|
# @param partner_id The partner whose notification settings to read
|
|
227
242
|
# @param [Hash] opts the optional parameters
|
|
228
243
|
# @return [PartnerNotificationSettingsResponse]
|
|
229
|
-
describe '
|
|
244
|
+
describe 'get_partner_notification_settings test' do
|
|
230
245
|
it 'should work' do
|
|
231
246
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
232
247
|
end
|
|
233
248
|
end
|
|
234
249
|
|
|
235
|
-
# unit tests for
|
|
250
|
+
# unit tests for get_partner_storage_destination
|
|
236
251
|
# Get where a partner's uploaded files are stored
|
|
237
252
|
# 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.
|
|
238
253
|
# @param partner_id The partner whose storage destination to read
|
|
239
254
|
# @param [Hash] opts the optional parameters
|
|
240
255
|
# @return [PartnerStorageDestinationResponse]
|
|
241
|
-
describe '
|
|
256
|
+
describe 'get_partner_storage_destination test' do
|
|
242
257
|
it 'should work' do
|
|
243
258
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
244
259
|
end
|
|
245
260
|
end
|
|
246
261
|
|
|
247
|
-
# unit tests for
|
|
262
|
+
# unit tests for get_partner_storage_usage
|
|
248
263
|
# What a partner's customers store
|
|
249
|
-
# 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 (`
|
|
264
|
+
# 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 (`uploadFile`, 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 `listUploads`. 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.
|
|
250
265
|
# @param partner_id The partner whose storage to report on
|
|
251
266
|
# @param [Hash] opts the optional parameters
|
|
252
267
|
# @option opts [Integer] :limit How many managed users to list at most
|
|
253
268
|
# @option opts [Integer] :offset How many managed users to skip
|
|
254
269
|
# @return [PartnerStorageUsageResponse]
|
|
255
|
-
describe '
|
|
270
|
+
describe 'get_partner_storage_usage test' do
|
|
256
271
|
it 'should work' do
|
|
257
272
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
258
273
|
end
|
|
259
274
|
end
|
|
260
275
|
|
|
261
|
-
# unit tests for
|
|
276
|
+
# unit tests for list_partner_notification_deliveries
|
|
262
277
|
# How your notifications reached you
|
|
263
278
|
# 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.
|
|
264
279
|
# @param partner_id The partner whose deliveries to list
|
|
265
280
|
# @param [Hash] opts the optional parameters
|
|
266
281
|
# @option opts [Integer] :limit How many deliveries to list at most
|
|
267
282
|
# @return [PartnerNotificationDeliveryLogResponse]
|
|
268
|
-
describe '
|
|
283
|
+
describe 'list_partner_notification_deliveries test' do
|
|
269
284
|
it 'should work' do
|
|
270
285
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
271
286
|
end
|
|
272
287
|
end
|
|
273
288
|
|
|
274
|
-
# unit tests for
|
|
289
|
+
# unit tests for list_partner_notifications
|
|
275
290
|
# What your partner account was told
|
|
276
291
|
# 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.
|
|
277
292
|
# @param partner_id The partner whose notifications to list
|
|
@@ -279,76 +294,101 @@ describe 'PartnersApi' do
|
|
|
279
294
|
# @option opts [Integer] :limit How many notifications to list at most
|
|
280
295
|
# @option opts [Time] :before Only the notifications made before this moment. Give the `nextBefore` of the previous page.
|
|
281
296
|
# @return [PartnerNotificationPageResponse]
|
|
282
|
-
describe '
|
|
297
|
+
describe 'list_partner_notifications test' do
|
|
283
298
|
it 'should work' do
|
|
284
299
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
285
300
|
end
|
|
286
301
|
end
|
|
287
302
|
|
|
288
|
-
# unit tests for
|
|
303
|
+
# unit tests for list_partner_presets
|
|
289
304
|
# List the widgets a partner offers as presets
|
|
290
305
|
# 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.
|
|
291
306
|
# @param partner_id The partner whose presets to list
|
|
292
307
|
# @param [Hash] opts the optional parameters
|
|
293
308
|
# @return [ListPartnerPresets200Response]
|
|
294
|
-
describe '
|
|
309
|
+
describe 'list_partner_presets test' do
|
|
310
|
+
it 'should work' do
|
|
311
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
312
|
+
end
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
# unit tests for list_partner_workflow_presets
|
|
316
|
+
# List the workflows a partner offers as places to start
|
|
317
|
+
# The partner's starting points, ordered by `position` and then by `key`: the published workflows it offers its managed users when they make a new workflow. Each says whether people can start from it now and, when they cannot, why. The list is the same for every managed user, and a managed user is shown only what is available. A starting point is one of the partner account's own published workflows, built from compositions the account made for itself (not for a customer or a team) and from widgets the partner already offers as presets (`setPartnerPreset`), and it uses at most 10 widgets. A partner offers up to 50. The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator.
|
|
318
|
+
# @param partner_id The partner whose starting points to list
|
|
319
|
+
# @param [Hash] opts the optional parameters
|
|
320
|
+
# @return [ListPartnerWorkflowPresets200Response]
|
|
321
|
+
describe 'list_partner_workflow_presets test' do
|
|
295
322
|
it 'should work' do
|
|
296
323
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
297
324
|
end
|
|
298
325
|
end
|
|
299
326
|
|
|
300
|
-
# unit tests for
|
|
327
|
+
# unit tests for remove_partner_adapter_connection
|
|
301
328
|
# Remove an adapter key from a partner
|
|
302
329
|
# 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.
|
|
303
330
|
# @param partner_id The partner that keeps the key
|
|
304
331
|
# @param adapter_id The adapter the key is for
|
|
305
332
|
# @param credential_key The key's name within the adapter
|
|
306
333
|
# @param [Hash] opts the optional parameters
|
|
307
|
-
# @return [
|
|
308
|
-
describe '
|
|
334
|
+
# @return [AdapterConnectionRemovalResponse]
|
|
335
|
+
describe 'remove_partner_adapter_connection test' do
|
|
309
336
|
it 'should work' do
|
|
310
337
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
311
338
|
end
|
|
312
339
|
end
|
|
313
340
|
|
|
314
|
-
# unit tests for
|
|
341
|
+
# unit tests for remove_partner_data_database
|
|
315
342
|
# Stop keeping the data of a partner's compositions in its own database
|
|
316
343
|
# 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.
|
|
317
344
|
# @param partner_id The partner whose database to remove
|
|
318
345
|
# @param [Hash] opts the optional parameters
|
|
319
346
|
# @return [PartnerDataDatabaseRemovalResponse]
|
|
320
|
-
describe '
|
|
347
|
+
describe 'remove_partner_data_database test' do
|
|
321
348
|
it 'should work' do
|
|
322
349
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
323
350
|
end
|
|
324
351
|
end
|
|
325
352
|
|
|
326
|
-
# unit tests for
|
|
353
|
+
# unit tests for remove_partner_preset
|
|
327
354
|
# Take a widget off the partner's presets
|
|
328
355
|
# 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`.
|
|
329
356
|
# @param partner_id The partner whose preset to remove
|
|
330
357
|
# @param key The key of the preset to remove
|
|
331
358
|
# @param [Hash] opts the optional parameters
|
|
332
359
|
# @return [PartnerPresetRemovalResponse]
|
|
333
|
-
describe '
|
|
360
|
+
describe 'remove_partner_preset test' do
|
|
334
361
|
it 'should work' do
|
|
335
362
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
336
363
|
end
|
|
337
364
|
end
|
|
338
365
|
|
|
339
|
-
# unit tests for
|
|
366
|
+
# unit tests for remove_partner_storage_destination
|
|
340
367
|
# Stop storing a partner's uploaded files in its own bucket
|
|
341
368
|
# 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.
|
|
342
369
|
# @param partner_id The partner whose storage destination to remove
|
|
343
370
|
# @param [Hash] opts the optional parameters
|
|
344
371
|
# @return [PartnerStorageRemovalResponse]
|
|
345
|
-
describe '
|
|
372
|
+
describe 'remove_partner_storage_destination test' do
|
|
346
373
|
it 'should work' do
|
|
347
374
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
348
375
|
end
|
|
349
376
|
end
|
|
350
377
|
|
|
351
|
-
# unit tests for
|
|
378
|
+
# unit tests for remove_partner_workflow_preset
|
|
379
|
+
# Stop offering a workflow as a place to start
|
|
380
|
+
# Removes the starting point under `key`. The workflow itself is not touched, and neither are the workflows people already started from it. Removing a starting point the partner does not offer is not an error: the answer is `removed: false`.
|
|
381
|
+
# @param partner_id The partner whose starting point to remove
|
|
382
|
+
# @param key The key of the starting point to remove
|
|
383
|
+
# @param [Hash] opts the optional parameters
|
|
384
|
+
# @return [RemovePartnerWorkflowPreset200Response]
|
|
385
|
+
describe 'remove_partner_workflow_preset test' do
|
|
386
|
+
it 'should work' do
|
|
387
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
388
|
+
end
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
# unit tests for replay_partner_notification_delivery
|
|
352
392
|
# Send a webhook delivery again
|
|
353
393
|
# 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.
|
|
354
394
|
# @param partner_id The partner whose delivery to replay
|
|
@@ -356,39 +396,39 @@ describe 'PartnersApi' do
|
|
|
356
396
|
# @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`).
|
|
357
397
|
# @param [Hash] opts the optional parameters
|
|
358
398
|
# @return [PartnerNotificationDeliveryResponse]
|
|
359
|
-
describe '
|
|
399
|
+
describe 'replay_partner_notification_delivery test' do
|
|
360
400
|
it 'should work' do
|
|
361
401
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
362
402
|
end
|
|
363
403
|
end
|
|
364
404
|
|
|
365
|
-
# unit tests for
|
|
405
|
+
# unit tests for rotate_partner_entry_context_secret
|
|
366
406
|
# Make a secret to sign the context of your embeds
|
|
367
407
|
# 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.
|
|
368
408
|
# @param partner_id The partner whose secret to make
|
|
369
409
|
# @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`).
|
|
370
410
|
# @param [Hash] opts the optional parameters
|
|
371
411
|
# @return [PartnerEntryContextSecretResponse]
|
|
372
|
-
describe '
|
|
412
|
+
describe 'rotate_partner_entry_context_secret test' do
|
|
373
413
|
it 'should work' do
|
|
374
414
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
375
415
|
end
|
|
376
416
|
end
|
|
377
417
|
|
|
378
|
-
# unit tests for
|
|
418
|
+
# unit tests for rotate_partner_webhook_secret
|
|
379
419
|
# Make a new secret for your webhook
|
|
380
420
|
# 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.
|
|
381
421
|
# @param partner_id The partner whose webhook secret to replace
|
|
382
422
|
# @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`).
|
|
383
423
|
# @param [Hash] opts the optional parameters
|
|
384
424
|
# @return [PartnerNotificationSettingsChangeResponse]
|
|
385
|
-
describe '
|
|
425
|
+
describe 'rotate_partner_webhook_secret test' do
|
|
386
426
|
it 'should work' do
|
|
387
427
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
388
428
|
end
|
|
389
429
|
end
|
|
390
430
|
|
|
391
|
-
# unit tests for
|
|
431
|
+
# unit tests for send_partner_notification_test_event
|
|
392
432
|
# Send a test event to your webhook
|
|
393
433
|
# 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.
|
|
394
434
|
# @param partner_id The partner whose webhook to try
|
|
@@ -396,54 +436,54 @@ describe 'PartnersApi' do
|
|
|
396
436
|
# @param partner_notification_test_event_request
|
|
397
437
|
# @param [Hash] opts the optional parameters
|
|
398
438
|
# @return [PartnerNotificationTestEventResultResponse]
|
|
399
|
-
describe '
|
|
439
|
+
describe 'send_partner_notification_test_event test' do
|
|
400
440
|
it 'should work' do
|
|
401
441
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
402
442
|
end
|
|
403
443
|
end
|
|
404
444
|
|
|
405
|
-
# unit tests for
|
|
445
|
+
# unit tests for set_partner_adapter_connection
|
|
406
446
|
# Connect an adapter key to a partner
|
|
407
|
-
# 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
|
|
447
|
+
# 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. **An address that has to be confirmed.** Some credentials are not a key but the email address Widgetic sends a widget's messages to (`confirmation: email_code` in `getPartnerAdapterConnections`). Saving one checks that it is one email address and emails a six-digit code to it; the answer says `awaitingConfirmation: true`, and nothing is sent to the address until the code is given back with `confirmPartnerAdapterConnection`. Saving the same address again before it is confirmed emails a new code (not sooner than a minute after the last); saving the address that is already confirmed changes nothing. If the code cannot be emailed, nothing is saved. A widget whose adapter has no key connected, or whose address is not confirmed yet, is not charged and does not run that adapter: its visitors are told the feature is unavailable, and the partner is told once a day what to do. 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.
|
|
408
448
|
# @param partner_id The partner that keeps the key
|
|
409
449
|
# @param adapter_id The adapter the key is for
|
|
410
450
|
# @param credential_key The key's name within the adapter
|
|
411
451
|
# @param set_adapter_connection_request
|
|
412
452
|
# @param [Hash] opts the optional parameters
|
|
413
|
-
# @return [
|
|
414
|
-
describe '
|
|
453
|
+
# @return [AdapterConnectionResponse]
|
|
454
|
+
describe 'set_partner_adapter_connection test' do
|
|
415
455
|
it 'should work' do
|
|
416
456
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
417
457
|
end
|
|
418
458
|
end
|
|
419
459
|
|
|
420
|
-
# unit tests for
|
|
460
|
+
# unit tests for set_partner_data_database
|
|
421
461
|
# Keep the data of a partner's compositions in a Neon database of its own
|
|
422
462
|
# 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.
|
|
423
463
|
# @param partner_id The partner whose database to set
|
|
424
464
|
# @param set_partner_data_database_request
|
|
425
465
|
# @param [Hash] opts the optional parameters
|
|
426
466
|
# @return [PartnerDataDatabaseResponse]
|
|
427
|
-
describe '
|
|
467
|
+
describe 'set_partner_data_database test' do
|
|
428
468
|
it 'should work' do
|
|
429
469
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
430
470
|
end
|
|
431
471
|
end
|
|
432
472
|
|
|
433
|
-
# unit tests for
|
|
473
|
+
# unit tests for set_partner_design_defaults
|
|
434
474
|
# Set or clear partner-wide design defaults
|
|
435
475
|
# 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.
|
|
436
476
|
# @param partner_id
|
|
437
477
|
# @param set_partner_design_defaults_request
|
|
438
478
|
# @param [Hash] opts the optional parameters
|
|
439
|
-
# @return [
|
|
440
|
-
describe '
|
|
479
|
+
# @return [DesignDefaultsResponse]
|
|
480
|
+
describe 'set_partner_design_defaults test' do
|
|
441
481
|
it 'should work' do
|
|
442
482
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
443
483
|
end
|
|
444
484
|
end
|
|
445
485
|
|
|
446
|
-
# unit tests for
|
|
486
|
+
# unit tests for set_partner_preset
|
|
447
487
|
# Make a widget a preset, or replace a preset
|
|
448
488
|
# 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.
|
|
449
489
|
# @param partner_id The partner whose preset to set
|
|
@@ -451,26 +491,40 @@ describe 'PartnersApi' do
|
|
|
451
491
|
# @param set_partner_preset_request
|
|
452
492
|
# @param [Hash] opts the optional parameters
|
|
453
493
|
# @return [PartnerPresetResponse]
|
|
454
|
-
describe '
|
|
494
|
+
describe 'set_partner_preset test' do
|
|
455
495
|
it 'should work' do
|
|
456
496
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
457
497
|
end
|
|
458
498
|
end
|
|
459
499
|
|
|
460
|
-
# unit tests for
|
|
500
|
+
# unit tests for set_partner_storage_destination
|
|
461
501
|
# Set where a partner's uploaded files are stored
|
|
462
|
-
# 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 `
|
|
502
|
+
# 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 `uploadFile` (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.
|
|
463
503
|
# @param partner_id The partner whose storage destination to set
|
|
464
504
|
# @param set_partner_storage_destination_request
|
|
465
505
|
# @param [Hash] opts the optional parameters
|
|
466
506
|
# @return [PartnerStorageDestinationResponse]
|
|
467
|
-
describe '
|
|
507
|
+
describe 'set_partner_storage_destination test' do
|
|
508
|
+
it 'should work' do
|
|
509
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
510
|
+
end
|
|
511
|
+
end
|
|
512
|
+
|
|
513
|
+
# unit tests for set_partner_workflow_preset
|
|
514
|
+
# Offer a workflow as a place to start, or replace what a key offers
|
|
515
|
+
# Offers one of the partner account's own published workflows to its managed users under `key`. If the partner already offers something under that key it is replaced, so sending the same request twice is safe. Saving replaces the whole starting point: 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. A workflow is offered once. What people get is the workflow's live version as it is when they start, so publishing the workflow changes what new starts get; workflows people already started are never touched. The offer is refused, and `error.details.reason` says why, when the workflow: - is not the partner account's own (a workflow of a team or of a customer, or of somebody else), or does not exist: 404, the same for both; - is archived (409 `workflow_archived`), or was never published (409 `workflow_not_published`); - shows no composition (422 `workflow_empty`), or a block shows a composition made for a customer or a team (422 `composition_not_own`); - chains more than 10 widgets (422 `too_many_widgets`), or a widget that the partner does not offer as a preset (422 `widget_not_preset`; `error.details.widgets` lists them, each with its `id` and `name`, so they can be offered first with `setPartnerPreset`); - is already offered under another key (409 `workflow_already_offered`; `error.details.key` says which), or the partner already offers 50 (409 `too_many_presets`). The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator, who offers the partner's workflow on its behalf.
|
|
516
|
+
# @param partner_id The partner whose starting point to set
|
|
517
|
+
# @param key The name your code and the picker use for the starting point
|
|
518
|
+
# @param offer_workflow_preset_request
|
|
519
|
+
# @param [Hash] opts the optional parameters
|
|
520
|
+
# @return [SetPartnerWorkflowPreset200Response]
|
|
521
|
+
describe 'set_partner_workflow_preset test' do
|
|
468
522
|
it 'should work' do
|
|
469
523
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
470
524
|
end
|
|
471
525
|
end
|
|
472
526
|
|
|
473
|
-
# unit tests for
|
|
527
|
+
# unit tests for update_partner_entry_context_signing
|
|
474
528
|
# Require a signed context, or stop requiring it
|
|
475
529
|
# 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.
|
|
476
530
|
# @param partner_id The partner whose context signing to change
|
|
@@ -478,13 +532,13 @@ describe 'PartnersApi' do
|
|
|
478
532
|
# @param [Hash] opts the optional parameters
|
|
479
533
|
# @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`).
|
|
480
534
|
# @return [PartnerEntryContextSigningResponse]
|
|
481
|
-
describe '
|
|
535
|
+
describe 'update_partner_entry_context_signing test' do
|
|
482
536
|
it 'should work' do
|
|
483
537
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
484
538
|
end
|
|
485
539
|
end
|
|
486
540
|
|
|
487
|
-
# unit tests for
|
|
541
|
+
# unit tests for update_partner_notification_settings
|
|
488
542
|
# Choose where your notifications go
|
|
489
543
|
# 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.
|
|
490
544
|
# @param partner_id The partner whose notification settings to change
|
|
@@ -492,31 +546,31 @@ describe 'PartnersApi' do
|
|
|
492
546
|
# @param [Hash] opts the optional parameters
|
|
493
547
|
# @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`).
|
|
494
548
|
# @return [PartnerNotificationSettingsChangeResponse]
|
|
495
|
-
describe '
|
|
549
|
+
describe 'update_partner_notification_settings test' do
|
|
496
550
|
it 'should work' do
|
|
497
551
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
498
552
|
end
|
|
499
553
|
end
|
|
500
554
|
|
|
501
|
-
# unit tests for
|
|
555
|
+
# unit tests for verify_partner_data_database
|
|
502
556
|
# Check that a partner's own database still works
|
|
503
557
|
# 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.
|
|
504
558
|
# @param partner_id The partner whose database to check
|
|
505
559
|
# @param [Hash] opts the optional parameters
|
|
506
560
|
# @return [PartnerDataDatabaseResponse]
|
|
507
|
-
describe '
|
|
561
|
+
describe 'verify_partner_data_database test' do
|
|
508
562
|
it 'should work' do
|
|
509
563
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
510
564
|
end
|
|
511
565
|
end
|
|
512
566
|
|
|
513
|
-
# unit tests for
|
|
567
|
+
# unit tests for verify_partner_storage_destination
|
|
514
568
|
# Check that a partner's storage destination still works
|
|
515
569
|
# 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.
|
|
516
570
|
# @param partner_id The partner whose storage destination to check
|
|
517
571
|
# @param [Hash] opts the optional parameters
|
|
518
572
|
# @return [PartnerStorageDestinationResponse]
|
|
519
|
-
describe '
|
|
573
|
+
describe 'verify_partner_storage_destination test' do
|
|
520
574
|
it 'should work' do
|
|
521
575
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
522
576
|
end
|