Skip to content

Commit 38ec372

Browse files
authored
Merge pull request #190 from dubinc/speakeasy-sdk-regen-1738974090
chore: 🐝 Update Specs - Merge Code Samples Into OpenAPI Spec
2 parents cf07fbc + 8bcbde3 commit 38ec372

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

.speakeasy/workflow.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
speakeasyVersion: 1.487.0
1+
speakeasyVersion: 1.487.1
22
sources:
33
merge-code-samples-into-spec:
44
sourceNamespace: merge-code-samples-into-spec
5-
sourceRevisionDigest: sha256:e05b8891aa1af107727cbe1fda3a60defaabd5332db00f1456863846c5adea17
6-
sourceBlobDigest: sha256:ea00f46b5235e1c7dc16fbc15c3c904939dc924205df7e00bafa15d3527e5362
5+
sourceRevisionDigest: sha256:bd9baf98ba0ba15c9f4496c05fb8224f9e18a2d7cb3f57e413e017868c601a1d
6+
sourceBlobDigest: sha256:9fbf73a3e7cd069e490ad1f29b5f2a1d39749cbfedc3ffdb2c742ea93ec44053
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1738887717
9+
- speakeasy-sdk-regen-1738974090
1010
- 0.0.1
1111
targets: {}
1212
workflow:

