dub 0.2.2.pre.alpha.46 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dub.rb +3 -6
  3. data/lib/open_api_sdk/analytics.rb +1 -2
  4. data/lib/open_api_sdk/domains.rb +55 -61
  5. data/lib/open_api_sdk/dub.rb +4 -7
  6. data/lib/open_api_sdk/links.rb +55 -143
  7. data/lib/open_api_sdk/metatags.rb +1 -2
  8. data/lib/open_api_sdk/models/operations/bulkcreatelinks_response.rb +1 -1
  9. data/lib/open_api_sdk/models/operations/bulkupdatelinks_requestbody.rb +5 -8
  10. data/lib/open_api_sdk/models/operations/bulkupdatelinks_response.rb +1 -1
  11. data/lib/open_api_sdk/models/operations/color.rb +2 -1
  12. data/lib/open_api_sdk/models/operations/createdomain_requestbody.rb +3 -9
  13. data/lib/open_api_sdk/models/operations/createdomain_response.rb +1 -1
  14. data/lib/open_api_sdk/models/operations/createlink_requestbody.rb +7 -36
  15. data/lib/open_api_sdk/models/operations/createlink_response.rb +1 -1
  16. data/lib/open_api_sdk/models/operations/createtag_requestbody.rb +1 -1
  17. data/lib/open_api_sdk/models/operations/createtag_response.rb +1 -1
  18. data/lib/open_api_sdk/models/operations/data.rb +7 -36
  19. data/lib/open_api_sdk/models/operations/deletedomain_request.rb +1 -1
  20. data/lib/open_api_sdk/models/operations/deletedomain_response.rb +1 -1
  21. data/lib/open_api_sdk/models/operations/deletedomain_responsebody.rb +1 -1
  22. data/lib/open_api_sdk/models/operations/deletelink_request.rb +1 -1
  23. data/lib/open_api_sdk/models/operations/deletelink_response.rb +2 -2
  24. data/lib/open_api_sdk/models/operations/deletelink_responsebody.rb +2 -2
  25. data/lib/open_api_sdk/models/operations/event.rb +3 -2
  26. data/lib/open_api_sdk/models/operations/getlinkinfo_request.rb +2 -2
  27. data/lib/open_api_sdk/models/operations/getlinkinfo_response.rb +1 -1
  28. data/lib/open_api_sdk/models/operations/getlinks_request.rb +7 -10
  29. data/lib/open_api_sdk/models/operations/getlinks_response.rb +1 -1
  30. data/lib/open_api_sdk/models/operations/getlinkscount_request.rb +3 -3
  31. data/lib/open_api_sdk/models/operations/getlinkscount_response.rb +1 -1
  32. data/lib/open_api_sdk/models/operations/getmetatags_request.rb +1 -1
  33. data/lib/open_api_sdk/models/operations/getmetatags_response.rb +1 -1
  34. data/lib/open_api_sdk/models/operations/getmetatags_responsebody.rb +1 -1
  35. data/lib/open_api_sdk/models/operations/getqrcode_request.rb +4 -13
  36. data/lib/open_api_sdk/models/operations/getqrcode_response.rb +1 -1
  37. data/lib/open_api_sdk/models/operations/gettags_response.rb +1 -1
  38. data/lib/open_api_sdk/models/operations/getworkspace_request.rb +1 -1
  39. data/lib/open_api_sdk/models/operations/getworkspace_response.rb +1 -1
  40. data/lib/open_api_sdk/models/operations/groupby.rb +4 -7
  41. data/lib/open_api_sdk/models/operations/interval.rb +3 -2
  42. data/lib/open_api_sdk/models/operations/level.rb +2 -1
  43. data/lib/open_api_sdk/models/operations/listdomains_response.rb +1 -1
  44. data/lib/open_api_sdk/models/operations/paymentprocessor.rb +2 -1
  45. data/lib/open_api_sdk/models/operations/requestbody.rb +7 -36
  46. data/lib/open_api_sdk/models/operations/retrieveanalytics_request.rb +10 -25
  47. data/lib/open_api_sdk/models/operations/retrieveanalytics_response.rb +1 -1
  48. data/lib/open_api_sdk/models/operations/sort.rb +2 -1
  49. data/lib/open_api_sdk/models/operations/trackcustomer_requestbody.rb +1 -1
  50. data/lib/open_api_sdk/models/operations/trackcustomer_response.rb +1 -1
  51. data/lib/open_api_sdk/models/operations/trackcustomer_responsebody.rb +1 -1
  52. data/lib/open_api_sdk/models/operations/tracklead_requestbody.rb +7 -12
  53. data/lib/open_api_sdk/models/operations/tracklead_response.rb +1 -1
  54. data/lib/open_api_sdk/models/operations/tracklead_responsebody.rb +22 -7
  55. data/lib/open_api_sdk/models/operations/tracksale_requestbody.rb +6 -11
  56. data/lib/open_api_sdk/models/operations/tracksale_response.rb +1 -1
  57. data/lib/open_api_sdk/models/operations/tracksale_responsebody.rb +19 -7
  58. data/lib/open_api_sdk/models/operations/updatedomain_request.rb +1 -1
  59. data/lib/open_api_sdk/models/operations/updatedomain_requestbody.rb +3 -9
  60. data/lib/open_api_sdk/models/operations/updatedomain_response.rb +1 -1
  61. data/lib/open_api_sdk/models/operations/updatelink_request.rb +1 -1
  62. data/lib/open_api_sdk/models/operations/updatelink_requestbody.rb +8 -37
  63. data/lib/open_api_sdk/models/operations/updatelink_response.rb +1 -1
  64. data/lib/open_api_sdk/models/operations/updatetag_color.rb +2 -1
  65. data/lib/open_api_sdk/models/operations/updatetag_request.rb +1 -1
  66. data/lib/open_api_sdk/models/operations/updatetag_requestbody.rb +1 -1
  67. data/lib/open_api_sdk/models/operations/updatetag_response.rb +1 -1
  68. data/lib/open_api_sdk/models/operations/updateworkspace_request.rb +1 -1
  69. data/lib/open_api_sdk/models/operations/updateworkspace_requestbody.rb +3 -6
  70. data/lib/open_api_sdk/models/operations/updateworkspace_response.rb +1 -1
  71. data/lib/open_api_sdk/models/operations/upsertlink_requestbody.rb +7 -36
  72. data/lib/open_api_sdk/models/operations/upsertlink_response.rb +1 -1
  73. data/lib/open_api_sdk/models/operations.rb +19 -56
  74. data/lib/open_api_sdk/models/shared/badrequest.rb +2 -2
  75. data/lib/open_api_sdk/models/shared/code.rb +2 -1
  76. data/lib/open_api_sdk/models/shared/color.rb +2 -1
  77. data/lib/open_api_sdk/models/shared/conflict.rb +2 -2
  78. data/lib/open_api_sdk/models/shared/conflict_code.rb +2 -1
  79. data/lib/open_api_sdk/models/shared/conflict_error.rb +1 -1
  80. data/lib/open_api_sdk/models/shared/countrycode.rb +2 -1
  81. data/lib/open_api_sdk/models/shared/domains.rb +3 -6
  82. data/lib/open_api_sdk/models/shared/domainschema.rb +3 -12
  83. data/lib/open_api_sdk/models/shared/error.rb +1 -1
  84. data/lib/open_api_sdk/models/shared/forbidden.rb +2 -2
  85. data/lib/open_api_sdk/models/shared/forbidden_code.rb +2 -1
  86. data/lib/open_api_sdk/models/shared/forbidden_error.rb +1 -1
  87. data/lib/open_api_sdk/models/shared/geo.rb +1 -1
  88. data/lib/open_api_sdk/models/shared/internalservererror.rb +2 -2
  89. data/lib/open_api_sdk/models/shared/internalservererror_code.rb +2 -1
  90. data/lib/open_api_sdk/models/shared/internalservererror_error.rb +1 -1
  91. data/lib/open_api_sdk/models/shared/inviteexpired.rb +2 -2
  92. data/lib/open_api_sdk/models/shared/inviteexpired_code.rb +2 -1
  93. data/lib/open_api_sdk/models/shared/inviteexpired_error.rb +1 -1
  94. data/lib/open_api_sdk/models/shared/linkgeotargeting.rb +1 -1
  95. data/lib/open_api_sdk/models/shared/linkschema.rb +4 -16
  96. data/lib/open_api_sdk/models/shared/notfound.rb +2 -2
  97. data/lib/open_api_sdk/models/shared/notfound_code.rb +2 -1
  98. data/lib/open_api_sdk/models/shared/notfound_error.rb +1 -1
  99. data/lib/open_api_sdk/models/shared/plan.rb +2 -1
  100. data/lib/open_api_sdk/models/shared/ratelimitexceeded.rb +2 -2
  101. data/lib/open_api_sdk/models/shared/ratelimitexceeded_code.rb +2 -1
  102. data/lib/open_api_sdk/models/shared/ratelimitexceeded_error.rb +1 -1
  103. data/lib/open_api_sdk/models/shared/role.rb +2 -1
  104. data/lib/open_api_sdk/models/shared/security.rb +3 -3
  105. data/lib/open_api_sdk/models/shared/tagschema.rb +1 -1
  106. data/lib/open_api_sdk/models/shared/unauthorized.rb +2 -2
  107. data/lib/open_api_sdk/models/shared/unauthorized_code.rb +2 -1
  108. data/lib/open_api_sdk/models/shared/unauthorized_error.rb +1 -1
  109. data/lib/open_api_sdk/models/shared/unprocessableentity.rb +2 -2
  110. data/lib/open_api_sdk/models/shared/unprocessableentity_code.rb +2 -1
  111. data/lib/open_api_sdk/models/shared/unprocessableentity_error.rb +1 -1
  112. data/lib/open_api_sdk/models/shared/users.rb +1 -1
  113. data/lib/open_api_sdk/models/shared/workspaceschema.rb +7 -31
  114. data/lib/open_api_sdk/models/shared.rb +2 -9
  115. data/lib/open_api_sdk/qr_codes.rb +2 -2
  116. data/lib/open_api_sdk/sdkconfiguration.rb +4 -4
  117. data/lib/open_api_sdk/tags.rb +28 -113
  118. data/lib/open_api_sdk/track.rb +1 -6
  119. data/lib/open_api_sdk/utils/metadata_fields.rb +1 -1
  120. data/lib/open_api_sdk/utils/t.rb +1 -1
  121. data/lib/open_api_sdk/utils/utils.rb +5 -4
  122. data/lib/open_api_sdk/workspaces.rb +1 -3
  123. metadata +10 -57
  124. data/lib/open_api_sdk/customers.rb +0 -439
  125. data/lib/open_api_sdk/embed_tokens.rb +0 -107
  126. data/lib/open_api_sdk/events.rb +0 -100
  127. data/lib/open_api_sdk/models/operations/bulkdeletelinks_request.rb +0 -24
  128. data/lib/open_api_sdk/models/operations/bulkdeletelinks_response.rb +0 -60
  129. data/lib/open_api_sdk/models/operations/bulkdeletelinks_responsebody.rb +0 -24
  130. data/lib/open_api_sdk/models/operations/click.rb +0 -24
  131. data/lib/open_api_sdk/models/operations/createcustomer_requestbody.rb +0 -33
  132. data/lib/open_api_sdk/models/operations/createcustomer_response.rb +0 -60
  133. data/lib/open_api_sdk/models/operations/createcustomer_responsebody.rb +0 -39
  134. data/lib/open_api_sdk/models/operations/createembedtoken_requestbody.rb +0 -24
  135. data/lib/open_api_sdk/models/operations/createembedtoken_response.rb +0 -60
  136. data/lib/open_api_sdk/models/operations/createembedtoken_responsebody.rb +0 -27
  137. data/lib/open_api_sdk/models/operations/customer.rb +0 -33
  138. data/lib/open_api_sdk/models/operations/deletecustomer_request.rb +0 -24
  139. data/lib/open_api_sdk/models/operations/deletecustomer_response.rb +0 -60
  140. data/lib/open_api_sdk/models/operations/deletecustomer_responsebody.rb +0 -24
  141. data/lib/open_api_sdk/models/operations/deletetag_request.rb +0 -24
  142. data/lib/open_api_sdk/models/operations/deletetag_response.rb +0 -60
  143. data/lib/open_api_sdk/models/operations/deletetag_responsebody.rb +0 -24
  144. data/lib/open_api_sdk/models/operations/getcustomer_request.rb +0 -24
  145. data/lib/open_api_sdk/models/operations/getcustomer_response.rb +0 -60
  146. data/lib/open_api_sdk/models/operations/getcustomer_responsebody.rb +0 -39
  147. data/lib/open_api_sdk/models/operations/getcustomers_response.rb +0 -60
  148. data/lib/open_api_sdk/models/operations/listdomains_request.rb +0 -33
  149. data/lib/open_api_sdk/models/operations/listevents_request.rb +0 -105
  150. data/lib/open_api_sdk/models/operations/listevents_response.rb +0 -60
  151. data/lib/open_api_sdk/models/operations/order.rb +0 -18
  152. data/lib/open_api_sdk/models/operations/queryparam_event.rb +0 -19
  153. data/lib/open_api_sdk/models/operations/queryparam_interval.rb +0 -23
  154. data/lib/open_api_sdk/models/operations/queryparam_trigger.rb +0 -18
  155. data/lib/open_api_sdk/models/operations/responsebody.rb +0 -39
  156. data/lib/open_api_sdk/models/operations/sale.rb +0 -36
  157. data/lib/open_api_sdk/models/operations/sortby.rb +0 -17
  158. data/lib/open_api_sdk/models/operations/tracksale_customer.rb +0 -36
  159. data/lib/open_api_sdk/models/operations/trigger.rb +0 -18
  160. data/lib/open_api_sdk/models/operations/updatecustomer_request.rb +0 -27
  161. data/lib/open_api_sdk/models/operations/updatecustomer_requestbody.rb +0 -33
  162. data/lib/open_api_sdk/models/operations/updatecustomer_response.rb +0 -60
  163. data/lib/open_api_sdk/models/operations/updatecustomer_responsebody.rb +0 -39
  164. data/lib/open_api_sdk/models/shared/click.rb +0 -60
  165. data/lib/open_api_sdk/models/shared/clickevent.rb +0 -98
  166. data/lib/open_api_sdk/models/shared/clickevent_geo.rb +0 -771
  167. data/lib/open_api_sdk/models/shared/continentcode.rb +0 -23
  168. data/lib/open_api_sdk/models/shared/event.rb +0 -17
  169. data/lib/open_api_sdk/models/shared/link.rb +0 -154
  170. data/lib/open_api_sdk/models/shared/registereddomain.rb +0 -30
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1cde24f7949ee723b59f8d7bf5e095cd4d43e2fe9847de1efb24537f39eb6723
4
- data.tar.gz: 3ac5d4f3728220cf09e4282d449c265f5c5a1af731c6d0fff2b2d9571eb6e90b
3
+ metadata.gz: 48b0ebc59e580c1bb1c8ee97532ee1f5f4af5ba787f2df57b5b70fac67b017ea
4
+ data.tar.gz: c02ce3ffdbe5c884232e523147d2947f43ce09c37ba17f6a482f921b8a4c4e3a
5
5
  SHA512:
