dub 0.2.2.pre.alpha.61 → 0.2.2.pre.alpha.62

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: 44081d1ebd3c2256f1a92129db2263cb64962d94e809691a0c5e9bf3289ed034
4
- data.tar.gz: 3e75b504e802b928e6c042d4f24821d697d222ddd07ebf5a69a08bfcc1baacc0
3
+ metadata.gz: 06bf55165195194916da2cf3344b80a1682aab06dc469d359369d5e087588f63
4
+ data.tar.gz: 2b726953e774709b88a04d35453fa90e5ffdfded9ca70d939f39bc730c5e279f
5
5
  SHA512:
6
- metadata.gz: f818d866e17043b0ccbd1ce99fefba287a53f3ba79dbb8ca1833e7fbffa8b95942fece6636370d6251502cd89a6fa3f3e9bcd8d390a7892224484ac87d3696b9
7
- data.tar.gz: 99980b966b3143afbe709dfc777f662780cfd6dc3f098e4defe4a97cb92152bd4fe19c902c9faffd9b8f911faa61b7d0d4044bb0cb5add9cdfff5aad9aacef87
6
+ metadata.gz: e9c7513af2d36bffc7846b86e7012106e520081fbd8d6b289e372b8fc44758ef00103bb8b5da824f48a4bdff51549921b839ddd479d3767a1223640ddfa18276
7
+ data.tar.gz: 4f128945ef57d7e1504bd5e51bcab1e5152a041b477f236f8571a84a66bdde21d76d8995754e2cea98837f399366c7855f235537cbed2344b525458a6298697e
@@ -15,7 +15,7 @@ module OpenApiSDK
15
15
  field :created_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('createdAt') } }
16
16
  # Unique identifier for the customer in the client's app.
17
17
  field :external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('externalId') } }
18
- # The unique identifier of the customer in Dub.
18
+ # The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`).
19
19
  field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } }
20
20
  # Name of the customer.
21
21
  field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } }
@@ -27,7 +27,7 @@ module OpenApiSDK
27
27
  field :internal_server_error, T.nilable(::OpenApiSDK::Shared::InternalServerError)
28
28
  # This response is sent when the requested content has been permanently deleted from server, with no forwarding address.
29
29
  field :invite_expired, T.nilable(::OpenApiSDK::Shared::InviteExpired)
30
- # The created partner
30
+ # The created partner link
31
31
  field :link_schema, T.nilable(::OpenApiSDK::Shared::LinkSchema)
32
32
  # The server cannot find the requested resource.
33
33
  field :not_found, T.nilable(::OpenApiSDK::Shared::NotFound)
@@ -11,7 +11,7 @@ module OpenApiSDK
11
11
  class DeleteCustomerRequest < ::OpenApiSDK::Utils::FieldAugmented
12
12
  extend T::Sig
13
13
 
14
- # The unique identifier of the customer in Dub.
14
+ # The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`).
15
15
  field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } }
16
16
 
17
17
 
@@ -11,7 +11,7 @@ module OpenApiSDK
11
11
  class DeleteCustomerResponseBody < ::OpenApiSDK::Utils::FieldAugmented
12
12
  extend T::Sig
13
13
 
14
- # The unique identifier of the customer in Dub.
14
+ # The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`).
15
15
  field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } }
16
16
 
17
17
 
@@ -11,7 +11,7 @@ module OpenApiSDK
11
11
  class GetCustomerRequest < ::OpenApiSDK::Utils::FieldAugmented
12
12
  extend T::Sig
13
13
 
14
- # The unique identifier of the customer in Dub.
14
+ # The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`).
15
15
  field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } }
16
16
  # Whether to include expanded fields on the customer (`link`, `partner`, `discount`).
17
17
  field :include_expanded_fields, T.nilable(T::Boolean), { 'query_param': { 'field_name': 'includeExpandedFields', 'style': 'form', 'explode': true } }
@@ -15,7 +15,7 @@ module OpenApiSDK
15
15
  field :created_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('createdAt') } }
16
16
  # Unique identifier for the customer in the client's app.
17
17
  field :external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('externalId') } }
18
- # The unique identifier of the customer in Dub.
18
+ # The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`).
19
19
  field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } }
20
20
  # Name of the customer.
21
21
  field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } }
@@ -15,7 +15,7 @@ module OpenApiSDK
15
15
  field :created_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('createdAt') } }
16
16
  # Unique identifier for the customer in the client's app.
17
17
  field :external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('externalId') } }
