dub 0.2.2.pre.alpha.82 → 0.2.2.pre.alpha.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dub.rb +0 -1
  3. data/lib/open_api_sdk/dub.rb +1 -2
  4. data/lib/open_api_sdk/models/operations/bulkcreatelinks_testvariants.rb +27 -0
  5. data/lib/open_api_sdk/models/operations/bulkupdatelinks_testvariants.rb +27 -0
  6. data/lib/open_api_sdk/models/operations/createcustomer_responsebody.rb +5 -2
  7. data/lib/open_api_sdk/models/operations/createlink_requestbody.rb +11 -2
  8. data/lib/open_api_sdk/models/operations/createpartner_testvariants.rb +27 -0
  9. data/lib/open_api_sdk/models/operations/createpartnerlink_linkprops.rb +11 -2
  10. data/lib/open_api_sdk/models/operations/createpartnerlink_testvariants.rb +27 -0
  11. data/lib/open_api_sdk/models/operations/createreferralsembedtoken_linkprops.rb +11 -2
  12. data/lib/open_api_sdk/models/operations/createreferralsembedtoken_testvariants.rb +27 -0
  13. data/lib/open_api_sdk/models/operations/data.rb +11 -2
  14. data/lib/open_api_sdk/models/operations/discount.rb +2 -2
  15. data/lib/open_api_sdk/models/operations/getcustomer_responsebody.rb +5 -2
  16. data/lib/open_api_sdk/models/operations/getcustomers_type.rb +18 -0
  17. data/lib/open_api_sdk/models/operations/linkprops.rb +11 -2
  18. data/lib/open_api_sdk/models/operations/listevents_request.rb +5 -2
  19. data/lib/open_api_sdk/models/operations/requestbody.rb +11 -2
  20. data/lib/open_api_sdk/models/operations/responsebody.rb +5 -2
  21. data/lib/open_api_sdk/models/operations/retrieveanalytics_request.rb +5 -2
  22. data/lib/open_api_sdk/models/operations/retrievelinks_request.rb +30 -0
  23. data/lib/open_api_sdk/models/operations/retrievelinks_response.rb +60 -0
  24. data/lib/open_api_sdk/models/operations/retrievelinks_responsebody.rb +48 -0
  25. data/lib/open_api_sdk/models/operations/testvariants.rb +27 -0
  26. data/lib/open_api_sdk/models/operations/tracklead_requestbody.rb +11 -16
  27. data/lib/open_api_sdk/models/operations/tracksale_requestbody.rb +8 -13
  28. data/lib/open_api_sdk/models/operations/type.rb +3 -2
  29. data/lib/open_api_sdk/models/operations/updatecustomer_responsebody.rb +5 -2
  30. data/lib/open_api_sdk/models/operations/updatelink_requestbody.rb +11 -2
  31. data/lib/open_api_sdk/models/operations/updatelink_testvariants.rb +27 -0
  32. data/lib/open_api_sdk/models/operations/updatepartnersale_responsebody.rb +5 -2
  33. data/lib/open_api_sdk/models/operations/upsertlink_requestbody.rb +11 -2
  34. data/lib/open_api_sdk/models/operations/upsertlink_testvariants.rb +27 -0
  35. data/lib/open_api_sdk/models/operations/upsertpartnerlink_linkprops.rb +11 -2
  36. data/lib/open_api_sdk/models/operations/upsertpartnerlink_testvariants.rb +27 -0
  37. data/lib/open_api_sdk/models/operations.rb +14 -4
  38. data/lib/open_api_sdk/models/shared/clickevent_testvariants.rb +27 -0
  39. data/lib/open_api_sdk/models/shared/link.rb +14 -5
  40. data/lib/open_api_sdk/models/shared/linkschema.rb +14 -5
  41. data/lib/open_api_sdk/models/shared/testvariants.rb +27 -0
  42. data/lib/open_api_sdk/models/shared.rb +2 -0
  43. data/lib/open_api_sdk/partners.rb +130 -0
  44. data/lib/open_api_sdk/sdkconfiguration.rb +2 -2
  45. metadata +18 -7
  46. data/lib/open_api_sdk/metatags.rb +0 -109
  47. data/lib/open_api_sdk/models/operations/getmetatags_request.rb +0 -24
  48. data/lib/open_api_sdk/models/operations/getmetatags_response.rb +0 -33
  49. data/lib/open_api_sdk/models/operations/getmetatags_responsebody.rb +0 -30
