api-sdk-rb 1.11.111 → 1.11.133
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +207 -381
- data/docs/{GetPartnerCreditTransactions200Response.md → AccountCreditTransactionListResponse.md} +2 -2
- data/docs/{GetUserAdapterConnections200Response.md → AdapterConnectionListResponse.md} +2 -2
- data/docs/{RemoveUserAdapterConnection200Response.md → AdapterConnectionRemovalResponse.md} +2 -2
- data/docs/{SetUserAdapterConnection200Response.md → AdapterConnectionResponse.md} +2 -2
- data/docs/{AddAiAnswersKnowledgeDocument201Response.md → AiAnswersKnowledgeDocumentResponse.md} +2 -2
- data/docs/BrandKitApi.md +74 -74
- data/docs/BrandKitTokens.md +2 -0
- data/docs/BrandKitView.md +1 -1
- data/docs/BrandTextStyle.md +22 -0
- data/docs/CanvasesApi.md +45 -45
- data/docs/{CreateCompositionDatabaseRecord201Response.md → CompositionDatabaseRecordResponse.md} +2 -2
- data/docs/CompositionsApi.md +615 -349
- data/docs/{CreateCompositionContentItem201Response.md → ContentItemWriteResultResponse.md} +2 -2
- data/docs/CreditsApi.md +20 -20
- data/docs/{CreateCompositionFromWidget201Response.md → DeleteUpload200Response.md} +3 -3
- data/docs/{UploadsIdDelete200ResponseData.md → DeleteUpload200ResponseData.md} +2 -2
- data/docs/{GetPartnerDesignDefaults200Response.md → DesignDefaultsResponse.md} +2 -2
- data/docs/EntitlementsApi.md +18 -18
- data/docs/{OperationsIdGetResponse.md → GetOperationResponse.md} +3 -3
- data/docs/{OperationsIdGetResponseData.md → GetOperationResponseData.md} +3 -3
- data/docs/GetOperationResponseDataMetadata.md +24 -0
- data/docs/InvoicesApi.md +9 -9
- data/docs/{UploadsGet200Response.md → ListUploads200Response.md} +2 -2
- data/docs/{GetManagedUserLimits200Response.md → ManagedUserLimitsResponse.md} +2 -2
- data/docs/{DeleteManagedUser200Response.md → ManagedUserRemovalResponse.md} +2 -2
- data/docs/ManagedUsersApi.md +261 -171
- data/docs/OperationsApi.md +11 -11
- data/docs/PartnersApi.md +388 -388
- data/docs/PatchBrandKitRequest.md +2 -0
- data/docs/PublicEmbedApi.md +95 -95
- data/docs/PublicWorkflowEventsRequestEventsInner.md +3 -1
- data/docs/{GetPublicWorkflow200Response.md → PublicWorkflowResponse.md} +2 -2
- data/docs/TokensApi.md +11 -9
- data/docs/Upload.md +1 -1
- data/docs/UploadLimits.md +3 -3
- data/docs/UploadsApi.md +85 -85
- data/docs/UsersApi.md +125 -125
- data/docs/WidgetClarification.md +22 -0
- data/docs/WidgetClarificationOption.md +22 -0
- data/docs/WidgetClarificationQuestion.md +26 -0
- data/docs/WidgetNextStep.md +24 -0
- data/docs/WidgetPlan.md +26 -0
- data/docs/WidgetPlanDecisions.md +32 -0
- data/docs/WidgetPlanDecisionsAdaptersInner.md +20 -0
- data/docs/WidgetPlanDecisionsLibrariesInner.md +22 -0
- data/docs/WidgetPlanDecisionsResponsive.md +22 -0
- data/docs/WidgetPlanTask.md +24 -0
- data/docs/WidgetsApi.md +38 -38
- data/docs/{CreateWorkspaceWorkflowFromPreset201Response.md → WorkflowDetailResponse.md} +2 -2
- data/docs/WorkflowFailureReason.md +15 -0
- data/docs/WorkflowFailureReasonCounter.md +22 -0
- data/docs/{SaveWorkspaceWorkflow200Response.md → WorkflowResponse.md} +2 -2
- data/docs/WorkflowStats.md +4 -2
- data/docs/WorkflowsApi.md +197 -413
- data/lib/api-sdk-rb/api/brand_kit_api.rb +61 -61
- data/lib/api-sdk-rb/api/canvases_api.rb +39 -39
- data/lib/api-sdk-rb/api/compositions_api.rb +770 -441
- data/lib/api-sdk-rb/api/credits_api.rb +20 -20
- data/lib/api-sdk-rb/api/entitlements_api.rb +14 -14
- data/lib/api-sdk-rb/api/invoices_api.rb +10 -10
- data/lib/api-sdk-rb/api/managed_users_api.rb +278 -172
- data/lib/api-sdk-rb/api/operations_api.rb +10 -10
- data/lib/api-sdk-rb/api/partners_api.rb +389 -389
- data/lib/api-sdk-rb/api/public_embed_api.rb +95 -95
- data/lib/api-sdk-rb/api/tokens_api.rb +8 -6
- data/lib/api-sdk-rb/api/uploads_api.rb +96 -96
- data/lib/api-sdk-rb/api/users_api.rb +132 -132
- data/lib/api-sdk-rb/api/widgets_api.rb +40 -40
- data/lib/api-sdk-rb/api/workflows_api.rb +246 -468
- data/lib/api-sdk-rb/configuration.rb +0 -60
- data/lib/api-sdk-rb/models/{get_user_adapter_connections200_response.rb → account_credit_transaction_list_response.rb} +4 -4
- data/lib/api-sdk-rb/models/{get_partner_credit_transactions200_response.rb → adapter_connection_list_response.rb} +4 -4
- data/lib/api-sdk-rb/models/{save_workspace_workflow200_response.rb → adapter_connection_removal_response.rb} +4 -4
- data/lib/api-sdk-rb/models/{set_user_adapter_connection200_response.rb → adapter_connection_response.rb} +3 -3
- data/lib/api-sdk-rb/models/{add_ai_answers_knowledge_document201_response.rb → ai_answers_knowledge_document_response.rb} +3 -3
- data/lib/api-sdk-rb/models/brand_kit_tokens.rb +33 -2
- data/lib/api-sdk-rb/models/brand_kit_view.rb +1 -1
- data/lib/api-sdk-rb/models/brand_text_style.rb +344 -0
- data/lib/api-sdk-rb/models/{create_composition_database_record201_response.rb → composition_database_record_response.rb} +3 -3
- data/lib/api-sdk-rb/models/{create_composition_content_item201_response.rb → content_item_write_result_response.rb} +3 -3
- data/lib/api-sdk-rb/models/{operations_id_get_response.rb → delete_upload200_response.rb} +4 -5
- data/lib/api-sdk-rb/models/{uploads_id_delete200_response_data.rb → delete_upload200_response_data.rb} +3 -3
- data/lib/api-sdk-rb/models/{get_partner_design_defaults200_response.rb → design_defaults_response.rb} +3 -3
- data/lib/api-sdk-rb/models/get_operation_response.rb +247 -0
- data/lib/api-sdk-rb/models/{operations_id_get_response_data.rb → get_operation_response_data.rb} +5 -8
- data/lib/api-sdk-rb/models/get_operation_response_data_metadata.rb +283 -0
- data/lib/api-sdk-rb/models/{uploads_get200_response.rb → list_uploads200_response.rb} +3 -3
- data/lib/api-sdk-rb/models/{get_managed_user_limits200_response.rb → managed_user_limits_response.rb} +3 -3
- data/lib/api-sdk-rb/models/{uploads_id_delete200_response.rb → managed_user_removal_response.rb} +4 -4
- data/lib/api-sdk-rb/models/patch_brand_kit_request.rb +32 -1
- data/lib/api-sdk-rb/models/public_workflow_events_request_events_inner.rb +26 -4
- data/lib/api-sdk-rb/models/{get_public_workflow200_response.rb → public_workflow_response.rb} +3 -3
- data/lib/api-sdk-rb/models/upload.rb +1 -1
- data/lib/api-sdk-rb/models/upload_limits.rb +3 -3
- data/lib/api-sdk-rb/models/widget_clarification.rb +279 -0
- data/lib/api-sdk-rb/models/{create_composition_from_widget201_response.rb → widget_clarification_option.rb} +40 -30
- data/lib/api-sdk-rb/models/widget_clarification_question.rb +329 -0
- data/lib/api-sdk-rb/models/widget_next_step.rb +307 -0
- data/lib/api-sdk-rb/models/widget_plan.rb +306 -0
- data/lib/api-sdk-rb/models/widget_plan_decisions.rb +346 -0
- data/lib/api-sdk-rb/models/widget_plan_decisions_adapters_inner.rb +237 -0
- data/lib/api-sdk-rb/models/{create_workspace_workflow_from_preset201_response.rb → widget_plan_decisions_libraries_inner.rb} +39 -30
- data/lib/api-sdk-rb/models/widget_plan_decisions_responsive.rb +311 -0
- data/lib/api-sdk-rb/models/widget_plan_task.rb +320 -0
- data/lib/api-sdk-rb/models/{delete_managed_user200_response.rb → workflow_detail_response.rb} +4 -4
- data/lib/api-sdk-rb/models/workflow_failure_reason.rb +42 -0
- data/lib/api-sdk-rb/models/workflow_failure_reason_counter.rb +277 -0
- data/lib/api-sdk-rb/models/workflow_response.rb +246 -0
- data/lib/api-sdk-rb/models/workflow_stats.rb +17 -5
- data/lib/api-sdk-rb/version.rb +1 -1
- data/lib/api-sdk-rb.rb +32 -21
- data/spec/api/brand_kit_api_spec.rb +18 -18
- data/spec/api/canvases_api_spec.rb +10 -10
- data/spec/api/compositions_api_spec.rb +144 -83
- data/spec/api/credits_api_spec.rb +5 -5
- data/spec/api/entitlements_api_spec.rb +4 -4
- data/spec/api/invoices_api_spec.rb +2 -2
- data/spec/api/managed_users_api_spec.rb +63 -42
- data/spec/api/operations_api_spec.rb +3 -3
- data/spec/api/partners_api_spec.rb +91 -91
- data/spec/api/public_embed_api_spec.rb +23 -23
- data/spec/api/tokens_api_spec.rb +3 -2
- data/spec/api/uploads_api_spec.rb +24 -24
- data/spec/api/users_api_spec.rb +30 -30
- data/spec/api/widgets_api_spec.rb +9 -9
- data/spec/api/workflows_api_spec.rb +50 -89
- data/spec/models/{get_user_adapter_connections200_response_spec.rb → account_credit_transaction_list_response_spec.rb} +6 -6
- data/spec/models/{get_public_workflow200_response_spec.rb → adapter_connection_list_response_spec.rb} +6 -6
- data/spec/models/{save_workspace_workflow200_response_spec.rb → adapter_connection_removal_response_spec.rb} +6 -6
- data/spec/models/{delete_managed_user200_response_spec.rb → adapter_connection_response_spec.rb} +6 -6
- data/spec/models/ai_answers_knowledge_document_response_spec.rb +48 -0
- data/spec/models/brand_kit_tokens_spec.rb +6 -0
- data/spec/models/{create_composition_from_widget201_response_spec.rb → brand_text_style_spec.rb} +13 -9
- data/spec/models/{get_managed_user_limits200_response_spec.rb → composition_database_record_response_spec.rb} +6 -6
- data/spec/models/content_item_write_result_response_spec.rb +48 -0
- data/spec/models/{uploads_id_delete200_response_data_spec.rb → delete_upload200_response_data_spec.rb} +6 -6
- data/spec/models/{operations_id_get_response_spec.rb → delete_upload200_response_spec.rb} +6 -6
- data/spec/models/design_defaults_response_spec.rb +48 -0
- data/spec/models/get_operation_response_data_metadata_spec.rb +58 -0
- data/spec/models/{operations_id_get_response_data_spec.rb → get_operation_response_data_spec.rb} +6 -6
- data/spec/models/{uploads_get200_response_spec.rb → get_operation_response_spec.rb} +6 -6
- data/spec/models/list_uploads200_response_spec.rb +48 -0
- data/spec/models/managed_user_limits_response_spec.rb +48 -0
- data/spec/models/{uploads_id_delete200_response_spec.rb → managed_user_removal_response_spec.rb} +6 -6
- data/spec/models/patch_brand_kit_request_spec.rb +6 -0
- data/spec/models/public_workflow_events_request_events_inner_spec.rb +10 -0
- data/spec/models/public_workflow_response_spec.rb +48 -0
- data/spec/models/widget_clarification_option_spec.rb +48 -0
- data/spec/models/widget_clarification_question_spec.rb +60 -0
- data/spec/models/widget_clarification_spec.rb +48 -0
- data/spec/models/widget_next_step_spec.rb +58 -0
- data/spec/models/widget_plan_decisions_adapters_inner_spec.rb +42 -0
- data/spec/models/widget_plan_decisions_libraries_inner_spec.rb +48 -0
- data/spec/models/widget_plan_decisions_responsive_spec.rb +48 -0
- data/spec/models/widget_plan_decisions_spec.rb +78 -0
- data/spec/models/{create_composition_database_record201_response_spec.rb → widget_plan_spec.rb} +21 -9
- data/spec/models/widget_plan_task_spec.rb +62 -0
- data/spec/models/workflow_detail_response_spec.rb +48 -0
- data/spec/models/workflow_failure_reason_counter_spec.rb +48 -0
- data/spec/models/workflow_failure_reason_spec.rb +30 -0
- data/spec/models/workflow_response_spec.rb +48 -0
- data/spec/models/workflow_stats_spec.rb +6 -0
- metadata +130 -86
- data/docs/PartnerApi.md +0 -12714
- data/docs/UploadsIdDelete200Response.md +0 -22
- data/docs/WorkspacesApi.md +0 -1527
- data/lib/api-sdk-rb/api/partner_api.rb +0 -13791
- data/lib/api-sdk-rb/api/workspaces_api.rb +0 -1775
- data/lib/api-sdk-rb/models/remove_user_adapter_connection200_response.rb +0 -246
- data/spec/api/partner_api_spec.rb +0 -2437
- data/spec/api/workspaces_api_spec.rb +0 -339
- data/spec/models/add_ai_answers_knowledge_document201_response_spec.rb +0 -48
- data/spec/models/create_composition_content_item201_response_spec.rb +0 -48
- data/spec/models/create_workspace_workflow_from_preset201_response_spec.rb +0 -48
- data/spec/models/get_partner_credit_transactions200_response_spec.rb +0 -48
- data/spec/models/get_partner_design_defaults200_response_spec.rb +0 -48
- data/spec/models/remove_user_adapter_connection200_response_spec.rb +0 -48
- data/spec/models/set_user_adapter_connection200_response_spec.rb +0 -48
|
@@ -32,19 +32,19 @@ describe 'CreditsApi' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
# unit tests for
|
|
35
|
+
# unit tests for get_user_credit_balance
|
|
36
36
|
# Get an account's credit balance
|
|
37
37
|
# Returns the credits an account holds: the balance, and how much of it is reserved by operations that are still running. An account reads its own balance; with a partner's API key, that is the account of the person who administers the partner. Widgetic administrators can read any account's. An account that has never held credits reads a balance of 0. `getPartnerCreditBalance` reads this same balance by partner id.
|
|
38
38
|
# @param user_id The account whose balance to read
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
40
|
# @return [AccountCreditBalanceResponse]
|
|
41
|
-
describe '
|
|
41
|
+
describe 'get_user_credit_balance test' do
|
|
42
42
|
it 'should work' do
|
|
43
43
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
-
# unit tests for
|
|
47
|
+
# unit tests for get_user_credit_transactions
|
|
48
48
|
# List an account's credit ledger
|
|
49
49
|
# Lists the entries of an account's credit ledger, newest first. This is also how an account's usage is read: every operation that spends credits is a `debit` entry, so summing the `debit` entries over a period gives the credits consumed in it, and the other types give what was added. An account reads its own ledger; with a partner's API key, that is the account of the person who administers the partner. Widgetic administrators can read any account's. `getPartnerCreditTransactions` reads this same ledger by partner id. The page is always bounded: `limit` defaults to 100 and is capped at 500, `offset` defaults to 0.
|
|
50
50
|
# @param user_id The account whose ledger to read
|
|
@@ -52,8 +52,8 @@ describe 'CreditsApi' do
|
|
|
52
52
|
# @option opts [String] :transaction_type Only entries of this type, for instance `debit` for the credits spent. The types are listed on `AccountCreditTransaction`.
|
|
53
53
|
# @option opts [Integer] :limit Maximum number of entries to return
|
|
54
54
|
# @option opts [Integer] :offset Number of entries to skip
|
|
55
|
-
# @return [
|
|
56
|
-
describe '
|
|
55
|
+
# @return [AccountCreditTransactionListResponse]
|
|
56
|
+
describe 'get_user_credit_transactions test' do
|
|
57
57
|
it 'should work' do
|
|
58
58
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
59
59
|
end
|
|
@@ -32,7 +32,7 @@ describe 'EntitlementsApi' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
# unit tests for
|
|
35
|
+
# unit tests for get_managed_user_entitlements
|
|
36
36
|
# Get managed user entitlements
|
|
37
37
|
# Retrieves all entitlements for a managed user (admin or partner access).
|
|
38
38
|
# @param managed_user_id Managed user ID
|
|
@@ -41,13 +41,13 @@ describe 'EntitlementsApi' do
|
|
|
41
41
|
# @option opts [String] :feature Filter by specific feature
|
|
42
42
|
# @option opts [String] :source Filter by entitlement source
|
|
43
43
|
# @return [GetManagedUserEntitlementsResponse]
|
|
44
|
-
describe '
|
|
44
|
+
describe 'get_managed_user_entitlements test' do
|
|
45
45
|
it 'should work' do
|
|
46
46
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
47
47
|
end
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
-
# unit tests for
|
|
50
|
+
# unit tests for get_partner_entitlements
|
|
51
51
|
# Get partner entitlements
|
|
52
52
|
# Retrieves all entitlements for a partner (admin or partner access).
|
|
53
53
|
# @param partner_id Partner ID
|
|
@@ -56,7 +56,7 @@ describe 'EntitlementsApi' do
|
|
|
56
56
|
# @option opts [String] :feature Filter by specific feature
|
|
57
57
|
# @option opts [String] :source Filter by entitlement source
|
|
58
58
|
# @return [GetPartnerEntitlementsResponse]
|
|
59
|
-
describe '
|
|
59
|
+
describe 'get_partner_entitlements test' do
|
|
60
60
|
it 'should work' do
|
|
61
61
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
62
62
|
end
|
|
@@ -32,7 +32,7 @@ describe 'InvoicesApi' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
# unit tests for
|
|
35
|
+
# unit tests for get_invoices_by_partner_id
|
|
36
36
|
# List a partner's invoices
|
|
37
37
|
# Lists the invoices issued to a partner, newest first. Each carries the price (`subtotal`), the tax on it (`taxAmount`) and what is paid (`total`), its status as the payment provider reports it, why the last payment failed (`failureReason`), and the page where it is paid (`hostedInvoiceUrl`). A partner reads its own: the caller must be the person who administers the partner (an API key of that account works), and anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can read any partner's and see exactly what the partner sees; the full records, with the internal fields, are `getAllInvoices` filtered by partner. The page is always bounded: `limit` defaults to 50 and is capped at 100, `offset` defaults to 0.
|
|
38
38
|
# @param partner_id The partner whose invoices to list
|
|
@@ -41,7 +41,7 @@ describe 'InvoicesApi' do
|
|
|
41
41
|
# @option opts [Integer] :limit Maximum number of invoices to return
|
|
42
42
|
# @option opts [Integer] :offset Number of invoices to skip
|
|
43
43
|
# @return [GetInvoicesByPartnerId200Response]
|
|
44
|
-
describe '
|
|
44
|
+
describe 'get_invoices_by_partner_id test' do
|
|
45
45
|
it 'should work' do
|
|
46
46
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
47
47
|
end
|
|
@@ -32,7 +32,7 @@ describe 'ManagedUsersApi' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
# unit tests for
|
|
35
|
+
# unit tests for copy_preset_for_managed_user
|
|
36
36
|
# Give a managed user a copy of one of your presets
|
|
37
37
|
# Copies the preset `key` (see `setPartnerPreset`) onto a new canvas for one of your managed users, so their widget creator opens on a widget of their own that starts from yours. The copy is a draft widget in your account, filed under the managed user: `getAllWidgets` with `managedUserId` lists it, and no other managed user's editor can reach it. The copy carries the preset's code, design and content schemas, and thumbnail, and starts from a fork of its code repository, so the user's chat edits begin where yours left off. It does not carry the preset's database or its compositions. It is not a preset itself, and changing or removing the preset afterwards never touches it. To start a composition (the content and design editor) instead, you do not need a copy: call `createComposition` with the preset's `widgetId` (from `listPartnerPresets`) and the managed user. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one copy is made, not two. A copy that could not be made leaves nothing behind (503 `PRESET_COPY_FAILED`). The managed user must be yours and active.
|
|
38
38
|
# @param id The managed user to give the copy to (Widgetic's id for the user)
|
|
@@ -41,13 +41,13 @@ describe 'ManagedUsersApi' do
|
|
|
41
41
|
# @param [Hash] opts the optional parameters
|
|
42
42
|
# @option opts [CopyPartnerPresetRequest] :copy_partner_preset_request
|
|
43
43
|
# @return [PartnerPresetCopyResponse]
|
|
44
|
-
describe '
|
|
44
|
+
describe 'copy_preset_for_managed_user test' do
|
|
45
45
|
it 'should work' do
|
|
46
46
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
47
47
|
end
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
-
# unit tests for
|
|
50
|
+
# unit tests for create_composition_from_preset
|
|
51
51
|
# Create a composition from one of your presets in one call
|
|
52
52
|
# Validates the name, optional content, design, embed settings and locale, then creates a draft composition filed under the managed user, built on the preset's widget, in a single insert. A failure never leaves a half-made composition. The preset's widget must be published. The managed user must be yours and active. A widget that keeps what visitors send (a form, a vote, a rating) declares its tables in its own source (`src/lib/meta/database.json`); they are made for the composition here, in a schema of its own, as the widget was when it was last published. A widget that keeps nothing leaves the composition without tables. If the tables cannot be made just now, or the widget's file cannot be used, the composition is still created (`201`) and `meta.warnings` says why; the tables are made the next time the widget is generated. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one composition is created, not two.
|
|
53
53
|
# @param id
|
|
@@ -55,52 +55,52 @@ describe 'ManagedUsersApi' do
|
|
|
55
55
|
# @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`).
|
|
56
56
|
# @param create_composition_from_preset_request
|
|
57
57
|
# @param [Hash] opts the optional parameters
|
|
58
|
-
# @return [
|
|
59
|
-
describe '
|
|
58
|
+
# @return [CompositionResponse]
|
|
59
|
+
describe 'create_composition_from_preset test' do
|
|
60
60
|
it 'should work' do
|
|
61
61
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
62
62
|
end
|
|
63
63
|
end
|
|
64
64
|
|
|
65
|
-
# unit tests for
|
|
65
|
+
# unit tests for create_managed_user
|
|
66
66
|
# Create Managed User
|
|
67
67
|
# Creates a new managed user for a partner account. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one managed user is created, not two.
|
|
68
68
|
# @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`).
|
|
69
69
|
# @param new_managed_user
|
|
70
70
|
# @param [Hash] opts the optional parameters
|
|
71
71
|
# @return [ManagedUserResponse]
|
|
72
|
-
describe '
|
|
72
|
+
describe 'create_managed_user test' do
|
|
73
73
|
it 'should work' do
|
|
74
74
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
75
75
|
end
|
|
76
76
|
end
|
|
77
77
|
|
|
78
|
-
# unit tests for
|
|
78
|
+
# unit tests for create_managed_user_editor_session
|
|
79
79
|
# Create an editor session for a managed user
|
|
80
|
-
# Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic's editor pieces, such as the File Browser and the composition editor, without your API key ever reaching that browser. Call this from your server when the page that hosts the editor opens, and hand the `token` in the answer to that page. The token is shown once. It starts with `wgt_ses_` and the browser sends it as `Authorization: Bearer <token>`. It can do only what the `surfaces` you name allow, and only for this managed user: - `files`: upload a file (`uploadsPost`) and list the files uploaded for this user (`uploadsGet`). Every file is filed for this user and stored in your own storage destination, never in Widgetic's: a file a customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not optional, so no session, whatever its surfaces, can be made until you have set a destination (`setPartnerStorageDestination`); until then it is refused with 409 and `PARTNER_STORAGE_REQUIRED`, and when the destination cannot be used with 503 and `STORAGE_DESTINATION_UNAVAILABLE`. A destination you remove after the session was made stops its uploads too (the same 409; the browser is only told that the feature is not available right now). To keep a customer from uploading, leave `files` out of the session and hand the editors your own media library instead (`mediaLibrary`). - `editor`: edit one of this user's compositions: read it (`getCompositionById`, its content, design, embed settings and schemas), check a content change (`validateCompositionContent`), and change its name, content, design and embed settings (`updateComposition`, `setDynamicContent`). For a widget that answers visitors' questions from documents (the `ai-answers` adapter), it also lists those documents, adds one as text or as a file (a text file or a picture; a PDF once PDFs are read), and removes one (`getAiAnswersKnowledge`, `addAiAnswersKnowledgeDocument`, `addAiAnswersKnowledgeFile`, `removeAiAnswersKnowledgeDocument`); adding costs no credits, and is limited for each of your users separately. It can reach only compositions you created for this managed user (tag them with `managedUserId` when you create them); any other composition, including another of your users', answers 404. - `creator`: use Widgetic's widget creator for this user, including its AI. Draw on canvases and save them (`getAllCanvases`, `getCanvas`, `createCanvas`, `updateCanvas`, `previewDeleteCanvas`, `deleteCanvas`); make, change, copy and delete the widgets on them (`createWidget`, `getWidgets`, `getWidgetsBatch`, `updateWidget`, `uploadWidgetThumbnail`, `duplicateWidget`, `deleteWidget`); list and make the compositions of a widget it built (`getAllCompositions`, `createComposition`), which is how it shows the widget with sample values; keep the conversation of each widget (`getConversationsByWidgetId`, `createConversationForWidget`, `updateConversation`, `getMessages`, `createMessage`, `updateMessage`, `restoreCheckpoint`); and read a widget's schemas and give it its repository (`getWidgetContentSchema`, `getWidgetDesignSchema`, `updateWidgetRepository`). The AI that builds a widget is part of it: list the models (`agentModelsGet`), open the widget's repository (`agentRepositoriesPost`, `agentRepositoriesRepoIdGet`), start a generation and follow or cancel it (`agentCodeGeneratePost`, `operationsStreamGet`, `operationsIdGet`, `operationsIdCancelPost`), build and preview the result (`agentWidgetBuilderRepoHeadWidgetIdGet`, `buildWidgetFromRepo`, `previewWidgetVersion`), publish a version of the widget and move between its versions (`agentWidgetBuilderPublishWidgetIdPost`, `getWidgetPublishHistory`, `setWidgetPublishHistoryLive`, `renameWidgetPublishHistoryTitle`), and turn a stroke or a sentence into a decision (`agentShapeRecognizePost`, `agentDesignResolvePost`). It can also offer the customer your presets as starting points: read them and ask for a copy for this customer (`listMyPresets`, `copyMyPreset`; you choose the presets with `setPartnerPreset`). What the session makes is filed for this managed user, and the lists it reads hold only this user's canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories, uploaded files and operations made for this managed user (tag the canvases and widgets you create with `managedUserId`); any other canvas, widget, composition, conversation, message, repository, file or operation, including another of your users', answers 404. The creator also saves the composition it is editing (`updateComposition`, from the `editor` surface) and attaches pictures to its chat (`uploadsPost`, from the `files` surface), and the surfaces do not imply one another: to open the whole creator for a user, ask for `creator`, `editor` and `files` together. A generation or a build one user starts can be followed and cancelled by that user and by you, never by another of your users. The AI is paid for by your account, as your own calls are: its credits and allowances are yours. A session cannot make a widget public (publishing a version does not), file one under a project or an organization, or set anything the creator does not set: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. - `workflows`: use Widgetic's Workflows editor for this user. List their workflows and the compositions a workflow of theirs can chain (`listWorkspaceWorkflows`, `listWorkspaceWorkflowCompositionOptions`); list the starting points you offer them and make a workflow from one, which gives the user their own copy of every widget it chains, a composition of their own on each copy, and a draft (`listWorkspaceWorkflowPresets`, `createWorkspaceWorkflowFromPreset`; you offer them with `setPartnerWorkflowPreset`); make, open, change and delete one (`createWorkspaceWorkflow`, `getWorkspaceWorkflow`, `saveWorkspaceWorkflow`, `deleteWorkspaceWorkflow`) and copy it (`duplicateWorkspaceWorkflow`); publish it or discard the changes of its draft (`publishWorkspaceWorkflow`, `discardWorkspaceWorkflowChanges`); read and restore its versions (`listWorkspaceWorkflowVersions`, `getWorkspaceWorkflowVersion`, `restoreWorkspaceWorkflowVersion`); pause, resume, archive and unarchive it (`pauseWorkspaceWorkflow`, `resumeWorkspaceWorkflow`, `archiveWorkspaceWorkflow`, `unarchiveWorkspaceWorkflow`); and read its counts (`getWorkspaceWorkflowStats`). The workspace in each path is `personal`: a session has no other, and a path that names an organization is refused. What the session makes is filed for this managed user (`managedUserId`), the lists hold only this user's workflows, and it can reach only workflows made for this managed user; any other workflow, including one of yours or of another of your users, answers 404. A workflow can chain only the compositions you made for this managed user (tag them with `managedUserId`): one that belongs to anybody else is not available, and publishing a workflow that uses it is refused. A customer can have at most 50 workflows, and what a customer's session reads never says who published a version. A session cannot set who a workflow belongs to or which workspace it is in: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Everything else is refused with 403 and `EDITOR_SESSION_ROUTE_NOT_ALLOWED`: a session cannot read your account, make more sessions, change your presets or delete a composition, and a session without the `creator` surface cannot create or list compositions. Create the composition yourself with your API key, then open the editor on it. A session ends at `expiresAt` (at most four hours), when you end it (`revokeManagedUserEditorSession`), or when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at once (`429 EDITOR_SESSION_LIMIT_REACHED`). A session that is bound to a web page (`allowedOrigin`) is refused from any other origin. The AI the session runs is paid for with your credits. Set `maxCredits` to hold the session to a number of them: once its generations have taken that many (a generation that fails is refunded and does not count), the next one is refused with 402 and `EDITOR_SESSION_CREDIT_LIMIT_REACHED`, and the browser is told only that the feature is not available right now. Without it, the limit Widgetic has set for your account applies when it has set one (the same limit for every session you make, and `maxCredits: null` asks for none), and otherwise the credits of your account are the only ceiling. What each of your users' sessions has spent is in `getManagedUserUsage`. Each call makes a new session. It does not take an `Idempotency-Key`: the answer holds the token, and the token is never stored where a retry could read it back. The answer is sent with `Cache-Control: no-store`.
|
|
80
|
+
# Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic's editor pieces, such as the File Browser and the composition editor, without your API key ever reaching that browser. Call this from your server when the page that hosts the editor opens, and hand the `token` in the answer to that page. The token is shown once. It starts with `wgt_ses_` and the browser sends it as `Authorization: Bearer <token>`. It can do only what the `surfaces` you name allow, and only for this managed user: - `files`: upload a file (`uploadFile`) and list the files uploaded for this user (`listUploads`). Every file is filed for this user and stored in your own storage destination, never in Widgetic's: a file a customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not optional, so no session, whatever its surfaces, can be made until you have set a destination (`setPartnerStorageDestination`); until then it is refused with 409 and `PARTNER_STORAGE_REQUIRED`, and when the destination cannot be used with 503 and `STORAGE_DESTINATION_UNAVAILABLE`. A destination you remove after the session was made stops its uploads too (the same 409; the browser is only told that the feature is not available right now). To keep a customer from uploading, leave `files` out of the session and hand the editors your own media library instead (`mediaLibrary`). - `editor`: edit one of this user's compositions: read it (`getCompositionById`, its content, design, embed settings and schemas), check a content change (`validateCompositionContent`), and change its name, content, design and embed settings (`updateComposition`, `setDynamicContent`). For a widget that answers visitors' questions from documents (the `ai-answers` adapter), it also lists those documents, adds one as text or as a file (a text file or a picture; a PDF once PDFs are read), and removes one (`getAiAnswersKnowledge`, `addAiAnswersKnowledgeDocument`, `addAiAnswersKnowledgeFile`, `removeAiAnswersKnowledgeDocument`); adding costs no credits, and is limited for each of your users separately. It can reach only compositions you created for this managed user (tag them with `managedUserId` when you create them); any other composition, including another of your users', answers 404. - `creator`: use Widgetic's widget creator for this user, including its AI. Draw on canvases and save them (`getAllCanvases`, `getCanvas`, `createCanvas`, `updateCanvas`, `previewDeleteCanvas`, `deleteCanvas`); make, change, copy and delete the widgets on them (`createWidget`, `getWidgets`, `getWidgetsBatch`, `updateWidget`, `uploadWidgetThumbnail`, `duplicateWidget`, `deleteWidget`); list and make the compositions of a widget it built (`getAllCompositions`, `createComposition`), which is how it shows the widget with sample values; keep the conversation of each widget (`getConversationsByWidgetId`, `createConversationForWidget`, `updateConversation`, `getMessages`, `createMessage`, `updateMessage`, `restoreCheckpoint`); and read a widget's schemas and give it its repository (`getWidgetContentSchema`, `getWidgetDesignSchema`, `updateWidgetRepository`). The AI that builds a widget is part of it: list the models (`listLlmModels`), open the widget's repository (`createRepository`, `getRepository`), start a generation and follow or cancel it (`generateCode`, `streamOperationUpdates`, `getOperation`, `cancelOperation`), build and preview the result (`getWidgetRepositoryHead`, `buildWidgetFromRepo`, `previewWidgetVersion`), publish a version of the widget and move between its versions (`publishBuiltWidget`, `getWidgetPublishHistory`, `setWidgetPublishHistoryLive`, `renameWidgetPublishHistoryTitle`), and turn a stroke or a sentence into a decision (`recognizeShape`, `resolveDesignProperty`). It can also offer the customer your presets as starting points: read them and ask for a copy for this customer (`listMyPresets`, `copyMyPreset`; you choose the presets with `setPartnerPreset`). What the session makes is filed for this managed user, and the lists it reads hold only this user's canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories, uploaded files and operations made for this managed user (tag the canvases and widgets you create with `managedUserId`); any other canvas, widget, composition, conversation, message, repository, file or operation, including another of your users', answers 404. The creator also saves the composition it is editing (`updateComposition`, from the `editor` surface) and attaches pictures to its chat (`uploadFile`, from the `files` surface), and the surfaces do not imply one another: to open the whole creator for a user, ask for `creator`, `editor` and `files` together. A generation or a build one user starts can be followed and cancelled by that user and by you, never by another of your users. The AI is paid for by your account, as your own calls are: its credits and allowances are yours. A session cannot make a widget public (publishing a version does not), file one under a project or an organization, or set anything the creator does not set: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. - `workflows`: use Widgetic's Workflows editor for this user. List their workflows and the compositions a workflow of theirs can chain (`listWorkspaceWorkflows`, `listWorkspaceWorkflowCompositionOptions`); list the starting points you offer them and make a workflow from one, which gives the user their own copy of every widget it chains, a composition of their own on each copy, and a draft (`listWorkspaceWorkflowPresets`, `createWorkspaceWorkflowFromPreset`; you offer them with `setPartnerWorkflowPreset`); make, open, change and delete one (`createWorkspaceWorkflow`, `getWorkspaceWorkflow`, `saveWorkspaceWorkflow`, `deleteWorkspaceWorkflow`) and copy it (`duplicateWorkspaceWorkflow`); publish it or discard the changes of its draft (`publishWorkspaceWorkflow`, `discardWorkspaceWorkflowChanges`); read and restore its versions (`listWorkspaceWorkflowVersions`, `getWorkspaceWorkflowVersion`, `restoreWorkspaceWorkflowVersion`); pause, resume, archive and unarchive it (`pauseWorkspaceWorkflow`, `resumeWorkspaceWorkflow`, `archiveWorkspaceWorkflow`, `unarchiveWorkspaceWorkflow`); and read its counts (`getWorkspaceWorkflowStats`). The workspace in each path is `personal`: a session has no other, and a path that names an organization is refused. What the session makes is filed for this managed user (`managedUserId`), the lists hold only this user's workflows, and it can reach only workflows made for this managed user; any other workflow, including one of yours or of another of your users, answers 404. A workflow can chain only the compositions you made for this managed user (tag them with `managedUserId`): one that belongs to anybody else is not available, and publishing a workflow that uses it is refused. A customer can have at most 50 workflows, and what a customer's session reads never says who published a version. A session cannot set who a workflow belongs to or which workspace it is in: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Everything else is refused with 403 and `EDITOR_SESSION_ROUTE_NOT_ALLOWED`: a session cannot read your account, make more sessions, change your presets or delete a composition, and a session without the `creator` surface cannot create or list compositions. Create the composition yourself with your API key, then open the editor on it. A session ends at `expiresAt` (at most four hours), when you end it (`revokeManagedUserEditorSession`), or when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at once (`429 EDITOR_SESSION_LIMIT_REACHED`). A session that is bound to a web page (`allowedOrigin`) is refused from any other origin. The AI the session runs is paid for with your credits. Set `maxCredits` to hold the session to a number of them: once its generations have taken that many (a generation that fails is refunded and does not count), the next one is refused with 402 and `EDITOR_SESSION_CREDIT_LIMIT_REACHED`, and the browser is told only that the feature is not available right now. Without it, the limit Widgetic has set for your account applies when it has set one (the same limit for every session you make, and `maxCredits: null` asks for none), and otherwise the credits of your account are the only ceiling. What each of your users' sessions has spent is in `getManagedUserUsage`. Each call makes a new session. It does not take an `Idempotency-Key`: the answer holds the token, and the token is never stored where a retry could read it back. The answer is sent with `Cache-Control: no-store`.
|
|
81
81
|
# @param id The managed user the session is for (Widgetic's id for the user)
|
|
82
82
|
# @param new_editor_session
|
|
83
83
|
# @param [Hash] opts the optional parameters
|
|
84
84
|
# @return [EditorSessionResponse]
|
|
85
|
-
describe '
|
|
85
|
+
describe 'create_managed_user_editor_session test' do
|
|
86
86
|
it 'should work' do
|
|
87
87
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
88
88
|
end
|
|
89
89
|
end
|
|
90
90
|
|
|
91
|
-
# unit tests for
|
|
91
|
+
# unit tests for delete_managed_user
|
|
92
92
|
# Delete Managed User
|
|
93
93
|
# Deletes a managed user by ID. Its editor sessions end with it. What was filed under it (compositions, widgets, uploads) stays in your account, untagged.
|
|
94
94
|
# @param id ID of the managed user to delete
|
|
95
95
|
# @param [Hash] opts the optional parameters
|
|
96
|
-
# @return [
|
|
97
|
-
describe '
|
|
96
|
+
# @return [ManagedUserRemovalResponse]
|
|
97
|
+
describe 'delete_managed_user test' do
|
|
98
98
|
it 'should work' do
|
|
99
99
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
100
100
|
end
|
|
101
101
|
end
|
|
102
102
|
|
|
103
|
-
# unit tests for
|
|
103
|
+
# unit tests for get_all_managed_users
|
|
104
104
|
# Get Managed Users
|
|
105
105
|
# Retrieve the managed users you manage, with pagination support. (Admins see every partner's managed users.)
|
|
106
106
|
# @param [Hash] opts the optional parameters
|
|
@@ -108,58 +108,58 @@ describe 'ManagedUsersApi' do
|
|
|
108
108
|
# @option opts [Integer] :size Number of items per page
|
|
109
109
|
# @option opts [String] :sort Sort field and direction, `<field>:<asc|desc>`. The field is `createdAt`, `updatedAt` or `externalId` (the snake_case spellings `created_at`, `updated_at` and `external_id` work too); `asc` or `desc` alone sorts by `createdAt`. Any other field is a 400.
|
|
110
110
|
# @return [GetAllManagedUsers200Response]
|
|
111
|
-
describe '
|
|
111
|
+
describe 'get_all_managed_users test' do
|
|
112
112
|
it 'should work' do
|
|
113
113
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
114
114
|
end
|
|
115
115
|
end
|
|
116
116
|
|
|
117
|
-
# unit tests for
|
|
117
|
+
# unit tests for get_managed_user_by_id
|
|
118
118
|
# Get Managed User By ID
|
|
119
119
|
# Retrieves a specific managed user by ID.
|
|
120
120
|
# @param id ID of the managed user to retrieve
|
|
121
121
|
# @param [Hash] opts the optional parameters
|
|
122
122
|
# @return [ManagedUserResponse]
|
|
123
|
-
describe '
|
|
123
|
+
describe 'get_managed_user_by_id test' do
|
|
124
124
|
it 'should work' do
|
|
125
125
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
126
126
|
end
|
|
127
127
|
end
|
|
128
128
|
|
|
129
|
-
# unit tests for
|
|
129
|
+
# unit tests for get_managed_user_design_defaults
|
|
130
130
|
# Read design defaults for one managed user
|
|
131
131
|
# @param id
|
|
132
132
|
# @param [Hash] opts the optional parameters
|
|
133
|
-
# @return [
|
|
134
|
-
describe '
|
|
133
|
+
# @return [DesignDefaultsResponse]
|
|
134
|
+
describe 'get_managed_user_design_defaults test' do
|
|
135
135
|
it 'should work' do
|
|
136
136
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
137
137
|
end
|
|
138
138
|
end
|
|
139
139
|
|
|
140
|
-
# unit tests for
|
|
140
|
+
# unit tests for get_managed_user_limits
|
|
141
141
|
# Read monthly credit cap and usage for one managed user
|
|
142
142
|
# @param id
|
|
143
143
|
# @param [Hash] opts the optional parameters
|
|
144
|
-
# @return [
|
|
145
|
-
describe '
|
|
144
|
+
# @return [ManagedUserLimitsResponse]
|
|
145
|
+
describe 'get_managed_user_limits test' do
|
|
146
146
|
it 'should work' do
|
|
147
147
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
148
148
|
end
|
|
149
149
|
end
|
|
150
150
|
|
|
151
|
-
# unit tests for
|
|
151
|
+
# unit tests for get_managed_user_storage_usage
|
|
152
152
|
# Storage used by one managed user's uploads
|
|
153
153
|
# @param id
|
|
154
154
|
# @param [Hash] opts the optional parameters
|
|
155
155
|
# @return [GetManagedUserStorageUsage200Response]
|
|
156
|
-
describe '
|
|
156
|
+
describe 'get_managed_user_storage_usage test' do
|
|
157
157
|
it 'should work' do
|
|
158
158
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
159
159
|
end
|
|
160
160
|
end
|
|
161
161
|
|
|
162
|
-
# unit tests for
|
|
162
|
+
# unit tests for get_managed_user_usage
|
|
163
163
|
# What a managed user's editor sessions spent
|
|
164
164
|
# Says how many credits the editor sessions of one of your managed users took from your account over a period, in total and for each operation. A generation costs one credit, taken from your account when it starts; one that fails is refunded and is counted as refunded, not as spent. Only what was spent through editor sessions is here, and only since usage was first recorded: what you spend with your API key, and anything from before, is not. Use it to see which of your users spend the most, or to charge them for it. To hold one session to a number of credits, set `max_credits` when you make it (`createManagedUserEditorSession`). The period runs from `startDate` (included) to `endDate` (not included): the 30 days before now when you give neither, and at most 366 days. A date without a time is midnight UTC at the start of that day, so for all of October give `startDate=2026-10-01` and `endDate=2026-11-01`.
|
|
165
165
|
# @param id The managed user whose usage you want (Widgetic's id for the user)
|
|
@@ -167,13 +167,13 @@ describe 'ManagedUsersApi' do
|
|
|
167
167
|
# @option opts [String] :start_date Start of the period, included: an ISO 8601 date (`2026-10-01`) or date-time with its offset (`2026-10-01T08:00:00Z`). Default: 30 days before `endDate`.
|
|
168
168
|
# @option opts [String] :end_date End of the period, not included, in the same forms. Default: now. It must be after `startDate`, by at most 366 days.
|
|
169
169
|
# @return [ManagedUserUsageResponse]
|
|
170
|
-
describe '
|
|
170
|
+
describe 'get_managed_user_usage test' do
|
|
171
171
|
it 'should work' do
|
|
172
172
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
173
173
|
end
|
|
174
174
|
end
|
|
175
175
|
|
|
176
|
-
# unit tests for
|
|
176
|
+
# unit tests for get_managed_users_by_manager_id
|
|
177
177
|
# Get Managed Users By Manager
|
|
178
178
|
# Retrieve managed users for a specific manager with pagination support.
|
|
179
179
|
# @param manager_id ID of the manager
|
|
@@ -182,64 +182,85 @@ describe 'ManagedUsersApi' do
|
|
|
182
182
|
# @option opts [Integer] :size Number of items per page
|
|
183
183
|
# @option opts [String] :sort Sort field and direction, `<field>:<asc|desc>`. The field is `createdAt`, `updatedAt` or `externalId` (the snake_case spellings `created_at`, `updated_at` and `external_id` work too); `asc` or `desc` alone sorts by `createdAt`. Any other field is a 400.
|
|
184
184
|
# @return [GetManagedUsersByManagerIdResponse]
|
|
185
|
-
describe '
|
|
185
|
+
describe 'get_managed_users_by_manager_id test' do
|
|
186
186
|
it 'should work' do
|
|
187
187
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
188
188
|
end
|
|
189
189
|
end
|
|
190
190
|
|
|
191
|
-
# unit tests for
|
|
191
|
+
# unit tests for list_managed_user_entries
|
|
192
|
+
# List entries across a managed user's compositions
|
|
193
|
+
# Merges eligible tables (time and id columns) across the managed user's compositions in global time order, then compositionId, table, and id (byte order). Only tables with both a time and an id column take part. Rate limit 30 requests per minute.
|
|
194
|
+
# @param id
|
|
195
|
+
# @param [Hash] opts the optional parameters
|
|
196
|
+
# @option opts [String] :composition_id
|
|
197
|
+
# @option opts [String] :table
|
|
198
|
+
# @option opts [Integer] :limit
|
|
199
|
+
# @option opts [String] :order `desc` (the default) lists the newest entry first, `asc` the oldest. Entries are sorted by their time, then by their id (compared as text, byte by byte) in the same direction, so the order of two entries made at the same instant is always the same; an entry with no time counts as the oldest. A table with no time column is sorted by its id. The managed-user feed sorts by time, then by composition id, table and id.
|
|
200
|
+
# @option opts [Time] :since Only entries made at this time or later: `since` is INCLUSIVE (an entry made at exactly `since` is returned). A date and time with an offset, such as `2026-10-01T00:00:00Z`; anything else answers 400 `INVALID_SINCE`. An entry with no time never matches, and a table with no time column answers 400 `ENTRY_TABLE_HAS_NO_TIME`.
|
|
201
|
+
# @option opts [Time] :_until Only entries made before this time: `until` is EXCLUSIVE (an entry made at exactly `until` is NOT returned), so `since=A&until=B` followed by `since=B&until=C` counts every entry once. Same form and same refusals as `since` (400 `INVALID_UNTIL`).
|
|
202
|
+
# @option opts [String] :cursor
|
|
203
|
+
# @option opts [Hash<String, String>] :context Host context filters as `context[key]=value` (max 5 keys, counting dotted `context.key` too). Use `column.<name>=value` for columns whose names collide with reserved parameters.
|
|
204
|
+
# @option opts [Hash<String, String>] :filter Column filters as `filter[columnName]=value` (same meaning as bare `columnName=value` or `column.columnName=value`; max 10 column filters counting all spellings). A plain `filter=value` still filters a column named `filter`.
|
|
205
|
+
# @return [ManagedUserEntriesPageSuccess]
|
|
206
|
+
describe 'list_managed_user_entries test' do
|
|
207
|
+
it 'should work' do
|
|
208
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# unit tests for revoke_managed_user_editor_session
|
|
192
213
|
# End one editor session of a managed user
|
|
193
214
|
# Ends the session at once: its token stops working on the next request (on another server of ours, within a few seconds). Ending a session that has already ended is fine.
|
|
194
215
|
# @param id The managed user the session is for
|
|
195
216
|
# @param session_id The `sessionId` of the session, from `createManagedUserEditorSession`
|
|
196
217
|
# @param [Hash] opts the optional parameters
|
|
197
|
-
# @return [
|
|
198
|
-
describe '
|
|
218
|
+
# @return [ManagedUserRemovalResponse]
|
|
219
|
+
describe 'revoke_managed_user_editor_session test' do
|
|
199
220
|
it 'should work' do
|
|
200
221
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
201
222
|
end
|
|
202
223
|
end
|
|
203
224
|
|
|
204
|
-
# unit tests for
|
|
225
|
+
# unit tests for revoke_managed_user_editor_sessions
|
|
205
226
|
# End every editor session of a managed user
|
|
206
227
|
# Ends all of the managed user's live editor sessions at once, for example when the user signs out of your platform. Their tokens stop working on the next request (on another server of ours, within a few seconds). It is fine to call it for a user who has none.
|
|
207
228
|
# @param id The managed user whose sessions end
|
|
208
229
|
# @param [Hash] opts the optional parameters
|
|
209
230
|
# @return [RevokeManagedUserEditorSessionsResponse]
|
|
210
|
-
describe '
|
|
231
|
+
describe 'revoke_managed_user_editor_sessions test' do
|
|
211
232
|
it 'should work' do
|
|
212
233
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
213
234
|
end
|
|
214
235
|
end
|
|
215
236
|
|
|
216
|
-
# unit tests for
|
|
237
|
+
# unit tests for set_managed_user_design_defaults
|
|
217
238
|
# Set or clear design defaults for one managed user
|
|
218
239
|
# Send `{ \"design\": { ... } }` to store a JSON object (at most 64 KB, nesting depth 32), or `{ \"design\": null }` to remove the override. New compositions for this customer merge this layer over the partner default and under the request body.
|
|
219
240
|
# @param id
|
|
220
241
|
# @param set_partner_design_defaults_request
|
|
221
242
|
# @param [Hash] opts the optional parameters
|
|
222
|
-
# @return [
|
|
223
|
-
describe '
|
|
243
|
+
# @return [DesignDefaultsResponse]
|
|
244
|
+
describe 'set_managed_user_design_defaults test' do
|
|
224
245
|
it 'should work' do
|
|
225
246
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
226
247
|
end
|
|
227
248
|
end
|
|
228
249
|
|
|
229
|
-
# unit tests for
|
|
250
|
+
# unit tests for set_managed_user_limits
|
|
230
251
|
# Set or clear the monthly credit cap for one managed user
|
|
231
252
|
# Send monthlyCredits as a whole number from 0 up to 2147483647 to cap what this customer's editor sessions may spend in a UTC calendar month, or null to remove the cap. The cap counts the credits the customer's sessions spent that month (refunded credits do not count) and applies to all of the customer's sessions together, beside any `max_credits` a single session was given. A cap of 0 stops all paid work by this customer until you raise it. The cap starts counting from the first of the month (UTC); a cap set below what was already spent this month stops further work at once.
|
|
232
253
|
# @param id
|
|
233
254
|
# @param set_managed_user_limits_request
|
|
234
255
|
# @param [Hash] opts the optional parameters
|
|
235
|
-
# @return [
|
|
236
|
-
describe '
|
|
256
|
+
# @return [ManagedUserLimitsResponse]
|
|
257
|
+
describe 'set_managed_user_limits test' do
|
|
237
258
|
it 'should work' do
|
|
238
259
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
239
260
|
end
|
|
240
261
|
end
|
|
241
262
|
|
|
242
|
-
# unit tests for
|
|
263
|
+
# unit tests for update_managed_user
|
|
243
264
|
# Update Managed User
|
|
244
265
|
# Updates an existing managed user. Only `externalId`, `metadata` and `isActive` can change, and `metadata` is replaced as a whole, so send all of it. `isActive: false` switches the managed user off: what it already has stays, and nothing new can be filed under it until you send `isActive: true`. Switching it off also ends all of its editor sessions, and they do not come back when you switch it on again. The `Idempotency-Key` header is required (`400` without it).
|
|
245
266
|
# @param id ID of the managed user to update
|
|
@@ -247,7 +268,7 @@ describe 'ManagedUsersApi' do
|
|
|
247
268
|
# @param update_managed_user
|
|
248
269
|
# @param [Hash] opts the optional parameters
|
|
249
270
|
# @return [ManagedUserResponse]
|
|
250
|
-
describe '
|
|
271
|
+
describe 'update_managed_user test' do
|
|
251
272
|
it 'should work' do
|
|
252
273
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
253
274
|
end
|
|
@@ -32,13 +32,13 @@ describe 'OperationsApi' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
# unit tests for
|
|
35
|
+
# unit tests for get_operation
|
|
36
36
|
# Get operation status
|
|
37
37
|
# Follows work that carries on after the response that started it. Duplicating a composition, for one, answers 202 with an `operationId`: ask for that operation until its `status` is `completed` (or `failed`, with the reason in `error`). A finished duplication names the new composition in `metadata.newCompositionId`. An operation belongs to the user who started it. Asking for somebody else's operation answers 404, exactly as for one that does not exist. Administrators may read any operation.
|
|
38
38
|
# @param id Operation identifier returned when the job was created.
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
|
-
# @return [
|
|
41
|
-
describe '
|
|
40
|
+
# @return [GetOperationResponse]
|
|
41
|
+
describe 'get_operation test' do
|
|
42
42
|
it 'should work' do
|
|
43
43
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
44
44
|
end
|