dub 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f179087d52fe52557cc9d32424bac94b2bc98207ec401f8cb45d5eb96b125fb
4
- data.tar.gz: fc1cdd3ae34276c09e5182e561623e86edd683c35c97a99e13673ef92d725bab
3
+ metadata.gz: 3975702865ea143cf56d7280d88cf0fc0012147949fb3abb71e4d91473f0ed24
4
+ data.tar.gz: d2a14b6200284af600a437ece8d51fa1ff239ee6d9e252025f64ed99defdaf30
5
5
  SHA512:
6
- metadata.gz: 5046dfa213fd07dabcef7879c3ac82d53c110afd617c190436e456d95e2d57d6108bbda82fadfe3be4011edd649840bbc1f60a1e607bfcbf730e86be3241b957
7
- data.tar.gz: 4693ef6a5d321180e00ca999cd04b8d60cf8aec94fbda4f5988fc86f602a1d745f3929e656386d88a055deea615ad447cf50edb09cc1ed428987a040c9ec9105
6
+ metadata.gz: a9f5e8eb2502c8efafd64cb32236001d2e67a4c08726831950bb352e23b95bcfdbafb5de85ea9b6a3d0dfe5dc723372d8ce27001e4fef742f5ee83df63171f83
7
+ data.tar.gz: 21d7013298bfebebe6e425e0bb2899130ac871a94cd6c28f8dd88b4840f7a0fb16e9eb2e022d8673e317a0e2d3a5bb9e164f2b427469149a7568a25c89e7d7e3
@@ -604,6 +604,91 @@ module OpenApiSDK
604
604
  end
605
605
 
606
606
 
607
+ sig { params(request: T.nilable(::OpenApiSDK::Operations::BulkUpdateLinksRequestBody)).returns(::OpenApiSDK::Operations::BulkUpdateLinksResponse) }
608
+ def update_many(request)
609
+ # update_many - Bulk update links
610
+ # Bulk update up to 100 links with the same data for the authenticated workspace.
611
+ url, params = @sdk_configuration.get_server_details
612
+ base_url = Utils.template_url(url, params)
613
+ url = "#{base_url}/links/bulk"
614
+ headers = {}
615
+ req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
616
+ headers['content-type'] = req_content_type
617
+ headers['Accept'] = 'application/json'
618
+ headers['user-agent'] = @sdk_configuration.user_agent
619
+
620
+ r = @sdk_configuration.client.patch(url) do |req|
621
+ req.headers = headers
622
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
623
+ if form
624
+ req.body = Utils.encode_form(form)
625
+ elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
626
+ req.body = URI.encode_www_form(data)
627
+ else
628
+ req.body = data
629
+ end
630
+ end
631
+
632
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
633
+
634
+ res = ::OpenApiSDK::Operations::BulkUpdateLinksResponse.new(
635
+ status_code: r.status, content_type: content_type, raw_response: r
636
+ )
637
+ if r.status == 200
638
+ if Utils.match_content_type(content_type, 'application/json')
639
+ out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::LinkSchema])
640
+ res.link_schemas = out
641
+ end
642
+ elsif r.status == 400
643
+ if Utils.match_content_type(content_type, 'application/json')
644
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
645
+ res.bad_request = out
646
+ end
647
+ elsif r.status == 401
648
+ if Utils.match_content_type(content_type, 'application/json')
649
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
650
+ res.unauthorized = out
651
+ end
652
+ elsif r.status == 403
653
+ if Utils.match_content_type(content_type, 'application/json')
654
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
655
+ res.forbidden = out
656
+ end
657
+ elsif r.status == 404
658
+ if Utils.match_content_type(content_type, 'application/json')
659
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
660
+ res.not_found = out
661
+ end
662
+ elsif r.status == 409
663
+ if Utils.match_content_type(content_type, 'application/json')
664
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
665
+ res.conflict = out
666
+ end
667
+ elsif r.status == 410
668
+ if Utils.match_content_type(content_type, 'application/json')
669
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
670
+ res.invite_expired = out
671
+ end
672
+ elsif r.status == 422
673
+ if Utils.match_content_type(content_type, 'application/json')
674
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
675
+ res.unprocessable_entity = out
676
+ end
677
+ elsif r.status == 429
678
+ if Utils.match_content_type(content_type, 'application/json')
679
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
680
+ res.rate_limit_exceeded = out
681
+ end
682
+ elsif r.status == 500
683
+ if Utils.match_content_type(content_type, 'application/json')
684
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
685
+ res.internal_server_error = out
686
+ end
687
+ end
688
+ res
689
+ end
690
+
691
+
607
692
  sig { params(request: T.nilable(::OpenApiSDK::Operations::UpsertLinkRequest)).returns(::OpenApiSDK::Operations::UpsertLinkResponse) }