openapi-with-code-samples.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2725,7 +2725,7 @@ paths:
27252725
properties:
27262726
"id":
27272727
type: "string"
2728-
description: "The unique identifier of the customer in Dub."
2728+
description: "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`)."
27292729
"externalId":
27302730
type: "string"
27312731
description: "Unique identifier for the customer in the client's app."
@@ -2887,7 +2887,7 @@ paths:
28872887
properties:
28882888
"id":
28892889
type: "string"
2890-
description: "The unique identifier of the customer in Dub."
2890+
description: "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`)."
28912891
"externalId":
28922892
type: "string"
28932893
description: "Unique identifier for the customer in the client's app."
@@ -3019,10 +3019,10 @@ paths:
30193019
parameters:
30203020
- in: "path"
30213021
name: "id"
3022-
description: "The unique identifier of the customer in Dub."
3022+
description: "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`)."
30233023
schema:
30243024
type: "string"
3025-
description: "The unique identifier of the customer in Dub."
3025+
description: "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`)."
30263026
required: true
30273027
- in: "query"
30283028
name: "includeExpandedFields"
@@ -3040,7 +3040,7 @@ paths:
30403040
properties:
30413041
"id":
30423042
type: "string"
3043-
description: "The unique identifier of the customer in Dub."
3043+
description: "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`)."
30443044
"externalId":
30453045
type: "string"
30463046
description: "Unique identifier for the customer in the client's app."
@@ -3171,10 +3171,10 @@ paths:
31713171
parameters:
31723172
- in: "path"
31733173
name: "id"
3174-
description: "The unique identifier of the customer in Dub."
3174+
description: "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`)."
31753175
schema:
31763176
type: "string"
3177-
description: "The unique identifier of the customer in Dub."
3177+
description: "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`)."
31783178
required: true
31793179
- in: "query"
31803180
name: "includeExpandedFields"
@@ -3215,7 +3215,7 @@ paths:
32153215
properties:
32163216
"id":
32173217
type: "string"
3218-
description: "The unique identifier of the customer in Dub."
3218+
description: "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`)."
32193219
"externalId":
32203220
type: "string"
32213221
description: "Unique identifier for the customer in the client's app."
@@ -3346,10 +3346,10 @@ paths:
33463346
parameters:
33473347
- in: "path"
33483348
name: "id"
3349-
description: "The unique identifier of the customer in Dub."
3349+
description: "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`)."
33503350
schema:
33513351
type: "string"
3352-
description: "The unique identifier of the customer in Dub."
3352+
description: "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`)."
33533353
required: true
33543354
responses:
33553355
"200":
@@ -3361,7 +3361,7 @@ paths:
33613361
properties:
33623362
"id":
33633363
type: "string"
3364-
description: "The unique identifier of the customer in Dub."
3364+
description: "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`)."
33653365
required:
33663366
- "id"
33673367
"400": {"$ref": "#/components/responses/400"}
@@ -4141,7 +4141,7 @@ paths:
41414141
operationId: "upsertPartnerLink"
41424142
x-speakeasy-name-override: "upsertLink"
41434143
summary: "Upsert a link for a partner"
4144-
x-codeSamples: [{"lang": "typescript", "label": "upsertPartnerLink", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.partners.upsertLink();\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"programId\\\":\\\"string\\\",\\\"partnerId\\\":\\\"string\\\",\\\"tenantId\\\":\\\"string\\\",\\\"url\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"linkProps\\\":{\\\"externalId\\\":\\\"123456\\\",\\\"tenantId\\\":\\\"string\\\",\\\"partnerId\\\":\\\"string\\\",\\\"prefix\\\":\\\"string\\\",\\\"archived\\\":true,\\\"tagIds\\\":\\\"string\\\",\\\"tagNames\\\":\\\"string\\\",\\\"comments\\\":\\\"string\\\",\\\"expiresAt\\\":\\\"string\\\",\\\"expiredUrl\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"proxy\\\":true,\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"image\\\":\\\"string\\\",\\\"video\\\":\\\"string\\\",\\\"rewrite\\\":true,\\\"ios\\\":\\\"string\\\",\\\"android\\\":\\\"string\\\",\\\"doIndex\\\":true,\\\"utm_source\\\":\\\"string\\\",\\\"utm_medium\\\":\\\"string\\\",\\\"utm_campaign\\\":\\\"string\\\",\\\"utm_term\\\":\\\"string\\\",\\\"utm_content\\\":\\\"string\\\",\\\"ref\\\":\\\"string\\\"}}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/partners/links/upsert\")\n .put(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]
4144+
x-codeSamples: [{"lang": "typescript", "label": "upsertPartnerLink", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.partners.upsertLink();\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "upsertPartnerLink", "source": "package main\n\nimport(\n\t\"context\"\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n res, err := s.Partners.UpsertLink(ctx, &operations.UpsertPartnerLinkRequestBody{\n ProgramID: \"<id>\",\n URL: \"https://unsteady-lobster.com/\",\n LinkProps: &operations.UpsertPartnerLinkLinkProps{\n ExternalID: dubgo.String(\"123456\"),\n TagIds: dubgo.Pointer(operations.CreateUpsertPartnerLinkTagIdsArrayOfStr(\n []string{\n \"clux0rgak00011...\",\n },\n )),\n },\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "upsertPartnerLink", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::UpsertPartnerLinkRequestBody.new(\n program_id: \"<id>\",\n url: \"https://unsteady-lobster.com/\",\n link_props: ::OpenApiSDK::Operations::UpsertPartnerLinkLinkProps.new(\n external_id: \"123456\",\n tag_ids: [\n \"clux0rgak00011...\",\n ],\n ),\n)\n \nres = s.partners.upsert_link(req)\n\nif ! res.link_schema.nil?\n # handle response\nend"}, {"lang": "php", "label": "upsertPartnerLink", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Operations;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n$request = new Operations\\UpsertPartnerLinkRequestBody(\n programId: '<id>',\n url: 'https://unsteady-lobster.com/',\n linkProps: new Operations\\UpsertPartnerLinkLinkProps(\n externalId: '123456',\n tagIds: [\n 'clux0rgak00011...',\n ],\n ),\n);\n\n$response = $sdk->partners->upsertLink(\n request: $request\n);\n\nif ($response->linkSchema !== null) {\n // handle response\n}"}, {lang: python, label: upsertPartnerLink, source: "from dub import Dub\n\nwith Dub(\n token=\"DUB_API_KEY\",\n) as d_client:\n\n res = d_client.partners.upsert_link(request={\n \"program_id\": \"<id>\",\n \"url\": \"https://unsteady-lobster.com/\",\n \"link_props\": {\n \"external_id\": \"123456\",\n \"tag_ids\": [\n \"clux0rgak00011...\",\n ],\n },\n })\n\n assert res is not None\n\n # Handle response\n print(res)"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"programId\\\":\\\"string\\\",\\\"partnerId\\\":\\\"string\\\",\\\"tenantId\\\":\\\"string\\\",\\\"url\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"linkProps\\\":{\\\"externalId\\\":\\\"123456\\\",\\\"tenantId\\\":\\\"string\\\",\\\"partnerId\\\":\\\"string\\\",\\\"prefix\\\":\\\"string\\\",\\\"archived\\\":true,\\\"tagIds\\\":\\\"string\\\",\\\"tagNames\\\":\\\"string\\\",\\\"comments\\\":\\\"string\\\",\\\"expiresAt\\\":\\\"string\\\",\\\"expiredUrl\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"proxy\\\":true,\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"image\\\":\\\"string\\\",\\\"video\\\":\\\"string\\\",\\\"rewrite\\\":true,\\\"ios\\\":\\\"string\\\",\\\"android\\\":\\\"string\\\",\\\"doIndex\\\":true,\\\"utm_source\\\":\\\"string\\\",\\\"utm_medium\\\":\\\"string\\\",\\\"utm_campaign\\\":\\\"string\\\",\\\"utm_term\\\":\\\"string\\\",\\\"utm_content\\\":\\\"string\\\",\\\"ref\\\":\\\"string\\\"}}\");\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/partners/links/upsert\")\n .put(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]
41454145
description: "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."
41464146
tags:
41474147
- "Partners"
@@ -9659,7 +9659,7 @@ components:
96599659
properties:
96609660
"id":
96619661
type: "string"
9662-
description: "The unique identifier of the customer in Dub."
9662+
description: "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`)."
96639663
"externalId":
96649664
type: "string"
96659665
description: "Unique identifier for the customer in the client's app."
@@ -10852,7 +10852,7 @@ components:
1085210852
properties:
1085310853
"id":
1085410854
type: "string"
10855-
description: "The unique identifier of the customer in Dub."
10855+
description: "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`)."
1085610856
"externalId":
1085710857
type: "string"
1085810858
description: "Unique identifier for the customer in the client's app."
@@ -13083,7 +13083,7 @@ components:
1308313083
properties:
1308413084
"id":
1308513085
type: "string"
13086-
description: "The unique identifier of the customer in Dub."
13086+
description: "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`)."
1308713087
"externalId":
1308813088
type: "string"
1308913089
description: "Unique identifier for the customer in the client's app."
@@ -14218,7 +14218,7 @@ components:
1421814218
properties:
1421914219
"id":
1422014220
type: "string"
14221-
description: "The unique identifier of the customer in Dub."
14221+
description: "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`)."
1422214222
"externalId":
1422314223
type: "string"
1422414224
description: "Unique identifier for the customer in the client's app."

0 commit comments

Comments
 (0)