@@ -19,7 +19,7 @@ module OpenApiSDK
19
19
  field :comments, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('comments') } }
20
20
 
21
21
  field :created_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('createdAt') } }
22
- # The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
22
+ # The description of the short link. Will be used for Custom Social Media Cards if `proxy` is true.
23
23
  field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } }
24
24
  # 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).
25
25
  field :domain, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('domain') } }
@@ -35,7 +35,7 @@ module OpenApiSDK
35
35
  field :geo, ::OpenApiSDK::Shared::ClickEventGeo, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('geo') } }
36
36
  # The unique ID of the short link.
37
37
  field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } }
38
- # The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
38
+ # The image of the short link. Will be used for Custom Social Media Cards if `proxy` is true.
39
39
  field :image, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('image') } }
40
40
  # The iOS destination URL for the short link for iOS device targeting.
41
41
  field :ios, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ios') } }
@@ -71,7 +71,11 @@ module OpenApiSDK
71
71
  field :tags, T::Array[::OpenApiSDK::Shared::TagSchema], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tags') } }
72
72
  # The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.
73
73
  field :tenant_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tenantId') } }
74
- # The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
74
+
75
+ field :test_completed_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('testCompletedAt') } }
76
+
77
+ field :test_started_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('testStartedAt') } }
78
+ # The title of the short link. Will be used for Custom Social Media Cards if `proxy` is true.
75
79
  field :title, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('title') } }
76
80
 
77
81
  field :updated_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updatedAt') } }
@@ -105,12 +109,14 @@ module OpenApiSDK
105
109
  field :public_stats, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publicStats') } }
106
110
 
107
111
  field :rewrite, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('rewrite') } }
112
+ # An array of A/B test URLs and the percentage of traffic to send to each URL.
113
+ field :test_variants, T.nilable(T::Array[::OpenApiSDK::Shared::ClickEventTestVariants]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('testVariants') } }
108
114
 
109
115
  field :track_conversion, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('trackConversion') } }
110
116
 
111
117
 
112
- sig { params(android: ::String, clicks: ::Float, comments: ::String, created_at: ::String, description: ::String, domain: ::String, expired_url: ::String, expires_at: ::String, external_id: ::String, folder_id: ::String, geo: ::OpenApiSDK::Shared::ClickEventGeo, id: ::String, image: ::String, ios: ::String, key: ::String, last_clicked: ::String, leads: ::Float, partner_id: ::String, password: ::String, program_id: ::String, project_id: ::String, qr_code: ::String, sale_amount: ::Float, sales: ::Float, short_link: ::String, tag_id: ::String, tags: T::Array[::OpenApiSDK::Shared::TagSchema], tenant_id: ::String, title: ::String, updated_at: ::String, url: ::String, user_id: ::String, utm_campaign: ::String, utm_content: ::String, utm_medium: ::String, utm_source: ::String, utm_term: ::String, video: ::String, webhook_ids: T::Array[::String], workspace_id: ::String, archived: T.nilable(T::Boolean), do_index: T.nilable(T::Boolean), proxy: T.nilable(T::Boolean), public_stats: T.nilable(T::Boolean), rewrite: T.nilable(T::Boolean), track_conversion: T.nilable(T::Boolean)).void }
113
- def initialize(android: nil, clicks: nil, comments: nil, created_at: nil, description: nil, domain: nil, expired_url: nil, expires_at: nil, external_id: nil, folder_id: nil, geo: nil, id: nil, image: nil, ios: nil, key: nil, last_clicked: nil, leads: nil, partner_id: nil, password: nil, program_id: nil, project_id: nil, qr_code: nil, sale_amount: nil, sales: nil, short_link: nil, tag_id: nil, tags: nil, tenant_id: nil, title: nil, updated_at: nil, url: nil, user_id: nil, utm_campaign: nil, utm_content: nil, utm_medium: nil, utm_source: nil, utm_term: nil, video: nil, webhook_ids: nil, workspace_id: nil, archived: nil, do_index: nil, proxy: nil, public_stats: nil, rewrite: nil, track_conversion: nil)
118
+ sig { params(android: ::String, clicks: ::Float, comments: ::String, created_at: ::String, description: ::String, domain: ::String, expired_url: ::String, expires_at: ::String, external_id: ::String, folder_id: ::String, geo: ::OpenApiSDK::Shared::ClickEventGeo, id: ::String, image: ::String, ios: ::String, key: ::String, last_clicked: ::String, leads: ::Float, partner_id: ::String, password: ::String, program_id: ::String, project_id: ::String, qr_code: ::String, sale_amount: ::Float, sales: ::Float, short_link: ::String, tag_id: ::String, tags: T::Array[::OpenApiSDK::Shared::TagSchema], tenant_id: ::String, test_completed_at: ::String, test_started_at: ::String, title: ::String, updated_at: ::String, url: ::String, user_id: ::String, utm_campaign: ::String, utm_content: ::String, utm_medium: ::String, utm_source: ::String, utm_term: ::String, video: ::String, webhook_ids: T::Array[::String], workspace_id: ::String, archived: T.nilable(T::Boolean), do_index: T.nilable(T::Boolean), proxy: T.nilable(T::Boolean), public_stats: T.nilable(T::Boolean), rewrite: T.nilable(T::Boolean), test_variants: T.nilable(T::Array[::OpenApiSDK::Shared::ClickEventTestVariants]), track_conversion: T.nilable(T::Boolean)).void }
119
+ def initialize(android: nil, clicks: nil, comments: nil, created_at: nil, description: nil, domain: nil, expired_url: nil, expires_at: nil, external_id: nil, folder_id: nil, geo: nil, id: nil, image: nil, ios: nil, key: nil, last_clicked: nil, leads: nil, partner_id: nil, password: nil, program_id: nil, project_id: nil, qr_code: nil, sale_amount: nil, sales: nil, short_link: nil, tag_id: nil, tags: nil, tenant_id: nil, test_completed_at: nil, test_started_at: nil, title: nil, updated_at: nil, url: nil, user_id: nil, utm_campaign: nil, utm_content: nil, utm_medium: nil, utm_source: nil, utm_term: nil, video: nil, webhook_ids: nil, workspace_id: nil, archived: nil, do_index: nil, proxy: nil, public_stats: nil, rewrite: nil, test_variants: nil, track_conversion: nil)
114
120
  @android = android
