appnigma-sdk 1.0.0 → 2.0.0

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.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +147 -35
  4. data/lib/appnigma/checks.rb +29 -5
  5. data/lib/appnigma/client.rb +20 -12
  6. data/lib/appnigma/connections.rb +25 -5
  7. data/lib/appnigma/constants.rb +14 -8
  8. data/lib/appnigma/errors.rb +31 -5
  9. data/lib/appnigma/generated/api/default_api.rb +253 -20
  10. data/lib/appnigma/generated/api_client.rb +1 -1
  11. data/lib/appnigma/generated/api_error.rb +1 -1
  12. data/lib/appnigma/generated/api_model_base.rb +1 -1
  13. data/lib/appnigma/generated/configuration.rb +1 -1
  14. data/lib/appnigma/generated/models/action_entry.rb +1 -1
  15. data/lib/appnigma/generated/models/connection_status.rb +3 -2
  16. data/lib/appnigma/generated/models/create_connection_link_input.rb +2 -13
  17. data/lib/appnigma/generated/models/create_connection_link_output.rb +1 -1
  18. data/lib/appnigma/generated/models/create_portal_link_input.rb +177 -0
  19. data/lib/appnigma/generated/models/create_portal_link_output.rb +205 -0
  20. data/lib/appnigma/generated/models/crm_company.rb +1 -1
  21. data/lib/appnigma/generated/models/crm_company_get_output.rb +1 -1
  22. data/lib/appnigma/generated/models/crm_company_list_output.rb +1 -1
  23. data/lib/appnigma/generated/models/crm_company_write_output.rb +1 -1
  24. data/lib/appnigma/generated/models/crm_contact.rb +1 -1
  25. data/lib/appnigma/generated/models/crm_contact_get_output.rb +1 -1
  26. data/lib/appnigma/generated/models/crm_contact_list_output.rb +1 -1
  27. data/lib/appnigma/generated/models/crm_contact_write_output.rb +1 -1
  28. data/lib/appnigma/generated/models/crm_create_input.rb +2 -13
  29. data/lib/appnigma/generated/models/crm_custom_field.rb +1 -1
  30. data/lib/appnigma/generated/models/crm_deal.rb +1 -1
  31. data/lib/appnigma/generated/models/crm_deal_create_input.rb +2 -13
  32. data/lib/appnigma/generated/models/crm_deal_get_output.rb +1 -1
  33. data/lib/appnigma/generated/models/crm_deal_list_output.rb +1 -1
  34. data/lib/appnigma/generated/models/crm_deal_write_output.rb +1 -1
  35. data/lib/appnigma/generated/models/crm_email.rb +1 -1
  36. data/lib/appnigma/generated/models/crm_get_input.rb +2 -13
  37. data/lib/appnigma/generated/models/crm_labelled.rb +1 -1
  38. data/lib/appnigma/generated/models/crm_list_input.rb +2 -13
  39. data/lib/appnigma/generated/models/crm_phone.rb +1 -1
  40. data/lib/appnigma/generated/models/crm_update_input.rb +2 -13
  41. data/lib/appnigma/generated/models/end_customer.rb +247 -0
  42. data/lib/appnigma/generated/models/end_customer_connection.rb +239 -0
  43. data/lib/appnigma/generated/models/function_entry.rb +74 -5
  44. data/lib/appnigma/generated/models/function_owner.rb +1 -1
  45. data/lib/appnigma/generated/models/function_owner_one_of.rb +1 -1
  46. data/lib/appnigma/generated/models/function_owner_one_of1.rb +18 -17
  47. data/lib/appnigma/generated/models/get_connection_input.rb +216 -0
  48. data/lib/appnigma/generated/models/get_connection_output.rb +18 -5
  49. data/lib/appnigma/generated/models/get_guide_output.rb +1 -1
  50. data/lib/appnigma/generated/models/json_value.rb +1 -1
  51. data/lib/appnigma/generated/models/list_actions_output.rb +1 -1
  52. data/lib/appnigma/generated/models/list_connections_output.rb +193 -0
  53. data/lib/appnigma/generated/models/list_functions_output.rb +1 -1
  54. data/lib/appnigma/generated/models/list_platforms_output.rb +1 -1
  55. data/lib/appnigma/generated/models/logic_conditional.rb +247 -0
  56. data/lib/appnigma/generated/models/platform_entry.rb +1 -1
  57. data/lib/appnigma/generated/models/platform_entry_coverage_inner.rb +1 -1
  58. data/lib/appnigma/generated/models/platform_request_input.rb +2 -13
  59. data/lib/appnigma/generated/models/platform_request_input_body.rb +1 -1
  60. data/lib/appnigma/generated/models/platform_request_output.rb +1 -1
  61. data/lib/appnigma/generated/models/ran_as.rb +1 -1
  62. data/lib/appnigma/generated/models/run_action_input.rb +2 -13
  63. data/lib/appnigma/generated/models/run_action_output.rb +1 -1
  64. data/lib/appnigma/generated/models/run_input.rb +37 -24
  65. data/lib/appnigma/generated/models/run_output.rb +1 -1
  66. data/lib/appnigma/generated/models/sdk_error.rb +1 -1
  67. data/lib/appnigma/generated/models/sdk_error_error.rb +3 -3
  68. data/lib/appnigma/generated/models/sdk_error_error_details.rb +12 -3
  69. data/lib/appnigma/generated/models/sdk_problem.rb +1 -1
  70. data/lib/appnigma/generated/version.rb +1 -1
  71. data/lib/appnigma/generated.rb +8 -1
  72. data/lib/appnigma/portal.rb +21 -0
  73. data/lib/appnigma/transport.rb +4 -4
  74. data/lib/appnigma/version.rb +2 -2
  75. metadata +9 -1
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
5
5
 
