From 9ddb9bfdde56a7bbd92b4e9964da40d7dc2640b3 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Sun, 12 Jan 2025 00:23:06 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.468.2 --- .speakeasy/gen.lock | 36 +++++--- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 14 +-- CONTRIBUTING.md | 26 ------ README.md | 43 +++++---- RELEASES.md | 12 ++- USAGE.md | 16 ++-- codeSamples.yaml | 64 +++++++------- composer.json | 3 +- docs/Models/Components/Code.md | 20 +++++ docs/Models/Components/Data.md | 9 +- .../Models/Components/LeadCreatedEventLink.md | 9 +- docs/Models/Components/Link.md | 9 +- .../Models/Components/LinkClickedEventLink.md | 9 +- docs/Models/Components/LinkErrorSchema.md | 10 +++ docs/Models/Components/LinkSchema.md | 11 +-- .../Models/Components/SaleCreatedEventLink.md | 9 +- docs/Models/Components/WorkspaceSchema.md | 2 +- .../Operations/BulkCreateLinksResponse.md | 2 +- .../Operations/CreateLinkRequestBody.md | 3 +- docs/Models/Operations/Data.md | 1 + .../Models/Operations/GetCustomersResponse.md | 2 +- .../Operations/GetCustomersResponseBody.md | 17 ++++ .../Models/Operations/GetLinksCountRequest.md | 1 + docs/Models/Operations/GetLinksRequest.md | 5 +- docs/Models/Operations/ListEventsRequest.md | 5 +- docs/Models/Operations/Order.md | 6 +- docs/Models/Operations/QueryParamSortBy.md | 10 +++ docs/Models/Operations/QueryParamSortOrder.md | 11 +++ docs/Models/Operations/RequestBody.md | 3 +- docs/Models/Operations/ResponseBody.md | 32 ++++--- docs/Models/Operations/Sort.md | 7 +- docs/Models/Operations/SortBy.md | 11 ++- docs/Models/Operations/SortOrder.md | 11 +++ .../Operations/UpdateLinkRequestBody.md | 3 +- .../Operations/UpsertLinkRequestBody.md | 3 +- docs/sdks/analytics/README.md | 8 +- docs/sdks/customers/README.md | 40 +++++---- docs/sdks/domains/README.md | 32 ++++--- docs/sdks/embedtokens/README.md | 8 +- docs/sdks/events/README.md | 8 +- docs/sdks/links/README.md | 82 ++++++++++------- docs/sdks/metatags/README.md | 8 +- docs/sdks/qrcodes/README.md | 8 +- docs/sdks/tags/README.md | 32 ++++--- docs/sdks/track/README.md | 16 ++-- docs/sdks/workspaces/README.md | 16 ++-- src/Analytics.php | 8 +- src/Customers.php | 42 +++------ src/Domains.php | 32 ++----- src/EmbedTokens.php | 8 +- src/Events.php | 8 +- src/Links.php | 87 ++++++------------- src/Metatags.php | 8 +- src/Models/Components/Code.php | 26 ++++++ src/Models/Components/Data.php | 20 +++-- .../Components/LeadCreatedEventLink.php | 20 +++-- src/Models/Components/Link.php | 20 +++-- .../Components/LinkClickedEventLink.php | 20 +++-- src/Models/Components/LinkErrorSchema.php | 52 +++++++++++ src/Models/Components/LinkSchema.php | 22 +++-- .../Components/SaleCreatedEventLink.php | 20 +++-- src/Models/Components/WorkspaceSchema.php | 2 +- .../Operations/BulkCreateLinksResponse.php | 12 +-- .../Operations/CreateLinkRequestBody.php | 15 +++- src/Models/Operations/Data.php | 13 ++- .../Operations/GetCustomersResponse.php | 4 +- ...eBody.php => GetCustomersResponseBody.php} | 2 +- .../Operations/GetLinksCountRequest.php | 12 ++- src/Models/Operations/GetLinksRequest.php | 34 +++++++- src/Models/Operations/ListEventsRequest.php | 28 ++++-- src/Models/Operations/Order.php | 6 +- src/Models/Operations/QueryParamSortBy.php | 16 ++++ src/Models/Operations/QueryParamSortOrder.php | 17 ++++ src/Models/Operations/RequestBody.php | 15 +++- src/Models/Operations/Sort.php | 7 +- src/Models/Operations/SortBy.php | 7 +- src/Models/Operations/SortOrder.php | 17 ++++ .../Operations/UpdateLinkRequestBody.php | 15 +++- .../Operations/UpsertLinkRequestBody.php | 15 +++- src/QRCodes.php | 8 +- src/SDKConfiguration.php | 8 +- src/Tags.php | 32 ++----- src/Track.php | 16 +--- src/Utils/PathParameters.php | 9 +- src/Utils/QueryParameters.php | 6 +- src/Workspaces.php | 16 +--- 87 files changed, 897 insertions(+), 523 deletions(-) delete mode 100644 CONTRIBUTING.md create mode 100644 docs/Models/Components/Code.md create mode 100644 docs/Models/Components/LinkErrorSchema.md create mode 100644 docs/Models/Operations/GetCustomersResponseBody.md create mode 100644 docs/Models/Operations/QueryParamSortBy.md create mode 100644 docs/Models/Operations/QueryParamSortOrder.md create mode 100644 docs/Models/Operations/SortOrder.md create mode 100644 src/Models/Components/Code.php create mode 100644 src/Models/Components/LinkErrorSchema.php rename src/Models/Operations/{ResponseBody.php => GetCustomersResponseBody.php} (99%) create mode 100644 src/Models/Operations/QueryParamSortBy.php create mode 100644 src/Models/Operations/QueryParamSortOrder.php create mode 100644 src/Models/Operations/SortOrder.php diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 8c5069c..70160b7 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,22 +1,22 @@ lockVersion: 2.0.0 id: 43187d3e-7c3c-4c11-b5d4-4b2334fb6d96 management: - docChecksum: e904bd8a77ea57b3ba18586e860e5b93 + docChecksum: a6a1e65c1a9ddd2d1b445252e12b8157 docVersion: 0.0.1 - speakeasyVersion: 1.462.2 - generationVersion: 2.486.1 - releaseVersion: 0.11.12 - configChecksum: fe4eecb46586b1845737f410ec433c59 + speakeasyVersion: 1.468.2 + generationVersion: 2.493.4 + releaseVersion: 0.11.13 + configChecksum: 481be501d2f37979cdf2544785028b08 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.7 + core: 3.7.8 deprecations: 2.81.1 errors: 0.3.0 - examples: 2.81.3 + examples: 2.81.4 flattening: 2.81.1 globalSecurity: 2.81.7 globalSecurityFlattening: 0.1.1 @@ -30,7 +30,6 @@ features: unions: 0.1.4 generatedFiles: - .gitattributes - - CONTRIBUTING.md - USAGE.md - composer.json - docs/Models/Components/AnalyticsBrowsers.md @@ -51,6 +50,7 @@ generatedFiles: - docs/Models/Components/Click.md - docs/Models/Components/ClickEvent.md - docs/Models/Components/ClickEventGeo.md + - docs/Models/Components/Code.md - docs/Models/Components/Color.md - docs/Models/Components/Continent.md - docs/Models/Components/ContinentCode.md @@ -78,6 +78,7 @@ generatedFiles: - docs/Models/Components/LinkClickedEventEvent.md - docs/Models/Components/LinkClickedEventGeo.md - docs/Models/Components/LinkClickedEventLink.md + - docs/Models/Components/LinkErrorSchema.md - docs/Models/Components/LinkGeoTargeting.md - docs/Models/Components/LinkSchema.md - docs/Models/Components/LinkWebhookEvent.md @@ -193,6 +194,7 @@ generatedFiles: - docs/Models/Operations/GetCustomersInterval.md - docs/Models/Operations/GetCustomersRequest.md - docs/Models/Operations/GetCustomersResponse.md + - docs/Models/Operations/GetCustomersResponseBody.md - docs/Models/Operations/GetLinkInfoRequest.md - docs/Models/Operations/GetLinkInfoResponse.md - docs/Models/Operations/GetLinksCountQueryParamTagIds.md @@ -225,6 +227,8 @@ generatedFiles: - docs/Models/Operations/QueryParamEvent.md - docs/Models/Operations/QueryParamGroupBy.md - docs/Models/Operations/QueryParamInterval.md + - docs/Models/Operations/QueryParamSortBy.md + - docs/Models/Operations/QueryParamSortOrder.md - docs/Models/Operations/QueryParamTagIds.md - docs/Models/Operations/QueryParamTagNames.md - docs/Models/Operations/QueryParamTrigger.md @@ -237,6 +241,7 @@ generatedFiles: - docs/Models/Operations/Sale.md - docs/Models/Operations/Sort.md - docs/Models/Operations/SortBy.md + - docs/Models/Operations/SortOrder.md - docs/Models/Operations/TagIds.md - docs/Models/Operations/TagNames.md - docs/Models/Operations/Three.md @@ -337,6 +342,7 @@ generatedFiles: - src/Models/Components/Click.php - src/Models/Components/ClickEvent.php - src/Models/Components/ClickEventGeo.php + - src/Models/Components/Code.php - src/Models/Components/Color.php - src/Models/Components/Continent.php - src/Models/Components/ContinentCode.php @@ -364,6 +370,7 @@ generatedFiles: - src/Models/Components/LinkClickedEventEvent.php - src/Models/Components/LinkClickedEventGeo.php - src/Models/Components/LinkClickedEventLink.php + - src/Models/Components/LinkErrorSchema.php - src/Models/Components/LinkGeoTargeting.php - src/Models/Components/LinkSchema.php - src/Models/Components/LinkWebhookEvent.php @@ -483,6 +490,7 @@ generatedFiles: - src/Models/Operations/GetCustomersInterval.php - src/Models/Operations/GetCustomersRequest.php - src/Models/Operations/GetCustomersResponse.php + - src/Models/Operations/GetCustomersResponseBody.php - src/Models/Operations/GetLinkInfoRequest.php - src/Models/Operations/GetLinkInfoResponse.php - src/Models/Operations/GetLinksCountRequest.php @@ -511,14 +519,16 @@ generatedFiles: - src/Models/Operations/QueryParamEvent.php - src/Models/Operations/QueryParamGroupBy.php - src/Models/Operations/QueryParamInterval.php + - src/Models/Operations/QueryParamSortBy.php + - src/Models/Operations/QueryParamSortOrder.php - src/Models/Operations/QueryParamTrigger.php - src/Models/Operations/RequestBody.php - - src/Models/Operations/ResponseBody.php - src/Models/Operations/RetrieveAnalyticsRequest.php - src/Models/Operations/RetrieveAnalyticsResponse.php - src/Models/Operations/Sale.php - src/Models/Operations/Sort.php - src/Models/Operations/SortBy.php + - src/Models/Operations/SortOrder.php - src/Models/Operations/Three.php - src/Models/Operations/TrackLeadRequestBody.php - src/Models/Operations/TrackLeadResponse.php @@ -646,7 +656,7 @@ examples: "500": application/json: {"error": {"code": "internal_server_error", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#internal-server_error"}} "200": - application/json: {"id": "", "domain": "lighthearted-kilogram.name", "key": "", "url": "https://impartial-dump.com", "trackConversion": false, "externalId": "", "archived": true, "expiresAt": "", "expiredUrl": "https://staid-garment.org", "password": "uL1dlrnUXohO_B9", "proxy": false, "title": "", "description": "Advanced incremental contingency", "image": "https://loremflickr.com/640/480", "video": "", "rewrite": true, "doIndex": true, "ios": "", "android": "", "publicStats": true, "tagId": "", "tags": [], "webhookIds": [""], "comments": "", "shortLink": "http://sweaty-executor.org", "qrCode": "http://impassioned-beast.name", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": "1009.66", "lastClicked": "", "leads": "3577.62", "sales": "6519.85", "saleAmount": "1325.85", "createdAt": "", "updatedAt": "", "projectId": "", "programId": ""} + application/json: {"id": "", "domain": "lighthearted-kilogram.name", "key": "", "url": "https://impartial-dump.com", "trackConversion": false, "externalId": "", "tenantId": "", "archived": true, "expiresAt": "", "expiredUrl": "https://staid-garment.org", "password": "uL1dlrnUXohO_B9", "proxy": false, "title": "", "description": "Advanced incremental contingency", "image": "https://loremflickr.com/640/480", "video": "", "rewrite": true, "doIndex": true, "ios": "", "android": "", "publicStats": true, "tagId": "", "tags": [], "webhookIds": [""], "comments": "", "shortLink": "http://sweaty-executor.org", "qrCode": "http://impassioned-beast.name", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": "1009.66", "lastClicked": "", "leads": "3577.62", "sales": "6519.85", "saleAmount": "1325.85", "createdAt": "", "updatedAt": "", "projectId": "", "programId": ""} getLinksCount: speakeasy-default-get-links-count: responses: @@ -696,7 +706,7 @@ examples: "500": application/json: {"error": {"code": "internal_server_error", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#internal-server_error"}} "200": - application/json: {"id": "", "domain": "ringed-blow.name", "key": "", "url": "https://monumental-spaghetti.name", "trackConversion": false, "externalId": "", "archived": true, "expiresAt": "", "expiredUrl": "https://joyous-relative.info", "password": "H9v5zJBmg5IWAUj", "proxy": false, "title": "", "description": "Seamless exuding focus group", "image": "https://loremflickr.com/640/480", "video": "", "rewrite": true, "doIndex": true, "ios": "", "android": "", "publicStats": true, "tagId": "", "tags": [], "webhookIds": ["", ""], "comments": "", "shortLink": "http://mundane-bee.biz", "qrCode": "http://fuzzy-fishbone.biz", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": "8930.92", "lastClicked": "", "leads": "2433.54", "sales": "21.08", "saleAmount": "7802.62", "createdAt": "", "updatedAt": "", "projectId": "", "programId": ""} + application/json: {"id": "", "domain": "ringed-blow.name", "key": "", "url": "https://monumental-spaghetti.name", "trackConversion": false, "externalId": "", "tenantId": "", "archived": true, "expiresAt": "", "expiredUrl": "https://joyous-relative.info", "password": "H9v5zJBmg5IWAUj", "proxy": false, "title": "", "description": "Seamless exuding focus group", "image": "https://loremflickr.com/640/480", "video": "", "rewrite": true, "doIndex": true, "ios": "", "android": "", "publicStats": true, "tagId": "", "tags": [], "webhookIds": ["", ""], "comments": "", "shortLink": "http://mundane-bee.biz", "qrCode": "http://fuzzy-fishbone.biz", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": "8930.92", "lastClicked": "", "leads": "2433.54", "sales": "21.08", "saleAmount": "7802.62", "createdAt": "", "updatedAt": "", "projectId": "", "programId": ""} deleteLink: speakeasy-default-delete-link: parameters: @@ -750,7 +760,7 @@ examples: "500": application/json: {"error": {"code": "internal_server_error", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#internal-server_error"}} "200": - application/json: {"id": "", "domain": "tidy-amazon.name", "key": "", "url": "http://grand-pupa.org", "trackConversion": false, "externalId": "", "archived": false, "expiresAt": "", "expiredUrl": "https://limited-hutch.org", "password": "vPKDk8CkuAMJjbG", "proxy": true, "title": "", "description": "Assimilated encompassing pricing structure", "image": "https://loremflickr.com/640/480", "video": "", "rewrite": false, "doIndex": true, "ios": "", "android": "", "publicStats": false, "tagId": "", "tags": [], "webhookIds": ["", "", ""], "comments": "", "shortLink": "http://boiling-latitude.info", "qrCode": "http://exciting-curry.info", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": "3529.33", "lastClicked": "", "leads": "6476.71", "sales": "8246.79", "saleAmount": "4518.6", "createdAt": "", "updatedAt": "", "projectId": "", "programId": ""} + application/json: {"id": "", "domain": "tidy-amazon.name", "key": "", "url": "http://grand-pupa.org", "trackConversion": false, "externalId": "", "tenantId": "", "archived": false, "expiresAt": "", "expiredUrl": "https://limited-hutch.org", "password": "vPKDk8CkuAMJjbG", "proxy": true, "title": "", "description": "Assimilated encompassing pricing structure", "image": "https://loremflickr.com/640/480", "video": "", "rewrite": false, "doIndex": true, "ios": "", "android": "", "publicStats": false, "tagId": "", "tags": [], "webhookIds": ["", "", ""], "comments": "", "shortLink": "http://boiling-latitude.info", "qrCode": "http://exciting-curry.info", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": "3529.33", "lastClicked": "", "leads": "6476.71", "sales": "8246.79", "saleAmount": "4518.6", "createdAt": "", "updatedAt": "", "projectId": "", "programId": ""} bulkCreateLinks: speakeasy-default-bulk-create-links: requestBody: @@ -851,7 +861,7 @@ examples: "500": application/json: {"error": {"code": "internal_server_error", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#internal-server_error"}} "200": - application/json: {"id": "", "domain": "monthly-hometown.info", "key": "", "url": "https://honored-equality.info", "trackConversion": false, "externalId": "", "archived": true, "expiresAt": "", "expiredUrl": "http://smart-toenail.com", "password": "ZDcrQrPcHBWicBf", "proxy": false, "title": "", "description": "Synergized 3rd generation local area network", "image": "https://loremflickr.com/640/480", "video": "", "rewrite": true, "doIndex": false, "ios": "", "android": "", "publicStats": true, "tagId": "", "tags": [], "webhookIds": ["", ""], "comments": "", "shortLink": "https://anguished-wiseguy.org", "qrCode": "https://well-documented-snowman.com", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": "8112.06", "lastClicked": "", "leads": "3096.04", "sales": "8082.68", "saleAmount": "4842.28", "createdAt": "", "updatedAt": "", "projectId": "", "programId": ""} + application/json: {"id": "", "domain": "monthly-hometown.info", "key": "", "url": "https://honored-equality.info", "trackConversion": false, "externalId": "", "tenantId": "", "archived": true, "expiresAt": "", "expiredUrl": "http://smart-toenail.com", "password": "ZDcrQrPcHBWicBf", "proxy": false, "title": "", "description": "Synergized 3rd generation local area network", "image": "https://loremflickr.com/640/480", "video": "", "rewrite": true, "doIndex": false, "ios": "", "android": "", "publicStats": true, "tagId": "", "tags": [], "webhookIds": ["", ""], "comments": "", "shortLink": "https://anguished-wiseguy.org", "qrCode": "https://well-documented-snowman.com", "utm_source": "", "utm_medium": "", "utm_campaign": "", "utm_term": "", "utm_content": "", "userId": "", "workspaceId": "", "clicks": "8112.06", "lastClicked": "", "leads": "3096.04", "sales": "8082.68", "saleAmount": "4842.28", "createdAt": "", "updatedAt": "", "projectId": "", "programId": ""} getQRCode: speakeasy-default-get-QR-code: parameters: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index e99446e..5d7f243 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -13,7 +13,7 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false php: - version: 0.11.12 + version: 0.11.13 additionalDependencies: autoload: {} autoload-dev: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 79db05b..7a91c3b 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.462.2 +speakeasyVersion: 1.468.2 sources: dub: sourceNamespace: dub - sourceRevisionDigest: sha256:75158f131f835fd2874a87df6b2024eb4061d15610b61490fc9d52fce6d45e06 - sourceBlobDigest: sha256:92f1737af067df0a426e19c6f461d5f97f94768ba5dcf52752994c635240ed36 + sourceRevisionDigest: sha256:43c54b15d5e3b8dbfdf06770fa74bdd295946eeddb65091ec1ad855898d1c450 + sourceBlobDigest: sha256:e455cd12338a6074213fe801f891abdf883b45dae8c4f90f6ac421ee4b3c4449 tags: - latest - - speakeasy-sdk-regen-1735949948 + - speakeasy-sdk-regen-1736295578 - 0.0.1 targets: my-first-target: source: dub sourceNamespace: dub - sourceRevisionDigest: sha256:75158f131f835fd2874a87df6b2024eb4061d15610b61490fc9d52fce6d45e06 - sourceBlobDigest: sha256:92f1737af067df0a426e19c6f461d5f97f94768ba5dcf52752994c635240ed36 + sourceRevisionDigest: sha256:43c54b15d5e3b8dbfdf06770fa74bdd295946eeddb65091ec1ad855898d1c450 + sourceBlobDigest: sha256:e455cd12338a6074213fe801f891abdf883b45dae8c4f90f6ac421ee4b3c4449 codeSamplesNamespace: code-samples-php-my-first-target - codeSamplesRevisionDigest: sha256:a27be952e49976b0c2c8005aab7ee47c71e8d49395a64ffbb7e6b87fdf49c973 + codeSamplesRevisionDigest: sha256:1adcfada46e7f4118ceb2849f172f61931d78065f3db63da652238f4566a8e13 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index d585717..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,26 +0,0 @@ -# Contributing to This Repository - -Thank you for your interest in contributing to this repository. Please note that this repository contains generated code. As such, we do not accept direct changes or pull requests. Instead, we encourage you to follow the guidelines below to report issues and suggest improvements. - -## How to Report Issues - -If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please provide as much detail as possible to help us reproduce the problem. This includes: - -- A clear and descriptive title -- Steps to reproduce the issue -- Expected and actual behavior -- Any relevant logs, screenshots, or error messages -- Information about your environment (e.g., operating system, software versions) - - For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed - -## Issue Triage and Upstream Fixes - -We will review and triage issues as quickly as possible. Our goal is to address bugs and incorporate improvements in the upstream source code. Fixes will be included in the next generation of the generated code. - -## Contact - -If you have any questions or need further assistance, please feel free to reach out by opening an issue. - -Thank you for your understanding and cooperation! - -The Maintainers diff --git a/README.md b/README.md index 19ffbae..735bc87 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = new Operations\CreateLinkRequestBody( url: 'https://google.com', @@ -84,9 +86,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = new Operations\UpsertLinkRequestBody( url: 'https://google.com', @@ -196,9 +200,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = new Operations\GetLinksRequest( page: 1, @@ -257,9 +263,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); try { $request = [ @@ -276,7 +284,7 @@ try { request: $request ); - if ($response->linkSchemas !== null) { + if ($response->responseBodies !== null) { // handle response } } catch (Errors\BadRequestThrowable $e) { @@ -327,11 +335,12 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - $sdk = Dub\Dub::builder() ->setServerURL('https://api.dub.co') - ->setSecurity($security)->build(); + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = [ new Operations\RequestBody( @@ -347,7 +356,7 @@ $response = $sdk->links->createMany( request: $request ); -if ($response->linkSchemas !== null) { +if ($response->responseBodies !== null) { // handle response } ``` diff --git a/RELEASES.md b/RELEASES.md index 6941708..5d8f8ab 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -570,4 +570,14 @@ Based on: ### Generated - [php v0.11.12] . ### Releases -- [Composer v0.11.12] https://packagist.org/packages/dub/dub-php#v0.11.12 - . \ No newline at end of file +- [Composer v0.11.12] https://packagist.org/packages/dub/dub-php#v0.11.12 - . + +## 2025-01-12 00:21:38 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.468.2 (2.493.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [php v0.11.13] . +### Releases +- [Composer v0.11.13] https://packagist.org/packages/dub/dub-php#v0.11.13 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 41b4b01..86db759 100644 --- a/USAGE.md +++ b/USAGE.md @@ -7,9 +7,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = new Operations\CreateLinkRequestBody( url: 'https://google.com', @@ -36,9 +38,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = new Operations\UpsertLinkRequestBody( url: 'https://google.com', diff --git a/codeSamples.yaml b/codeSamples.yaml index a109066..768ef79 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -8,190 +8,190 @@ actions: "x-codeSamples": - "lang": "php" "label": "retrieveAnalytics" - "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\\RetrieveAnalyticsRequest(\n timezone: 'America/New_York',\n city: 'New York',\n device: 'Desktop',\n browser: 'Chrome',\n os: 'Windows',\n referer: 'google.com',\n refererUrl: 'https://dub.co/blog',\n);\n\n$response = $sdk->analytics->retrieve(\n request: $request\n);\n\nif ($response->oneOf !== null) {\n // handle response\n}" + "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\\RetrieveAnalyticsRequest(\n timezone: 'America/New_York',\n city: 'New York',\n device: 'Desktop',\n browser: 'Chrome',\n os: 'Windows',\n referer: 'google.com',\n refererUrl: 'https://dub.co/blog',\n);\n\n$response = $sdk->analytics->retrieve(\n request: $request\n);\n\nif ($response->oneOf !== null) {\n // handle response\n}" - target: $["paths"]["/customers"]["get"] update: "x-codeSamples": - "lang": "php" "label": "getCustomers" - "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->customers->list(\n email: 'Kassandra.Daugherty@hotmail.com',\n externalId: '',\n includeExpandedFields: false\n\n);\n\nif ($response->responseBodies !== null) {\n // handle response\n}" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n\n\n$response = $sdk->customers->list(\n email: 'Kassandra.Daugherty@hotmail.com',\n externalId: '',\n includeExpandedFields: false\n\n);\n\nif ($response->responseBodies !== null) {\n // handle response\n}" - target: $["paths"]["/customers"]["post"] update: "x-codeSamples": - "lang": "php" "label": "createCustomer" - "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\\CreateCustomerRequestBody(\n externalId: '',\n);\n\n$response = $sdk->customers->create(\n request: $request\n);\n\nif ($response->object !== null) {\n // handle response\n}" + "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\\CreateCustomerRequestBody(\n externalId: '',\n);\n\n$response = $sdk->customers->create(\n request: $request\n);\n\nif ($response->object !== null) {\n // handle response\n}" - target: $["paths"]["/customers/{id}"]["delete"] update: "x-codeSamples": - "lang": "php" "label": "deleteCustomer" - "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->customers->delete(\n id: ''\n);\n\nif ($response->object !== null) {\n // handle response\n}" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n\n\n$response = $sdk->customers->delete(\n id: ''\n);\n\nif ($response->object !== null) {\n // handle response\n}" - target: $["paths"]["/customers/{id}"]["get"] update: "x-codeSamples": - "lang": "php" "label": "getCustomer" - "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->customers->get(\n id: '',\n includeExpandedFields: false\n\n);\n\nif ($response->object !== null) {\n // handle response\n}" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n\n\n$response = $sdk->customers->get(\n id: '',\n includeExpandedFields: false\n\n);\n\nif ($response->object !== null) {\n // handle response\n}" - target: $["paths"]["/customers/{id}"]["patch"] update: "x-codeSamples": - "lang": "php" "label": "updateCustomer" - "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\\UpdateCustomerRequest(\n id: '',\n);\n\n$response = $sdk->customers->update(\n request: $request\n);\n\nif ($response->object !== null) {\n // handle response\n}" + "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\\UpdateCustomerRequest(\n id: '',\n);\n\n$response = $sdk->customers->update(\n request: $request\n);\n\nif ($response->object !== null) {\n // handle response\n}" - target: $["paths"]["/domains"]["get"] update: "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$responses = $sdk->domains->list(\n archived: true,\n search: '',\n page: 1,\n pageSize: 50\n\n);\n\n\nforeach ($responses as $response) {\n if ($response->statusCode === 200) {\n // handle response\n }\n}" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n\n\n$responses = $sdk->domains->list(\n archived: true,\n search: '',\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": - "lang": "php" "label": "createDomain" - "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\\CreateDomainRequestBody(\n slug: 'acme.com',\n expiredUrl: 'https://acme.com/expired',\n notFoundUrl: 'https://acme.com/not-found',\n archived: false,\n placeholder: 'https://dub.co/help/article/what-is-dub',\n);\n\n$response = $sdk->domains->create(\n request: $request\n);\n\nif ($response->domainSchema !== null) {\n // handle response\n}" + "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\\CreateDomainRequestBody(\n slug: 'acme.com',\n expiredUrl: 'https://acme.com/expired',\n notFoundUrl: 'https://acme.com/not-found',\n archived: false,\n placeholder: 'https://dub.co/help/article/what-is-dub',\n);\n\n$response = $sdk->domains->create(\n request: $request\n);\n\nif ($response->domainSchema !== null) {\n // handle response\n}" - target: $["paths"]["/domains/{slug}"]["delete"] update: "x-codeSamples": - "lang": "php" "label": "deleteDomain" - "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->delete(\n slug: 'acme.com'\n);\n\nif ($response->object !== null) {\n // handle response\n}" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n\n\n$response = $sdk->domains->delete(\n slug: 'acme.com'\n);\n\nif ($response->object !== null) {\n // handle response\n}" - target: $["paths"]["/domains/{slug}"]["patch"] update: "x-codeSamples": - "lang": "php" "label": "updateDomain" - "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$requestBody = new Operations\\UpdateDomainRequestBody(\n slug: 'acme.com',\n expiredUrl: 'https://acme.com/expired',\n notFoundUrl: 'https://acme.com/not-found',\n archived: false,\n placeholder: 'https://dub.co/help/article/what-is-dub',\n);\n\n$response = $sdk->domains->update(\n slug: 'acme.com',\n requestBody: $requestBody\n\n);\n\nif ($response->domainSchema !== null) {\n // handle response\n}" + "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$requestBody = new Operations\\UpdateDomainRequestBody(\n slug: 'acme.com',\n expiredUrl: 'https://acme.com/expired',\n notFoundUrl: 'https://acme.com/not-found',\n archived: false,\n placeholder: 'https://dub.co/help/article/what-is-dub',\n);\n\n$response = $sdk->domains->update(\n slug: 'acme.com',\n requestBody: $requestBody\n\n);\n\nif ($response->domainSchema !== null) {\n // handle response\n}" - target: $["paths"]["/events"]["get"] update: "x-codeSamples": - "lang": "php" "label": "listEvents" - "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\\ListEventsRequest(\n timezone: 'America/New_York',\n city: 'New York',\n device: 'Desktop',\n browser: 'Chrome',\n os: 'Windows',\n referer: 'google.com',\n refererUrl: 'https://dub.co/blog',\n);\n\n$response = $sdk->events->list(\n request: $request\n);\n\nif ($response->clickEvents !== null) {\n // handle response\n}" + "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\\ListEventsRequest(\n timezone: 'America/New_York',\n city: 'New York',\n device: 'Desktop',\n browser: 'Chrome',\n os: 'Windows',\n referer: 'google.com',\n refererUrl: 'https://dub.co/blog',\n);\n\n$response = $sdk->events->list(\n request: $request\n);\n\nif ($response->clickEvents !== null) {\n // handle response\n}" - target: $["paths"]["/links"]["get"] update: "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$responses = $sdk->links->list(\n request: $request\n);\n\n\nforeach ($responses as $response) {\n if ($response->statusCode === 200) {\n // handle response\n }\n}" + "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\\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": - "lang": "php" "label": "createLink" - "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\\CreateLinkRequestBody(\n url: 'https://google.com',\n externalId: '123456',\n tagIds: [\n 'clux0rgak00011...',\n ],\n);\n\n$response = $sdk->links->create(\n request: $request\n);\n\nif ($response->linkSchema !== null) {\n // handle response\n}" + "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\\CreateLinkRequestBody(\n url: 'https://google.com',\n externalId: '123456',\n tagIds: [\n 'clux0rgak00011...',\n ],\n);\n\n$response = $sdk->links->create(\n request: $request\n);\n\nif ($response->linkSchema !== null) {\n // handle response\n}" - target: $["paths"]["/links/bulk"]["delete"] update: "x-codeSamples": - "lang": "php" "label": "bulkDeleteLinks" - "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->links->deleteMany(\n linkIds: [\n 'clux0rgak00011...',\n 'clux0rgak00022...',\n ]\n);\n\nif ($response->object !== null) {\n // handle response\n}" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n\n\n$response = $sdk->links->deleteMany(\n linkIds: [\n 'clux0rgak00011...',\n 'clux0rgak00022...',\n ]\n);\n\nif ($response->object !== null) {\n // handle response\n}" - target: $["paths"]["/links/bulk"]["patch"] update: "x-codeSamples": - "lang": "php" "label": "bulkUpdateLinks" - "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\\BulkUpdateLinksRequestBody(\n data: new Operations\\Data(\n url: 'https://google.com',\n tagIds: [\n 'clux0rgak00011...',\n ],\n ),\n);\n\n$response = $sdk->links->updateMany(\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$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n$request = new Operations\\BulkUpdateLinksRequestBody(\n data: new Operations\\Data(\n url: 'https://google.com',\n tagIds: [\n 'clux0rgak00011...',\n ],\n ),\n);\n\n$response = $sdk->links->updateMany(\n request: $request\n);\n\nif ($response->linkSchemas !== null) {\n // handle response\n}" - target: $["paths"]["/links/bulk"]["post"] update: "x-codeSamples": - "lang": "php" "label": "bulkCreateLinks" - "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 = [\n new Operations\\RequestBody(\n url: 'https://google.com',\n externalId: '123456',\n tagIds: [\n 'clux0rgak00011...',\n ],\n ),\n];\n\n$response = $sdk->links->createMany(\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$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n$request = [\n new Operations\\RequestBody(\n url: 'https://google.com',\n externalId: '123456',\n tagIds: [\n 'clux0rgak00011...',\n ],\n ),\n];\n\n$response = $sdk->links->createMany(\n request: $request\n);\n\nif ($response->responseBodies !== null) {\n // handle response\n}" - target: $["paths"]["/links/count"]["get"] update: "x-codeSamples": - "lang": "php" "label": "getLinksCount" - "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\\GetLinksCountRequest();\n\n$response = $sdk->links->count(\n request: $request\n);\n\nif ($response->number !== null) {\n // handle response\n}" + "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\\GetLinksCountRequest();\n\n$response = $sdk->links->count(\n request: $request\n);\n\nif ($response->number !== null) {\n // handle response\n}" - target: $["paths"]["/links/info"]["get"] update: "x-codeSamples": - "lang": "php" "label": "getLinkInfo" - "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->links->get(\n domain: 'rural-mathematics.name',\n key: '',\n linkId: 'clux0rgak00011...',\n externalId: '123456'\n\n);\n\nif ($response->linkSchema !== null) {\n // handle response\n}" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n\n\n$response = $sdk->links->get(\n domain: 'rural-mathematics.name',\n key: '',\n linkId: 'clux0rgak00011...',\n externalId: '123456'\n\n);\n\nif ($response->linkSchema !== null) {\n // handle response\n}" - target: $["paths"]["/links/upsert"]["put"] update: "x-codeSamples": - "lang": "php" "label": "upsertLink" - "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\\UpsertLinkRequestBody(\n url: 'https://google.com',\n externalId: '123456',\n tagIds: [\n 'clux0rgak00011...',\n ],\n);\n\n$response = $sdk->links->upsert(\n request: $request\n);\n\nif ($response->linkSchema !== null) {\n // handle response\n}" + "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\\UpsertLinkRequestBody(\n url: 'https://google.com',\n externalId: '123456',\n tagIds: [\n 'clux0rgak00011...',\n ],\n);\n\n$response = $sdk->links->upsert(\n request: $request\n);\n\nif ($response->linkSchema !== null) {\n // handle response\n}" - target: $["paths"]["/links/{linkId}"]["delete"] update: "x-codeSamples": - "lang": "php" "label": "deleteLink" - "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->links->delete(\n linkId: ''\n);\n\nif ($response->object !== null) {\n // handle response\n}" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n\n\n$response = $sdk->links->delete(\n linkId: ''\n);\n\nif ($response->object !== null) {\n // handle response\n}" - target: $["paths"]["/links/{linkId}"]["patch"] update: "x-codeSamples": - "lang": "php" "label": "updateLink" - "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$requestBody = new Operations\\UpdateLinkRequestBody(\n url: 'https://google.com',\n externalId: '123456',\n tagIds: [\n 'clux0rgak00011...',\n ],\n);\n\n$response = $sdk->links->update(\n linkId: '',\n requestBody: $requestBody\n\n);\n\nif ($response->linkSchema !== null) {\n // handle response\n}" + "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$requestBody = new Operations\\UpdateLinkRequestBody(\n url: 'https://google.com',\n externalId: '123456',\n tagIds: [\n 'clux0rgak00011...',\n ],\n);\n\n$response = $sdk->links->update(\n linkId: '',\n requestBody: $requestBody\n\n);\n\nif ($response->linkSchema !== null) {\n // handle response\n}" - target: $["paths"]["/metatags"]["get"] update: "x-codeSamples": - "lang": "php" "label": "getMetatags" - "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->metatags->get(\n url: 'https://dub.co'\n);\n\nif ($response->object !== null) {\n // handle response\n}" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n\n\n$response = $sdk->metatags->get(\n url: 'https://dub.co'\n);\n\nif ($response->object !== null) {\n // handle response\n}" - target: $["paths"]["/qr"]["get"] update: "x-codeSamples": - "lang": "php" "label": "getQRCode" - "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\\GetQRCodeRequest(\n url: 'https://normal-making.name',\n);\n\n$response = $sdk->qrCodes->get(\n request: $request\n);\n\nif ($response->res !== null) {\n // handle response\n}" + "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\\GetQRCodeRequest(\n url: 'https://normal-making.name',\n);\n\n$response = $sdk->qrCodes->get(\n request: $request\n);\n\nif ($response->res !== null) {\n // handle response\n}" - target: $["paths"]["/tags"]["get"] update: "x-codeSamples": - "lang": "php" "label": "getTags" - "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->tags->list(\n\n);\n\nif ($response->tagSchemas !== null) {\n // handle response\n}" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n\n\n$response = $sdk->tags->list(\n\n);\n\nif ($response->tagSchemas !== null) {\n // handle response\n}" - target: $["paths"]["/tags"]["post"] update: "x-codeSamples": - "lang": "php" "label": "createTag" - "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\\CreateTagRequestBody();\n\n$response = $sdk->tags->create(\n request: $request\n);\n\nif ($response->tagSchema !== null) {\n // handle response\n}" + "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\\CreateTagRequestBody();\n\n$response = $sdk->tags->create(\n request: $request\n);\n\nif ($response->tagSchema !== null) {\n // handle response\n}" - target: $["paths"]["/tags/{id}"]["delete"] update: "x-codeSamples": - "lang": "php" "label": "deleteTag" - "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->tags->delete(\n id: ''\n);\n\nif ($response->object !== null) {\n // handle response\n}" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n\n\n$response = $sdk->tags->delete(\n id: ''\n);\n\nif ($response->object !== null) {\n // handle response\n}" - target: $["paths"]["/tags/{id}"]["patch"] update: "x-codeSamples": - "lang": "php" "label": "updateTag" - "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$requestBody = new Operations\\UpdateTagRequestBody();\n\n$response = $sdk->tags->update(\n id: '',\n requestBody: $requestBody\n\n);\n\nif ($response->tagSchema !== null) {\n // handle response\n}" + "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$requestBody = new Operations\\UpdateTagRequestBody();\n\n$response = $sdk->tags->update(\n id: '',\n requestBody: $requestBody\n\n);\n\nif ($response->tagSchema !== null) {\n // handle response\n}" - target: $["paths"]["/tokens/embed"]["post"] update: "x-codeSamples": - "lang": "php" "label": "createEmbedToken" - "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\\CreateEmbedTokenRequestBody(\n linkId: '',\n);\n\n$response = $sdk->embedTokens->create(\n request: $request\n);\n\nif ($response->object !== null) {\n // handle response\n}" + "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\\CreateEmbedTokenRequestBody(\n linkId: '',\n);\n\n$response = $sdk->embedTokens->create(\n request: $request\n);\n\nif ($response->object !== null) {\n // handle response\n}" - target: $["paths"]["/track/lead"]["post"] update: "x-codeSamples": - "lang": "php" "label": "trackLead" - "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\\TrackLeadRequestBody(\n clickId: '',\n eventName: 'Sign up',\n);\n\n$response = $sdk->track->lead(\n request: $request\n);\n\nif ($response->object !== null) {\n // handle response\n}" + "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\\TrackLeadRequestBody(\n clickId: '',\n eventName: 'Sign up',\n);\n\n$response = $sdk->track->lead(\n request: $request\n);\n\nif ($response->object !== null) {\n // handle response\n}" - target: $["paths"]["/track/sale"]["post"] update: "x-codeSamples": - "lang": "php" "label": "trackSale" - "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\\TrackSaleRequestBody(\n amount: 996500,\n paymentProcessor: Operations\\PaymentProcessor::Paddle,\n eventName: 'Purchase',\n);\n\n$response = $sdk->track->sale(\n request: $request\n);\n\nif ($response->object !== null) {\n // handle response\n}" + "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\\TrackSaleRequestBody(\n amount: 996500,\n paymentProcessor: Operations\\PaymentProcessor::Paddle,\n eventName: 'Purchase',\n);\n\n$response = $sdk->track->sale(\n request: $request\n);\n\nif ($response->object !== null) {\n // handle response\n}" - target: $["paths"]["/workspaces/{idOrSlug}"]["get"] update: "x-codeSamples": - "lang": "php" "label": "getWorkspace" - "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->workspaces->get(\n idOrSlug: ''\n);\n\nif ($response->workspaceSchema !== null) {\n // handle response\n}" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n\n\n$response = $sdk->workspaces->get(\n idOrSlug: ''\n);\n\nif ($response->workspaceSchema !== null) {\n // handle response\n}" - target: $["paths"]["/workspaces/{idOrSlug}"]["patch"] update: "x-codeSamples": - "lang": "php" "label": "updateWorkspace" - "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$requestBody = new Operations\\UpdateWorkspaceRequestBody();\n\n$response = $sdk->workspaces->update(\n idOrSlug: '',\n requestBody: $requestBody\n\n);\n\nif ($response->workspaceSchema !== null) {\n // handle response\n}" + "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$requestBody = new Operations\\UpdateWorkspaceRequestBody();\n\n$response = $sdk->workspaces->update(\n idOrSlug: '',\n requestBody: $requestBody\n\n);\n\nif ($response->workspaceSchema !== null) {\n // handle response\n}" diff --git a/composer.json b/composer.json index 3c59615..3d7dfbb 100644 --- a/composer.json +++ b/composer.json @@ -18,9 +18,8 @@ }, "require-dev": { "laravel/pint": "^1.18.1", - "phpstan/phpstan": "^1.12", + "phpstan/phpstan": "^2.1.0", "phpunit/phpunit": "^10", - "rector/rector": "^0.19", "roave/security-advisories": "dev-latest" }, "minimum-stability": "stable", diff --git a/docs/Models/Components/Code.md b/docs/Models/Components/Code.md new file mode 100644 index 0000000..66af8cf --- /dev/null +++ b/docs/Models/Components/Code.md @@ -0,0 +1,20 @@ +# Code + +The error code. + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `BadRequest` | bad_request | +| `NotFound` | not_found | +| `InternalServerError` | internal_server_error | +| `Unauthorized` | unauthorized | +| `Forbidden` | forbidden | +| `RateLimitExceeded` | rate_limit_exceeded | +| `InviteExpired` | invite_expired | +| `InvitePending` | invite_pending | +| `ExceededLimit` | exceeded_limit | +| `Conflict` | conflict | +| `UnprocessableEntity` | unprocessable_entity | \ No newline at end of file diff --git a/docs/Models/Components/Data.md b/docs/Models/Components/Data.md index 32bc2e1..b29a49b 100644 --- a/docs/Models/Components/Data.md +++ b/docs/Models/Components/Data.md @@ -19,7 +19,8 @@ | `updatedAt` | *string* | :heavy_check_mark: | N/A | | ~~`projectId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The project ID of the short link. This field is deprecated – use `workspaceId` instead. | | `trackConversion` | *?bool* | :heavy_minus_sign: | N/A | -| `externalId` | *string* | :heavy_check_mark: | This is the ID of the link in your database that is unique across your workspace. 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. | +| `externalId` | *string* | :heavy_check_mark: | 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. | +| `tenantId` | *string* | :heavy_check_mark: | 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. | | `archived` | *?bool* | :heavy_minus_sign: | N/A | | `expiredUrl` | *string* | :heavy_check_mark: | N/A | | `password` | *string* | :heavy_check_mark: | The password required to access the destination URL of the short link. | @@ -44,7 +45,7 @@ | `utmContent` | *string* | :heavy_check_mark: | The UTM content of the short link. | | `userId` | *string* | :heavy_check_mark: | N/A | | `clicks` | *?float* | :heavy_minus_sign: | The number of clicks on the short link. | -| `leads` | *?float* | :heavy_minus_sign: | [BETA]: The number of leads the short links has generated. | -| `sales` | *?float* | :heavy_minus_sign: | [BETA]: The number of sales the short links has generated. | -| `saleAmount` | *?float* | :heavy_minus_sign: | [BETA]: The total dollar amount of sales the short links has generated (in cents). | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads the short links has generated. | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales the short links has generated. | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total dollar amount of sales the short links has generated (in cents). | | `programId` | *string* | :heavy_check_mark: | The ID of the program the short link is associated with. | \ No newline at end of file diff --git a/docs/Models/Components/LeadCreatedEventLink.md b/docs/Models/Components/LeadCreatedEventLink.md index a827131..2fa06c8 100644 --- a/docs/Models/Components/LeadCreatedEventLink.md +++ b/docs/Models/Components/LeadCreatedEventLink.md @@ -19,7 +19,8 @@ | `updatedAt` | *string* | :heavy_check_mark: | N/A | | ~~`projectId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The project ID of the short link. This field is deprecated – use `workspaceId` instead. | | `trackConversion` | *?bool* | :heavy_minus_sign: | N/A | -| `externalId` | *string* | :heavy_check_mark: | This is the ID of the link in your database that is unique across your workspace. 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. | +| `externalId` | *string* | :heavy_check_mark: | 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. | +| `tenantId` | *string* | :heavy_check_mark: | 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. | | `archived` | *?bool* | :heavy_minus_sign: | N/A | | `expiredUrl` | *string* | :heavy_check_mark: | N/A | | `password` | *string* | :heavy_check_mark: | The password required to access the destination URL of the short link. | @@ -44,7 +45,7 @@ | `utmContent` | *string* | :heavy_check_mark: | The UTM content of the short link. | | `userId` | *string* | :heavy_check_mark: | N/A | | `clicks` | *?float* | :heavy_minus_sign: | The number of clicks on the short link. | -| `leads` | *?float* | :heavy_minus_sign: | [BETA]: The number of leads the short links has generated. | -| `sales` | *?float* | :heavy_minus_sign: | [BETA]: The number of sales the short links has generated. | -| `saleAmount` | *?float* | :heavy_minus_sign: | [BETA]: The total dollar amount of sales the short links has generated (in cents). | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads the short links has generated. | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales the short links has generated. | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total dollar amount of sales the short links has generated (in cents). | | `programId` | *string* | :heavy_check_mark: | The ID of the program the short link is associated with. | \ No newline at end of file diff --git a/docs/Models/Components/Link.md b/docs/Models/Components/Link.md index 7959b18..eaaa650 100644 --- a/docs/Models/Components/Link.md +++ b/docs/Models/Components/Link.md @@ -19,7 +19,8 @@ | `updatedAt` | *string* | :heavy_check_mark: | N/A | | ~~`projectId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The project ID of the short link. This field is deprecated – use `workspaceId` instead. | | `trackConversion` | *?bool* | :heavy_minus_sign: | N/A | -| `externalId` | *string* | :heavy_check_mark: | This is the ID of the link in your database that is unique across your workspace. 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. | +| `externalId` | *string* | :heavy_check_mark: | 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. | +| `tenantId` | *string* | :heavy_check_mark: | 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. | | `archived` | *?bool* | :heavy_minus_sign: | N/A | | `expiredUrl` | *string* | :heavy_check_mark: | N/A | | `password` | *string* | :heavy_check_mark: | The password required to access the destination URL of the short link. | @@ -44,7 +45,7 @@ | `utmContent` | *string* | :heavy_check_mark: | The UTM content of the short link. | | `userId` | *string* | :heavy_check_mark: | N/A | | `clicks` | *?float* | :heavy_minus_sign: | The number of clicks on the short link. | -| `leads` | *?float* | :heavy_minus_sign: | [BETA]: The number of leads the short links has generated. | -| `sales` | *?float* | :heavy_minus_sign: | [BETA]: The number of sales the short links has generated. | -| `saleAmount` | *?float* | :heavy_minus_sign: | [BETA]: The total dollar amount of sales the short links has generated (in cents). | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads the short links has generated. | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales the short links has generated. | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total dollar amount of sales the short links has generated (in cents). | | `programId` | *string* | :heavy_check_mark: | The ID of the program the short link is associated with. | \ No newline at end of file diff --git a/docs/Models/Components/LinkClickedEventLink.md b/docs/Models/Components/LinkClickedEventLink.md index 61e9688..9f2576b 100644 --- a/docs/Models/Components/LinkClickedEventLink.md +++ b/docs/Models/Components/LinkClickedEventLink.md @@ -19,7 +19,8 @@ | `updatedAt` | *string* | :heavy_check_mark: | N/A | | ~~`projectId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The project ID of the short link. This field is deprecated – use `workspaceId` instead. | | `trackConversion` | *?bool* | :heavy_minus_sign: | N/A | -| `externalId` | *string* | :heavy_check_mark: | This is the ID of the link in your database that is unique across your workspace. 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. | +| `externalId` | *string* | :heavy_check_mark: | 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. | +| `tenantId` | *string* | :heavy_check_mark: | 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. | | `archived` | *?bool* | :heavy_minus_sign: | N/A | | `expiredUrl` | *string* | :heavy_check_mark: | N/A | | `password` | *string* | :heavy_check_mark: | The password required to access the destination URL of the short link. | @@ -44,7 +45,7 @@ | `utmContent` | *string* | :heavy_check_mark: | The UTM content of the short link. | | `userId` | *string* | :heavy_check_mark: | N/A | | `clicks` | *?float* | :heavy_minus_sign: | The number of clicks on the short link. | -| `leads` | *?float* | :heavy_minus_sign: | [BETA]: The number of leads the short links has generated. | -| `sales` | *?float* | :heavy_minus_sign: | [BETA]: The number of sales the short links has generated. | -| `saleAmount` | *?float* | :heavy_minus_sign: | [BETA]: The total dollar amount of sales the short links has generated (in cents). | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads the short links has generated. | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales the short links has generated. | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total dollar amount of sales the short links has generated (in cents). | | `programId` | *string* | :heavy_check_mark: | The ID of the program the short link is associated with. | \ No newline at end of file diff --git a/docs/Models/Components/LinkErrorSchema.md b/docs/Models/Components/LinkErrorSchema.md new file mode 100644 index 0000000..b85de5d --- /dev/null +++ b/docs/Models/Components/LinkErrorSchema.md @@ -0,0 +1,10 @@ +# LinkErrorSchema + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `error` | *string* | :heavy_check_mark: | The error message. | +| `code` | [Components\Code](../../Models/Components/Code.md) | :heavy_check_mark: | The error code. | +| `link` | *mixed* | :heavy_minus_sign: | The link that caused the error. | \ No newline at end of file diff --git a/docs/Models/Components/LinkSchema.md b/docs/Models/Components/LinkSchema.md index 9398f5b..d73c78d 100644 --- a/docs/Models/Components/LinkSchema.md +++ b/docs/Models/Components/LinkSchema.md @@ -16,8 +16,9 @@ | `createdAt` | *string* | :heavy_check_mark: | The date and time when the short link was created. | | `updatedAt` | *string* | :heavy_check_mark: | The date and time when the short link was last updated. | | ~~`projectId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The project ID of the short link. This field is deprecated – use `workspaceId` instead. | -| `trackConversion` | *?bool* | :heavy_minus_sign: | [BETA] Whether to track conversions for the short link. | -| `externalId` | *string* | :heavy_check_mark: | This is the ID of the link in your database that is unique across your workspace. 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. | +| `trackConversion` | *?bool* | :heavy_minus_sign: | Whether to track conversions for the short link. | +| `externalId` | *string* | :heavy_check_mark: | 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. | +| `tenantId` | *string* | :heavy_check_mark: | 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. | | `archived` | *?bool* | :heavy_minus_sign: | Whether the short link is archived. | | `expiresAt` | *string* | :heavy_check_mark: | The date and time when the short link will expire in ISO-8601 format. | | `expiredUrl` | *string* | :heavy_check_mark: | The URL to redirect to when the short link has expired. | @@ -44,7 +45,7 @@ | `userId` | *string* | :heavy_check_mark: | The user ID of the creator of the short link. | | `clicks` | *?float* | :heavy_minus_sign: | The number of clicks on the short link. | | `lastClicked` | *string* | :heavy_check_mark: | The date and time when the short link was last clicked. | -| `leads` | *?float* | :heavy_minus_sign: | [BETA]: The number of leads the short links has generated. | -| `sales` | *?float* | :heavy_minus_sign: | [BETA]: The number of sales the short links has generated. | -| `saleAmount` | *?float* | :heavy_minus_sign: | [BETA]: The total dollar amount of sales the short links has generated (in cents). | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads the short links has generated. | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales the short links has generated. | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total dollar amount of sales the short links has generated (in cents). | | `programId` | *string* | :heavy_check_mark: | The ID of the program the short link is associated with. | \ No newline at end of file diff --git a/docs/Models/Components/SaleCreatedEventLink.md b/docs/Models/Components/SaleCreatedEventLink.md index 413f82a..c35c720 100644 --- a/docs/Models/Components/SaleCreatedEventLink.md +++ b/docs/Models/Components/SaleCreatedEventLink.md @@ -19,7 +19,8 @@ | `updatedAt` | *string* | :heavy_check_mark: | N/A | | ~~`projectId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The project ID of the short link. This field is deprecated – use `workspaceId` instead. | | `trackConversion` | *?bool* | :heavy_minus_sign: | N/A | -| `externalId` | *string* | :heavy_check_mark: | This is the ID of the link in your database that is unique across your workspace. 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. | +| `externalId` | *string* | :heavy_check_mark: | 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. | +| `tenantId` | *string* | :heavy_check_mark: | 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. | | `archived` | *?bool* | :heavy_minus_sign: | N/A | | `expiredUrl` | *string* | :heavy_check_mark: | N/A | | `password` | *string* | :heavy_check_mark: | The password required to access the destination URL of the short link. | @@ -44,7 +45,7 @@ | `utmContent` | *string* | :heavy_check_mark: | The UTM content of the short link. | | `userId` | *string* | :heavy_check_mark: | N/A | | `clicks` | *?float* | :heavy_minus_sign: | The number of clicks on the short link. | -| `leads` | *?float* | :heavy_minus_sign: | [BETA]: The number of leads the short links has generated. | -| `sales` | *?float* | :heavy_minus_sign: | [BETA]: The number of sales the short links has generated. | -| `saleAmount` | *?float* | :heavy_minus_sign: | [BETA]: The total dollar amount of sales the short links has generated (in cents). | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads the short links has generated. | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales the short links has generated. | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total dollar amount of sales the short links has generated (in cents). | | `programId` | *string* | :heavy_check_mark: | The ID of the program the short link is associated with. | \ No newline at end of file diff --git a/docs/Models/Components/WorkspaceSchema.md b/docs/Models/Components/WorkspaceSchema.md index 7035e4d..911c792 100644 --- a/docs/Models/Components/WorkspaceSchema.md +++ b/docs/Models/Components/WorkspaceSchema.md @@ -30,7 +30,7 @@ | `inviteCode` | *string* | :heavy_check_mark: | The invite code of the workspace. | | `stripeId` | *string* | :heavy_check_mark: | The Stripe ID of the workspace. | | `paymentFailedAt` | *string* | :heavy_check_mark: | The date and time when the payment failed for the workspace. | -| `stripeConnectId` | *string* | :heavy_check_mark: | [BETA – Dub Conversions]: The Stripe Connect ID of the workspace. | +| `stripeConnectId` | *string* | :heavy_check_mark: | The Stripe Connect ID of the workspace. | | `payoutMethodId` | *string* | :heavy_check_mark: | [BETA – Dub Partners]: The ID of the payment method for partner payouts. | | `flags` | array | :heavy_minus_sign: | The feature flags of the workspace, indicating which features are enabled. | | `logo` | *?string* | :heavy_minus_sign: | The logo of the workspace. | \ No newline at end of file diff --git a/docs/Models/Operations/BulkCreateLinksResponse.md b/docs/Models/Operations/BulkCreateLinksResponse.md index 9f5a033..ce90589 100644 --- a/docs/Models/Operations/BulkCreateLinksResponse.md +++ b/docs/Models/Operations/BulkCreateLinksResponse.md @@ -8,4 +8,4 @@ | `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `linkSchemas` | array<[Components\LinkSchema](../../Models/Components/LinkSchema.md)> | :heavy_minus_sign: | The created links | \ No newline at end of file +| `responseBodies` | array<[Components\LinkSchema\|Components\LinkErrorSchema](../../Models/Operations/ResponseBody.md)> | :heavy_minus_sign: | The created links | \ No newline at end of file diff --git a/docs/Models/Operations/CreateLinkRequestBody.md b/docs/Models/Operations/CreateLinkRequestBody.md index e92d50f..2643bb0 100644 --- a/docs/Models/Operations/CreateLinkRequestBody.md +++ b/docs/Models/Operations/CreateLinkRequestBody.md @@ -17,7 +17,8 @@ | `proxy` | *?bool* | :heavy_minus_sign: | Whether the short link uses Custom Social Media Cards feature. | | | `rewrite` | *?bool* | :heavy_minus_sign: | Whether the short link uses link cloaking. | | | `doIndex` | *?bool* | :heavy_minus_sign: | Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex | | -| `externalId` | *?string* | :heavy_minus_sign: | This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with `ext_` when passed as a query parameter. | 123456 | +| `externalId` | *?string* | :heavy_minus_sign: | 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. | 123456 | +| `tenantId` | *?string* | :heavy_minus_sign: | 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. | | | ~~`tagId`~~ | *?string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. | | | `comments` | *?string* | :heavy_minus_sign: | The comments for the short link. | | | `expiresAt` | *?string* | :heavy_minus_sign: | The date and time when the short link will expire at. | | diff --git a/docs/Models/Operations/Data.md b/docs/Models/Operations/Data.md index a80af34..4ad0bfa 100644 --- a/docs/Models/Operations/Data.md +++ b/docs/Models/Operations/Data.md @@ -14,6 +14,7 @@ | `proxy` | *?bool* | :heavy_minus_sign: | Whether the short link uses Custom Social Media Cards feature. | | | `rewrite` | *?bool* | :heavy_minus_sign: | Whether the short link uses link cloaking. | | | `doIndex` | *?bool* | :heavy_minus_sign: | Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex | | +| `tenantId` | *?string* | :heavy_minus_sign: | 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. | | | ~~`tagId`~~ | *?string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. | | | `comments` | *?string* | :heavy_minus_sign: | The comments for the short link. | | | `expiresAt` | *?string* | :heavy_minus_sign: | The date and time when the short link will expire at. | | diff --git a/docs/Models/Operations/GetCustomersResponse.md b/docs/Models/Operations/GetCustomersResponse.md index 9095105..cf0f5fd 100644 --- a/docs/Models/Operations/GetCustomersResponse.md +++ b/docs/Models/Operations/GetCustomersResponse.md @@ -8,4 +8,4 @@ | `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `responseBodies` | array<[Operations\ResponseBody](../../Models/Operations/ResponseBody.md)> | :heavy_minus_sign: | The list of customers. | \ No newline at end of file +| `responseBodies` | array<[Operations\GetCustomersResponseBody](../../Models/Operations/GetCustomersResponseBody.md)> | :heavy_minus_sign: | The list of customers. | \ No newline at end of file diff --git a/docs/Models/Operations/GetCustomersResponseBody.md b/docs/Models/Operations/GetCustomersResponseBody.md new file mode 100644 index 0000000..df13324 --- /dev/null +++ b/docs/Models/Operations/GetCustomersResponseBody.md @@ -0,0 +1,17 @@ +# GetCustomersResponseBody + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique identifier of the customer in Dub. | +| `externalId` | *string* | :heavy_check_mark: | Unique identifier for the customer in the client's app. | +| `name` | *string* | :heavy_check_mark: | Name of the customer. | +| `createdAt` | *string* | :heavy_check_mark: | The date the customer was created. | +| `email` | *?string* | :heavy_minus_sign: | Email of the customer. | +| `avatar` | *?string* | :heavy_minus_sign: | Avatar URL of the customer. | +| `country` | *?string* | :heavy_minus_sign: | Country of the customer. | +| `link` | [?Operations\Link](../../Models/Operations/Link.md) | :heavy_minus_sign: | N/A | +| `partner` | [?Operations\Partner](../../Models/Operations/Partner.md) | :heavy_minus_sign: | N/A | +| `discount` | [?Operations\Discount](../../Models/Operations/Discount.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/GetLinksCountRequest.md b/docs/Models/Operations/GetLinksCountRequest.md index 3185a5e..e13b414 100644 --- a/docs/Models/Operations/GetLinksCountRequest.md +++ b/docs/Models/Operations/GetLinksCountRequest.md @@ -11,6 +11,7 @@ | `tagNames` | [string\|array\|null](../../Models/Operations/GetLinksCountQueryParamTagNames.md) | :heavy_minus_sign: | The unique name of the tags assigned to the short link (case insensitive). | | `search` | *?string* | :heavy_minus_sign: | The search term to filter the links by. The search term will be matched against the short link slug and the destination url. | | `userId` | *?string* | :heavy_minus_sign: | The user ID to filter the links by. | +| `tenantId` | *?string* | :heavy_minus_sign: | The ID of the tenant that created the link inside your system. If set, will only return links for the specified tenant. | | `showArchived` | *?bool* | :heavy_minus_sign: | Whether to include archived links in the response. Defaults to `false` if not provided. | | `withTags` | *?bool* | :heavy_minus_sign: | DEPRECATED. Filter for links that have at least one tag assigned to them. | | `groupBy` | [Operations\One\|Operations\Two\|Operations\Three\|null](../../Models/Operations/GroupBy.md) | :heavy_minus_sign: | The field to group the links by. | \ No newline at end of file diff --git a/docs/Models/Operations/GetLinksRequest.md b/docs/Models/Operations/GetLinksRequest.md index 8472f79..bb679ba 100644 --- a/docs/Models/Operations/GetLinksRequest.md +++ b/docs/Models/Operations/GetLinksRequest.md @@ -11,8 +11,11 @@ | `tagNames` | [string\|array\|null](../../Models/Operations/QueryParamTagNames.md) | :heavy_minus_sign: | The unique name of the tags assigned to the short link (case insensitive). | | | `search` | *?string* | :heavy_minus_sign: | The search term to filter the links by. The search term will be matched against the short link slug and the destination url. | | | `userId` | *?string* | :heavy_minus_sign: | The user ID to filter the links by. | | +| `tenantId` | *?string* | :heavy_minus_sign: | The ID of the tenant that created the link inside your system. If set, will only return links for the specified tenant. | | | `showArchived` | *?bool* | :heavy_minus_sign: | Whether to include archived links in the response. Defaults to `false` if not provided. | | | `withTags` | *?bool* | :heavy_minus_sign: | DEPRECATED. Filter for links that have at least one tag assigned to them. | | -| `sort` | [?Operations\Sort](../../Models/Operations/Sort.md) | :heavy_minus_sign: | The field to sort the links by. The default is `createdAt`, and sort order is always descending. | | +| `sortBy` | [?Operations\SortBy](../../Models/Operations/SortBy.md) | :heavy_minus_sign: | The field to sort the links by. The default is `createdAt`. | | +| `sortOrder` | [?Operations\SortOrder](../../Models/Operations/SortOrder.md) | :heavy_minus_sign: | The sort order. The default is `desc`. | | +| `sort` | [?Operations\Sort](../../Models/Operations/Sort.md) | :heavy_minus_sign: | DEPRECATED. Use `sortBy` instead. | | | `page` | *?float* | :heavy_minus_sign: | The page number for pagination. | 1 | | `pageSize` | *?float* | :heavy_minus_sign: | The number of items per page. | 50 | \ No newline at end of file diff --git a/docs/Models/Operations/ListEventsRequest.md b/docs/Models/Operations/ListEventsRequest.md index a74507d..03d6c44 100644 --- a/docs/Models/Operations/ListEventsRequest.md +++ b/docs/Models/Operations/ListEventsRequest.md @@ -31,5 +31,6 @@ | `root` | *?bool* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | | | `page` | *?float* | :heavy_minus_sign: | N/A | | | `limit` | *?float* | :heavy_minus_sign: | N/A | | -| `order` | [?Operations\Order](../../Models/Operations/Order.md) | :heavy_minus_sign: | N/A | | -| `sortBy` | [?Operations\SortBy](../../Models/Operations/SortBy.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `sortOrder` | [?Operations\QueryParamSortOrder](../../Models/Operations/QueryParamSortOrder.md) | :heavy_minus_sign: | The sort order. The default is `desc`. | | +| `sortBy` | [?Operations\QueryParamSortBy](../../Models/Operations/QueryParamSortBy.md) | :heavy_minus_sign: | The field to sort the events by. The default is `timestamp`. | | +| `order` | [?Operations\Order](../../Models/Operations/Order.md) | :heavy_minus_sign: | DEPRECATED. Use `sortOrder` instead. | | \ No newline at end of file diff --git a/docs/Models/Operations/Order.md b/docs/Models/Operations/Order.md index 765034d..2b4de84 100644 --- a/docs/Models/Operations/Order.md +++ b/docs/Models/Operations/Order.md @@ -1,4 +1,8 @@ -# Order +# ~~Order~~ + +DEPRECATED. Use `sortOrder` instead. + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. ## Values diff --git a/docs/Models/Operations/QueryParamSortBy.md b/docs/Models/Operations/QueryParamSortBy.md new file mode 100644 index 0000000..c2c938c --- /dev/null +++ b/docs/Models/Operations/QueryParamSortBy.md @@ -0,0 +1,10 @@ +# QueryParamSortBy + +The field to sort the events by. The default is `timestamp`. + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `Timestamp` | timestamp | \ No newline at end of file diff --git a/docs/Models/Operations/QueryParamSortOrder.md b/docs/Models/Operations/QueryParamSortOrder.md new file mode 100644 index 0000000..a4a9682 --- /dev/null +++ b/docs/Models/Operations/QueryParamSortOrder.md @@ -0,0 +1,11 @@ +# QueryParamSortOrder + +The sort order. The default is `desc`. + + +## Values + +| Name | Value | +| ------ | ------ | +| `Asc` | asc | +| `Desc` | desc | \ No newline at end of file diff --git a/docs/Models/Operations/RequestBody.md b/docs/Models/Operations/RequestBody.md index 41feb3c..7e3c217 100644 --- a/docs/Models/Operations/RequestBody.md +++ b/docs/Models/Operations/RequestBody.md @@ -17,7 +17,8 @@ | `proxy` | *?bool* | :heavy_minus_sign: | Whether the short link uses Custom Social Media Cards feature. | | | `rewrite` | *?bool* | :heavy_minus_sign: | Whether the short link uses link cloaking. | | | `doIndex` | *?bool* | :heavy_minus_sign: | Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex | | -| `externalId` | *?string* | :heavy_minus_sign: | This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with `ext_` when passed as a query parameter. | 123456 | +| `externalId` | *?string* | :heavy_minus_sign: | 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. | 123456 | +| `tenantId` | *?string* | :heavy_minus_sign: | 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. | | | ~~`tagId`~~ | *?string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. | | | `comments` | *?string* | :heavy_minus_sign: | The comments for the short link. | | | `expiresAt` | *?string* | :heavy_minus_sign: | The date and time when the short link will expire at. | | diff --git a/docs/Models/Operations/ResponseBody.md b/docs/Models/Operations/ResponseBody.md index 0d74d0a..9a3808d 100644 --- a/docs/Models/Operations/ResponseBody.md +++ b/docs/Models/Operations/ResponseBody.md @@ -1,17 +1,23 @@ # ResponseBody -## Fields +## Supported Types + +### `Components\LinkSchema` + +```php +/** +* @var Components\LinkSchema +*/ +Components\LinkSchema $value = /* values here */ +``` + +### `Components\LinkErrorSchema` + +```php +/** +* @var Components\LinkErrorSchema +*/ +Components\LinkErrorSchema $value = /* values here */ +``` -| Field | Type | Required | Description | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The unique identifier of the customer in Dub. | -| `externalId` | *string* | :heavy_check_mark: | Unique identifier for the customer in the client's app. | -| `name` | *string* | :heavy_check_mark: | Name of the customer. | -| `createdAt` | *string* | :heavy_check_mark: | The date the customer was created. | -| `email` | *?string* | :heavy_minus_sign: | Email of the customer. | -| `avatar` | *?string* | :heavy_minus_sign: | Avatar URL of the customer. | -| `country` | *?string* | :heavy_minus_sign: | Country of the customer. | -| `link` | [?Operations\Link](../../Models/Operations/Link.md) | :heavy_minus_sign: | N/A | -| `partner` | [?Operations\Partner](../../Models/Operations/Partner.md) | :heavy_minus_sign: | N/A | -| `discount` | [?Operations\Discount](../../Models/Operations/Discount.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/Sort.md b/docs/Models/Operations/Sort.md index 4e57289..80b2879 100644 --- a/docs/Models/Operations/Sort.md +++ b/docs/Models/Operations/Sort.md @@ -1,6 +1,8 @@ -# Sort +# ~~Sort~~ -The field to sort the links by. The default is `createdAt`, and sort order is always descending. +DEPRECATED. Use `sortBy` instead. + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. ## Values @@ -9,4 +11,5 @@ The field to sort the links by. The default is `createdAt`, and sort order is al | ------------- | ------------- | | `CreatedAt` | createdAt | | `Clicks` | clicks | +| `SaleAmount` | saleAmount | | `LastClicked` | lastClicked | \ No newline at end of file diff --git a/docs/Models/Operations/SortBy.md b/docs/Models/Operations/SortBy.md index c11d65c..7f74742 100644 --- a/docs/Models/Operations/SortBy.md +++ b/docs/Models/Operations/SortBy.md @@ -1,8 +1,13 @@ # SortBy +The field to sort the links by. The default is `createdAt`. + ## Values -| Name | Value | -| ----------- | ----------- | -| `Timestamp` | timestamp | \ No newline at end of file +| Name | Value | +| ------------- | ------------- | +| `CreatedAt` | createdAt | +| `Clicks` | clicks | +| `SaleAmount` | saleAmount | +| `LastClicked` | lastClicked | \ No newline at end of file diff --git a/docs/Models/Operations/SortOrder.md b/docs/Models/Operations/SortOrder.md new file mode 100644 index 0000000..7f6e0ca --- /dev/null +++ b/docs/Models/Operations/SortOrder.md @@ -0,0 +1,11 @@ +# SortOrder + +The sort order. The default is `desc`. + + +## Values + +| Name | Value | +| ------ | ------ | +| `Asc` | asc | +| `Desc` | desc | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateLinkRequestBody.md b/docs/Models/Operations/UpdateLinkRequestBody.md index f608aa1..9afd318 100644 --- a/docs/Models/Operations/UpdateLinkRequestBody.md +++ b/docs/Models/Operations/UpdateLinkRequestBody.md @@ -17,7 +17,8 @@ | `proxy` | *?bool* | :heavy_minus_sign: | Whether the short link uses Custom Social Media Cards feature. | | | `rewrite` | *?bool* | :heavy_minus_sign: | Whether the short link uses link cloaking. | | | `doIndex` | *?bool* | :heavy_minus_sign: | Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex | | -| `externalId` | *?string* | :heavy_minus_sign: | This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with `ext_` when passed as a query parameter. | 123456 | +| `externalId` | *?string* | :heavy_minus_sign: | 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. | 123456 | +| `tenantId` | *?string* | :heavy_minus_sign: | 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. | | | ~~`tagId`~~ | *?string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. | | | `comments` | *?string* | :heavy_minus_sign: | The comments for the short link. | | | `expiresAt` | *?string* | :heavy_minus_sign: | The date and time when the short link will expire at. | | diff --git a/docs/Models/Operations/UpsertLinkRequestBody.md b/docs/Models/Operations/UpsertLinkRequestBody.md index 167ea6e..68001e8 100644 --- a/docs/Models/Operations/UpsertLinkRequestBody.md +++ b/docs/Models/Operations/UpsertLinkRequestBody.md @@ -17,7 +17,8 @@ | `proxy` | *?bool* | :heavy_minus_sign: | Whether the short link uses Custom Social Media Cards feature. | | | `rewrite` | *?bool* | :heavy_minus_sign: | Whether the short link uses link cloaking. | | | `doIndex` | *?bool* | :heavy_minus_sign: | Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex | | -| `externalId` | *?string* | :heavy_minus_sign: | This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with `ext_` when passed as a query parameter. | 123456 | +| `externalId` | *?string* | :heavy_minus_sign: | 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. | 123456 | +| `tenantId` | *?string* | :heavy_minus_sign: | 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. | | | ~~`tagId`~~ | *?string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. | | | `comments` | *?string* | :heavy_minus_sign: | The comments for the short link. | | | `expiresAt` | *?string* | :heavy_minus_sign: | The date and time when the short link will expire at. | | diff --git a/docs/sdks/analytics/README.md b/docs/sdks/analytics/README.md index 9e3ed27..9206e36 100644 --- a/docs/sdks/analytics/README.md +++ b/docs/sdks/analytics/README.md @@ -21,9 +21,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = new Operations\RetrieveAnalyticsRequest( timezone: 'America/New_York', diff --git a/docs/sdks/customers/README.md b/docs/sdks/customers/README.md index 7a5a451..8e78b56 100644 --- a/docs/sdks/customers/README.md +++ b/docs/sdks/customers/README.md @@ -25,9 +25,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = new Operations\CreateCustomerRequestBody( externalId: '', @@ -80,9 +82,11 @@ require 'vendor/autoload.php'; use Dub; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); @@ -133,9 +137,11 @@ require 'vendor/autoload.php'; use Dub; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); @@ -189,9 +195,11 @@ require 'vendor/autoload.php'; use Dub; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); @@ -248,9 +256,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = new Operations\UpdateCustomerRequest( id: '', diff --git a/docs/sdks/domains/README.md b/docs/sdks/domains/README.md index 1616b8f..67bcbb6 100644 --- a/docs/sdks/domains/README.md +++ b/docs/sdks/domains/README.md @@ -24,9 +24,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = new Operations\CreateDomainRequestBody( slug: 'acme.com', @@ -83,9 +85,11 @@ require 'vendor/autoload.php'; use Dub; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); @@ -136,9 +140,11 @@ require 'vendor/autoload.php'; use Dub; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); @@ -200,9 +206,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $requestBody = new Operations\UpdateDomainRequestBody( slug: 'acme.com', diff --git a/docs/sdks/embedtokens/README.md b/docs/sdks/embedtokens/README.md index fa34b6f..12ff719 100644 --- a/docs/sdks/embedtokens/README.md +++ b/docs/sdks/embedtokens/README.md @@ -21,9 +21,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = new Operations\CreateEmbedTokenRequestBody( linkId: '', diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md index 8b42794..42b7e6b 100644 --- a/docs/sdks/events/README.md +++ b/docs/sdks/events/README.md @@ -21,9 +21,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = new Operations\ListEventsRequest( timezone: 'America/New_York', diff --git a/docs/sdks/links/README.md b/docs/sdks/links/README.md index a8c65f4..3d6e291 100644 --- a/docs/sdks/links/README.md +++ b/docs/sdks/links/README.md @@ -30,9 +30,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = [ new Operations\RequestBody( @@ -48,7 +50,7 @@ $response = $sdk->links->createMany( request: $request ); -if ($response->linkSchemas !== null) { +if ($response->responseBodies !== null) { // handle response } ``` @@ -91,9 +93,11 @@ require 'vendor/autoload.php'; use Dub; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); @@ -148,9 +152,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = new Operations\BulkUpdateLinksRequestBody( data: new Operations\Data( @@ -209,9 +215,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = new Operations\CreateLinkRequestBody( url: 'https://google.com', @@ -268,9 +276,11 @@ require 'vendor/autoload.php'; use Dub; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); @@ -321,9 +331,11 @@ require 'vendor/autoload.php'; use Dub; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); @@ -382,9 +394,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = new Operations\GetLinksRequest( page: 1, @@ -442,9 +456,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = new Operations\GetLinksCountRequest(); @@ -496,9 +512,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $requestBody = new Operations\UpdateLinkRequestBody( url: 'https://google.com', @@ -559,9 +577,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = new Operations\UpsertLinkRequestBody( url: 'https://google.com', diff --git a/docs/sdks/metatags/README.md b/docs/sdks/metatags/README.md index 1575255..778bf71 100644 --- a/docs/sdks/metatags/README.md +++ b/docs/sdks/metatags/README.md @@ -20,9 +20,11 @@ require 'vendor/autoload.php'; use Dub; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); diff --git a/docs/sdks/qrcodes/README.md b/docs/sdks/qrcodes/README.md index dfa5556..f0580a4 100644 --- a/docs/sdks/qrcodes/README.md +++ b/docs/sdks/qrcodes/README.md @@ -21,9 +21,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = new Operations\GetQRCodeRequest( url: 'https://normal-making.name', diff --git a/docs/sdks/tags/README.md b/docs/sdks/tags/README.md index 42b7d36..98a66af 100644 --- a/docs/sdks/tags/README.md +++ b/docs/sdks/tags/README.md @@ -24,9 +24,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = new Operations\CreateTagRequestBody(); @@ -77,9 +79,11 @@ require 'vendor/autoload.php'; use Dub; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); @@ -130,9 +134,11 @@ require 'vendor/autoload.php'; use Dub; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); @@ -178,9 +184,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $requestBody = new Operations\UpdateTagRequestBody(); diff --git a/docs/sdks/track/README.md b/docs/sdks/track/README.md index 49502fb..62b245f 100644 --- a/docs/sdks/track/README.md +++ b/docs/sdks/track/README.md @@ -22,9 +22,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = new Operations\TrackLeadRequestBody( clickId: '', @@ -79,9 +81,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $request = new Operations\TrackSaleRequestBody( amount: 996500, diff --git a/docs/sdks/workspaces/README.md b/docs/sdks/workspaces/README.md index 177d52b..586a19f 100644 --- a/docs/sdks/workspaces/README.md +++ b/docs/sdks/workspaces/README.md @@ -21,9 +21,11 @@ require 'vendor/autoload.php'; use Dub; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); @@ -75,9 +77,11 @@ require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; -$security = 'DUB_API_KEY'; - -$sdk = Dub\Dub::builder()->setSecurity($security)->build(); +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); $requestBody = new Operations\UpdateWorkspaceRequestBody(); diff --git a/src/Analytics.php b/src/Analytics.php index 79d23cf..998019f 100644 --- a/src/Analytics.php +++ b/src/Analytics.php @@ -73,18 +73,14 @@ public function retrieve(?Operations\RetrieveAnalyticsRequest $request = null, ? $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { diff --git a/src/Customers.php b/src/Customers.php index 44ab4f3..498a732 100644 --- a/src/Customers.php +++ b/src/Customers.php @@ -74,18 +74,14 @@ public function create(?Operations\CreateCustomerRequestBody $request = null, ?O $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 201) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { @@ -239,18 +235,14 @@ public function delete(string $id, ?Options $options = null): Operations\DeleteC $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { @@ -409,18 +401,14 @@ public function get(string $id, ?bool $includeExpandedFields = null, ?Options $o $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { @@ -581,18 +569,14 @@ public function list(?string $email = null, ?string $externalId = null, ?bool $i $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { @@ -600,7 +584,7 @@ public function list(?string $email = null, ?string $externalId = null, ?bool $i $serializer = Utils\JSON::createSerializer(); $responseData = (string) $httpResponse->getBody(); - $obj = $serializer->deserialize($responseData, 'array<\Dub\Models\Operations\ResponseBody>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize($responseData, 'array<\Dub\Models\Operations\GetCustomersResponseBody>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); $response = new Operations\GetCustomersResponse( statusCode: $statusCode, contentType: $contentType, @@ -750,18 +734,14 @@ public function update(Operations\UpdateCustomerRequest $request, ?Options $opti $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { diff --git a/src/Domains.php b/src/Domains.php index addcedb..f5937f1 100644 --- a/src/Domains.php +++ b/src/Domains.php @@ -74,18 +74,14 @@ public function create(?Operations\CreateDomainRequestBody $request = null, ?Opt $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 201) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { @@ -239,18 +235,14 @@ public function delete(string $slug, ?Options $options = null): Operations\Delet $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { @@ -413,18 +405,14 @@ private function listIndividual(?bool $archived = null, ?string $search = null, $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { @@ -632,18 +620,14 @@ public function update(string $slug, ?Operations\UpdateDomainRequestBody $reques $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { diff --git a/src/EmbedTokens.php b/src/EmbedTokens.php index c7feca4..52c5cff 100644 --- a/src/EmbedTokens.php +++ b/src/EmbedTokens.php @@ -74,18 +74,14 @@ public function create(?Operations\CreateEmbedTokenRequestBody $request = null, $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 201) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { diff --git a/src/Events.php b/src/Events.php index 0378d89..abc9f0c 100644 --- a/src/Events.php +++ b/src/Events.php @@ -73,18 +73,14 @@ public function list(?Operations\ListEventsRequest $request = null, ?Options $op $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { diff --git a/src/Links.php b/src/Links.php index cd6b45e..84559d2 100644 --- a/src/Links.php +++ b/src/Links.php @@ -74,18 +74,14 @@ public function createMany(?array $request = null, ?Options $options = null): Op $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { @@ -93,12 +89,12 @@ public function createMany(?array $request = null, ?Options $options = null): Op $serializer = Utils\JSON::createSerializer(); $responseData = (string) $httpResponse->getBody(); - $obj = $serializer->deserialize($responseData, 'array<\Dub\Models\Components\LinkSchema>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize($responseData, 'array', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); $response = new Operations\BulkCreateLinksResponse( statusCode: $statusCode, contentType: $contentType, rawResponse: $httpResponse, - linkSchemas: $obj); + responseBodies: $obj); return $response; } else { @@ -242,18 +238,14 @@ public function deleteMany(array $linkIds, ?Options $options = null): Operations $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { @@ -408,18 +400,14 @@ public function updateMany(?Operations\BulkUpdateLinksRequestBody $request = nul $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { @@ -574,18 +562,14 @@ public function create(?Operations\CreateLinkRequestBody $request = null, ?Optio $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { @@ -739,18 +723,14 @@ public function delete(string $linkId, ?Options $options = null): Operations\Del $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { @@ -913,18 +893,14 @@ public function get(?string $domain = null, ?string $key = null, ?string $linkId $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { @@ -1078,18 +1054,14 @@ private function listIndividual(?Operations\GetLinksRequest $request = null, ?Op $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { @@ -1131,8 +1103,11 @@ private function listIndividual(?Operations\GetLinksRequest $request = null, ?Op tagNames: $request != null ? $request->tagNames : null, search: $request != null ? $request->search : null, userId: $request != null ? $request->userId : null, + tenantId: $request != null ? $request->tenantId : null, showArchived: $request != null ? $request->showArchived : null, withTags: $request != null ? $request->withTags : null, + sortBy: $request != null ? $request->sortBy : null, + sortOrder: $request != null ? $request->sortOrder : null, sort: $request != null ? $request->sort : null, page: $nextPage, pageSize: $request != null ? $request->pageSize : null, @@ -1297,18 +1272,14 @@ public function count(?Operations\GetLinksCountRequest $request = null, ?Options $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { @@ -1468,18 +1439,14 @@ public function update(string $linkId, ?Operations\UpdateLinkRequestBody $reques $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { @@ -1634,18 +1601,14 @@ public function upsert(?Operations\UpsertLinkRequestBody $request = null, ?Optio $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { diff --git a/src/Metatags.php b/src/Metatags.php index fceea20..674db40 100644 --- a/src/Metatags.php +++ b/src/Metatags.php @@ -76,18 +76,14 @@ public function get(string $url, ?Options $options = null): Operations\GetMetata $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { diff --git a/src/Models/Components/Code.php b/src/Models/Components/Code.php new file mode 100644 index 0000000..c0811f7 --- /dev/null +++ b/src/Models/Components/Code.php @@ -0,0 +1,26 @@ +id = $id; $this->domain = $domain; @@ -419,6 +428,7 @@ public function __construct(string $id, string $domain, string $key, string $url $this->projectId = $projectId; $this->trackConversion = $trackConversion; $this->externalId = $externalId; + $this->tenantId = $tenantId; $this->archived = $archived; $this->expiredUrl = $expiredUrl; $this->password = $password; diff --git a/src/Models/Components/LeadCreatedEventLink.php b/src/Models/Components/LeadCreatedEventLink.php index 6e02d3e..ec1ece8 100644 --- a/src/Models/Components/LeadCreatedEventLink.php +++ b/src/Models/Components/LeadCreatedEventLink.php @@ -121,13 +121,21 @@ class LeadCreatedEventLink public ?bool $trackConversion = null; /** - * This is the ID of the link in your database that is unique across your workspace. 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. + * 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. * * @var ?string $externalId */ #[\Speakeasy\Serializer\Annotation\SerializedName('externalId')] public ?string $externalId; + /** + * 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. + * + * @var ?string $tenantId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('tenantId')] + public ?string $tenantId; + /** * * @var ?bool $archived @@ -331,7 +339,7 @@ class LeadCreatedEventLink public ?float $clicks = null; /** - * [BETA]: The number of leads the short links has generated. + * The number of leads the short links has generated. * * @var ?float $leads */ @@ -340,7 +348,7 @@ class LeadCreatedEventLink public ?float $leads = null; /** - * [BETA]: The number of sales the short links has generated. + * The number of sales the short links has generated. * * @var ?float $sales */ @@ -349,7 +357,7 @@ class LeadCreatedEventLink public ?float $sales = null; /** - * [BETA]: The total dollar amount of sales the short links has generated (in cents). + * The total dollar amount of sales the short links has generated (in cents). * * @var ?float $saleAmount */ @@ -373,6 +381,7 @@ class LeadCreatedEventLink * @param string $projectId * @param ?bool $trackConversion * @param ?string $externalId + * @param ?string $tenantId * @param ?bool $archived * @param ?string $expiredUrl * @param ?string $password @@ -402,7 +411,7 @@ class LeadCreatedEventLink * @param ?float $saleAmount * @param ?string $programId */ - public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?LeadCreatedEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?string $programId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) + public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $tenantId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?LeadCreatedEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?string $programId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->id = $id; $this->domain = $domain; @@ -419,6 +428,7 @@ public function __construct(string $id, string $domain, string $key, string $url $this->projectId = $projectId; $this->trackConversion = $trackConversion; $this->externalId = $externalId; + $this->tenantId = $tenantId; $this->archived = $archived; $this->expiredUrl = $expiredUrl; $this->password = $password; diff --git a/src/Models/Components/Link.php b/src/Models/Components/Link.php index af587cf..20e1b60 100644 --- a/src/Models/Components/Link.php +++ b/src/Models/Components/Link.php @@ -121,13 +121,21 @@ class Link public ?bool $trackConversion = null; /** - * This is the ID of the link in your database that is unique across your workspace. 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. + * 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. * * @var ?string $externalId */ #[\Speakeasy\Serializer\Annotation\SerializedName('externalId')] public ?string $externalId; + /** + * 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. + * + * @var ?string $tenantId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('tenantId')] + public ?string $tenantId; + /** * * @var ?bool $archived @@ -331,7 +339,7 @@ class Link public ?float $clicks = null; /** - * [BETA]: The number of leads the short links has generated. + * The number of leads the short links has generated. * * @var ?float $leads */ @@ -340,7 +348,7 @@ class Link public ?float $leads = null; /** - * [BETA]: The number of sales the short links has generated. + * The number of sales the short links has generated. * * @var ?float $sales */ @@ -349,7 +357,7 @@ class Link public ?float $sales = null; /** - * [BETA]: The total dollar amount of sales the short links has generated (in cents). + * The total dollar amount of sales the short links has generated (in cents). * * @var ?float $saleAmount */ @@ -373,6 +381,7 @@ class Link * @param string $projectId * @param ?bool $trackConversion * @param ?string $externalId + * @param ?string $tenantId * @param ?bool $archived * @param ?string $expiredUrl * @param ?string $password @@ -402,7 +411,7 @@ class Link * @param ?float $saleAmount * @param ?string $programId */ - public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?ClickEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?string $programId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) + public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $tenantId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?ClickEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?string $programId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->id = $id; $this->domain = $domain; @@ -419,6 +428,7 @@ public function __construct(string $id, string $domain, string $key, string $url $this->projectId = $projectId; $this->trackConversion = $trackConversion; $this->externalId = $externalId; + $this->tenantId = $tenantId; $this->archived = $archived; $this->expiredUrl = $expiredUrl; $this->password = $password; diff --git a/src/Models/Components/LinkClickedEventLink.php b/src/Models/Components/LinkClickedEventLink.php index d9a5544..54c399c 100644 --- a/src/Models/Components/LinkClickedEventLink.php +++ b/src/Models/Components/LinkClickedEventLink.php @@ -121,13 +121,21 @@ class LinkClickedEventLink public ?bool $trackConversion = null; /** - * This is the ID of the link in your database that is unique across your workspace. 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. + * 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. * * @var ?string $externalId */ #[\Speakeasy\Serializer\Annotation\SerializedName('externalId')] public ?string $externalId; + /** + * 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. + * + * @var ?string $tenantId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('tenantId')] + public ?string $tenantId; + /** * * @var ?bool $archived @@ -331,7 +339,7 @@ class LinkClickedEventLink public ?float $clicks = null; /** - * [BETA]: The number of leads the short links has generated. + * The number of leads the short links has generated. * * @var ?float $leads */ @@ -340,7 +348,7 @@ class LinkClickedEventLink public ?float $leads = null; /** - * [BETA]: The number of sales the short links has generated. + * The number of sales the short links has generated. * * @var ?float $sales */ @@ -349,7 +357,7 @@ class LinkClickedEventLink public ?float $sales = null; /** - * [BETA]: The total dollar amount of sales the short links has generated (in cents). + * The total dollar amount of sales the short links has generated (in cents). * * @var ?float $saleAmount */ @@ -373,6 +381,7 @@ class LinkClickedEventLink * @param string $projectId * @param ?bool $trackConversion * @param ?string $externalId + * @param ?string $tenantId * @param ?bool $archived * @param ?string $expiredUrl * @param ?string $password @@ -402,7 +411,7 @@ class LinkClickedEventLink * @param ?float $saleAmount * @param ?string $programId */ - public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?LinkClickedEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?string $programId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) + public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $tenantId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?LinkClickedEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?string $programId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->id = $id; $this->domain = $domain; @@ -419,6 +428,7 @@ public function __construct(string $id, string $domain, string $key, string $url $this->projectId = $projectId; $this->trackConversion = $trackConversion; $this->externalId = $externalId; + $this->tenantId = $tenantId; $this->archived = $archived; $this->expiredUrl = $expiredUrl; $this->password = $password; diff --git a/src/Models/Components/LinkErrorSchema.php b/src/Models/Components/LinkErrorSchema.php new file mode 100644 index 0000000..4489866 --- /dev/null +++ b/src/Models/Components/LinkErrorSchema.php @@ -0,0 +1,52 @@ +error = $error; + $this->code = $code; + $this->link = $link; + } +} \ No newline at end of file diff --git a/src/Models/Components/LinkSchema.php b/src/Models/Components/LinkSchema.php index 5958542..b7d75e4 100644 --- a/src/Models/Components/LinkSchema.php +++ b/src/Models/Components/LinkSchema.php @@ -102,13 +102,21 @@ class LinkSchema public string $projectId; /** - * This is the ID of the link in your database that is unique across your workspace. 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. + * 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. * * @var ?string $externalId */ #[\Speakeasy\Serializer\Annotation\SerializedName('externalId')] public ?string $externalId; + /** + * 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. + * + * @var ?string $tenantId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('tenantId')] + public ?string $tenantId; + /** * The date and time when the short link will expire in ISO-8601 format. * @@ -281,7 +289,7 @@ class LinkSchema public ?string $programId; /** - * [BETA] Whether to track conversions for the short link. + * Whether to track conversions for the short link. * * @var ?bool $trackConversion */ @@ -344,7 +352,7 @@ class LinkSchema public ?float $clicks = null; /** - * [BETA]: The number of leads the short links has generated. + * The number of leads the short links has generated. * * @var ?float $leads */ @@ -353,7 +361,7 @@ class LinkSchema public ?float $leads = null; /** - * [BETA]: The number of sales the short links has generated. + * The number of sales the short links has generated. * * @var ?float $sales */ @@ -362,7 +370,7 @@ class LinkSchema public ?float $sales = null; /** - * [BETA]: The total dollar amount of sales the short links has generated (in cents). + * The total dollar amount of sales the short links has generated (in cents). * * @var ?float $saleAmount */ @@ -384,6 +392,7 @@ class LinkSchema * @param string $projectId * @param ?bool $trackConversion * @param ?string $externalId + * @param ?string $tenantId * @param ?bool $archived * @param ?string $expiresAt * @param ?string $expiredUrl @@ -415,7 +424,7 @@ class LinkSchema * @param ?float $saleAmount * @param ?string $programId */ - public function __construct(string $id, string $domain, string $key, string $url, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $createdAt, string $updatedAt, string $projectId, ?string $externalId = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Geo $geo = null, ?string $tagId = null, ?array $tags = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?string $lastClicked = null, ?string $programId = null, ?bool $trackConversion = false, ?bool $archived = false, ?bool $proxy = false, ?bool $rewrite = false, ?bool $doIndex = false, ?bool $publicStats = false, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) + public function __construct(string $id, string $domain, string $key, string $url, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $createdAt, string $updatedAt, string $projectId, ?string $externalId = null, ?string $tenantId = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Geo $geo = null, ?string $tagId = null, ?array $tags = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?string $lastClicked = null, ?string $programId = null, ?bool $trackConversion = false, ?bool $archived = false, ?bool $proxy = false, ?bool $rewrite = false, ?bool $doIndex = false, ?bool $publicStats = false, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->id = $id; $this->domain = $domain; @@ -429,6 +438,7 @@ public function __construct(string $id, string $domain, string $key, string $url $this->updatedAt = $updatedAt; $this->projectId = $projectId; $this->externalId = $externalId; + $this->tenantId = $tenantId; $this->expiresAt = $expiresAt; $this->expiredUrl = $expiredUrl; $this->password = $password; diff --git a/src/Models/Components/SaleCreatedEventLink.php b/src/Models/Components/SaleCreatedEventLink.php index 205de7d..f02f4b1 100644 --- a/src/Models/Components/SaleCreatedEventLink.php +++ b/src/Models/Components/SaleCreatedEventLink.php @@ -121,13 +121,21 @@ class SaleCreatedEventLink public ?bool $trackConversion = null; /** - * This is the ID of the link in your database that is unique across your workspace. 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. + * 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. * * @var ?string $externalId */ #[\Speakeasy\Serializer\Annotation\SerializedName('externalId')] public ?string $externalId; + /** + * 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. + * + * @var ?string $tenantId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('tenantId')] + public ?string $tenantId; + /** * * @var ?bool $archived @@ -331,7 +339,7 @@ class SaleCreatedEventLink public ?float $clicks = null; /** - * [BETA]: The number of leads the short links has generated. + * The number of leads the short links has generated. * * @var ?float $leads */ @@ -340,7 +348,7 @@ class SaleCreatedEventLink public ?float $leads = null; /** - * [BETA]: The number of sales the short links has generated. + * The number of sales the short links has generated. * * @var ?float $sales */ @@ -349,7 +357,7 @@ class SaleCreatedEventLink public ?float $sales = null; /** - * [BETA]: The total dollar amount of sales the short links has generated (in cents). + * The total dollar amount of sales the short links has generated (in cents). * * @var ?float $saleAmount */ @@ -373,6 +381,7 @@ class SaleCreatedEventLink * @param string $projectId * @param ?bool $trackConversion * @param ?string $externalId + * @param ?string $tenantId * @param ?bool $archived * @param ?string $expiredUrl * @param ?string $password @@ -402,7 +411,7 @@ class SaleCreatedEventLink * @param ?float $saleAmount * @param ?string $programId */ - public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?SaleCreatedEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?string $programId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) + public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $tenantId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?SaleCreatedEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?string $programId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->id = $id; $this->domain = $domain; @@ -419,6 +428,7 @@ public function __construct(string $id, string $domain, string $key, string $url $this->projectId = $projectId; $this->trackConversion = $trackConversion; $this->externalId = $externalId; + $this->tenantId = $tenantId; $this->archived = $archived; $this->expiredUrl = $expiredUrl; $this->password = $password; diff --git a/src/Models/Components/WorkspaceSchema.php b/src/Models/Components/WorkspaceSchema.php index 52945f3..1ab2321 100644 --- a/src/Models/Components/WorkspaceSchema.php +++ b/src/Models/Components/WorkspaceSchema.php @@ -215,7 +215,7 @@ class WorkspaceSchema public ?string $paymentFailedAt; /** - * [BETA – Dub Conversions]: The Stripe Connect ID of the workspace. + * The Stripe Connect ID of the workspace. * * @var ?string $stripeConnectId */ diff --git a/src/Models/Operations/BulkCreateLinksResponse.php b/src/Models/Operations/BulkCreateLinksResponse.php index f15eb20..7e3b1fb 100644 --- a/src/Models/Operations/BulkCreateLinksResponse.php +++ b/src/Models/Operations/BulkCreateLinksResponse.php @@ -8,7 +8,7 @@ namespace Dub\Models\Operations; -use Dub\Models\Components; + class BulkCreateLinksResponse { /** @@ -35,21 +35,21 @@ class BulkCreateLinksResponse /** * The created links * - * @var ?array $linkSchemas + * @var ?array $responseBodies */ - public ?array $linkSchemas = null; + public ?array $responseBodies = null; /** * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse - * @param ?array $linkSchemas + * @param ?array $responseBodies */ - public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?array $linkSchemas = null) + public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?array $responseBodies = null) { $this->contentType = $contentType; $this->statusCode = $statusCode; $this->rawResponse = $rawResponse; - $this->linkSchemas = $linkSchemas; + $this->responseBodies = $responseBodies; } } \ No newline at end of file diff --git a/src/Models/Operations/CreateLinkRequestBody.php b/src/Models/Operations/CreateLinkRequestBody.php index f53e74f..4fffe3e 100644 --- a/src/Models/Operations/CreateLinkRequestBody.php +++ b/src/Models/Operations/CreateLinkRequestBody.php @@ -67,7 +67,7 @@ class CreateLinkRequestBody public string|array|null $tagNames = null; /** - * This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with `ext_` when passed as a query parameter. + * 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. * * @var ?string $externalId */ @@ -75,6 +75,15 @@ class CreateLinkRequestBody #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?string $externalId = null; + /** + * 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. + * + * @var ?string $tenantId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('tenantId')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $tenantId = null; + /** * The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. * @@ -327,6 +336,7 @@ class CreateLinkRequestBody * @param ?bool $rewrite * @param ?bool $doIndex * @param ?string $externalId + * @param ?string $tenantId * @param ?string $tagId * @param ?string $comments * @param ?string $expiresAt @@ -348,7 +358,7 @@ class CreateLinkRequestBody * @param ?string $programId * @param ?array $webhookIds */ - public function __construct(string $url, ?string $domain = null, ?string $key = null, ?string $prefix = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $externalId = null, ?string $tagId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null, ?string $programId = null, ?array $webhookIds = null, ?bool $trackConversion = false, ?bool $archived = false, ?bool $publicStats = false, ?bool $proxy = false, ?bool $rewrite = false, ?bool $doIndex = false) + public function __construct(string $url, ?string $domain = null, ?string $key = null, ?string $prefix = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $externalId = null, ?string $tenantId = null, ?string $tagId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null, ?string $programId = null, ?array $webhookIds = null, ?bool $trackConversion = false, ?bool $archived = false, ?bool $publicStats = false, ?bool $proxy = false, ?bool $rewrite = false, ?bool $doIndex = false) { $this->url = $url; $this->domain = $domain; @@ -357,6 +367,7 @@ public function __construct(string $url, ?string $domain = null, ?string $key = $this->tagIds = $tagIds; $this->tagNames = $tagNames; $this->externalId = $externalId; + $this->tenantId = $tenantId; $this->tagId = $tagId; $this->comments = $comments; $this->expiresAt = $expiresAt; diff --git a/src/Models/Operations/Data.php b/src/Models/Operations/Data.php index b8a4b9d..ad39ef9 100644 --- a/src/Models/Operations/Data.php +++ b/src/Models/Operations/Data.php @@ -40,6 +40,15 @@ class Data #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public string|array|null $tagNames = null; + /** + * 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. + * + * @var ?string $tenantId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('tenantId')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $tenantId = null; + /** * The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. * @@ -288,6 +297,7 @@ class Data * @param ?bool $proxy * @param ?bool $rewrite * @param ?bool $doIndex + * @param ?string $tenantId * @param ?string $tagId * @param ?string $comments * @param ?string $expiresAt @@ -309,11 +319,12 @@ class Data * @param ?string $programId * @param ?array $webhookIds */ - public function __construct(?string $url = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $tagId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null, ?string $programId = null, ?array $webhookIds = null, ?bool $trackConversion = false, ?bool $archived = false, ?bool $publicStats = false, ?bool $proxy = false, ?bool $rewrite = false, ?bool $doIndex = false) + public function __construct(?string $url = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $tenantId = null, ?string $tagId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null, ?string $programId = null, ?array $webhookIds = null, ?bool $trackConversion = false, ?bool $archived = false, ?bool $publicStats = false, ?bool $proxy = false, ?bool $rewrite = false, ?bool $doIndex = false) { $this->url = $url; $this->tagIds = $tagIds; $this->tagNames = $tagNames; + $this->tenantId = $tenantId; $this->tagId = $tagId; $this->comments = $comments; $this->expiresAt = $expiresAt; diff --git a/src/Models/Operations/GetCustomersResponse.php b/src/Models/Operations/GetCustomersResponse.php index 7ba5efa..23cfcc6 100644 --- a/src/Models/Operations/GetCustomersResponse.php +++ b/src/Models/Operations/GetCustomersResponse.php @@ -35,7 +35,7 @@ class GetCustomersResponse /** * The list of customers. * - * @var ?array $responseBodies + * @var ?array $responseBodies */ public ?array $responseBodies = null; @@ -43,7 +43,7 @@ class GetCustomersResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse - * @param ?array $responseBodies + * @param ?array $responseBodies */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?array $responseBodies = null) { diff --git a/src/Models/Operations/ResponseBody.php b/src/Models/Operations/GetCustomersResponseBody.php similarity index 99% rename from src/Models/Operations/ResponseBody.php rename to src/Models/Operations/GetCustomersResponseBody.php index b33d575..09d34a3 100644 --- a/src/Models/Operations/ResponseBody.php +++ b/src/Models/Operations/GetCustomersResponseBody.php @@ -9,7 +9,7 @@ namespace Dub\Models\Operations; -class ResponseBody +class GetCustomersResponseBody { /** * The unique identifier of the customer in Dub. diff --git a/src/Models/Operations/GetLinksCountRequest.php b/src/Models/Operations/GetLinksCountRequest.php index 29a6ea5..5a42eb7 100644 --- a/src/Models/Operations/GetLinksCountRequest.php +++ b/src/Models/Operations/GetLinksCountRequest.php @@ -59,6 +59,14 @@ class GetLinksCountRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=userId')] public ?string $userId = null; + /** + * The ID of the tenant that created the link inside your system. If set, will only return links for the specified tenant. + * + * @var ?string $tenantId + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=tenantId')] + public ?string $tenantId = null; + /** * The field to group the links by. * @@ -90,11 +98,12 @@ class GetLinksCountRequest * @param string|array|null $tagNames * @param ?string $search * @param ?string $userId + * @param ?string $tenantId * @param ?bool $showArchived * @param ?bool $withTags * @param One|Two|Three|null $groupBy */ - public function __construct(?string $domain = null, ?string $tagId = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $search = null, ?string $userId = null, One|Two|Three|null $groupBy = null, ?bool $showArchived = true, ?bool $withTags = true) + public function __construct(?string $domain = null, ?string $tagId = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $search = null, ?string $userId = null, ?string $tenantId = null, One|Two|Three|null $groupBy = null, ?bool $showArchived = true, ?bool $withTags = true) { $this->domain = $domain; $this->tagId = $tagId; @@ -102,6 +111,7 @@ public function __construct(?string $domain = null, ?string $tagId = null, strin $this->tagNames = $tagNames; $this->search = $search; $this->userId = $userId; + $this->tenantId = $tenantId; $this->groupBy = $groupBy; $this->showArchived = $showArchived; $this->withTags = $withTags; diff --git a/src/Models/Operations/GetLinksRequest.php b/src/Models/Operations/GetLinksRequest.php index b21fa09..b626664 100644 --- a/src/Models/Operations/GetLinksRequest.php +++ b/src/Models/Operations/GetLinksRequest.php @@ -59,6 +59,14 @@ class GetLinksRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=userId')] public ?string $userId = null; + /** + * The ID of the tenant that created the link inside your system. If set, will only return links for the specified tenant. + * + * @var ?string $tenantId + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=tenantId')] + public ?string $tenantId = null; + /** * Whether to include archived links in the response. Defaults to `false` if not provided. * @@ -76,7 +84,23 @@ class GetLinksRequest public ?bool $withTags = null; /** - * The field to sort the links by. The default is `createdAt`, and sort order is always descending. + * The field to sort the links by. The default is `createdAt`. + * + * @var ?SortBy $sortBy + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=sortBy')] + public ?SortBy $sortBy = null; + + /** + * The sort order. The default is `desc`. + * + * @var ?SortOrder $sortOrder + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=sortOrder')] + public ?SortOrder $sortOrder = null; + + /** + * DEPRECATED. Use `sortBy` instead. * * @var ?Sort $sort */ @@ -106,13 +130,16 @@ class GetLinksRequest * @param string|array|null $tagNames * @param ?string $search * @param ?string $userId + * @param ?string $tenantId * @param ?bool $showArchived * @param ?bool $withTags + * @param ?SortBy $sortBy + * @param ?SortOrder $sortOrder * @param ?Sort $sort * @param ?float $page * @param ?float $pageSize */ - public function __construct(?string $domain = null, ?string $tagId = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $search = null, ?string $userId = null, ?bool $showArchived = true, ?bool $withTags = true, ?Sort $sort = Sort::CreatedAt, ?float $page = 1, ?float $pageSize = 100) + public function __construct(?string $domain = null, ?string $tagId = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $search = null, ?string $userId = null, ?string $tenantId = null, ?bool $showArchived = true, ?bool $withTags = true, ?SortBy $sortBy = SortBy::CreatedAt, ?SortOrder $sortOrder = SortOrder::Desc, ?Sort $sort = Sort::CreatedAt, ?float $page = 1, ?float $pageSize = 100) { $this->domain = $domain; $this->tagId = $tagId; @@ -120,8 +147,11 @@ public function __construct(?string $domain = null, ?string $tagId = null, strin $this->tagNames = $tagNames; $this->search = $search; $this->userId = $userId; + $this->tenantId = $tenantId; $this->showArchived = $showArchived; $this->withTags = $withTags; + $this->sortBy = $sortBy; + $this->sortOrder = $sortOrder; $this->sort = $sort; $this->page = $page; $this->pageSize = $pageSize; diff --git a/src/Models/Operations/ListEventsRequest.php b/src/Models/Operations/ListEventsRequest.php index eef51a6..03eb91e 100644 --- a/src/Models/Operations/ListEventsRequest.php +++ b/src/Models/Operations/ListEventsRequest.php @@ -219,18 +219,28 @@ class ListEventsRequest public ?float $limit = null; /** + * The sort order. The default is `desc`. * - * @var ?Order $order + * @var ?QueryParamSortOrder $sortOrder */ - #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=order')] - public ?Order $order = null; + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=sortOrder')] + public ?QueryParamSortOrder $sortOrder = null; /** + * The field to sort the events by. The default is `timestamp`. * - * @var ?SortBy $sortBy + * @var ?QueryParamSortBy $sortBy */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=sortBy')] - public ?SortBy $sortBy = null; + public ?QueryParamSortBy $sortBy = null; + + /** + * DEPRECATED. Use `sortOrder` instead. + * + * @var ?Order $order + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=order')] + public ?Order $order = null; /** * @param ?QueryParamEvent $event @@ -259,10 +269,11 @@ class ListEventsRequest * @param ?bool $root * @param ?float $page * @param ?float $limit + * @param ?QueryParamSortOrder $sortOrder + * @param ?QueryParamSortBy $sortBy * @param ?Order $order - * @param ?SortBy $sortBy */ - public function __construct(?string $domain = null, ?string $key = null, ?string $linkId = null, ?string $externalId = null, ?string $start = null, ?string $end = null, ?Components\CountryCode $country = null, ?string $city = null, ?string $region = null, ?Components\ContinentCode $continent = null, ?string $device = null, ?string $browser = null, ?string $os = null, ?QueryParamTrigger $trigger = null, ?string $referer = null, ?string $refererUrl = null, ?string $url = null, ?string $tagId = null, string|array|null $tagIds = null, ?bool $qr = null, ?bool $root = null, ?QueryParamEvent $event = QueryParamEvent::Clicks, ?QueryParamInterval $interval = QueryParamInterval::TwentyFourh, ?string $timezone = 'UTC', ?float $page = 1, ?float $limit = 100, ?Order $order = Order::Desc, ?SortBy $sortBy = SortBy::Timestamp) + public function __construct(?string $domain = null, ?string $key = null, ?string $linkId = null, ?string $externalId = null, ?string $start = null, ?string $end = null, ?Components\CountryCode $country = null, ?string $city = null, ?string $region = null, ?Components\ContinentCode $continent = null, ?string $device = null, ?string $browser = null, ?string $os = null, ?QueryParamTrigger $trigger = null, ?string $referer = null, ?string $refererUrl = null, ?string $url = null, ?string $tagId = null, string|array|null $tagIds = null, ?bool $qr = null, ?bool $root = null, ?QueryParamEvent $event = QueryParamEvent::Clicks, ?QueryParamInterval $interval = QueryParamInterval::TwentyFourh, ?string $timezone = 'UTC', ?float $page = 1, ?float $limit = 100, ?QueryParamSortOrder $sortOrder = QueryParamSortOrder::Desc, ?QueryParamSortBy $sortBy = QueryParamSortBy::Timestamp, ?Order $order = Order::Desc) { $this->domain = $domain; $this->key = $key; @@ -290,7 +301,8 @@ public function __construct(?string $domain = null, ?string $key = null, ?string $this->timezone = $timezone; $this->page = $page; $this->limit = $limit; - $this->order = $order; + $this->sortOrder = $sortOrder; $this->sortBy = $sortBy; + $this->order = $order; } } \ No newline at end of file diff --git a/src/Models/Operations/Order.php b/src/Models/Operations/Order.php index 481c243..65b561d 100644 --- a/src/Models/Operations/Order.php +++ b/src/Models/Operations/Order.php @@ -9,7 +9,11 @@ namespace Dub\Models\Operations; - +/** + * DEPRECATED. Use `sortOrder` instead. + * + * @deprecated enum: This will be removed in a future release, please migrate away from it as soon as possible. + */ enum Order: string { case Asc = 'asc'; diff --git a/src/Models/Operations/QueryParamSortBy.php b/src/Models/Operations/QueryParamSortBy.php new file mode 100644 index 0000000..228aa62 --- /dev/null +++ b/src/Models/Operations/QueryParamSortBy.php @@ -0,0 +1,16 @@ + $webhookIds */ - public function __construct(string $url, ?string $domain = null, ?string $key = null, ?string $prefix = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $externalId = null, ?string $tagId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null, ?string $programId = null, ?array $webhookIds = null, ?bool $trackConversion = false, ?bool $archived = false, ?bool $publicStats = false, ?bool $proxy = false, ?bool $rewrite = false, ?bool $doIndex = false) + public function __construct(string $url, ?string $domain = null, ?string $key = null, ?string $prefix = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $externalId = null, ?string $tenantId = null, ?string $tagId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null, ?string $programId = null, ?array $webhookIds = null, ?bool $trackConversion = false, ?bool $archived = false, ?bool $publicStats = false, ?bool $proxy = false, ?bool $rewrite = false, ?bool $doIndex = false) { $this->url = $url; $this->domain = $domain; @@ -357,6 +367,7 @@ public function __construct(string $url, ?string $domain = null, ?string $key = $this->tagIds = $tagIds; $this->tagNames = $tagNames; $this->externalId = $externalId; + $this->tenantId = $tenantId; $this->tagId = $tagId; $this->comments = $comments; $this->expiresAt = $expiresAt; diff --git a/src/Models/Operations/Sort.php b/src/Models/Operations/Sort.php index 84ac20a..7fd6bb3 100644 --- a/src/Models/Operations/Sort.php +++ b/src/Models/Operations/Sort.php @@ -9,10 +9,15 @@ namespace Dub\Models\Operations; -/** The field to sort the links by. The default is `createdAt`, and sort order is always descending. */ +/** + * DEPRECATED. Use `sortBy` instead. + * + * @deprecated enum: This will be removed in a future release, please migrate away from it as soon as possible. + */ enum Sort: string { case CreatedAt = 'createdAt'; case Clicks = 'clicks'; + case SaleAmount = 'saleAmount'; case LastClicked = 'lastClicked'; } diff --git a/src/Models/Operations/SortBy.php b/src/Models/Operations/SortBy.php index b703627..6711283 100644 --- a/src/Models/Operations/SortBy.php +++ b/src/Models/Operations/SortBy.php @@ -9,8 +9,11 @@ namespace Dub\Models\Operations; - +/** The field to sort the links by. The default is `createdAt`. */ enum SortBy: string { - case Timestamp = 'timestamp'; + case CreatedAt = 'createdAt'; + case Clicks = 'clicks'; + case SaleAmount = 'saleAmount'; + case LastClicked = 'lastClicked'; } diff --git a/src/Models/Operations/SortOrder.php b/src/Models/Operations/SortOrder.php new file mode 100644 index 0000000..db74f26 --- /dev/null +++ b/src/Models/Operations/SortOrder.php @@ -0,0 +1,17 @@ + $webhookIds */ - public function __construct(?string $url = null, ?string $domain = null, ?string $key = null, ?string $prefix = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $externalId = null, ?string $tagId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null, ?string $programId = null, ?array $webhookIds = null, ?bool $trackConversion = false, ?bool $archived = false, ?bool $publicStats = false, ?bool $proxy = false, ?bool $rewrite = false, ?bool $doIndex = false) + public function __construct(?string $url = null, ?string $domain = null, ?string $key = null, ?string $prefix = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $externalId = null, ?string $tenantId = null, ?string $tagId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null, ?string $programId = null, ?array $webhookIds = null, ?bool $trackConversion = false, ?bool $archived = false, ?bool $publicStats = false, ?bool $proxy = false, ?bool $rewrite = false, ?bool $doIndex = false) { $this->url = $url; $this->domain = $domain; @@ -358,6 +368,7 @@ public function __construct(?string $url = null, ?string $domain = null, ?string $this->tagIds = $tagIds; $this->tagNames = $tagNames; $this->externalId = $externalId; + $this->tenantId = $tenantId; $this->tagId = $tagId; $this->comments = $comments; $this->expiresAt = $expiresAt; diff --git a/src/Models/Operations/UpsertLinkRequestBody.php b/src/Models/Operations/UpsertLinkRequestBody.php index 2ef4554..f79a3ae 100644 --- a/src/Models/Operations/UpsertLinkRequestBody.php +++ b/src/Models/Operations/UpsertLinkRequestBody.php @@ -67,7 +67,7 @@ class UpsertLinkRequestBody public string|array|null $tagNames = null; /** - * This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with `ext_` when passed as a query parameter. + * 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. * * @var ?string $externalId */ @@ -75,6 +75,15 @@ class UpsertLinkRequestBody #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?string $externalId = null; + /** + * 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. + * + * @var ?string $tenantId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('tenantId')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $tenantId = null; + /** * The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. * @@ -327,6 +336,7 @@ class UpsertLinkRequestBody * @param ?bool $rewrite * @param ?bool $doIndex * @param ?string $externalId + * @param ?string $tenantId * @param ?string $tagId * @param ?string $comments * @param ?string $expiresAt @@ -348,7 +358,7 @@ class UpsertLinkRequestBody * @param ?string $programId * @param ?array $webhookIds */ - public function __construct(string $url, ?string $domain = null, ?string $key = null, ?string $prefix = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $externalId = null, ?string $tagId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null, ?string $programId = null, ?array $webhookIds = null, ?bool $trackConversion = false, ?bool $archived = false, ?bool $publicStats = false, ?bool $proxy = false, ?bool $rewrite = false, ?bool $doIndex = false) + public function __construct(string $url, ?string $domain = null, ?string $key = null, ?string $prefix = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $externalId = null, ?string $tenantId = null, ?string $tagId = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $ref = null, ?string $programId = null, ?array $webhookIds = null, ?bool $trackConversion = false, ?bool $archived = false, ?bool $publicStats = false, ?bool $proxy = false, ?bool $rewrite = false, ?bool $doIndex = false) { $this->url = $url; $this->domain = $domain; @@ -357,6 +367,7 @@ public function __construct(string $url, ?string $domain = null, ?string $key = $this->tagIds = $tagIds; $this->tagNames = $tagNames; $this->externalId = $externalId; + $this->tenantId = $tenantId; $this->tagId = $tagId; $this->comments = $comments; $this->expiresAt = $expiresAt; diff --git a/src/QRCodes.php b/src/QRCodes.php index 43e6ec8..2c53c35 100644 --- a/src/QRCodes.php +++ b/src/QRCodes.php @@ -73,18 +73,14 @@ public function get(Operations\GetQRCodeRequest $request, ?Options $options = nu $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'image/png')) { diff --git a/src/SDKConfiguration.php b/src/SDKConfiguration.php index 2675fda..dc6892e 100644 --- a/src/SDKConfiguration.php +++ b/src/SDKConfiguration.php @@ -26,11 +26,11 @@ class SDKConfiguration public string $openapiDocVersion = '0.0.1'; - public string $sdkVersion = '0.11.12'; + public string $sdkVersion = '0.11.13'; - public string $genVersion = '2.486.1'; + public string $genVersion = '2.493.4'; - public string $userAgent = 'speakeasy-sdk/php 0.11.12 2.486.1 0.0.1 dub/dub-php'; + public string $userAgent = 'speakeasy-sdk/php 0.11.13 2.493.4 0.0.1 dub/dub-php'; public ?RetryConfig $retryConfig = null; @@ -75,7 +75,7 @@ public function getSecurity(): ?Models\Components\Security */ public function getServerDetails(): Utils\ServerDetails { - if ($this->serverUrl !== null && $this->serverUrl !== '') { + if ($this->serverUrl !== '') { return new Utils\ServerDetails(rtrim($this->serverUrl, '/'), []); } if ($this->serverIndex === null) { diff --git a/src/Tags.php b/src/Tags.php index f0a1483..697a243 100644 --- a/src/Tags.php +++ b/src/Tags.php @@ -74,18 +74,14 @@ public function create(?Operations\CreateTagRequestBody $request = null, ?Option $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 201) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { @@ -239,18 +235,14 @@ public function delete(string $id, ?Options $options = null): Operations\DeleteT $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { @@ -400,18 +392,14 @@ public function list(?Options $options = null): Operations\GetTagsResponse $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { @@ -571,18 +559,14 @@ public function update(string $id, ?Operations\UpdateTagRequestBody $requestBody $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { diff --git a/src/Track.php b/src/Track.php index 160fba7..e4015e5 100644 --- a/src/Track.php +++ b/src/Track.php @@ -74,18 +74,14 @@ public function lead(?Operations\TrackLeadRequestBody $request = null, ?Options $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { @@ -240,18 +236,14 @@ public function sale(?Operations\TrackSaleRequestBody $request = null, ?Options $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { diff --git a/src/Utils/PathParameters.php b/src/Utils/PathParameters.php index 914df0d..b060659 100644 --- a/src/Utils/PathParameters.php +++ b/src/Utils/PathParameters.php @@ -15,10 +15,10 @@ class PathParameters /** * @param string $type * @param mixed $pathParams - * @param array>> $globals + * @param array>>|null $globals * @return array */ - public function parsePathParams(string $type, mixed $pathParams, array $globals): array + public function parsePathParams(string $type, mixed $pathParams, ?array $globals): array { $parsed = []; @@ -71,6 +71,11 @@ private function parseSimplePathParams(ParamsMetadata $metadata, mixed $value): case 'object': $vals = []; + $cls = get_class($value); + if ($cls === 'Brick\\Math\\BigDecimal' || $cls === 'Brick\\Math\\BigInteger') { + $pathParams[$metadata->name] = valToString($value, []); + break; + } foreach ($value as $field => $fieldValue) { /** @phpstan-ignore-line */ if ($fieldValue === null) { continue; diff --git a/src/Utils/QueryParameters.php b/src/Utils/QueryParameters.php index 80f52fb..5273d3b 100644 --- a/src/Utils/QueryParameters.php +++ b/src/Utils/QueryParameters.php @@ -167,7 +167,11 @@ private function parseDelimitedParams(ParamsMetadata $metadata, mixed $value, st switch (gettype($value)) { case 'object': $items = []; - + $cls = get_class($value); + if ($cls === 'Brick\\Math\\BigDecimal' || $cls === 'Brick\\Math\\BigInteger') { + $queryParams[$metadata->name] = valToString($value, []); + break; + } foreach ($value as $field => $val) { /** @phpstan-ignore-line */ if ($val === null) { continue; diff --git a/src/Workspaces.php b/src/Workspaces.php index 15c0d2d..13e93a7 100644 --- a/src/Workspaces.php +++ b/src/Workspaces.php @@ -73,18 +73,14 @@ public function get(string $idOrSlug, ?Options $options = null): Operations\GetW $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { @@ -244,18 +240,14 @@ public function update(string $idOrSlug, ?Operations\UpdateWorkspaceRequestBody $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) {