608
693
  def upsert(request)
609
694
  # upsert - Upsert a link
@@ -0,0 +1,27 @@
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 BulkUpdateLinksRequestBody < ::OpenApiSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+
15
+ field :data, ::OpenApiSDK::Operations::Data, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data') } }
16
+
17
+ field :link_ids, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('linkIds') } }
18
+
19
+
20
+ sig { params(data: ::OpenApiSDK::Operations::Data, link_ids: T::Array[::String]).void }
21
+ def initialize(data: nil, link_ids: nil)
22
+ @data = data
23
+ @link_ids = link_ids
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,60 @@
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 BulkUpdateLinksResponse < ::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 updated links
31
+ field :link_schemas, T.nilable(T::Array[::OpenApiSDK::Shared::LinkSchema])
32
+ # The server cannot find the requested resource.
33
+ field :not_found, T.nilable(::OpenApiSDK::Shared::NotFound)
34
+ # The user has sent too many requests in a given amount of time ("rate limiting")
35
+ field :rate_limit_exceeded, T.nilable(::OpenApiSDK::Shared::RateLimitExceeded)
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
+ field :unauthorized, T.nilable(::OpenApiSDK::Shared::Unauthorized)
38
+ # The request was well-formed but was unable to be followed due to semantic errors.
39
+ field :unprocessable_entity, T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)
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), link_schemas: T.nilable(T::Array[::OpenApiSDK::Shared::LinkSchema]), 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)).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, link_schemas: nil, not_found: nil, rate_limit_exceeded: nil, unauthorized: nil, unprocessable_entity: 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
+ @link_schemas = link_schemas
53
+ @not_found = not_found
54
+ @rate_limit_exceeded = rate_limit_exceeded
55
+ @unauthorized = unauthorized
56
+ @unprocessable_entity = unprocessable_entity
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,83 @@
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 Data < ::OpenApiSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # The Android destination URL for the short link for Android device targeting.
15
+ field :android, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('android') } }
16
+ # Whether the short link is archived.
17
+ field :archived, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('archived') } }
18
+ # The comments for the short link.
19
+ field :comments, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('comments') } }
20
+ # The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
21
+ field :description, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } }
22
+ # Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex
23
+ field :do_index, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('doIndex') } }
24
+ # The URL to redirect to when the short link has expired.
25
+ field :expired_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expiredUrl') } }
26
+ # The date and time when the short link will expire at.
27
+ field :expires_at, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expiresAt') } }
28
+ # Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`.
29
+ field :geo, T.nilable(::OpenApiSDK::Shared::LinkGeoTargeting), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('geo') } }
30
+ # The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
31
+ field :image, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('image') } }
32
+ # The iOS destination URL for the short link for iOS device targeting.
33
+ field :ios, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ios') } }
34
+ # The password required to access the destination URL of the short link.
35
+ field :password, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('password') } }
36
+ # Whether the short link uses Custom Social Media Cards feature.
37
+ field :proxy, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('proxy') } }
38
+ # Whether the short link's stats are publicly accessible.
39
+ field :public_stats, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publicStats') } }
40
+ # Whether the short link uses link cloaking.
41
+ field :rewrite, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('rewrite') } }
42
+ # The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead.
43
+ #
44
+ # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
45
+ field :tag_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tagId') } }
46
+ # The unique IDs of the tags assigned to the short link.
47
+ field :tag_ids, T.nilable(::Object), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tagIds') } }
48
+ # The unique name of the tags assigned to the short link (case insensitive).
49
+ field :tag_names, T.nilable(::Object), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tagNames') } }
50
+ # The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
51
+ field :title, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('title') } }
52
+ # Whether to track conversions for the short link.
53
+ field :track_conversion, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('trackConversion') } }
54
+ # The destination URL of the short link.
55
+ field :url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } }
56
+
57
+
58
+ sig { params(android: T.nilable(::String), archived: T.nilable(T::Boolean), comments: T.nilable(::String), description: T.nilable(::String), do_index: T.nilable(T::Boolean), expired_url: T.nilable(::String), expires_at: T.nilable(::String), geo: T.nilable(::OpenApiSDK::Shared::LinkGeoTargeting), image: T.nilable(::String), ios: T.nilable(::String), password: T.nilable(::String), proxy: T.nilable(T::Boolean), public_stats: T.nilable(T::Boolean), rewrite: T.nilable(T::Boolean), tag_id: T.nilable(::String), tag_ids: T.nilable(::Object), tag_names: T.nilable(::Object), title: T.nilable(::String), track_conversion: T.nilable(T::Boolean), url: T.nilable(::String)).void }
59
+ def initialize(android: nil, archived: nil, comments: nil, description: nil, do_index: nil, expired_url: nil, expires_at: nil, geo: nil, image: nil, ios: nil, password: nil, proxy: nil, public_stats: nil, rewrite: nil, tag_id: nil, tag_ids: nil, tag_names: nil, title: nil, track_conversion: nil, url: nil)
60
+ @android = android
61
+ @archived = archived
62
+ @comments = comments
63
+ @description = description
64
+ @do_index = do_index
65
+ @expired_url = expired_url
66
+ @expires_at = expires_at
67
+ @geo = geo
68
+ @image = image
69
+ @ios = ios
70
+ @password = password
71
+ @proxy = proxy
72
+ @public_stats = public_stats
73
+ @rewrite = rewrite
74
+ @tag_id = tag_id
75
+ @tag_ids = tag_ids
76
+ @tag_names = tag_names
77
+ @title = title
78
+ @track_conversion = track_conversion
79
+ @url = url
80
+ end
81
+ end
82
+ end
83
+ end
@@ -24,6 +24,9 @@ module OpenApiSDK
24
24
  autoload :RequestBody, 'open_api_sdk/models/operations/requestbody.rb'