6
- The version of the OpenAPI document: 3.0.0
6
+ The version of the OpenAPI document: 4.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0
@@ -15,15 +15,18 @@ require 'time'
15
15
 
16
16
  module Appnigma::Generated
17
17
  class RunInput < ApiModelBase
18
- # Your own id for the end customer.
18
+ # Your own id for the end customer: it must be 1 to 255 characters, with no control characters and not only spaces. Stored exactly as sent: ids that differ only in case or spaces are different end customers.
19
19
  attr_accessor :end_customer_id
20
20
 
21
21
  # The platform the function runs on; it must be switched on for your company.
22
22
  attr_accessor :platform
23
23
 
24
- # The function's name, the same as its file name.
24
+ # The function's name, the same as its file name. Finds your own function; the end customer's version of it runs when they have one. Send this or functionId, not both.
25
25
  attr_accessor :function_name
26
26
 
27
+ # The function's id, as listFunctions gives it. Finds the end customer's own version first, then yours. Send this or functionName, not both.
28
+ attr_accessor :function_id
29
+
27
30
  # What the function takes, in the shape it declared.
28
31
  attr_accessor :input
29
32
 
@@ -36,6 +39,7 @@ module Appnigma::Generated
36
39
  :'end_customer_id' => :'endCustomerId',
37
40
  :'platform' => :'platform',
38
41
  :'function_name' => :'functionName',
42
+ :'function_id' => :'functionId',
39
43
  :'input' => :'input',
40
44
  :'version' => :'version'
41
45
  }
@@ -57,6 +61,7 @@ module Appnigma::Generated
57
61
  :'end_customer_id' => :'String',
58
62
  :'platform' => :'String',
59
63
  :'function_name' => :'String',
64
+ :'function_id' => :'String',
60
65
  :'input' => :'Hash<String, JsonValue>',
61
66
  :'version' => :'JsonValue'
62
67
  }
@@ -109,8 +114,10 @@ module Appnigma::Generated
109
114
 
110
115
  if attributes.key?(:'function_name')
111
116
  self.function_name = attributes[:'function_name']
112
- else
113
- self.function_name = nil
117
+ end
118
+
119
+ if attributes.key?(:'function_id')
120
+ self.function_id = attributes[:'function_id']
114
121
  end