18
- # The unique identifier of the customer in Dub.
18
+ # The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`).
19
19
  field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } }
20
20
  # Name of the customer.
21
21
  field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } }
@@ -11,7 +11,7 @@ module OpenApiSDK
11
11
  class UpdateCustomerRequest < ::OpenApiSDK::Utils::FieldAugmented
12
12
  extend T::Sig
13
13
 
14
- # The unique identifier of the customer in Dub.
14
+ # The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`).
15
15
  field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } }
16
16
  # Whether to include expanded fields on the customer (`link`, `partner`, `discount`).
17
17
  field :include_expanded_fields, T.nilable(T::Boolean), { 'query_param': { 'field_name': 'includeExpandedFields', 'style': 'form', 'explode': true } }
@@ -15,7 +15,7 @@ module OpenApiSDK
15
15
  field :created_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('createdAt') } }
16
16
  # Unique identifier for the customer in the client's app.
17
17
  field :external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('externalId') } }
18
- # The unique identifier of the customer in Dub.
18
+ # The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`).
19
19
  field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } }
20
20
  # Name of the customer.
21
21
  field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } }
@@ -0,0 +1,99 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module OpenApiSDK
8
+ module Operations
9
+
10
+ # Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner.
11
+ class UpsertPartnerLinkLinkProps < ::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. Defaults to `false` if not provided.
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 custom link preview description (og:description). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og
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
+ # The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace.
29
+ field :external_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('externalId') } }
30
+ # The custom link preview image (og:image). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og
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 ID of the partner the short link is associated with.
35
+ field :partner_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('partnerId') } }
36
+ # The password required to access the destination URL of the short link.
37
+ field :password, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('password') } }
38
+ # The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided.
39
+ field :prefix, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('prefix') } }
40
+ # Whether the short link uses Custom Social Media Cards feature. Defaults to `false` if not provided.
41
+ field :proxy, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('proxy') } }
42
+ # The referral tag of the short link. If set, this will populate or override the `ref` query parameter in the destination URL.
43
+ field :ref, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ref') } }
44
+ # Whether the short link uses link cloaking. Defaults to `false` if not provided.
45
+ field :rewrite, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('rewrite') } }
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 ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.
51
+ field :tenant_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tenantId') } }
52
+ # The custom link preview title (og:title). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og
53
+ field :title, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('title') } }
54
+ # The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL.
55
+ field :utm_campaign, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('utm_campaign') } }
56
+ # The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL.
57
+ field :utm_content, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('utm_content') } }
58
+ # The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL.
59
+ field :utm_medium, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('utm_medium') } }
60
+ # The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL.
61
+ field :utm_source, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('utm_source') } }
62
+ # The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL.
63
+ field :utm_term, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('utm_term') } }
64
+ # The custom link preview video (og:video). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og
65
+ field :video, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('video') } }
66
+
67
+
68
+ 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), external_id: T.nilable(::String), image: T.nilable(::String), ios: T.nilable(::String), partner_id: T.nilable(::String), password: T.nilable(::String), prefix: T.nilable(::String), proxy: T.nilable(T::Boolean), ref: T.nilable(::String), rewrite: T.nilable(T::Boolean), tag_ids: T.nilable(::Object), tag_names: T.nilable(::Object), tenant_id: T.nilable(::String), title: T.nilable(::String), utm_campaign: T.nilable(::String), utm_content: T.nilable(::String), utm_medium: T.nilable(::String), utm_source: T.nilable(::String), utm_term: T.nilable(::String), video: T.nilable(::String)).void }
69
+ def initialize(android: nil, archived: nil, comments: nil, description: nil, do_index: nil, expired_url: nil, expires_at: nil, external_id: nil, image: nil, ios: nil, partner_id: nil, password: nil, prefix: nil, proxy: nil, ref: nil, rewrite: nil, tag_ids: nil, tag_names: nil, tenant_id: nil, title: nil, utm_campaign: nil, utm_content: nil, utm_medium: nil, utm_source: nil, utm_term: nil, video: nil)
70
+ @android = android
71
+ @archived = archived
72
+ @comments = comments
73
+ @description = description
74
+ @do_index = do_index
75
+ @expired_url = expired_url
76
+ @expires_at = expires_at
77
+ @external_id = external_id
78
+ @image = image
79
+ @ios = ios
80
+ @partner_id = partner_id
81
+ @password = password
82
+ @prefix = prefix
83
+ @proxy = proxy
84
+ @ref = ref
85
+ @rewrite = rewrite
86
+ @tag_ids = tag_ids
87
+ @tag_names = tag_names
88
+ @tenant_id = tenant_id
89
+ @title = title
90
+ @utm_campaign = utm_campaign
91
+ @utm_content = utm_content
92
+ @utm_medium = utm_medium
93
+ @utm_source = utm_source
94
+ @utm_term = utm_term
95
+ @video = video
96
+ end
97
+ end
98
+ end
99
+ end
@@ -0,0 +1,39 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module OpenApiSDK
8
+ module Operations
9
+
10
+
11
+ class UpsertPartnerLinkRequestBody < ::OpenApiSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # The ID of the program that the partner is enrolled in.
15
+ field :program_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('programId') } }
16
+ # The URL to shorten. Will throw an error if the domain doesn't match the program's default URL domain.
17
+ field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } }
18
+ # The short link slug. If not provided, a random 7-character slug will be generated.
19
+ field :key, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key') } }
20
+ # Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner.
21
+ field :link_props, T.nilable(::OpenApiSDK::Operations::UpsertPartnerLinkLinkProps), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('linkProps') } }
22
+ # The ID of the partner to create a link for. Will take precedence over `tenantId` if provided.
23
+ field :partner_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('partnerId') } }
24
+ # The ID of the partner in your system. If both `partnerId` and `tenantId` are not provided, an error will be thrown.
25
+ field :tenant_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tenantId') } }
26
+
27
+
28
+ sig { params(program_id: ::String, url: ::String, key: T.nilable(::String), link_props: T.nilable(::OpenApiSDK::Operations::UpsertPartnerLinkLinkProps), partner_id: T.nilable(::String), tenant_id: T.nilable(::String)).void }
29
+ def initialize(program_id: nil, url: nil, key: nil, link_props: nil, partner_id: nil, tenant_id: nil)
30
+ @program_id = program_id
31
+ @url = url
32
+ @key = key
33
+ @link_props = link_props
34
+ @partner_id = partner_id
35
+ @tenant_id = tenant_id
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,60 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module OpenApiSDK
8
+ module Operations
9
+
10
+
11
+ class UpsertPartnerLinkResponse < ::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 upserted partner link
31
+ field :link_schema, T.nilable(::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_schema: T.nilable(::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_schema: 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_schema = link_schema
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
@@ -130,6 +130,9 @@ module OpenApiSDK
130
130
  autoload :CreatePartnerLinkLinkProps, 'open_api_sdk/models/operations/createpartnerlink_linkprops.rb'
131
131
  autoload :CreatePartnerLinkRequestBody, 'open_api_sdk/models/operations/createpartnerlink_requestbody.rb'
132
132
  autoload :CreatePartnerLinkResponse, 'open_api_sdk/models/operations/createpartnerlink_response.rb'
133
+ autoload :UpsertPartnerLinkLinkProps, 'open_api_sdk/models/operations/upsertpartnerlink_linkprops.rb'
134
+ autoload :UpsertPartnerLinkRequestBody, 'open_api_sdk/models/operations/upsertpartnerlink_requestbody.rb'
135
+ autoload :UpsertPartnerLinkResponse, 'open_api_sdk/models/operations/upsertpartnerlink_response.rb'
133
136
  autoload :GetWorkspaceRequest, 'open_api_sdk/models/operations/getworkspace_request.rb'
134
137
  autoload :GetWorkspaceResponse, 'open_api_sdk/models/operations/getworkspace_response.rb'
135
138
  autoload :UpdateWorkspaceRequestBody, 'open_api_sdk/models/operations/updateworkspace_requestbody.rb'
@@ -108,7 +108,7 @@ module OpenApiSDK
108
108
  sig { params(request: T.nilable(::OpenApiSDK::Operations::CreatePartnerLinkRequestBody)).returns(::OpenApiSDK::Operations::CreatePartnerLinkResponse) }
109
109
  def create_link(request)
110
110
  # create_link - Create a link for a partner
111
- # Create a new link for a partner that is enrolled in your program
111
+ # Create a new link for a partner that is enrolled in your program.
112
112
  url, params = @sdk_configuration.get_server_details
113
113
  base_url = Utils.template_url(url, params)
114
114
  url = "#{base_url}/partners/links"
@@ -189,5 +189,91 @@ module OpenApiSDK
189
189
 
190
190
  res
191
191
  end
192
+
193
+
194
+ sig { params(request: T.nilable(::OpenApiSDK::Operations::UpsertPartnerLinkRequestBody)).returns(::OpenApiSDK::Operations::UpsertPartnerLinkResponse) }
195
+ def upsert_link(request)
196
+ # upsert_link - Upsert a link for a partner
197
+ # Upsert a link for a partner that is enrolled in your program. 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.
198
+ url, params = @sdk_configuration.get_server_details
199
+ base_url = Utils.template_url(url, params)
200
+ url = "#{base_url}/partners/links/upsert"
201
+ headers = {}
202
+ req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
203
+ headers['content-type'] = req_content_type
204
+ headers['Accept'] = 'application/json'
205
+ headers['user-agent'] = @sdk_configuration.user_agent
206
+
207
+ r = @sdk_configuration.client.put(url) do |req|
208
+ req.headers = headers
209
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
210
+ if form
211
+ req.body = Utils.encode_form(form)
212
+ elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
213
+ req.body = URI.encode_www_form(data)
214
+ else
215
+ req.body = data
216
+ end
217
+ end
218
+
219
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
220
+
221
+ res = ::OpenApiSDK::Operations::UpsertPartnerLinkResponse.new(
222
+ status_code: r.status, content_type: content_type, raw_response: r
223
+ )
224
+ if r.status == 200
225
+ if Utils.match_content_type(content_type, 'application/json')
226
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::LinkSchema)
227
+ res.link_schema = out
228
+ end
229
+ elsif r.status == 400
230
+ if Utils.match_content_type(content_type, 'application/json')
231
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
232
+ res.bad_request = out
233
+ end
234
+ elsif r.status == 401
235
+ if Utils.match_content_type(content_type, 'application/json')
236
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
237
+ res.unauthorized = out
238
+ end
239
+ elsif r.status == 403
240
+ if Utils.match_content_type(content_type, 'application/json')
241
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
242
+ res.forbidden = out
243
+ end
244
+ elsif r.status == 404
245
+ if Utils.match_content_type(content_type, 'application/json')
246
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
247
+ res.not_found = out
248
+ end
249
+ elsif r.status == 409
250
+ if Utils.match_content_type(content_type, 'application/json')
251
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
252
+ res.conflict = out
253
+ end
254
+ elsif r.status == 410
255
+ if Utils.match_content_type(content_type, 'application/json')
256
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
257
+ res.invite_expired = out
258
+ end
259
+ elsif r.status == 422
260
+ if Utils.match_content_type(content_type, 'application/json')
261
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
262
+ res.unprocessable_entity = out
263
+ end
264
+ elsif r.status == 429
265
+ if Utils.match_content_type(content_type, 'application/json')
266
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
267
+ res.rate_limit_exceeded = out
268
+ end
269
+ elsif r.status == 500
270
+ if Utils.match_content_type(content_type, 'application/json')
271
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
272
+ res.internal_server_error = out
273
+ end
274
+ end
275
+
276
+ res
277
+ end
192
278
  end
193
279
  end
@@ -38,9 +38,9 @@ module OpenApiSDK
38
38
  @security = security
39
39
  @language = 'ruby'
40
40
  @openapi_doc_version = '0.0.1'
41
- @sdk_version = '0.2.2-alpha.61'
42
- @gen_version = '2.503.2'
43
- @user_agent = 'speakeasy-sdk/ruby 0.2.2-alpha.61 2.503.2 0.0.1 dub'
41
+ @sdk_version = '0.2.2-alpha.62'
42
+ @gen_version = '2.506.0'
43
+ @user_agent = 'speakeasy-sdk/ruby 0.2.2-alpha.62 2.506.0 0.0.1 dub'
44
44
  end
45
45
 
46
46
  sig { returns([String, T::Hash[Symbol, String]]) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2.pre.alpha.61
4
+ version: 0.2.2.pre.alpha.62
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dub
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-02-06 00:00:00.000000000 Z
11
+ date: 2025-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -291,6 +291,9 @@ files:
291
291
  - lib/open_api_sdk/models/operations/updateworkspace_response.rb
292
292
  - lib/open_api_sdk/models/operations/upsertlink_requestbody.rb
293
293
  - lib/open_api_sdk/models/operations/upsertlink_response.rb
294
+ - lib/open_api_sdk/models/operations/upsertpartnerlink_linkprops.rb
295
+ - lib/open_api_sdk/models/operations/upsertpartnerlink_requestbody.rb
296
+ - lib/open_api_sdk/models/operations/upsertpartnerlink_response.rb
294
297
  - lib/open_api_sdk/models/shared.rb
295
298
  - lib/open_api_sdk/models/shared/badrequest.rb
296
299
  - lib/open_api_sdk/models/shared/click.rb