25
25
  autoload :BulkCreateLinksRequest, 'open_api_sdk/models/operations/bulkcreatelinks_request.rb'
26
26
  autoload :BulkCreateLinksResponse, 'open_api_sdk/models/operations/bulkcreatelinks_response.rb'
27
+ autoload :Data, 'open_api_sdk/models/operations/data.rb'
28
+ autoload :BulkUpdateLinksRequestBody, 'open_api_sdk/models/operations/bulkupdatelinks_requestbody.rb'
29
+ autoload :BulkUpdateLinksResponse, 'open_api_sdk/models/operations/bulkupdatelinks_response.rb'
27
30
  autoload :UpsertLinkRequestBody, 'open_api_sdk/models/operations/upsertlink_requestbody.rb'
28
31
  autoload :UpsertLinkRequest, 'open_api_sdk/models/operations/upsertlink_request.rb'
29
32
  autoload :UpsertLinkResponse, 'open_api_sdk/models/operations/upsertlink_response.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.1.1'
44
- @gen_version = '2.356.0'
45
- @user_agent = 'speakeasy-sdk/ruby 0.1.1 2.356.0 0.0.1 dub'
43
+ @sdk_version = '0.1.2'
44
+ @gen_version = '2.359.0'
45
+ @user_agent = 'speakeasy-sdk/ruby 0.1.2 2.359.0 0.0.1 dub'
46
46
  end
47
47
 
48
48
  sig { returns([String, T::Hash[Symbol, String]]) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
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-02 00:00:00.000000000 Z
11
+ date: 2024-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -151,6 +151,8 @@ files:
151
151
  - lib/open_api_sdk/models/operations.rb
152
152
  - lib/open_api_sdk/models/operations/bulkcreatelinks_request.rb
153
153
  - lib/open_api_sdk/models/operations/bulkcreatelinks_response.rb
154
+ - lib/open_api_sdk/models/operations/bulkupdatelinks_requestbody.rb
155
+ - lib/open_api_sdk/models/operations/bulkupdatelinks_response.rb
154
156
  - lib/open_api_sdk/models/operations/color.rb
155
157
  - lib/open_api_sdk/models/operations/createdomain_request.rb
156
158
  - lib/open_api_sdk/models/operations/createdomain_requestbody.rb
@@ -161,6 +163,7 @@ files:
161
163
  - lib/open_api_sdk/models/operations/createtag_request.rb
162
164
  - lib/open_api_sdk/models/operations/createtag_requestbody.rb
163
165
  - lib/open_api_sdk/models/operations/createtag_response.rb
166
+ - lib/open_api_sdk/models/operations/data.rb
164
167
  - lib/open_api_sdk/models/operations/deletedomain_request.rb
165
168
  - lib/open_api_sdk/models/operations/deletedomain_response.rb
166
169
  - lib/open_api_sdk/models/operations/deletedomain_responsebody.rb