dub 0.0.7 → 0.1.1
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 +8 -222
- 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/createtag_requestbody.rb +10 -5
- data/lib/open_api_sdk/models/operations/updatetag_color.rb +24 -0
- data/lib/open_api_sdk/models/operations/{transferdomain_request.rb → updatetag_request.rb} +7 -7
- data/lib/open_api_sdk/models/operations/updatetag_requestbody.rb +32 -0
- data/lib/open_api_sdk/models/operations/{transferdomain_response.rb → updatetag_response.rb} +6 -6
- data/lib/open_api_sdk/models/operations/updateworkspace_request.rb +24 -0
- data/lib/open_api_sdk/models/operations/{setprimarydomain_response.rb → updateworkspace_response.rb} +6 -6
- data/lib/open_api_sdk/models/operations.rb +6 -5
- data/lib/open_api_sdk/sdkconfiguration.rb +3 -3
- data/lib/open_api_sdk/tags.rb +97 -15
- data/lib/open_api_sdk/track.rb +6 -24
- data/lib/open_api_sdk/workspaces.rb +84 -6
- metadata +8 -7
- data/lib/open_api_sdk/models/operations/setprimarydomain_request.rb +0 -30
- data/lib/open_api_sdk/models/operations/transferdomain_requestbody.rb +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f179087d52fe52557cc9d32424bac94b2bc98207ec401f8cb45d5eb96b125fb
|
4
|
+
data.tar.gz: fc1cdd3ae34276c09e5182e561623e86edd683c35c97a99e13673ef92d725bab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5046dfa213fd07dabcef7879c3ac82d53c110afd617c190436e456d95e2d57d6108bbda82fadfe3be4011edd649840bbc1f60a1e607bfcbf730e86be3241b957
|
7
|
+
data.tar.gz: 4693ef6a5d321180e00ca999cd04b8d60cf8aec94fbda4f5988fc86f602a1d745f3929e656386d88a055deea615ad447cf50edb09cc1ed428987a040c9ec9105
|
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(
|
@@ -383,195 +359,5 @@ module OpenApiSDK
|
|
383
359
|
end
|
384
360
|
res
|
385
361
|
end
|
386
|
-
|
387
|
-
|
388
|
-
sig { params(slug: ::String, workspace_id: T.nilable(::String), project_slug: T.nilable(::String)).returns(::OpenApiSDK::Operations::SetPrimaryDomainResponse) }
|
389
|
-
def set_primary(slug, workspace_id = nil, project_slug = nil)
|
390
|
-
# set_primary - Set a domain as primary
|
391
|
-
# 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
|
-
url, params = @sdk_configuration.get_server_details
|
399
|
-
base_url = Utils.template_url(url, params)
|
400
|
-
url = Utils.generate_url(
|
401
|
-
::OpenApiSDK::Operations::SetPrimaryDomainRequest,
|
402
|
-
base_url,
|
403
|
-
'/domains/{slug}/primary',
|
404
|
-
request,
|
405
|
-
@sdk_configuration.globals
|
406
|
-
)
|
407
|
-
headers = {}
|
408
|
-
query_params = Utils.get_query_params(::OpenApiSDK::Operations::SetPrimaryDomainRequest, request, @sdk_configuration.globals)
|
409
|
-
headers['Accept'] = 'application/json'
|
410
|
-
headers['user-agent'] = @sdk_configuration.user_agent
|
411
|
-
|
412
|
-
r = @sdk_configuration.client.post(url) do |req|
|
413
|
-
req.headers = headers
|
414
|
-
req.params = query_params
|
415
|
-
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
416
|
-
end
|
417
|
-
|
418
|
-
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
419
|
-
|
420
|
-
res = ::OpenApiSDK::Operations::SetPrimaryDomainResponse.new(
|
421
|
-
status_code: r.status, content_type: content_type, raw_response: r
|
422
|
-
)
|
423
|
-
if r.status == 200
|
424
|
-
if Utils.match_content_type(content_type, 'application/json')
|
425
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::DomainSchema)
|
426
|
-
res.domain_schema = out
|
427
|
-
end
|
428
|
-
elsif r.status == 400
|
429
|
-
if Utils.match_content_type(content_type, 'application/json')
|
430
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
|
431
|
-
res.bad_request = out
|
432
|
-
end
|
433
|
-
elsif r.status == 401
|
434
|
-
if Utils.match_content_type(content_type, 'application/json')
|
435
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
|
436
|
-
res.unauthorized = out
|
437
|
-
end
|
438
|
-
elsif r.status == 403
|
439
|
-
if Utils.match_content_type(content_type, 'application/json')
|
440
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
|
441
|
-
res.forbidden = out
|
442
|
-
end
|
443
|
-
elsif r.status == 404
|
444
|
-
if Utils.match_content_type(content_type, 'application/json')
|
445
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
|
446
|
-
res.not_found = out
|
447
|
-
end
|
448
|
-
elsif r.status == 409
|
449
|
-
if Utils.match_content_type(content_type, 'application/json')
|
450
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
|
451
|
-
res.conflict = out
|
452
|
-
end
|
453
|
-
elsif r.status == 410
|
454
|
-
if Utils.match_content_type(content_type, 'application/json')
|
455
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
|
456
|
-
res.invite_expired = out
|
457
|
-
end
|
458
|
-
elsif r.status == 422
|
459
|
-
if Utils.match_content_type(content_type, 'application/json')
|
460
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
|
461
|
-
res.unprocessable_entity = out
|
462
|
-
end
|
463
|
-
elsif r.status == 429
|
464
|
-
if Utils.match_content_type(content_type, 'application/json')
|
465
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
|
466
|
-
res.rate_limit_exceeded = out
|
467
|
-
end
|
468
|
-
elsif r.status == 500
|
469
|
-
if Utils.match_content_type(content_type, 'application/json')
|
470
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
|
471
|
-
res.internal_server_error = out
|
472
|
-
end
|
473
|
-
end
|
474
|
-
res
|
475
|
-
end
|
476
|
-
|
477
|
-
|
478
|
-
sig { params(slug: ::String, workspace_id: T.nilable(::String), project_slug: T.nilable(::String), request_body: T.nilable(::OpenApiSDK::Operations::TransferDomainRequestBody)).returns(::OpenApiSDK::Operations::TransferDomainResponse) }
|
479
|
-
def transfer(slug, workspace_id = nil, project_slug = nil, request_body = nil)
|
480
|
-
# transfer - Transfer a domain
|
481
|
-
# 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
|
-
url, params = @sdk_configuration.get_server_details
|
490
|
-
base_url = Utils.template_url(url, params)
|
491
|
-
url = Utils.generate_url(
|
492
|
-
::OpenApiSDK::Operations::TransferDomainRequest,
|
493
|
-
base_url,
|
494
|
-
'/domains/{slug}/transfer',
|
495
|
-
request,
|
496
|
-
@sdk_configuration.globals
|
497
|
-
)
|
498
|
-
headers = {}
|
499
|
-
req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :json)
|
500
|
-
headers['content-type'] = req_content_type
|
501
|
-
query_params = Utils.get_query_params(::OpenApiSDK::Operations::TransferDomainRequest, request, @sdk_configuration.globals)
|
502
|
-
headers['Accept'] = 'application/json'
|
503
|
-
headers['user-agent'] = @sdk_configuration.user_agent
|
504
|
-
|
505
|
-
r = @sdk_configuration.client.post(url) do |req|
|
506
|
-
req.headers = headers
|
507
|
-
req.params = query_params
|
508
|
-
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
509
|
-
if form
|
510
|
-
req.body = Utils.encode_form(form)
|
511
|
-
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
512
|
-
req.body = URI.encode_www_form(data)
|
513
|
-
else
|
514
|
-
req.body = data
|
515
|
-
end
|
516
|
-
end
|
517
|
-
|
518
|
-
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
519
|
-
|
520
|
-
res = ::OpenApiSDK::Operations::TransferDomainResponse.new(
|
521
|
-
status_code: r.status, content_type: content_type, raw_response: r
|
522
|
-
)
|
523
|
-
if r.status == 200
|
524
|
-
if Utils.match_content_type(content_type, 'application/json')
|
525
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::DomainSchema)
|
526
|
-
res.domain_schema = out
|
527
|
-
end
|
528
|
-
elsif r.status == 400
|
529
|
-
if Utils.match_content_type(content_type, 'application/json')
|
530
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
|
531
|
-
res.bad_request = out
|
532
|
-
end
|
533
|
-
elsif r.status == 401
|
534
|
-
if Utils.match_content_type(content_type, 'application/json')
|
535
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
|
536
|
-
res.unauthorized = out
|
537
|
-
end
|
538
|
-
elsif r.status == 403
|
539
|
-
if Utils.match_content_type(content_type, 'application/json')
|
540
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
|
541
|
-
res.forbidden = out
|
542
|
-
end
|
543
|
-
elsif r.status == 404
|
544
|
-
if Utils.match_content_type(content_type, 'application/json')
|
545
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
|
546
|
-
res.not_found = out
|
547
|
-
end
|
548
|
-
elsif r.status == 409
|
549
|
-
if Utils.match_content_type(content_type, 'application/json')
|
550
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
|
551
|
-
res.conflict = out
|
552
|
-
end
|
553
|
-
elsif r.status == 410
|
554
|
-
if Utils.match_content_type(content_type, 'application/json')
|
555
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
|
556
|
-
res.invite_expired = out
|
557
|
-
end
|
558
|
-
elsif r.status == 422
|
559
|
-
if Utils.match_content_type(content_type, 'application/json')
|
560
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
|
561
|
-
res.unprocessable_entity = out
|
562
|
-
end
|
563
|
-
elsif r.status == 429
|
564
|
-
if Utils.match_content_type(content_type, 'application/json')
|
565
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
|
566
|
-
res.rate_limit_exceeded = out
|
567
|
-
end
|
568
|
-
elsif r.status == 500
|
569
|
-
if Utils.match_content_type(content_type, 'application/json')
|
570
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
|
571
|
-
res.internal_server_error = out
|
572
|
-
end
|
573
|
-
end
|
574
|
-
res
|
575
|
-
end
|
576
362
|
end
|
577
363
|
end
|
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"
|
@@ -11,16 +11,21 @@ module OpenApiSDK
|
|
11
11
|
class CreateTagRequestBody < ::OpenApiSDK::Utils::FieldAugmented
|
12
12
|
extend T::Sig
|
13
13
|
|
14
|
-
# The name of the tag to create.
|
15
|
-
field :tag, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tag') } }
|
16
14
|
# The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown.
|
17
15
|
field :color, T.nilable(::OpenApiSDK::Operations::Color), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('color'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Operations::Color, true) } }
|
16
|
+
# The name of the tag to create.
|
17
|
+
field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } }
|
18
|
+
# The name of the tag to create.
|
19
|
+
#
|
20
|
+
# @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
|
21
|
+
field :tag, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tag') } }
|
18
22
|
|
19
23
|
|
20
|
-
sig { params(
|
21
|
-
def initialize(
|
22
|
-
@tag = tag
|
24
|
+
sig { params(color: T.nilable(::OpenApiSDK::Operations::Color), name: T.nilable(::String), tag: T.nilable(::String)).void }
|
25
|
+
def initialize(color: nil, name: nil, tag: nil)
|
23
26
|
@color = color
|
27
|
+
@name = name
|
28
|
+
@tag = tag
|
24
29
|
end
|
25
30
|
end
|
26
31
|
end
|
@@ -0,0 +1,24 @@
|
|
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
|
+
# UpdateTagColor - The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown.
|
11
|
+
class UpdateTagColor < T::Enum
|
12
|
+
enums do
|
13
|
+
RED = new('red')
|
14
|
+
YELLOW = new('yellow')
|
15
|
+
GREEN = new('green')
|
16
|
+
BLUE = new('blue')
|
17
|
+
PURPLE = new('purple')
|
18
|
+
PINK = new('pink')
|
19
|
+
BROWN = new('brown')
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
@@ -8,22 +8,22 @@ module OpenApiSDK
|
|
8
8
|
module Operations
|
9
9
|
|
10
10
|
|
11
|
-
class
|
11
|
+
class UpdateTagRequest < ::OpenApiSDK::Utils::FieldAugmented
|
12
12
|
extend T::Sig
|
13
13
|
|
14
|
-
# The
|
15
|
-
field :
|
14
|
+
# The ID of the tag
|
15
|
+
field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } }
|
16
16
|
# The slug of the project. This field is deprecated – use `workspaceId` instead.
|
17
17
|
field :project_slug, T.nilable(::String), { 'query_param': { 'field_name': 'projectSlug', 'style': 'form', 'explode': true } }
|
18
18
|
|
19
|
-
field :request_body, T.nilable(::OpenApiSDK::Operations::
|
19
|
+
field :request_body, T.nilable(::OpenApiSDK::Operations::UpdateTagRequestBody), { 'request': { 'media_type': 'application/json' } }
|
20
20
|
# The ID of the workspace.
|
21
21
|
field :workspace_id, T.nilable(::String), { 'query_param': { 'field_name': 'workspaceId', 'style': 'form', 'explode': true } }
|
22
22
|
|
23
23
|
|
24
|
-
sig { params(
|
25
|
-
def initialize(
|
26
|
-
@
|
24
|
+
sig { params(id: ::String, project_slug: T.nilable(::String), request_body: T.nilable(::OpenApiSDK::Operations::UpdateTagRequestBody), workspace_id: T.nilable(::String)).void }
|
25
|
+
def initialize(id: nil, project_slug: nil, request_body: nil, workspace_id: nil)
|
26
|
+
@id = id
|
27
27
|
@project_slug = project_slug
|
28
28
|
@request_body = request_body
|
29
29
|
@workspace_id = workspace_id
|
@@ -0,0 +1,32 @@
|
|
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 UpdateTagRequestBody < ::OpenApiSDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown.
|
15
|
+
field :color, T.nilable(::OpenApiSDK::Operations::UpdateTagColor), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('color'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Operations::UpdateTagColor, true) } }
|
16
|
+
# The name of the tag to create.
|
17
|
+
field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } }
|
18
|
+
# The name of the tag to create.
|
19
|
+
#
|
20
|
+
# @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
|
21
|
+
field :tag, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tag') } }
|
22
|
+
|
23
|
+
|
24
|
+
sig { params(color: T.nilable(::OpenApiSDK::Operations::UpdateTagColor), name: T.nilable(::String), tag: T.nilable(::String)).void }
|
25
|
+
def initialize(color: nil, name: nil, tag: nil)
|
26
|
+
@color = color
|
27
|
+
@name = name
|
28
|
+
@tag = tag
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/open_api_sdk/models/operations/{transferdomain_response.rb → updatetag_response.rb}
RENAMED
@@ -8,7 +8,7 @@ module OpenApiSDK
|
|
8
8
|
module Operations
|
9
9
|
|
10
10
|
|
11
|
-
class
|
11
|
+
class UpdateTagResponse < ::OpenApiSDK::Utils::FieldAugmented
|
12
12
|
extend T::Sig
|
13
13
|
|
14
14
|
# HTTP response content type for this operation
|
@@ -21,8 +21,6 @@ module OpenApiSDK
|
|
21
21
|
field :bad_request, T.nilable(::OpenApiSDK::Shared::BadRequest)
|
22
22
|
# This response is sent when a request conflicts with the current state of the server.
|
23
23
|
field :conflict, T.nilable(::OpenApiSDK::Shared::Conflict)
|
24
|
-
# The domain transfer initiated
|
25
|
-
field :domain_schema, T.nilable(::OpenApiSDK::Shared::DomainSchema)
|
26
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.
|
27
25
|
field :forbidden, T.nilable(::OpenApiSDK::Shared::Forbidden)
|
28
26
|
# The server has encountered a situation it does not know how to handle.
|
@@ -33,25 +31,27 @@ module OpenApiSDK
|
|
33
31
|
field :not_found, T.nilable(::OpenApiSDK::Shared::NotFound)
|
34
32
|
# The user has sent too many requests in a given amount of time ("rate limiting")
|
35
33
|
field :rate_limit_exceeded, T.nilable(::OpenApiSDK::Shared::RateLimitExceeded)
|
34
|
+
# The updated tag.
|
35
|
+
field :tag_schema, T.nilable(::OpenApiSDK::Shared::TagSchema)
|
36
36
|
# Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.
|
37
37
|
field :unauthorized, T.nilable(::OpenApiSDK::Shared::Unauthorized)
|
38
38
|
# The request was well-formed but was unable to be followed due to semantic errors.
|
39
39
|
field :unprocessable_entity, T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)
|
40
40
|
|
41
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),
|
43
|
-
def initialize(content_type: nil, raw_response: nil, status_code: nil, bad_request: nil, conflict: nil,
|
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), tag_schema: T.nilable(::OpenApiSDK::Shared::TagSchema), unauthorized: T.nilable(::OpenApiSDK::Shared::Unauthorized), unprocessable_entity: T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)).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, tag_schema: nil, unauthorized: nil, unprocessable_entity: nil)
|
44
44
|
@content_type = content_type
|
45
45
|
@raw_response = raw_response
|
46
46
|
@status_code = status_code
|
47
47
|
@bad_request = bad_request
|
48
48
|
@conflict = conflict
|
49
|
-
@domain_schema = domain_schema
|
50
49
|
@forbidden = forbidden
|
51
50
|
@internal_server_error = internal_server_error
|
52
51
|
@invite_expired = invite_expired
|
53
52
|
@not_found = not_found
|
54
53
|
@rate_limit_exceeded = rate_limit_exceeded
|
54
|
+
@tag_schema = tag_schema
|
55
55
|
@unauthorized = unauthorized
|
56
56
|
@unprocessable_entity = unprocessable_entity
|
57
57
|
end
|
@@ -0,0 +1,24 @@
|
|
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 UpdateWorkspaceRequest < ::OpenApiSDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# The ID or slug of the workspace.
|
15
|
+
field :id_or_slug, ::String, { 'path_param': { 'field_name': 'idOrSlug', 'style': 'simple', 'explode': false } }
|
16
|
+
|
17
|
+
|
18
|
+
sig { params(id_or_slug: ::String).void }
|
19
|
+
def initialize(id_or_slug: nil)
|
20
|
+
@id_or_slug = id_or_slug
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/open_api_sdk/models/operations/{setprimarydomain_response.rb → updateworkspace_response.rb}
RENAMED
@@ -8,7 +8,7 @@ module OpenApiSDK
|
|
8
8
|
module Operations
|
9
9
|
|
10
10
|
|
11
|
-
class
|
11
|
+
class UpdateWorkspaceResponse < ::OpenApiSDK::Utils::FieldAugmented
|
12
12
|
extend T::Sig
|
13
13
|
|
14
14
|
# HTTP response content type for this operation
|
@@ -21,8 +21,6 @@ module OpenApiSDK
|
|
21
21
|
field :bad_request, T.nilable(::OpenApiSDK::Shared::BadRequest)
|
22
22
|
# This response is sent when a request conflicts with the current state of the server.
|
23
23
|
field :conflict, T.nilable(::OpenApiSDK::Shared::Conflict)
|
24
|
-
# The domain was set as primary
|
25
|
-
field :domain_schema, T.nilable(::OpenApiSDK::Shared::DomainSchema)
|
26
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.
|
27
25
|
field :forbidden, T.nilable(::OpenApiSDK::Shared::Forbidden)
|
28
26
|
# The server has encountered a situation it does not know how to handle.
|
@@ -37,16 +35,17 @@ module OpenApiSDK
|
|
37
35
|
field :unauthorized, T.nilable(::OpenApiSDK::Shared::Unauthorized)
|
38
36
|
# The request was well-formed but was unable to be followed due to semantic errors.
|
39
37
|
field :unprocessable_entity, T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)
|
38
|
+
# The updated workspace.
|
39
|
+
field :workspace_schema, T.nilable(::OpenApiSDK::Shared::WorkspaceSchema)
|
40
40
|
|
41
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),
|
43
|
-
def initialize(content_type: nil, raw_response: nil, status_code: nil, bad_request: nil, conflict: nil,
|
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
44
|
@content_type = content_type
|
45
45
|
@raw_response = raw_response
|
46
46
|
@status_code = status_code
|
47
47
|
@bad_request = bad_request
|
48
48
|
@conflict = conflict
|
49
|
-
@domain_schema = domain_schema
|
50
49
|
@forbidden = forbidden
|
51
50
|
@internal_server_error = internal_server_error
|
52
51
|
@invite_expired = invite_expired
|
@@ -54,6 +53,7 @@ module OpenApiSDK
|
|
54
53
|
@rate_limit_exceeded = rate_limit_exceeded
|
55
54
|
@unauthorized = unauthorized
|
56
55
|
@unprocessable_entity = unprocessable_entity
|
56
|
+
@workspace_schema = workspace_schema
|
57
57
|
end
|
58
58
|
end
|
59
59
|
end
|
@@ -37,12 +37,18 @@ module OpenApiSDK
|
|
37
37
|
autoload :RetrieveAnalyticsResponse, 'open_api_sdk/models/operations/retrieveanalytics_response.rb'
|
38
38
|
autoload :GetWorkspaceRequest, 'open_api_sdk/models/operations/getworkspace_request.rb'
|
39
39
|
autoload :GetWorkspaceResponse, 'open_api_sdk/models/operations/getworkspace_response.rb'
|
40
|
+
autoload :UpdateWorkspaceRequest, 'open_api_sdk/models/operations/updateworkspace_request.rb'
|
41
|
+
autoload :UpdateWorkspaceResponse, 'open_api_sdk/models/operations/updateworkspace_response.rb'
|
40
42
|
autoload :GetTagsRequest, 'open_api_sdk/models/operations/gettags_request.rb'
|
41
43
|
autoload :GetTagsResponse, 'open_api_sdk/models/operations/gettags_response.rb'
|
42
44
|
autoload :Color, 'open_api_sdk/models/operations/color.rb'
|
43
45
|
autoload :CreateTagRequestBody, 'open_api_sdk/models/operations/createtag_requestbody.rb'
|
44
46
|
autoload :CreateTagRequest, 'open_api_sdk/models/operations/createtag_request.rb'
|
45
47
|
autoload :CreateTagResponse, 'open_api_sdk/models/operations/createtag_response.rb'
|
48
|
+
autoload :UpdateTagColor, 'open_api_sdk/models/operations/updatetag_color.rb'
|
49
|
+
autoload :UpdateTagRequestBody, 'open_api_sdk/models/operations/updatetag_requestbody.rb'
|
50
|
+
autoload :UpdateTagRequest, 'open_api_sdk/models/operations/updatetag_request.rb'
|
51
|
+
autoload :UpdateTagResponse, 'open_api_sdk/models/operations/updatetag_response.rb'
|
46
52
|
autoload :ListDomainsRequest, 'open_api_sdk/models/operations/listdomains_request.rb'
|
47
53
|
autoload :ListDomainsResponse, 'open_api_sdk/models/operations/listdomains_response.rb'
|
48
54
|
autoload :CreateDomainRequestBody, 'open_api_sdk/models/operations/createdomain_requestbody.rb'
|
@@ -54,11 +60,6 @@ module OpenApiSDK
|
|
54
60
|
autoload :UpdateDomainRequestBody, 'open_api_sdk/models/operations/updatedomain_requestbody.rb'
|
55
61
|
autoload :UpdateDomainRequest, 'open_api_sdk/models/operations/updatedomain_request.rb'
|
56
62
|
autoload :UpdateDomainResponse, 'open_api_sdk/models/operations/updatedomain_response.rb'
|
57
|
-
autoload :SetPrimaryDomainRequest, 'open_api_sdk/models/operations/setprimarydomain_request.rb'
|
58
|
-
autoload :SetPrimaryDomainResponse, 'open_api_sdk/models/operations/setprimarydomain_response.rb'
|
59
|
-
autoload :TransferDomainRequestBody, 'open_api_sdk/models/operations/transferdomain_requestbody.rb'
|
60
|
-
autoload :TransferDomainRequest, 'open_api_sdk/models/operations/transferdomain_request.rb'
|
61
|
-
autoload :TransferDomainResponse, 'open_api_sdk/models/operations/transferdomain_response.rb'
|
62
63
|
autoload :TrackLeadRequestBody, 'open_api_sdk/models/operations/tracklead_requestbody.rb'
|
63
64
|
autoload :TrackLeadRequest, 'open_api_sdk/models/operations/tracklead_request.rb'
|
64
65
|
autoload :TrackLeadResponseBody, 'open_api_sdk/models/operations/tracklead_responsebody.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.
|
44
|
-
@gen_version = '2.
|
45
|
-
@user_agent = 'speakeasy-sdk/ruby 0.
|
43
|
+
@sdk_version = '0.1.1'
|
44
|
+
@gen_version = '2.356.0'
|
45
|
+
@user_agent = 'speakeasy-sdk/ruby 0.1.1 2.356.0 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"
|
@@ -193,5 +182,98 @@ module OpenApiSDK
|
|
193
182
|
end
|
194
183
|
res
|
195
184
|
end
|
185
|
+
|
186
|
+
|
187
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::UpdateTagRequest)).returns(::OpenApiSDK::Operations::UpdateTagResponse) }
|
188
|
+
def update(request)
|
189
|
+
# update - Update a tag
|
190
|
+
# Update a tag in the workspace.
|
191
|
+
url, params = @sdk_configuration.get_server_details
|
192
|
+
base_url = Utils.template_url(url, params)
|
193
|
+
url = Utils.generate_url(
|
194
|
+
::OpenApiSDK::Operations::UpdateTagRequest,
|
195
|
+
base_url,
|
196
|
+
'/tags/{id}',
|
197
|
+
request,
|
198
|
+
@sdk_configuration.globals
|
199
|
+
)
|
200
|
+
headers = {}
|
201
|
+
req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :json)
|
202
|
+
headers['content-type'] = req_content_type
|
203
|
+
query_params = Utils.get_query_params(::OpenApiSDK::Operations::UpdateTagRequest, request, @sdk_configuration.globals)
|
204
|
+
headers['Accept'] = 'application/json'
|
205
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
206
|
+
|
207
|
+
r = @sdk_configuration.client.patch(url) do |req|
|
208
|
+
req.headers = headers
|
209
|
+
req.params = query_params
|
210
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
211
|
+
if form
|
212
|
+
req.body = Utils.encode_form(form)
|
213
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
214
|
+
req.body = URI.encode_www_form(data)
|
215
|
+
else
|
216
|
+
req.body = data
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
221
|
+
|
222
|
+
res = ::OpenApiSDK::Operations::UpdateTagResponse.new(
|
223
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
224
|
+
)
|
225
|
+
if r.status == 200
|
226
|
+
if Utils.match_content_type(content_type, 'application/json')
|
227
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::TagSchema)
|
228
|
+
res.tag_schema = out
|
229
|
+
end
|
230
|
+
elsif r.status == 400
|
231
|
+
if Utils.match_content_type(content_type, 'application/json')
|
232
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
|
233
|
+
res.bad_request = out
|
234
|
+
end
|
235
|
+
elsif r.status == 401
|
236
|
+
if Utils.match_content_type(content_type, 'application/json')
|
237
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
|
238
|
+
res.unauthorized = out
|
239
|
+
end
|
240
|
+
elsif r.status == 403
|
241
|
+
if Utils.match_content_type(content_type, 'application/json')
|
242
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
|
243
|
+
res.forbidden = out
|
244
|
+
end
|
245
|
+
elsif r.status == 404
|
246
|
+
if Utils.match_content_type(content_type, 'application/json')
|
247
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
|
248
|
+
res.not_found = out
|
249
|
+
end
|
250
|
+
elsif r.status == 409
|
251
|
+
if Utils.match_content_type(content_type, 'application/json')
|
252
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
|
253
|
+
res.conflict = out
|
254
|
+
end
|
255
|
+
elsif r.status == 410
|
256
|
+
if Utils.match_content_type(content_type, 'application/json')
|
257
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
|
258
|
+
res.invite_expired = out
|
259
|
+
end
|
260
|
+
elsif r.status == 422
|
261
|
+
if Utils.match_content_type(content_type, 'application/json')
|
262
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
|
263
|
+
res.unprocessable_entity = out
|
264
|
+
end
|
265
|
+
elsif r.status == 429
|
266
|
+
if Utils.match_content_type(content_type, 'application/json')
|
267
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
|
268
|
+
res.rate_limit_exceeded = out
|
269
|
+
end
|
270
|
+
elsif r.status == 500
|
271
|
+
if Utils.match_content_type(content_type, 'application/json')
|
272
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
|
273
|
+
res.internal_server_error = out
|
274
|
+
end
|
275
|
+
end
|
276
|
+
res
|
277
|
+
end
|
196
278
|
end
|
197
279
|
end
|
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,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::GetWorkspaceRequest)).returns(::OpenApiSDK::Operations::GetWorkspaceResponse) }
|
23
|
+
def get(request)
|
24
24
|
# get - Retrieve a workspace
|
25
25
|
# Retrieve a workspace for the authenticated user.
|
26
|
-
request = ::OpenApiSDK::Operations::GetWorkspaceRequest.new(
|
27
|
-
|
28
|
-
id_or_slug: id_or_slug
|
29
|
-
)
|
30
26
|
url, params = @sdk_configuration.get_server_details
|
31
27
|
base_url = Utils.template_url(url, params)
|
32
28
|
url = Utils.generate_url(
|
@@ -103,5 +99,87 @@ module OpenApiSDK
|
|
103
99
|
end
|
104
100
|
res
|
105
101
|
end
|
102
|
+
|
103
|
+
|
104
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::UpdateWorkspaceRequest)).returns(::OpenApiSDK::Operations::UpdateWorkspaceResponse) }
|
105
|
+
def update(request)
|
106
|
+
# update - Update a workspace
|
107
|
+
# Update a workspace by ID or slug.
|
108
|
+
url, params = @sdk_configuration.get_server_details
|
109
|
+
base_url = Utils.template_url(url, params)
|
110
|
+
url = Utils.generate_url(
|
111
|
+
::OpenApiSDK::Operations::UpdateWorkspaceRequest,
|
112
|
+
base_url,
|
113
|
+
'/workspaces/{idOrSlug}',
|
114
|
+
request,
|
115
|
+
@sdk_configuration.globals
|
116
|
+
)
|
117
|
+
headers = {}
|
118
|
+
headers['Accept'] = 'application/json'
|
119
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
120
|
+
|
121
|
+
r = @sdk_configuration.client.patch(url) do |req|
|
122
|
+
req.headers = headers
|
123
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
124
|
+
end
|
125
|
+
|
126
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
127
|
+
|
128
|
+
res = ::OpenApiSDK::Operations::UpdateWorkspaceResponse.new(
|
129
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
130
|
+
)
|
131
|
+
if r.status == 200
|
132
|
+
if Utils.match_content_type(content_type, 'application/json')
|
133
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::WorkspaceSchema)
|
134
|
+
res.workspace_schema = out
|
135
|
+
end
|
136
|
+
elsif r.status == 400
|
137
|
+
if Utils.match_content_type(content_type, 'application/json')
|
138
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
|
139
|
+
res.bad_request = out
|
140
|
+
end
|
141
|
+
elsif r.status == 401
|
142
|
+
if Utils.match_content_type(content_type, 'application/json')
|
143
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
|
144
|
+
res.unauthorized = out
|
145
|
+
end
|
146
|
+
elsif r.status == 403
|
147
|
+
if Utils.match_content_type(content_type, 'application/json')
|
148
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
|
149
|
+
res.forbidden = out
|
150
|
+
end
|
151
|
+
elsif r.status == 404
|
152
|
+
if Utils.match_content_type(content_type, 'application/json')
|
153
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
|
154
|
+
res.not_found = out
|
155
|
+
end
|
156
|
+
elsif r.status == 409
|
157
|
+
if Utils.match_content_type(content_type, 'application/json')
|
158
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
|
159
|
+
res.conflict = out
|
160
|
+
end
|
161
|
+
elsif r.status == 410
|
162
|
+
if Utils.match_content_type(content_type, 'application/json')
|
163
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
|
164
|
+
res.invite_expired = out
|
165
|
+
end
|
166
|
+
elsif r.status == 422
|
167
|
+
if Utils.match_content_type(content_type, 'application/json')
|
168
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
|
169
|
+
res.unprocessable_entity = out
|
170
|
+
end
|
171
|
+
elsif r.status == 429
|
172
|
+
if Utils.match_content_type(content_type, 'application/json')
|
173
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
|
174
|
+
res.rate_limit_exceeded = out
|
175
|
+
end
|
176
|
+
elsif r.status == 500
|
177
|
+
if Utils.match_content_type(content_type, 'application/json')
|
178
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
|
179
|
+
res.internal_server_error = out
|
180
|
+
end
|
181
|
+
end
|
182
|
+
res
|
183
|
+
end
|
106
184
|
end
|
107
185
|
end
|
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.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dub
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -192,8 +192,6 @@ files:
|
|
192
192
|
- lib/open_api_sdk/models/operations/requestbody.rb
|
193
193
|
- lib/open_api_sdk/models/operations/retrieveanalytics_request.rb
|
194
194
|
- lib/open_api_sdk/models/operations/retrieveanalytics_response.rb
|
195
|
-
- lib/open_api_sdk/models/operations/setprimarydomain_request.rb
|
196
|
-
- lib/open_api_sdk/models/operations/setprimarydomain_response.rb
|
197
195
|
- lib/open_api_sdk/models/operations/sort.rb
|
198
196
|
- lib/open_api_sdk/models/operations/trackcustomer_request.rb
|
199
197
|
- lib/open_api_sdk/models/operations/trackcustomer_requestbody.rb
|
@@ -207,15 +205,18 @@ files:
|
|
207
205
|
- lib/open_api_sdk/models/operations/tracksale_requestbody.rb
|
208
206
|
- lib/open_api_sdk/models/operations/tracksale_response.rb
|
209
207
|
- lib/open_api_sdk/models/operations/tracksale_responsebody.rb
|
210
|
-
- lib/open_api_sdk/models/operations/transferdomain_request.rb
|
211
|
-
- lib/open_api_sdk/models/operations/transferdomain_requestbody.rb
|
212
|
-
- lib/open_api_sdk/models/operations/transferdomain_response.rb
|
213
208
|
- lib/open_api_sdk/models/operations/updatedomain_request.rb
|
214
209
|
- lib/open_api_sdk/models/operations/updatedomain_requestbody.rb
|
215
210
|
- lib/open_api_sdk/models/operations/updatedomain_response.rb
|
216
211
|
- lib/open_api_sdk/models/operations/updatelink_request.rb
|
217
212
|
- lib/open_api_sdk/models/operations/updatelink_requestbody.rb
|
218
213
|
- lib/open_api_sdk/models/operations/updatelink_response.rb
|
214
|
+
- lib/open_api_sdk/models/operations/updatetag_color.rb
|
215
|
+
- lib/open_api_sdk/models/operations/updatetag_request.rb
|
216
|
+
- lib/open_api_sdk/models/operations/updatetag_requestbody.rb
|
217
|
+
- lib/open_api_sdk/models/operations/updatetag_response.rb
|
218
|
+
- lib/open_api_sdk/models/operations/updateworkspace_request.rb
|
219
|
+
- lib/open_api_sdk/models/operations/updateworkspace_response.rb
|
219
220
|
- lib/open_api_sdk/models/operations/upsertlink_request.rb
|
220
221
|
- lib/open_api_sdk/models/operations/upsertlink_requestbody.rb
|
221
222
|
- lib/open_api_sdk/models/operations/upsertlink_response.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 SetPrimaryDomainRequest < ::OpenApiSDK::Utils::FieldAugmented
|
12
|
-
extend T::Sig
|
13
|
-
|
14
|
-
# The domain name.
|
15
|
-
field :slug, ::String, { 'path_param': { 'field_name': 'slug', 'style': 'simple', 'explode': false } }
|
16
|
-
# The slug of the project. This field is deprecated – use `workspaceId` instead.
|
17
|
-
field :project_slug, T.nilable(::String), { 'query_param': { 'field_name': 'projectSlug', 'style': 'form', 'explode': true } }
|
18
|
-
# The ID of the workspace.
|
19
|
-
field :workspace_id, T.nilable(::String), { 'query_param': { 'field_name': 'workspaceId', 'style': 'form', 'explode': true } }
|
20
|
-
|
21
|
-
|
22
|
-
sig { params(slug: ::String, project_slug: T.nilable(::String), workspace_id: T.nilable(::String)).void }
|
23
|
-
def initialize(slug: nil, project_slug: nil, workspace_id: nil)
|
24
|
-
@slug = slug
|
25
|
-
@project_slug = project_slug
|
26
|
-
@workspace_id = workspace_id
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,24 +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 TransferDomainRequestBody < ::OpenApiSDK::Utils::FieldAugmented
|
12
|
-
extend T::Sig
|
13
|
-
|
14
|
-
# The ID of the new workspace to transfer the domain to.
|
15
|
-
field :new_workspace_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('newWorkspaceId') } }
|
16
|
-
|
17
|
-
|
18
|
-
sig { params(new_workspace_id: ::String).void }
|
19
|
-
def initialize(new_workspace_id: nil)
|
20
|
-
@new_workspace_id = new_workspace_id
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|