dub 0.0.6 → 0.1.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/domains.rb +12 -49
- data/lib/open_api_sdk/links.rb +10 -41
- data/lib/open_api_sdk/metatags.rb +2 -6
- data/lib/open_api_sdk/models/operations/getlinks_request.rb +2 -2
- data/lib/open_api_sdk/models/operations.rb +0 -3
- data/lib/open_api_sdk/sdkconfiguration.rb +2 -2
- data/lib/open_api_sdk/tags.rb +4 -15
- data/lib/open_api_sdk/track.rb +6 -24
- data/lib/open_api_sdk/workspaces.rb +2 -167
- metadata +2 -5
- data/lib/open_api_sdk/models/operations/createworkspace_requestbody.rb +0 -30
- data/lib/open_api_sdk/models/operations/createworkspace_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/getworkspaces_response.rb +0 -60
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b19f72869d764b1823e65bc65d8438f9089614eb6918b6593a6eee2152f30acd
|
4
|
+
data.tar.gz: 3df87fc2c6d28b5e0702a444f5f50aac2eb8c1710390d31dfd34b0ccf0add29d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e191ad895e39020507ee383ae4bbde1d6ded180e5b13297f73416cf9d170e295ecd615f5dcc430b875d8a1a7435bf7b3cb5e34d08aa54e375ca5129742ffc271
|
7
|
+
data.tar.gz: cda24e133b0ee4a898156dba4b573720fb84324e730a000285fd89db9a235856d0b3d496345862b9ce705b2aad57131e3e7a7186521f0717382a72d0f8f5735a
|
data/lib/open_api_sdk/domains.rb
CHANGED
@@ -19,15 +19,10 @@ module OpenApiSDK
|
|
19
19
|
end
|
20
20
|
|
21
21
|
|
22
|
-
sig { params(
|
23
|
-
def list(
|
22
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::ListDomainsRequest)).returns(::OpenApiSDK::Operations::ListDomainsResponse) }
|
23
|
+
def list(request)
|
24
24
|
# list - Retrieve a list of domains
|
25
25
|
# Retrieve a list of domains associated with the authenticated workspace.
|
26
|
-
request = ::OpenApiSDK::Operations::ListDomainsRequest.new(
|
27
|
-
|
28
|
-
workspace_id: workspace_id,
|
29
|
-
project_slug: project_slug
|
30
|
-
)
|
31
26
|
url, params = @sdk_configuration.get_server_details
|
32
27
|
base_url = Utils.template_url(url, params)
|
33
28
|
url = "#{base_url}/domains"
|
@@ -102,16 +97,10 @@ module OpenApiSDK
|
|
102
97
|
end
|
103
98
|
|
104
99
|
|
105
|
-
sig { params(
|
106
|
-
def create(
|
100
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::CreateDomainRequest)).returns(::OpenApiSDK::Operations::CreateDomainResponse) }
|
101
|
+
def create(request)
|
107
102
|
# create - Create a domain
|
108
103
|
# Create a domain for the authenticated workspace.
|
109
|
-
request = ::OpenApiSDK::Operations::CreateDomainRequest.new(
|
110
|
-
|
111
|
-
workspace_id: workspace_id,
|
112
|
-
project_slug: project_slug,
|
113
|
-
request_body: request_body
|
114
|
-
)
|
115
104
|
url, params = @sdk_configuration.get_server_details
|
116
105
|
base_url = Utils.template_url(url, params)
|
117
106
|
url = "#{base_url}/domains"
|
@@ -195,16 +184,10 @@ module OpenApiSDK
|
|
195
184
|
end
|
196
185
|
|
197
186
|
|
198
|
-
sig { params(
|
199
|
-
def delete(
|
187
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::DeleteDomainRequest)).returns(::OpenApiSDK::Operations::DeleteDomainResponse) }
|
188
|
+
def delete(request)
|
200
189
|
# delete - Delete a domain
|
201
190
|
# Delete a domain from a workspace. It cannot be undone. This will also delete all the links associated with the domain.
|
202
|
-
request = ::OpenApiSDK::Operations::DeleteDomainRequest.new(
|
203
|
-
|
204
|
-
slug: slug,
|
205
|
-
workspace_id: workspace_id,
|
206
|
-
project_slug: project_slug
|
207
|
-
)
|
208
191
|
url, params = @sdk_configuration.get_server_details
|
209
192
|
base_url = Utils.template_url(url, params)
|
210
193
|
url = Utils.generate_url(
|
@@ -285,17 +268,10 @@ module OpenApiSDK
|
|
285
268
|
end
|
286
269
|
|
287
270
|
|
288
|
-
sig { params(
|
289
|
-
def update(
|
271
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::UpdateDomainRequest)).returns(::OpenApiSDK::Operations::UpdateDomainResponse) }
|
272
|
+
def update(request)
|
290
273
|
# update - Update a domain
|
291
274
|
# Update a domain for the authenticated workspace.
|
292
|
-
request = ::OpenApiSDK::Operations::UpdateDomainRequest.new(
|
293
|
-
|
294
|
-
slug: slug,
|
295
|
-
workspace_id: workspace_id,
|
296
|
-
project_slug: project_slug,
|
297
|
-
request_body: request_body
|
298
|
-
)
|
299
275
|
url, params = @sdk_configuration.get_server_details
|
300
276
|
base_url = Utils.template_url(url, params)
|
301
277
|
url = Utils.generate_url(
|
@@ -385,16 +361,10 @@ module OpenApiSDK
|
|
385
361
|
end
|
386
362
|
|
387
363
|
|
388
|
-
sig { params(
|
389
|
-
def set_primary(
|
364
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::SetPrimaryDomainRequest)).returns(::OpenApiSDK::Operations::SetPrimaryDomainResponse) }
|
365
|
+
def set_primary(request)
|
390
366
|
# set_primary - Set a domain as primary
|
391
367
|
# Set a domain as primary for the authenticated workspace.
|
392
|
-
request = ::OpenApiSDK::Operations::SetPrimaryDomainRequest.new(
|
393
|
-
|
394
|
-
slug: slug,
|
395
|
-
workspace_id: workspace_id,
|
396
|
-
project_slug: project_slug
|
397
|
-
)
|
398
368
|
url, params = @sdk_configuration.get_server_details
|
399
369
|
base_url = Utils.template_url(url, params)
|
400
370
|
url = Utils.generate_url(
|
@@ -475,17 +445,10 @@ module OpenApiSDK
|
|
475
445
|
end
|
476
446
|
|
477
447
|
|
478
|
-
sig { params(
|
479
|
-
def transfer(
|
448
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::TransferDomainRequest)).returns(::OpenApiSDK::Operations::TransferDomainResponse) }
|
449
|
+
def transfer(request)
|
480
450
|
# transfer - Transfer a domain
|
481
451
|
# Transfer a domain to another workspace within the authenticated account.
|
482
|
-
request = ::OpenApiSDK::Operations::TransferDomainRequest.new(
|
483
|
-
|
484
|
-
slug: slug,
|
485
|
-
workspace_id: workspace_id,
|
486
|
-
project_slug: project_slug,
|
487
|
-
request_body: request_body
|
488
|
-
)
|
489
452
|
url, params = @sdk_configuration.get_server_details
|
490
453
|
base_url = Utils.template_url(url, params)
|
491
454
|
url = Utils.generate_url(
|
data/lib/open_api_sdk/links.rb
CHANGED
@@ -97,16 +97,10 @@ module OpenApiSDK
|
|
97
97
|
end
|
98
98
|
|
99
99
|
|
100
|
-
sig { params(
|
101
|
-
def create(
|
100
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::CreateLinkRequest)).returns(::OpenApiSDK::Operations::CreateLinkResponse) }
|
101
|
+
def create(request)
|
102
102
|
# create - Create a new link
|
103
103
|
# Create a new link for the authenticated workspace.
|
104
|
-
request = ::OpenApiSDK::Operations::CreateLinkRequest.new(
|
105
|
-
|
106
|
-
workspace_id: workspace_id,
|
107
|
-
project_slug: project_slug,
|
108
|
-
request_body: request_body
|
109
|
-
)
|
110
104
|
url, params = @sdk_configuration.get_server_details
|
111
105
|
base_url = Utils.template_url(url, params)
|
112
106
|
url = "#{base_url}/links"
|
@@ -346,16 +340,10 @@ module OpenApiSDK
|
|
346
340
|
end
|
347
341
|
|
348
342
|
|
349
|
-
sig { params(
|
350
|
-
def delete(
|
343
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::DeleteLinkRequest)).returns(::OpenApiSDK::Operations::DeleteLinkResponse) }
|
344
|
+
def delete(request)
|
351
345
|
# delete - Delete a link
|
352
346
|
# Delete a link for the authenticated workspace.
|
353
|
-
request = ::OpenApiSDK::Operations::DeleteLinkRequest.new(
|
354
|
-
|
355
|
-
link_id: link_id,
|
356
|
-
workspace_id: workspace_id,
|
357
|
-
project_slug: project_slug
|
358
|
-
)
|
359
347
|
url, params = @sdk_configuration.get_server_details
|
360
348
|
base_url = Utils.template_url(url, params)
|
361
349
|
url = Utils.generate_url(
|
@@ -436,17 +424,10 @@ module OpenApiSDK
|
|
436
424
|
end
|
437
425
|
|
438
426
|
|
439
|
-
sig { params(
|
440
|
-
def update(
|
427
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::UpdateLinkRequest)).returns(::OpenApiSDK::Operations::UpdateLinkResponse) }
|
428
|
+
def update(request)
|
441
429
|
# update - Update a link
|
442
430
|
# Update a link for the authenticated workspace. If there's no change, returns it as it is.
|
443
|
-
request = ::OpenApiSDK::Operations::UpdateLinkRequest.new(
|
444
|
-
|
445
|
-
link_id: link_id,
|
446
|
-
workspace_id: workspace_id,
|
447
|
-
project_slug: project_slug,
|
448
|
-
request_body: request_body
|
449
|
-
)
|
450
431
|
url, params = @sdk_configuration.get_server_details
|
451
432
|
base_url = Utils.template_url(url, params)
|
452
433
|
url = Utils.generate_url(
|
@@ -536,16 +517,10 @@ module OpenApiSDK
|
|
536
517
|
end
|
537
518
|
|
538
519
|
|
539
|
-
sig { params(
|
540
|
-
def create_many(
|
520
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::BulkCreateLinksRequest)).returns(::OpenApiSDK::Operations::BulkCreateLinksResponse) }
|
521
|
+
def create_many(request)
|
541
522
|
# create_many - Bulk create links
|
542
523
|
# Bulk create up to 100 links for the authenticated workspace.
|
543
|
-
request = ::OpenApiSDK::Operations::BulkCreateLinksRequest.new(
|
544
|
-
|
545
|
-
workspace_id: workspace_id,
|
546
|
-
project_slug: project_slug,
|
547
|
-
request_body: request_body
|
548
|
-
)
|
549
524
|
url, params = @sdk_configuration.get_server_details
|
550
525
|
base_url = Utils.template_url(url, params)
|
551
526
|
url = "#{base_url}/links/bulk"
|
@@ -629,16 +604,10 @@ module OpenApiSDK
|
|
629
604
|
end
|
630
605
|
|
631
606
|
|
632
|
-
sig { params(
|
633
|
-
def upsert(
|
607
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::UpsertLinkRequest)).returns(::OpenApiSDK::Operations::UpsertLinkResponse) }
|
608
|
+
def upsert(request)
|
634
609
|
# upsert - Upsert a link
|
635
610
|
# 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.
|
636
|
-
request = ::OpenApiSDK::Operations::UpsertLinkRequest.new(
|
637
|
-
|
638
|
-
workspace_id: workspace_id,
|
639
|
-
project_slug: project_slug,
|
640
|
-
request_body: request_body
|
641
|
-
)
|
642
611
|
url, params = @sdk_configuration.get_server_details
|
643
612
|
base_url = Utils.template_url(url, params)
|
644
613
|
url = "#{base_url}/links/upsert"
|
@@ -19,14 +19,10 @@ module OpenApiSDK
|
|
19
19
|
end
|
20
20
|
|
21
21
|
|
22
|
-
sig { params(
|
23
|
-
def get(
|
22
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::GetMetatagsRequest)).returns(::OpenApiSDK::Operations::GetMetatagsResponse) }
|
23
|
+
def get(request)
|
24
24
|
# get - Retrieve the metatags for a URL
|
25
25
|
# Retrieve the metatags for a URL.
|
26
|
-
request = ::OpenApiSDK::Operations::GetMetatagsRequest.new(
|
27
|
-
|
28
|
-
url: url
|
29
|
-
)
|
30
26
|
url, params = @sdk_configuration.get_server_details
|
31
27
|
base_url = Utils.template_url(url, params)
|
32
28
|
url = "#{base_url}/metatags"
|
@@ -14,7 +14,7 @@ module OpenApiSDK
|
|
14
14
|
# The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned.
|
15
15
|
field :domain, T.nilable(::String), { 'query_param': { 'field_name': 'domain', 'style': 'form', 'explode': true } }
|
16
16
|
# The page number for pagination (each page contains 100 links).
|
17
|
-
field :page, T.nilable(::
|
17
|
+
field :page, T.nilable(::Integer), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } }
|
18
18
|
# The slug of the project. This field is deprecated – use `workspaceId` instead.
|
19
19
|
field :project_slug, T.nilable(::String), { 'query_param': { 'field_name': 'projectSlug', 'style': 'form', 'explode': true } }
|
20
20
|
# The search term to filter the links by. The search term will be matched against the short link slug and the destination url.
|
@@ -37,7 +37,7 @@ module OpenApiSDK
|
|
37
37
|
field :workspace_id, T.nilable(::String), { 'query_param': { 'field_name': 'workspaceId', 'style': 'form', 'explode': true } }
|
38
38
|
|
39
39
|
|
40
|
-
sig { params(domain: T.nilable(::String), page: T.nilable(::
|
40
|
+
sig { params(domain: T.nilable(::String), page: T.nilable(::Integer), project_slug: T.nilable(::String), search: T.nilable(::String), show_archived: T.nilable(T::Boolean), sort: T.nilable(::OpenApiSDK::Operations::Sort), tag_id: T.nilable(::String), tag_ids: T.nilable(::Object), tag_names: T.nilable(::Object), user_id: T.nilable(::String), with_tags: T.nilable(T::Boolean), workspace_id: T.nilable(::String)).void }
|
41
41
|
def initialize(domain: nil, page: nil, project_slug: nil, search: nil, show_archived: nil, sort: nil, tag_id: nil, tag_ids: nil, tag_names: nil, user_id: nil, with_tags: nil, workspace_id: nil)
|
42
42
|
@domain = domain
|
43
43
|
@page = page
|
@@ -35,9 +35,6 @@ module OpenApiSDK
|
|
35
35
|
autoload :Interval, 'open_api_sdk/models/operations/interval.rb'
|
36
36
|
autoload :RetrieveAnalyticsRequest, 'open_api_sdk/models/operations/retrieveanalytics_request.rb'
|
37
37
|
autoload :RetrieveAnalyticsResponse, 'open_api_sdk/models/operations/retrieveanalytics_response.rb'
|
38
|
-
autoload :GetWorkspacesResponse, 'open_api_sdk/models/operations/getworkspaces_response.rb'
|
39
|
-
autoload :CreateWorkspaceRequestBody, 'open_api_sdk/models/operations/createworkspace_requestbody.rb'
|
40
|
-
autoload :CreateWorkspaceResponse, 'open_api_sdk/models/operations/createworkspace_response.rb'
|
41
38
|
autoload :GetWorkspaceRequest, 'open_api_sdk/models/operations/getworkspace_request.rb'
|
42
39
|
autoload :GetWorkspaceResponse, 'open_api_sdk/models/operations/getworkspace_response.rb'
|
43
40
|
autoload :GetTagsRequest, 'open_api_sdk/models/operations/gettags_request.rb'
|
@@ -40,9 +40,9 @@ module OpenApiSDK
|
|
40
40
|
@globals = globals.nil? ? {} : globals
|
41
41
|
@language = 'ruby'
|
42
42
|
@openapi_doc_version = '0.0.1'
|
43
|
-
@sdk_version = '0.0
|
43
|
+
@sdk_version = '0.1.0'
|
44
44
|
@gen_version = '2.354.2'
|
45
|
-
@user_agent = 'speakeasy-sdk/ruby 0.0
|
45
|
+
@user_agent = 'speakeasy-sdk/ruby 0.1.0 2.354.2 0.0.1 dub'
|
46
46
|
end
|
47
47
|
|
48
48
|
sig { returns([String, T::Hash[Symbol, String]]) }
|
data/lib/open_api_sdk/tags.rb
CHANGED
@@ -19,15 +19,10 @@ module OpenApiSDK
|
|
19
19
|
end
|
20
20
|
|
21
21
|
|
22
|
-
sig { params(
|
23
|
-
def list(
|
22
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::GetTagsRequest)).returns(::OpenApiSDK::Operations::GetTagsResponse) }
|
23
|
+
def list(request)
|
24
24
|
# list - Retrieve a list of tags
|
25
25
|
# Retrieve a list of tags for the authenticated workspace.
|
26
|
-
request = ::OpenApiSDK::Operations::GetTagsRequest.new(
|
27
|
-
|
28
|
-
workspace_id: workspace_id,
|
29
|
-
project_slug: project_slug
|
30
|
-
)
|
31
26
|
url, params = @sdk_configuration.get_server_details
|
32
27
|
base_url = Utils.template_url(url, params)
|
33
28
|
url = "#{base_url}/tags"
|
@@ -102,16 +97,10 @@ module OpenApiSDK
|
|
102
97
|
end
|
103
98
|
|
104
99
|
|
105
|
-
sig { params(
|
106
|
-
def create(
|
100
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::CreateTagRequest)).returns(::OpenApiSDK::Operations::CreateTagResponse) }
|
101
|
+
def create(request)
|
107
102
|
# create - Create a new tag
|
108
103
|
# Create a new tag for the authenticated workspace.
|
109
|
-
request = ::OpenApiSDK::Operations::CreateTagRequest.new(
|
110
|
-
|
111
|
-
workspace_id: workspace_id,
|
112
|
-
project_slug: project_slug,
|
113
|
-
request_body: request_body
|
114
|
-
)
|
115
104
|
url, params = @sdk_configuration.get_server_details
|
116
105
|
base_url = Utils.template_url(url, params)
|
117
106
|
url = "#{base_url}/tags"
|
data/lib/open_api_sdk/track.rb
CHANGED
@@ -19,16 +19,10 @@ module OpenApiSDK
|
|
19
19
|
end
|
20
20
|
|
21
21
|
|
22
|
-
sig { params(
|
23
|
-
def lead(
|
22
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::TrackLeadRequest)).returns(::OpenApiSDK::Operations::TrackLeadResponse) }
|
23
|
+
def lead(request)
|
24
24
|
# lead - Track a lead
|
25
25
|
# Track a lead for a short link.
|
26
|
-
request = ::OpenApiSDK::Operations::TrackLeadRequest.new(
|
27
|
-
|
28
|
-
workspace_id: workspace_id,
|
29
|
-
project_slug: project_slug,
|
30
|
-
request_body: request_body
|
31
|
-
)
|
32
26
|
url, params = @sdk_configuration.get_server_details
|
33
27
|
base_url = Utils.template_url(url, params)
|
34
28
|
url = "#{base_url}/track/lead"
|
@@ -112,16 +106,10 @@ module OpenApiSDK
|
|
112
106
|
end
|
113
107
|
|
114
108
|
|
115
|
-
sig { params(
|
116
|
-
def sale(
|
109
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::TrackSaleRequest)).returns(::OpenApiSDK::Operations::TrackSaleResponse) }
|
110
|
+
def sale(request)
|
117
111
|
# sale - Track a sale
|
118
112
|
# Track a sale for a short link.
|
119
|
-
request = ::OpenApiSDK::Operations::TrackSaleRequest.new(
|
120
|
-
|
121
|
-
workspace_id: workspace_id,
|
122
|
-
project_slug: project_slug,
|
123
|
-
request_body: request_body
|
124
|
-
)
|
125
113
|
url, params = @sdk_configuration.get_server_details
|
126
114
|
base_url = Utils.template_url(url, params)
|
127
115
|
url = "#{base_url}/track/sale"
|
@@ -205,16 +193,10 @@ module OpenApiSDK
|
|
205
193
|
end
|
206
194
|
|
207
195
|
|
208
|
-
sig { params(
|
209
|
-
def customer(
|
196
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::TrackCustomerRequest)).returns(::OpenApiSDK::Operations::TrackCustomerResponse) }
|
197
|
+
def customer(request)
|
210
198
|
# customer - Track a customer
|
211
199
|
# Track a customer for an authenticated workspace.
|
212
|
-
request = ::OpenApiSDK::Operations::TrackCustomerRequest.new(
|
213
|
-
|
214
|
-
workspace_id: workspace_id,
|
215
|
-
project_slug: project_slug,
|
216
|
-
request_body: request_body
|
217
|
-
)
|
218
200
|
url, params = @sdk_configuration.get_server_details
|
219
201
|
base_url = Utils.template_url(url, params)
|
220
202
|
url = "#{base_url}/track/customer"
|
@@ -19,175 +19,10 @@ module OpenApiSDK
|
|
19
19
|
end
|
20
20
|
|
21
21
|
|
22
|
-
sig { returns(::OpenApiSDK::Operations::
|
23
|
-
def
|
24
|
-
# list - Retrieve a list of workspaces
|
25
|
-
# Retrieve a list of workspaces for the authenticated user.
|
26
|
-
url, params = @sdk_configuration.get_server_details
|
27
|
-
base_url = Utils.template_url(url, params)
|
28
|
-
url = "#{base_url}/workspaces"
|
29
|
-
headers = {}
|
30
|
-
headers['Accept'] = 'application/json'
|
31
|
-
headers['user-agent'] = @sdk_configuration.user_agent
|
32
|
-
|
33
|
-
r = @sdk_configuration.client.get(url) do |req|
|
34
|
-
req.headers = headers
|
35
|
-
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
36
|
-
end
|
37
|
-
|
38
|
-
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
39
|
-
|
40
|
-
res = ::OpenApiSDK::Operations::GetWorkspacesResponse.new(
|
41
|
-
status_code: r.status, content_type: content_type, raw_response: r
|
42
|
-
)
|
43
|
-
if r.status == 200
|
44
|
-
if Utils.match_content_type(content_type, 'application/json')
|
45
|
-
out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::WorkspaceSchema])
|
46
|
-
res.workspace_schemas = out
|
47
|
-
end
|
48
|
-
elsif r.status == 400
|
49
|
-
if Utils.match_content_type(content_type, 'application/json')
|
50
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
|
51
|
-
res.bad_request = out
|
52
|
-
end
|
53
|
-
elsif r.status == 401
|
54
|
-
if Utils.match_content_type(content_type, 'application/json')
|
55
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
|
56
|
-
res.unauthorized = out
|
57
|
-
end
|
58
|
-
elsif r.status == 403
|
59
|
-
if Utils.match_content_type(content_type, 'application/json')
|
60
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
|
61
|
-
res.forbidden = out
|
62
|
-
end
|
63
|
-
elsif r.status == 404
|
64
|
-
if Utils.match_content_type(content_type, 'application/json')
|
65
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
|
66
|
-
res.not_found = out
|
67
|
-
end
|
68
|
-
elsif r.status == 409
|
69
|
-
if Utils.match_content_type(content_type, 'application/json')
|
70
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
|
71
|
-
res.conflict = out
|
72
|
-
end
|
73
|
-
elsif r.status == 410
|
74
|
-
if Utils.match_content_type(content_type, 'application/json')
|
75
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
|
76
|
-
res.invite_expired = out
|
77
|
-
end
|
78
|
-
elsif r.status == 422
|
79
|
-
if Utils.match_content_type(content_type, 'application/json')
|
80
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
|
81
|
-
res.unprocessable_entity = out
|
82
|
-
end
|
83
|
-
elsif r.status == 429
|
84
|
-
if Utils.match_content_type(content_type, 'application/json')
|
85
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
|
86
|
-
res.rate_limit_exceeded = out
|
87
|
-
end
|
88
|
-
elsif r.status == 500
|
89
|
-
if Utils.match_content_type(content_type, 'application/json')
|
90
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
|
91
|
-
res.internal_server_error = out
|
92
|
-
end
|
93
|
-
end
|
94
|
-
res
|
95
|
-
end
|
96
|
-
|
97
|
-
|
98
|
-
sig { params(request: T.nilable(::OpenApiSDK::Operations::CreateWorkspaceRequestBody)).returns(::OpenApiSDK::Operations::CreateWorkspaceResponse) }
|
99
|
-
def create(request)
|
100
|
-
# create - Create a workspace
|
101
|
-
# Create a new workspace for the authenticated user.
|
102
|
-
url, params = @sdk_configuration.get_server_details
|
103
|
-
base_url = Utils.template_url(url, params)
|
104
|
-
url = "#{base_url}/workspaces"
|
105
|
-
headers = {}
|
106
|
-
req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
|
107
|
-
headers['content-type'] = req_content_type
|
108
|
-
headers['Accept'] = 'application/json'
|
109
|
-
headers['user-agent'] = @sdk_configuration.user_agent
|
110
|
-
|
111
|
-
r = @sdk_configuration.client.post(url) do |req|
|
112
|
-
req.headers = headers
|
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
|
121
|
-
end
|
122
|
-
|
123
|
-
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
124
|
-
|
125
|
-
res = ::OpenApiSDK::Operations::CreateWorkspaceResponse.new(
|
126
|
-
status_code: r.status, content_type: content_type, raw_response: r
|
127
|
-
)
|
128
|
-
if r.status == 200
|
129
|
-
if Utils.match_content_type(content_type, 'application/json')
|
130
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::WorkspaceSchema)
|
131
|
-
res.workspace_schema = out
|
132
|
-
end
|
133
|
-
elsif r.status == 400
|
134
|
-
if Utils.match_content_type(content_type, 'application/json')
|
135
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
|
136
|
-
res.bad_request = out
|
137
|
-
end
|
138
|
-
elsif r.status == 401
|
139
|
-
if Utils.match_content_type(content_type, 'application/json')
|
140
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
|
141
|
-
res.unauthorized = out
|
142
|
-
end
|
143
|
-
elsif r.status == 403
|
144
|
-
if Utils.match_content_type(content_type, 'application/json')
|
145
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
|
146
|
-
res.forbidden = out
|
147
|
-
end
|
148
|
-
elsif r.status == 404
|
149
|
-
if Utils.match_content_type(content_type, 'application/json')
|
150
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
|
151
|
-
res.not_found = out
|
152
|
-
end
|
153
|
-
elsif r.status == 409
|
154
|
-
if Utils.match_content_type(content_type, 'application/json')
|
155
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
|
156
|
-
res.conflict = out
|
157
|
-
end
|
158
|
-
elsif r.status == 410
|
159
|
-
if Utils.match_content_type(content_type, 'application/json')
|
160
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
|
161
|
-
res.invite_expired = out
|
162
|
-
end
|
163
|
-
elsif r.status == 422
|
164
|
-
if Utils.match_content_type(content_type, 'application/json')
|
165
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
|
166
|
-
res.unprocessable_entity = out
|
167
|
-
end
|
168
|
-
elsif r.status == 429
|
169
|
-
if Utils.match_content_type(content_type, 'application/json')
|
170
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
|
171
|
-
res.rate_limit_exceeded = out
|
172
|
-
end
|
173
|
-
elsif r.status == 500
|
174
|
-
if Utils.match_content_type(content_type, 'application/json')
|
175
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
|
176
|
-
res.internal_server_error = out
|
177
|
-
end
|
178
|
-
end
|
179
|
-
res
|
180
|
-
end
|
181
|
-
|
182
|
-
|
183
|
-
sig { params(id_or_slug: ::String).returns(::OpenApiSDK::Operations::GetWorkspaceResponse) }
|
184
|
-
def get(id_or_slug)
|
22
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::GetWorkspaceRequest)).returns(::OpenApiSDK::Operations::GetWorkspaceResponse) }
|
23
|
+
def get(request)
|
185
24
|
# get - Retrieve a workspace
|
186
25
|
# Retrieve a workspace for the authenticated user.
|
187
|
-
request = ::OpenApiSDK::Operations::GetWorkspaceRequest.new(
|
188
|
-
|
189
|
-
id_or_slug: id_or_slug
|
190
|
-
)
|
191
26
|
url, params = @sdk_configuration.get_server_details
|
192
27
|
base_url = Utils.template_url(url, params)
|
193
28
|
url = Utils.generate_url(
|
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.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dub
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -161,8 +161,6 @@ files:
|
|
161
161
|
- lib/open_api_sdk/models/operations/createtag_request.rb
|
162
162
|
- lib/open_api_sdk/models/operations/createtag_requestbody.rb
|
163
163
|
- lib/open_api_sdk/models/operations/createtag_response.rb
|
164
|
-
- lib/open_api_sdk/models/operations/createworkspace_requestbody.rb
|
165
|
-
- lib/open_api_sdk/models/operations/createworkspace_response.rb
|
166
164
|
- lib/open_api_sdk/models/operations/deletedomain_request.rb
|
167
165
|
- lib/open_api_sdk/models/operations/deletedomain_response.rb
|
168
166
|
- lib/open_api_sdk/models/operations/deletedomain_responsebody.rb
|
@@ -185,7 +183,6 @@ files:
|
|
185
183
|
- lib/open_api_sdk/models/operations/gettags_response.rb
|
186
184
|
- lib/open_api_sdk/models/operations/getworkspace_request.rb
|
187
185
|
- lib/open_api_sdk/models/operations/getworkspace_response.rb
|
188
|
-
- lib/open_api_sdk/models/operations/getworkspaces_response.rb
|
189
186
|
- lib/open_api_sdk/models/operations/groupby.rb
|
190
187
|
- lib/open_api_sdk/models/operations/interval.rb
|
191
188
|
- lib/open_api_sdk/models/operations/level.rb
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
2
|
-
|
3
|
-
# typed: true
|
4
|
-
# frozen_string_literal: true
|
5
|
-
|
6
|
-
|
7
|
-
module OpenApiSDK
|
8
|
-
module Operations
|
9
|
-
|
10
|
-
|
11
|
-
class CreateWorkspaceRequestBody < ::OpenApiSDK::Utils::FieldAugmented
|
12
|
-
extend T::Sig
|
13
|
-
|
14
|
-
|
15
|
-
field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } }
|
16
|
-
|
17
|
-
field :slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } }
|
18
|
-
|
19
|
-
field :domain, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('domain') } }
|
20
|
-
|
21
|
-
|
22
|
-
sig { params(name: ::String, slug: ::String, domain: T.nilable(::String)).void }
|
23
|
-
def initialize(name: nil, slug: nil, domain: nil)
|
24
|
-
@name = name
|
25
|
-
@slug = slug
|
26
|
-
@domain = domain
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,60 +0,0 @@
|
|
1
|
-
# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
2
|
-
|
3
|
-
# typed: true
|
4
|
-
# frozen_string_literal: true
|
5
|
-
|
6
|
-
|
7
|
-
module OpenApiSDK
|
8
|
-
module Operations
|
9
|
-
|
10
|
-
|
11
|
-
class CreateWorkspaceResponse < ::OpenApiSDK::Utils::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 server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
|
21
|
-
field :bad_request, T.nilable(::OpenApiSDK::Shared::BadRequest)
|
22
|
-
# This response is sent when a request conflicts with the current state of the server.
|
23
|
-
field :conflict, T.nilable(::OpenApiSDK::Shared::Conflict)
|
24
|
-
# The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.
|
25
|
-
field :forbidden, T.nilable(::OpenApiSDK::Shared::Forbidden)
|
26
|
-
# The server has encountered a situation it does not know how to handle.
|
27
|
-
field :internal_server_error, T.nilable(::OpenApiSDK::Shared::InternalServerError)
|
28
|
-
# This response is sent when the requested content has been permanently deleted from server, with no forwarding address.
|
29
|
-
field :invite_expired, T.nilable(::OpenApiSDK::Shared::InviteExpired)
|
30
|
-
# The server cannot find the requested resource.
|
31
|
-
field :not_found, T.nilable(::OpenApiSDK::Shared::NotFound)
|
32
|
-
# The user has sent too many requests in a given amount of time ("rate limiting")
|
33
|
-
field :rate_limit_exceeded, T.nilable(::OpenApiSDK::Shared::RateLimitExceeded)
|
34
|
-
# Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.
|
35
|
-
field :unauthorized, T.nilable(::OpenApiSDK::Shared::Unauthorized)
|
36
|
-
# The request was well-formed but was unable to be followed due to semantic errors.
|
37
|
-
field :unprocessable_entity, T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)
|
38
|
-
# The created workspace
|
39
|
-
field :workspace_schema, T.nilable(::OpenApiSDK::Shared::WorkspaceSchema)
|
40
|
-
|
41
|
-
|
42
|
-
sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, bad_request: T.nilable(::OpenApiSDK::Shared::BadRequest), conflict: T.nilable(::OpenApiSDK::Shared::Conflict), forbidden: T.nilable(::OpenApiSDK::Shared::Forbidden), internal_server_error: T.nilable(::OpenApiSDK::Shared::InternalServerError), invite_expired: T.nilable(::OpenApiSDK::Shared::InviteExpired), not_found: T.nilable(::OpenApiSDK::Shared::NotFound), rate_limit_exceeded: T.nilable(::OpenApiSDK::Shared::RateLimitExceeded), unauthorized: T.nilable(::OpenApiSDK::Shared::Unauthorized), unprocessable_entity: T.nilable(::OpenApiSDK::Shared::UnprocessableEntity), workspace_schema: T.nilable(::OpenApiSDK::Shared::WorkspaceSchema)).void }
|
43
|
-
def initialize(content_type: nil, raw_response: nil, status_code: nil, bad_request: nil, conflict: nil, forbidden: nil, internal_server_error: nil, invite_expired: nil, not_found: nil, rate_limit_exceeded: nil, unauthorized: nil, unprocessable_entity: nil, workspace_schema: nil)
|
44
|
-
@content_type = content_type
|
45
|
-
@raw_response = raw_response
|
46
|
-
@status_code = status_code
|
47
|
-
@bad_request = bad_request
|
48
|
-
@conflict = conflict
|
49
|
-
@forbidden = forbidden
|
50
|
-
@internal_server_error = internal_server_error
|
51
|
-
@invite_expired = invite_expired
|
52
|
-
@not_found = not_found
|
53
|
-
@rate_limit_exceeded = rate_limit_exceeded
|
54
|
-
@unauthorized = unauthorized
|
55
|
-
@unprocessable_entity = unprocessable_entity
|
56
|
-
@workspace_schema = workspace_schema
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
@@ -1,60 +0,0 @@
|
|
1
|
-
# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
2
|
-
|
3
|
-
# typed: true
|
4
|
-
# frozen_string_literal: true
|
5
|
-
|
6
|
-
|
7
|
-
module OpenApiSDK
|
8
|
-
module Operations
|
9
|
-
|
10
|
-
|
11
|
-
class GetWorkspacesResponse < ::OpenApiSDK::Utils::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 server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
|
21
|
-
field :bad_request, T.nilable(::OpenApiSDK::Shared::BadRequest)
|
22
|
-
# This response is sent when a request conflicts with the current state of the server.
|
23
|
-
field :conflict, T.nilable(::OpenApiSDK::Shared::Conflict)
|
24
|
-
# The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.
|
25
|
-
field :forbidden, T.nilable(::OpenApiSDK::Shared::Forbidden)
|
26
|
-
# The server has encountered a situation it does not know how to handle.
|
27
|
-
field :internal_server_error, T.nilable(::OpenApiSDK::Shared::InternalServerError)
|
28
|
-
# This response is sent when the requested content has been permanently deleted from server, with no forwarding address.
|
29
|
-
field :invite_expired, T.nilable(::OpenApiSDK::Shared::InviteExpired)
|
30
|
-
# The server cannot find the requested resource.
|
31
|
-
field :not_found, T.nilable(::OpenApiSDK::Shared::NotFound)
|
32
|
-
# The user has sent too many requests in a given amount of time ("rate limiting")
|
33
|
-
field :rate_limit_exceeded, T.nilable(::OpenApiSDK::Shared::RateLimitExceeded)
|
34
|
-
# Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.
|
35
|
-
field :unauthorized, T.nilable(::OpenApiSDK::Shared::Unauthorized)
|
36
|
-
# The request was well-formed but was unable to be followed due to semantic errors.
|
37
|
-
field :unprocessable_entity, T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)
|
38
|
-
# A list of workspaces
|
39
|
-
field :workspace_schemas, T.nilable(T::Array[::OpenApiSDK::Shared::WorkspaceSchema])
|
40
|
-
|
41
|
-
|
42
|
-
sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, bad_request: T.nilable(::OpenApiSDK::Shared::BadRequest), conflict: T.nilable(::OpenApiSDK::Shared::Conflict), forbidden: T.nilable(::OpenApiSDK::Shared::Forbidden), internal_server_error: T.nilable(::OpenApiSDK::Shared::InternalServerError), invite_expired: T.nilable(::OpenApiSDK::Shared::InviteExpired), not_found: T.nilable(::OpenApiSDK::Shared::NotFound), rate_limit_exceeded: T.nilable(::OpenApiSDK::Shared::RateLimitExceeded), unauthorized: T.nilable(::OpenApiSDK::Shared::Unauthorized), unprocessable_entity: T.nilable(::OpenApiSDK::Shared::UnprocessableEntity), workspace_schemas: T.nilable(T::Array[::OpenApiSDK::Shared::WorkspaceSchema])).void }
|
43
|
-
def initialize(content_type: nil, raw_response: nil, status_code: nil, bad_request: nil, conflict: nil, forbidden: nil, internal_server_error: nil, invite_expired: nil, not_found: nil, rate_limit_exceeded: nil, unauthorized: nil, unprocessable_entity: nil, workspace_schemas: nil)
|
44
|
-
@content_type = content_type
|
45
|
-
@raw_response = raw_response
|
46
|
-
@status_code = status_code
|
47
|
-
@bad_request = bad_request
|
48
|
-
@conflict = conflict
|
49
|
-
@forbidden = forbidden
|
50
|
-
@internal_server_error = internal_server_error
|
51
|
-
@invite_expired = invite_expired
|
52
|
-
@not_found = not_found
|
53
|
-
@rate_limit_exceeded = rate_limit_exceeded
|
54
|
-
@unauthorized = unauthorized
|
55
|
-
@unprocessable_entity = unprocessable_entity
|
56
|
-
@workspace_schemas = workspace_schemas
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|