Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.456.0
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Dec 18, 2024
1 parent d09200c commit f149888
Show file tree
Hide file tree
Showing 61 changed files with 2,227 additions and 1,971 deletions.
19 changes: 11 additions & 8 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
lockVersion: 2.0.0
id: 43187d3e-7c3c-4c11-b5d4-4b2334fb6d96
management:
docChecksum: 696b11ac8aea0ac84de6ac987269993a
docChecksum: cb382cc4468d569fac201d1bf8058387
docVersion: 0.0.1
speakeasyVersion: 1.453.10
generationVersion: 2.474.15
releaseVersion: 0.11.7
configChecksum: ea2add875b69cf6a396427e2da8b3606
speakeasyVersion: 1.456.0
generationVersion: 2.481.0
releaseVersion: 0.11.8
configChecksum: a8cc33f7e922f0c9bd4c6053e0feb7e1
repoURL: https://github.com/dubinc/dub-php.git
installationURL: https://github.com/dubinc/dub-php
published: true
features:
php:
constsAndDefaults: 0.2.0
core: 3.7.4
core: 3.7.7
deprecations: 2.81.1
errors: 0.3.0
examples: 2.81.3
Expand Down Expand Up @@ -279,13 +279,16 @@ generatedFiles:
- src/Hooks/AfterSuccessHook.php
- src/Hooks/BeforeRequestContext.php
- src/Hooks/BeforeRequestHook.php
- src/Hooks/Credentials.php
- src/Hooks/ErrorResponseContext.php
- src/Hooks/FailEarlyException.php
- src/Hooks/HookContext.php
- src/Hooks/Hooks.php
- src/Hooks/SDKHooks.php
- src/Hooks/SDKInitHook.php
- src/Hooks/SDKRequestContext.php
- src/Hooks/Session.php
- src/Hooks/TokenResponse.php
- src/Links.php
- src/Metatags.php
- src/Models/Components/AnalyticsBrowsers.php
Expand Down Expand Up @@ -882,7 +885,7 @@ examples:
idOrSlug: "<value>"
responses:
"200":
application/json: {"id": "<id>", "name": "<value>", "slug": "<value>", "logo": "<value>", "inviteCode": "<value>", "plan": "business extra", "stripeId": "<value>", "billingCycleStart": "900.65", "paymentFailedAt": "<value>", "stripeConnectId": "<value>", "usage": "5588.34", "usageLimit": "8441.99", "linksUsage": "5442.21", "linksLimit": "8306.36", "salesUsage": "5212.35", "salesLimit": "785.92", "domainsLimit": "9699.61", "tagsLimit": "8661.61", "usersLimit": "4580.49", "aiUsage": "7352.87", "aiLimit": "4508.24", "conversionEnabled": true, "dotLinkClaimed": true, "createdAt": "<value>", "users": [], "domains": [], "bankAccountName": "<value>", "partialAccountNumber": "<value>", "routingNumber": "<value>", "bankAccountVerified": false}
application/json: {"id": "<id>", "name": "<value>", "slug": "<value>", "logo": "<value>", "inviteCode": "<value>", "plan": "business extra", "stripeId": "<value>", "billingCycleStart": "900.65", "paymentFailedAt": "<value>", "stripeConnectId": "<value>", "payoutMethodId": "<id>", "usage": "5588.34", "usageLimit": "8441.99", "linksUsage": "5442.21", "linksLimit": "8306.36", "salesUsage": "5212.35", "salesLimit": "785.92", "domainsLimit": "9699.61", "tagsLimit": "8661.61", "usersLimit": "4580.49", "aiUsage": "7352.87", "aiLimit": "4508.24", "conversionEnabled": true, "dotLinkClaimed": true, "createdAt": "<value>", "users": [], "domains": []}
"400":
application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}}
"401":
Expand All @@ -908,7 +911,7 @@ examples:
idOrSlug: "<value>"
responses:
"200":
application/json: {"id": "<id>", "name": "<value>", "slug": "<value>", "logo": "<value>", "inviteCode": "<value>", "plan": "enterprise", "stripeId": "<value>", "billingCycleStart": "245.55", "paymentFailedAt": "<value>", "stripeConnectId": "<value>", "usage": "5971.29", "usageLimit": "156.52", "linksUsage": "3446.2", "linksLimit": "7084.55", "salesUsage": "9914.64", "salesLimit": "2703.24", "domainsLimit": "6276.9", "tagsLimit": "6841.99", "usersLimit": "4888.52", "aiUsage": "4430.76", "aiLimit": "9840.08", "conversionEnabled": false, "dotLinkClaimed": false, "createdAt": "<value>", "users": [], "domains": [], "bankAccountName": "<value>", "partialAccountNumber": "<value>", "routingNumber": "<value>", "bankAccountVerified": false}
application/json: {"id": "<id>", "name": "<value>", "slug": "<value>", "logo": "<value>", "inviteCode": "<value>", "plan": "enterprise", "stripeId": "<value>", "billingCycleStart": "245.55", "paymentFailedAt": "<value>", "stripeConnectId": "<value>", "payoutMethodId": "<id>", "usage": "5971.29", "usageLimit": "156.52", "linksUsage": "3446.2", "linksLimit": "7084.55", "salesUsage": "9914.64", "salesLimit": "2703.24", "domainsLimit": "6276.9", "tagsLimit": "6841.99", "usersLimit": "4888.52", "aiUsage": "4430.76", "aiLimit": "9840.08", "conversionEnabled": false, "dotLinkClaimed": false, "createdAt": "<value>", "users": [], "domains": []}
"400":
application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}}
"401":
Expand Down
7 changes: 6 additions & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ generation:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
php:
version: 0.11.7
version: 0.11.8
additionalDependencies:
autoload: {}
autoload-dev: {}
require: {}
require-dev: {}
clientServerStatusCodesAsErrors: true
defaultErrorName: SDKException
flattenGlobalSecurity: true
Expand Down
14 changes: 7 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
speakeasyVersion: 1.453.10
speakeasyVersion: 1.456.0
sources:
dub:
sourceNamespace: dub
sourceRevisionDigest: sha256:fe8aa1c3c33a5e99dc894af333b3e9fbadc83942dc75d10ee956b0539cea4bcd
sourceBlobDigest: sha256:4fb9afd3f82041cb034a365f95133390b69b22cbb6bd915dea4c7ce235cc144b
sourceRevisionDigest: sha256:44929bb9c3739d49f288e5dd88744fa47f3e1c2447bc58d1848faede36ab7ba7
sourceBlobDigest: sha256:1a0d16219c5d15e56c8d4f3010b89035f7ea6d5af284d33241f231f8e87d361c
tags:
- latest
- speakeasy-sdk-regen-1733876473
- speakeasy-sdk-regen-1734481213
- 0.0.1
targets:
my-first-target:
source: dub
sourceNamespace: dub
sourceRevisionDigest: sha256:fe8aa1c3c33a5e99dc894af333b3e9fbadc83942dc75d10ee956b0539cea4bcd
sourceBlobDigest: sha256:4fb9afd3f82041cb034a365f95133390b69b22cbb6bd915dea4c7ce235cc144b
sourceRevisionDigest: sha256:44929bb9c3739d49f288e5dd88744fa47f3e1c2447bc58d1848faede36ab7ba7
sourceBlobDigest: sha256:1a0d16219c5d15e56c8d4f3010b89035f7ea6d5af284d33241f231f8e87d361c
codeSamplesNamespace: code-samples-php-my-first-target
codeSamplesRevisionDigest: sha256:303e2be57a76dbcc7ccf9e878e12ba010ac4fb0a330dfb679b65610c0263fce4
codeSamplesRevisionDigest: sha256:8e4846aee9b085e388ecdc3e11e7e8b49aaab4d011039f39ade36c7173893a37
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
102 changes: 72 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Dub.co API: Dub is link management infrastructure for companies to create market
* [SDK Installation](#sdk-installation)
* [SDK Example Usage](#sdk-example-usage)
* [Available Resources and Operations](#available-resources-and-operations)
* [Pagination](#pagination)
* [Error Handling](#error-handling)
* [Server Selection](#server-selection)
* [Development](#development)
Expand Down Expand Up @@ -117,18 +118,18 @@ if ($response->linkSchema !== null) {

### [customers](docs/sdks/customers/README.md)

* [list](docs/sdks/customers/README.md#list) - Retrieve a list of customers
* [create](docs/sdks/customers/README.md#create) - Create a customer
* [delete](docs/sdks/customers/README.md#delete) - Delete a customer
* [get](docs/sdks/customers/README.md#get) - Retrieve a customer
* [list](docs/sdks/customers/README.md#list) - Retrieve a list of customers
* [update](docs/sdks/customers/README.md#update) - Update a customer
* [delete](docs/sdks/customers/README.md#delete) - Delete a customer

### [domains](docs/sdks/domains/README.md)

* [create](docs/sdks/domains/README.md#create) - Create a domain
* [delete](docs/sdks/domains/README.md#delete) - Delete a domain
* [list](docs/sdks/domains/README.md#list) - Retrieve a list of domains
* [update](docs/sdks/domains/README.md#update) - Update a domain
* [delete](docs/sdks/domains/README.md#delete) - Delete a domain


### [embedTokens](docs/sdks/embedtokens/README.md)
Expand All @@ -141,15 +142,15 @@ if ($response->linkSchema !== null) {

### [links](docs/sdks/links/README.md)

* [createMany](docs/sdks/links/README.md#createmany) - Bulk create links
* [deleteMany](docs/sdks/links/README.md#deletemany) - Bulk delete links
* [updateMany](docs/sdks/links/README.md#updatemany) - Bulk update links
* [create](docs/sdks/links/README.md#create) - Create a new link
* [delete](docs/sdks/links/README.md#delete) - Delete a link
* [get](docs/sdks/links/README.md#get) - Retrieve a link
* [list](docs/sdks/links/README.md#list) - Retrieve a list of links
* [count](docs/sdks/links/README.md#count) - Retrieve links count
* [get](docs/sdks/links/README.md#get) - Retrieve a link
* [update](docs/sdks/links/README.md#update) - Update a link
* [delete](docs/sdks/links/README.md#delete) - Delete a link
* [createMany](docs/sdks/links/README.md#createmany) - Bulk create links
* [updateMany](docs/sdks/links/README.md#updatemany) - Bulk update links
* [deleteMany](docs/sdks/links/README.md#deletemany) - Bulk delete links
* [upsert](docs/sdks/links/README.md#upsert) - Upsert a link

### [metatags](docs/sdks/metatags/README.md)
Expand All @@ -163,15 +164,15 @@ if ($response->linkSchema !== null) {
### [tags](docs/sdks/tags/README.md)

* [create](docs/sdks/tags/README.md#create) - Create a new tag
* [delete](docs/sdks/tags/README.md#delete) - Delete a tag
* [list](docs/sdks/tags/README.md#list) - Retrieve a list of tags
* [update](docs/sdks/tags/README.md#update) - Update a tag
* [delete](docs/sdks/tags/README.md#delete) - Delete a tag

### [track](docs/sdks/track/README.md)

* [~~customer~~](docs/sdks/track/README.md#customer) - Track a customer :warning: **Deprecated**
* [lead](docs/sdks/track/README.md#lead) - Track a lead
* [sale](docs/sdks/track/README.md#sale) - Track a sale
* [~~customer~~](docs/sdks/track/README.md#customer) - Track a customer :warning: **Deprecated**

### [workspaces](docs/sdks/workspaces/README.md)

Expand All @@ -181,6 +182,43 @@ if ($response->linkSchema !== null) {
</details>
<!-- End Available Resources and Operations [operations] -->

<!-- Start Pagination [pagination] -->
## Pagination

Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the
returned object will be a `Generator` instead of an individual response.

Working with generators is as simple as iterating over the responses in a `foreach` loop, and you can see an example below:
```php
declare(strict_types=1);

require 'vendor/autoload.php';

use Dub;
use Dub\Models\Operations;

$security = 'DUB_API_KEY';

$sdk = Dub\Dub::builder()->setSecurity($security)->build();

$request = new Operations\GetLinksRequest(
page: 1,
pageSize: 50,
);

$responses = $sdk->links->list(
request: $request
);


foreach ($responses as $response) {
if ($response->statusCode === 200) {
// handle response
}
}
```
<!-- End Pagination [pagination] -->

<!-- Start Error Handling [errors] -->
## Error Handling

Expand All @@ -195,7 +233,7 @@ By default an API error will raise a `Errors\SDKException` exception, which has
| `$rawResponse` | *?\Psr\Http\Message\ResponseInterface* | The raw HTTP response |
| `$body` | *string* | The response content |

When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `create` method throws the following exceptions:
When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `createMany` method throws the following exceptions:

| Error Type | Status Code | Content Type |
| -------------------------- | ----------- | ---------------- |
Expand Down Expand Up @@ -225,19 +263,21 @@ $security = 'DUB_API_KEY';
$sdk = Dub\Dub::builder()->setSecurity($security)->build();

try {
$request = new Operations\CreateLinkRequestBody(
url: 'https://google.com',
tagIds: [
'clux0rgak00011...',
],
externalId: '123456',
);

$response = $sdk->links->create(
$request = [
new Operations\RequestBody(
url: 'https://google.com',
tagIds: [
'clux0rgak00011...',
],
externalId: '123456',
),
];

$response = $sdk->links->createMany(
request: $request
);

if ($response->linkSchema !== null) {
if ($response->linkSchemas !== null) {
// handle response
}
} catch (Errors\BadRequestThrowable $e) {
Expand Down Expand Up @@ -294,19 +334,21 @@ $sdk = Dub\Dub::builder()
->setServerURL('https://api.dub.co')
->setSecurity($security)->build();

$request = new Operations\CreateLinkRequestBody(
url: 'https://google.com',
tagIds: [
'clux0rgak00011...',
],
externalId: '123456',
);
$request = [
new Operations\RequestBody(
url: 'https://google.com',
tagIds: [
'clux0rgak00011...',
],
externalId: '123456',
),
];

$response = $sdk->links->create(
$response = $sdk->links->createMany(
request: $request
);

if ($response->linkSchema !== null) {
if ($response->linkSchemas !== null) {
// handle response
}
```
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -520,4 +520,14 @@ Based on:
### Generated
- [php v0.11.7] .
### Releases
- [Composer v0.11.7] https://packagist.org/packages/dub/dub-php#v0.11.7 - .
- [Composer v0.11.7] https://packagist.org/packages/dub/dub-php#v0.11.7 - .

## 2024-12-18 00:20:10
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.456.0 (2.481.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [php v0.11.8] .
### Releases
- [Composer v0.11.8] https://packagist.org/packages/dub/dub-php#v0.11.8 - .
4 changes: 2 additions & 2 deletions codeSamples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ actions:
"x-codeSamples":
- "lang": "php"
"label": "listDomains"
"source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\n\n$security = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\n\n\n$response = $sdk->domains->list(\n archived: true,\n search: '<value>',\n page: 1,\n pageSize: 50\n\n);\n\nif ($response->domainSchemas !== null) {\n // handle response\n}"
"source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\n\n$security = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\n\n\n$responses = $sdk->domains->list(\n archived: true,\n search: '<value>',\n page: 1,\n pageSize: 50\n\n);\n\n\nforeach ($responses as $response) {\n if ($response->statusCode === 200) {\n // handle response\n }\n}"
- target: $["paths"]["/domains"]["post"]
update:
"x-codeSamples":
Expand Down Expand Up @@ -74,7 +74,7 @@ actions:
"x-codeSamples":
- "lang": "php"
"label": "getLinks"
"source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Operations;\n\n$security = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\n$request = new Operations\\GetLinksRequest(\n page: 1,\n pageSize: 50,\n);\n\n$response = $sdk->links->list(\n request: $request\n);\n\nif ($response->linkSchemas !== null) {\n // handle response\n}"
"source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Operations;\n\n$security = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\n$request = new Operations\\GetLinksRequest(\n page: 1,\n pageSize: 50,\n);\n\n$responses = $sdk->links->list(\n request: $request\n);\n\n\nforeach ($responses as $response) {\n if ($response->statusCode === 200) {\n // handle response\n }\n}"
- target: $["paths"]["/links"]["post"]
update:
"x-codeSamples":
Expand Down
Loading

0 comments on commit f149888

Please sign in to comment.