6
- metadata.gz: 6c8209a9afdcc3e4de7aad3313cc0b37cc1150ef4a49e5c99d55ff56a89c386ecec06664341eba5ee4a4efb0064a840a407eaa28a7fd19e8f716513df77ec5ed
7
- data.tar.gz: 12e56a2229daea3a6c6886f1bf5e18f16df4ee255f38a7de3e543392cb59cd86ae4acb270a6bce70edef8206f1c5580cbd0d4da97752d56a8f334a54c5ff5bcd
6
+ metadata.gz: 6177c08e1ac5c970e9ea49d9b564d3b9025fd9b5506c5f1063acb558f4f4a9dcfd2c602751b2bdadb6ce2b3f805227f88c0ebd8e7028c756f4eed9cd746b2685
7
+ data.tar.gz: 664da895006e157ac145674b00a0db15ebdfb1eb05492b9c434ff114cdf2271ebd7090188eaaa0d3d56e10b020731b5d8d12cc759a3b1b038d30956bde91e137
data/lib/dub.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
1
+ # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
2
 
3
3
  # typed: true
4
4
  # frozen_string_literal: true
@@ -8,15 +8,12 @@ module OpenApiSDK
8
8
  autoload :Shared, 'open_api_sdk/models/shared'
9
9
  autoload :Operations, 'open_api_sdk/models/operations'
