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
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Widgetic API Gateway
|
|
3
|
+
|
|
4
|
+
#API documentation for the Widgetic API Gateway
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module ApiSdkRb
|
|
17
|
+
# What the operation tells about its work. A finished composition duplication names the new composition in `newCompositionId`, and lists any problem with its database in `warnings` (absent when there is none). A code generation whose request declared `clientCapabilities` also tells what that client asked to show: `plan` while it builds, `outcome` `needs_answers` with the card in `clarification` when it asked before building, and `nextSteps` once it is done. A key whose part the client did not declare is never present. During code generation, `stage` is a short status line. While the model streams code, `streamTail` holds the last portion of generated source (replaced periodically, cleared when streaming ends). While the model streams reasoning before code, `thinkingTail` holds the last portion of reasoning text (same cadence; cleared when code streaming starts or the run ends). Clients may read `thinkingTail` or `thinking_tail`.
|
|
18
|
+
class GetOperationResponseDataMetadata
|
|
19
|
+
# The plan of a code generation, published when it is made and again each time a step changes (`pending`, `in_progress`, `done`, `failed`). `null` when the build was called off, so the client hides the plan it showed.
|
|
20
|
+
attr_accessor :plan
|
|
21
|
+
|
|
22
|
+
# `needs_answers` on a code generation that completed by asking questions: nothing was built, the credit was returned, and the card is in `clarification`. Absent on every other outcome.
|
|
23
|
+
attr_accessor :outcome
|
|
24
|
+
|
|
25
|
+
# The card of questions, present with `outcome` `needs_answers`.
|
|
26
|
+
attr_accessor :clarification
|
|
27
|
+
|
|
28
|
+
# Suggested next improvements of a completed code generation, the recommended one first. Absent when none were made in time or the build was not kept.
|
|
29
|
+
attr_accessor :next_steps
|
|
30
|
+
|
|
31
|
+
class EnumAttributeValidator
|
|
32
|
+
attr_reader :datatype
|
|
33
|
+
attr_reader :allowable_values
|
|
34
|
+
|
|
35
|
+
def initialize(datatype, allowable_values)
|
|
36
|
+
@allowable_values = allowable_values.map do |value|
|
|
37
|
+
case datatype.to_s
|
|
38
|
+
when /Integer/i
|
|
39
|
+
value.to_i
|
|
40
|
+
when /Float/i
|
|
41
|
+
value.to_f
|
|
42
|
+
else
|
|
43
|
+
value
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def valid?(value)
|
|
49
|
+
!value || allowable_values.include?(value)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
54
|
+
def self.attribute_map
|
|
55
|
+
{
|
|
56
|
+
:'plan' => :'plan',
|
|
57
|
+
:'outcome' => :'outcome',
|
|
58
|
+
:'clarification' => :'clarification',
|
|
59
|
+
:'next_steps' => :'nextSteps'
|
|
60
|
+
}
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Returns all the JSON keys this model knows about
|
|
64
|
+
def self.acceptable_attributes
|
|
65
|
+
attribute_map.values
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Attribute type mapping.
|
|
69
|
+
def self.openapi_types
|
|
70
|
+
{
|
|
71
|
+
:'plan' => :'WidgetPlan',
|
|
72
|
+
:'outcome' => :'String',
|
|
73
|
+
:'clarification' => :'WidgetClarification',
|
|
74
|
+
:'next_steps' => :'Array<WidgetNextStep>'
|
|
75
|
+
}
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# List of attributes with nullable: true
|
|
79
|
+
def self.openapi_nullable
|
|
80
|
+
Set.new([
|
|
81
|
+
:'plan',
|
|
82
|
+
])
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Initializes the object
|
|
86
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
87
|
+
def initialize(attributes = {})
|
|
88
|
+
if (!attributes.is_a?(Hash))
|
|
89
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::GetOperationResponseDataMetadata` initialize method"
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
93
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
94
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
95
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::GetOperationResponseDataMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
96
|
+
end
|
|
97
|
+
h[k.to_sym] = v
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'plan')
|
|
101
|
+
self.plan = attributes[:'plan']
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'outcome')
|
|
105
|
+
self.outcome = attributes[:'outcome']
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'clarification')
|
|
109
|
+
self.clarification = attributes[:'clarification']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'next_steps')
|
|
113
|
+
if (value = attributes[:'next_steps']).is_a?(Array)
|
|
114
|
+
self.next_steps = value
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
120
|
+
# @return Array for valid properties with the reasons
|
|
121
|
+
def list_invalid_properties
|
|
122
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
123
|
+
invalid_properties = Array.new
|
|
124
|
+
invalid_properties
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Check to see if the all the properties in the model are valid
|
|
128
|
+
# @return true if the model is valid
|
|
129
|
+
def valid?
|
|
130
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
131
|
+
outcome_validator = EnumAttributeValidator.new('String', ["needs_answers"])
|
|
132
|
+
return false unless outcome_validator.valid?(@outcome)
|
|
133
|
+
true
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
137
|
+
# @param [Object] outcome Object to be assigned
|
|
138
|
+
def outcome=(outcome)
|
|
139
|
+
validator = EnumAttributeValidator.new('String', ["needs_answers"])
|
|
140
|
+
unless validator.valid?(outcome)
|
|
141
|
+
fail ArgumentError, "invalid value for \"outcome\", must be one of #{validator.allowable_values}."
|
|
142
|
+
end
|
|
143
|
+
@outcome = outcome
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Checks equality by comparing each attribute.
|
|
147
|
+
# @param [Object] Object to be compared
|
|
148
|
+
def ==(o)
|
|
149
|
+
return true if self.equal?(o)
|
|
150
|
+
self.class == o.class &&
|
|
151
|
+
plan == o.plan &&
|
|
152
|
+
outcome == o.outcome &&
|
|
153
|
+
clarification == o.clarification &&
|
|
154
|
+
next_steps == o.next_steps
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# @see the `==` method
|
|
158
|
+
# @param [Object] Object to be compared
|
|
159
|
+
def eql?(o)
|
|
160
|
+
self == o
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Calculates hash code according to all attributes.
|
|
164
|
+
# @return [Integer] Hash code
|
|
165
|
+
def hash
|
|
166
|
+
[plan, outcome, clarification, next_steps].hash
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Builds the object from hash
|
|
170
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
171
|
+
# @return [Object] Returns the model itself
|
|
172
|
+
def self.build_from_hash(attributes)
|
|
173
|
+
return nil unless attributes.is_a?(Hash)
|
|
174
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
175
|
+
transformed_hash = {}
|
|
176
|
+
openapi_types.each_pair do |key, type|
|
|
177
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
178
|
+
transformed_hash["#{key}"] = nil
|
|
179
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
180
|
+
# check to ensure the input is an array given that the attribute
|
|
181
|
+
# is documented as an array but the input is not
|
|
182
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
183
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
184
|
+
end
|
|
185
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
186
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
new(transformed_hash)
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Deserializes the data based on type
|
|
193
|
+
# @param string type Data type
|
|
194
|
+
# @param string value Value to be deserialized
|
|
195
|
+
# @return [Object] Deserialized data
|
|
196
|
+
def self._deserialize(type, value)
|
|
197
|
+
case type.to_sym
|
|
198
|
+
when :Time
|
|
199
|
+
Time.parse(value)
|
|
200
|
+
when :Date
|
|
201
|
+
Date.parse(value)
|
|
202
|
+
when :String
|
|
203
|
+
value.to_s
|
|
204
|
+
when :Integer
|
|
205
|
+
value.to_i
|
|
206
|
+
when :Float
|
|
207
|
+
value.to_f
|
|
208
|
+
when :Boolean
|
|
209
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
210
|
+
true
|
|
211
|
+
else
|
|
212
|
+
false
|
|
213
|
+
end
|
|
214
|
+
when :Object
|
|
215
|
+
# generic object (usually a Hash), return directly
|
|
216
|
+
value
|
|
217
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
218
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
219
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
220
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
221
|
+
k_type = Regexp.last_match[:k_type]
|
|
222
|
+
v_type = Regexp.last_match[:v_type]
|
|
223
|
+
{}.tap do |hash|
|
|
224
|
+
value.each do |k, v|
|
|
225
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
else # model
|
|
229
|
+
# models (e.g. Pet) or oneOf
|
|
230
|
+
klass = ApiSdkRb.const_get(type)
|
|
231
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Returns the string representation of the object
|
|
236
|
+
# @return [String] String presentation of the object
|
|
237
|
+
def to_s
|
|
238
|
+
to_hash.to_s
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
242
|
+
# @return [Hash] Returns the object in the form of hash
|
|
243
|
+
def to_body
|
|
244
|
+
to_hash
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# Returns the object in the form of hash
|
|
248
|
+
# @return [Hash] Returns the object in the form of hash
|
|
249
|
+
def to_hash
|
|
250
|
+
hash = {}
|
|
251
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
252
|
+
value = self.send(attr)
|
|
253
|
+
if value.nil?
|
|
254
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
255
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
hash[param] = _to_hash(value)
|
|
259
|
+
end
|
|
260
|
+
hash
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# Outputs non-array value in the form of hash
|
|
264
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
265
|
+
# @param [Object] value Any valid value
|
|
266
|
+
# @return [Hash] Returns the value in the form of hash
|
|
267
|
+
def _to_hash(value)
|
|
268
|
+
if value.is_a?(Array)
|
|
269
|
+
value.compact.map { |v| _to_hash(v) }
|
|
270
|
+
elsif value.is_a?(Hash)
|
|
271
|
+
{}.tap do |hash|
|
|
272
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
273
|
+
end
|
|
274
|
+
elsif value.respond_to? :to_hash
|
|
275
|
+
value.to_hash
|
|
276
|
+
else
|
|
277
|
+
value
|
|
278
|
+
end
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
end
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module ApiSdkRb
|
|
17
|
-
class
|
|
17
|
+
class ListUploads200Response
|
|
18
18
|
attr_accessor :success
|
|
19
19
|
|
|
20
20
|
attr_accessor :data
|
|
@@ -54,13 +54,13 @@ module ApiSdkRb
|
|
|
54
54
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
55
55
|
def initialize(attributes = {})
|
|
56
56
|
if (!attributes.is_a?(Hash))
|
|
57
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::
|
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::ListUploads200Response` initialize method"
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
61
61
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
62
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
63
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::ListUploads200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
64
64
|
end
|
|
65
65
|
h[k.to_sym] = v
|
|
66
66
|
}
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module ApiSdkRb
|
|
17
|
-
class
|
|
17
|
+
class ManagedUserLimitsResponse
|
|
18
18
|
attr_accessor :success
|
|
19
19
|
|
|
20
20
|
attr_accessor :data
|
|
@@ -54,13 +54,13 @@ module ApiSdkRb
|
|
|
54
54
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
55
55
|
def initialize(attributes = {})
|
|
56
56
|
if (!attributes.is_a?(Hash))
|
|
57
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::
|
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::ManagedUserLimitsResponse` initialize method"
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
61
61
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
62
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
63
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::ManagedUserLimitsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
64
64
|
end
|
|
65
65
|
h[k.to_sym] = v
|
|
66
66
|
}
|
data/lib/api-sdk-rb/models/{uploads_id_delete200_response.rb → managed_user_removal_response.rb}
RENAMED
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module ApiSdkRb
|
|
17
|
-
class
|
|
17
|
+
class ManagedUserRemovalResponse
|
|
18
18
|
attr_accessor :success
|
|
19
19
|
|
|
20
20
|
attr_accessor :data
|
|
@@ -39,7 +39,7 @@ module ApiSdkRb
|
|
|
39
39
|
def self.openapi_types
|
|
40
40
|
{
|
|
41
41
|
:'success' => :'Boolean',
|
|
42
|
-
:'data' => :'
|
|
42
|
+
:'data' => :'ManagedUserRemoval',
|
|
43
43
|
:'meta' => :'ResponseMeta'
|
|
44
44
|
}
|
|
45
45
|
end
|
|
@@ -54,13 +54,13 @@ module ApiSdkRb
|
|
|
54
54
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
55
55
|
def initialize(attributes = {})
|
|
56
56
|
if (!attributes.is_a?(Hash))
|
|
57
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::
|
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::ManagedUserRemovalResponse` initialize method"
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
61
61
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
62
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
63
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::ManagedUserRemovalResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
64
64
|
end
|
|
65
65
|
h[k.to_sym] = v
|
|
66
66
|
}
|
|
@@ -21,6 +21,9 @@ module ApiSdkRb
|
|
|
21
21
|
|
|
22
22
|
attr_accessor :fonts
|
|
23
23
|
|
|
24
|
+
# The whole list of text styles (it replaces the saved list). An empty list removes them, and the fonts by role apply again. Left out, the saved text styles stay as they are.
|
|
25
|
+
attr_accessor :text_styles
|
|
26
|
+
|
|
24
27
|
attr_accessor :spacing
|
|
25
28
|
|
|
26
29
|
# One corner radius in pixels for the whole kit; the small, medium and large radii are made from it. 0 gives square corners. A radius step sent in `spacing` wins over the one made from this value.
|
|
@@ -37,6 +40,7 @@ module ApiSdkRb
|
|
|
37
40
|
{
|
|
38
41
|
:'colors' => :'colors',
|
|
39
42
|
:'fonts' => :'fonts',
|
|
43
|
+
:'text_styles' => :'textStyles',
|
|
40
44
|
:'spacing' => :'spacing',
|
|
41
45
|
:'corner_radius' => :'cornerRadius',
|
|
42
46
|
:'instructions' => :'instructions',
|
|
@@ -54,6 +58,7 @@ module ApiSdkRb
|
|
|
54
58
|
{
|
|
55
59
|
:'colors' => :'Array<BrandColor>',
|
|
56
60
|
:'fonts' => :'PatchBrandKitRequestFonts',
|
|
61
|
+
:'text_styles' => :'Array<BrandTextStyle>',
|
|
57
62
|
:'spacing' => :'PatchBrandKitRequestSpacing',
|
|
58
63
|
:'corner_radius' => :'Integer',
|
|
59
64
|
:'instructions' => :'String',
|
|
@@ -92,6 +97,12 @@ module ApiSdkRb
|
|
|
92
97
|
self.fonts = attributes[:'fonts']
|
|
93
98
|
end
|
|
94
99
|
|
|
100
|
+
if attributes.key?(:'text_styles')
|
|
101
|
+
if (value = attributes[:'text_styles']).is_a?(Array)
|
|
102
|
+
self.text_styles = value
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
95
106
|
if attributes.key?(:'spacing')
|
|
96
107
|
self.spacing = attributes[:'spacing']
|
|
97
108
|
end
|
|
@@ -118,6 +129,10 @@ module ApiSdkRb
|
|
|
118
129
|
invalid_properties.push('invalid value for "colors", number of items must be less than or equal to 24.')
|
|
119
130
|
end
|
|
120
131
|
|
|
132
|
+
if !@text_styles.nil? && @text_styles.length > 12
|
|
133
|
+
invalid_properties.push('invalid value for "text_styles", number of items must be less than or equal to 12.')
|
|
134
|
+
end
|
|
135
|
+
|
|
121
136
|
if !@corner_radius.nil? && @corner_radius > 64
|
|
122
137
|
invalid_properties.push('invalid value for "corner_radius", must be smaller than or equal to 64.')
|
|
123
138
|
end
|
|
@@ -138,6 +153,7 @@ module ApiSdkRb
|
|
|
138
153
|
def valid?
|
|
139
154
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
140
155
|
return false if !@colors.nil? && @colors.length > 24
|
|
156
|
+
return false if !@text_styles.nil? && @text_styles.length > 12
|
|
141
157
|
return false if !@corner_radius.nil? && @corner_radius > 64
|
|
142
158
|
return false if !@corner_radius.nil? && @corner_radius < 0
|
|
143
159
|
return false if !@instructions.nil? && @instructions.to_s.length > 500
|
|
@@ -158,6 +174,20 @@ module ApiSdkRb
|
|
|
158
174
|
@colors = colors
|
|
159
175
|
end
|
|
160
176
|
|
|
177
|
+
# Custom attribute writer method with validation
|
|
178
|
+
# @param [Object] text_styles Value to be assigned
|
|
179
|
+
def text_styles=(text_styles)
|
|
180
|
+
if text_styles.nil?
|
|
181
|
+
fail ArgumentError, 'text_styles cannot be nil'
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if text_styles.length > 12
|
|
185
|
+
fail ArgumentError, 'invalid value for "text_styles", number of items must be less than or equal to 12.'
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
@text_styles = text_styles
|
|
189
|
+
end
|
|
190
|
+
|
|
161
191
|
# Custom attribute writer method with validation
|
|
162
192
|
# @param [Object] corner_radius Value to be assigned
|
|
163
193
|
def corner_radius=(corner_radius)
|
|
@@ -197,6 +227,7 @@ module ApiSdkRb
|
|
|
197
227
|
self.class == o.class &&
|
|
198
228
|
colors == o.colors &&
|
|
199
229
|
fonts == o.fonts &&
|
|
230
|
+
text_styles == o.text_styles &&
|
|
200
231
|
spacing == o.spacing &&
|
|
201
232
|
corner_radius == o.corner_radius &&
|
|
202
233
|
instructions == o.instructions &&
|
|
@@ -212,7 +243,7 @@ module ApiSdkRb
|
|
|
212
243
|
# Calculates hash code according to all attributes.
|
|
213
244
|
# @return [Integer] Hash code
|
|
214
245
|
def hash
|
|
215
|
-
[colors, fonts, spacing, corner_radius, instructions, expected_version].hash
|
|
246
|
+
[colors, fonts, text_styles, spacing, corner_radius, instructions, expected_version].hash
|
|
216
247
|
end
|
|
217
248
|
|
|
218
249
|
# Builds the object from hash
|
|
@@ -24,6 +24,9 @@ module ApiSdkRb
|
|
|
24
24
|
# How many times (1 when not given).
|
|
25
25
|
attr_accessor :c
|
|
26
26
|
|
|
27
|
+
# Only on an `f` event: why moving the visitor on failed. `t` the composition did not appear in time, `e` the widget in it reported an error, `b` the composition could not be built, `o` another reason (a step was already on its way, or the page was going away). Left out by an embed that does not say why; a letter this server does not know is read as left out, and the failure is still counted. On an `n` or an `e` event it is ignored. Never a message: one letter, so that nothing a visitor typed can ride on it.
|
|
28
|
+
attr_accessor :r
|
|
29
|
+
|
|
27
30
|
class EnumAttributeValidator
|
|
28
31
|
attr_reader :datatype
|
|
29
32
|
attr_reader :allowable_values
|
|
@@ -51,7 +54,8 @@ module ApiSdkRb
|
|
|
51
54
|
{
|
|
52
55
|
:'k' => :'k',
|
|
53
56
|
:'id' => :'id',
|
|
54
|
-
:'c' => :'c'
|
|
57
|
+
:'c' => :'c',
|
|
58
|
+
:'r' => :'r'
|
|
55
59
|
}
|
|
56
60
|
end
|
|
57
61
|
|
|
@@ -65,7 +69,8 @@ module ApiSdkRb
|
|
|
65
69
|
{
|
|
66
70
|
:'k' => :'String',
|
|
67
71
|
:'id' => :'String',
|
|
68
|
-
:'c' => :'Integer'
|
|
72
|
+
:'c' => :'Integer',
|
|
73
|
+
:'r' => :'String'
|
|
69
74
|
}
|
|
70
75
|
end
|
|
71
76
|
|
|
@@ -105,6 +110,10 @@ module ApiSdkRb
|
|
|
105
110
|
if attributes.key?(:'c')
|
|
106
111
|
self.c = attributes[:'c']
|
|
107
112
|
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'r')
|
|
115
|
+
self.r = attributes[:'r']
|
|
116
|
+
end
|
|
108
117
|
end
|
|
109
118
|
|
|
110
119
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -147,6 +156,8 @@ module ApiSdkRb
|
|
|
147
156
|
return false if @id !~ Regexp.new(/^[A-Za-z0-9_-]{1,64}$/)
|
|
148
157
|
return false if !@c.nil? && @c > 50
|
|
149
158
|
return false if !@c.nil? && @c < 1
|
|
159
|
+
r_validator = EnumAttributeValidator.new('String', ["t", "e", "b", "o"])
|
|
160
|
+
return false unless r_validator.valid?(@r)
|
|
150
161
|
true
|
|
151
162
|
end
|
|
152
163
|
|
|
@@ -193,6 +204,16 @@ module ApiSdkRb
|
|
|
193
204
|
@c = c
|
|
194
205
|
end
|
|
195
206
|
|
|
207
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
208
|
+
# @param [Object] r Object to be assigned
|
|
209
|
+
def r=(r)
|
|
210
|
+
validator = EnumAttributeValidator.new('String', ["t", "e", "b", "o"])
|
|
211
|
+
unless validator.valid?(r)
|
|
212
|
+
fail ArgumentError, "invalid value for \"r\", must be one of #{validator.allowable_values}."
|
|
213
|
+
end
|
|
214
|
+
@r = r
|
|
215
|
+
end
|
|
216
|
+
|
|
196
217
|
# Checks equality by comparing each attribute.
|
|
197
218
|
# @param [Object] Object to be compared
|
|
198
219
|
def ==(o)
|
|
@@ -200,7 +221,8 @@ module ApiSdkRb
|
|
|
200
221
|
self.class == o.class &&
|
|
201
222
|
k == o.k &&
|
|
202
223
|
id == o.id &&
|
|
203
|
-
c == o.c
|
|
224
|
+
c == o.c &&
|
|
225
|
+
r == o.r
|
|
204
226
|
end
|
|
205
227
|
|
|
206
228
|
# @see the `==` method
|
|
@@ -212,7 +234,7 @@ module ApiSdkRb
|
|
|
212
234
|
# Calculates hash code according to all attributes.
|
|
213
235
|
# @return [Integer] Hash code
|
|
214
236
|
def hash
|
|
215
|
-
[k, id, c].hash
|
|
237
|
+
[k, id, c, r].hash
|
|
216
238
|
end
|
|
217
239
|
|
|
218
240
|
# Builds the object from hash
|
data/lib/api-sdk-rb/models/{get_public_workflow200_response.rb → public_workflow_response.rb}
RENAMED
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module ApiSdkRb
|
|
17
|
-
class
|
|
17
|
+
class PublicWorkflowResponse
|
|
18
18
|
attr_accessor :success
|
|
19
19
|
|
|
20
20
|
attr_accessor :data
|
|
@@ -54,13 +54,13 @@ module ApiSdkRb
|
|
|
54
54
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
55
55
|
def initialize(attributes = {})
|
|
56
56
|
if (!attributes.is_a?(Hash))
|
|
57
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::
|
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::PublicWorkflowResponse` initialize method"
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
61
61
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
62
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
63
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::PublicWorkflowResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
64
64
|
end
|
|
65
65
|
h[k.to_sym] = v
|
|
66
66
|
}
|
|
@@ -48,7 +48,7 @@ module ApiSdkRb
|
|
|
48
48
|
|
|
49
49
|
attr_accessor :conversation_id
|
|
50
50
|
|
|
51
|
-
# The managed user the file was uploaded for, or null when it is the account's own. List one managed user's files with the `managed_user_id` or `managed_user_external_id` query parameter of `
|
|
51
|
+
# The managed user the file was uploaded for, or null when it is the account's own. List one managed user's files with the `managed_user_id` or `managed_user_external_id` query parameter of `listUploads`.
|
|
52
52
|
attr_accessor :managed_user_id
|
|
53
53
|
|
|
54
54
|
# Where in the product the partner uses the file, or null when unknown
|
|
@@ -16,13 +16,13 @@ require 'time'
|
|
|
16
16
|
module ApiSdkRb
|
|
17
17
|
# What the upload endpoints accept. Read it rather than hard-coding the numbers.
|
|
18
18
|
class UploadLimits
|
|
19
|
-
# The largest file `
|
|
19
|
+
# The largest file `uploadFile` takes in one request, in bytes. The same for every account.
|
|
20
20
|
attr_accessor :multipart_max_bytes
|
|
21
21
|
|
|
22
|
-
# The file types `
|
|
22
|
+
# The file types `uploadFile` takes for media (`content-property` uploads)
|
|
23
23
|
attr_accessor :multipart_mime_types
|
|
24
24
|
|
|
25
|
-
# Whether resumable uploads are switched on. They need a signed-in session; an API key uses `
|
|
25
|
+
# Whether resumable uploads are switched on. They need a signed-in session; an API key uses `uploadFile`.
|
|
26
26
|
attr_accessor :tus_enabled
|
|
27
27
|
|
|
28
28
|
# The largest file a resumable upload takes, in bytes (250 MB by default). The same for every account, whatever its plan. A file over `multipart_max_bytes` goes through a resumable upload.
|