115
121
  @clicks = clicks
116
122
  @comments = comments
@@ -139,6 +145,8 @@ module OpenApiSDK
139
145
  @tag_id = tag_id
140
146
  @tags = tags
141
147
  @tenant_id = tenant_id
148
+ @test_completed_at = test_completed_at
149
+ @test_started_at = test_started_at
142
150
  @title = title
143
151
  @updated_at = updated_at
144
152
  @url = url
@@ -156,6 +164,7 @@ module OpenApiSDK
156
164
  @proxy = proxy
157
165
  @public_stats = public_stats
158
166
  @rewrite = rewrite
167
+ @test_variants = test_variants
159
168
  @track_conversion = track_conversion
160
169
  end
161
170
  end
@@ -21,7 +21,7 @@ module OpenApiSDK
21
21
  field :comments, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('comments') } }
22
22
  # The date and time when the short link was created.
23
23
  field :created_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('createdAt') } }
24
- # The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
24
+ # The description of the short link. Will be used for Custom Social Media Cards if `proxy` is true.
25
25
  field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } }
26
26
  # Whether to allow search engines to index the short link.
27
27
  field :do_index, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('doIndex') } }
@@ -39,7 +39,7 @@ module OpenApiSDK
39
39
  field :geo, ::OpenApiSDK::Shared::Geo, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('geo') } }
40
40
  # The unique ID of the short link.
41
41
  field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } }
42
- # The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
42
+ # The image of the short link. Will be used for Custom Social Media Cards if `proxy` is true.
43
43
  field :image, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('image') } }
44
44
  # The iOS destination URL for the short link for iOS device targeting.
45
45
  field :ios, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ios') } }
@@ -81,7 +81,7 @@ module OpenApiSDK
81
81
  field :tags, T::Array[::OpenApiSDK::Shared::TagSchema], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tags') } }
82
82
  # The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.
83
83
  field :tenant_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tenantId') } }
84
- # The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
84
+ # The title of the short link. Will be used for Custom Social Media Cards if `proxy` is true.
85
85
  field :title, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('title') } }
86
86
  # Whether to track conversions for the short link.
87
87
  field :track_conversion, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('trackConversion') } }
@@ -107,10 +107,16 @@ module OpenApiSDK
107
107
  field :webhook_ids, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('webhookIds') } }
108
108
  # The workspace ID of the short link.
109
109
  field :workspace_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspaceId') } }