10
10
  autoload :Links, 'open_api_sdk/links'
11
+ autoload :QRCodes, 'open_api_sdk/qr_codes'
11
12
  autoload :Analytics, 'open_api_sdk/analytics'
12
- autoload :Events, 'open_api_sdk/events'
13
+ autoload :Workspaces, 'open_api_sdk/workspaces'
13
14
  autoload :Tags, 'open_api_sdk/tags'
14
15
  autoload :Domains, 'open_api_sdk/domains'
15
16
  autoload :Track, 'open_api_sdk/track'
16
- autoload :Customers, 'open_api_sdk/customers'
17
- autoload :Workspaces, 'open_api_sdk/workspaces'
18
- autoload :EmbedTokens, 'open_api_sdk/embed_tokens'
19
- autoload :QRCodes, 'open_api_sdk/qr_codes'
20
17
  autoload :Metatags, 'open_api_sdk/metatags'
21
18
  end
22
19
 
@@ -1,4 +1,4 @@
1
- # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
1
+ # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
2
 
3
3
  # typed: true
4
4
  # frozen_string_literal: true
@@ -93,7 +93,6 @@ module OpenApiSDK
93
93
  res.internal_server_error = out
94
94
  end
95
95
  end
96
-
97
96
  res
98
97
  end
99
98
  end