115
122
 
116
123
  if attributes.key?(:'input')
@@ -135,11 +142,6 @@ module Appnigma::Generated
135
142
  invalid_properties.push('invalid value for "end_customer_id", end_customer_id cannot be nil.')
136
143
  end
137
144
 
138
- pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
139
- if @end_customer_id !~ pattern
140
- invalid_properties.push("invalid value for \"end_customer_id\", must conform to the pattern #{pattern}.")
141
- end
142
-
143
145
  if @platform.nil?
144
146
  invalid_properties.push('invalid value for "platform", platform cannot be nil.')
145
147
  end
@@ -149,15 +151,16 @@ module Appnigma::Generated
149
151
  invalid_properties.push("invalid value for \"platform\", must conform to the pattern #{pattern}.")
150
152
  end
151
153
 
152
- if @function_name.nil?
153
- invalid_properties.push('invalid value for "function_name", function_name cannot be nil.')
154
- end
155
-
156
154
  pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
157
- if @function_name !~ pattern
155
+ if !@function_name.nil? && @function_name !~ pattern
158
156
  invalid_properties.push("invalid value for \"function_name\", must conform to the pattern #{pattern}.")
159
157
  end
160
158
 
159
+ pattern = Regexp.new(/^lg_[a-z0-9]{8,}$/)
160
+ if !@function_id.nil? && @function_id !~ pattern
161
+ invalid_properties.push("invalid value for \"function_id\", must conform to the pattern #{pattern}.")
162
+ end
163
+
161
164
  if @input.nil?
162
165
  invalid_properties.push('invalid value for "input", input cannot be nil.')
163
166
  end
@@ -170,11 +173,10 @@ module Appnigma::Generated
170
173
  def valid?
171
174
  warn '[DEPRECATED] the `valid?` method is obsolete'
172
175
  return false if @end_customer_id.nil?
173
- return false if @end_customer_id !~ Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
174
176
  return false if @platform.nil?
175
177
  return false if @platform !~ Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
176
- return false if @function_name.nil?
177
- return false if @function_name !~ Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
178
+ return false if !@function_name.nil? && @function_name !~ Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
179
+ return false if !@function_id.nil? && @function_id !~ Regexp.new(/^lg_[a-z0-9]{8,}$/)
178
180
  return false if @input.nil?
179
181
  true
180
182
  end
@@ -186,11 +188,6 @@ module Appnigma::Generated
186
188
  fail ArgumentError, 'end_customer_id cannot be nil'
187
189
  end
188
190
 
189
- pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
190
- if end_customer_id !~ pattern
191
- fail ArgumentError, "invalid value for \"end_customer_id\", must conform to the pattern #{pattern}."
192
- end
193
-
194
191
  @end_customer_id = end_customer_id
195
192
  end
196
193
 
@@ -224,6 +221,21 @@ module Appnigma::Generated
224
221
  @function_name = function_name
225
222
  end
226
223
 
224
+ # Custom attribute writer method with validation
225
+ # @param [Object] function_id Value to be assigned
226
+ def function_id=(function_id)
227
+ if function_id.nil?
228
+ fail ArgumentError, 'function_id cannot be nil'
229
+ end
230
+
231
+ pattern = Regexp.new(/^lg_[a-z0-9]{8,}$/)
232
+ if function_id !~ pattern
233
+ fail ArgumentError, "invalid value for \"function_id\", must conform to the pattern #{pattern}."
234
+ end
235
+
236
+ @function_id = function_id
237
+ end
238
+
227
239
  # Custom attribute writer method with validation
228
240
  # @param [Object] input Value to be assigned
229
241
  def input=(input)
@@ -242,6 +254,7 @@ module Appnigma::Generated
242
254
  end_customer_id == o.end_customer_id &&
243
255
  platform == o.platform &&
244
256
  function_name == o.function_name &&
257
+ function_id == o.function_id &&
245
258
  input == o.input &&
246
259
  version == o.version