110
+ # The date and time when the tests were or will be completed.
111
+ field :test_completed_at, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('testCompletedAt') } }
112
+ # The date and time when the tests started.
113
+ field :test_started_at, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('testStartedAt') } }
114
+ # An array of A/B test URLs and the percentage of traffic to send to each URL.
115
+ field :test_variants, T.nilable(T::Array[::OpenApiSDK::Shared::TestVariants]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('testVariants') } }
110
116
 
111
117
 
112
- sig { params(android: ::String, archived: T::Boolean, clicks: ::Float, comments: ::String, created_at: ::String, description: ::String, do_index: T::Boolean, domain: ::String, expired_url: ::String, expires_at: ::String, external_id: ::String, folder_id: ::String, geo: ::OpenApiSDK::Shared::Geo, id: ::String, image: ::String, ios: ::String, key: ::String, last_clicked: ::String, leads: ::Float, partner_id: ::String, password: ::String, program_id: ::String, project_id: ::String, proxy: T::Boolean, public_stats: T::Boolean, qr_code: ::String, rewrite: T::Boolean, sale_amount: ::Float, sales: ::Float, short_link: ::String, tag_id: ::String, tags: T::Array[::OpenApiSDK::Shared::TagSchema], tenant_id: ::String, title: ::String, track_conversion: T::Boolean, updated_at: ::String, url: ::String, user_id: ::String, utm_campaign: ::String, utm_content: ::String, utm_medium: ::String, utm_source: ::String, utm_term: ::String, video: ::String, webhook_ids: T::Array[::String], workspace_id: ::String).void }
113
- def initialize(android: nil, archived: nil, clicks: nil, comments: nil, created_at: nil, description: nil, do_index: nil, domain: nil, expired_url: nil, expires_at: nil, external_id: nil, folder_id: nil, geo: nil, id: nil, image: nil, ios: nil, key: nil, last_clicked: nil, leads: nil, partner_id: nil, password: nil, program_id: nil, project_id: nil, proxy: nil, public_stats: nil, qr_code: nil, rewrite: nil, sale_amount: nil, sales: nil, short_link: nil, tag_id: nil, tags: nil, tenant_id: nil, title: nil, track_conversion: nil, updated_at: nil, url: nil, user_id: nil, utm_campaign: nil, utm_content: nil, utm_medium: nil, utm_source: nil, utm_term: nil, video: nil, webhook_ids: nil, workspace_id: nil)
118
+ sig { params(android: ::String, archived: T::Boolean, clicks: ::Float, comments: ::String, created_at: ::String, description: ::String, do_index: T::Boolean, domain: ::String, expired_url: ::String, expires_at: ::String, external_id: ::String, folder_id: ::String, geo: ::OpenApiSDK::Shared::Geo, id: ::String, image: ::String, ios: ::String, key: ::String, last_clicked: ::String, leads: ::Float, partner_id: ::String, password: ::String, program_id: ::String, project_id: ::String, proxy: T::Boolean, public_stats: T::Boolean, qr_code: ::String, rewrite: T::Boolean, sale_amount: ::Float, sales: ::Float, short_link: ::String, tag_id: ::String, tags: T::Array[::OpenApiSDK::Shared::TagSchema], tenant_id: ::String, title: ::String, track_conversion: T::Boolean, updated_at: ::String, url: ::String, user_id: ::String, utm_campaign: ::String, utm_content: ::String, utm_medium: ::String, utm_source: ::String, utm_term: ::String, video: ::String, webhook_ids: T::Array[::String], workspace_id: ::String, test_completed_at: T.nilable(::String), test_started_at: T.nilable(::String), test_variants: T.nilable(T::Array[::OpenApiSDK::Shared::TestVariants])).void }
119
+ def initialize(android: nil, archived: nil, clicks: nil, comments: nil, created_at: nil, description: nil, do_index: nil, domain: nil, expired_url: nil, expires_at: nil, external_id: nil, folder_id: nil, geo: nil, id: nil, image: nil, ios: nil, key: nil, last_clicked: nil, leads: nil, partner_id: nil, password: nil, program_id: nil, project_id: nil, proxy: nil, public_stats: nil, qr_code: nil, rewrite: nil, sale_amount: nil, sales: nil, short_link: nil, tag_id: nil, tags: nil, tenant_id: nil, title: nil, track_conversion: nil, updated_at: nil, url: nil, user_id: nil, utm_campaign: nil, utm_content: nil, utm_medium: nil, utm_source: nil, utm_term: nil, video: nil, webhook_ids: nil, workspace_id: nil, test_completed_at: nil, test_started_at: nil, test_variants: nil)
114
120
  @android = android
