dub 0.2.2.pre.alpha.83 → 0.2.2.pre.alpha.87
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 +0 -1
- data/lib/open_api_sdk/dub.rb +1 -2
- data/lib/open_api_sdk/models/operations/bulkcreatelinks_testvariants.rb +27 -0
- data/lib/open_api_sdk/models/operations/bulkupdatelinks_testvariants.rb +27 -0
- data/lib/open_api_sdk/models/operations/createcustomer_responsebody.rb +5 -2
- data/lib/open_api_sdk/models/operations/createlink_requestbody.rb +11 -2
- data/lib/open_api_sdk/models/operations/{links.rb → createpartner_link.rb} +1 -1
- data/lib/open_api_sdk/models/operations/createpartner_responsebody.rb +2 -2
- data/lib/open_api_sdk/models/operations/createpartner_testvariants.rb +27 -0
- data/lib/open_api_sdk/models/operations/createpartnerlink_linkprops.rb +11 -2
- data/lib/open_api_sdk/models/operations/createpartnerlink_testvariants.rb +27 -0
- data/lib/open_api_sdk/models/operations/createreferralsembedtoken_linkprops.rb +11 -2
- data/lib/open_api_sdk/models/operations/createreferralsembedtoken_testvariants.rb +27 -0
- data/lib/open_api_sdk/models/operations/data.rb +11 -2
- data/lib/open_api_sdk/models/operations/discount.rb +2 -2
- data/lib/open_api_sdk/models/operations/getcustomer_responsebody.rb +5 -2
- data/lib/open_api_sdk/models/operations/getcustomers_link.rb +36 -0
- data/lib/open_api_sdk/models/operations/getcustomers_type.rb +18 -0
- data/lib/open_api_sdk/models/operations/getlinks_request.rb +1 -1
- data/lib/open_api_sdk/models/operations/getlinkscount_request.rb +1 -1
- data/lib/open_api_sdk/models/operations/link.rb +17 -5
- data/lib/open_api_sdk/models/operations/linkprops.rb +11 -2
- data/lib/open_api_sdk/models/operations/listevents_request.rb +5 -2
- data/lib/open_api_sdk/models/operations/requestbody.rb +11 -2
- data/lib/open_api_sdk/models/operations/responsebody.rb +6 -3
- data/lib/open_api_sdk/models/operations/retrieveanalytics_request.rb +5 -2
- data/lib/open_api_sdk/models/operations/retrievelinks_response.rb +5 -5
- data/lib/open_api_sdk/models/operations/testvariants.rb +27 -0
- data/lib/open_api_sdk/models/operations/tracklead_requestbody.rb +11 -16
- data/lib/open_api_sdk/models/operations/tracksale_requestbody.rb +8 -13
- data/lib/open_api_sdk/models/operations/type.rb +3 -2
- data/lib/open_api_sdk/models/operations/updatecustomer_responsebody.rb +5 -2
- data/lib/open_api_sdk/models/operations/updatelink_requestbody.rb +11 -2
- data/lib/open_api_sdk/models/operations/updatelink_testvariants.rb +27 -0
- data/lib/open_api_sdk/models/operations/updatepartnersale_responsebody.rb +5 -2
- data/lib/open_api_sdk/models/operations/upsertlink_requestbody.rb +11 -2
- data/lib/open_api_sdk/models/operations/upsertlink_testvariants.rb +27 -0
- data/lib/open_api_sdk/models/operations/upsertpartnerlink_linkprops.rb +11 -2
- data/lib/open_api_sdk/models/operations/upsertpartnerlink_testvariants.rb +27 -0
- data/lib/open_api_sdk/models/operations.rb +14 -7
- data/lib/open_api_sdk/models/shared/click.rb +5 -5
- data/lib/open_api_sdk/models/shared/clickevent.rb +5 -5
- data/lib/open_api_sdk/models/shared/clickevent_testvariants.rb +27 -0
- data/lib/open_api_sdk/models/shared/link.rb +32 -23
- data/lib/open_api_sdk/models/shared/linkschema.rb +14 -5
- data/lib/open_api_sdk/models/shared/testvariants.rb +27 -0
- data/lib/open_api_sdk/models/shared.rb +2 -0
- data/lib/open_api_sdk/partners.rb +2 -2
- data/lib/open_api_sdk/sdkconfiguration.rb +2 -2
- metadata +17 -9
- data/lib/open_api_sdk/metatags.rb +0 -109
- 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/retrievelinks_responsebody.rb +0 -48
@@ -1,109 +0,0 @@
|
|
1
|
-
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
-
|
3
|
-
# typed: true
|
4
|
-
# frozen_string_literal: true
|
5
|
-
|
6
|
-
require 'faraday'
|
7
|
-
require 'faraday/multipart'
|
8
|
-
require 'faraday/retry'
|
9
|
-
require 'sorbet-runtime'
|
10
|
-
require_relative 'sdk_hooks/hooks'
|
11
|
-
require_relative 'utils/retries'
|
12
|
-
|
13
|
-
module OpenApiSDK
|
14
|
-
extend T::Sig
|
15
|
-
class Metatags
|
16
|
-
extend T::Sig
|
17
|
-
|
18
|
-
|
19
|
-
sig { params(sdk_config: SDKConfiguration).void }
|
20
|
-
def initialize(sdk_config)
|
21
|
-
@sdk_configuration = sdk_config
|
22
|
-
end
|
23
|
-
|
24
|
-
|
25
|
-
sig { params(request: T.nilable(::OpenApiSDK::Operations::GetMetatagsRequest), timeout_ms: T.nilable(Integer)).returns(::OpenApiSDK::Operations::GetMetatagsResponse) }
|
26
|
-
def get(request, timeout_ms = nil)
|
27
|
-
# get - Retrieve the metatags for a URL
|
28
|
-
# Retrieve the metatags for a URL.
|
29
|
-
url, params = @sdk_configuration.get_server_details
|
30
|
-
base_url = Utils.template_url(url, params)
|
31
|
-
url = "#{base_url}/metatags"
|
32
|
-
headers = {}
|
33
|
-
query_params = Utils.get_query_params(::OpenApiSDK::Operations::GetMetatagsRequest, request)
|
34
|
-
headers['Accept'] = 'application/json'
|
35
|
-
headers['user-agent'] = @sdk_configuration.user_agent
|
36
|
-
|
37
|
-
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
38
|
-
|
39
|
-
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
40
|
-
timeout ||= @sdk_configuration.timeout
|
41
|
-
|
42
|
-
connection = @sdk_configuration.client
|
43
|
-
|
44
|
-
hook_ctx = SDKHooks::HookContext.new(
|
45
|
-
base_url: base_url,
|
46
|
-
oauth2_scopes: nil,
|
47
|
-
operation_id: 'getMetatags',
|
48
|
-
security_source: @sdk_configuration.security_source
|
49
|
-
)
|
50
|
-
|
51
|
-
error = T.let(nil, T.nilable(StandardError))
|
52
|
-
r = T.let(nil, T.nilable(Faraday::Response))
|
53
|
-
|
54
|
-
begin
|
55
|
-
r = connection.get(url) do |req|
|
56
|
-
req.headers.merge!(headers)
|
57
|
-
req.options.timeout = timeout unless timeout.nil?
|
58
|
-
req.params = query_params
|
59
|
-
Utils.configure_request_security(req, security)
|
60
|
-
|
61
|
-
@sdk_configuration.hooks.before_request(
|
62
|
-
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
63
|
-
hook_ctx: hook_ctx
|
64
|
-
),
|
65
|
-
request: req
|
66
|
-
)
|
67
|
-
end
|
68
|
-
rescue StandardError => e
|
69
|
-
error = e
|
70
|
-
ensure
|
71
|
-
if r.nil? || Utils.error_status?(r.status)
|
72
|
-
r = @sdk_configuration.hooks.after_error(
|
73
|
-
error: error,
|
74
|
-
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
75
|
-
hook_ctx: hook_ctx
|
76
|
-
),
|
77
|
-
response: r
|
78
|
-
)
|
79
|
-
else
|
80
|
-
r = @sdk_configuration.hooks.after_success(
|
81
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
82
|
-
hook_ctx: hook_ctx
|
83
|
-
),
|
84
|
-
response: r
|
85
|
-
)
|
86
|
-
end
|
87
|
-
|
88
|
-
if r.nil?
|
89
|
-
raise error if !error.nil?
|
90
|
-
raise 'no response'
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
95
|
-
|
96
|
-
res = ::OpenApiSDK::Operations::GetMetatagsResponse.new(
|
97
|
-
status_code: r.status, content_type: content_type, raw_response: r
|
98
|
-
)
|
99
|
-
if r.status == 200
|
100
|
-
if Utils.match_content_type(content_type, 'application/json')
|
101
|
-
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Operations::GetMetatagsResponseBody)
|
102
|
-
res.object = out
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
|
-
res
|
107
|
-
end
|
108
|
-
end
|
109
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
-
|
3
|
-
# typed: true
|
4
|
-
# frozen_string_literal: true
|
5
|
-
|
6
|
-
|
7
|
-
module OpenApiSDK
|
8
|
-
module Operations
|
9
|
-
|
10
|
-
|
11
|
-
class GetMetatagsRequest < ::Crystalline::FieldAugmented
|
12
|
-
extend T::Sig
|
13
|
-
|
14
|
-
# The URL to retrieve metatags for.
|
15
|
-
field :url, ::String, { 'query_param': { 'field_name': 'url', 'style': 'form', 'explode': true } }
|
16
|
-
|
17
|
-
|
18
|
-
sig { params(url: ::String).void }
|
19
|
-
def initialize(url: nil)
|
20
|
-
@url = url
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
-
|
3
|
-
# typed: true
|
4
|
-
# frozen_string_literal: true
|
5
|
-
|
6
|
-
|
7
|
-
module OpenApiSDK
|
8
|
-
module Operations
|
9
|
-
|
10
|
-
|
11
|
-
class GetMetatagsResponse < ::Crystalline::FieldAugmented
|
12
|
-
extend T::Sig
|
13
|
-
|
14
|
-
# HTTP response content type for this operation
|
15
|
-
field :content_type, ::String
|
16
|
-
# Raw HTTP response; suitable for custom response parsing
|
17
|
-
field :raw_response, ::Faraday::Response
|
18
|
-
# HTTP response status code for this operation
|
19
|
-
field :status_code, ::Integer
|
20
|
-
# The retrieved metatags
|
21
|
-
field :object, T.nilable(::OpenApiSDK::Operations::GetMetatagsResponseBody)
|
22
|
-
|
23
|
-
|
24
|
-
sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, object: T.nilable(::OpenApiSDK::Operations::GetMetatagsResponseBody)).void }
|
25
|
-
def initialize(content_type: nil, raw_response: nil, status_code: nil, object: nil)
|
26
|
-
@content_type = content_type
|
27
|
-
@raw_response = raw_response
|
28
|
-
@status_code = status_code
|
29
|
-
@object = object
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
-
|
3
|
-
# typed: true
|
4
|
-
# frozen_string_literal: true
|
5
|
-
|
6
|
-
|
7
|
-
module OpenApiSDK
|
8
|
-
module Operations
|
9
|
-
|
10
|
-
# The retrieved metatags
|
11
|
-
class GetMetatagsResponseBody < ::Crystalline::FieldAugmented
|
12
|
-
extend T::Sig
|
13
|
-
|
14
|
-
# The meta description tag for the URL.
|
15
|
-
field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } }
|
16
|
-
# The OpenGraph image for the URL.
|
17
|
-
field :image, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('image') } }
|
18
|
-
# The meta title tag for the URL.
|
19
|
-
field :title, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('title') } }
|
20
|
-
|
21
|
-
|
22
|
-
sig { params(description: ::String, image: ::String, title: ::String).void }
|
23
|
-
def initialize(description: nil, image: nil, title: nil)
|
24
|
-
@description = description
|
25
|
-
@image = image
|
26
|
-
@title = title
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,48 +0,0 @@
|
|
1
|
-
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
-
|
3
|
-
# typed: true
|
4
|
-
# frozen_string_literal: true
|
5
|
-
|
6
|
-
|
7
|
-
module OpenApiSDK
|
8
|
-
module Operations
|
9
|
-
|
10
|
-
|
11
|
-
class RetrieveLinksResponseBody < ::Crystalline::FieldAugmented
|
12
|
-
extend T::Sig
|
13
|
-
|
14
|
-
# The number of clicks on the short link.
|
15
|
-
field :clicks, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('clicks') } }
|
16
|
-
# The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).
|
17
|
-
field :domain, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('domain') } }
|
18
|
-
# The unique ID of the short link.
|
19
|
-
field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } }
|
20
|
-
# The short link slug. If not provided, a random 7-character slug will be generated.
|
21
|
-
field :key, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key') } }
|
22
|
-
# The number of leads the short links has generated.
|
23
|
-
field :leads, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('leads') } }
|
24
|
-
# The total dollar amount of sales the short links has generated (in cents).
|
25
|
-
field :sale_amount, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('saleAmount') } }
|
26
|
-
# The number of sales the short links has generated.
|
27
|
-
field :sales, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sales') } }
|
28
|
-
# The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).
|
29
|
-
field :short_link, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('shortLink') } }
|
30
|
-
# The destination URL of the short link.
|
31
|
-
field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } }
|
32
|
-
|
33
|
-
|
34
|
-
sig { params(clicks: ::Float, domain: ::String, id: ::String, key: ::String, leads: ::Float, sale_amount: ::Float, sales: ::Float, short_link: ::String, url: ::String).void }
|
35
|
-
def initialize(clicks: nil, domain: nil, id: nil, key: nil, leads: nil, sale_amount: nil, sales: nil, short_link: nil, url: nil)
|
36
|
-
@clicks = clicks
|
37
|
-
@domain = domain
|
38
|
-
@id = id
|
39
|
-
@key = key
|
40
|
-
@leads = leads
|
41
|
-
@sale_amount = sale_amount
|
42
|
-
@sales = sales
|
43
|
-
@short_link = short_link
|
44
|
-
@url = url
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|