247
260
  end
@@ -255,7 +268,7 @@ module Appnigma::Generated
255
268
  # Calculates hash code according to all attributes.
256
269
  # @return [Integer] Hash code
257
270
  def hash
258
- [end_customer_id, platform, function_name, input, version].hash
271
+ [end_customer_id, platform, function_name, function_id, input, version].hash
259
272
  end
260
273
 
261
274
  # Builds the object from hash
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
5
5
 
6
- The version of the OpenAPI document: 3.0.0
6
+ The version of the OpenAPI document: 4.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
5
5
 
6
- The version of the OpenAPI document: 3.0.0
6
+ The version of the OpenAPI document: 4.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
5
5
 
6
- The version of the OpenAPI document: 3.0.0
6
+ The version of the OpenAPI document: 4.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0
@@ -148,7 +148,7 @@ module Appnigma::Generated
148
148
  def valid?
149
149
  warn '[DEPRECATED] the `valid?` method is obsolete'
150
150
  return false if @code.nil?
151
- code_validator = EnumAttributeValidator.new('String', ["INVALID_INPUT", "SDK_KEY_MISSING", "SDK_KEY_INVALID", "SDK_KEY_CANCELLED", "MICROSERVER_NOT_ENABLED", "PLATFORM_NOT_ENABLED", "END_CUSTOMER_NOT_FOUND", "FUNCTION_NOT_FOUND", "FUNCTION_RETIRED", "RECORD_NOT_FOUND", "ACTION_NOT_FOUND", "MISSING_SCOPES", "DATA_TYPE_NOT_AVAILABLE", "CONNECTION_NEEDS_RECONNECT", "RATE_LIMITED", "PLATFORM_RATE_LIMITED", "PLATFORM_REFUSED", "PLATFORM_ERROR", "TIMED_OUT", "LOGIC_FAILED", "INTERNAL_ERROR"])
151
+ code_validator = EnumAttributeValidator.new('String', ["INVALID_INPUT", "SDK_KEY_MISSING", "SDK_KEY_INVALID", "SDK_KEY_CANCELLED", "MICROSERVER_NOT_ENABLED", "PLATFORM_NOT_ENABLED", "PORTAL_NOT_ENABLED", "END_CUSTOMER_NOT_FOUND", "FUNCTION_NOT_FOUND", "FUNCTION_RETIRED", "RECORD_NOT_FOUND", "ACTION_NOT_FOUND", "MISSING_SCOPES", "DATA_TYPE_NOT_AVAILABLE", "CONNECTION_NEEDS_RECONNECT", "RATE_LIMITED", "PLATFORM_RATE_LIMITED", "PLATFORM_REFUSED", "PLATFORM_ERROR", "TIMED_OUT", "LOGIC_FAILED", "INTERNAL_ERROR"])
152
152
  return false unless code_validator.valid?(@code)
153
153
  return false if @message.nil?
154
154
  return false if @details.nil?
@@ -158,7 +158,7 @@ module Appnigma::Generated
158
158
  # Custom attribute writer method checking allowed values (enum).
159
159
  # @param [Object] code Object to be assigned
160
160
  def code=(code)