115
121
  @archived = archived
116
122
  @clicks = clicks
@@ -157,6 +163,9 @@ module OpenApiSDK
157
163
  @video = video
158
164
  @webhook_ids = webhook_ids
159
165
  @workspace_id = workspace_id
166
+ @test_completed_at = test_completed_at
167
+ @test_started_at = test_started_at
168
+ @test_variants = test_variants
160
169
  end
161
170
  end
162
171
  end
@@ -0,0 +1,27 @@
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 Shared
9
+
10
+
11
+ class TestVariants < ::Crystalline::FieldAugmented
12
+ extend T::Sig
13
+
14
+
15
+ field :percentage, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('percentage') } }
16
+
17
+ field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } }
18
+
19
+
20
+ sig { params(percentage: ::Float, url: ::String).void }
21
+ def initialize(percentage: nil, url: nil)
22
+ @percentage = percentage
23
+ @url = url
24
+ end
25
+ end
26
+ end
27
+ end
@@ -33,6 +33,7 @@ module OpenApiSDK
33
33
  autoload :Error, 'open_api_sdk/models/shared/error.rb'
34
34
  autoload :BadRequest, 'open_api_sdk/models/shared/badrequest.rb'
35
35
  autoload :Geo, 'open_api_sdk/models/shared/geo.rb'
36
+ autoload :TestVariants, 'open_api_sdk/models/shared/testvariants.rb'
36
37
  autoload :LinkSchema, 'open_api_sdk/models/shared/linkschema.rb'
37
38
  autoload :Color, 'open_api_sdk/models/shared/color.rb'
38
39
  autoload :TagSchema, 'open_api_sdk/models/shared/tagschema.rb'
@@ -42,6 +43,7 @@ module OpenApiSDK
42
43
  autoload :Event, 'open_api_sdk/models/shared/event.rb'
43
44
  autoload :Click, 'open_api_sdk/models/shared/click.rb'
44
45
  autoload :ClickEventGeo, 'open_api_sdk/models/shared/clickevent_geo.rb'
46
+ autoload :ClickEventTestVariants, 'open_api_sdk/models/shared/clickevent_testvariants.rb'
45
47
  autoload :Link, 'open_api_sdk/models/shared/link.rb'
46
48
  autoload :ClickEvent, 'open_api_sdk/models/shared/clickevent.rb'
47
49
  autoload :Type, 'open_api_sdk/models/shared/type.rb'
@@ -300,6 +300,136 @@ module OpenApiSDK
300
300
  end
301
301
 
302
302
 