@@ -1,4 +1,4 @@
1
- # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
1
+ # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
2
 
3
3
  # typed: true
4
4
  # frozen_string_literal: true
@@ -19,40 +19,31 @@ module OpenApiSDK
19
19
  end
20
20
 
21
21
 
22
- sig { params(request: T.nilable(::OpenApiSDK::Operations::CreateDomainRequestBody)).returns(::OpenApiSDK::Operations::CreateDomainResponse) }
23
- def create(request)
24
- # create - Create a domain
25
- # Create a domain for the authenticated workspace.
22
+ sig { returns(::OpenApiSDK::Operations::ListDomainsResponse) }
23
+ def list
24
+ # list - Retrieve a list of domains
25
+ # Retrieve a list of domains associated with the authenticated workspace.
26
26
  url, params = @sdk_configuration.get_server_details
27
27
  base_url = Utils.template_url(url, params)
28
28
  url = "#{base_url}/domains"
29
29
  headers = {}
30
- req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
31
- headers['content-type'] = req_content_type
32
30
  headers['Accept'] = 'application/json'
33
31
  headers['user-agent'] = @sdk_configuration.user_agent
34
32
 
35
- r = @sdk_configuration.client.post(url) do |req|
33
+ r = @sdk_configuration.client.get(url) do |req|
36
34
  req.headers = headers
