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
data/docs/UploadsApi.md
CHANGED
|
@@ -4,20 +4,20 @@ All URIs are relative to *https://api.widgetic.com/v1*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
|
-
| [**
|
|
8
|
-
| [**
|
|
9
|
-
| [**
|
|
10
|
-
| [**
|
|
11
|
-
| [**
|
|
7
|
+
| [**delete_upload**](UploadsApi.md#delete_upload) | **DELETE** /uploads/{id} | Delete an upload |
|
|
8
|
+
| [**get_upload**](UploadsApi.md#get_upload) | **GET** /uploads/{id} | Get an upload by id |
|
|
9
|
+
| [**get_upload_limits**](UploadsApi.md#get_upload_limits) | **GET** /uploads/limits | Upload size limits and accepted file types |
|
|
10
|
+
| [**list_uploads**](UploadsApi.md#list_uploads) | **GET** /uploads | List the account's uploads |
|
|
11
|
+
| [**upload_file**](UploadsApi.md#upload_file) | **POST** /uploads | Upload a file |
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## delete_upload
|
|
15
15
|
|
|
16
|
-
> <
|
|
16
|
+
> <DeleteUpload200Response> delete_upload(id)
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Delete an upload
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Removes the stored file and the upload row. A file in Widgetic's own storage gives back the space it took from your storage allowance; a file in your own bucket is removed from your bucket. Deleting an upload that is already gone succeeds the same way as the first delete. An upload that belongs to another account is not found. If the storage cannot be reached the call fails and nothing is marked deleted, so it can be repeated.
|
|
21
21
|
|
|
22
22
|
### Examples
|
|
23
23
|
|
|
@@ -31,36 +31,32 @@ ApiSdkRb.configure do |config|
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
api_instance = ApiSdkRb::UploadsApi.new
|
|
34
|
-
|
|
35
|
-
limit: 56, # Integer | Maximum number of files to return
|
|
36
|
-
managed_user_id: '38400000-8cf0-11bd-b23e-10b96e4ef00d', # String | List only the files uploaded for this managed user (Widgetic's id for the user). Send this or `managedUserExternalId`, not both.
|
|
37
|
-
managed_user_external_id: 'managed_user_external_id_example' # String | List only the files uploaded for the managed user you registered with this `externalId` (your own identifier for the user). Send this or `managedUserId`, not both.
|
|
38
|
-
}
|
|
34
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
|
39
35
|
|
|
40
36
|
begin
|
|
41
|
-
#
|
|
42
|
-
result = api_instance.
|
|
37
|
+
# Delete an upload
|
|
38
|
+
result = api_instance.delete_upload(id)
|
|
43
39
|
p result
|
|
44
40
|
rescue ApiSdkRb::ApiError => e
|
|
45
|
-
puts "Error when calling UploadsApi->
|
|
41
|
+
puts "Error when calling UploadsApi->delete_upload: #{e}"
|
|
46
42
|
end
|
|
47
43
|
```
|
|
48
44
|
|
|
49
|
-
#### Using the
|
|
45
|
+
#### Using the delete_upload_with_http_info variant
|
|
50
46
|
|
|
51
47
|
This returns an Array which contains the response data, status code and headers.
|
|
52
48
|
|
|
53
|
-
> <Array(<
|
|
49
|
+
> <Array(<DeleteUpload200Response>, Integer, Hash)> delete_upload_with_http_info(id)
|
|
54
50
|
|
|
55
51
|
```ruby
|
|
56
52
|
begin
|
|
57
|
-
#
|
|
58
|
-
data, status_code, headers = api_instance.
|
|
53
|
+
# Delete an upload
|
|
54
|
+
data, status_code, headers = api_instance.delete_upload_with_http_info(id)
|
|
59
55
|
p status_code # => 2xx
|
|
60
56
|
p headers # => { ... }
|
|
61
|
-
p data # => <
|
|
57
|
+
p data # => <DeleteUpload200Response>
|
|
62
58
|
rescue ApiSdkRb::ApiError => e
|
|
63
|
-
puts "Error when calling UploadsApi->
|
|
59
|
+
puts "Error when calling UploadsApi->delete_upload_with_http_info: #{e}"
|
|
64
60
|
end
|
|
65
61
|
```
|
|
66
62
|
|
|
@@ -68,13 +64,11 @@ end
|
|
|
68
64
|
|
|
69
65
|
| Name | Type | Description | Notes |
|
|
70
66
|
| ---- | ---- | ----------- | ----- |
|
|
71
|
-
| **
|
|
72
|
-
| **managed_user_id** | **String** | List only the files uploaded for this managed user (Widgetic's id for the user). Send this or `managedUserExternalId`, not both. | [optional] |
|
|
73
|
-
| **managed_user_external_id** | **String** | List only the files uploaded for the managed user you registered with this `externalId` (your own identifier for the user). Send this or `managedUserId`, not both. | [optional] |
|
|
67
|
+
| **id** | **String** | | |
|
|
74
68
|
|
|
75
69
|
### Return type
|
|
76
70
|
|
|
77
|
-
[**
|
|
71
|
+
[**DeleteUpload200Response**](DeleteUpload200Response.md)
|
|
78
72
|
|
|
79
73
|
### Authorization
|
|
80
74
|
|
|
@@ -86,13 +80,13 @@ end
|
|
|
86
80
|
- **Accept**: application/json
|
|
87
81
|
|
|
88
82
|
|
|
89
|
-
##
|
|
83
|
+
## get_upload
|
|
90
84
|
|
|
91
|
-
> <
|
|
85
|
+
> <UploadResponse> get_upload(id)
|
|
92
86
|
|
|
93
|
-
|
|
87
|
+
Get an upload by id
|
|
94
88
|
|
|
95
|
-
|
|
89
|
+
The details of one of the account's uploads. An upload that belongs to another account is not found.
|
|
96
90
|
|
|
97
91
|
### Examples
|
|
98
92
|
|
|
@@ -106,32 +100,32 @@ ApiSdkRb.configure do |config|
|
|
|
106
100
|
end
|
|
107
101
|
|
|
108
102
|
api_instance = ApiSdkRb::UploadsApi.new
|
|
109
|
-
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
|
103
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The upload to read
|
|
110
104
|
|
|
111
105
|
begin
|
|
112
|
-
#
|
|
113
|
-
result = api_instance.
|
|
106
|
+
# Get an upload by id
|
|
107
|
+
result = api_instance.get_upload(id)
|
|
114
108
|
p result
|
|
115
109
|
rescue ApiSdkRb::ApiError => e
|
|
116
|
-
puts "Error when calling UploadsApi->
|
|
110
|
+
puts "Error when calling UploadsApi->get_upload: #{e}"
|
|
117
111
|
end
|
|
118
112
|
```
|
|
119
113
|
|
|
120
|
-
#### Using the
|
|
114
|
+
#### Using the get_upload_with_http_info variant
|
|
121
115
|
|
|
122
116
|
This returns an Array which contains the response data, status code and headers.
|
|
123
117
|
|
|
124
|
-
> <Array(<
|
|
118
|
+
> <Array(<UploadResponse>, Integer, Hash)> get_upload_with_http_info(id)
|
|
125
119
|
|
|
126
120
|
```ruby
|
|
127
121
|
begin
|
|
128
|
-
#
|
|
129
|
-
data, status_code, headers = api_instance.
|
|
122
|
+
# Get an upload by id
|
|
123
|
+
data, status_code, headers = api_instance.get_upload_with_http_info(id)
|
|
130
124
|
p status_code # => 2xx
|
|
131
125
|
p headers # => { ... }
|
|
132
|
-
p data # => <
|
|
126
|
+
p data # => <UploadResponse>
|
|
133
127
|
rescue ApiSdkRb::ApiError => e
|
|
134
|
-
puts "Error when calling UploadsApi->
|
|
128
|
+
puts "Error when calling UploadsApi->get_upload_with_http_info: #{e}"
|
|
135
129
|
end
|
|
136
130
|
```
|
|
137
131
|
|
|
@@ -139,11 +133,11 @@ end
|
|
|
139
133
|
|
|
140
134
|
| Name | Type | Description | Notes |
|
|
141
135
|
| ---- | ---- | ----------- | ----- |
|
|
142
|
-
| **id** | **String** |
|
|
136
|
+
| **id** | **String** | The upload to read | |
|
|
143
137
|
|
|
144
138
|
### Return type
|
|
145
139
|
|
|
146
|
-
[**
|
|
140
|
+
[**UploadResponse**](UploadResponse.md)
|
|
147
141
|
|
|
148
142
|
### Authorization
|
|
149
143
|
|
|
@@ -155,13 +149,13 @@ end
|
|
|
155
149
|
- **Accept**: application/json
|
|
156
150
|
|
|
157
151
|
|
|
158
|
-
##
|
|
152
|
+
## get_upload_limits
|
|
159
153
|
|
|
160
|
-
> <
|
|
154
|
+
> <UploadLimitsResponse> get_upload_limits
|
|
161
155
|
|
|
162
|
-
|
|
156
|
+
Upload size limits and accepted file types
|
|
163
157
|
|
|
164
|
-
The
|
|
158
|
+
The size limit and the accepted file types of the upload endpoints. Read them from here rather than hard-coding thresholds: they are configuration and can change. The limits are the same for every account, whatever its plan: `multipart_max_bytes` for a file sent in one request (10 MB) and `tus_max_bytes` for a resumable upload (250 MB).
|
|
165
159
|
|
|
166
160
|
### Examples
|
|
167
161
|
|
|
@@ -175,44 +169,41 @@ ApiSdkRb.configure do |config|
|
|
|
175
169
|
end
|
|
176
170
|
|
|
177
171
|
api_instance = ApiSdkRb::UploadsApi.new
|
|
178
|
-
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The upload to read
|
|
179
172
|
|
|
180
173
|
begin
|
|
181
|
-
#
|
|
182
|
-
result = api_instance.
|
|
174
|
+
# Upload size limits and accepted file types
|
|
175
|
+
result = api_instance.get_upload_limits
|
|
183
176
|
p result
|
|
184
177
|
rescue ApiSdkRb::ApiError => e
|
|
185
|
-
puts "Error when calling UploadsApi->
|
|
178
|
+
puts "Error when calling UploadsApi->get_upload_limits: #{e}"
|
|
186
179
|
end
|
|
187
180
|
```
|
|
188
181
|
|
|
189
|
-
#### Using the
|
|
182
|
+
#### Using the get_upload_limits_with_http_info variant
|
|
190
183
|
|
|
191
184
|
This returns an Array which contains the response data, status code and headers.
|
|
192
185
|
|
|
193
|
-
> <Array(<
|
|
186
|
+
> <Array(<UploadLimitsResponse>, Integer, Hash)> get_upload_limits_with_http_info
|
|
194
187
|
|
|
195
188
|
```ruby
|
|
196
189
|
begin
|
|
197
|
-
#
|
|
198
|
-
data, status_code, headers = api_instance.
|
|
190
|
+
# Upload size limits and accepted file types
|
|
191
|
+
data, status_code, headers = api_instance.get_upload_limits_with_http_info
|
|
199
192
|
p status_code # => 2xx
|
|
200
193
|
p headers # => { ... }
|
|
201
|
-
p data # => <
|
|
194
|
+
p data # => <UploadLimitsResponse>
|
|
202
195
|
rescue ApiSdkRb::ApiError => e
|
|
203
|
-
puts "Error when calling UploadsApi->
|
|
196
|
+
puts "Error when calling UploadsApi->get_upload_limits_with_http_info: #{e}"
|
|
204
197
|
end
|
|
205
198
|
```
|
|
206
199
|
|
|
207
200
|
### Parameters
|
|
208
201
|
|
|
209
|
-
|
|
210
|
-
| ---- | ---- | ----------- | ----- |
|
|
211
|
-
| **id** | **String** | The upload to read | |
|
|
202
|
+
This endpoint does not need any parameter.
|
|
212
203
|
|
|
213
204
|
### Return type
|
|
214
205
|
|
|
215
|
-
[**
|
|
206
|
+
[**UploadLimitsResponse**](UploadLimitsResponse.md)
|
|
216
207
|
|
|
217
208
|
### Authorization
|
|
218
209
|
|
|
@@ -224,13 +215,13 @@ end
|
|
|
224
215
|
- **Accept**: application/json
|
|
225
216
|
|
|
226
217
|
|
|
227
|
-
##
|
|
218
|
+
## list_uploads
|
|
228
219
|
|
|
229
|
-
> <
|
|
220
|
+
> <ListUploads200Response> list_uploads(opts)
|
|
230
221
|
|
|
231
|
-
|
|
222
|
+
List the account's uploads
|
|
232
223
|
|
|
233
|
-
The
|
|
224
|
+
The files the account has uploaded, newest first. Deleted files are not listed. Returns at most `limit` files and has no further pages: a client that needs more narrows the list instead, for example to one managed user's files with `managedUserId` or `managedUserExternalId`. The files that visitors sent through a widget's upload adapter (`source` is `widget-visitor-upload`) are not part of this list, so that a popular widget does not push the account's own files out of it; naming one widget with `widgetId` lists what visitors sent to that widget as well.
|
|
234
225
|
|
|
235
226
|
### Examples
|
|
236
227
|
|
|
@@ -244,41 +235,50 @@ ApiSdkRb.configure do |config|
|
|
|
244
235
|
end
|
|
245
236
|
|
|
246
237
|
api_instance = ApiSdkRb::UploadsApi.new
|
|
238
|
+
opts = {
|
|
239
|
+
limit: 56, # Integer | Maximum number of files to return
|
|
240
|
+
managed_user_id: '38400000-8cf0-11bd-b23e-10b96e4ef00d', # String | List only the files uploaded for this managed user (Widgetic's id for the user). Send this or `managedUserExternalId`, not both.
|
|
241
|
+
managed_user_external_id: 'managed_user_external_id_example' # String | List only the files uploaded for the managed user you registered with this `externalId` (your own identifier for the user). Send this or `managedUserId`, not both.
|
|
242
|
+
}
|
|
247
243
|
|
|
248
244
|
begin
|
|
249
|
-
#
|
|
250
|
-
result = api_instance.
|
|
245
|
+
# List the account's uploads
|
|
246
|
+
result = api_instance.list_uploads(opts)
|
|
251
247
|
p result
|
|
252
248
|
rescue ApiSdkRb::ApiError => e
|
|
253
|
-
puts "Error when calling UploadsApi->
|
|
249
|
+
puts "Error when calling UploadsApi->list_uploads: #{e}"
|
|
254
250
|
end
|
|
255
251
|
```
|
|
256
252
|
|
|
257
|
-
#### Using the
|
|
253
|
+
#### Using the list_uploads_with_http_info variant
|
|
258
254
|
|
|
259
255
|
This returns an Array which contains the response data, status code and headers.
|
|
260
256
|
|
|
261
|
-
> <Array(<
|
|
257
|
+
> <Array(<ListUploads200Response>, Integer, Hash)> list_uploads_with_http_info(opts)
|
|
262
258
|
|
|
263
259
|
```ruby
|
|
264
260
|
begin
|
|
265
|
-
#
|
|
266
|
-
data, status_code, headers = api_instance.
|
|
261
|
+
# List the account's uploads
|
|
262
|
+
data, status_code, headers = api_instance.list_uploads_with_http_info(opts)
|
|
267
263
|
p status_code # => 2xx
|
|
268
264
|
p headers # => { ... }
|
|
269
|
-
p data # => <
|
|
265
|
+
p data # => <ListUploads200Response>
|
|
270
266
|
rescue ApiSdkRb::ApiError => e
|
|
271
|
-
puts "Error when calling UploadsApi->
|
|
267
|
+
puts "Error when calling UploadsApi->list_uploads_with_http_info: #{e}"
|
|
272
268
|
end
|
|
273
269
|
```
|
|
274
270
|
|
|
275
271
|
### Parameters
|
|
276
272
|
|
|
277
|
-
|
|
273
|
+
| Name | Type | Description | Notes |
|
|
274
|
+
| ---- | ---- | ----------- | ----- |
|
|
275
|
+
| **limit** | **Integer** | Maximum number of files to return | [optional][default to 50] |
|
|
276
|
+
| **managed_user_id** | **String** | List only the files uploaded for this managed user (Widgetic's id for the user). Send this or `managedUserExternalId`, not both. | [optional] |
|
|
277
|
+
| **managed_user_external_id** | **String** | List only the files uploaded for the managed user you registered with this `externalId` (your own identifier for the user). Send this or `managedUserId`, not both. | [optional] |
|
|
278
278
|
|
|
279
279
|
### Return type
|
|
280
280
|
|
|
281
|
-
[**
|
|
281
|
+
[**ListUploads200Response**](ListUploads200Response.md)
|
|
282
282
|
|
|
283
283
|
### Authorization
|
|
284
284
|
|
|
@@ -290,13 +290,13 @@ This endpoint does not need any parameter.
|
|
|
290
290
|
- **Accept**: application/json
|
|
291
291
|
|
|
292
292
|
|
|
293
|
-
##
|
|
293
|
+
## upload_file
|
|
294
294
|
|
|
295
|
-
> <UploadResponse>
|
|
295
|
+
> <UploadResponse> upload_file(file, opts)
|
|
296
296
|
|
|
297
297
|
Upload a file
|
|
298
298
|
|
|
299
|
-
Stores one file for the account and returns its public address. This is how a user's own images, video and PDFs reach a widget's content. Send a `multipart/form-data` request with the file in the field named `file`. The file counts against the storage of the workspace it is uploaded in, and a full workspace is refused with 413 and `QUOTA_STORAGE_EXCEEDED`. For a person signed in on widgetic.com that is the workspace they are currently working in: inside a team, the team's shared storage; inside their own workspace, their own allowance. An organization API key, and a Shopify store's session, always work in that team's shared storage. A personal API key or an SDK token always uses the account's own allowance. The two never add up and one never lends room to the other. A file over the size limit is refused with 413 and `UPLOAD_TOO_LARGE`, and a type that is not accepted with 415 and `UPLOAD_UNSUPPORTED_TYPE`; `
|
|
299
|
+
Stores one file for the account and returns its public address. This is how a user's own images, video and PDFs reach a widget's content. Send a `multipart/form-data` request with the file in the field named `file`. The file counts against the storage of the workspace it is uploaded in, and a full workspace is refused with 413 and `QUOTA_STORAGE_EXCEEDED`. For a person signed in on widgetic.com that is the workspace they are currently working in: inside a team, the team's shared storage; inside their own workspace, their own allowance. An organization API key, and a Shopify store's session, always work in that team's shared storage. A personal API key or an SDK token always uses the account's own allowance. The two never add up and one never lends room to the other. A file over the size limit is refused with 413 and `UPLOAD_TOO_LARGE`, and a type that is not accepted with 415 and `UPLOAD_UNSUPPORTED_TYPE`; `getUploadLimits` lists the size limit and the accepted types. A file is judged by what is in it, not by the type it is sent as. A file that is not the type it claims (a web page sent as `image/png`) is refused with 415 and `UPLOAD_UNSUPPORTED_TYPE`, and a picture sent under the wrong picture type is stored under the type it really is, which `mime_type` in the answer says. An SVG is rewritten as it is stored: script, `foreignObject`, animation and references to other addresses are taken out, it must be UTF-8 and at most 2 MB, and the stored file can be larger or smaller than the one sent. Anything that is not an image, audio or video (a PDF, for example) is served as a download rather than shown in a page. When the full storage is a Shopify store's team's, extra storage cannot be added through Shopify yet, so the message ends by saying so and what to do instead: delete files, or contact support. On a Solo plan it names the Teams plan (which holds more) and `error.details.planPageUrl` is the address of the plan page on Shopify. `error.suggestedAction` says the same in a few words, instead of the usual \"upgrade your storage plan\". Any other team, and a person's own workspace, get the shorter message. To upload the file for one of your managed users, send `managedUserId` (Widgetic's id for the user) or `managedUserExternalId` (your own identifier for the user), not both. The file stays in your account and counts against its allowance; the tag lets you list one user's files with `listUploads`. The managed user must be yours and active: one that is not yours, or does not exist, is refused with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`, before the file is stored. The tag is set here and does not change afterwards. Called with an editor session (`createManagedUserEditorSession`), the file is always filed for the session's own managed user and is always media for widget content: naming another managed user is refused with 403 and `MANAGED_USER_SESSION_MISMATCH`, and `contextType`, `source`, `widgetId` and `conversationId` are ignored. A full storage allowance is refused with the same 413 and `QUOTA_STORAGE_EXCEEDED`, but the message only says that it is not available right now (not how much is stored: that is the partner's business) and `error.details.limit` is `storage`. An account that administers a partner with a storage destination (`setPartnerStorageDestination`) has its files stored in the partner's own bucket instead. Such a file takes none of the allowance, its `url` is served from the partner's public address, and its `storage_key` is the key in the partner's bucket. The file is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 and `STORAGE_DESTINATION_UNAVAILABLE`, and when the partner's storage rejects the file with 502 and `STORAGE_DESTINATION_WRITE_FAILED`. Partner storage is not optional, and it does not depend on how the file arrives. A partner's own uploads (with its API key, an SDK token, or from the Widgetic website, the resumable route and the media library alike) and the uploads of its customers' editor sessions are kept in the partner's own storage or not at all, so a partner with no destination (or one that removed it after the session was made) has them refused with 409 and `PARTNER_STORAGE_REQUIRED`; they are never stored with Widgetic. An editor session's browser is only told that the feature is not available right now.
|
|
300
300
|
|
|
301
301
|
### Examples
|
|
302
302
|
|
|
@@ -321,28 +321,28 @@ opts = {
|
|
|
321
321
|
|
|
322
322
|
begin
|
|
323
323
|
# Upload a file
|
|
324
|
-
result = api_instance.
|
|
324
|
+
result = api_instance.upload_file(file, opts)
|
|
325
325
|
p result
|
|
326
326
|
rescue ApiSdkRb::ApiError => e
|
|
327
|
-
puts "Error when calling UploadsApi->
|
|
327
|
+
puts "Error when calling UploadsApi->upload_file: #{e}"
|
|
328
328
|
end
|
|
329
329
|
```
|
|
330
330
|
|
|
331
|
-
#### Using the
|
|
331
|
+
#### Using the upload_file_with_http_info variant
|
|
332
332
|
|
|
333
333
|
This returns an Array which contains the response data, status code and headers.
|
|
334
334
|
|
|
335
|
-
> <Array(<UploadResponse>, Integer, Hash)>
|
|
335
|
+
> <Array(<UploadResponse>, Integer, Hash)> upload_file_with_http_info(file, opts)
|
|
336
336
|
|
|
337
337
|
```ruby
|
|
338
338
|
begin
|
|
339
339
|
# Upload a file
|
|
340
|
-
data, status_code, headers = api_instance.
|
|
340
|
+
data, status_code, headers = api_instance.upload_file_with_http_info(file, opts)
|
|
341
341
|
p status_code # => 2xx
|
|
342
342
|
p headers # => { ... }
|
|
343
343
|
p data # => <UploadResponse>
|
|
344
344
|
rescue ApiSdkRb::ApiError => e
|
|
345
|
-
puts "Error when calling UploadsApi->
|
|
345
|
+
puts "Error when calling UploadsApi->upload_file_with_http_info: #{e}"
|
|
346
346
|
end
|
|
347
347
|
```
|
|
348
348
|
|