dub 0.2.2.pre.alpha.78 → 0.2.2
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/lib/dub.rb +5 -9
- data/lib/open_api_sdk/analytics.rb +13 -19
- data/lib/open_api_sdk/domains.rb +95 -115
- data/lib/open_api_sdk/dub.rb +40 -37
- data/lib/open_api_sdk/links.rb +156 -276
- data/lib/open_api_sdk/metatags.rb +4 -10
- data/lib/open_api_sdk/models/operations/bulkcreatelinks_response.rb +7 -7
- data/lib/open_api_sdk/models/operations/bulkupdatelinks_requestbody.rb +6 -9
- data/lib/open_api_sdk/models/operations/bulkupdatelinks_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/color.rb +2 -1
- data/lib/open_api_sdk/models/operations/createdomain_requestbody.rb +4 -16
- data/lib/open_api_sdk/models/operations/createdomain_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/createlink_requestbody.rb +13 -51
- data/lib/open_api_sdk/models/operations/createlink_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/createtag_requestbody.rb +2 -2
- data/lib/open_api_sdk/models/operations/createtag_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/data.rb +12 -50
- data/lib/open_api_sdk/models/operations/deletedomain_request.rb +2 -2
- data/lib/open_api_sdk/models/operations/deletedomain_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/deletedomain_responsebody.rb +2 -2
- data/lib/open_api_sdk/models/operations/deletelink_request.rb +2 -2
- data/lib/open_api_sdk/models/operations/deletelink_response.rb +3 -3
- data/lib/open_api_sdk/models/operations/deletelink_responsebody.rb +3 -3
- data/lib/open_api_sdk/models/operations/event.rb +3 -2
- data/lib/open_api_sdk/models/operations/getlinkinfo_request.rb +3 -3
- data/lib/open_api_sdk/models/operations/getlinkinfo_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/getlinks_request.rb +10 -25
- data/lib/open_api_sdk/models/operations/getlinks_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/getlinkscount_request.rb +7 -13
- data/lib/open_api_sdk/models/operations/getlinkscount_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/getmetatags_request.rb +2 -2
- data/lib/open_api_sdk/models/operations/getmetatags_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/getmetatags_responsebody.rb +2 -2
- data/lib/open_api_sdk/models/operations/getqrcode_request.rb +5 -14
- data/lib/open_api_sdk/models/operations/getqrcode_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/gettags_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/getworkspace_request.rb +2 -2
- data/lib/open_api_sdk/models/operations/getworkspace_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/groupby.rb +4 -12
- data/lib/open_api_sdk/models/operations/interval.rb +5 -5
- data/lib/open_api_sdk/models/operations/level.rb +2 -1
- data/lib/open_api_sdk/models/operations/listdomains_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/paymentprocessor.rb +2 -3
- data/lib/open_api_sdk/models/operations/requestbody.rb +13 -51
- data/lib/open_api_sdk/models/operations/retrieveanalytics_request.rb +11 -53
- data/lib/open_api_sdk/models/operations/retrieveanalytics_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/sort.rb +3 -5
- data/lib/open_api_sdk/models/operations/trackcustomer_requestbody.rb +33 -0
- data/lib/open_api_sdk/models/operations/{createpartner_response.rb → trackcustomer_response.rb} +5 -5
- data/lib/open_api_sdk/models/operations/trackcustomer_responsebody.rb +33 -0
- data/lib/open_api_sdk/models/operations/tracklead_requestbody.rb +9 -20
- data/lib/open_api_sdk/models/operations/tracklead_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/tracklead_responsebody.rb +23 -8
- data/lib/open_api_sdk/models/operations/tracksale_requestbody.rb +8 -16
- data/lib/open_api_sdk/models/operations/tracksale_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/tracksale_responsebody.rb +20 -8
- data/lib/open_api_sdk/models/operations/updatedomain_request.rb +2 -2
- data/lib/open_api_sdk/models/operations/updatedomain_requestbody.rb +4 -16
- data/lib/open_api_sdk/models/operations/updatedomain_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/updatelink_request.rb +2 -2
- data/lib/open_api_sdk/models/operations/updatelink_requestbody.rb +14 -52
- data/lib/open_api_sdk/models/operations/updatelink_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/updatetag_color.rb +2 -1
- data/lib/open_api_sdk/models/operations/updatetag_request.rb +2 -2
- data/lib/open_api_sdk/models/operations/updatetag_requestbody.rb +2 -2
- data/lib/open_api_sdk/models/operations/updatetag_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/updateworkspace_request.rb +2 -2
- data/lib/open_api_sdk/models/operations/updateworkspace_requestbody.rb +4 -13
- data/lib/open_api_sdk/models/operations/updateworkspace_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/upsertlink_requestbody.rb +13 -51
- data/lib/open_api_sdk/models/operations/upsertlink_response.rb +2 -2
- data/lib/open_api_sdk/models/operations.rb +22 -116
- data/lib/open_api_sdk/models/shared/badrequest.rb +3 -3
- data/lib/open_api_sdk/models/shared/code.rb +2 -1
- data/lib/open_api_sdk/models/shared/color.rb +2 -1
- data/lib/open_api_sdk/models/shared/conflict.rb +3 -3
- data/lib/open_api_sdk/models/shared/conflict_code.rb +2 -1
- data/lib/open_api_sdk/models/shared/conflict_error.rb +2 -2
- data/lib/open_api_sdk/models/shared/countrycode.rb +2 -1
- data/lib/open_api_sdk/models/shared/domains.rb +4 -7
- data/lib/open_api_sdk/models/shared/domainschema.rb +4 -19
- data/lib/open_api_sdk/models/shared/error.rb +2 -2
- data/lib/open_api_sdk/models/shared/forbidden.rb +3 -3
- data/lib/open_api_sdk/models/shared/forbidden_code.rb +2 -1
- data/lib/open_api_sdk/models/shared/forbidden_error.rb +2 -2
- data/lib/open_api_sdk/models/shared/geo.rb +2 -2
- data/lib/open_api_sdk/models/shared/internalservererror.rb +3 -3
- data/lib/open_api_sdk/models/shared/internalservererror_code.rb +2 -1
- data/lib/open_api_sdk/models/shared/internalservererror_error.rb +2 -2
- data/lib/open_api_sdk/models/shared/inviteexpired.rb +3 -3
- data/lib/open_api_sdk/models/shared/inviteexpired_code.rb +2 -1
- data/lib/open_api_sdk/models/shared/inviteexpired_error.rb +2 -2
- data/lib/open_api_sdk/models/shared/linkgeotargeting.rb +2 -2
- data/lib/open_api_sdk/models/shared/linkschema.rb +8 -29
- data/lib/open_api_sdk/models/shared/notfound.rb +3 -3
- data/lib/open_api_sdk/models/shared/notfound_code.rb +2 -1
- data/lib/open_api_sdk/models/shared/notfound_error.rb +2 -2
- data/lib/open_api_sdk/models/shared/plan.rb +2 -1
- data/lib/open_api_sdk/models/shared/ratelimitexceeded.rb +3 -3
- data/lib/open_api_sdk/models/shared/ratelimitexceeded_code.rb +2 -1
- data/lib/open_api_sdk/models/shared/ratelimitexceeded_error.rb +2 -2
- data/lib/open_api_sdk/models/shared/role.rb +2 -1
- data/lib/open_api_sdk/models/shared/security.rb +4 -4
- data/lib/open_api_sdk/models/shared/tagschema.rb +2 -2
- data/lib/open_api_sdk/models/shared/unauthorized.rb +3 -3
- data/lib/open_api_sdk/models/shared/unauthorized_code.rb +2 -1
- data/lib/open_api_sdk/models/shared/unauthorized_error.rb +2 -2
- data/lib/open_api_sdk/models/shared/unprocessableentity.rb +3 -3
- data/lib/open_api_sdk/models/shared/unprocessableentity_code.rb +2 -1
- data/lib/open_api_sdk/models/shared/unprocessableentity_error.rb +2 -2
- data/lib/open_api_sdk/models/shared/users.rb +2 -2
- data/lib/open_api_sdk/models/shared/workspaceschema.rb +8 -47
- data/lib/open_api_sdk/models/shared.rb +2 -12
- data/lib/open_api_sdk/qr_codes.rb +13 -18
- data/lib/open_api_sdk/sdkconfiguration.rb +10 -26
- data/lib/open_api_sdk/tags.rb +60 -161
- data/lib/open_api_sdk/track.rb +109 -34
- data/lib/{crystalline → open_api_sdk/utils}/metadata_fields.rb +20 -33
- data/lib/{crystalline → open_api_sdk/utils}/t.rb +1 -1
- data/lib/open_api_sdk/utils/utils.rb +60 -16
- data/lib/open_api_sdk/workspaces.rb +25 -35
- metadata +12 -166
- data/lib/crystalline/utils.rb +0 -65
- data/lib/crystalline.rb +0 -12
- data/lib/open_api_sdk/customers.rb +0 -464
- data/lib/open_api_sdk/embed_tokens.rb +0 -112
- data/lib/open_api_sdk/events.rb +0 -105
- data/lib/open_api_sdk/folders.rb +0 -373
- data/lib/open_api_sdk/models/operations/accesslevel.rb +0 -18
- data/lib/open_api_sdk/models/operations/bulkdeletelinks_request.rb +0 -24
- data/lib/open_api_sdk/models/operations/bulkdeletelinks_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/bulkdeletelinks_responsebody.rb +0 -24
- data/lib/open_api_sdk/models/operations/click.rb +0 -24
- data/lib/open_api_sdk/models/operations/country.rb +0 -266
- data/lib/open_api_sdk/models/operations/createcustomer_discount.rb +0 -42
- data/lib/open_api_sdk/models/operations/createcustomer_link.rb +0 -36
- data/lib/open_api_sdk/models/operations/createcustomer_partner.rb +0 -33
- data/lib/open_api_sdk/models/operations/createcustomer_requestbody.rb +0 -33
- data/lib/open_api_sdk/models/operations/createcustomer_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/createcustomer_responsebody.rb +0 -51
- data/lib/open_api_sdk/models/operations/createcustomer_type.rb +0 -18
- data/lib/open_api_sdk/models/operations/createfolder_requestbody.rb +0 -27
- data/lib/open_api_sdk/models/operations/createfolder_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/createpartner_requestbody.rb +0 -48
- data/lib/open_api_sdk/models/operations/createpartner_responsebody.rb +0 -75
- data/lib/open_api_sdk/models/operations/createpartnerlink_linkprops.rb +0 -99
- data/lib/open_api_sdk/models/operations/createpartnerlink_requestbody.rb +0 -42
- data/lib/open_api_sdk/models/operations/createpartnerlink_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/createreferralsembedtoken_country.rb +0 -266
- data/lib/open_api_sdk/models/operations/createreferralsembedtoken_linkprops.rb +0 -99
- data/lib/open_api_sdk/models/operations/createreferralsembedtoken_requestbody.rb +0 -33
- data/lib/open_api_sdk/models/operations/createreferralsembedtoken_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/createreferralsembedtoken_responsebody.rb +0 -27
- data/lib/open_api_sdk/models/operations/customer.rb +0 -33
- data/lib/open_api_sdk/models/operations/deletecustomer_request.rb +0 -24
- data/lib/open_api_sdk/models/operations/deletecustomer_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/deletecustomer_responsebody.rb +0 -24
- data/lib/open_api_sdk/models/operations/deletefolder_request.rb +0 -24
- data/lib/open_api_sdk/models/operations/deletefolder_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/deletefolder_responsebody.rb +0 -24
- data/lib/open_api_sdk/models/operations/deletetag_request.rb +0 -24
- data/lib/open_api_sdk/models/operations/deletetag_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/deletetag_responsebody.rb +0 -24
- data/lib/open_api_sdk/models/operations/discount.rb +0 -42
- data/lib/open_api_sdk/models/operations/getcustomer_discount.rb +0 -42
- data/lib/open_api_sdk/models/operations/getcustomer_link.rb +0 -36
- data/lib/open_api_sdk/models/operations/getcustomer_partner.rb +0 -33
- data/lib/open_api_sdk/models/operations/getcustomer_request.rb +0 -27
- data/lib/open_api_sdk/models/operations/getcustomer_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/getcustomer_responsebody.rb +0 -51
- data/lib/open_api_sdk/models/operations/getcustomer_type.rb +0 -18
- data/lib/open_api_sdk/models/operations/getcustomers_partner.rb +0 -33
- data/lib/open_api_sdk/models/operations/getcustomers_request.rb +0 -30
- data/lib/open_api_sdk/models/operations/getcustomers_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/gettags_queryparam_sortby.rb +0 -18
- data/lib/open_api_sdk/models/operations/gettags_queryparam_sortorder.rb +0 -18
- data/lib/open_api_sdk/models/operations/gettags_request.rb +0 -39
- data/lib/open_api_sdk/models/operations/link.rb +0 -36
- data/lib/open_api_sdk/models/operations/linkprops.rb +0 -99
- data/lib/open_api_sdk/models/operations/links.rb +0 -48
- data/lib/open_api_sdk/models/operations/listdomains_request.rb +0 -33
- data/lib/open_api_sdk/models/operations/listevents_request.rb +0 -135
- data/lib/open_api_sdk/models/operations/listevents_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/listfolders_request.rb +0 -33
- data/lib/open_api_sdk/models/operations/listfolders_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/mode.rb +0 -18
- data/lib/open_api_sdk/models/operations/order.rb +0 -20
- data/lib/open_api_sdk/models/operations/partner.rb +0 -45
- data/lib/open_api_sdk/models/operations/queryparam_event.rb +0 -19
- data/lib/open_api_sdk/models/operations/queryparam_groupby.rb +0 -19
- data/lib/open_api_sdk/models/operations/queryparam_interval.rb +0 -25
- data/lib/open_api_sdk/models/operations/queryparam_sortby.rb +0 -17
- data/lib/open_api_sdk/models/operations/queryparam_sortorder.rb +0 -18
- data/lib/open_api_sdk/models/operations/queryparam_trigger.rb +0 -18
- data/lib/open_api_sdk/models/operations/responsebody.rb +0 -51
- data/lib/open_api_sdk/models/operations/retrievepartneranalytics_queryparam_interval.rb +0 -25
- data/lib/open_api_sdk/models/operations/retrievepartneranalytics_request.rb +0 -45
- data/lib/open_api_sdk/models/operations/retrievepartneranalytics_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/sale.rb +0 -36
- data/lib/open_api_sdk/models/operations/sortby.rb +0 -20
- data/lib/open_api_sdk/models/operations/sortorder.rb +0 -18
- data/lib/open_api_sdk/models/operations/status.rb +0 -21
- data/lib/open_api_sdk/models/operations/tracksale_customer.rb +0 -36
- data/lib/open_api_sdk/models/operations/trigger.rb +0 -18
- data/lib/open_api_sdk/models/operations/type.rb +0 -18
- data/lib/open_api_sdk/models/operations/updatecustomer_discount.rb +0 -42
- data/lib/open_api_sdk/models/operations/updatecustomer_link.rb +0 -36
- data/lib/open_api_sdk/models/operations/updatecustomer_partner.rb +0 -33
- data/lib/open_api_sdk/models/operations/updatecustomer_request.rb +0 -30
- data/lib/open_api_sdk/models/operations/updatecustomer_requestbody.rb +0 -33
- data/lib/open_api_sdk/models/operations/updatecustomer_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/updatecustomer_responsebody.rb +0 -51
- data/lib/open_api_sdk/models/operations/updatecustomer_type.rb +0 -18
- data/lib/open_api_sdk/models/operations/updatefolder_accesslevel.rb +0 -18
- data/lib/open_api_sdk/models/operations/updatefolder_request.rb +0 -27
- data/lib/open_api_sdk/models/operations/updatefolder_requestbody.rb +0 -27
- data/lib/open_api_sdk/models/operations/updatefolder_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/updatepartnersale_requestbody.rb +0 -36
- data/lib/open_api_sdk/models/operations/updatepartnersale_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/updatepartnersale_responsebody.rb +0 -45
- data/lib/open_api_sdk/models/operations/updatepartnersale_status.rb +0 -22
- data/lib/open_api_sdk/models/operations/upsertpartnerlink_linkprops.rb +0 -99
- data/lib/open_api_sdk/models/operations/upsertpartnerlink_requestbody.rb +0 -42
- data/lib/open_api_sdk/models/operations/upsertpartnerlink_response.rb +0 -60
- data/lib/open_api_sdk/models/shared/accesslevel.rb +0 -18
- data/lib/open_api_sdk/models/shared/click.rb +0 -63
- data/lib/open_api_sdk/models/shared/clickevent.rb +0 -98
- data/lib/open_api_sdk/models/shared/clickevent_geo.rb +0 -771
- data/lib/open_api_sdk/models/shared/continentcode.rb +0 -23
- data/lib/open_api_sdk/models/shared/event.rb +0 -17
- data/lib/open_api_sdk/models/shared/folderschema.rb +0 -42
- data/lib/open_api_sdk/models/shared/link.rb +0 -163
- data/lib/open_api_sdk/models/shared/registereddomain.rb +0 -30
- data/lib/open_api_sdk/models/shared/type.rb +0 -18
- data/lib/open_api_sdk/partners.rb +0 -461
- data/lib/open_api_sdk/utils/retries.rb +0 -95
data/lib/open_api_sdk/links.rb
CHANGED
@@ -1,13 +1,11 @@
|
|
1
|
-
# Code generated by Speakeasy (https://
|
1
|
+
# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
2
2
|
|
3
3
|
# typed: true
|
4
4
|
# frozen_string_literal: true
|
5
5
|
|
6
6
|
require 'faraday'
|
7
7
|
require 'faraday/multipart'
|
8
|
-
require 'faraday/retry'
|
9
8
|
require 'sorbet-runtime'
|
10
|
-
require_relative 'utils/retries'
|
11
9
|
|
12
10
|
module OpenApiSDK
|
13
11
|
extend T::Sig
|
@@ -21,173 +19,165 @@ module OpenApiSDK
|
|
21
19
|
end
|
22
20
|
|
23
21
|
|
24
|
-
sig { params(request: T.nilable(::OpenApiSDK::Operations::
|
25
|
-
def
|
26
|
-
#
|
27
|
-
#
|
22
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::GetLinksRequest)).returns(::OpenApiSDK::Operations::GetLinksResponse) }
|
23
|
+
def list(request)
|
24
|
+
# list - Retrieve a list of links
|
25
|
+
# Retrieve a paginated list of links for the authenticated workspace.
|
28
26
|
url, params = @sdk_configuration.get_server_details
|
29
27
|
base_url = Utils.template_url(url, params)
|
30
28
|
url = "#{base_url}/links"
|
31
29
|
headers = {}
|
32
|
-
|
33
|
-
headers['content-type'] = req_content_type
|
30
|
+
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetLinksRequest, request)
|
34
31
|
headers['Accept'] = 'application/json'
|
35
32
|
headers['user-agent'] = @sdk_configuration.user_agent
|
36
33
|
|
37
|
-
|
38
|
-
|
39
|
-
r = connection.post(url) do |req|
|
34
|
+
r = @sdk_configuration.client.get(url) do |req|
|
40
35
|
req.headers = headers
|
41
|
-
|
42
|
-
Utils.configure_request_security(req, security) if
|
43
|
-
if form
|
44
|
-
req.body = Utils.encode_form(form)
|
45
|
-
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
46
|
-
req.body = URI.encode_www_form(data)
|
47
|
-
else
|
48
|
-
req.body = data
|
49
|
-
end
|
36
|
+
req.params = query_params
|
37
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
50
38
|
end
|
51
39
|
|
52
40
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
53
41
|
|
54
|
-
res = ::OpenApiSDK::Operations::
|
42
|
+
res = ::OpenApiSDK::Operations::GetLinksResponse.new(
|
55
43
|
status_code: r.status, content_type: content_type, raw_response: r
|
56
44
|
)
|
57
45
|
if r.status == 200
|
58
46
|
if Utils.match_content_type(content_type, 'application/json')
|
59
|
-
out =
|
60
|
-
res.
|
47
|
+
out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::LinkSchema])
|
48
|
+
res.link_schemas = out
|
61
49
|
end
|
62
50
|
elsif r.status == 400
|
63
51
|
if Utils.match_content_type(content_type, 'application/json')
|
64
|
-
out =
|
52
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
|
65
53
|
res.bad_request = out
|
66
54
|
end
|
67
55
|
elsif r.status == 401
|
68
56
|
if Utils.match_content_type(content_type, 'application/json')
|
69
|
-
out =
|
57
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
|
70
58
|
res.unauthorized = out
|
71
59
|
end
|
72
60
|
elsif r.status == 403
|
73
61
|
if Utils.match_content_type(content_type, 'application/json')
|
74
|
-
out =
|
62
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
|
75
63
|
res.forbidden = out
|
76
64
|
end
|
77
65
|
elsif r.status == 404
|
78
66
|
if Utils.match_content_type(content_type, 'application/json')
|
79
|
-
out =
|
67
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
|
80
68
|
res.not_found = out
|
81
69
|
end
|
82
70
|
elsif r.status == 409
|
83
71
|
if Utils.match_content_type(content_type, 'application/json')
|
84
|
-
out =
|
72
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
|
85
73
|
res.conflict = out
|
86
74
|
end
|
87
75
|
elsif r.status == 410
|
88
76
|
if Utils.match_content_type(content_type, 'application/json')
|
89
|
-
out =
|
77
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
|
90
78
|
res.invite_expired = out
|
91
79
|
end
|
92
80
|
elsif r.status == 422
|
93
81
|
if Utils.match_content_type(content_type, 'application/json')
|
94
|
-
out =
|
82
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
|
95
83
|
res.unprocessable_entity = out
|
96
84
|
end
|
97
85
|
elsif r.status == 429
|
98
86
|
if Utils.match_content_type(content_type, 'application/json')
|
99
|
-
out =
|
87
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
|
100
88
|
res.rate_limit_exceeded = out
|
101
89
|
end
|
102
90
|
elsif r.status == 500
|
103
91
|
if Utils.match_content_type(content_type, 'application/json')
|
104
|
-
out =
|
92
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
|
105
93
|
res.internal_server_error = out
|
106
94
|
end
|
107
95
|
end
|
108
|
-
|
109
96
|
res
|
110
97
|
end
|
111
98
|
|
112
99
|
|
113
|
-
sig { params(request: T.nilable(::OpenApiSDK::Operations::
|
114
|
-
def
|
115
|
-
#
|
116
|
-
#
|
100
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::CreateLinkRequestBody)).returns(::OpenApiSDK::Operations::CreateLinkResponse) }
|
101
|
+
def create(request)
|
102
|
+
# create - Create a new link
|
103
|
+
# Create a new link for the authenticated workspace.
|
117
104
|
url, params = @sdk_configuration.get_server_details
|
118
105
|
base_url = Utils.template_url(url, params)
|
119
106
|
url = "#{base_url}/links"
|
120
107
|
headers = {}
|
121
|
-
|
108
|
+
req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
|
109
|
+
headers['content-type'] = req_content_type
|
122
110
|
headers['Accept'] = 'application/json'
|
123
111
|
headers['user-agent'] = @sdk_configuration.user_agent
|
124
112
|
|
125
|
-
|
126
|
-
|
127
|
-
r = connection.get(url) do |req|
|
113
|
+
r = @sdk_configuration.client.post(url) do |req|
|
128
114
|
req.headers = headers
|
129
|
-
req.
|
130
|
-
|
131
|
-
|
115
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
116
|
+
if form
|
117
|
+
req.body = Utils.encode_form(form)
|
118
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
119
|
+
req.body = URI.encode_www_form(data)
|
120
|
+
else
|
121
|
+
req.body = data
|
122
|
+
end
|
132
123
|
end
|
133
124
|
|
134
125
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
135
126
|
|
136
|
-
res = ::OpenApiSDK::Operations::
|
127
|
+
res = ::OpenApiSDK::Operations::CreateLinkResponse.new(
|
137
128
|
status_code: r.status, content_type: content_type, raw_response: r
|
138
129
|
)
|
139
130
|
if r.status == 200
|
140
131
|
if Utils.match_content_type(content_type, 'application/json')
|
141
|
-
out =
|
142
|
-
res.
|
132
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::LinkSchema)
|
133
|
+
res.link_schema = out
|
143
134
|
end
|
144
135
|
elsif r.status == 400
|
145
136
|
if Utils.match_content_type(content_type, 'application/json')
|
146
|
-
out =
|
137
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
|
147
138
|
res.bad_request = out
|
148
139
|
end
|
149
140
|
elsif r.status == 401
|
150
141
|
if Utils.match_content_type(content_type, 'application/json')
|
151
|
-
out =
|
142
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
|
152
143
|
res.unauthorized = out
|
153
144
|
end
|
154
145
|
elsif r.status == 403
|
155
146
|
if Utils.match_content_type(content_type, 'application/json')
|
156
|
-
out =
|
147
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
|
157
148
|
res.forbidden = out
|
158
149
|
end
|
159
150
|
elsif r.status == 404
|
160
151
|
if Utils.match_content_type(content_type, 'application/json')
|
161
|
-
out =
|
152
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
|
162
153
|
res.not_found = out
|
163
154
|
end
|
164
155
|
elsif r.status == 409
|
165
156
|
if Utils.match_content_type(content_type, 'application/json')
|
166
|
-
out =
|
157
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
|
167
158
|
res.conflict = out
|
168
159
|
end
|
169
160
|
elsif r.status == 410
|
170
161
|
if Utils.match_content_type(content_type, 'application/json')
|
171
|
-
out =
|
162
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
|
172
163
|
res.invite_expired = out
|
173
164
|
end
|
174
165
|
elsif r.status == 422
|
175
166
|
if Utils.match_content_type(content_type, 'application/json')
|
176
|
-
out =
|
167
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
|
177
168
|
res.unprocessable_entity = out
|
178
169
|
end
|
179
170
|
elsif r.status == 429
|
180
171
|
if Utils.match_content_type(content_type, 'application/json')
|
181
|
-
out =
|
172
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
|
182
173
|
res.rate_limit_exceeded = out
|
183
174
|
end
|
184
175
|
elsif r.status == 500
|
185
176
|
if Utils.match_content_type(content_type, 'application/json')
|
186
|
-
out =
|
177
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
|
187
178
|
res.internal_server_error = out
|
188
179
|
end
|
189
180
|
end
|
190
|
-
|
191
181
|
res
|
192
182
|
end
|
193
183
|
|
@@ -204,13 +194,10 @@ module OpenApiSDK
|
|
204
194
|
headers['Accept'] = 'application/json'
|
205
195
|
headers['user-agent'] = @sdk_configuration.user_agent
|
206
196
|
|
207
|
-
|
208
|
-
|
209
|
-
r = connection.get(url) do |req|
|
197
|
+
r = @sdk_configuration.client.get(url) do |req|
|
210
198
|
req.headers = headers
|
211
199
|
req.params = query_params
|
212
|
-
security
|
213
|
-
Utils.configure_request_security(req, security) if !security.nil?
|
200
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
214
201
|
end
|
215
202
|
|
216
203
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -220,56 +207,55 @@ module OpenApiSDK
|
|
220
207
|
)
|
221
208
|
if r.status == 200
|
222
209
|
if Utils.match_content_type(content_type, 'application/json')
|
223
|
-
out =
|
210
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::Float)
|
224
211
|
res.number = out
|
225
212
|
end
|
226
213
|
elsif r.status == 400
|
227
214
|
if Utils.match_content_type(content_type, 'application/json')
|
228
|
-
out =
|
215
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
|
229
216
|
res.bad_request = out
|
230
217
|
end
|
231
218
|
elsif r.status == 401
|
232
219
|
if Utils.match_content_type(content_type, 'application/json')
|
233
|
-
out =
|
220
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
|
234
221
|
res.unauthorized = out
|
235
222
|
end
|
236
223
|
elsif r.status == 403
|
237
224
|
if Utils.match_content_type(content_type, 'application/json')
|
238
|
-
out =
|
225
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
|
239
226
|
res.forbidden = out
|
240
227
|
end
|
241
228
|
elsif r.status == 404
|
242
229
|
if Utils.match_content_type(content_type, 'application/json')
|
243
|
-
out =
|
230
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
|
244
231
|
res.not_found = out
|
245
232
|
end
|
246
233
|
elsif r.status == 409
|
247
234
|
if Utils.match_content_type(content_type, 'application/json')
|
248
|
-
out =
|
235
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
|
249
236
|
res.conflict = out
|
250
237
|
end
|
251
238
|
elsif r.status == 410
|
252
239
|
if Utils.match_content_type(content_type, 'application/json')
|
253
|
-
out =
|
240
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
|
254
241
|
res.invite_expired = out
|
255
242
|
end
|
256
243
|
elsif r.status == 422
|
257
244
|
if Utils.match_content_type(content_type, 'application/json')
|
258
|
-
out =
|
245
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
|
259
246
|
res.unprocessable_entity = out
|
260
247
|
end
|
261
248
|
elsif r.status == 429
|
262
249
|
if Utils.match_content_type(content_type, 'application/json')
|
263
|
-
out =
|
250
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
|
264
251
|
res.rate_limit_exceeded = out
|
265
252
|
end
|
266
253
|
elsif r.status == 500
|
267
254
|
if Utils.match_content_type(content_type, 'application/json')
|
268
|
-
out =
|
255
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
|
269
256
|
res.internal_server_error = out
|
270
257
|
end
|
271
258
|
end
|
272
|
-
|
273
259
|
res
|
274
260
|
end
|
275
261
|
|
@@ -286,13 +272,10 @@ module OpenApiSDK
|
|
286
272
|
headers['Accept'] = 'application/json'
|
287
273
|
headers['user-agent'] = @sdk_configuration.user_agent
|
288
274
|
|
289
|
-
|
290
|
-
|
291
|
-
r = connection.get(url) do |req|
|
275
|
+
r = @sdk_configuration.client.get(url) do |req|
|
292
276
|
req.headers = headers
|
293
277
|
req.params = query_params
|
294
|
-
security
|
295
|
-
Utils.configure_request_security(req, security) if !security.nil?
|
278
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
296
279
|
end
|
297
280
|
|
298
281
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -302,235 +285,226 @@ module OpenApiSDK
|
|
302
285
|
)
|
303
286
|
if r.status == 200
|
304
287
|
if Utils.match_content_type(content_type, 'application/json')
|
305
|
-
out =
|
288
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::LinkSchema)
|
306
289
|
res.link_schema = out
|
307
290
|
end
|
308
291
|
elsif r.status == 400
|
309
292
|
if Utils.match_content_type(content_type, 'application/json')
|
310
|
-
out =
|
293
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
|
311
294
|
res.bad_request = out
|
312
295
|
end
|
313
296
|
elsif r.status == 401
|
314
297
|
if Utils.match_content_type(content_type, 'application/json')
|
315
|
-
out =
|
298
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
|
316
299
|
res.unauthorized = out
|
317
300
|
end
|
318
301
|
elsif r.status == 403
|
319
302
|
if Utils.match_content_type(content_type, 'application/json')
|
320
|
-
out =
|
303
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
|
321
304
|
res.forbidden = out
|
322
305
|
end
|
323
306
|
elsif r.status == 404
|
324
307
|
if Utils.match_content_type(content_type, 'application/json')
|
325
|
-
out =
|
308
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
|
326
309
|
res.not_found = out
|
327
310
|
end
|
328
311
|
elsif r.status == 409
|
329
312
|
if Utils.match_content_type(content_type, 'application/json')
|
330
|
-
out =
|
313
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
|
331
314
|
res.conflict = out
|
332
315
|
end
|
333
316
|
elsif r.status == 410
|
334
317
|
if Utils.match_content_type(content_type, 'application/json')
|
335
|
-
out =
|
318
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
|
336
319
|
res.invite_expired = out
|
337
320
|
end
|
338
321
|
elsif r.status == 422
|
339
322
|
if Utils.match_content_type(content_type, 'application/json')
|
340
|
-
out =
|
323
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
|
341
324
|
res.unprocessable_entity = out
|
342
325
|
end
|
343
326
|
elsif r.status == 429
|
344
327
|
if Utils.match_content_type(content_type, 'application/json')
|
345
|
-
out =
|
328
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
|
346
329
|
res.rate_limit_exceeded = out
|
347
330
|
end
|
348
331
|
elsif r.status == 500
|
349
332
|
if Utils.match_content_type(content_type, 'application/json')
|
350
|
-
out =
|
333
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
|
351
334
|
res.internal_server_error = out
|
352
335
|
end
|
353
336
|
end
|
354
|
-
|
355
337
|
res
|
356
338
|
end
|
357
339
|
|
358
340
|
|
359
|
-
sig { params(request: T.nilable(::OpenApiSDK::Operations::
|
360
|
-
def
|
361
|
-
#
|
362
|
-
#
|
341
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::DeleteLinkRequest)).returns(::OpenApiSDK::Operations::DeleteLinkResponse) }
|
342
|
+
def delete(request)
|
343
|
+
# delete - Delete a link
|
344
|
+
# Delete a link for the authenticated workspace.
|
363
345
|
url, params = @sdk_configuration.get_server_details
|
364
346
|
base_url = Utils.template_url(url, params)
|
365
347
|
url = Utils.generate_url(
|
366
|
-
::OpenApiSDK::Operations::
|
348
|
+
::OpenApiSDK::Operations::DeleteLinkRequest,
|
367
349
|
base_url,
|
368
350
|
'/links/{linkId}',
|
369
351
|
request
|
370
352
|
)
|
371
353
|
headers = {}
|
372
|
-
req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :json)
|
373
|
-
headers['content-type'] = req_content_type
|
374
354
|
headers['Accept'] = 'application/json'
|
375
355
|
headers['user-agent'] = @sdk_configuration.user_agent
|
376
356
|
|
377
|
-
|
378
|
-
|
379
|
-
r = connection.patch(url) do |req|
|
357
|
+
r = @sdk_configuration.client.delete(url) do |req|
|
380
358
|
req.headers = headers
|
381
|
-
security
|
382
|
-
Utils.configure_request_security(req, security) if !security.nil?
|
383
|
-
if form
|
384
|
-
req.body = Utils.encode_form(form)
|
385
|
-
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
386
|
-
req.body = URI.encode_www_form(data)
|
387
|
-
else
|
388
|
-
req.body = data
|
389
|
-
end
|
359
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
390
360
|
end
|
391
361
|
|
392
362
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
393
363
|
|
394
|
-
res = ::OpenApiSDK::Operations::
|
364
|
+
res = ::OpenApiSDK::Operations::DeleteLinkResponse.new(
|
395
365
|
status_code: r.status, content_type: content_type, raw_response: r
|
396
366
|
)
|
397
367
|
if r.status == 200
|
398
368
|
if Utils.match_content_type(content_type, 'application/json')
|
399
|
-
out =
|
400
|
-
res.
|
369
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::DeleteLinkResponseBody)
|
370
|
+
res.object = out
|
401
371
|
end
|
402
372
|
elsif r.status == 400
|
403
373
|
if Utils.match_content_type(content_type, 'application/json')
|
404
|
-
out =
|
374
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
|
405
375
|
res.bad_request = out
|
406
376
|
end
|
407
377
|
elsif r.status == 401
|
408
378
|
if Utils.match_content_type(content_type, 'application/json')
|
409
|
-
out =
|
379
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
|
410
380
|
res.unauthorized = out
|
411
381
|
end
|
412
382
|
elsif r.status == 403
|
413
383
|
if Utils.match_content_type(content_type, 'application/json')
|
414
|
-
out =
|
384
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
|
415
385
|
res.forbidden = out
|
416
386
|
end
|
417
387
|
elsif r.status == 404
|
418
388
|
if Utils.match_content_type(content_type, 'application/json')
|
419
|
-
out =
|
389
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
|
420
390
|
res.not_found = out
|
421
391
|
end
|
422
392
|
elsif r.status == 409
|
423
393
|
if Utils.match_content_type(content_type, 'application/json')
|
424
|
-
out =
|
394
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
|
425
395
|
res.conflict = out
|
426
396
|
end
|
427
397
|
elsif r.status == 410
|
428
398
|
if Utils.match_content_type(content_type, 'application/json')
|
429
|
-
out =
|
399
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
|
430
400
|
res.invite_expired = out
|
431
401
|
end
|
432
402
|
elsif r.status == 422
|
433
403
|
if Utils.match_content_type(content_type, 'application/json')
|
434
|
-
out =
|
404
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
|
435
405
|
res.unprocessable_entity = out
|
436
406
|
end
|
437
407
|
elsif r.status == 429
|
438
408
|
if Utils.match_content_type(content_type, 'application/json')
|
439
|
-
out =
|
409
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
|
440
410
|
res.rate_limit_exceeded = out
|
441
411
|
end
|
442
412
|
elsif r.status == 500
|
443
413
|
if Utils.match_content_type(content_type, 'application/json')
|
444
|
-
out =
|
414
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
|
445
415
|
res.internal_server_error = out
|
446
416
|
end
|
447
417
|
end
|
448
|
-
|
449
418
|
res
|
450
419
|
end
|
451
420
|
|
452
421
|
|
453
|
-
sig { params(request: T.nilable(::OpenApiSDK::Operations::
|
454
|
-
def
|
455
|
-
#
|
456
|
-
#
|
422
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::UpdateLinkRequest)).returns(::OpenApiSDK::Operations::UpdateLinkResponse) }
|
423
|
+
def update(request)
|
424
|
+
# update - Update a link
|
425
|
+
# Update a link for the authenticated workspace. If there's no change, returns it as it is.
|
457
426
|
url, params = @sdk_configuration.get_server_details
|
458
427
|
base_url = Utils.template_url(url, params)
|
459
428
|
url = Utils.generate_url(
|
460
|
-
::OpenApiSDK::Operations::
|
429
|
+
::OpenApiSDK::Operations::UpdateLinkRequest,
|
461
430
|
base_url,
|
462
431
|
'/links/{linkId}',
|
463
432
|
request
|
464
433
|
)
|
465
434
|
headers = {}
|
435
|
+
req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :json)
|
436
|
+
headers['content-type'] = req_content_type
|
466
437
|
headers['Accept'] = 'application/json'
|
467
438
|
headers['user-agent'] = @sdk_configuration.user_agent
|
468
439
|
|
469
|
-
|
470
|
-
|
471
|
-
r = connection.delete(url) do |req|
|
440
|
+
r = @sdk_configuration.client.patch(url) do |req|
|
472
441
|
req.headers = headers
|
473
|
-
security
|
474
|
-
|
442
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
443
|
+
if form
|
444
|
+
req.body = Utils.encode_form(form)
|
445
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
446
|
+
req.body = URI.encode_www_form(data)
|
447
|
+
else
|
448
|
+
req.body = data
|
449
|
+
end
|
475
450
|
end
|
476
451
|
|
477
452
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
478
453
|
|
479
|
-
res = ::OpenApiSDK::Operations::
|
454
|
+
res = ::OpenApiSDK::Operations::UpdateLinkResponse.new(
|
480
455
|
status_code: r.status, content_type: content_type, raw_response: r
|
481
456
|
)
|
482
457
|
if r.status == 200
|
483
458
|
if Utils.match_content_type(content_type, 'application/json')
|
484
|
-
out =
|
485
|
-
res.
|
459
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::LinkSchema)
|
460
|
+
res.link_schema = out
|
486
461
|
end
|
487
462
|
elsif r.status == 400
|
488
463
|
if Utils.match_content_type(content_type, 'application/json')
|
489
|
-
out =
|
464
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
|
490
465
|
res.bad_request = out
|
491
466
|
end
|
492
467
|
elsif r.status == 401
|
493
468
|
if Utils.match_content_type(content_type, 'application/json')
|
494
|
-
out =
|
469
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
|
495
470
|
res.unauthorized = out
|
496
471
|
end
|
497
472
|
elsif r.status == 403
|
498
473
|
if Utils.match_content_type(content_type, 'application/json')
|
499
|
-
out =
|
474
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
|
500
475
|
res.forbidden = out
|
501
476
|
end
|
502
477
|
elsif r.status == 404
|
503
478
|
if Utils.match_content_type(content_type, 'application/json')
|
504
|
-
out =
|
479
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
|
505
480
|
res.not_found = out
|
506
481
|
end
|
507
482
|
elsif r.status == 409
|
508
483
|
if Utils.match_content_type(content_type, 'application/json')
|
509
|
-
out =
|
484
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
|
510
485
|
res.conflict = out
|
511
486
|
end
|
512
487
|
elsif r.status == 410
|
513
488
|
if Utils.match_content_type(content_type, 'application/json')
|
514
|
-
out =
|
489
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
|
515
490
|
res.invite_expired = out
|
516
491
|
end
|
517
492
|
elsif r.status == 422
|
518
493
|
if Utils.match_content_type(content_type, 'application/json')
|
519
|
-
out =
|
494
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
|
520
495
|
res.unprocessable_entity = out
|
521
496
|
end
|
522
497
|
elsif r.status == 429
|
523
498
|
if Utils.match_content_type(content_type, 'application/json')
|
524
|
-
out =
|
499
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
|
525
500
|
res.rate_limit_exceeded = out
|
526
501
|
end
|
527
502
|
elsif r.status == 500
|
528
503
|
if Utils.match_content_type(content_type, 'application/json')
|
529
|
-
out =
|
504
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
|
530
505
|
res.internal_server_error = out
|
531
506
|
end
|
532
507
|
end
|
533
|
-
|
534
508
|
res
|
535
509
|
end
|
536
510
|
|
@@ -548,12 +522,9 @@ module OpenApiSDK
|
|
548
522
|
headers['Accept'] = 'application/json'
|
549
523
|
headers['user-agent'] = @sdk_configuration.user_agent
|
550
524
|
|
551
|
-
|
552
|
-
|
553
|
-
r = connection.post(url) do |req|
|
525
|
+
r = @sdk_configuration.client.post(url) do |req|
|
554
526
|
req.headers = headers
|
555
|
-
security
|
556
|
-
Utils.configure_request_security(req, security) if !security.nil?
|
527
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
557
528
|
if form
|
558
529
|
req.body = Utils.encode_form(form)
|
559
530
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
@@ -570,56 +541,55 @@ module OpenApiSDK
|
|
570
541
|
)
|
571
542
|
if r.status == 200
|
572
543
|
if Utils.match_content_type(content_type, 'application/json')
|
573
|
-
out =
|
574
|
-
res.
|
544
|
+
out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::LinkSchema])
|
545
|
+
res.link_schemas = out
|
575
546
|
end
|
576
547
|
elsif r.status == 400
|
577
548
|
if Utils.match_content_type(content_type, 'application/json')
|
578
|
-
out =
|
549
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
|
579
550
|
res.bad_request = out
|
580
551
|
end
|
581
552
|
elsif r.status == 401
|
582
553
|
if Utils.match_content_type(content_type, 'application/json')
|
583
|
-
out =
|
554
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
|
584
555
|
res.unauthorized = out
|
585
556
|
end
|
586
557
|
elsif r.status == 403
|
587
558
|
if Utils.match_content_type(content_type, 'application/json')
|
588
|
-
out =
|
559
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
|
589
560
|
res.forbidden = out
|
590
561
|
end
|
591
562
|
elsif r.status == 404
|
592
563
|
if Utils.match_content_type(content_type, 'application/json')
|
593
|
-
out =
|
564
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
|
594
565
|
res.not_found = out
|
595
566
|
end
|
596
567
|
elsif r.status == 409
|
597
568
|
if Utils.match_content_type(content_type, 'application/json')
|
598
|
-
out =
|
569
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
|
599
570
|
res.conflict = out
|
600
571
|
end
|
601
572
|
elsif r.status == 410
|
602
573
|
if Utils.match_content_type(content_type, 'application/json')
|
603
|
-
out =
|
574
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
|
604
575
|
res.invite_expired = out
|
605
576
|
end
|
606
577
|
elsif r.status == 422
|
607
578
|
if Utils.match_content_type(content_type, 'application/json')
|
608
|
-
out =
|
579
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
|
609
580
|
res.unprocessable_entity = out
|
610
581
|
end
|
611
582
|
elsif r.status == 429
|
612
583
|
if Utils.match_content_type(content_type, 'application/json')
|
613
|
-
out =
|
584
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
|
614
585
|
res.rate_limit_exceeded = out
|
615
586
|
end
|
616
587
|
elsif r.status == 500
|
617
588
|
if Utils.match_content_type(content_type, 'application/json')
|
618
|
-
out =
|
589
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
|
619
590
|
res.internal_server_error = out
|
620
591
|
end
|
621
592
|
end
|
622
|
-
|
623
593
|
res
|
624
594
|
end
|
625
595
|
|
@@ -637,12 +607,9 @@ module OpenApiSDK
|
|
637
607
|
headers['Accept'] = 'application/json'
|
638
608
|
headers['user-agent'] = @sdk_configuration.user_agent
|
639
609
|
|
640
|
-
|
641
|
-
|
642
|
-
r = connection.patch(url) do |req|
|
610
|
+
r = @sdk_configuration.client.patch(url) do |req|
|
643
611
|
req.headers = headers
|
644
|
-
security
|
645
|
-
Utils.configure_request_security(req, security) if !security.nil?
|
612
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
646
613
|
if form
|
647
614
|
req.body = Utils.encode_form(form)
|
648
615
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
@@ -659,138 +626,55 @@ module OpenApiSDK
|
|
659
626
|
)
|
660
627
|
if r.status == 200
|
661
628
|
if Utils.match_content_type(content_type, 'application/json')
|
662
|
-
out =
|
629
|
+
out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::LinkSchema])
|
663
630
|
res.link_schemas = out
|
664
631
|
end
|
665
632
|
elsif r.status == 400
|
666
633
|
if Utils.match_content_type(content_type, 'application/json')
|
667
|
-
out =
|
668
|
-
res.bad_request = out
|
669
|
-
end
|
670
|
-
elsif r.status == 401
|
671
|
-
if Utils.match_content_type(content_type, 'application/json')
|
672
|
-
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Unauthorized)
|
673
|
-
res.unauthorized = out
|
674
|
-
end
|
675
|
-
elsif r.status == 403
|
676
|
-
if Utils.match_content_type(content_type, 'application/json')
|
677
|
-
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Forbidden)
|
678
|
-
res.forbidden = out
|
679
|
-
end
|
680
|
-
elsif r.status == 404
|
681
|
-
if Utils.match_content_type(content_type, 'application/json')
|
682
|
-
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::NotFound)
|
683
|
-
res.not_found = out
|
684
|
-
end
|
685
|
-
elsif r.status == 409
|
686
|
-
if Utils.match_content_type(content_type, 'application/json')
|
687
|
-
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Conflict)
|
688
|
-
res.conflict = out
|
689
|
-
end
|
690
|
-
elsif r.status == 410
|
691
|
-
if Utils.match_content_type(content_type, 'application/json')
|
692
|
-
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InviteExpired)
|
693
|
-
res.invite_expired = out
|
694
|
-
end
|
695
|
-
elsif r.status == 422
|
696
|
-
if Utils.match_content_type(content_type, 'application/json')
|
697
|
-
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::UnprocessableEntity)
|
698
|
-
res.unprocessable_entity = out
|
699
|
-
end
|
700
|
-
elsif r.status == 429
|
701
|
-
if Utils.match_content_type(content_type, 'application/json')
|
702
|
-
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::RateLimitExceeded)
|
703
|
-
res.rate_limit_exceeded = out
|
704
|
-
end
|
705
|
-
elsif r.status == 500
|
706
|
-
if Utils.match_content_type(content_type, 'application/json')
|
707
|
-
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InternalServerError)
|
708
|
-
res.internal_server_error = out
|
709
|
-
end
|
710
|
-
end
|
711
|
-
|
712
|
-
res
|
713
|
-
end
|
714
|
-
|
715
|
-
|
716
|
-
sig { params(request: T.nilable(::OpenApiSDK::Operations::BulkDeleteLinksRequest)).returns(::OpenApiSDK::Operations::BulkDeleteLinksResponse) }
|
717
|
-
def delete_many(request)
|
718
|
-
# delete_many - Bulk delete links
|
719
|
-
# Bulk delete up to 100 links for the authenticated workspace.
|
720
|
-
url, params = @sdk_configuration.get_server_details
|
721
|
-
base_url = Utils.template_url(url, params)
|
722
|
-
url = "#{base_url}/links/bulk"
|
723
|
-
headers = {}
|
724
|
-
query_params = Utils.get_query_params(::OpenApiSDK::Operations::BulkDeleteLinksRequest, request)
|
725
|
-
headers['Accept'] = 'application/json'
|
726
|
-
headers['user-agent'] = @sdk_configuration.user_agent
|
727
|
-
|
728
|
-
connection = @sdk_configuration.client
|
729
|
-
|
730
|
-
r = connection.delete(url) do |req|
|
731
|
-
req.headers = headers
|
732
|
-
req.params = query_params
|
733
|
-
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
734
|
-
Utils.configure_request_security(req, security) if !security.nil?
|
735
|
-
end
|
736
|
-
|
737
|
-
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
738
|
-
|
739
|
-
res = ::OpenApiSDK::Operations::BulkDeleteLinksResponse.new(
|
740
|
-
status_code: r.status, content_type: content_type, raw_response: r
|
741
|
-
)
|
742
|
-
if r.status == 200
|
743
|
-
if Utils.match_content_type(content_type, 'application/json')
|
744
|
-
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Operations::BulkDeleteLinksResponseBody)
|
745
|
-
res.object = out
|
746
|
-
end
|
747
|
-
elsif r.status == 400
|
748
|
-
if Utils.match_content_type(content_type, 'application/json')
|
749
|
-
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::BadRequest)
|
634
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
|
750
635
|
res.bad_request = out
|
751
636
|
end
|
752
637
|
elsif r.status == 401
|
753
638
|
if Utils.match_content_type(content_type, 'application/json')
|
754
|
-
out =
|
639
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
|
755
640
|
res.unauthorized = out
|
756
641
|
end
|
757
642
|
elsif r.status == 403
|
758
643
|
if Utils.match_content_type(content_type, 'application/json')
|
759
|
-
out =
|
644
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
|
760
645
|
res.forbidden = out
|
761
646
|
end
|
762
647
|
elsif r.status == 404
|
763
648
|
if Utils.match_content_type(content_type, 'application/json')
|
764
|
-
out =
|
649
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
|
765
650
|
res.not_found = out
|
766
651
|
end
|
767
652
|
elsif r.status == 409
|
768
653
|
if Utils.match_content_type(content_type, 'application/json')
|
769
|
-
out =
|
654
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
|
770
655
|
res.conflict = out
|
771
656
|
end
|
772
657
|
elsif r.status == 410
|
773
658
|
if Utils.match_content_type(content_type, 'application/json')
|
774
|
-
out =
|
659
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
|
775
660
|
res.invite_expired = out
|
776
661
|
end
|
777
662
|
elsif r.status == 422
|
778
663
|
if Utils.match_content_type(content_type, 'application/json')
|
779
|
-
out =
|
664
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
|
780
665
|
res.unprocessable_entity = out
|
781
666
|
end
|
782
667
|
elsif r.status == 429
|
783
668
|
if Utils.match_content_type(content_type, 'application/json')
|
784
|
-
out =
|
669
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
|
785
670
|
res.rate_limit_exceeded = out
|
786
671
|
end
|
787
672
|
elsif r.status == 500
|
788
673
|
if Utils.match_content_type(content_type, 'application/json')
|
789
|
-
out =
|
674
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
|
790
675
|
res.internal_server_error = out
|
791
676
|
end
|
792
677
|
end
|
793
|
-
|
794
678
|
res
|
795
679
|
end
|
796
680
|
|
@@ -808,12 +692,9 @@ module OpenApiSDK
|
|
808
692
|
headers['Accept'] = 'application/json'
|
809
693
|
headers['user-agent'] = @sdk_configuration.user_agent
|
810
694
|
|
811
|
-
|
812
|
-
|
813
|
-
r = connection.put(url) do |req|
|
695
|
+
r = @sdk_configuration.client.put(url) do |req|
|
814
696
|
req.headers = headers
|
815
|
-
security
|
816
|
-
Utils.configure_request_security(req, security) if !security.nil?
|
697
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
817
698
|
if form
|
818
699
|
req.body = Utils.encode_form(form)
|
819
700
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
@@ -830,56 +711,55 @@ module OpenApiSDK
|
|
830
711
|
)
|
831
712
|
if r.status == 200
|
832
713
|
if Utils.match_content_type(content_type, 'application/json')
|
833
|
-
out =
|
714
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::LinkSchema)
|
834
715
|
res.link_schema = out
|
835
716
|
end
|
836
717
|
elsif r.status == 400
|
837
718
|
if Utils.match_content_type(content_type, 'application/json')
|
838
|
-
out =
|
719
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
|
839
720
|
res.bad_request = out
|
840
721
|
end
|
841
722
|
elsif r.status == 401
|
842
723
|
if Utils.match_content_type(content_type, 'application/json')
|
843
|
-
out =
|
724
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
|
844
725
|
res.unauthorized = out
|
845
726
|
end
|
846
727
|
elsif r.status == 403
|
847
728
|
if Utils.match_content_type(content_type, 'application/json')
|
848
|
-
out =
|
729
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
|
849
730
|
res.forbidden = out
|
850
731
|
end
|
851
732
|
elsif r.status == 404
|
852
733
|
if Utils.match_content_type(content_type, 'application/json')
|
853
|
-
out =
|
734
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
|
854
735
|
res.not_found = out
|
855
736
|
end
|
856
737
|
elsif r.status == 409
|
857
738
|
if Utils.match_content_type(content_type, 'application/json')
|
858
|
-
out =
|
739
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
|
859
740
|
res.conflict = out
|
860
741
|
end
|
861
742
|
elsif r.status == 410
|
862
743
|
if Utils.match_content_type(content_type, 'application/json')
|
863
|
-
out =
|
744
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
|
864
745
|
res.invite_expired = out
|
865
746
|
end
|
866
747
|
elsif r.status == 422
|
867
748
|
if Utils.match_content_type(content_type, 'application/json')
|
868
|
-
out =
|
749
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
|
869
750
|
res.unprocessable_entity = out
|
870
751
|
end
|
871
752
|
elsif r.status == 429
|
872
753
|
if Utils.match_content_type(content_type, 'application/json')
|
873
|
-
out =
|
754
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
|
874
755
|
res.rate_limit_exceeded = out
|
875
756
|
end
|
876
757
|
elsif r.status == 500
|
877
758
|
if Utils.match_content_type(content_type, 'application/json')
|
878
|
-
out =
|
759
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
|
879
760
|
res.internal_server_error = out
|
880
761
|
end
|
881
762
|
end
|
882
|
-
|
883
763
|
res
|
884
764
|
end
|
885
765
|
end
|