37
35
  Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
38
- if form
39
- req.body = Utils.encode_form(form)
40
- elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
41
- req.body = URI.encode_www_form(data)
42
- else
43
- req.body = data
44
- end
45
36
  end
46
37
 
47
38
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
48
39
 
49
- res = ::OpenApiSDK::Operations::CreateDomainResponse.new(
40
+ res = ::OpenApiSDK::Operations::ListDomainsResponse.new(
50
41
  status_code: r.status, content_type: content_type, raw_response: r
51
42
  )
52
- if r.status == 201
43
+ if r.status == 200
53
44
  if Utils.match_content_type(content_type, 'application/json')
54
- out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::DomainSchema)
55
- res.domain_schema = out
45
+ out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::DomainSchema])
46
+ res.domain_schemas = out
56
47
  end
57
48
  elsif r.status == 400
58
49
  if Utils.match_content_type(content_type, 'application/json')
@@ -100,38 +91,44 @@ module OpenApiSDK
100
91
  res.internal_server_error = out
101
92
  end
102
93
  end
103
-
104
94
  res
105
95
  end
106
96
 
107
97
 
108
- sig { params(request: T.nilable(::OpenApiSDK::Operations::ListDomainsRequest)).returns(::OpenApiSDK::Operations::ListDomainsResponse) }
109
- def list(request)
110
- # list - Retrieve a list of domains
111
- # Retrieve a list of domains associated with the authenticated workspace.
98
+ sig { params(request: T.nilable(::OpenApiSDK::Operations::CreateDomainRequestBody)).returns(::OpenApiSDK::Operations::CreateDomainResponse) }
99
+ def create(request)
100
+ # create - Create a domain
101
+ # Create a domain for the authenticated workspace.
112
102
  url, params = @sdk_configuration.get_server_details