161
- validator = EnumAttributeValidator.new('String', ["INVALID_INPUT", "SDK_KEY_MISSING", "SDK_KEY_INVALID", "SDK_KEY_CANCELLED", "MICROSERVER_NOT_ENABLED", "PLATFORM_NOT_ENABLED", "END_CUSTOMER_NOT_FOUND", "FUNCTION_NOT_FOUND", "FUNCTION_RETIRED", "RECORD_NOT_FOUND", "ACTION_NOT_FOUND", "MISSING_SCOPES", "DATA_TYPE_NOT_AVAILABLE", "CONNECTION_NEEDS_RECONNECT", "RATE_LIMITED", "PLATFORM_RATE_LIMITED", "PLATFORM_REFUSED", "PLATFORM_ERROR", "TIMED_OUT", "LOGIC_FAILED", "INTERNAL_ERROR"])
161
+ validator = EnumAttributeValidator.new('String', ["INVALID_INPUT", "SDK_KEY_MISSING", "SDK_KEY_INVALID", "SDK_KEY_CANCELLED", "MICROSERVER_NOT_ENABLED", "PLATFORM_NOT_ENABLED", "PORTAL_NOT_ENABLED", "END_CUSTOMER_NOT_FOUND", "FUNCTION_NOT_FOUND", "FUNCTION_RETIRED", "RECORD_NOT_FOUND", "ACTION_NOT_FOUND", "MISSING_SCOPES", "DATA_TYPE_NOT_AVAILABLE", "CONNECTION_NEEDS_RECONNECT", "RATE_LIMITED", "PLATFORM_RATE_LIMITED", "PLATFORM_REFUSED", "PLATFORM_ERROR", "TIMED_OUT", "LOGIC_FAILED", "INTERNAL_ERROR"])
162
162
  unless validator.valid?(code)
163
163
  fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}."
164
164
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
5
5
 
6
- The version of the OpenAPI document: 3.0.0
6
+ The version of the OpenAPI document: 4.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Appnigma::Generated
17
- # More about this error when there is more to say: problems on INVALID_INPUT, platform on END_CUSTOMER_NOT_FOUND, platforms on a FUNCTION_NOT_FOUND whose name exists on another platform, platform, functionName and retiredAt on FUNCTION_RETIRED, platform and action on ACTION_NOT_FOUND and MISSING_SCOPES, missing on MISSING_SCOPES, status (the platform's own) on PLATFORM_REFUSED and PLATFORM_ERROR, retryAfterSeconds on a 429.
17
+ # More about this error when there is more to say: problems on INVALID_INPUT, platform on END_CUSTOMER_NOT_FOUND, platforms on a FUNCTION_NOT_FOUND whose name or id exists on another platform, platform, functionName, retiredAt and, on a run by functionId, functionId on FUNCTION_RETIRED, platform and action on ACTION_NOT_FOUND and MISSING_SCOPES, missing on MISSING_SCOPES, status (the platform's own) on PLATFORM_REFUSED and PLATFORM_ERROR, retryAfterSeconds on a 429.
18
18
  class SdkErrorErrorDetails < ApiModelBase
19
19
  attr_accessor :problems
20
20
 
@@ -24,6 +24,8 @@ module Appnigma::Generated
24
24
 
25
25
  attr_accessor :function_name
26
26
 
27
+ attr_accessor :function_id
28
+
27
29
  attr_accessor :retired_at
28
30
 
29
31
  attr_accessor :action
@@ -41,6 +43,7 @@ module Appnigma::Generated
41
43
  :'platform' => :'platform',
42
44
  :'platforms' => :'platforms',
43
45
  :'function_name' => :'functionName',
46
+ :'function_id' => :'functionId',
44
47
  :'retired_at' => :'retiredAt',
45
48
  :'action' => :'action',
46
49
  :'missing' => :'missing',
@@ -66,6 +69,7 @@ module Appnigma::Generated
66
69
  :'platform' => :'String',
67
70
  :'platforms' => :'Array<String>',
68
71
  :'function_name' => :'String',
72
+ :'function_id' => :'String',
69
73
  :'retired_at' => :'Time',
70
74
  :'action' => :'String',
71
75
  :'missing' => :'Array<String>',
@@ -126,6 +130,10 @@ module Appnigma::Generated
126
130
  self.function_name = attributes[:'function_name']
127
131
  end
128
132
 
133
+ if attributes.key?(:'function_id')
134
+ self.function_id = attributes[:'function_id']
135
+ end
136
+
129
137
  if attributes.key?(:'retired_at')
130
138
  self.retired_at = attributes[:'retired_at']
131
139
  end
@@ -192,6 +200,7 @@ module Appnigma::Generated
192
200
  platform == o.platform &&
193
201
  platforms == o.platforms &&
194
202
  function_name == o.function_name &&
