dub 0.2.2 → 0.3.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.
- checksums.yaml +4 -4
- data/lib/{open_api_sdk/utils → crystalline}/metadata_fields.rb +33 -20
- data/lib/{open_api_sdk/utils → crystalline}/t.rb +1 -1
- data/lib/crystalline/utils.rb +65 -0
- data/lib/crystalline.rb +12 -0
- data/lib/dub.rb +10 -6
- data/lib/open_api_sdk/analytics.rb +72 -17
- data/lib/open_api_sdk/commissions.rb +298 -0
- data/lib/open_api_sdk/customers.rb +709 -0
- data/lib/open_api_sdk/domains.rb +574 -88
- data/lib/open_api_sdk/dub.rb +57 -46
- data/lib/open_api_sdk/embed_tokens.rb +163 -0
- data/lib/open_api_sdk/events.rb +154 -0
- data/lib/open_api_sdk/folders.rb +570 -0
- data/lib/open_api_sdk/links.rb +799 -188
- data/lib/open_api_sdk/models/operations/accesslevel.rb +18 -0
- data/lib/open_api_sdk/models/operations/bulkcreatelinks_response.rb +7 -7
- data/lib/open_api_sdk/models/operations/bulkcreatelinks_testvariants.rb +27 -0
- data/lib/open_api_sdk/models/operations/bulkdeletelinks_request.rb +24 -0
- data/lib/open_api_sdk/models/operations/bulkdeletelinks_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/bulkdeletelinks_responsebody.rb +24 -0
- data/lib/open_api_sdk/models/operations/bulkupdatelinks_requestbody.rb +9 -6
- data/lib/open_api_sdk/models/operations/bulkupdatelinks_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/bulkupdatelinks_testvariants.rb +27 -0
- data/lib/open_api_sdk/models/operations/checkdomainstatus_request.rb +24 -0
- data/lib/open_api_sdk/models/operations/checkdomainstatus_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/click.rb +24 -0
- data/lib/open_api_sdk/models/operations/color.rb +1 -2
- data/lib/open_api_sdk/models/operations/country.rb +266 -0
- data/lib/open_api_sdk/models/operations/createcustomer_discount.rb +48 -0
- data/lib/open_api_sdk/models/operations/createcustomer_link.rb +39 -0
- data/lib/open_api_sdk/models/operations/createcustomer_partner.rb +33 -0
- data/lib/open_api_sdk/models/operations/createcustomer_requestbody.rb +33 -0
- data/lib/open_api_sdk/models/operations/createcustomer_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/createcustomer_responsebody.rb +60 -0
- data/lib/open_api_sdk/models/operations/createcustomer_type.rb +18 -0
- data/lib/open_api_sdk/models/operations/createdomain_requestbody.rb +16 -4
- data/lib/open_api_sdk/models/operations/createdomain_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/createfolder_requestbody.rb +27 -0
- data/lib/open_api_sdk/models/operations/createfolder_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/createlink_requestbody.rb +63 -13
- data/lib/open_api_sdk/models/operations/createlink_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/createpartner_link.rb +48 -0
- data/lib/open_api_sdk/models/operations/createpartner_requestbody.rb +45 -0
- data/lib/open_api_sdk/models/operations/{trackcustomer_response.rb → createpartner_response.rb} +5 -5
- data/lib/open_api_sdk/models/operations/createpartner_responsebody.rb +104 -0
- data/lib/open_api_sdk/models/operations/createpartner_status.rb +23 -0
- data/lib/open_api_sdk/models/operations/createpartner_testvariants.rb +27 -0
- data/lib/open_api_sdk/models/operations/createpartnerlink_linkprops.rb +111 -0
- data/lib/open_api_sdk/models/operations/createpartnerlink_requestbody.rb +39 -0
- data/lib/open_api_sdk/models/operations/createpartnerlink_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/createpartnerlink_testvariants.rb +27 -0
- data/lib/open_api_sdk/models/operations/createreferralsembedtoken_country.rb +266 -0
- data/lib/open_api_sdk/models/operations/createreferralsembedtoken_linkprops.rb +111 -0
- data/lib/open_api_sdk/models/operations/createreferralsembedtoken_requestbody.rb +30 -0
- data/lib/open_api_sdk/models/operations/createreferralsembedtoken_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/createreferralsembedtoken_responsebody.rb +27 -0
- data/lib/open_api_sdk/models/operations/createreferralsembedtoken_testvariants.rb +27 -0
- 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/customer.rb +33 -0
- data/lib/open_api_sdk/models/operations/data.rb +59 -12
- data/lib/open_api_sdk/models/operations/deletecustomer_request.rb +24 -0
- data/lib/open_api_sdk/models/operations/deletecustomer_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/deletecustomer_responsebody.rb +24 -0
- 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/deletefolder_request.rb +24 -0
- data/lib/open_api_sdk/models/operations/deletefolder_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/deletefolder_responsebody.rb +24 -0
- 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/deletetag_request.rb +24 -0
- data/lib/open_api_sdk/models/operations/deletetag_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/deletetag_responsebody.rb +24 -0
- data/lib/open_api_sdk/models/operations/discount.rb +48 -0
- data/lib/open_api_sdk/models/operations/event.rb +2 -3
- data/lib/open_api_sdk/models/operations/getcustomer_discount.rb +48 -0
- data/lib/open_api_sdk/models/operations/getcustomer_link.rb +39 -0
- data/lib/open_api_sdk/models/operations/getcustomer_partner.rb +33 -0
- data/lib/open_api_sdk/models/operations/getcustomer_request.rb +27 -0
- data/lib/open_api_sdk/models/operations/getcustomer_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/getcustomer_responsebody.rb +60 -0
- data/lib/open_api_sdk/models/operations/getcustomer_type.rb +18 -0
- data/lib/open_api_sdk/models/operations/getcustomers_link.rb +39 -0
- data/lib/open_api_sdk/models/operations/getcustomers_partner.rb +33 -0
- data/lib/open_api_sdk/models/operations/getcustomers_queryparam_sortby.rb +18 -0
- data/lib/open_api_sdk/models/operations/getcustomers_queryparam_sortorder.rb +18 -0
- data/lib/open_api_sdk/models/operations/getcustomers_request.rb +51 -0
- data/lib/open_api_sdk/models/operations/getcustomers_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/getcustomers_responsebody.rb +60 -0
- data/lib/open_api_sdk/models/operations/getcustomers_type.rb +18 -0
- 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 +26 -11
- data/lib/open_api_sdk/models/operations/getlinks_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/getlinkscount_request.rb +14 -8
- data/lib/open_api_sdk/models/operations/getlinkscount_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/getqrcode_request.rb +14 -5
- data/lib/open_api_sdk/models/operations/getqrcode_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/gettags_queryparam_sortby.rb +18 -0
- data/lib/open_api_sdk/models/operations/gettags_queryparam_sortorder.rb +18 -0
- data/lib/open_api_sdk/models/operations/gettags_request.rb +39 -0
- 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 +13 -4
- data/lib/open_api_sdk/models/operations/interval.rb +5 -5
- data/lib/open_api_sdk/models/operations/level.rb +1 -2
- data/lib/open_api_sdk/models/operations/link.rb +48 -0
- data/lib/open_api_sdk/models/operations/linkprops.rb +111 -0
- data/lib/open_api_sdk/models/operations/listcommissions_queryparam_interval.rb +25 -0
- data/lib/open_api_sdk/models/operations/listcommissions_queryparam_sortby.rb +18 -0
- data/lib/open_api_sdk/models/operations/listcommissions_queryparam_sortorder.rb +18 -0
- data/lib/open_api_sdk/models/operations/listcommissions_request.rb +60 -0
- data/lib/open_api_sdk/models/operations/listcommissions_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/listcommissions_responsebody.rb +51 -0
- data/lib/open_api_sdk/models/operations/listcommissions_status.rb +23 -0
- data/lib/open_api_sdk/models/operations/listcommissions_type.rb +20 -0
- data/lib/open_api_sdk/models/operations/listdomains_request.rb +33 -0
- data/lib/open_api_sdk/models/operations/listdomains_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/listevents_request.rb +138 -0
- data/lib/open_api_sdk/models/operations/listevents_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/listfolders_request.rb +30 -0
- data/lib/open_api_sdk/models/operations/listfolders_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/mode.rb +18 -0
- data/lib/open_api_sdk/models/operations/order.rb +20 -0
- data/lib/open_api_sdk/models/operations/partner.rb +45 -0
- data/lib/open_api_sdk/models/operations/paymentprocessor.rb +3 -2
- data/lib/open_api_sdk/models/operations/queryparam_event.rb +19 -0
- data/lib/open_api_sdk/models/operations/queryparam_groupby.rb +19 -0
- data/lib/open_api_sdk/models/operations/queryparam_interval.rb +25 -0
- data/lib/open_api_sdk/models/operations/queryparam_sortby.rb +17 -0
- data/lib/open_api_sdk/models/operations/queryparam_sortorder.rb +18 -0
- data/lib/open_api_sdk/models/operations/queryparam_status.rb +23 -0
- data/lib/open_api_sdk/models/operations/queryparam_trigger.rb +18 -0
- data/lib/open_api_sdk/models/operations/registerdomain_requestbody.rb +24 -0
- data/lib/open_api_sdk/models/operations/registerdomain_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/registerdomain_responsebody.rb +30 -0
- data/lib/open_api_sdk/models/operations/requestbody.rb +63 -13
- data/lib/open_api_sdk/models/operations/responsebody.rb +33 -0
- data/lib/open_api_sdk/models/operations/retrieveanalytics_request.rb +60 -15
- data/lib/open_api_sdk/models/operations/retrieveanalytics_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/retrievelinks_request.rb +27 -0
- data/lib/open_api_sdk/models/operations/retrievelinks_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/retrievepartneranalytics_queryparam_interval.rb +25 -0
- data/lib/open_api_sdk/models/operations/retrievepartneranalytics_request.rb +42 -0
- data/lib/open_api_sdk/models/operations/retrievepartneranalytics_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/sale.rb +36 -0
- data/lib/open_api_sdk/models/operations/sort.rb +5 -3
- data/lib/open_api_sdk/models/operations/sortby.rb +20 -0
- data/lib/open_api_sdk/models/operations/sortorder.rb +18 -0
- data/lib/open_api_sdk/models/operations/status.rb +20 -0
- data/lib/open_api_sdk/models/operations/testvariants.rb +27 -0
- data/lib/open_api_sdk/models/operations/tracklead_requestbody.rb +19 -13
- data/lib/open_api_sdk/models/operations/tracklead_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/tracklead_responsebody.rb +8 -23
- data/lib/open_api_sdk/models/operations/tracksale_customer.rb +36 -0
- data/lib/open_api_sdk/models/operations/tracksale_requestbody.rb +15 -12
- data/lib/open_api_sdk/models/operations/tracksale_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/tracksale_responsebody.rb +8 -20
- data/lib/open_api_sdk/models/operations/trigger.rb +18 -0
- data/lib/open_api_sdk/models/operations/type.rb +20 -0
- data/lib/open_api_sdk/models/operations/updatecommission_request.rb +27 -0
- data/lib/open_api_sdk/models/operations/updatecommission_requestbody.rb +33 -0
- data/lib/open_api_sdk/models/operations/updatecommission_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/updatecommission_responsebody.rb +51 -0
- data/lib/open_api_sdk/models/operations/updatecommission_status.rb +23 -0
- data/lib/open_api_sdk/models/operations/updatecommission_type.rb +20 -0
- data/lib/open_api_sdk/models/operations/updatecustomer_discount.rb +48 -0
- data/lib/open_api_sdk/models/operations/updatecustomer_link.rb +39 -0
- data/lib/open_api_sdk/models/operations/updatecustomer_partner.rb +33 -0
- data/lib/open_api_sdk/models/operations/updatecustomer_request.rb +30 -0
- data/lib/open_api_sdk/models/operations/updatecustomer_requestbody.rb +33 -0
- data/lib/open_api_sdk/models/operations/updatecustomer_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/updatecustomer_responsebody.rb +60 -0
- data/lib/open_api_sdk/models/operations/updatecustomer_type.rb +18 -0
- data/lib/open_api_sdk/models/operations/updatedomain_request.rb +2 -2
- data/lib/open_api_sdk/models/operations/updatedomain_requestbody.rb +16 -4
- data/lib/open_api_sdk/models/operations/updatedomain_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/updatefolder_accesslevel.rb +18 -0
- data/lib/open_api_sdk/models/operations/updatefolder_request.rb +27 -0
- data/lib/open_api_sdk/models/operations/updatefolder_requestbody.rb +27 -0
- data/lib/open_api_sdk/models/operations/updatefolder_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/updatelink_request.rb +2 -2
- data/lib/open_api_sdk/models/operations/updatelink_requestbody.rb +61 -17
- data/lib/open_api_sdk/models/operations/updatelink_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/updatelink_testvariants.rb +27 -0
- data/lib/open_api_sdk/models/operations/updatetag_color.rb +1 -2
- 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 +13 -4
- data/lib/open_api_sdk/models/operations/updateworkspace_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/upsertlink_requestbody.rb +63 -13
- data/lib/open_api_sdk/models/operations/upsertlink_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/upsertlink_testvariants.rb +27 -0
- data/lib/open_api_sdk/models/operations/upsertpartnerlink_linkprops.rb +111 -0
- data/lib/open_api_sdk/models/operations/upsertpartnerlink_requestbody.rb +39 -0
- data/lib/open_api_sdk/models/operations/upsertpartnerlink_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/upsertpartnerlink_testvariants.rb +27 -0
- data/lib/open_api_sdk/models/operations.rb +149 -25
- data/lib/open_api_sdk/models/shared/accesslevel.rb +18 -0
- data/lib/open_api_sdk/models/shared/badrequest.rb +3 -3
- data/lib/open_api_sdk/models/shared/code.rb +1 -2
- data/lib/open_api_sdk/models/shared/color.rb +1 -2
- data/lib/open_api_sdk/models/shared/conflict.rb +3 -3
- data/lib/open_api_sdk/models/shared/conflict_code.rb +1 -2
- data/lib/open_api_sdk/models/shared/conflict_error.rb +2 -2
- data/lib/open_api_sdk/models/shared/continentcode.rb +23 -0
- data/lib/open_api_sdk/models/shared/countrycode.rb +2 -3
- data/lib/open_api_sdk/models/shared/domains.rb +7 -4
- data/lib/open_api_sdk/models/shared/domainschema.rb +19 -4
- data/lib/open_api_sdk/models/shared/error.rb +2 -2
- data/lib/open_api_sdk/models/shared/folderschema.rb +39 -0
- data/lib/open_api_sdk/models/shared/forbidden.rb +3 -3
- data/lib/open_api_sdk/models/shared/forbidden_code.rb +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +42 -12
- data/lib/open_api_sdk/models/shared/notfound.rb +3 -3
- data/lib/open_api_sdk/models/shared/notfound_code.rb +1 -2
- data/lib/open_api_sdk/models/shared/notfound_error.rb +2 -2
- data/lib/open_api_sdk/models/shared/plan.rb +2 -2
- data/lib/open_api_sdk/models/shared/ratelimitexceeded.rb +3 -3
- data/lib/open_api_sdk/models/shared/ratelimitexceeded_code.rb +1 -2
- data/lib/open_api_sdk/models/shared/ratelimitexceeded_error.rb +2 -2
- data/lib/open_api_sdk/models/shared/registereddomain.rb +30 -0
- data/lib/open_api_sdk/models/shared/role.rb +1 -2
- 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/testvariants.rb +27 -0
- data/lib/open_api_sdk/models/shared/type.rb +18 -0
- data/lib/open_api_sdk/models/shared/unauthorized.rb +3 -3
- data/lib/open_api_sdk/models/shared/unauthorized_code.rb +1 -2
- 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 +1 -2
- data/lib/open_api_sdk/models/shared/unprocessableentity_error.rb +2 -2
- data/lib/open_api_sdk/models/shared/users.rb +7 -4
- data/lib/open_api_sdk/models/shared/workspaceschema.rb +50 -8
- data/lib/open_api_sdk/models/shared.rb +8 -2
- data/lib/open_api_sdk/partners.rb +701 -0
- data/lib/open_api_sdk/qr_codes.rb +71 -17
- data/lib/open_api_sdk/sdk_hooks/hooks.rb +103 -0
- data/lib/open_api_sdk/sdk_hooks/registration.rb +35 -0
- data/lib/open_api_sdk/sdk_hooks/types.rb +152 -0
- data/lib/open_api_sdk/sdkconfiguration.rb +33 -10
- data/lib/open_api_sdk/tags.rb +366 -68
- data/lib/open_api_sdk/track.rb +148 -122
- data/lib/open_api_sdk/utils/retries.rb +95 -0
- data/lib/open_api_sdk/utils/utils.rb +26 -60
- data/lib/open_api_sdk/workspaces.rb +145 -36
- metadata +198 -15
- data/lib/open_api_sdk/metatags.rb +0 -54
- data/lib/open_api_sdk/models/operations/getmetatags_request.rb +0 -24
- data/lib/open_api_sdk/models/operations/getmetatags_response.rb +0 -33
- data/lib/open_api_sdk/models/operations/getmetatags_responsebody.rb +0 -30
- data/lib/open_api_sdk/models/operations/trackcustomer_requestbody.rb +0 -33
- data/lib/open_api_sdk/models/operations/trackcustomer_responsebody.rb +0 -33
data/lib/open_api_sdk/links.rb
CHANGED
@@ -1,11 +1,14 @@
|
|
1
|
-
# Code generated by Speakeasy (https://
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). 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'
|
8
9
|
require 'sorbet-runtime'
|
10
|
+
require_relative 'sdk_hooks/hooks'
|
11
|
+
require_relative 'utils/retries'
|
9
12
|
|
10
13
|
module OpenApiSDK
|
11
14
|
extend T::Sig
|
@@ -19,171 +22,277 @@ module OpenApiSDK
|
|
19
22
|
end
|
20
23
|
|
21
24
|
|
22
|
-
sig { params(request: T.nilable(::OpenApiSDK::Operations::
|
23
|
-
def
|
24
|
-
#
|
25
|
-
#
|
25
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::CreateLinkRequestBody), timeout_ms: T.nilable(Integer)).returns(::OpenApiSDK::Operations::CreateLinkResponse) }
|
26
|
+
def create(request, timeout_ms = nil)
|
27
|
+
# create - Create a link
|
28
|
+
# Create a link for the authenticated workspace.
|
26
29
|
url, params = @sdk_configuration.get_server_details
|
27
30
|
base_url = Utils.template_url(url, params)
|
28
31
|
url = "#{base_url}/links"
|
29
32
|
headers = {}
|
30
|
-
|
33
|
+
req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
|
34
|
+
headers['content-type'] = req_content_type
|
35
|
+
|
36
|
+
if form
|
37
|
+
body = Utils.encode_form(form)
|
38
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
39
|
+
body = URI.encode_www_form(data)
|
40
|
+
else
|
41
|
+
body = data
|
42
|
+
end
|
31
43
|
headers['Accept'] = 'application/json'
|
32
44
|
headers['user-agent'] = @sdk_configuration.user_agent
|
33
45
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
46
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
47
|
+
|
48
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
49
|
+
timeout ||= @sdk_configuration.timeout
|
50
|
+
|
51
|
+
connection = @sdk_configuration.client
|
52
|
+
|
53
|
+
hook_ctx = SDKHooks::HookContext.new(
|
54
|
+
base_url: base_url,
|
55
|
+
oauth2_scopes: nil,
|
56
|
+
operation_id: 'createLink',
|
57
|
+
security_source: @sdk_configuration.security_source
|
58
|
+
)
|
59
|
+
|
60
|
+
error = T.let(nil, T.nilable(StandardError))
|
61
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
62
|
+
|
63
|
+
begin
|
64
|
+
r = connection.post(url) do |req|
|
65
|
+
req.body = body
|
66
|
+
req.headers.merge!(headers)
|
67
|
+
req.options.timeout = timeout unless timeout.nil?
|
68
|
+
Utils.configure_request_security(req, security)
|
69
|
+
|
70
|
+
@sdk_configuration.hooks.before_request(
|
71
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
72
|
+
hook_ctx: hook_ctx
|
73
|
+
),
|
74
|
+
request: req
|
75
|
+
)
|
76
|
+
end
|
77
|
+
rescue StandardError => e
|
78
|
+
error = e
|
79
|
+
ensure
|
80
|
+
if r.nil? || Utils.error_status?(r.status)
|
81
|
+
r = @sdk_configuration.hooks.after_error(
|
82
|
+
error: error,
|
83
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
84
|
+
hook_ctx: hook_ctx
|
85
|
+
),
|
86
|
+
response: r
|
87
|
+
)
|
88
|
+
else
|
89
|
+
r = @sdk_configuration.hooks.after_success(
|
90
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
91
|
+
hook_ctx: hook_ctx
|
92
|
+
),
|
93
|
+
response: r
|
94
|
+
)
|
95
|
+
end
|
96
|
+
|
97
|
+
if r.nil?
|
98
|
+
raise error if !error.nil?
|
99
|
+
raise 'no response'
|
100
|
+
end
|
38
101
|
end
|
39
102
|
|
40
103
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
41
104
|
|
42
|
-
res = ::OpenApiSDK::Operations::
|
105
|
+
res = ::OpenApiSDK::Operations::CreateLinkResponse.new(
|
43
106
|
status_code: r.status, content_type: content_type, raw_response: r
|
44
107
|
)
|
45
108
|
if r.status == 200
|
46
109
|
if Utils.match_content_type(content_type, 'application/json')
|
47
|
-
out =
|
48
|
-
res.
|
110
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::LinkSchema)
|
111
|
+
res.link_schema = out
|
49
112
|
end
|
50
113
|
elsif r.status == 400
|
51
114
|
if Utils.match_content_type(content_type, 'application/json')
|
52
|
-
out =
|
115
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::BadRequest)
|
53
116
|
res.bad_request = out
|
54
117
|
end
|
55
118
|
elsif r.status == 401
|
56
119
|
if Utils.match_content_type(content_type, 'application/json')
|
57
|
-
out =
|
120
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Unauthorized)
|
58
121
|
res.unauthorized = out
|
59
122
|
end
|
60
123
|
elsif r.status == 403
|
61
124
|
if Utils.match_content_type(content_type, 'application/json')
|
62
|
-
out =
|
125
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Forbidden)
|
63
126
|
res.forbidden = out
|
64
127
|
end
|
65
128
|
elsif r.status == 404
|
66
129
|
if Utils.match_content_type(content_type, 'application/json')
|
67
|
-
out =
|
130
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::NotFound)
|
68
131
|
res.not_found = out
|
69
132
|
end
|
70
133
|
elsif r.status == 409
|
71
134
|
if Utils.match_content_type(content_type, 'application/json')
|
72
|
-
out =
|
135
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Conflict)
|
73
136
|
res.conflict = out
|
74
137
|
end
|
75
138
|
elsif r.status == 410
|
76
139
|
if Utils.match_content_type(content_type, 'application/json')
|
77
|
-
out =
|
140
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InviteExpired)
|
78
141
|
res.invite_expired = out
|
79
142
|
end
|
80
143
|
elsif r.status == 422
|
81
144
|
if Utils.match_content_type(content_type, 'application/json')
|
82
|
-
out =
|
145
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::UnprocessableEntity)
|
83
146
|
res.unprocessable_entity = out
|
84
147
|
end
|
85
148
|
elsif r.status == 429
|
86
149
|
if Utils.match_content_type(content_type, 'application/json')
|
87
|
-
out =
|
150
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::RateLimitExceeded)
|
88
151
|
res.rate_limit_exceeded = out
|
89
152
|
end
|
90
153
|
elsif r.status == 500
|
91
154
|
if Utils.match_content_type(content_type, 'application/json')
|
92
|
-
out =
|
155
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InternalServerError)
|
93
156
|
res.internal_server_error = out
|
94
157
|
end
|
95
158
|
end
|
159
|
+
|
96
160
|
res
|
97
161
|
end
|
98
162
|
|
99
163
|
|
100
|
-
sig { params(request: T.nilable(::OpenApiSDK::Operations::
|
101
|
-
def
|
102
|
-
#
|
103
|
-
#
|
164
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::GetLinksRequest), timeout_ms: T.nilable(Integer)).returns(::OpenApiSDK::Operations::GetLinksResponse) }
|
165
|
+
def list(request, timeout_ms = nil)
|
166
|
+
# list - Retrieve a list of links
|
167
|
+
# Retrieve a paginated list of links for the authenticated workspace.
|
104
168
|
url, params = @sdk_configuration.get_server_details
|
105
169
|
base_url = Utils.template_url(url, params)
|
106
170
|
url = "#{base_url}/links"
|
107
171
|
headers = {}
|
108
|
-
|
109
|
-
headers['content-type'] = req_content_type
|
172
|
+
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetLinksRequest, request)
|
110
173
|
headers['Accept'] = 'application/json'
|
111
174
|
headers['user-agent'] = @sdk_configuration.user_agent
|
112
175
|
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
176
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
177
|
+
|
178
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
179
|
+
timeout ||= @sdk_configuration.timeout
|
180
|
+
|
181
|
+
connection = @sdk_configuration.client
|
182
|
+
|
183
|
+
hook_ctx = SDKHooks::HookContext.new(
|
184
|
+
base_url: base_url,
|
185
|
+
oauth2_scopes: nil,
|
186
|
+
operation_id: 'getLinks',
|
187
|
+
security_source: @sdk_configuration.security_source
|
188
|
+
)
|
189
|
+
|
190
|
+
error = T.let(nil, T.nilable(StandardError))
|
191
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
192
|
+
|
193
|
+
begin
|
194
|
+
r = connection.get(url) do |req|
|
195
|
+
req.headers.merge!(headers)
|
196
|
+
req.options.timeout = timeout unless timeout.nil?
|
197
|
+
req.params = query_params
|
198
|
+
Utils.configure_request_security(req, security)
|
199
|
+
|
200
|
+
@sdk_configuration.hooks.before_request(
|
201
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
202
|
+
hook_ctx: hook_ctx
|
203
|
+
),
|
204
|
+
request: req
|
205
|
+
)
|
206
|
+
end
|
207
|
+
rescue StandardError => e
|
208
|
+
error = e
|
209
|
+
ensure
|
210
|
+
if r.nil? || Utils.error_status?(r.status)
|
211
|
+
r = @sdk_configuration.hooks.after_error(
|
212
|
+
error: error,
|
213
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
214
|
+
hook_ctx: hook_ctx
|
215
|
+
),
|
216
|
+
response: r
|
217
|
+
)
|
120
218
|
else
|
121
|
-
|
219
|
+
r = @sdk_configuration.hooks.after_success(
|
220
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
221
|
+
hook_ctx: hook_ctx
|
222
|
+
),
|
223
|
+
response: r
|
224
|
+
)
|
225
|
+
end
|
226
|
+
|
227
|
+
if r.nil?
|
228
|
+
raise error if !error.nil?
|
229
|
+
raise 'no response'
|
122
230
|
end
|
123
231
|
end
|
124
232
|
|
125
233
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
126
234
|
|
127
|
-
res = ::OpenApiSDK::Operations::
|
235
|
+
res = ::OpenApiSDK::Operations::GetLinksResponse.new(
|
128
236
|
status_code: r.status, content_type: content_type, raw_response: r
|
129
237
|
)
|
130
238
|
if r.status == 200
|
131
239
|
if Utils.match_content_type(content_type, 'application/json')
|
132
|
-
out =
|
133
|
-
res.
|
240
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), T::Array[::OpenApiSDK::Shared::LinkSchema])
|
241
|
+
res.link_schemas = out
|
134
242
|
end
|
135
243
|
elsif r.status == 400
|
136
244
|
if Utils.match_content_type(content_type, 'application/json')
|
137
|
-
out =
|
245
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::BadRequest)
|
138
246
|
res.bad_request = out
|
139
247
|
end
|
140
248
|
elsif r.status == 401
|
141
249
|
if Utils.match_content_type(content_type, 'application/json')
|
142
|
-
out =
|
250
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Unauthorized)
|
143
251
|
res.unauthorized = out
|
144
252
|
end
|
145
253
|
elsif r.status == 403
|
146
254
|
if Utils.match_content_type(content_type, 'application/json')
|
147
|
-
out =
|
255
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Forbidden)
|
148
256
|
res.forbidden = out
|
149
257
|
end
|
150
258
|
elsif r.status == 404
|
151
259
|
if Utils.match_content_type(content_type, 'application/json')
|
152
|
-
out =
|
260
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::NotFound)
|
153
261
|
res.not_found = out
|
154
262
|
end
|
155
263
|
elsif r.status == 409
|
156
264
|
if Utils.match_content_type(content_type, 'application/json')
|
157
|
-
out =
|
265
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Conflict)
|
158
266
|
res.conflict = out
|
159
267
|
end
|
160
268
|
elsif r.status == 410
|
161
269
|
if Utils.match_content_type(content_type, 'application/json')
|
162
|
-
out =
|
270
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InviteExpired)
|
163
271
|
res.invite_expired = out
|
164
272
|
end
|
165
273
|
elsif r.status == 422
|
166
274
|
if Utils.match_content_type(content_type, 'application/json')
|
167
|
-
out =
|
275
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::UnprocessableEntity)
|
168
276
|
res.unprocessable_entity = out
|
169
277
|
end
|
170
278
|
elsif r.status == 429
|
171
279
|
if Utils.match_content_type(content_type, 'application/json')
|
172
|
-
out =
|
280
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::RateLimitExceeded)
|
173
281
|
res.rate_limit_exceeded = out
|
174
282
|
end
|
175
283
|
elsif r.status == 500
|
176
284
|
if Utils.match_content_type(content_type, 'application/json')
|
177
|
-
out =
|
285
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InternalServerError)
|
178
286
|
res.internal_server_error = out
|
179
287
|
end
|
180
288
|
end
|
289
|
+
|
181
290
|
res
|
182
291
|
end
|
183
292
|
|
184
293
|
|
185
|
-
sig { params(request: T.nilable(::OpenApiSDK::Operations::GetLinksCountRequest)).returns(::OpenApiSDK::Operations::GetLinksCountResponse) }
|
186
|
-
def count(request)
|
294
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::GetLinksCountRequest), timeout_ms: T.nilable(Integer)).returns(::OpenApiSDK::Operations::GetLinksCountResponse) }
|
295
|
+
def count(request, timeout_ms = nil)
|
187
296
|
# count - Retrieve links count
|
188
297
|
# Retrieve the number of links for the authenticated workspace.
|
189
298
|
url, params = @sdk_configuration.get_server_details
|
@@ -194,10 +303,61 @@ module OpenApiSDK
|
|
194
303
|
headers['Accept'] = 'application/json'
|
195
304
|
headers['user-agent'] = @sdk_configuration.user_agent
|
196
305
|
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
306
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
307
|
+
|
308
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
309
|
+
timeout ||= @sdk_configuration.timeout
|
310
|
+
|
311
|
+
connection = @sdk_configuration.client
|
312
|
+
|
313
|
+
hook_ctx = SDKHooks::HookContext.new(
|
314
|
+
base_url: base_url,
|
315
|
+
oauth2_scopes: nil,
|
316
|
+
operation_id: 'getLinksCount',
|
317
|
+
security_source: @sdk_configuration.security_source
|
318
|
+
)
|
319
|
+
|
320
|
+
error = T.let(nil, T.nilable(StandardError))
|
321
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
322
|
+
|
323
|
+
begin
|
324
|
+
r = connection.get(url) do |req|
|
325
|
+
req.headers.merge!(headers)
|
326
|
+
req.options.timeout = timeout unless timeout.nil?
|
327
|
+
req.params = query_params
|
328
|
+
Utils.configure_request_security(req, security)
|
329
|
+
|
330
|
+
@sdk_configuration.hooks.before_request(
|
331
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
332
|
+
hook_ctx: hook_ctx
|
333
|
+
),
|
334
|
+
request: req
|
335
|
+
)
|
336
|
+
end
|
337
|
+
rescue StandardError => e
|
338
|
+
error = e
|
339
|
+
ensure
|
340
|
+
if r.nil? || Utils.error_status?(r.status)
|
341
|
+
r = @sdk_configuration.hooks.after_error(
|
342
|
+
error: error,
|
343
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
344
|
+
hook_ctx: hook_ctx
|
345
|
+
),
|
346
|
+
response: r
|
347
|
+
)
|
348
|
+
else
|
349
|
+
r = @sdk_configuration.hooks.after_success(
|
350
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
351
|
+
hook_ctx: hook_ctx
|
352
|
+
),
|
353
|
+
response: r
|
354
|
+
)
|
355
|
+
end
|
356
|
+
|
357
|
+
if r.nil?
|
358
|
+
raise error if !error.nil?
|
359
|
+
raise 'no response'
|
360
|
+
end
|
201
361
|
end
|
202
362
|
|
203
363
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -207,61 +367,62 @@ module OpenApiSDK
|
|
207
367
|
)
|
208
368
|
if r.status == 200
|
209
369
|
if Utils.match_content_type(content_type, 'application/json')
|
210
|
-
out =
|
370
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::Float)
|
211
371
|
res.number = out
|
212
372
|
end
|
213
373
|
elsif r.status == 400
|
214
374
|
if Utils.match_content_type(content_type, 'application/json')
|
215
|
-
out =
|
375
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::BadRequest)
|
216
376
|
res.bad_request = out
|
217
377
|
end
|
218
378
|
elsif r.status == 401
|
219
379
|
if Utils.match_content_type(content_type, 'application/json')
|
220
|
-
out =
|
380
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Unauthorized)
|
221
381
|
res.unauthorized = out
|
222
382
|
end
|
223
383
|
elsif r.status == 403
|
224
384
|
if Utils.match_content_type(content_type, 'application/json')
|
225
|
-
out =
|
385
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Forbidden)
|
226
386
|
res.forbidden = out
|
227
387
|
end
|
228
388
|
elsif r.status == 404
|
229
389
|
if Utils.match_content_type(content_type, 'application/json')
|
230
|
-
out =
|
390
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::NotFound)
|
231
391
|
res.not_found = out
|
232
392
|
end
|
233
393
|
elsif r.status == 409
|
234
394
|
if Utils.match_content_type(content_type, 'application/json')
|
235
|
-
out =
|
395
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Conflict)
|
236
396
|
res.conflict = out
|
237
397
|
end
|
238
398
|
elsif r.status == 410
|
239
399
|
if Utils.match_content_type(content_type, 'application/json')
|
240
|
-
out =
|
400
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InviteExpired)
|
241
401
|
res.invite_expired = out
|
242
402
|
end
|
243
403
|
elsif r.status == 422
|
244
404
|
if Utils.match_content_type(content_type, 'application/json')
|
245
|
-
out =
|
405
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::UnprocessableEntity)
|
246
406
|
res.unprocessable_entity = out
|
247
407
|
end
|
248
408
|
elsif r.status == 429
|
249
409
|
if Utils.match_content_type(content_type, 'application/json')
|
250
|
-
out =
|
410
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::RateLimitExceeded)
|
251
411
|
res.rate_limit_exceeded = out
|
252
412
|
end
|
253
413
|
elsif r.status == 500
|
254
414
|
if Utils.match_content_type(content_type, 'application/json')
|
255
|
-
out =
|
415
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InternalServerError)
|
256
416
|
res.internal_server_error = out
|
257
417
|
end
|
258
418
|
end
|
419
|
+
|
259
420
|
res
|
260
421
|
end
|
261
422
|
|
262
423
|
|
263
|
-
sig { params(request: T.nilable(::OpenApiSDK::Operations::GetLinkInfoRequest)).returns(::OpenApiSDK::Operations::GetLinkInfoResponse) }
|
264
|
-
def get(request)
|
424
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::GetLinkInfoRequest), timeout_ms: T.nilable(Integer)).returns(::OpenApiSDK::Operations::GetLinkInfoResponse) }
|
425
|
+
def get(request, timeout_ms = nil)
|
265
426
|
# get - Retrieve a link
|
266
427
|
# Retrieve the info for a link.
|
267
428
|
url, params = @sdk_configuration.get_server_details
|
@@ -272,10 +433,61 @@ module OpenApiSDK
|
|
272
433
|
headers['Accept'] = 'application/json'
|
273
434
|
headers['user-agent'] = @sdk_configuration.user_agent
|
274
435
|
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
436
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
437
|
+
|
438
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
439
|
+
timeout ||= @sdk_configuration.timeout
|
440
|
+
|
441
|
+
connection = @sdk_configuration.client
|
442
|
+
|
443
|
+
hook_ctx = SDKHooks::HookContext.new(
|
444
|
+
base_url: base_url,
|
445
|
+
oauth2_scopes: nil,
|
446
|
+
operation_id: 'getLinkInfo',
|
447
|
+
security_source: @sdk_configuration.security_source
|
448
|
+
)
|
449
|
+
|
450
|
+
error = T.let(nil, T.nilable(StandardError))
|
451
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
452
|
+
|
453
|
+
begin
|
454
|
+
r = connection.get(url) do |req|
|
455
|
+
req.headers.merge!(headers)
|
456
|
+
req.options.timeout = timeout unless timeout.nil?
|
457
|
+
req.params = query_params
|
458
|
+
Utils.configure_request_security(req, security)
|
459
|
+
|
460
|
+
@sdk_configuration.hooks.before_request(
|
461
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
462
|
+
hook_ctx: hook_ctx
|
463
|
+
),
|
464
|
+
request: req
|
465
|
+
)
|
466
|
+
end
|
467
|
+
rescue StandardError => e
|
468
|
+
error = e
|
469
|
+
ensure
|
470
|
+
if r.nil? || Utils.error_status?(r.status)
|
471
|
+
r = @sdk_configuration.hooks.after_error(
|
472
|
+
error: error,
|
473
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
474
|
+
hook_ctx: hook_ctx
|
475
|
+
),
|
476
|
+
response: r
|
477
|
+
)
|
478
|
+
else
|
479
|
+
r = @sdk_configuration.hooks.after_success(
|
480
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
481
|
+
hook_ctx: hook_ctx
|
482
|
+
),
|
483
|
+
response: r
|
484
|
+
)
|
485
|
+
end
|
486
|
+
|
487
|
+
if r.nil?
|
488
|
+
raise error if !error.nil?
|
489
|
+
raise 'no response'
|
490
|
+
end
|
279
491
|
end
|
280
492
|
|
281
493
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -285,232 +497,339 @@ module OpenApiSDK
|
|
285
497
|
)
|
286
498
|
if r.status == 200
|
287
499
|
if Utils.match_content_type(content_type, 'application/json')
|
288
|
-
out =
|
500
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::LinkSchema)
|
289
501
|
res.link_schema = out
|
290
502
|
end
|
291
503
|
elsif r.status == 400
|
292
504
|
if Utils.match_content_type(content_type, 'application/json')
|
293
|
-
out =
|
505
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::BadRequest)
|
294
506
|
res.bad_request = out
|
295
507
|
end
|
296
508
|
elsif r.status == 401
|
297
509
|
if Utils.match_content_type(content_type, 'application/json')
|
298
|
-
out =
|
510
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Unauthorized)
|
299
511
|
res.unauthorized = out
|
300
512
|
end
|
301
513
|
elsif r.status == 403
|
302
514
|
if Utils.match_content_type(content_type, 'application/json')
|
303
|
-
out =
|
515
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Forbidden)
|
304
516
|
res.forbidden = out
|
305
517
|
end
|
306
518
|
elsif r.status == 404
|
307
519
|
if Utils.match_content_type(content_type, 'application/json')
|
308
|
-
out =
|
520
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::NotFound)
|
309
521
|
res.not_found = out
|
310
522
|
end
|
311
523
|
elsif r.status == 409
|
312
524
|
if Utils.match_content_type(content_type, 'application/json')
|
313
|
-
out =
|
525
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Conflict)
|
314
526
|
res.conflict = out
|
315
527
|
end
|
316
528
|
elsif r.status == 410
|
317
529
|
if Utils.match_content_type(content_type, 'application/json')
|
318
|
-
out =
|
530
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InviteExpired)
|
319
531
|
res.invite_expired = out
|
320
532
|
end
|
321
533
|
elsif r.status == 422
|
322
534
|
if Utils.match_content_type(content_type, 'application/json')
|
323
|
-
out =
|
535
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::UnprocessableEntity)
|
324
536
|
res.unprocessable_entity = out
|
325
537
|
end
|
326
538
|
elsif r.status == 429
|
327
539
|
if Utils.match_content_type(content_type, 'application/json')
|
328
|
-
out =
|
540
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::RateLimitExceeded)
|
329
541
|
res.rate_limit_exceeded = out
|
330
542
|
end
|
331
543
|
elsif r.status == 500
|
332
544
|
if Utils.match_content_type(content_type, 'application/json')
|
333
|
-
out =
|
545
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InternalServerError)
|
334
546
|
res.internal_server_error = out
|
335
547
|
end
|
336
548
|
end
|
549
|
+
|
337
550
|
res
|
338
551
|
end
|
339
552
|
|
340
553
|
|
341
|
-
sig { params(request: T.nilable(::OpenApiSDK::Operations::
|
342
|
-
def
|
343
|
-
#
|
344
|
-
#
|
554
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::UpdateLinkRequest), timeout_ms: T.nilable(Integer)).returns(::OpenApiSDK::Operations::UpdateLinkResponse) }
|
555
|
+
def update(request, timeout_ms = nil)
|
556
|
+
# update - Update a link
|
557
|
+
# Update a link for the authenticated workspace. If there's no change, returns it as it is.
|
345
558
|
url, params = @sdk_configuration.get_server_details
|
346
559
|
base_url = Utils.template_url(url, params)
|
347
560
|
url = Utils.generate_url(
|
348
|
-
::OpenApiSDK::Operations::
|
561
|
+
::OpenApiSDK::Operations::UpdateLinkRequest,
|
349
562
|
base_url,
|
350
563
|
'/links/{linkId}',
|
351
564
|
request
|
352
565
|
)
|
353
566
|
headers = {}
|
567
|
+
req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :json)
|
568
|
+
headers['content-type'] = req_content_type
|
569
|
+
|
570
|
+
if form
|
571
|
+
body = Utils.encode_form(form)
|
572
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
573
|
+
body = URI.encode_www_form(data)
|
574
|
+
else
|
575
|
+
body = data
|
576
|
+
end
|
354
577
|
headers['Accept'] = 'application/json'
|
355
578
|
headers['user-agent'] = @sdk_configuration.user_agent
|
356
579
|
|
357
|
-
|
358
|
-
|
359
|
-
|
580
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
581
|
+
|
582
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
583
|
+
timeout ||= @sdk_configuration.timeout
|
584
|
+
|
585
|
+
connection = @sdk_configuration.client
|
586
|
+
|
587
|
+
hook_ctx = SDKHooks::HookContext.new(
|
588
|
+
base_url: base_url,
|
589
|
+
oauth2_scopes: nil,
|
590
|
+
operation_id: 'updateLink',
|
591
|
+
security_source: @sdk_configuration.security_source
|
592
|
+
)
|
593
|
+
|
594
|
+
error = T.let(nil, T.nilable(StandardError))
|
595
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
596
|
+
|
597
|
+
begin
|
598
|
+
r = connection.patch(url) do |req|
|
599
|
+
req.body = body
|
600
|
+
req.headers.merge!(headers)
|
601
|
+
req.options.timeout = timeout unless timeout.nil?
|
602
|
+
Utils.configure_request_security(req, security)
|
603
|
+
|
604
|
+
@sdk_configuration.hooks.before_request(
|
605
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
606
|
+
hook_ctx: hook_ctx
|
607
|
+
),
|
608
|
+
request: req
|
609
|
+
)
|
610
|
+
end
|
611
|
+
rescue StandardError => e
|
612
|
+
error = e
|
613
|
+
ensure
|
614
|
+
if r.nil? || Utils.error_status?(r.status)
|
615
|
+
r = @sdk_configuration.hooks.after_error(
|
616
|
+
error: error,
|
617
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
618
|
+
hook_ctx: hook_ctx
|
619
|
+
),
|
620
|
+
response: r
|
621
|
+
)
|
622
|
+
else
|
623
|
+
r = @sdk_configuration.hooks.after_success(
|
624
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
625
|
+
hook_ctx: hook_ctx
|
626
|
+
),
|
627
|
+
response: r
|
628
|
+
)
|
629
|
+
end
|
630
|
+
|
631
|
+
if r.nil?
|
632
|
+
raise error if !error.nil?
|
633
|
+
raise 'no response'
|
634
|
+
end
|
360
635
|
end
|
361
636
|
|
362
637
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
363
638
|
|
364
|
-
res = ::OpenApiSDK::Operations::
|
639
|
+
res = ::OpenApiSDK::Operations::UpdateLinkResponse.new(
|
365
640
|
status_code: r.status, content_type: content_type, raw_response: r
|
366
641
|
)
|
367
642
|
if r.status == 200
|
368
643
|
if Utils.match_content_type(content_type, 'application/json')
|
369
|
-
out =
|
370
|
-
res.
|
644
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::LinkSchema)
|
645
|
+
res.link_schema = out
|
371
646
|
end
|
372
647
|
elsif r.status == 400
|
373
648
|
if Utils.match_content_type(content_type, 'application/json')
|
374
|
-
out =
|
649
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::BadRequest)
|
375
650
|
res.bad_request = out
|
376
651
|
end
|
377
652
|
elsif r.status == 401
|
378
653
|
if Utils.match_content_type(content_type, 'application/json')
|
379
|
-
out =
|
654
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Unauthorized)
|
380
655
|
res.unauthorized = out
|
381
656
|
end
|
382
657
|
elsif r.status == 403
|
383
658
|
if Utils.match_content_type(content_type, 'application/json')
|
384
|
-
out =
|
659
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Forbidden)
|
385
660
|
res.forbidden = out
|
386
661
|
end
|
387
662
|
elsif r.status == 404
|
388
663
|
if Utils.match_content_type(content_type, 'application/json')
|
389
|
-
out =
|
664
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::NotFound)
|
390
665
|
res.not_found = out
|
391
666
|
end
|
392
667
|
elsif r.status == 409
|
393
668
|
if Utils.match_content_type(content_type, 'application/json')
|
394
|
-
out =
|
669
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Conflict)
|
395
670
|
res.conflict = out
|
396
671
|
end
|
397
672
|
elsif r.status == 410
|
398
673
|
if Utils.match_content_type(content_type, 'application/json')
|
399
|
-
out =
|
674
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InviteExpired)
|
400
675
|
res.invite_expired = out
|
401
676
|
end
|
402
677
|
elsif r.status == 422
|
403
678
|
if Utils.match_content_type(content_type, 'application/json')
|
404
|
-
out =
|
679
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::UnprocessableEntity)
|
405
680
|
res.unprocessable_entity = out
|
406
681
|
end
|
407
682
|
elsif r.status == 429
|
408
683
|
if Utils.match_content_type(content_type, 'application/json')
|
409
|
-
out =
|
684
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::RateLimitExceeded)
|
410
685
|
res.rate_limit_exceeded = out
|
411
686
|
end
|
412
687
|
elsif r.status == 500
|
413
688
|
if Utils.match_content_type(content_type, 'application/json')
|
414
|
-
out =
|
689
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InternalServerError)
|
415
690
|
res.internal_server_error = out
|
416
691
|
end
|
417
692
|
end
|
693
|
+
|
418
694
|
res
|
419
695
|
end
|
420
696
|
|
421
697
|
|
422
|
-
sig { params(request: T.nilable(::OpenApiSDK::Operations::
|
423
|
-
def
|
424
|
-
#
|
425
|
-
#
|
698
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::DeleteLinkRequest), timeout_ms: T.nilable(Integer)).returns(::OpenApiSDK::Operations::DeleteLinkResponse) }
|
699
|
+
def delete(request, timeout_ms = nil)
|
700
|
+
# delete - Delete a link
|
701
|
+
# Delete a link for the authenticated workspace.
|
426
702
|
url, params = @sdk_configuration.get_server_details
|
427
703
|
base_url = Utils.template_url(url, params)
|
428
704
|
url = Utils.generate_url(
|
429
|
-
::OpenApiSDK::Operations::
|
705
|
+
::OpenApiSDK::Operations::DeleteLinkRequest,
|
430
706
|
base_url,
|
431
707
|
'/links/{linkId}',
|
432
708
|
request
|
433
709
|
)
|
434
710
|
headers = {}
|
435
|
-
req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :json)
|
436
|
-
headers['content-type'] = req_content_type
|
437
711
|
headers['Accept'] = 'application/json'
|
438
712
|
headers['user-agent'] = @sdk_configuration.user_agent
|
439
713
|
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
714
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
715
|
+
|
716
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
717
|
+
timeout ||= @sdk_configuration.timeout
|
718
|
+
|
719
|
+
connection = @sdk_configuration.client
|
720
|
+
|
721
|
+
hook_ctx = SDKHooks::HookContext.new(
|
722
|
+
base_url: base_url,
|
723
|
+
oauth2_scopes: nil,
|
724
|
+
operation_id: 'deleteLink',
|
725
|
+
security_source: @sdk_configuration.security_source
|
726
|
+
)
|
727
|
+
|
728
|
+
error = T.let(nil, T.nilable(StandardError))
|
729
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
730
|
+
|
731
|
+
begin
|
732
|
+
r = connection.delete(url) do |req|
|
733
|
+
req.headers.merge!(headers)
|
734
|
+
req.options.timeout = timeout unless timeout.nil?
|
735
|
+
Utils.configure_request_security(req, security)
|
736
|
+
|
737
|
+
@sdk_configuration.hooks.before_request(
|
738
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
739
|
+
hook_ctx: hook_ctx
|
740
|
+
),
|
741
|
+
request: req
|
742
|
+
)
|
743
|
+
end
|
744
|
+
rescue StandardError => e
|
745
|
+
error = e
|
746
|
+
ensure
|
747
|
+
if r.nil? || Utils.error_status?(r.status)
|
748
|
+
r = @sdk_configuration.hooks.after_error(
|
749
|
+
error: error,
|
750
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
751
|
+
hook_ctx: hook_ctx
|
752
|
+
),
|
753
|
+
response: r
|
754
|
+
)
|
447
755
|
else
|
448
|
-
|
756
|
+
r = @sdk_configuration.hooks.after_success(
|
757
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
758
|
+
hook_ctx: hook_ctx
|
759
|
+
),
|
760
|
+
response: r
|
761
|
+
)
|
762
|
+
end
|
763
|
+
|
764
|
+
if r.nil?
|
765
|
+
raise error if !error.nil?
|
766
|
+
raise 'no response'
|
449
767
|
end
|
450
768
|
end
|
451
769
|
|
452
770
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
453
771
|
|
454
|
-
res = ::OpenApiSDK::Operations::
|
772
|
+
res = ::OpenApiSDK::Operations::DeleteLinkResponse.new(
|
455
773
|
status_code: r.status, content_type: content_type, raw_response: r
|
456
774
|
)
|
457
775
|
if r.status == 200
|
458
776
|
if Utils.match_content_type(content_type, 'application/json')
|
459
|
-
out =
|
460
|
-
res.
|
777
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Operations::DeleteLinkResponseBody)
|
778
|
+
res.object = out
|
461
779
|
end
|
462
780
|
elsif r.status == 400
|
463
781
|
if Utils.match_content_type(content_type, 'application/json')
|
464
|
-
out =
|
782
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::BadRequest)
|
465
783
|
res.bad_request = out
|
466
784
|
end
|
467
785
|
elsif r.status == 401
|
468
786
|
if Utils.match_content_type(content_type, 'application/json')
|
469
|
-
out =
|
787
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Unauthorized)
|
470
788
|
res.unauthorized = out
|
471
789
|
end
|
472
790
|
elsif r.status == 403
|
473
791
|
if Utils.match_content_type(content_type, 'application/json')
|
474
|
-
out =
|
792
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Forbidden)
|
475
793
|
res.forbidden = out
|
476
794
|
end
|
477
795
|
elsif r.status == 404
|
478
796
|
if Utils.match_content_type(content_type, 'application/json')
|
479
|
-
out =
|
797
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::NotFound)
|
480
798
|
res.not_found = out
|
481
799
|
end
|
482
800
|
elsif r.status == 409
|
483
801
|
if Utils.match_content_type(content_type, 'application/json')
|
484
|
-
out =
|
802
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Conflict)
|
485
803
|
res.conflict = out
|
486
804
|
end
|
487
805
|
elsif r.status == 410
|
488
806
|
if Utils.match_content_type(content_type, 'application/json')
|
489
|
-
out =
|
807
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InviteExpired)
|
490
808
|
res.invite_expired = out
|
491
809
|
end
|
492
810
|
elsif r.status == 422
|
493
811
|
if Utils.match_content_type(content_type, 'application/json')
|
494
|
-
out =
|
812
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::UnprocessableEntity)
|
495
813
|
res.unprocessable_entity = out
|
496
814
|
end
|
497
815
|
elsif r.status == 429
|
498
816
|
if Utils.match_content_type(content_type, 'application/json')
|
499
|
-
out =
|
817
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::RateLimitExceeded)
|
500
818
|
res.rate_limit_exceeded = out
|
501
819
|
end
|
502
820
|
elsif r.status == 500
|
503
821
|
if Utils.match_content_type(content_type, 'application/json')
|
504
|
-
out =
|
822
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InternalServerError)
|
505
823
|
res.internal_server_error = out
|
506
824
|
end
|
507
825
|
end
|
826
|
+
|
508
827
|
res
|
509
828
|
end
|
510
829
|
|
511
830
|
|
512
|
-
sig { params(request: T.nilable(T::Array[::OpenApiSDK::Operations::RequestBody])).returns(::OpenApiSDK::Operations::BulkCreateLinksResponse) }
|
513
|
-
def create_many(request)
|
831
|
+
sig { params(request: T.nilable(T::Array[::OpenApiSDK::Operations::RequestBody]), timeout_ms: T.nilable(Integer)).returns(::OpenApiSDK::Operations::BulkCreateLinksResponse) }
|
832
|
+
def create_many(request, timeout_ms = nil)
|
514
833
|
# create_many - Bulk create links
|
515
834
|
# Bulk create up to 100 links for the authenticated workspace.
|
516
835
|
url, params = @sdk_configuration.get_server_details
|
@@ -519,18 +838,71 @@ module OpenApiSDK
|
|
519
838
|
headers = {}
|
520
839
|
req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
|
521
840
|
headers['content-type'] = req_content_type
|
841
|
+
|
842
|
+
if form
|
843
|
+
body = Utils.encode_form(form)
|
844
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
845
|
+
body = URI.encode_www_form(data)
|
846
|
+
else
|
847
|
+
body = data
|
848
|
+
end
|
522
849
|
headers['Accept'] = 'application/json'
|
523
850
|
headers['user-agent'] = @sdk_configuration.user_agent
|
524
851
|
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
852
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
853
|
+
|
854
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
855
|
+
timeout ||= @sdk_configuration.timeout
|
856
|
+
|
857
|
+
connection = @sdk_configuration.client
|
858
|
+
|
859
|
+
hook_ctx = SDKHooks::HookContext.new(
|
860
|
+
base_url: base_url,
|
861
|
+
oauth2_scopes: nil,
|
862
|
+
operation_id: 'bulkCreateLinks',
|
863
|
+
security_source: @sdk_configuration.security_source
|
864
|
+
)
|
865
|
+
|
866
|
+
error = T.let(nil, T.nilable(StandardError))
|
867
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
868
|
+
|
869
|
+
begin
|
870
|
+
r = connection.post(url) do |req|
|
871
|
+
req.body = body
|
872
|
+
req.headers.merge!(headers)
|
873
|
+
req.options.timeout = timeout unless timeout.nil?
|
874
|
+
Utils.configure_request_security(req, security)
|
875
|
+
|
876
|
+
@sdk_configuration.hooks.before_request(
|
877
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
878
|
+
hook_ctx: hook_ctx
|
879
|
+
),
|
880
|
+
request: req
|
881
|
+
)
|
882
|
+
end
|
883
|
+
rescue StandardError => e
|
884
|
+
error = e
|
885
|
+
ensure
|
886
|
+
if r.nil? || Utils.error_status?(r.status)
|
887
|
+
r = @sdk_configuration.hooks.after_error(
|
888
|
+
error: error,
|
889
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
890
|
+
hook_ctx: hook_ctx
|
891
|
+
),
|
892
|
+
response: r
|
893
|
+
)
|
532
894
|
else
|
533
|
-
|
895
|
+
r = @sdk_configuration.hooks.after_success(
|
896
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
897
|
+
hook_ctx: hook_ctx
|
898
|
+
),
|
899
|
+
response: r
|
900
|
+
)
|
901
|
+
end
|
902
|
+
|
903
|
+
if r.nil?
|
904
|
+
raise error if !error.nil?
|
905
|
+
raise 'no response'
|
534
906
|
end
|
535
907
|
end
|
536
908
|
|
@@ -541,61 +913,62 @@ module OpenApiSDK
|
|
541
913
|
)
|
542
914
|
if r.status == 200
|
543
915
|
if Utils.match_content_type(content_type, 'application/json')
|
544
|
-
out =
|
545
|
-
res.
|
916
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), T::Array[::Object])
|
917
|
+
res.anies = out
|
546
918
|
end
|
547
919
|
elsif r.status == 400
|
548
920
|
if Utils.match_content_type(content_type, 'application/json')
|
549
|
-
out =
|
921
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::BadRequest)
|
550
922
|
res.bad_request = out
|
551
923
|
end
|
552
924
|
elsif r.status == 401
|
553
925
|
if Utils.match_content_type(content_type, 'application/json')
|
554
|
-
out =
|
926
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Unauthorized)
|
555
927
|
res.unauthorized = out
|
556
928
|
end
|
557
929
|
elsif r.status == 403
|
558
930
|
if Utils.match_content_type(content_type, 'application/json')
|
559
|
-
out =
|
931
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Forbidden)
|
560
932
|
res.forbidden = out
|
561
933
|
end
|
562
934
|
elsif r.status == 404
|
563
935
|
if Utils.match_content_type(content_type, 'application/json')
|
564
|
-
out =
|
936
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::NotFound)
|
565
937
|
res.not_found = out
|
566
938
|
end
|
567
939
|
elsif r.status == 409
|
568
940
|
if Utils.match_content_type(content_type, 'application/json')
|
569
|
-
out =
|
941
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Conflict)
|
570
942
|
res.conflict = out
|
571
943
|
end
|
572
944
|
elsif r.status == 410
|
573
945
|
if Utils.match_content_type(content_type, 'application/json')
|
574
|
-
out =
|
946
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InviteExpired)
|
575
947
|
res.invite_expired = out
|
576
948
|
end
|
577
949
|
elsif r.status == 422
|
578
950
|
if Utils.match_content_type(content_type, 'application/json')
|
579
|
-
out =
|
951
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::UnprocessableEntity)
|
580
952
|
res.unprocessable_entity = out
|
581
953
|
end
|
582
954
|
elsif r.status == 429
|
583
955
|
if Utils.match_content_type(content_type, 'application/json')
|
584
|
-
out =
|
956
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::RateLimitExceeded)
|
585
957
|
res.rate_limit_exceeded = out
|
586
958
|
end
|
587
959
|
elsif r.status == 500
|
588
960
|
if Utils.match_content_type(content_type, 'application/json')
|
589
|
-
out =
|
961
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InternalServerError)
|
590
962
|
res.internal_server_error = out
|
591
963
|
end
|
592
964
|
end
|
965
|
+
|
593
966
|
res
|
594
967
|
end
|
595
968
|
|
596
969
|
|
597
|
-
sig { params(request: T.nilable(::OpenApiSDK::Operations::BulkUpdateLinksRequestBody)).returns(::OpenApiSDK::Operations::BulkUpdateLinksResponse) }
|
598
|
-
def update_many(request)
|
970
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::BulkUpdateLinksRequestBody), timeout_ms: T.nilable(Integer)).returns(::OpenApiSDK::Operations::BulkUpdateLinksResponse) }
|
971
|
+
def update_many(request, timeout_ms = nil)
|
599
972
|
# update_many - Bulk update links
|
600
973
|
# Bulk update up to 100 links with the same data for the authenticated workspace.
|
601
974
|
url, params = @sdk_configuration.get_server_details
|
@@ -604,18 +977,71 @@ module OpenApiSDK
|
|
604
977
|
headers = {}
|
605
978
|
req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
|
606
979
|
headers['content-type'] = req_content_type
|
980
|
+
|
981
|
+
if form
|
982
|
+
body = Utils.encode_form(form)
|
983
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
984
|
+
body = URI.encode_www_form(data)
|
985
|
+
else
|
986
|
+
body = data
|
987
|
+
end
|
607
988
|
headers['Accept'] = 'application/json'
|
608
989
|
headers['user-agent'] = @sdk_configuration.user_agent
|
609
990
|
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
991
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
992
|
+
|
993
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
994
|
+
timeout ||= @sdk_configuration.timeout
|
995
|
+
|
996
|
+
connection = @sdk_configuration.client
|
997
|
+
|
998
|
+
hook_ctx = SDKHooks::HookContext.new(
|
999
|
+
base_url: base_url,
|
1000
|
+
oauth2_scopes: nil,
|
1001
|
+
operation_id: 'bulkUpdateLinks',
|
1002
|
+
security_source: @sdk_configuration.security_source
|
1003
|
+
)
|
1004
|
+
|
1005
|
+
error = T.let(nil, T.nilable(StandardError))
|
1006
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
1007
|
+
|
1008
|
+
begin
|
1009
|
+
r = connection.patch(url) do |req|
|
1010
|
+
req.body = body
|
1011
|
+
req.headers.merge!(headers)
|
1012
|
+
req.options.timeout = timeout unless timeout.nil?
|
1013
|
+
Utils.configure_request_security(req, security)
|
1014
|
+
|
1015
|
+
@sdk_configuration.hooks.before_request(
|
1016
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
1017
|
+
hook_ctx: hook_ctx
|
1018
|
+
),
|
1019
|
+
request: req
|
1020
|
+
)
|
1021
|
+
end
|
1022
|
+
rescue StandardError => e
|
1023
|
+
error = e
|
1024
|
+
ensure
|
1025
|
+
if r.nil? || Utils.error_status?(r.status)
|
1026
|
+
r = @sdk_configuration.hooks.after_error(
|
1027
|
+
error: error,
|
1028
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
1029
|
+
hook_ctx: hook_ctx
|
1030
|
+
),
|
1031
|
+
response: r
|
1032
|
+
)
|
617
1033
|
else
|
618
|
-
|
1034
|
+
r = @sdk_configuration.hooks.after_success(
|
1035
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
1036
|
+
hook_ctx: hook_ctx
|
1037
|
+
),
|
1038
|
+
response: r
|
1039
|
+
)
|
1040
|
+
end
|
1041
|
+
|
1042
|
+
if r.nil?
|
1043
|
+
raise error if !error.nil?
|
1044
|
+
raise 'no response'
|
619
1045
|
end
|
620
1046
|
end
|
621
1047
|
|
@@ -626,61 +1052,192 @@ module OpenApiSDK
|
|
626
1052
|
)
|
627
1053
|
if r.status == 200
|
628
1054
|
if Utils.match_content_type(content_type, 'application/json')
|
629
|
-
out =
|
1055
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), T::Array[::OpenApiSDK::Shared::LinkSchema])
|
630
1056
|
res.link_schemas = out
|
631
1057
|
end
|
632
1058
|
elsif r.status == 400
|
633
1059
|
if Utils.match_content_type(content_type, 'application/json')
|
634
|
-
out =
|
1060
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::BadRequest)
|
635
1061
|
res.bad_request = out
|
636
1062
|
end
|
637
1063
|
elsif r.status == 401
|
638
1064
|
if Utils.match_content_type(content_type, 'application/json')
|
639
|
-
out =
|
1065
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Unauthorized)
|
640
1066
|
res.unauthorized = out
|
641
1067
|
end
|
642
1068
|
elsif r.status == 403
|
643
1069
|
if Utils.match_content_type(content_type, 'application/json')
|
644
|
-
out =
|
1070
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Forbidden)
|
645
1071
|
res.forbidden = out
|
646
1072
|
end
|
647
1073
|
elsif r.status == 404
|
648
1074
|
if Utils.match_content_type(content_type, 'application/json')
|
649
|
-
out =
|
1075
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::NotFound)
|
650
1076
|
res.not_found = out
|
651
1077
|
end
|
652
1078
|
elsif r.status == 409
|
653
1079
|
if Utils.match_content_type(content_type, 'application/json')
|
654
|
-
out =
|
1080
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Conflict)
|
655
1081
|
res.conflict = out
|
656
1082
|
end
|
657
1083
|
elsif r.status == 410
|
658
1084
|
if Utils.match_content_type(content_type, 'application/json')
|
659
|
-
out =
|
1085
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InviteExpired)
|
660
1086
|
res.invite_expired = out
|
661
1087
|
end
|
662
1088
|
elsif r.status == 422
|
663
1089
|
if Utils.match_content_type(content_type, 'application/json')
|
664
|
-
out =
|
1090
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::UnprocessableEntity)
|
665
1091
|
res.unprocessable_entity = out
|
666
1092
|
end
|
667
1093
|
elsif r.status == 429
|
668
1094
|
if Utils.match_content_type(content_type, 'application/json')
|
669
|
-
out =
|
1095
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::RateLimitExceeded)
|
670
1096
|
res.rate_limit_exceeded = out
|
671
1097
|
end
|
672
1098
|
elsif r.status == 500
|
673
1099
|
if Utils.match_content_type(content_type, 'application/json')
|
674
|
-
out =
|
1100
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InternalServerError)
|
675
1101
|
res.internal_server_error = out
|
676
1102
|
end
|
677
1103
|
end
|
1104
|
+
|
678
1105
|
res
|
679
1106
|
end
|
680
1107
|
|
681
1108
|
|
682
|
-
sig { params(request: T.nilable(::OpenApiSDK::Operations::
|
683
|
-
def
|
1109
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::BulkDeleteLinksRequest), timeout_ms: T.nilable(Integer)).returns(::OpenApiSDK::Operations::BulkDeleteLinksResponse) }
|
1110
|
+
def delete_many(request, timeout_ms = nil)
|
1111
|
+
# delete_many - Bulk delete links
|
1112
|
+
# Bulk delete up to 100 links for the authenticated workspace.
|
1113
|
+
url, params = @sdk_configuration.get_server_details
|
1114
|
+
base_url = Utils.template_url(url, params)
|
1115
|
+
url = "#{base_url}/links/bulk"
|
1116
|
+
headers = {}
|
1117
|
+
query_params = Utils.get_query_params(::OpenApiSDK::Operations::BulkDeleteLinksRequest, request)
|
1118
|
+
headers['Accept'] = 'application/json'
|
1119
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
1120
|
+
|
1121
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
1122
|
+
|
1123
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
1124
|
+
timeout ||= @sdk_configuration.timeout
|
1125
|
+
|
1126
|
+
connection = @sdk_configuration.client
|
1127
|
+
|
1128
|
+
hook_ctx = SDKHooks::HookContext.new(
|
1129
|
+
base_url: base_url,
|
1130
|
+
oauth2_scopes: nil,
|
1131
|
+
operation_id: 'bulkDeleteLinks',
|
1132
|
+
security_source: @sdk_configuration.security_source
|
1133
|
+
)
|
1134
|
+
|
1135
|
+
error = T.let(nil, T.nilable(StandardError))
|
1136
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
1137
|
+
|
1138
|
+
begin
|
1139
|
+
r = connection.delete(url) do |req|
|
1140
|
+
req.headers.merge!(headers)
|
1141
|
+
req.options.timeout = timeout unless timeout.nil?
|
1142
|
+
req.params = query_params
|
1143
|
+
Utils.configure_request_security(req, security)
|
1144
|
+
|
1145
|
+
@sdk_configuration.hooks.before_request(
|
1146
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
1147
|
+
hook_ctx: hook_ctx
|
1148
|
+
),
|
1149
|
+
request: req
|
1150
|
+
)
|
1151
|
+
end
|
1152
|
+
rescue StandardError => e
|
1153
|
+
error = e
|
1154
|
+
ensure
|
1155
|
+
if r.nil? || Utils.error_status?(r.status)
|
1156
|
+
r = @sdk_configuration.hooks.after_error(
|
1157
|
+
error: error,
|
1158
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
1159
|
+
hook_ctx: hook_ctx
|
1160
|
+
),
|
1161
|
+
response: r
|
1162
|
+
)
|
1163
|
+
else
|
1164
|
+
r = @sdk_configuration.hooks.after_success(
|
1165
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
1166
|
+
hook_ctx: hook_ctx
|
1167
|
+
),
|
1168
|
+
response: r
|
1169
|
+
)
|
1170
|
+
end
|
1171
|
+
|
1172
|
+
if r.nil?
|
1173
|
+
raise error if !error.nil?
|
1174
|
+
raise 'no response'
|
1175
|
+
end
|
1176
|
+
end
|
1177
|
+
|
1178
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
1179
|
+
|
1180
|
+
res = ::OpenApiSDK::Operations::BulkDeleteLinksResponse.new(
|
1181
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
1182
|
+
)
|
1183
|
+
if r.status == 200
|
1184
|
+
if Utils.match_content_type(content_type, 'application/json')
|
1185
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Operations::BulkDeleteLinksResponseBody)
|
1186
|
+
res.object = out
|
1187
|
+
end
|
1188
|
+
elsif r.status == 400
|
1189
|
+
if Utils.match_content_type(content_type, 'application/json')
|
1190
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::BadRequest)
|
1191
|
+
res.bad_request = out
|
1192
|
+
end
|
1193
|
+
elsif r.status == 401
|
1194
|
+
if Utils.match_content_type(content_type, 'application/json')
|
1195
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Unauthorized)
|
1196
|
+
res.unauthorized = out
|
1197
|
+
end
|
1198
|
+
elsif r.status == 403
|
1199
|
+
if Utils.match_content_type(content_type, 'application/json')
|
1200
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Forbidden)
|
1201
|
+
res.forbidden = out
|
1202
|
+
end
|
1203
|
+
elsif r.status == 404
|
1204
|
+
if Utils.match_content_type(content_type, 'application/json')
|
1205
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::NotFound)
|
1206
|
+
res.not_found = out
|
1207
|
+
end
|
1208
|
+
elsif r.status == 409
|
1209
|
+
if Utils.match_content_type(content_type, 'application/json')
|
1210
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Conflict)
|
1211
|
+
res.conflict = out
|
1212
|
+
end
|
1213
|
+
elsif r.status == 410
|
1214
|
+
if Utils.match_content_type(content_type, 'application/json')
|
1215
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InviteExpired)
|
1216
|
+
res.invite_expired = out
|
1217
|
+
end
|
1218
|
+
elsif r.status == 422
|
1219
|
+
if Utils.match_content_type(content_type, 'application/json')
|
1220
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::UnprocessableEntity)
|
1221
|
+
res.unprocessable_entity = out
|
1222
|
+
end
|
1223
|
+
elsif r.status == 429
|
1224
|
+
if Utils.match_content_type(content_type, 'application/json')
|
1225
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::RateLimitExceeded)
|
1226
|
+
res.rate_limit_exceeded = out
|
1227
|
+
end
|
1228
|
+
elsif r.status == 500
|
1229
|
+
if Utils.match_content_type(content_type, 'application/json')
|
1230
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InternalServerError)
|
1231
|
+
res.internal_server_error = out
|
1232
|
+
end
|
1233
|
+
end
|
1234
|
+
|
1235
|
+
res
|
1236
|
+
end
|
1237
|
+
|
1238
|
+
|
1239
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::UpsertLinkRequestBody), timeout_ms: T.nilable(Integer)).returns(::OpenApiSDK::Operations::UpsertLinkResponse) }
|
1240
|
+
def upsert(request, timeout_ms = nil)
|
684
1241
|
# upsert - Upsert a link
|
685
1242
|
# Upsert a link for the authenticated workspace by its URL. If a link with the same URL already exists, return it (or update it if there are any changes). Otherwise, a new link will be created.
|
686
1243
|
url, params = @sdk_configuration.get_server_details
|
@@ -689,18 +1246,71 @@ module OpenApiSDK
|
|
689
1246
|
headers = {}
|
690
1247
|
req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
|
691
1248
|
headers['content-type'] = req_content_type
|
1249
|
+
|
1250
|
+
if form
|
1251
|
+
body = Utils.encode_form(form)
|
1252
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
1253
|
+
body = URI.encode_www_form(data)
|
1254
|
+
else
|
1255
|
+
body = data
|
1256
|
+
end
|
692
1257
|
headers['Accept'] = 'application/json'
|
693
1258
|
headers['user-agent'] = @sdk_configuration.user_agent
|
694
1259
|
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
1260
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
1261
|
+
|
1262
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
1263
|
+
timeout ||= @sdk_configuration.timeout
|
1264
|
+
|
1265
|
+
connection = @sdk_configuration.client
|
1266
|
+
|
1267
|
+
hook_ctx = SDKHooks::HookContext.new(
|
1268
|
+
base_url: base_url,
|
1269
|
+
oauth2_scopes: nil,
|
1270
|
+
operation_id: 'upsertLink',
|
1271
|
+
security_source: @sdk_configuration.security_source
|
1272
|
+
)
|
1273
|
+
|
1274
|
+
error = T.let(nil, T.nilable(StandardError))
|
1275
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
1276
|
+
|
1277
|
+
begin
|
1278
|
+
r = connection.put(url) do |req|
|
1279
|
+
req.body = body
|
1280
|
+
req.headers.merge!(headers)
|
1281
|
+
req.options.timeout = timeout unless timeout.nil?
|
1282
|
+
Utils.configure_request_security(req, security)
|
1283
|
+
|
1284
|
+
@sdk_configuration.hooks.before_request(
|
1285
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
1286
|
+
hook_ctx: hook_ctx
|
1287
|
+
),
|
1288
|
+
request: req
|
1289
|
+
)
|
1290
|
+
end
|
1291
|
+
rescue StandardError => e
|
1292
|
+
error = e
|
1293
|
+
ensure
|
1294
|
+
if r.nil? || Utils.error_status?(r.status)
|
1295
|
+
r = @sdk_configuration.hooks.after_error(
|
1296
|
+
error: error,
|
1297
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
1298
|
+
hook_ctx: hook_ctx
|
1299
|
+
),
|
1300
|
+
response: r
|
1301
|
+
)
|
702
1302
|
else
|
703
|
-
|
1303
|
+
r = @sdk_configuration.hooks.after_success(
|
1304
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
1305
|
+
hook_ctx: hook_ctx
|
1306
|
+
),
|
1307
|
+
response: r
|
1308
|
+
)
|
1309
|
+
end
|
1310
|
+
|
1311
|
+
if r.nil?
|
1312
|
+
raise error if !error.nil?
|
1313
|
+
raise 'no response'
|
704
1314
|
end
|
705
1315
|
end
|
706
1316
|
|
@@ -711,55 +1321,56 @@ module OpenApiSDK
|
|
711
1321
|
)
|
712
1322
|
if r.status == 200
|
713
1323
|
if Utils.match_content_type(content_type, 'application/json')
|
714
|
-
out =
|
1324
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::LinkSchema)
|
715
1325
|
res.link_schema = out
|
716
1326
|
end
|
717
1327
|
elsif r.status == 400
|
718
1328
|
if Utils.match_content_type(content_type, 'application/json')
|
719
|
-
out =
|
1329
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::BadRequest)
|
720
1330
|
res.bad_request = out
|
721
1331
|
end
|
722
1332
|
elsif r.status == 401
|
723
1333
|
if Utils.match_content_type(content_type, 'application/json')
|
724
|
-
out =
|
1334
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Unauthorized)
|
725
1335
|
res.unauthorized = out
|
726
1336
|
end
|
727
1337
|
elsif r.status == 403
|
728
1338
|
if Utils.match_content_type(content_type, 'application/json')
|
729
|
-
out =
|
1339
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Forbidden)
|
730
1340
|
res.forbidden = out
|
731
1341
|
end
|
732
1342
|
elsif r.status == 404
|
733
1343
|
if Utils.match_content_type(content_type, 'application/json')
|
734
|
-
out =
|
1344
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::NotFound)
|
735
1345
|
res.not_found = out
|
736
1346
|
end
|
737
1347
|
elsif r.status == 409
|
738
1348
|
if Utils.match_content_type(content_type, 'application/json')
|
739
|
-
out =
|
1349
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Conflict)
|
740
1350
|
res.conflict = out
|
741
1351
|
end
|
742
1352
|
elsif r.status == 410
|
743
1353
|
if Utils.match_content_type(content_type, 'application/json')
|
744
|
-
out =
|
1354
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InviteExpired)
|
745
1355
|
res.invite_expired = out
|
746
1356
|
end
|
747
1357
|
elsif r.status == 422
|
748
1358
|
if Utils.match_content_type(content_type, 'application/json')
|
749
|
-
out =
|
1359
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::UnprocessableEntity)
|
750
1360
|
res.unprocessable_entity = out
|
751
1361
|
end
|
752
1362
|
elsif r.status == 429
|
753
1363
|
if Utils.match_content_type(content_type, 'application/json')
|
754
|
-
out =
|
1364
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::RateLimitExceeded)
|
755
1365
|
res.rate_limit_exceeded = out
|
756
1366
|
end
|
757
1367
|
elsif r.status == 500
|
758
1368
|
if Utils.match_content_type(content_type, 'application/json')
|
759
|
-
out =
|
1369
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InternalServerError)
|
760
1370
|
res.internal_server_error = out
|
761
1371
|
end
|
762
1372
|
end
|
1373
|
+
|
763
1374
|
res
|
764
1375
|
end
|
765
1376
|
end
|