113
103
  base_url = Utils.template_url(url, params)
114
104
  url = "#{base_url}/domains"
115
105
  headers = {}
116
- query_params = Utils.get_query_params(::OpenApiSDK::Operations::ListDomainsRequest, request)
106
+ req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
107
+ headers['content-type'] = req_content_type
117
108
  headers['Accept'] = 'application/json'
118
109
  headers['user-agent'] = @sdk_configuration.user_agent
119
110
 
120
- r = @sdk_configuration.client.get(url) do |req|
111
+ r = @sdk_configuration.client.post(url) do |req|
121
112
  req.headers = headers
122
- req.params = query_params
123
113
  Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
114
+ if form
115
+ req.body = Utils.encode_form(form)
116
+ elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
117
+ req.body = URI.encode_www_form(data)
118
+ else
119
+ req.body = data
120
+ end
124
121
  end
125
122
 
126
123
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
127
124
 
128
- res = ::OpenApiSDK::Operations::ListDomainsResponse.new(
125
+ res = ::OpenApiSDK::Operations::CreateDomainResponse.new(
129
126
  status_code: r.status, content_type: content_type, raw_response: r
130
127
  )
131
- if r.status == 200
128
+ if r.status == 201
132
129
  if Utils.match_content_type(content_type, 'application/json')
133
- out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::DomainSchema])
134
- res.domain_schemas = out
130
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::DomainSchema)
131
+ res.domain_schema = out
135
132
  end
136
133
  elsif r.status == 400
137
134
  if Utils.match_content_type(content_type, 'application/json')
@@ -179,50 +176,40 @@ module OpenApiSDK
179
176
  res.internal_server_error = out
180
177
  end
181
178
  end
182
-
183
179
  res
184
180
  end
185
181
 
186
182
 
187
- sig { params(request: T.nilable(::OpenApiSDK::Operations::UpdateDomainRequest)).returns(::OpenApiSDK::Operations::UpdateDomainResponse) }
188
- def update(request)
189
- # update - Update a domain
190
- # Update a domain for the authenticated workspace.
183
+ sig { params(request: T.nilable(::OpenApiSDK::Operations::DeleteDomainRequest)).returns(::OpenApiSDK::Operations::DeleteDomainResponse) }
184
+ def delete(request)
185
+ # delete - Delete a domain
186
+ # Delete a domain from a workspace. It cannot be undone. This will also delete all the links associated with the domain.
191
187
  url, params = @sdk_configuration.get_server_details
192
188
  base_url = Utils.template_url(url, params)
193
189
  url = Utils.generate_url(
194
- ::OpenApiSDK::Operations::UpdateDomainRequest,
190
+ ::OpenApiSDK::Operations::DeleteDomainRequest,
195
191
  base_url,
196
192
  '/domains/{slug}',
197
193
  request
198
194
  )
199
195
  headers = {}
200
- req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :json)
201
- headers['content-type'] = req_content_type
202
196
  headers['Accept'] = 'application/json'
203
197
  headers['user-agent'] = @sdk_configuration.user_agent
204
198
 
205
- r = @sdk_configuration.client.patch(url) do |req|
199
+ r = @sdk_configuration.client.delete(url) do |req|
206
200
  req.headers = headers
207
201
  Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
208
- if form
209
- req.body = Utils.encode_form(form)
210
- elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
211
- req.body = URI.encode_www_form(data)
212
- else
213
- req.body = data
214
- end
215
202
  end
216
203
 
217
204
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
218
205
 
219
- res = ::OpenApiSDK::Operations::UpdateDomainResponse.new(
206
+ res = ::OpenApiSDK::Operations::DeleteDomainResponse.new(
220
207
  status_code: r.status, content_type: content_type, raw_response: r
221
208
  )
222
209
  if r.status == 200
223
210
  if Utils.match_content_type(content_type, 'application/json')
224
- out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::DomainSchema)
225
- res.domain_schema = out
211
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::DeleteDomainResponseBody)
212
+ res.object = out
226
213
  end
227
214
  elsif r.status == 400
228
215
  if Utils.match_content_type(content_type, 'application/json')
@@ -270,41 +257,49 @@ module OpenApiSDK
270
257
  res.internal_server_error = out
271
258
  end
272
259
  end