203
+ function_id == o.function_id &&
195
204
  retired_at == o.retired_at &&
196
205
  action == o.action &&
197
206
  missing == o.missing &&
@@ -208,7 +217,7 @@ module Appnigma::Generated
208
217
  # Calculates hash code according to all attributes.
209
218
  # @return [Integer] Hash code
210
219
  def hash
211
- [problems, platform, platforms, function_name, retired_at, action, missing, status, retry_after_seconds].hash
220
+ [problems, platform, platforms, function_name, function_id, retired_at, action, missing, status, retry_after_seconds].hash
212
221
  end
213
222
 
214
223
  # Builds the object from hash
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
5
5
 
6
- The version of the OpenAPI document: 3.0.0
6
+ The version of the OpenAPI document: 4.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
5
5
 
6
- The version of the OpenAPI document: 3.0.0
6
+ The version of the OpenAPI document: 4.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
5
5
 
6
- The version of the OpenAPI document: 3.0.0
6
+ The version of the OpenAPI document: 4.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0
@@ -22,6 +22,8 @@ require 'appnigma/generated/models/action_entry'
22
22
  require 'appnigma/generated/models/connection_status'
23
23
  require 'appnigma/generated/models/create_connection_link_input'
24
24
  require 'appnigma/generated/models/create_connection_link_output'
25
+ require 'appnigma/generated/models/create_portal_link_input'
26
+ require 'appnigma/generated/models/create_portal_link_output'
25
27
  require 'appnigma/generated/models/crm_company'
26
28
  require 'appnigma/generated/models/crm_company_get_output'
27
29
  require 'appnigma/generated/models/crm_company_list_output'
@@ -43,16 +45,21 @@ require 'appnigma/generated/models/crm_labelled'
43
45
  require 'appnigma/generated/models/crm_list_input'
44
46
  require 'appnigma/generated/models/crm_phone'
45
47
  require 'appnigma/generated/models/crm_update_input'
48
+ require 'appnigma/generated/models/end_customer'
49
+ require 'appnigma/generated/models/end_customer_connection'
46
50
  require 'appnigma/generated/models/function_entry'
47
51
  require 'appnigma/generated/models/function_owner'
48
52
  require 'appnigma/generated/models/function_owner_one_of'
49
53
  require 'appnigma/generated/models/function_owner_one_of1'
54
+ require 'appnigma/generated/models/get_connection_input'
50
55
  require 'appnigma/generated/models/get_connection_output'
51
56
  require 'appnigma/generated/models/get_guide_output'
52
57
  require 'appnigma/generated/models/json_value'
53
58
  require 'appnigma/generated/models/list_actions_output'
59
+ require 'appnigma/generated/models/list_connections_output'
54
60
  require 'appnigma/generated/models/list_functions_output'
55
61
  require 'appnigma/generated/models/list_platforms_output'
62
+ require 'appnigma/generated/models/logic_conditional'
56
63
  require 'appnigma/generated/models/platform_entry'
57
64
  require 'appnigma/generated/models/platform_entry_coverage_inner'
58
65
  require 'appnigma/generated/models/platform_request_input'
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "names"
4
+
5
+ module Appnigma
6
+ # The custom logic portal, where one end customer sees and edits their own
7
+ # logic: `client.portal.create_link` (22.1).
8
+ class Portal
9
+ def initialize(client)
10
+ @client = client
11
+ end
12
+
13
+ # A link that opens the portal for one end customer. Show it in an iframe
14
+ # on one of your sites, or open it in a new tab. It works once and expires
15
+ # after 15 minutes. Made once, never retried: every call makes a new link.
16
+ def create_link(end_customer_id:, timeout_ms: nil)
17
+ body = Names.camel_keys(end_customer_id: end_customer_id)
18
+ @client.call(:create_portal_link, body, policy: @client.one_attempt, timeout_ms: timeout_ms)
19
+ end
20
+ end
21
+ end
@@ -51,10 +51,10 @@ module Appnigma
51
51
 
52
52
  # Calls `<operation>_with_http_info` on the generated API with `args`,