303
+ sig { params(request: T.nilable(::OpenApiSDK::Operations::RetrieveLinksRequest), timeout_ms: T.nilable(Integer)).returns(::OpenApiSDK::Operations::RetrieveLinksResponse) }
304
+ def retrieve_links(request, timeout_ms = nil)
305
+ # retrieve_links - Retrieve a partner's links.
306
+ # Retrieve a partner's links by their partner ID or tenant ID.
307
+ url, params = @sdk_configuration.get_server_details
308
+ base_url = Utils.template_url(url, params)
309
+ url = "#{base_url}/partners/links"
310
+ headers = {}
311
+ query_params = Utils.get_query_params(::OpenApiSDK::Operations::RetrieveLinksRequest, request)
312
+ headers['Accept'] = 'application/json'
313
+ headers['user-agent'] = @sdk_configuration.user_agent
314
+
315
+ security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
316
+
317
+ timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
318
+ timeout ||= @sdk_configuration.timeout
319
+
320
+ connection = @sdk_configuration.client
321
+
322
+ hook_ctx = SDKHooks::HookContext.new(
323
+ base_url: base_url,
324
+ oauth2_scopes: nil,
325
+ operation_id: 'retrieveLinks',
326
+ security_source: @sdk_configuration.security_source
327
+ )
328
+
329
+ error = T.let(nil, T.nilable(StandardError))
330
+ r = T.let(nil, T.nilable(Faraday::Response))
331
+
332
+ begin
333
+ r = connection.get(url) do |req|
334
+ req.headers.merge!(headers)
335
+ req.options.timeout = timeout unless timeout.nil?
336
+ req.params = query_params
337
+ Utils.configure_request_security(req, security)
338
+
339
+ @sdk_configuration.hooks.before_request(
340
+ hook_ctx: SDKHooks::BeforeRequestHookContext.new(
341
+ hook_ctx: hook_ctx
342
+ ),
343
+ request: req
344
+ )
345
+ end
346
+ rescue StandardError => e
347
+ error = e
348
+ ensure
349
+ if r.nil? || Utils.error_status?(r.status)
350
+ r = @sdk_configuration.hooks.after_error(
351
+ error: error,
352
+ hook_ctx: SDKHooks::AfterErrorHookContext.new(
353
+ hook_ctx: hook_ctx
354
+ ),
355
+ response: r
356
+ )
357
+ else
358
+ r = @sdk_configuration.hooks.after_success(
359
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
360
+ hook_ctx: hook_ctx
361
+ ),
362
+ response: r
363
+ )
364
+ end
365
+
366
+ if r.nil?
367
+ raise error if !error.nil?
368
+ raise 'no response'
369
+ end
370
+ end
371
+
372
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
373
+
374
+ res = ::OpenApiSDK::Operations::RetrieveLinksResponse.new(
375
+ status_code: r.status, content_type: content_type, raw_response: r
376
+ )
377
+ if r.status == 200
378
+ if Utils.match_content_type(content_type, 'application/json')
379
+ out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), T::Array[::OpenApiSDK::Operations::RetrieveLinksResponseBody])
380
+ res.response_bodies = out
381
+ end
382
+ elsif r.status == 400
383
+ if Utils.match_content_type(content_type, 'application/json')
384
+ out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::BadRequest)
385
+ res.bad_request = out
386
+ end
387
+ elsif r.status == 401
388
+ if Utils.match_content_type(content_type, 'application/json')
389
+ out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Unauthorized)
390
+ res.unauthorized = out
391
+ end
392
+ elsif r.status == 403
393
+ if Utils.match_content_type(content_type, 'application/json')
394
+ out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Forbidden)
395
+ res.forbidden = out
396
+ end
397
+ elsif r.status == 404
398
+ if Utils.match_content_type(content_type, 'application/json')
399
+ out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::NotFound)
400
+ res.not_found = out
401
+ end
402
+ elsif r.status == 409
403
+ if Utils.match_content_type(content_type, 'application/json')
404
+ out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Conflict)
405
+ res.conflict = out
406
+ end
407
+ elsif r.status == 410
408
+ if Utils.match_content_type(content_type, 'application/json')
409
+ out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InviteExpired)
410
+ res.invite_expired = out
411
+ end
412
+ elsif r.status == 422
413
+ if Utils.match_content_type(content_type, 'application/json')
414
+ out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::UnprocessableEntity)
415
+ res.unprocessable_entity = out
416
+ end
417
+ elsif r.status == 429
418
+ if Utils.match_content_type(content_type, 'application/json')
419
+ out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::RateLimitExceeded)
420
+ res.rate_limit_exceeded = out
421
+ end
422
+ elsif r.status == 500
423
+ if Utils.match_content_type(content_type, 'application/json')
424
+ out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InternalServerError)
425
+ res.internal_server_error = out
426
+ end
427
+ end
428
+
429
+ res
430
+ end
431
+
432
+
303
433
  sig { params(request: T.nilable(::OpenApiSDK::Operations::UpsertPartnerLinkRequestBody), timeout_ms: T.nilable(Integer)).returns(::OpenApiSDK::Operations::UpsertPartnerLinkResponse) }
304
434
  def upsert_link(request, timeout_ms = nil)
305
435
  # upsert_link - Upsert a link for a partner
@@ -61,9 +61,9 @@ module OpenApiSDK
61
61
  end
62
62
  @language = 'ruby'
63
63
  @openapi_doc_version = '0.0.1'
64
- @sdk_version = '0.2.2-alpha.82'
64
+ @sdk_version = '0.2.2-alpha.85'
65
65
  @gen_version = '2.563.0'
66
- @user_agent = 'speakeasy-sdk/ruby 0.2.2-alpha.82 2.563.0 0.0.1 dub'
66
+ @user_agent = 'speakeasy-sdk/ruby 0.2.2-alpha.85 2.563.0 0.0.1 dub'
67
67
  end
68
68
 