273
-
274
260
  res
275
261
  end
276
262
 
277
263
 
278
- sig { params(request: T.nilable(::OpenApiSDK::Operations::DeleteDomainRequest)).returns(::OpenApiSDK::Operations::DeleteDomainResponse) }
279
- def delete(request)
280
- # delete - Delete a domain
281
- # Delete a domain from a workspace. It cannot be undone. This will also delete all the links associated with the domain.
264
+ sig { params(request: T.nilable(::OpenApiSDK::Operations::UpdateDomainRequest)).returns(::OpenApiSDK::Operations::UpdateDomainResponse) }
265
+ def update(request)
266
+ # update - Update a domain
267
+ # Update a domain for the authenticated workspace.
282
268
  url, params = @sdk_configuration.get_server_details
283
269
  base_url = Utils.template_url(url, params)
284
270
  url = Utils.generate_url(
285
- ::OpenApiSDK::Operations::DeleteDomainRequest,
271
+ ::OpenApiSDK::Operations::UpdateDomainRequest,
286
272
  base_url,
287
273
  '/domains/{slug}',
288
274
  request
289
275
  )
290
276
  headers = {}
277
+ req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :json)
278
+ headers['content-type'] = req_content_type
291
279
  headers['Accept'] = 'application/json'
292
280
  headers['user-agent'] = @sdk_configuration.user_agent
293
281
 
294
- r = @sdk_configuration.client.delete(url) do |req|
282
+ r = @sdk_configuration.client.patch(url) do |req|
295
283
  req.headers = headers
296
284
  Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
285
+ if form
286
+ req.body = Utils.encode_form(form)
287
+ elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
288
+ req.body = URI.encode_www_form(data)
289
+ else
290
+ req.body = data
291
+ end
297
292
  end
298
293
 
299
294
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
300
295
 
301
- res = ::OpenApiSDK::Operations::DeleteDomainResponse.new(
296
+ res = ::OpenApiSDK::Operations::UpdateDomainResponse.new(
302
297
  status_code: r.status, content_type: content_type, raw_response: r
303
298
  )
304
299
  if r.status == 200
305
300
  if Utils.match_content_type(content_type, 'application/json')
306
- out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::DeleteDomainResponseBody)
307
- res.object = out
301
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::DomainSchema)
302
+ res.domain_schema = out
308
303
  end
309
304
  elsif r.status == 400
310
305
  if Utils.match_content_type(content_type, 'application/json')
@@ -352,7 +347,6 @@ module OpenApiSDK
352
347
  res.internal_server_error = out
353
348
  end
354
349
  end
355
-
356
350
  res
357
351
  end
358
352
  end
@@ -1,4 +1,4 @@
1
- # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
1
+ # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
2
 
3
3
  # typed: true
4
4
  # frozen_string_literal: true
@@ -13,7 +13,7 @@ module OpenApiSDK
13
13
  class Dub
14
14
  extend T::Sig
15
15
 
16
- attr_accessor :links, :analytics, :events, :tags, :domains, :track, :customers, :workspaces, :embed_tokens, :qr_codes, :metatags
16
+ attr_accessor :links, :qr_codes, :analytics, :workspaces, :tags, :domains, :track, :metatags
17
17
 
18
18
  sig do
19
19
  params(client: Faraday::Request,
@@ -76,15 +76,12 @@ module OpenApiSDK
76
76
  sig { void }
77
77
  def init_sdks
78
78
  @links = Links.new(@sdk_configuration)
79
+ @qr_codes = QRCodes.new(@sdk_configuration)
79
80
  @analytics = Analytics.new(@sdk_configuration)
80
- @events = Events.new(@sdk_configuration)
81
+ @workspaces = Workspaces.new(@sdk_configuration)
81
82
  @tags = Tags.new(@sdk_configuration)
82
83
  @domains = Domains.new(@sdk_configuration)
83
84
  @track = Track.new(@sdk_configuration)
84
- @customers = Customers.new(@sdk_configuration)
85
- @workspaces = Workspaces.new(@sdk_configuration)
86
- @embed_tokens = EmbedTokens.new(@sdk_configuration)
87
- @qr_codes = QRCodes.new(@sdk_configuration)
88
85
  @metatags = Metatags.new(@sdk_configuration)
89
86
  end
90
87
  end