53
53
  # within `timeout_ms`. `opts` carries the generated method's optional
54
- # values (catalog's platform). `header_params` adds request headers (a
55
- # test uses it to pick a mock server's example). Answers
56
- # `{ status:, ok:, request_id:, retry_after_seconds:, json: }`, where
57
- # `json` is nil when the body was empty or not JSON.
54
+ # values (catalog's platform and end customer id). `header_params` adds
55
+ # request headers (a test uses it to pick a mock server's example).
56
+ # Answers `{ status:, ok:, request_id:, retry_after_seconds:, json: }`,
57
+ # where `json` is nil when the body was empty or not JSON.
58
58
  def attempt(operation, *args, timeout_ms:, header_params: {}, opts: {})
59
59
  body, status, headers = call_generated(operation, args, timeout_ms, header_params, opts)
60
60
  answer(status, headers, body)
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Appnigma
4
- VERSION = "1.0.0" # x-release-please-version
4
+ VERSION = "2.0.0" # x-release-please-version
5
5
 
6
6
  # The version of the API description (openapi/sdk-v1.yaml) this gem was
7
7
  # generated from. Written by bin/generate; a test ties it to the file.
8
- API_DESCRIPTION_VERSION = "3.0.0"
8
+ API_DESCRIPTION_VERSION = "4.0.0"
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appnigma-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Appnigma
@@ -86,6 +86,8 @@ files:
86
86
  - lib/appnigma/generated/models/connection_status.rb
87
87
  - lib/appnigma/generated/models/create_connection_link_input.rb
88
88
  - lib/appnigma/generated/models/create_connection_link_output.rb
89
+ - lib/appnigma/generated/models/create_portal_link_input.rb
90
+ - lib/appnigma/generated/models/create_portal_link_output.rb
89
91
  - lib/appnigma/generated/models/crm_company.rb
90
92
  - lib/appnigma/generated/models/crm_company_get_output.rb
91
93
  - lib/appnigma/generated/models/crm_company_list_output.rb
@@ -107,16 +109,21 @@ files:
107
109
  - lib/appnigma/generated/models/crm_list_input.rb
108
110
  - lib/appnigma/generated/models/crm_phone.rb
109
111
  - lib/appnigma/generated/models/crm_update_input.rb
112
+ - lib/appnigma/generated/models/end_customer.rb
113
+ - lib/appnigma/generated/models/end_customer_connection.rb
110
114
  - lib/appnigma/generated/models/function_entry.rb
111
115
  - lib/appnigma/generated/models/function_owner.rb
112
116
  - lib/appnigma/generated/models/function_owner_one_of.rb
113
117
  - lib/appnigma/generated/models/function_owner_one_of1.rb
118
+ - lib/appnigma/generated/models/get_connection_input.rb
114
119
  - lib/appnigma/generated/models/get_connection_output.rb
115
120
  - lib/appnigma/generated/models/get_guide_output.rb
116
121
  - lib/appnigma/generated/models/json_value.rb
117
122
  - lib/appnigma/generated/models/list_actions_output.rb
123
+ - lib/appnigma/generated/models/list_connections_output.rb
118
124
  - lib/appnigma/generated/models/list_functions_output.rb
119
125
  - lib/appnigma/generated/models/list_platforms_output.rb
126
+ - lib/appnigma/generated/models/logic_conditional.rb
120
127
  - lib/appnigma/generated/models/platform_entry.rb
121
128
  - lib/appnigma/generated/models/platform_entry_coverage_inner.rb
122
129
  - lib/appnigma/generated/models/platform_request_input.rb
@@ -134,6 +141,7 @@ files:
134
141
  - lib/appnigma/generated/version.rb
135
142
  - lib/appnigma/names.rb
136
143
  - lib/appnigma/platforms.rb
144
+ - lib/appnigma/portal.rb
137
145
  - lib/appnigma/retry.rb
138
146
  - lib/appnigma/transport.rb
139
147
  - lib/appnigma/version.rb