69
69
  sig { returns([String, T::Hash[Symbol, String]]) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2.pre.alpha.82
4
+ version: 0.2.2.pre.alpha.85
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dub
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-29 00:00:00.000000000 Z
11
+ date: 2025-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -197,15 +197,16 @@ files:
197
197
  - lib/open_api_sdk/events.rb
198
198
  - lib/open_api_sdk/folders.rb
199
199
  - lib/open_api_sdk/links.rb
200
- - lib/open_api_sdk/metatags.rb
201
200
  - lib/open_api_sdk/models/operations.rb
202
201
  - lib/open_api_sdk/models/operations/accesslevel.rb
203
202
  - lib/open_api_sdk/models/operations/bulkcreatelinks_response.rb
203
+ - lib/open_api_sdk/models/operations/bulkcreatelinks_testvariants.rb
204
204
  - lib/open_api_sdk/models/operations/bulkdeletelinks_request.rb
205
205
  - lib/open_api_sdk/models/operations/bulkdeletelinks_response.rb
206
206
  - lib/open_api_sdk/models/operations/bulkdeletelinks_responsebody.rb
207
207
  - lib/open_api_sdk/models/operations/bulkupdatelinks_requestbody.rb
208
208
  - lib/open_api_sdk/models/operations/bulkupdatelinks_response.rb
209
+ - lib/open_api_sdk/models/operations/bulkupdatelinks_testvariants.rb
209
210
  - lib/open_api_sdk/models/operations/click.rb
210
211
  - lib/open_api_sdk/models/operations/color.rb
211
212
  - lib/open_api_sdk/models/operations/country.rb
@@ -225,14 +226,17 @@ files:
225
226
  - lib/open_api_sdk/models/operations/createpartner_requestbody.rb
226
227
  - lib/open_api_sdk/models/operations/createpartner_response.rb
227
228
  - lib/open_api_sdk/models/operations/createpartner_responsebody.rb
229
+ - lib/open_api_sdk/models/operations/createpartner_testvariants.rb
228
230
  - lib/open_api_sdk/models/operations/createpartnerlink_linkprops.rb
229
231
  - lib/open_api_sdk/models/operations/createpartnerlink_requestbody.rb
230
232
  - lib/open_api_sdk/models/operations/createpartnerlink_response.rb
233
+ - lib/open_api_sdk/models/operations/createpartnerlink_testvariants.rb
231
234
  - lib/open_api_sdk/models/operations/createreferralsembedtoken_country.rb
232
235
  - lib/open_api_sdk/models/operations/createreferralsembedtoken_linkprops.rb
233
236
  - lib/open_api_sdk/models/operations/createreferralsembedtoken_requestbody.rb
234
237
  - lib/open_api_sdk/models/operations/createreferralsembedtoken_response.rb
235
238
  - lib/open_api_sdk/models/operations/createreferralsembedtoken_responsebody.rb
239
+ - lib/open_api_sdk/models/operations/createreferralsembedtoken_testvariants.rb
236
240
  - lib/open_api_sdk/models/operations/createtag_requestbody.rb
237
241
  - lib/open_api_sdk/models/operations/createtag_response.rb
238
242
  - lib/open_api_sdk/models/operations/customer.rb
@@ -264,15 +268,13 @@ files:
264
268
  - lib/open_api_sdk/models/operations/getcustomers_partner.rb
265
269
  - lib/open_api_sdk/models/operations/getcustomers_request.rb
266
270
  - lib/open_api_sdk/models/operations/getcustomers_response.rb
271
+ - lib/open_api_sdk/models/operations/getcustomers_type.rb
267
272
  - lib/open_api_sdk/models/operations/getlinkinfo_request.rb
268
273
  - lib/open_api_sdk/models/operations/getlinkinfo_response.rb
269
274
  - lib/open_api_sdk/models/operations/getlinks_request.rb
270
275
  - lib/open_api_sdk/models/operations/getlinks_response.rb
271
276
  - lib/open_api_sdk/models/operations/getlinkscount_request.rb
272
277
  - lib/open_api_sdk/models/operations/getlinkscount_response.rb
273
- - lib/open_api_sdk/models/operations/getmetatags_request.rb
274
- - lib/open_api_sdk/models/operations/getmetatags_response.rb
275
- - lib/open_api_sdk/models/operations/getmetatags_responsebody.rb
276
278
  - lib/open_api_sdk/models/operations/getqrcode_request.rb
277
279
  - lib/open_api_sdk/models/operations/getqrcode_response.rb
278
280
  - lib/open_api_sdk/models/operations/gettags_queryparam_sortby.rb
@@ -307,6 +309,9 @@ files:
307
309
  - lib/open_api_sdk/models/operations/responsebody.rb
308
310
  - lib/open_api_sdk/models/operations/retrieveanalytics_request.rb
309
311
  - lib/open_api_sdk/models/operations/retrieveanalytics_response.rb
312
+ - lib/open_api_sdk/models/operations/retrievelinks_request.rb
313
+ - lib/open_api_sdk/models/operations/retrievelinks_response.rb
314
+ - lib/open_api_sdk/models/operations/retrievelinks_responsebody.rb
310
315
  - lib/open_api_sdk/models/operations/retrievepartneranalytics_queryparam_interval.rb
311
316
  - lib/open_api_sdk/models/operations/retrievepartneranalytics_request.rb
312
317
  - lib/open_api_sdk/models/operations/retrievepartneranalytics_response.rb
@@ -315,6 +320,7 @@ files:
315
320
  - lib/open_api_sdk/models/operations/sortby.rb
316
321
  - lib/open_api_sdk/models/operations/sortorder.rb
317
322
  - lib/open_api_sdk/models/operations/status.rb
323
+ - lib/open_api_sdk/models/operations/testvariants.rb
318
324
  - lib/open_api_sdk/models/operations/tracklead_requestbody.rb
319
325
  - lib/open_api_sdk/models/operations/tracklead_response.rb
320
326
  - lib/open_api_sdk/models/operations/tracklead_responsebody.rb
@@ -342,6 +348,7 @@ files:
342
348
  - lib/open_api_sdk/models/operations/updatelink_request.rb
343
349
  - lib/open_api_sdk/models/operations/updatelink_requestbody.rb
344
350
  - lib/open_api_sdk/models/operations/updatelink_response.rb
351
+ - lib/open_api_sdk/models/operations/updatelink_testvariants.rb
345
352
  - lib/open_api_sdk/models/operations/updatepartnersale_requestbody.rb
346
353
  - lib/open_api_sdk/models/operations/updatepartnersale_response.rb
347
354
  - lib/open_api_sdk/models/operations/updatepartnersale_responsebody.rb
@@ -355,15 +362,18 @@ files:
355
362
  - lib/open_api_sdk/models/operations/updateworkspace_response.rb
356
363
  - lib/open_api_sdk/models/operations/upsertlink_requestbody.rb
357
364
  - lib/open_api_sdk/models/operations/upsertlink_response.rb
365
+ - lib/open_api_sdk/models/operations/upsertlink_testvariants.rb
358
366
  - lib/open_api_sdk/models/operations/upsertpartnerlink_linkprops.rb
359
367
  - lib/open_api_sdk/models/operations/upsertpartnerlink_requestbody.rb
360
368
  - lib/open_api_sdk/models/operations/upsertpartnerlink_response.rb
369
+ - lib/open_api_sdk/models/operations/upsertpartnerlink_testvariants.rb
361
370
  - lib/open_api_sdk/models/shared.rb
362
371
  - lib/open_api_sdk/models/shared/accesslevel.rb
363
372
  - lib/open_api_sdk/models/shared/badrequest.rb
364
373
  - lib/open_api_sdk/models/shared/click.rb
365
374
  - lib/open_api_sdk/models/shared/clickevent.rb
366
375
  - lib/open_api_sdk/models/shared/clickevent_geo.rb
376
+ - lib/open_api_sdk/models/shared/clickevent_testvariants.rb
367
377
  - lib/open_api_sdk/models/shared/code.rb
368
378
  - lib/open_api_sdk/models/shared/color.rb
369
379
  - lib/open_api_sdk/models/shared/conflict.rb
@@ -400,6 +410,7 @@ files:
400
410
  - lib/open_api_sdk/models/shared/role.rb
401
411
  - lib/open_api_sdk/models/shared/security.rb
402
412
  - lib/open_api_sdk/models/shared/tagschema.rb
413
+ - lib/open_api_sdk/models/shared/testvariants.rb
403
414
  - lib/open_api_sdk/models/shared/type.rb
404
415
  - lib/open_api_sdk/models/shared/unauthorized.rb
405
416
  - lib/open_api_sdk/models/shared/unauthorized_code.rb
@@ -442,7 +453,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
442
453
  - !ruby/object:Gem::Version
443
454
  version: 1.3.1
444
455
  requirements: []
445
- rubygems_version: 3.3.26
456
+ rubygems_version: 3.4.19
446
457
  signing_key:
447
458
  specification_version: 4
448
459
  summary: ''
@@ -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