From 0ad2524a6b257532d079dc65379230050daac2e4 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Sun, 6 Oct 2024 21:56:33 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.410.0 --- .speakeasy/gen.lock | 23 +++-- .speakeasy/gen.yaml | 5 +- .speakeasy/workflow.lock | 12 +-- RELEASES.md | 12 ++- codeSamples.yaml | 2 +- composer.json | 6 +- docs/Models/Components/AnalyticsBrowsers.md | 8 +- docs/Models/Components/AnalyticsCities.md | 8 +- docs/Models/Components/AnalyticsContinents.md | 12 +++ docs/Models/Components/AnalyticsCount.md | 8 +- docs/Models/Components/AnalyticsCountries.md | 10 +- docs/Models/Components/AnalyticsDevices.md | 8 +- docs/Models/Components/AnalyticsOS.md | 8 +- .../Models/Components/AnalyticsRefererUrls.md | 12 +++ docs/Models/Components/AnalyticsReferers.md | 8 +- docs/Models/Components/AnalyticsTimeseries.md | 8 +- docs/Models/Components/AnalyticsTopLinks.md | 8 +- docs/Models/Components/AnalyticsTopUrls.md | 8 +- docs/Models/Components/AnalyticsTriggers.md | 12 +++ docs/Models/Components/Continent.md | 16 ++++ docs/Models/Components/Data.md | 10 +- docs/Models/Components/DomainSchema.md | 8 +- docs/Models/Components/Domains.md | 4 +- .../Models/Components/LeadCreatedEventLink.md | 10 +- docs/Models/Components/Link.md | 10 +- .../Models/Components/LinkClickedEventLink.md | 10 +- docs/Models/Components/LinkSchema.md | 22 ++--- .../Models/Components/SaleCreatedEventLink.md | 10 +- docs/Models/Components/Trigger.md | 11 +++ docs/Models/Components/WorkspaceSchema.md | 4 +- .../RetrieveAnalyticsResponseBody.md | 18 ++++ docs/sdks/domains/README.md | 2 +- src/Analytics.php | 2 +- src/Models/Components/AnalyticsBrowsers.php | 30 +++--- src/Models/Components/AnalyticsCities.php | 30 +++--- src/Models/Components/AnalyticsContinents.php | 74 +++++++++++++++ src/Models/Components/AnalyticsCount.php | 30 +++--- src/Models/Components/AnalyticsCountries.php | 39 ++++---- src/Models/Components/AnalyticsDevices.php | 30 +++--- src/Models/Components/AnalyticsOS.php | 30 +++--- .../Components/AnalyticsRefererUrls.php | 73 +++++++++++++++ src/Models/Components/AnalyticsReferers.php | 30 +++--- src/Models/Components/AnalyticsTimeseries.php | 30 +++--- src/Models/Components/AnalyticsTopLinks.php | 30 +++--- src/Models/Components/AnalyticsTopUrls.php | 30 +++--- src/Models/Components/AnalyticsTriggers.php | 74 +++++++++++++++ src/Models/Components/Continent.php | 22 +++++ src/Models/Components/Data.php | 38 ++++---- src/Models/Components/DomainSchema.php | 34 ++++--- src/Models/Components/Domains.php | 16 ++-- .../Components/LeadCreatedEventLink.php | 38 ++++---- src/Models/Components/Link.php | 38 ++++---- .../Components/LinkClickedEventLink.php | 38 ++++---- src/Models/Components/LinkSchema.php | 92 ++++++++++--------- .../Components/SaleCreatedEventLink.php | 38 ++++---- src/Models/Components/Trigger.php | 17 ++++ src/Models/Components/WorkspaceSchema.php | 9 +- .../Operations/CreateDomainRequestBody.php | 2 +- .../Operations/CreateLinkRequestBody.php | 2 +- src/Models/Operations/Data.php | 2 +- .../Operations/GetLinksCountRequest.php | 2 +- src/Models/Operations/GetLinksRequest.php | 2 +- src/Models/Operations/GetQRCodeRequest.php | 2 +- src/Models/Operations/ListDomainsRequest.php | 2 +- src/Models/Operations/ListEventsRequest.php | 2 +- src/Models/Operations/RequestBody.php | 2 +- .../Operations/RetrieveAnalyticsRequest.php | 2 +- .../Operations/RetrieveAnalyticsResponse.php | 4 +- .../Operations/TrackLeadRequestBody.php | 2 +- .../Operations/TrackSaleRequestBody.php | 2 +- .../Operations/UpdateDomainRequestBody.php | 2 +- .../Operations/UpdateLinkRequestBody.php | 2 +- .../Operations/UpsertLinkRequestBody.php | 2 +- src/SDKConfiguration.php | 6 +- src/Utils/Utils.php | 7 +- 75 files changed, 858 insertions(+), 414 deletions(-) create mode 100644 docs/Models/Components/AnalyticsContinents.md create mode 100644 docs/Models/Components/AnalyticsRefererUrls.md create mode 100644 docs/Models/Components/AnalyticsTriggers.md create mode 100644 docs/Models/Components/Continent.md create mode 100644 docs/Models/Components/Trigger.md create mode 100644 src/Models/Components/AnalyticsContinents.php create mode 100644 src/Models/Components/AnalyticsRefererUrls.php create mode 100644 src/Models/Components/AnalyticsTriggers.php create mode 100644 src/Models/Components/Continent.php create mode 100644 src/Models/Components/Trigger.php diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index af5051f..03e8c8a 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,18 +1,19 @@ lockVersion: 2.0.0 id: 43187d3e-7c3c-4c11-b5d4-4b2334fb6d96 management: - docChecksum: 5c400b20334e45bb5625715215fcbff4 + docChecksum: 8620b0f24a0133906ad7b91d73cc1651 docVersion: 0.0.1 - speakeasyVersion: 1.409.0 - generationVersion: 2.429.0 - releaseVersion: 0.6.9 - configChecksum: db1927b1f8f99ab93572ea83e625ce3b + speakeasyVersion: 1.410.0 + generationVersion: 2.434.1 + releaseVersion: 0.7.0 + configChecksum: 007f5a8816c52013295fe822a0183d6d repoURL: https://github.com/dubinc/dub-php.git installationURL: https://github.com/dubinc/dub-php published: true features: php: - core: 3.4.9 + constsAndDefaults: 0.2.0 + core: 3.5.0 deprecations: 2.81.1 errors: 0.1.4 examples: 2.81.3 @@ -33,19 +34,23 @@ generatedFiles: - docs/Models/Components/AnalyticsBrowsers.md - docs/Models/Components/AnalyticsCities.md - docs/Models/Components/AnalyticsCitiesCountry.md + - docs/Models/Components/AnalyticsContinents.md - docs/Models/Components/AnalyticsCount.md - docs/Models/Components/AnalyticsCountries.md - docs/Models/Components/AnalyticsDevices.md - docs/Models/Components/AnalyticsOS.md + - docs/Models/Components/AnalyticsRefererUrls.md - docs/Models/Components/AnalyticsReferers.md - docs/Models/Components/AnalyticsTimeseries.md - docs/Models/Components/AnalyticsTopLinks.md - docs/Models/Components/AnalyticsTopUrls.md + - docs/Models/Components/AnalyticsTriggers.md - docs/Models/Components/City.md - docs/Models/Components/Click.md - docs/Models/Components/ClickEvent.md - docs/Models/Components/ClickEventGeo.md - docs/Models/Components/Color.md + - docs/Models/Components/Continent.md - docs/Models/Components/ContinentCode.md - docs/Models/Components/Country.md - docs/Models/Components/CountryCode.md @@ -88,6 +93,7 @@ generatedFiles: - docs/Models/Components/Security.md - docs/Models/Components/TagSchema.md - docs/Models/Components/Three.md + - docs/Models/Components/Trigger.md - docs/Models/Components/Two.md - docs/Models/Components/Users.md - docs/Models/Components/WebhookEvent.md @@ -246,19 +252,23 @@ generatedFiles: - src/Models/Components/AnalyticsBrowsers.php - src/Models/Components/AnalyticsCities.php - src/Models/Components/AnalyticsCitiesCountry.php + - src/Models/Components/AnalyticsContinents.php - src/Models/Components/AnalyticsCount.php - src/Models/Components/AnalyticsCountries.php - src/Models/Components/AnalyticsDevices.php - src/Models/Components/AnalyticsOS.php + - src/Models/Components/AnalyticsRefererUrls.php - src/Models/Components/AnalyticsReferers.php - src/Models/Components/AnalyticsTimeseries.php - src/Models/Components/AnalyticsTopLinks.php - src/Models/Components/AnalyticsTopUrls.php + - src/Models/Components/AnalyticsTriggers.php - src/Models/Components/City.php - src/Models/Components/Click.php - src/Models/Components/ClickEvent.php - src/Models/Components/ClickEventGeo.php - src/Models/Components/Color.php + - src/Models/Components/Continent.php - src/Models/Components/ContinentCode.php - src/Models/Components/Country.php - src/Models/Components/CountryCode.php @@ -300,6 +310,7 @@ generatedFiles: - src/Models/Components/Security.php - src/Models/Components/TagSchema.php - src/Models/Components/Three.php + - src/Models/Components/Trigger.php - src/Models/Components/Two.php - src/Models/Components/Users.php - src/Models/Components/WorkspaceSchema.php diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index da19c5f..6d81d97 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true php: - version: 0.6.9 + version: 0.7.0 clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true imports: @@ -24,6 +24,9 @@ php: shared: Models/Components webhooks: Models/Webhooks inputModelSuffix: input + laravelServiceProvider: + enabled: false + svcName: openapi maxMethodParams: 4 namespace: Dub outputModelSuffix: output diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 4e376d3..739c058 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.409.0 +speakeasyVersion: 1.410.0 sources: dub: sourceNamespace: dub - sourceRevisionDigest: sha256:54b3d378cf30fc6dfb823280e2805010c14f3954439f59498e6c19d2aa0b1b4d - sourceBlobDigest: sha256:9a2b011824d527a9f54b4f1763efbac3838d48ec59db002f9a5888426279efa2 + sourceRevisionDigest: sha256:1d21d889d6d503cdb0b4c5ec4743e423f9244c7e26d083a87e9e43d427a2a84b + sourceBlobDigest: sha256:bb86fada285bc8f668248f0458c4c2b992a67b17c3e59d839c9d4e5f15850b8a tags: - latest - main @@ -11,10 +11,10 @@ targets: my-first-target: source: dub sourceNamespace: dub - sourceRevisionDigest: sha256:54b3d378cf30fc6dfb823280e2805010c14f3954439f59498e6c19d2aa0b1b4d - sourceBlobDigest: sha256:9a2b011824d527a9f54b4f1763efbac3838d48ec59db002f9a5888426279efa2 + sourceRevisionDigest: sha256:1d21d889d6d503cdb0b4c5ec4743e423f9244c7e26d083a87e9e43d427a2a84b + sourceBlobDigest: sha256:bb86fada285bc8f668248f0458c4c2b992a67b17c3e59d839c9d4e5f15850b8a codeSamplesNamespace: code-samples-php-my-first-target - codeSamplesRevisionDigest: sha256:ad3ab8fdf3ab34cd98c8c7a26d6be6c0978059a45313c2516d7c11d36ed116f9 + codeSamplesRevisionDigest: sha256:52966a6ed9ed3e173e97022eb3f04e60e551372ddd58fe2cbaf96225dffcc4dc workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/RELEASES.md b/RELEASES.md index 2fd1ae1..021e5e4 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -290,4 +290,14 @@ Based on: ### Generated - [php v0.6.9] . ### Releases -- [Composer v0.6.9] https://packagist.org/packages/dub/dub-php#v0.6.9 - . \ No newline at end of file +- [Composer v0.6.9] https://packagist.org/packages/dub/dub-php#v0.6.9 - . + +## 2024-10-06 21:55:14 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.410.0 (2.434.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [php v0.7.0] . +### Releases +- [Composer v0.7.0] https://packagist.org/packages/dub/dub-php#v0.7.0 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index f3a4454..0f5fbf0 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -14,7 +14,7 @@ actions: "x-codeSamples": - "lang": "php" "label": "listDomains" - "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\n\n$security = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\n\n\n$response = $sdk->domains->list(\n archived: false,\n search: '',\n page: 1,\n pageSize: 50\n\n);\n\nif ($response->domainSchemas !== null) {\n // handle response\n}" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\n\n$security = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\n\n\n$response = $sdk->domains->list(\n archived: true,\n search: '',\n page: 1,\n pageSize: 50\n\n);\n\nif ($response->domainSchemas !== null) {\n // handle response\n}" - target: $["paths"]["/domains"]["post"] update: "x-codeSamples": diff --git a/composer.json b/composer.json index 2624e33..430fc20 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ }, "license": "MIT", "require": { - "php": "^8.1", + "php": "^8.2", "guzzlehttp/guzzle": "^7.0", "speakeasy/serializer": "^3.40.0", "brick/date-time": "^0.7.0", @@ -16,9 +16,9 @@ }, "require-dev": { "laravel/pint": "^1.18.1", - "phpstan/phpstan": "^1.9", + "phpstan/phpstan": "^1.12", "phpunit/phpunit": "^10", - "rector/rector": "^0.18.13", + "rector/rector": "^0.19", "roave/security-advisories": "dev-latest" }, "minimum-stability": "stable", diff --git a/docs/Models/Components/AnalyticsBrowsers.md b/docs/Models/Components/AnalyticsBrowsers.md index e592ed8..8dfd6a2 100644 --- a/docs/Models/Components/AnalyticsBrowsers.md +++ b/docs/Models/Components/AnalyticsBrowsers.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | | `browser` | *string* | :heavy_check_mark: | The name of the browser | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this browser | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this browser | -| `sales` | *float* | :heavy_check_mark: | The number of sales from this browser | -| `saleAmount` | *float* | :heavy_check_mark: | The total amount of sales from this browser, in cents | \ No newline at end of file +| `clicks` | *?float* | :heavy_minus_sign: | The number of clicks from this browser | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads from this browser | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales from this browser | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total amount of sales from this browser, in cents | \ No newline at end of file diff --git a/docs/Models/Components/AnalyticsCities.md b/docs/Models/Components/AnalyticsCities.md index 0950f50..71d68b3 100644 --- a/docs/Models/Components/AnalyticsCities.md +++ b/docs/Models/Components/AnalyticsCities.md @@ -7,7 +7,7 @@ | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `city` | *string* | :heavy_check_mark: | The name of the city | | `country` | [Components\AnalyticsCitiesCountry](../../Models/Components/AnalyticsCitiesCountry.md) | :heavy_check_mark: | The 2-letter country code of the city: https://d.to/geo | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this city | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this city | -| `sales` | *float* | :heavy_check_mark: | The number of sales from this city | -| `saleAmount` | *float* | :heavy_check_mark: | The total amount of sales from this city, in cents | \ No newline at end of file +| `clicks` | *?float* | :heavy_minus_sign: | The number of clicks from this city | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads from this city | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales from this city | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total amount of sales from this city, in cents | \ No newline at end of file diff --git a/docs/Models/Components/AnalyticsContinents.md b/docs/Models/Components/AnalyticsContinents.md new file mode 100644 index 0000000..ea06b3a --- /dev/null +++ b/docs/Models/Components/AnalyticsContinents.md @@ -0,0 +1,12 @@ +# AnalyticsContinents + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `continent` | [Components\Continent](../../Models/Components/Continent.md) | :heavy_check_mark: | The 2-letter ISO 3166-1 code representing the continent associated with the location of the user. | +| `clicks` | *?float* | :heavy_minus_sign: | The number of clicks from this continent | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads from this continent | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales from this continent | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total amount of sales from this continent, in cents | \ No newline at end of file diff --git a/docs/Models/Components/AnalyticsCount.md b/docs/Models/Components/AnalyticsCount.md index ee26fbb..082b706 100644 --- a/docs/Models/Components/AnalyticsCount.md +++ b/docs/Models/Components/AnalyticsCount.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `clicks` | *float* | :heavy_check_mark: | The total number of clicks | -| `leads` | *float* | :heavy_check_mark: | The total number of leads | -| `sales` | *float* | :heavy_check_mark: | The total number of sales | -| `saleAmount` | *float* | :heavy_check_mark: | The total amount of sales, in cents | \ No newline at end of file +| `clicks` | *?float* | :heavy_minus_sign: | The total number of clicks | +| `leads` | *?float* | :heavy_minus_sign: | The total number of leads | +| `sales` | *?float* | :heavy_minus_sign: | The total number of sales | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total amount of sales, in cents | \ No newline at end of file diff --git a/docs/Models/Components/AnalyticsCountries.md b/docs/Models/Components/AnalyticsCountries.md index 73fb9ad..2b6930a 100644 --- a/docs/Models/Components/AnalyticsCountries.md +++ b/docs/Models/Components/AnalyticsCountries.md @@ -6,8 +6,8 @@ | Field | Type | Required | Description | | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | | `country` | [Components\Country](../../Models/Components/Country.md) | :heavy_check_mark: | The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo | -| `city` | [Components\City](../../Models/Components/City.md) | :heavy_check_mark: | N/A | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this country | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this country | -| `sales` | *float* | :heavy_check_mark: | The number of sales from this country | -| `saleAmount` | *float* | :heavy_check_mark: | The total amount of sales from this country, in cents | \ No newline at end of file +| `city` | [?Components\City](../../Models/Components/City.md) | :heavy_minus_sign: | N/A | +| `clicks` | *?float* | :heavy_minus_sign: | The number of clicks from this country | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads from this country | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales from this country | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total amount of sales from this country, in cents | \ No newline at end of file diff --git a/docs/Models/Components/AnalyticsDevices.md b/docs/Models/Components/AnalyticsDevices.md index 83e328f..14db261 100644 --- a/docs/Models/Components/AnalyticsDevices.md +++ b/docs/Models/Components/AnalyticsDevices.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | | `device` | *string* | :heavy_check_mark: | The name of the device | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this device | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this device | -| `sales` | *float* | :heavy_check_mark: | The number of sales from this device | -| `saleAmount` | *float* | :heavy_check_mark: | The total amount of sales from this device, in cents | \ No newline at end of file +| `clicks` | *?float* | :heavy_minus_sign: | The number of clicks from this device | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads from this device | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales from this device | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total amount of sales from this device, in cents | \ No newline at end of file diff --git a/docs/Models/Components/AnalyticsOS.md b/docs/Models/Components/AnalyticsOS.md index 3ce4340..07ae5b0 100644 --- a/docs/Models/Components/AnalyticsOS.md +++ b/docs/Models/Components/AnalyticsOS.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | | `os` | *string* | :heavy_check_mark: | The name of the OS | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this OS | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this OS | -| `sales` | *float* | :heavy_check_mark: | The number of sales from this OS | -| `saleAmount` | *float* | :heavy_check_mark: | The total amount of sales from this OS, in cents | \ No newline at end of file +| `clicks` | *?float* | :heavy_minus_sign: | The number of clicks from this OS | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads from this OS | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales from this OS | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total amount of sales from this OS, in cents | \ No newline at end of file diff --git a/docs/Models/Components/AnalyticsRefererUrls.md b/docs/Models/Components/AnalyticsRefererUrls.md new file mode 100644 index 0000000..bb1ad11 --- /dev/null +++ b/docs/Models/Components/AnalyticsRefererUrls.md @@ -0,0 +1,12 @@ +# AnalyticsRefererUrls + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `refererUrl` | *string* | :heavy_check_mark: | The full URL of the referer. If unknown, this will be `(direct)` | +| `clicks` | *?float* | :heavy_minus_sign: | The number of clicks from this referer to this URL | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads from this referer to this URL | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales from this referer to this URL | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total amount of sales from this referer to this URL, in cents | \ No newline at end of file diff --git a/docs/Models/Components/AnalyticsReferers.md b/docs/Models/Components/AnalyticsReferers.md index 65947c9..aa1652b 100644 --- a/docs/Models/Components/AnalyticsReferers.md +++ b/docs/Models/Components/AnalyticsReferers.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | | `referer` | *string* | :heavy_check_mark: | The name of the referer. If unknown, this will be `(direct)` | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this referer | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this referer | -| `sales` | *float* | :heavy_check_mark: | The number of sales from this referer | -| `saleAmount` | *float* | :heavy_check_mark: | The total amount of sales from this referer, in cents | \ No newline at end of file +| `clicks` | *?float* | :heavy_minus_sign: | The number of clicks from this referer | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads from this referer | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales from this referer | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total amount of sales from this referer, in cents | \ No newline at end of file diff --git a/docs/Models/Components/AnalyticsTimeseries.md b/docs/Models/Components/AnalyticsTimeseries.md index 30a95e0..bd2ee12 100644 --- a/docs/Models/Components/AnalyticsTimeseries.md +++ b/docs/Models/Components/AnalyticsTimeseries.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | | `start` | *string* | :heavy_check_mark: | The starting timestamp of the interval | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks in the interval | -| `leads` | *float* | :heavy_check_mark: | The number of leads in the interval | -| `sales` | *float* | :heavy_check_mark: | The number of sales in the interval | -| `saleAmount` | *float* | :heavy_check_mark: | The total amount of sales in the interval, in cents | \ No newline at end of file +| `clicks` | *?float* | :heavy_minus_sign: | The number of clicks in the interval | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads in the interval | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales in the interval | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total amount of sales in the interval, in cents | \ No newline at end of file diff --git a/docs/Models/Components/AnalyticsTopLinks.md b/docs/Models/Components/AnalyticsTopLinks.md index bca41cd..56163ba 100644 --- a/docs/Models/Components/AnalyticsTopLinks.md +++ b/docs/Models/Components/AnalyticsTopLinks.md @@ -12,7 +12,7 @@ | `shortLink` | *string* | :heavy_check_mark: | The short link URL | | `url` | *string* | :heavy_check_mark: | The destination URL of the short link | | `createdAt` | *string* | :heavy_check_mark: | The creation timestamp of the short link | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this link | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this link | -| `sales` | *float* | :heavy_check_mark: | The number of sales from this link | -| `saleAmount` | *float* | :heavy_check_mark: | The total amount of sales from this link, in cents | \ No newline at end of file +| `clicks` | *?float* | :heavy_minus_sign: | The number of clicks from this link | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads from this link | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales from this link | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total amount of sales from this link, in cents | \ No newline at end of file diff --git a/docs/Models/Components/AnalyticsTopUrls.md b/docs/Models/Components/AnalyticsTopUrls.md index 3525963..0c0b3f6 100644 --- a/docs/Models/Components/AnalyticsTopUrls.md +++ b/docs/Models/Components/AnalyticsTopUrls.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | | `url` | *string* | :heavy_check_mark: | The destination URL | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this URL | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this URL | -| `sales` | *float* | :heavy_check_mark: | The number of sales from this URL | -| `saleAmount` | *float* | :heavy_check_mark: | The total amount of sales from this URL, in cents | \ No newline at end of file +| `clicks` | *?float* | :heavy_minus_sign: | The number of clicks from this URL | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads from this URL | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales from this URL | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total amount of sales from this URL, in cents | \ No newline at end of file diff --git a/docs/Models/Components/AnalyticsTriggers.md b/docs/Models/Components/AnalyticsTriggers.md new file mode 100644 index 0000000..9b07a1f --- /dev/null +++ b/docs/Models/Components/AnalyticsTriggers.md @@ -0,0 +1,12 @@ +# AnalyticsTriggers + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `trigger` | [Components\Trigger](../../Models/Components/Trigger.md) | :heavy_check_mark: | The type of trigger method: link click or QR scan | +| `clicks` | *?float* | :heavy_minus_sign: | The number of clicks from this trigger method | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads from this trigger method | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales from this trigger method | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total amount of sales from this trigger method, in cents | \ No newline at end of file diff --git a/docs/Models/Components/Continent.md b/docs/Models/Components/Continent.md new file mode 100644 index 0000000..dd8d974 --- /dev/null +++ b/docs/Models/Components/Continent.md @@ -0,0 +1,16 @@ +# Continent + +The 2-letter ISO 3166-1 code representing the continent associated with the location of the user. + + +## Values + +| Name | Value | +| ----- | ----- | +| `Af` | AF | +| `An` | AN | +| `As` | AS | +| `Eu` | EU | +| `Na` | NA | +| `Oc` | OC | +| `Sa` | SA | \ No newline at end of file diff --git a/docs/Models/Components/Data.md b/docs/Models/Components/Data.md index 8c8028b..1185e11 100644 --- a/docs/Models/Components/Data.md +++ b/docs/Models/Components/Data.md @@ -13,11 +13,7 @@ | `shortLink` | *string* | :heavy_check_mark: | The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). | | `qrCode` | *string* | :heavy_check_mark: | The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`). | | `workspaceId` | *string* | :heavy_check_mark: | The workspace ID of the short link. | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks on the short link. | | `lastClicked` | *string* | :heavy_check_mark: | N/A | -| `leads` | *float* | :heavy_check_mark: | [BETA]: The number of leads the short links has generated. | -| `sales` | *float* | :heavy_check_mark: | [BETA]: The number of sales the short links has generated. | -| `saleAmount` | *float* | :heavy_check_mark: | [BETA]: The total dollar amount of sales the short links has generated (in cents). | | `createdAt` | *string* | :heavy_check_mark: | N/A | | `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. | @@ -46,4 +42,8 @@ | `utmCampaign` | *string* | :heavy_check_mark: | The UTM campaign of the short link. | | `utmTerm` | *string* | :heavy_check_mark: | The UTM term of the short link. | | `utmContent` | *string* | :heavy_check_mark: | The UTM content of the short link. | -| `userId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `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). | \ No newline at end of file diff --git a/docs/Models/Components/DomainSchema.md b/docs/Models/Components/DomainSchema.md index 51931b3..0f6bfd9 100644 --- a/docs/Models/Components/DomainSchema.md +++ b/docs/Models/Components/DomainSchema.md @@ -7,11 +7,11 @@ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | | `id` | *string* | :heavy_check_mark: | The unique identifier of the domain. | | | `slug` | *string* | :heavy_check_mark: | The domain name. | acme.com | -| `verified` | *bool* | :heavy_check_mark: | Whether the domain is verified. | | -| `primary` | *bool* | :heavy_check_mark: | Whether the domain is the primary domain for the workspace. | | -| `archived` | *bool* | :heavy_check_mark: | Whether the domain is archived. | | -| `placeholder` | *string* | :heavy_check_mark: | Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened. | https://dub.co/help/article/what-is-dub | | `createdAt` | *string* | :heavy_check_mark: | The date the domain was created. | | | `updatedAt` | *string* | :heavy_check_mark: | The date the domain was last updated. | | +| `verified` | *?bool* | :heavy_minus_sign: | Whether the domain is verified. | | +| `primary` | *?bool* | :heavy_minus_sign: | Whether the domain is the primary domain for the workspace. | | +| `archived` | *?bool* | :heavy_minus_sign: | Whether the domain is archived. | | +| `placeholder` | *?string* | :heavy_minus_sign: | Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened. | https://dub.co/help/article/what-is-dub | | `expiredUrl` | *string* | :heavy_check_mark: | The URL to redirect to when a link under this domain has expired. | https://acme.com/expired | | `registeredDomain` | [?Components\RegisteredDomain](../../Models/Components/RegisteredDomain.md) | :heavy_minus_sign: | The registered domain record. | | \ No newline at end of file diff --git a/docs/Models/Components/Domains.md b/docs/Models/Components/Domains.md index 1b56579..5d55f0d 100644 --- a/docs/Models/Components/Domains.md +++ b/docs/Models/Components/Domains.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | | `slug` | *string* | :heavy_check_mark: | The domain name. | acme.com | -| `primary` | *bool* | :heavy_check_mark: | Whether the domain is the primary domain for the workspace. | | -| `verified` | *bool* | :heavy_check_mark: | Whether the domain is verified. | | \ No newline at end of file +| `primary` | *?bool* | :heavy_minus_sign: | Whether the domain is the primary domain for the workspace. | | +| `verified` | *?bool* | :heavy_minus_sign: | Whether the domain is verified. | | \ No newline at end of file diff --git a/docs/Models/Components/LeadCreatedEventLink.md b/docs/Models/Components/LeadCreatedEventLink.md index 689197d..8ffc228 100644 --- a/docs/Models/Components/LeadCreatedEventLink.md +++ b/docs/Models/Components/LeadCreatedEventLink.md @@ -13,11 +13,7 @@ | `shortLink` | *string* | :heavy_check_mark: | The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). | | `qrCode` | *string* | :heavy_check_mark: | The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`). | | `workspaceId` | *string* | :heavy_check_mark: | The workspace ID of the short link. | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks on the short link. | | `lastClicked` | *string* | :heavy_check_mark: | N/A | -| `leads` | *float* | :heavy_check_mark: | [BETA]: The number of leads the short links has generated. | -| `sales` | *float* | :heavy_check_mark: | [BETA]: The number of sales the short links has generated. | -| `saleAmount` | *float* | :heavy_check_mark: | [BETA]: The total dollar amount of sales the short links has generated (in cents). | | `createdAt` | *string* | :heavy_check_mark: | N/A | | `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. | @@ -46,4 +42,8 @@ | `utmCampaign` | *string* | :heavy_check_mark: | The UTM campaign of the short link. | | `utmTerm` | *string* | :heavy_check_mark: | The UTM term of the short link. | | `utmContent` | *string* | :heavy_check_mark: | The UTM content of the short link. | -| `userId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `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). | \ No newline at end of file diff --git a/docs/Models/Components/Link.md b/docs/Models/Components/Link.md index fa37acc..178f64b 100644 --- a/docs/Models/Components/Link.md +++ b/docs/Models/Components/Link.md @@ -13,11 +13,7 @@ | `shortLink` | *string* | :heavy_check_mark: | The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). | | `qrCode` | *string* | :heavy_check_mark: | The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`). | | `workspaceId` | *string* | :heavy_check_mark: | The workspace ID of the short link. | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks on the short link. | | `lastClicked` | *string* | :heavy_check_mark: | N/A | -| `leads` | *float* | :heavy_check_mark: | [BETA]: The number of leads the short links has generated. | -| `sales` | *float* | :heavy_check_mark: | [BETA]: The number of sales the short links has generated. | -| `saleAmount` | *float* | :heavy_check_mark: | [BETA]: The total dollar amount of sales the short links has generated (in cents). | | `createdAt` | *string* | :heavy_check_mark: | N/A | | `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. | @@ -46,4 +42,8 @@ | `utmCampaign` | *string* | :heavy_check_mark: | The UTM campaign of the short link. | | `utmTerm` | *string* | :heavy_check_mark: | The UTM term of the short link. | | `utmContent` | *string* | :heavy_check_mark: | The UTM content of the short link. | -| `userId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `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). | \ No newline at end of file diff --git a/docs/Models/Components/LinkClickedEventLink.md b/docs/Models/Components/LinkClickedEventLink.md index 5f76bc9..b782616 100644 --- a/docs/Models/Components/LinkClickedEventLink.md +++ b/docs/Models/Components/LinkClickedEventLink.md @@ -13,11 +13,7 @@ | `shortLink` | *string* | :heavy_check_mark: | The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). | | `qrCode` | *string* | :heavy_check_mark: | The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`). | | `workspaceId` | *string* | :heavy_check_mark: | The workspace ID of the short link. | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks on the short link. | | `lastClicked` | *string* | :heavy_check_mark: | N/A | -| `leads` | *float* | :heavy_check_mark: | [BETA]: The number of leads the short links has generated. | -| `sales` | *float* | :heavy_check_mark: | [BETA]: The number of sales the short links has generated. | -| `saleAmount` | *float* | :heavy_check_mark: | [BETA]: The total dollar amount of sales the short links has generated (in cents). | | `createdAt` | *string* | :heavy_check_mark: | N/A | | `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. | @@ -46,4 +42,8 @@ | `utmCampaign` | *string* | :heavy_check_mark: | The UTM campaign of the short link. | | `utmTerm` | *string* | :heavy_check_mark: | The UTM term of the short link. | | `utmContent` | *string* | :heavy_check_mark: | The UTM content of the short link. | -| `userId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `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). | \ No newline at end of file diff --git a/docs/Models/Components/LinkSchema.md b/docs/Models/Components/LinkSchema.md index f1d1631..1e9304f 100644 --- a/docs/Models/Components/LinkSchema.md +++ b/docs/Models/Components/LinkSchema.md @@ -9,35 +9,31 @@ | `domain` | *string* | :heavy_check_mark: | The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). | | `key` | *string* | :heavy_check_mark: | The short link slug. If not provided, a random 7-character slug will be generated. | | `url` | *string* | :heavy_check_mark: | The destination URL of the short link. | -| `trackConversion` | *bool* | :heavy_check_mark: | [BETA] Whether to track conversions for the short link. | -| `archived` | *bool* | :heavy_check_mark: | Whether the short link is archived. | -| `proxy` | *bool* | :heavy_check_mark: | Whether the short link uses Custom Social Media Cards feature. | -| `rewrite` | *bool* | :heavy_check_mark: | Whether the short link uses link cloaking. | -| `doIndex` | *bool* | :heavy_check_mark: | Whether to allow search engines to index the short link. | -| `publicStats` | *bool* | :heavy_check_mark: | Whether the short link's stats are publicly accessible. | | `shortLink` | *string* | :heavy_check_mark: | The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). | | `qrCode` | *string* | :heavy_check_mark: | The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`). | | `userId` | *string* | :heavy_check_mark: | The user ID of the creator of the short link. | | `workspaceId` | *string* | :heavy_check_mark: | The workspace ID of the short link. | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks on the short link. | -| `leads` | *float* | :heavy_check_mark: | [BETA]: The number of leads the short links has generated. | -| `sales` | *float* | :heavy_check_mark: | [BETA]: The number of sales the short links has generated. | -| `saleAmount` | *float* | :heavy_check_mark: | [BETA]: The total dollar amount of sales the short links has generated (in cents). | | `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. | | `identifier` | *string* | :heavy_check_mark: | The identifier of the short link that is unique across your workspace. If set, it can be used to identify your short link for client-side click tracking. | +| `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. | | `password` | *string* | :heavy_check_mark: | The password required to access the destination URL of the short link. | +| `proxy` | *?bool* | :heavy_minus_sign: | Whether the short link uses Custom Social Media Cards feature. | | `title` | *string* | :heavy_check_mark: | The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | | `description` | *string* | :heavy_check_mark: | The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | | `image` | *string* | :heavy_check_mark: | The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | | `video` | *string* | :heavy_check_mark: | The custom link preview video (og:video). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og | +| `rewrite` | *?bool* | :heavy_minus_sign: | Whether the short link uses link cloaking. | +| `doIndex` | *?bool* | :heavy_minus_sign: | Whether to allow search engines to index the short link. | | `ios` | *string* | :heavy_check_mark: | The iOS destination URL for the short link for iOS device targeting. | | `android` | *string* | :heavy_check_mark: | The Android destination URL for the short link for Android device targeting. | | `geo` | [Components\Geo](../../Models/Components/Geo.md) | :heavy_check_mark: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo | +| `publicStats` | *?bool* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. | | ~~`tagId`~~ | *string* | :heavy_check_mark: | : 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 `tags` instead. | | `tags` | array<[Components\TagSchema](../../Models/Components/TagSchema.md)> | :heavy_check_mark: | The tags assigned to the short link. | | `comments` | *string* | :heavy_check_mark: | The comments for the short link. | @@ -46,4 +42,8 @@ | `utmCampaign` | *string* | :heavy_check_mark: | The UTM campaign of the short link. | | `utmTerm` | *string* | :heavy_check_mark: | The UTM term of the short link. | | `utmContent` | *string* | :heavy_check_mark: | The UTM content of the short link. | -| `lastClicked` | *string* | :heavy_check_mark: | The date and time when the short link was last clicked. | \ No newline at end of file +| `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). | \ No newline at end of file diff --git a/docs/Models/Components/SaleCreatedEventLink.md b/docs/Models/Components/SaleCreatedEventLink.md index 1123ef9..2c3a730 100644 --- a/docs/Models/Components/SaleCreatedEventLink.md +++ b/docs/Models/Components/SaleCreatedEventLink.md @@ -13,11 +13,7 @@ | `shortLink` | *string* | :heavy_check_mark: | The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). | | `qrCode` | *string* | :heavy_check_mark: | The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`). | | `workspaceId` | *string* | :heavy_check_mark: | The workspace ID of the short link. | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks on the short link. | | `lastClicked` | *string* | :heavy_check_mark: | N/A | -| `leads` | *float* | :heavy_check_mark: | [BETA]: The number of leads the short links has generated. | -| `sales` | *float* | :heavy_check_mark: | [BETA]: The number of sales the short links has generated. | -| `saleAmount` | *float* | :heavy_check_mark: | [BETA]: The total dollar amount of sales the short links has generated (in cents). | | `createdAt` | *string* | :heavy_check_mark: | N/A | | `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. | @@ -46,4 +42,8 @@ | `utmCampaign` | *string* | :heavy_check_mark: | The UTM campaign of the short link. | | `utmTerm` | *string* | :heavy_check_mark: | The UTM term of the short link. | | `utmContent` | *string* | :heavy_check_mark: | The UTM content of the short link. | -| `userId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `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). | \ No newline at end of file diff --git a/docs/Models/Components/Trigger.md b/docs/Models/Components/Trigger.md new file mode 100644 index 0000000..372dc5c --- /dev/null +++ b/docs/Models/Components/Trigger.md @@ -0,0 +1,11 @@ +# Trigger + +The type of trigger method: link click or QR scan + + +## Values + +| Name | Value | +| ------ | ------ | +| `Qr` | qr | +| `Link` | link | \ No newline at end of file diff --git a/docs/Models/Components/WorkspaceSchema.md b/docs/Models/Components/WorkspaceSchema.md index 11d9ddd..1dfa90f 100644 --- a/docs/Models/Components/WorkspaceSchema.md +++ b/docs/Models/Components/WorkspaceSchema.md @@ -26,10 +26,10 @@ | `createdAt` | *string* | :heavy_check_mark: | The date and time when the workspace was created. | | `users` | array<[Components\Users](../../Models/Components/Users.md)> | :heavy_check_mark: | The role of the authenticated user in the workspace. | | `domains` | array<[Components\Domains](../../Models/Components/Domains.md)> | :heavy_check_mark: | The domains of the workspace. | -| `logo` | *string* | :heavy_check_mark: | The logo of the workspace. | | `stripeId` | *string* | :heavy_check_mark: | The Stripe ID of the workspace. | | `stripeConnectId` | *string* | :heavy_check_mark: | [BETA]: The Stripe Connect ID of the workspace. | | `inviteCode` | *string* | :heavy_check_mark: | The invite code of the workspace. | | `referralLinkId` | *string* | :heavy_check_mark: | The ID of the referral link of the workspace. | | `flags` | array | :heavy_minus_sign: | The feature flags of the workspace, indicating which features are enabled. | -| `publishableKey` | *string* | :heavy_check_mark: | The publishable key of the workspace. | \ No newline at end of file +| `publishableKey` | *string* | :heavy_check_mark: | The publishable key of the workspace. | +| `logo` | *?string* | :heavy_minus_sign: | The logo of the workspace. | \ No newline at end of file diff --git a/docs/Models/Operations/RetrieveAnalyticsResponseBody.md b/docs/Models/Operations/RetrieveAnalyticsResponseBody.md index 9e32855..f948bf9 100644 --- a/docs/Models/Operations/RetrieveAnalyticsResponseBody.md +++ b/docs/Models/Operations/RetrieveAnalyticsResponseBody.md @@ -65,3 +65,21 @@ array $value = /* values here */ array $value = /* values here */ ``` +### `array` + +```php +array $value = /* values here */ +``` + +### `array` + +```php +array $value = /* values here */ +``` + +### `array` + +```php +array $value = /* values here */ +``` + diff --git a/docs/sdks/domains/README.md b/docs/sdks/domains/README.md index 645f968..cdcc6f9 100644 --- a/docs/sdks/domains/README.md +++ b/docs/sdks/domains/README.md @@ -89,7 +89,7 @@ $sdk = Dub\Dub::builder()->setSecurity($security)->build(); $response = $sdk->domains->list( - archived: false, + archived: true, search: '', page: 1, pageSize: 50 diff --git a/src/Analytics.php b/src/Analytics.php index a9e008d..8efbf0d 100644 --- a/src/Analytics.php +++ b/src/Analytics.php @@ -50,7 +50,7 @@ public function retrieve( if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Components\AnalyticsCount|array<\Dub\Models\Components\AnalyticsTimeseries>|array<\Dub\Models\Components\AnalyticsCountries>|array<\Dub\Models\Components\AnalyticsCities>|array<\Dub\Models\Components\AnalyticsDevices>|array<\Dub\Models\Components\AnalyticsBrowsers>|array<\Dub\Models\Components\AnalyticsOS>|array<\Dub\Models\Components\AnalyticsReferers>|array<\Dub\Models\Components\AnalyticsTopLinks>|array<\Dub\Models\Components\AnalyticsTopUrls>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Components\AnalyticsCount|array<\Dub\Models\Components\AnalyticsTimeseries>|array<\Dub\Models\Components\AnalyticsContinents>|array<\Dub\Models\Components\AnalyticsCountries>|array<\Dub\Models\Components\AnalyticsCities>|array<\Dub\Models\Components\AnalyticsDevices>|array<\Dub\Models\Components\AnalyticsBrowsers>|array<\Dub\Models\Components\AnalyticsOS>|array<\Dub\Models\Components\AnalyticsTriggers>|array<\Dub\Models\Components\AnalyticsReferers>|array<\Dub\Models\Components\AnalyticsRefererUrls>|array<\Dub\Models\Components\AnalyticsTopLinks>|array<\Dub\Models\Components\AnalyticsTopUrls>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); $response = new Operations\RetrieveAnalyticsResponse( statusCode: $statusCode, contentType: $contentType, diff --git a/src/Models/Components/AnalyticsBrowsers.php b/src/Models/Components/AnalyticsBrowsers.php index 9e2823a..b713bd8 100644 --- a/src/Models/Components/AnalyticsBrowsers.php +++ b/src/Models/Components/AnalyticsBrowsers.php @@ -22,43 +22,47 @@ class AnalyticsBrowsers /** * The number of clicks from this browser * - * @var float $clicks + * @var ?float $clicks */ #[\JMS\Serializer\Annotation\SerializedName('clicks')] - public float $clicks; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $clicks = null; /** * The number of leads from this browser * - * @var float $leads + * @var ?float $leads */ #[\JMS\Serializer\Annotation\SerializedName('leads')] - public float $leads; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $leads = null; /** * The number of sales from this browser * - * @var float $sales + * @var ?float $sales */ #[\JMS\Serializer\Annotation\SerializedName('sales')] - public float $sales; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $sales = null; /** * The total amount of sales from this browser, in cents * - * @var float $saleAmount + * @var ?float $saleAmount */ #[\JMS\Serializer\Annotation\SerializedName('saleAmount')] - public float $saleAmount; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $saleAmount = null; /** * @param string $browser - * @param float $clicks - * @param float $leads - * @param float $sales - * @param float $saleAmount + * @param ?float $clicks + * @param ?float $leads + * @param ?float $sales + * @param ?float $saleAmount */ - public function __construct(string $browser, float $clicks, float $leads, float $sales, float $saleAmount) + public function __construct(string $browser, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->browser = $browser; $this->clicks = $clicks; diff --git a/src/Models/Components/AnalyticsCities.php b/src/Models/Components/AnalyticsCities.php index 9adf8f1..25bc24a 100644 --- a/src/Models/Components/AnalyticsCities.php +++ b/src/Models/Components/AnalyticsCities.php @@ -31,44 +31,48 @@ class AnalyticsCities /** * The number of clicks from this city * - * @var float $clicks + * @var ?float $clicks */ #[\JMS\Serializer\Annotation\SerializedName('clicks')] - public float $clicks; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $clicks = null; /** * The number of leads from this city * - * @var float $leads + * @var ?float $leads */ #[\JMS\Serializer\Annotation\SerializedName('leads')] - public float $leads; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $leads = null; /** * The number of sales from this city * - * @var float $sales + * @var ?float $sales */ #[\JMS\Serializer\Annotation\SerializedName('sales')] - public float $sales; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $sales = null; /** * The total amount of sales from this city, in cents * - * @var float $saleAmount + * @var ?float $saleAmount */ #[\JMS\Serializer\Annotation\SerializedName('saleAmount')] - public float $saleAmount; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $saleAmount = null; /** * @param string $city * @param AnalyticsCitiesCountry $country - * @param float $clicks - * @param float $leads - * @param float $sales - * @param float $saleAmount + * @param ?float $clicks + * @param ?float $leads + * @param ?float $sales + * @param ?float $saleAmount */ - public function __construct(string $city, AnalyticsCitiesCountry $country, float $clicks, float $leads, float $sales, float $saleAmount) + public function __construct(string $city, AnalyticsCitiesCountry $country, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->city = $city; $this->country = $country; diff --git a/src/Models/Components/AnalyticsContinents.php b/src/Models/Components/AnalyticsContinents.php new file mode 100644 index 0000000..0b99763 --- /dev/null +++ b/src/Models/Components/AnalyticsContinents.php @@ -0,0 +1,74 @@ +continent = $continent; + $this->clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; + } +} \ No newline at end of file diff --git a/src/Models/Components/AnalyticsCount.php b/src/Models/Components/AnalyticsCount.php index a93a19b..7646247 100644 --- a/src/Models/Components/AnalyticsCount.php +++ b/src/Models/Components/AnalyticsCount.php @@ -14,42 +14,46 @@ class AnalyticsCount /** * The total number of clicks * - * @var float $clicks + * @var ?float $clicks */ #[\JMS\Serializer\Annotation\SerializedName('clicks')] - public float $clicks; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $clicks = null; /** * The total number of leads * - * @var float $leads + * @var ?float $leads */ #[\JMS\Serializer\Annotation\SerializedName('leads')] - public float $leads; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $leads = null; /** * The total number of sales * - * @var float $sales + * @var ?float $sales */ #[\JMS\Serializer\Annotation\SerializedName('sales')] - public float $sales; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $sales = null; /** * The total amount of sales, in cents * - * @var float $saleAmount + * @var ?float $saleAmount */ #[\JMS\Serializer\Annotation\SerializedName('saleAmount')] - public float $saleAmount; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $saleAmount = null; /** - * @param float $clicks - * @param float $leads - * @param float $sales - * @param float $saleAmount + * @param ?float $clicks + * @param ?float $leads + * @param ?float $sales + * @param ?float $saleAmount */ - public function __construct(float $clicks, float $leads, float $sales, float $saleAmount) + public function __construct(?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->clicks = $clicks; $this->leads = $leads; diff --git a/src/Models/Components/AnalyticsCountries.php b/src/Models/Components/AnalyticsCountries.php index cf284b2..e8cc6d2 100644 --- a/src/Models/Components/AnalyticsCountries.php +++ b/src/Models/Components/AnalyticsCountries.php @@ -22,53 +22,58 @@ class AnalyticsCountries /** * - * @var City $city + * @var ?City $city */ #[\JMS\Serializer\Annotation\SerializedName('city')] - #[\JMS\Serializer\Annotation\Type('\Dub\Models\Components\City')] - public City $city; + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Components\City|null')] + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?City $city = null; /** * The number of clicks from this country * - * @var float $clicks + * @var ?float $clicks */ #[\JMS\Serializer\Annotation\SerializedName('clicks')] - public float $clicks; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $clicks = null; /** * The number of leads from this country * - * @var float $leads + * @var ?float $leads */ #[\JMS\Serializer\Annotation\SerializedName('leads')] - public float $leads; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $leads = null; /** * The number of sales from this country * - * @var float $sales + * @var ?float $sales */ #[\JMS\Serializer\Annotation\SerializedName('sales')] - public float $sales; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $sales = null; /** * The total amount of sales from this country, in cents * - * @var float $saleAmount + * @var ?float $saleAmount */ #[\JMS\Serializer\Annotation\SerializedName('saleAmount')] - public float $saleAmount; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $saleAmount = null; /** * @param Country $country - * @param City $city - * @param float $clicks - * @param float $leads - * @param float $sales - * @param float $saleAmount + * @param ?City $city + * @param ?float $clicks + * @param ?float $leads + * @param ?float $sales + * @param ?float $saleAmount */ - public function __construct(Country $country, City $city, float $clicks, float $leads, float $sales, float $saleAmount) + public function __construct(Country $country, ?City $city = City::Wildcard, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->country = $country; $this->city = $city; diff --git a/src/Models/Components/AnalyticsDevices.php b/src/Models/Components/AnalyticsDevices.php index 3e71e25..c15d8c4 100644 --- a/src/Models/Components/AnalyticsDevices.php +++ b/src/Models/Components/AnalyticsDevices.php @@ -22,43 +22,47 @@ class AnalyticsDevices /** * The number of clicks from this device * - * @var float $clicks + * @var ?float $clicks */ #[\JMS\Serializer\Annotation\SerializedName('clicks')] - public float $clicks; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $clicks = null; /** * The number of leads from this device * - * @var float $leads + * @var ?float $leads */ #[\JMS\Serializer\Annotation\SerializedName('leads')] - public float $leads; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $leads = null; /** * The number of sales from this device * - * @var float $sales + * @var ?float $sales */ #[\JMS\Serializer\Annotation\SerializedName('sales')] - public float $sales; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $sales = null; /** * The total amount of sales from this device, in cents * - * @var float $saleAmount + * @var ?float $saleAmount */ #[\JMS\Serializer\Annotation\SerializedName('saleAmount')] - public float $saleAmount; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $saleAmount = null; /** * @param string $device - * @param float $clicks - * @param float $leads - * @param float $sales - * @param float $saleAmount + * @param ?float $clicks + * @param ?float $leads + * @param ?float $sales + * @param ?float $saleAmount */ - public function __construct(string $device, float $clicks, float $leads, float $sales, float $saleAmount) + public function __construct(string $device, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->device = $device; $this->clicks = $clicks; diff --git a/src/Models/Components/AnalyticsOS.php b/src/Models/Components/AnalyticsOS.php index a12e3eb..59bf49c 100644 --- a/src/Models/Components/AnalyticsOS.php +++ b/src/Models/Components/AnalyticsOS.php @@ -22,43 +22,47 @@ class AnalyticsOS /** * The number of clicks from this OS * - * @var float $clicks + * @var ?float $clicks */ #[\JMS\Serializer\Annotation\SerializedName('clicks')] - public float $clicks; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $clicks = null; /** * The number of leads from this OS * - * @var float $leads + * @var ?float $leads */ #[\JMS\Serializer\Annotation\SerializedName('leads')] - public float $leads; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $leads = null; /** * The number of sales from this OS * - * @var float $sales + * @var ?float $sales */ #[\JMS\Serializer\Annotation\SerializedName('sales')] - public float $sales; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $sales = null; /** * The total amount of sales from this OS, in cents * - * @var float $saleAmount + * @var ?float $saleAmount */ #[\JMS\Serializer\Annotation\SerializedName('saleAmount')] - public float $saleAmount; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $saleAmount = null; /** * @param string $os - * @param float $clicks - * @param float $leads - * @param float $sales - * @param float $saleAmount + * @param ?float $clicks + * @param ?float $leads + * @param ?float $sales + * @param ?float $saleAmount */ - public function __construct(string $os, float $clicks, float $leads, float $sales, float $saleAmount) + public function __construct(string $os, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->os = $os; $this->clicks = $clicks; diff --git a/src/Models/Components/AnalyticsRefererUrls.php b/src/Models/Components/AnalyticsRefererUrls.php new file mode 100644 index 0000000..2012585 --- /dev/null +++ b/src/Models/Components/AnalyticsRefererUrls.php @@ -0,0 +1,73 @@ +refererUrl = $refererUrl; + $this->clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; + } +} \ No newline at end of file diff --git a/src/Models/Components/AnalyticsReferers.php b/src/Models/Components/AnalyticsReferers.php index 21fefca..d6b83aa 100644 --- a/src/Models/Components/AnalyticsReferers.php +++ b/src/Models/Components/AnalyticsReferers.php @@ -22,43 +22,47 @@ class AnalyticsReferers /** * The number of clicks from this referer * - * @var float $clicks + * @var ?float $clicks */ #[\JMS\Serializer\Annotation\SerializedName('clicks')] - public float $clicks; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $clicks = null; /** * The number of leads from this referer * - * @var float $leads + * @var ?float $leads */ #[\JMS\Serializer\Annotation\SerializedName('leads')] - public float $leads; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $leads = null; /** * The number of sales from this referer * - * @var float $sales + * @var ?float $sales */ #[\JMS\Serializer\Annotation\SerializedName('sales')] - public float $sales; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $sales = null; /** * The total amount of sales from this referer, in cents * - * @var float $saleAmount + * @var ?float $saleAmount */ #[\JMS\Serializer\Annotation\SerializedName('saleAmount')] - public float $saleAmount; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $saleAmount = null; /** * @param string $referer - * @param float $clicks - * @param float $leads - * @param float $sales - * @param float $saleAmount + * @param ?float $clicks + * @param ?float $leads + * @param ?float $sales + * @param ?float $saleAmount */ - public function __construct(string $referer, float $clicks, float $leads, float $sales, float $saleAmount) + public function __construct(string $referer, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->referer = $referer; $this->clicks = $clicks; diff --git a/src/Models/Components/AnalyticsTimeseries.php b/src/Models/Components/AnalyticsTimeseries.php index 21fc7bc..d705650 100644 --- a/src/Models/Components/AnalyticsTimeseries.php +++ b/src/Models/Components/AnalyticsTimeseries.php @@ -22,43 +22,47 @@ class AnalyticsTimeseries /** * The number of clicks in the interval * - * @var float $clicks + * @var ?float $clicks */ #[\JMS\Serializer\Annotation\SerializedName('clicks')] - public float $clicks; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $clicks = null; /** * The number of leads in the interval * - * @var float $leads + * @var ?float $leads */ #[\JMS\Serializer\Annotation\SerializedName('leads')] - public float $leads; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $leads = null; /** * The number of sales in the interval * - * @var float $sales + * @var ?float $sales */ #[\JMS\Serializer\Annotation\SerializedName('sales')] - public float $sales; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $sales = null; /** * The total amount of sales in the interval, in cents * - * @var float $saleAmount + * @var ?float $saleAmount */ #[\JMS\Serializer\Annotation\SerializedName('saleAmount')] - public float $saleAmount; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $saleAmount = null; /** * @param string $start - * @param float $clicks - * @param float $leads - * @param float $sales - * @param float $saleAmount + * @param ?float $clicks + * @param ?float $leads + * @param ?float $sales + * @param ?float $saleAmount */ - public function __construct(string $start, float $clicks, float $leads, float $sales, float $saleAmount) + public function __construct(string $start, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->start = $start; $this->clicks = $clicks; diff --git a/src/Models/Components/AnalyticsTopLinks.php b/src/Models/Components/AnalyticsTopLinks.php index 830eb12..8259fa6 100644 --- a/src/Models/Components/AnalyticsTopLinks.php +++ b/src/Models/Components/AnalyticsTopLinks.php @@ -71,34 +71,38 @@ class AnalyticsTopLinks /** * The number of clicks from this link * - * @var float $clicks + * @var ?float $clicks */ #[\JMS\Serializer\Annotation\SerializedName('clicks')] - public float $clicks; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $clicks = null; /** * The number of leads from this link * - * @var float $leads + * @var ?float $leads */ #[\JMS\Serializer\Annotation\SerializedName('leads')] - public float $leads; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $leads = null; /** * The number of sales from this link * - * @var float $sales + * @var ?float $sales */ #[\JMS\Serializer\Annotation\SerializedName('sales')] - public float $sales; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $sales = null; /** * The total amount of sales from this link, in cents * - * @var float $saleAmount + * @var ?float $saleAmount */ #[\JMS\Serializer\Annotation\SerializedName('saleAmount')] - public float $saleAmount; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $saleAmount = null; /** * @param string $link @@ -108,12 +112,12 @@ class AnalyticsTopLinks * @param string $shortLink * @param string $url * @param string $createdAt - * @param float $clicks - * @param float $leads - * @param float $sales - * @param float $saleAmount + * @param ?float $clicks + * @param ?float $leads + * @param ?float $sales + * @param ?float $saleAmount */ - public function __construct(string $link, string $id, string $domain, string $key, string $shortLink, string $url, string $createdAt, float $clicks, float $leads, float $sales, float $saleAmount) + public function __construct(string $link, string $id, string $domain, string $key, string $shortLink, string $url, string $createdAt, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->link = $link; $this->id = $id; diff --git a/src/Models/Components/AnalyticsTopUrls.php b/src/Models/Components/AnalyticsTopUrls.php index 863d31d..01255b6 100644 --- a/src/Models/Components/AnalyticsTopUrls.php +++ b/src/Models/Components/AnalyticsTopUrls.php @@ -22,43 +22,47 @@ class AnalyticsTopUrls /** * The number of clicks from this URL * - * @var float $clicks + * @var ?float $clicks */ #[\JMS\Serializer\Annotation\SerializedName('clicks')] - public float $clicks; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $clicks = null; /** * The number of leads from this URL * - * @var float $leads + * @var ?float $leads */ #[\JMS\Serializer\Annotation\SerializedName('leads')] - public float $leads; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $leads = null; /** * The number of sales from this URL * - * @var float $sales + * @var ?float $sales */ #[\JMS\Serializer\Annotation\SerializedName('sales')] - public float $sales; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $sales = null; /** * The total amount of sales from this URL, in cents * - * @var float $saleAmount + * @var ?float $saleAmount */ #[\JMS\Serializer\Annotation\SerializedName('saleAmount')] - public float $saleAmount; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $saleAmount = null; /** * @param string $url - * @param float $clicks - * @param float $leads - * @param float $sales - * @param float $saleAmount + * @param ?float $clicks + * @param ?float $leads + * @param ?float $sales + * @param ?float $saleAmount */ - public function __construct(string $url, float $clicks, float $leads, float $sales, float $saleAmount) + public function __construct(string $url, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->url = $url; $this->clicks = $clicks; diff --git a/src/Models/Components/AnalyticsTriggers.php b/src/Models/Components/AnalyticsTriggers.php new file mode 100644 index 0000000..86a09da --- /dev/null +++ b/src/Models/Components/AnalyticsTriggers.php @@ -0,0 +1,74 @@ +trigger = $trigger; + $this->clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; + } +} \ No newline at end of file diff --git a/src/Models/Components/Continent.php b/src/Models/Components/Continent.php new file mode 100644 index 0000000..cc7223f --- /dev/null +++ b/src/Models/Components/Continent.php @@ -0,0 +1,22 @@ +id = $id; $this->domain = $domain; @@ -399,11 +403,7 @@ public function __construct(string $id, string $domain, string $key, string $url $this->shortLink = $shortLink; $this->qrCode = $qrCode; $this->workspaceId = $workspaceId; - $this->clicks = $clicks; $this->lastClicked = $lastClicked; - $this->leads = $leads; - $this->sales = $sales; - $this->saleAmount = $saleAmount; $this->createdAt = $createdAt; $this->updatedAt = $updatedAt; $this->projectId = $projectId; @@ -433,5 +433,9 @@ public function __construct(string $id, string $domain, string $key, string $url $this->utmTerm = $utmTerm; $this->utmContent = $utmContent; $this->userId = $userId; + $this->clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; } } \ No newline at end of file diff --git a/src/Models/Components/DomainSchema.php b/src/Models/Components/DomainSchema.php index e7dcb3d..0652918 100644 --- a/src/Models/Components/DomainSchema.php +++ b/src/Models/Components/DomainSchema.php @@ -30,34 +30,38 @@ class DomainSchema /** * Whether the domain is verified. * - * @var bool $verified + * @var ?bool $verified */ #[\JMS\Serializer\Annotation\SerializedName('verified')] - public bool $verified; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?bool $verified = null; /** * Whether the domain is the primary domain for the workspace. * - * @var bool $primary + * @var ?bool $primary */ #[\JMS\Serializer\Annotation\SerializedName('primary')] - public bool $primary; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?bool $primary = null; /** * Whether the domain is archived. * - * @var bool $archived + * @var ?bool $archived */ #[\JMS\Serializer\Annotation\SerializedName('archived')] - public bool $archived; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?bool $archived = null; /** * Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened. * - * @var string $placeholder + * @var ?string $placeholder */ #[\JMS\Serializer\Annotation\SerializedName('placeholder')] - public string $placeholder; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?string $placeholder = null; /** * The URL to redirect to when a link under this domain has expired. @@ -96,25 +100,25 @@ class DomainSchema /** * @param string $id * @param string $slug - * @param bool $verified - * @param bool $primary - * @param bool $archived - * @param string $placeholder * @param string $createdAt * @param string $updatedAt + * @param ?bool $verified + * @param ?bool $primary + * @param ?bool $archived + * @param ?string $placeholder * @param ?string $expiredUrl * @param ?RegisteredDomain $registeredDomain */ - public function __construct(string $id, string $slug, bool $verified, bool $primary, bool $archived, string $placeholder, string $createdAt, string $updatedAt, ?string $expiredUrl = null, ?RegisteredDomain $registeredDomain = null) + public function __construct(string $id, string $slug, string $createdAt, string $updatedAt, ?string $expiredUrl = null, ?RegisteredDomain $registeredDomain = null, ?bool $verified = false, ?bool $primary = false, ?bool $archived = false, ?string $placeholder = 'https://dub.co/help/article/what-is-dub') { $this->id = $id; $this->slug = $slug; + $this->createdAt = $createdAt; + $this->updatedAt = $updatedAt; $this->verified = $verified; $this->primary = $primary; $this->archived = $archived; $this->placeholder = $placeholder; - $this->createdAt = $createdAt; - $this->updatedAt = $updatedAt; $this->expiredUrl = $expiredUrl; $this->registeredDomain = $registeredDomain; } diff --git a/src/Models/Components/Domains.php b/src/Models/Components/Domains.php index 247ac28..941a964 100644 --- a/src/Models/Components/Domains.php +++ b/src/Models/Components/Domains.php @@ -22,25 +22,27 @@ class Domains /** * Whether the domain is the primary domain for the workspace. * - * @var bool $primary + * @var ?bool $primary */ #[\JMS\Serializer\Annotation\SerializedName('primary')] - public bool $primary; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?bool $primary = null; /** * Whether the domain is verified. * - * @var bool $verified + * @var ?bool $verified */ #[\JMS\Serializer\Annotation\SerializedName('verified')] - public bool $verified; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?bool $verified = null; /** * @param string $slug - * @param bool $primary - * @param bool $verified + * @param ?bool $primary + * @param ?bool $verified */ - public function __construct(string $slug, bool $primary, bool $verified) + public function __construct(string $slug, ?bool $primary = false, ?bool $verified = false) { $this->slug = $slug; $this->primary = $primary; diff --git a/src/Models/Components/LeadCreatedEventLink.php b/src/Models/Components/LeadCreatedEventLink.php index 6854ee0..9e41321 100644 --- a/src/Models/Components/LeadCreatedEventLink.php +++ b/src/Models/Components/LeadCreatedEventLink.php @@ -286,10 +286,11 @@ class LeadCreatedEventLink /** * The number of clicks on the short link. * - * @var float $clicks + * @var ?float $clicks */ #[\JMS\Serializer\Annotation\SerializedName('clicks')] - public float $clicks; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $clicks = null; /** * @@ -301,26 +302,29 @@ class LeadCreatedEventLink /** * [BETA]: The number of leads the short links has generated. * - * @var float $leads + * @var ?float $leads */ #[\JMS\Serializer\Annotation\SerializedName('leads')] - public float $leads; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $leads = null; /** * [BETA]: The number of sales the short links has generated. * - * @var float $sales + * @var ?float $sales */ #[\JMS\Serializer\Annotation\SerializedName('sales')] - public float $sales; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $sales = null; /** * [BETA]: The total dollar amount of sales the short links has generated (in cents). * - * @var float $saleAmount + * @var ?float $saleAmount */ #[\JMS\Serializer\Annotation\SerializedName('saleAmount')] - public float $saleAmount; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $saleAmount = null; /** * @@ -354,11 +358,7 @@ class LeadCreatedEventLink * @param string $shortLink * @param string $qrCode * @param string $workspaceId - * @param float $clicks * @param string $lastClicked - * @param float $leads - * @param float $sales - * @param float $saleAmount * @param string $createdAt * @param string $updatedAt * @param string $projectId @@ -388,8 +388,12 @@ class LeadCreatedEventLink * @param ?string $utmTerm * @param ?string $utmContent * @param ?string $userId + * @param ?float $clicks + * @param ?float $leads + * @param ?float $sales + * @param ?float $saleAmount */ - public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, string $shortLink, string $qrCode, string $workspaceId, float $clicks, string $lastClicked, float $leads, float $sales, float $saleAmount, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $identifier = 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) + public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $identifier = 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, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->id = $id; $this->domain = $domain; @@ -399,11 +403,7 @@ public function __construct(string $id, string $domain, string $key, string $url $this->shortLink = $shortLink; $this->qrCode = $qrCode; $this->workspaceId = $workspaceId; - $this->clicks = $clicks; $this->lastClicked = $lastClicked; - $this->leads = $leads; - $this->sales = $sales; - $this->saleAmount = $saleAmount; $this->createdAt = $createdAt; $this->updatedAt = $updatedAt; $this->projectId = $projectId; @@ -433,5 +433,9 @@ public function __construct(string $id, string $domain, string $key, string $url $this->utmTerm = $utmTerm; $this->utmContent = $utmContent; $this->userId = $userId; + $this->clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; } } \ No newline at end of file diff --git a/src/Models/Components/Link.php b/src/Models/Components/Link.php index 234abdf..ad09064 100644 --- a/src/Models/Components/Link.php +++ b/src/Models/Components/Link.php @@ -286,10 +286,11 @@ class Link /** * The number of clicks on the short link. * - * @var float $clicks + * @var ?float $clicks */ #[\JMS\Serializer\Annotation\SerializedName('clicks')] - public float $clicks; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $clicks = null; /** * @@ -301,26 +302,29 @@ class Link /** * [BETA]: The number of leads the short links has generated. * - * @var float $leads + * @var ?float $leads */ #[\JMS\Serializer\Annotation\SerializedName('leads')] - public float $leads; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $leads = null; /** * [BETA]: The number of sales the short links has generated. * - * @var float $sales + * @var ?float $sales */ #[\JMS\Serializer\Annotation\SerializedName('sales')] - public float $sales; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $sales = null; /** * [BETA]: The total dollar amount of sales the short links has generated (in cents). * - * @var float $saleAmount + * @var ?float $saleAmount */ #[\JMS\Serializer\Annotation\SerializedName('saleAmount')] - public float $saleAmount; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $saleAmount = null; /** * @@ -354,11 +358,7 @@ class Link * @param string $shortLink * @param string $qrCode * @param string $workspaceId - * @param float $clicks * @param string $lastClicked - * @param float $leads - * @param float $sales - * @param float $saleAmount * @param string $createdAt * @param string $updatedAt * @param string $projectId @@ -388,8 +388,12 @@ class Link * @param ?string $utmTerm * @param ?string $utmContent * @param ?string $userId + * @param ?float $clicks + * @param ?float $leads + * @param ?float $sales + * @param ?float $saleAmount */ - public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, string $shortLink, string $qrCode, string $workspaceId, float $clicks, string $lastClicked, float $leads, float $sales, float $saleAmount, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $identifier = 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) + public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $identifier = 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, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->id = $id; $this->domain = $domain; @@ -399,11 +403,7 @@ public function __construct(string $id, string $domain, string $key, string $url $this->shortLink = $shortLink; $this->qrCode = $qrCode; $this->workspaceId = $workspaceId; - $this->clicks = $clicks; $this->lastClicked = $lastClicked; - $this->leads = $leads; - $this->sales = $sales; - $this->saleAmount = $saleAmount; $this->createdAt = $createdAt; $this->updatedAt = $updatedAt; $this->projectId = $projectId; @@ -433,5 +433,9 @@ public function __construct(string $id, string $domain, string $key, string $url $this->utmTerm = $utmTerm; $this->utmContent = $utmContent; $this->userId = $userId; + $this->clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; } } \ No newline at end of file diff --git a/src/Models/Components/LinkClickedEventLink.php b/src/Models/Components/LinkClickedEventLink.php index bcca680..da4799b 100644 --- a/src/Models/Components/LinkClickedEventLink.php +++ b/src/Models/Components/LinkClickedEventLink.php @@ -286,10 +286,11 @@ class LinkClickedEventLink /** * The number of clicks on the short link. * - * @var float $clicks + * @var ?float $clicks */ #[\JMS\Serializer\Annotation\SerializedName('clicks')] - public float $clicks; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $clicks = null; /** * @@ -301,26 +302,29 @@ class LinkClickedEventLink /** * [BETA]: The number of leads the short links has generated. * - * @var float $leads + * @var ?float $leads */ #[\JMS\Serializer\Annotation\SerializedName('leads')] - public float $leads; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $leads = null; /** * [BETA]: The number of sales the short links has generated. * - * @var float $sales + * @var ?float $sales */ #[\JMS\Serializer\Annotation\SerializedName('sales')] - public float $sales; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $sales = null; /** * [BETA]: The total dollar amount of sales the short links has generated (in cents). * - * @var float $saleAmount + * @var ?float $saleAmount */ #[\JMS\Serializer\Annotation\SerializedName('saleAmount')] - public float $saleAmount; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $saleAmount = null; /** * @@ -354,11 +358,7 @@ class LinkClickedEventLink * @param string $shortLink * @param string $qrCode * @param string $workspaceId - * @param float $clicks * @param string $lastClicked - * @param float $leads - * @param float $sales - * @param float $saleAmount * @param string $createdAt * @param string $updatedAt * @param string $projectId @@ -388,8 +388,12 @@ class LinkClickedEventLink * @param ?string $utmTerm * @param ?string $utmContent * @param ?string $userId + * @param ?float $clicks + * @param ?float $leads + * @param ?float $sales + * @param ?float $saleAmount */ - public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, string $shortLink, string $qrCode, string $workspaceId, float $clicks, string $lastClicked, float $leads, float $sales, float $saleAmount, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $identifier = 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) + public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $identifier = 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, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->id = $id; $this->domain = $domain; @@ -399,11 +403,7 @@ public function __construct(string $id, string $domain, string $key, string $url $this->shortLink = $shortLink; $this->qrCode = $qrCode; $this->workspaceId = $workspaceId; - $this->clicks = $clicks; $this->lastClicked = $lastClicked; - $this->leads = $leads; - $this->sales = $sales; - $this->saleAmount = $saleAmount; $this->createdAt = $createdAt; $this->updatedAt = $updatedAt; $this->projectId = $projectId; @@ -433,5 +433,9 @@ public function __construct(string $id, string $domain, string $key, string $url $this->utmTerm = $utmTerm; $this->utmContent = $utmContent; $this->userId = $userId; + $this->clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; } } \ No newline at end of file diff --git a/src/Models/Components/LinkSchema.php b/src/Models/Components/LinkSchema.php index ad95c5b..8b70d2c 100644 --- a/src/Models/Components/LinkSchema.php +++ b/src/Models/Components/LinkSchema.php @@ -46,10 +46,11 @@ class LinkSchema /** * [BETA] Whether to track conversions for the short link. * - * @var bool $trackConversion + * @var ?bool $trackConversion */ #[\JMS\Serializer\Annotation\SerializedName('trackConversion')] - public bool $trackConversion; + #[\JMS\Serializer\Annotation\SkipWhenNull] + 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. @@ -70,10 +71,11 @@ class LinkSchema /** * Whether the short link is archived. * - * @var bool $archived + * @var ?bool $archived */ #[\JMS\Serializer\Annotation\SerializedName('archived')] - public bool $archived; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?bool $archived = null; /** * The date and time when the short link will expire in ISO-8601 format. @@ -102,10 +104,11 @@ class LinkSchema /** * Whether the short link uses Custom Social Media Cards feature. * - * @var bool $proxy + * @var ?bool $proxy */ #[\JMS\Serializer\Annotation\SerializedName('proxy')] - public bool $proxy; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?bool $proxy = null; /** * The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. @@ -142,18 +145,20 @@ class LinkSchema /** * Whether the short link uses link cloaking. * - * @var bool $rewrite + * @var ?bool $rewrite */ #[\JMS\Serializer\Annotation\SerializedName('rewrite')] - public bool $rewrite; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?bool $rewrite = null; /** * Whether to allow search engines to index the short link. * - * @var bool $doIndex + * @var ?bool $doIndex */ #[\JMS\Serializer\Annotation\SerializedName('doIndex')] - public bool $doIndex; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?bool $doIndex = null; /** * The iOS destination URL for the short link for iOS device targeting. @@ -183,10 +188,11 @@ class LinkSchema /** * Whether the short link's stats are publicly accessible. * - * @var bool $publicStats + * @var ?bool $publicStats */ #[\JMS\Serializer\Annotation\SerializedName('publicStats')] - public bool $publicStats; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?bool $publicStats = null; /** * The unique ID of the tag assigned to the short link. This field is deprecated – use `tags` instead. @@ -289,10 +295,11 @@ class LinkSchema /** * The number of clicks on the short link. * - * @var float $clicks + * @var ?float $clicks */ #[\JMS\Serializer\Annotation\SerializedName('clicks')] - public float $clicks; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $clicks = null; /** * The date and time when the short link was last clicked. @@ -305,26 +312,29 @@ class LinkSchema /** * [BETA]: The number of leads the short links has generated. * - * @var float $leads + * @var ?float $leads */ #[\JMS\Serializer\Annotation\SerializedName('leads')] - public float $leads; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $leads = null; /** * [BETA]: The number of sales the short links has generated. * - * @var float $sales + * @var ?float $sales */ #[\JMS\Serializer\Annotation\SerializedName('sales')] - public float $sales; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $sales = null; /** * [BETA]: The total dollar amount of sales the short links has generated (in cents). * - * @var float $saleAmount + * @var ?float $saleAmount */ #[\JMS\Serializer\Annotation\SerializedName('saleAmount')] - public float $saleAmount; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $saleAmount = null; /** * The date and time when the short link was created. @@ -356,35 +366,31 @@ class LinkSchema * @param string $domain * @param string $key * @param string $url - * @param bool $trackConversion - * @param bool $archived - * @param bool $proxy - * @param bool $rewrite - * @param bool $doIndex - * @param bool $publicStats * @param string $shortLink * @param string $qrCode * @param string $userId * @param string $workspaceId - * @param float $clicks - * @param float $leads - * @param float $sales - * @param float $saleAmount * @param string $createdAt * @param string $updatedAt * @param string $projectId + * @param ?bool $trackConversion * @param ?string $externalId * @param ?string $identifier + * @param ?bool $archived * @param ?string $expiresAt * @param ?string $expiredUrl * @param ?string $password + * @param ?bool $proxy * @param ?string $title * @param ?string $description * @param ?string $image * @param ?string $video + * @param ?bool $rewrite + * @param ?bool $doIndex * @param ?string $ios * @param ?string $android * @param ?Geo $geo + * @param ?bool $publicStats * @param ?string $tagId * @param ?array $tags * @param ?string $comments @@ -393,43 +399,43 @@ class LinkSchema * @param ?string $utmCampaign * @param ?string $utmTerm * @param ?string $utmContent + * @param ?float $clicks * @param ?string $lastClicked + * @param ?float $leads + * @param ?float $sales + * @param ?float $saleAmount */ - public function __construct(string $id, string $domain, string $key, string $url, bool $trackConversion, bool $archived, bool $proxy, bool $rewrite, bool $doIndex, bool $publicStats, string $shortLink, string $qrCode, string $userId, string $workspaceId, float $clicks, float $leads, float $sales, float $saleAmount, string $createdAt, string $updatedAt, string $projectId, ?string $externalId = null, ?string $identifier = 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 $lastClicked = null) + public function __construct(string $id, string $domain, string $key, string $url, string $shortLink, string $qrCode, string $userId, string $workspaceId, string $createdAt, string $updatedAt, string $projectId, ?string $externalId = null, ?string $identifier = 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 $lastClicked = 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; $this->key = $key; $this->url = $url; - $this->trackConversion = $trackConversion; - $this->archived = $archived; - $this->proxy = $proxy; - $this->rewrite = $rewrite; - $this->doIndex = $doIndex; - $this->publicStats = $publicStats; $this->shortLink = $shortLink; $this->qrCode = $qrCode; $this->userId = $userId; $this->workspaceId = $workspaceId; - $this->clicks = $clicks; - $this->leads = $leads; - $this->sales = $sales; - $this->saleAmount = $saleAmount; $this->createdAt = $createdAt; $this->updatedAt = $updatedAt; $this->projectId = $projectId; + $this->trackConversion = $trackConversion; $this->externalId = $externalId; $this->identifier = $identifier; + $this->archived = $archived; $this->expiresAt = $expiresAt; $this->expiredUrl = $expiredUrl; $this->password = $password; + $this->proxy = $proxy; $this->title = $title; $this->description = $description; $this->image = $image; $this->video = $video; + $this->rewrite = $rewrite; + $this->doIndex = $doIndex; $this->ios = $ios; $this->android = $android; $this->geo = $geo; + $this->publicStats = $publicStats; $this->tagId = $tagId; $this->tags = $tags; $this->comments = $comments; @@ -438,6 +444,10 @@ public function __construct(string $id, string $domain, string $key, string $url $this->utmCampaign = $utmCampaign; $this->utmTerm = $utmTerm; $this->utmContent = $utmContent; + $this->clicks = $clicks; $this->lastClicked = $lastClicked; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; } } \ No newline at end of file diff --git a/src/Models/Components/SaleCreatedEventLink.php b/src/Models/Components/SaleCreatedEventLink.php index 36e7762..f9d58b8 100644 --- a/src/Models/Components/SaleCreatedEventLink.php +++ b/src/Models/Components/SaleCreatedEventLink.php @@ -286,10 +286,11 @@ class SaleCreatedEventLink /** * The number of clicks on the short link. * - * @var float $clicks + * @var ?float $clicks */ #[\JMS\Serializer\Annotation\SerializedName('clicks')] - public float $clicks; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $clicks = null; /** * @@ -301,26 +302,29 @@ class SaleCreatedEventLink /** * [BETA]: The number of leads the short links has generated. * - * @var float $leads + * @var ?float $leads */ #[\JMS\Serializer\Annotation\SerializedName('leads')] - public float $leads; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $leads = null; /** * [BETA]: The number of sales the short links has generated. * - * @var float $sales + * @var ?float $sales */ #[\JMS\Serializer\Annotation\SerializedName('sales')] - public float $sales; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $sales = null; /** * [BETA]: The total dollar amount of sales the short links has generated (in cents). * - * @var float $saleAmount + * @var ?float $saleAmount */ #[\JMS\Serializer\Annotation\SerializedName('saleAmount')] - public float $saleAmount; + #[\JMS\Serializer\Annotation\SkipWhenNull] + public ?float $saleAmount = null; /** * @@ -354,11 +358,7 @@ class SaleCreatedEventLink * @param string $shortLink * @param string $qrCode * @param string $workspaceId - * @param float $clicks * @param string $lastClicked - * @param float $leads - * @param float $sales - * @param float $saleAmount * @param string $createdAt * @param string $updatedAt * @param string $projectId @@ -388,8 +388,12 @@ class SaleCreatedEventLink * @param ?string $utmTerm * @param ?string $utmContent * @param ?string $userId + * @param ?float $clicks + * @param ?float $leads + * @param ?float $sales + * @param ?float $saleAmount */ - public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, string $shortLink, string $qrCode, string $workspaceId, float $clicks, string $lastClicked, float $leads, float $sales, float $saleAmount, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $identifier = 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) + public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $identifier = 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, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) { $this->id = $id; $this->domain = $domain; @@ -399,11 +403,7 @@ public function __construct(string $id, string $domain, string $key, string $url $this->shortLink = $shortLink; $this->qrCode = $qrCode; $this->workspaceId = $workspaceId; - $this->clicks = $clicks; $this->lastClicked = $lastClicked; - $this->leads = $leads; - $this->sales = $sales; - $this->saleAmount = $saleAmount; $this->createdAt = $createdAt; $this->updatedAt = $updatedAt; $this->projectId = $projectId; @@ -433,5 +433,9 @@ public function __construct(string $id, string $domain, string $key, string $url $this->utmTerm = $utmTerm; $this->utmContent = $utmContent; $this->userId = $userId; + $this->clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; } } \ No newline at end of file diff --git a/src/Models/Components/Trigger.php b/src/Models/Components/Trigger.php new file mode 100644 index 0000000..f493e13 --- /dev/null +++ b/src/Models/Components/Trigger.php @@ -0,0 +1,17 @@ + $users * @param array $domains - * @param ?string $logo * @param ?string $stripeId * @param ?string $stripeConnectId * @param ?string $inviteCode * @param ?string $referralLinkId * @param ?array $flags * @param ?string $publishableKey + * @param ?string $logo */ - public function __construct(string $id, string $name, string $slug, Plan $plan, float $billingCycleStart, float $usage, float $usageLimit, float $linksUsage, float $linksLimit, float $salesUsage, float $salesLimit, float $domainsLimit, float $tagsLimit, float $usersLimit, float $aiUsage, float $aiLimit, bool $conversionEnabled, bool $dotLinkClaimed, string $createdAt, array $users, array $domains, ?string $logo = null, ?string $stripeId = null, ?string $stripeConnectId = null, ?string $inviteCode = null, ?string $referralLinkId = null, ?array $flags = null, ?string $publishableKey = null) + public function __construct(string $id, string $name, string $slug, Plan $plan, float $billingCycleStart, float $usage, float $usageLimit, float $linksUsage, float $linksLimit, float $salesUsage, float $salesLimit, float $domainsLimit, float $tagsLimit, float $usersLimit, float $aiUsage, float $aiLimit, bool $conversionEnabled, bool $dotLinkClaimed, string $createdAt, array $users, array $domains, ?string $stripeId = null, ?string $stripeConnectId = null, ?string $inviteCode = null, ?string $referralLinkId = null, ?array $flags = null, ?string $publishableKey = null, ?string $logo = null) { $this->id = $id; $this->name = $name; @@ -293,12 +294,12 @@ public function __construct(string $id, string $name, string $slug, Plan $plan, $this->createdAt = $createdAt; $this->users = $users; $this->domains = $domains; - $this->logo = $logo; $this->stripeId = $stripeId; $this->stripeConnectId = $stripeConnectId; $this->inviteCode = $inviteCode; $this->referralLinkId = $referralLinkId; $this->flags = $flags; $this->publishableKey = $publishableKey; + $this->logo = $logo; } } \ No newline at end of file diff --git a/src/Models/Operations/CreateDomainRequestBody.php b/src/Models/Operations/CreateDomainRequestBody.php index e510731..ef040d9 100644 --- a/src/Models/Operations/CreateDomainRequestBody.php +++ b/src/Models/Operations/CreateDomainRequestBody.php @@ -52,7 +52,7 @@ class CreateDomainRequestBody * @param ?string $expiredUrl * @param ?string $placeholder */ - public function __construct(string $slug, ?bool $archived = null, ?string $expiredUrl = null, ?string $placeholder = null) + public function __construct(string $slug, ?string $expiredUrl = null, ?bool $archived = false, ?string $placeholder = 'https://dub.co/help/article/what-is-dub') { $this->slug = $slug; $this->archived = $archived; diff --git a/src/Models/Operations/CreateLinkRequestBody.php b/src/Models/Operations/CreateLinkRequestBody.php index d53939f..325bfb6 100644 --- a/src/Models/Operations/CreateLinkRequestBody.php +++ b/src/Models/Operations/CreateLinkRequestBody.php @@ -336,7 +336,7 @@ class CreateLinkRequestBody * @param ?string $utmContent * @param ?string $ref */ - public function __construct(string $url, ?string $domain = null, ?string $key = null, ?string $prefix = null, ?bool $trackConversion = null, ?bool $archived = null, ?bool $publicStats = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?bool $proxy = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $externalId = null, ?string $identifier = 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) + 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 $identifier = 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, ?bool $trackConversion = false, ?bool $archived = false, ?bool $publicStats = false, ?bool $proxy = false, ?bool $rewrite = false, ?bool $doIndex = false) { $this->url = $url; $this->domain = $domain; diff --git a/src/Models/Operations/Data.php b/src/Models/Operations/Data.php index 0807dd4..72c1d46 100644 --- a/src/Models/Operations/Data.php +++ b/src/Models/Operations/Data.php @@ -287,7 +287,7 @@ class Data * @param ?string $utmContent * @param ?string $ref */ - public function __construct(?string $url = null, ?bool $trackConversion = null, ?bool $archived = null, ?bool $publicStats = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?bool $proxy = null, ?bool $rewrite = null, ?bool $doIndex = 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) + 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, ?bool $trackConversion = false, ?bool $archived = false, ?bool $publicStats = false, ?bool $proxy = false, ?bool $rewrite = false, ?bool $doIndex = false) { $this->url = $url; $this->trackConversion = $trackConversion; diff --git a/src/Models/Operations/GetLinksCountRequest.php b/src/Models/Operations/GetLinksCountRequest.php index 351e5bb..d7a05a7 100644 --- a/src/Models/Operations/GetLinksCountRequest.php +++ b/src/Models/Operations/GetLinksCountRequest.php @@ -94,7 +94,7 @@ class GetLinksCountRequest * @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, ?bool $showArchived = null, ?bool $withTags = null, One|Two|Three|null $groupBy = null) + 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) { $this->domain = $domain; $this->tagId = $tagId; diff --git a/src/Models/Operations/GetLinksRequest.php b/src/Models/Operations/GetLinksRequest.php index a0829ba..961474b 100644 --- a/src/Models/Operations/GetLinksRequest.php +++ b/src/Models/Operations/GetLinksRequest.php @@ -112,7 +112,7 @@ class GetLinksRequest * @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 = null, ?bool $withTags = null, ?Sort $sort = null, ?float $page = null, ?float $pageSize = null) + 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) { $this->domain = $domain; $this->tagId = $tagId; diff --git a/src/Models/Operations/GetQRCodeRequest.php b/src/Models/Operations/GetQRCodeRequest.php index caacf45..c0095fc 100644 --- a/src/Models/Operations/GetQRCodeRequest.php +++ b/src/Models/Operations/GetQRCodeRequest.php @@ -85,7 +85,7 @@ class GetQRCodeRequest * @param ?bool $hideLogo * @param ?bool $includeMargin */ - public function __construct(string $url, ?string $logo = null, ?float $size = null, ?Level $level = null, ?string $fgColor = null, ?string $bgColor = null, ?bool $hideLogo = null, ?bool $includeMargin = null) + public function __construct(string $url, ?string $logo = null, ?float $size = 600, ?Level $level = Level::L, ?string $fgColor = '#000000', ?string $bgColor = '#FFFFFF', ?bool $hideLogo = true, ?bool $includeMargin = true) { $this->url = $url; $this->logo = $logo; diff --git a/src/Models/Operations/ListDomainsRequest.php b/src/Models/Operations/ListDomainsRequest.php index a83773e..fb69526 100644 --- a/src/Models/Operations/ListDomainsRequest.php +++ b/src/Models/Operations/ListDomainsRequest.php @@ -49,7 +49,7 @@ class ListDomainsRequest * @param ?float $page * @param ?float $pageSize */ - public function __construct(?bool $archived = null, ?string $search = null, ?float $page = null, ?float $pageSize = null) + public function __construct(?string $search = null, ?bool $archived = true, ?float $page = 1, ?float $pageSize = 50) { $this->archived = $archived; $this->search = $search; diff --git a/src/Models/Operations/ListEventsRequest.php b/src/Models/Operations/ListEventsRequest.php index db2825c..ae0a823 100644 --- a/src/Models/Operations/ListEventsRequest.php +++ b/src/Models/Operations/ListEventsRequest.php @@ -244,7 +244,7 @@ class ListEventsRequest * @param ?Order $order * @param ?SortBy $sortBy */ - public function __construct(?QueryParamEvent $event = null, ?string $domain = null, ?string $key = null, ?string $linkId = null, ?string $externalId = null, ?QueryParamInterval $interval = null, ?string $start = null, ?string $end = null, ?string $timezone = null, ?Components\ContinentCode $continent = null, ?Components\CountryCode $country = null, ?string $city = 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, ?bool $qr = null, ?bool $root = null, ?float $page = null, ?float $limit = null, ?Order $order = null, ?SortBy $sortBy = null) + public function __construct(?string $domain = null, ?string $key = null, ?string $linkId = null, ?string $externalId = null, ?string $start = null, ?string $end = null, ?Components\ContinentCode $continent = null, ?Components\CountryCode $country = null, ?string $city = 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, ?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) { $this->event = $event; $this->domain = $domain; diff --git a/src/Models/Operations/RequestBody.php b/src/Models/Operations/RequestBody.php index d896b21..e06196e 100644 --- a/src/Models/Operations/RequestBody.php +++ b/src/Models/Operations/RequestBody.php @@ -336,7 +336,7 @@ class RequestBody * @param ?string $utmContent * @param ?string $ref */ - public function __construct(string $url, ?string $domain = null, ?string $key = null, ?string $prefix = null, ?bool $trackConversion = null, ?bool $archived = null, ?bool $publicStats = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?bool $proxy = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $externalId = null, ?string $identifier = 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) + 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 $identifier = 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, ?bool $trackConversion = false, ?bool $archived = false, ?bool $publicStats = false, ?bool $proxy = false, ?bool $rewrite = false, ?bool $doIndex = false) { $this->url = $url; $this->domain = $domain; diff --git a/src/Models/Operations/RetrieveAnalyticsRequest.php b/src/Models/Operations/RetrieveAnalyticsRequest.php index 50c41df..deacc57 100644 --- a/src/Models/Operations/RetrieveAnalyticsRequest.php +++ b/src/Models/Operations/RetrieveAnalyticsRequest.php @@ -221,7 +221,7 @@ class RetrieveAnalyticsRequest * @param ?bool $qr * @param ?bool $root */ - public function __construct(?Event $event = null, ?QueryParamGroupBy $groupBy = null, ?string $domain = null, ?string $key = null, ?string $linkId = null, ?string $externalId = null, ?Interval $interval = null, ?string $start = null, ?string $end = null, ?string $timezone = null, ?Components\ContinentCode $continent = null, ?Components\CountryCode $country = null, ?string $city = null, ?string $device = null, ?string $browser = null, ?string $os = null, ?Trigger $trigger = null, ?string $referer = null, ?string $refererUrl = null, ?string $url = null, ?string $tagId = null, ?bool $qr = null, ?bool $root = null) + public function __construct(?string $domain = null, ?string $key = null, ?string $linkId = null, ?string $externalId = null, ?Interval $interval = null, ?string $start = null, ?string $end = null, ?Components\ContinentCode $continent = null, ?Components\CountryCode $country = null, ?string $city = null, ?string $device = null, ?string $browser = null, ?string $os = null, ?Trigger $trigger = null, ?string $referer = null, ?string $refererUrl = null, ?string $url = null, ?string $tagId = null, ?bool $qr = null, ?bool $root = null, ?Event $event = Event::Clicks, ?QueryParamGroupBy $groupBy = QueryParamGroupBy::Count, ?string $timezone = 'UTC') { $this->event = $event; $this->groupBy = $groupBy; diff --git a/src/Models/Operations/RetrieveAnalyticsResponse.php b/src/Models/Operations/RetrieveAnalyticsResponse.php index 17d0a03..19e7ac1 100644 --- a/src/Models/Operations/RetrieveAnalyticsResponse.php +++ b/src/Models/Operations/RetrieveAnalyticsResponse.php @@ -35,7 +35,7 @@ class RetrieveAnalyticsResponse /** * Analytics data * - * @var Components\AnalyticsCount|array|array|array|array|array|array|array|array|array|null $oneOf + * @var Components\AnalyticsCount|array|array|array|array|array|array|array|array|array|array|array|array|null $oneOf */ public Components\AnalyticsCount|array|null $oneOf = null; @@ -43,7 +43,7 @@ class RetrieveAnalyticsResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse - * @param Components\AnalyticsCount|array|array|array|array|array|array|array|array|array|null $oneOf + * @param Components\AnalyticsCount|array|array|array|array|array|array|array|array|array|array|array|array|null $oneOf */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, Components\AnalyticsCount|array|null $oneOf = null) { diff --git a/src/Models/Operations/TrackLeadRequestBody.php b/src/Models/Operations/TrackLeadRequestBody.php index 61ec1e2..d4a05bb 100644 --- a/src/Models/Operations/TrackLeadRequestBody.php +++ b/src/Models/Operations/TrackLeadRequestBody.php @@ -81,7 +81,7 @@ class TrackLeadRequestBody * @param ?string $customerAvatar * @param ?array $metadata */ - public function __construct(string $clickId, string $eventName, string $customerId, ?string $customerName = null, ?string $customerEmail = null, ?string $customerAvatar = null, ?array $metadata = null) + public function __construct(string $clickId, string $eventName, string $customerId, ?array $metadata = null, ?string $customerName = null, ?string $customerEmail = null, ?string $customerAvatar = null) { $this->clickId = $clickId; $this->eventName = $eventName; diff --git a/src/Models/Operations/TrackSaleRequestBody.php b/src/Models/Operations/TrackSaleRequestBody.php index 21b889e..e5afc46 100644 --- a/src/Models/Operations/TrackSaleRequestBody.php +++ b/src/Models/Operations/TrackSaleRequestBody.php @@ -82,7 +82,7 @@ class TrackSaleRequestBody * @param ?string $invoiceId * @param ?array $metadata */ - public function __construct(string $customerId, int $amount, PaymentProcessor $paymentProcessor, ?string $eventName = null, ?string $currency = null, ?string $invoiceId = null, ?array $metadata = null) + public function __construct(string $customerId, int $amount, PaymentProcessor $paymentProcessor, ?array $metadata = null, ?string $eventName = 'Purchase', ?string $currency = 'usd', ?string $invoiceId = null) { $this->customerId = $customerId; $this->amount = $amount; diff --git a/src/Models/Operations/UpdateDomainRequestBody.php b/src/Models/Operations/UpdateDomainRequestBody.php index 8e79347..894830a 100644 --- a/src/Models/Operations/UpdateDomainRequestBody.php +++ b/src/Models/Operations/UpdateDomainRequestBody.php @@ -53,7 +53,7 @@ class UpdateDomainRequestBody * @param ?string $expiredUrl * @param ?string $placeholder */ - public function __construct(?string $slug = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $placeholder = null) + public function __construct(?string $slug = null, ?string $expiredUrl = null, ?bool $archived = false, ?string $placeholder = 'https://dub.co/help/article/what-is-dub') { $this->slug = $slug; $this->archived = $archived; diff --git a/src/Models/Operations/UpdateLinkRequestBody.php b/src/Models/Operations/UpdateLinkRequestBody.php index 0b9eeb5..1e8b509 100644 --- a/src/Models/Operations/UpdateLinkRequestBody.php +++ b/src/Models/Operations/UpdateLinkRequestBody.php @@ -337,7 +337,7 @@ class UpdateLinkRequestBody * @param ?string $utmContent * @param ?string $ref */ - public function __construct(?string $url = null, ?string $domain = null, ?string $key = null, ?string $prefix = null, ?bool $trackConversion = null, ?bool $archived = null, ?bool $publicStats = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?bool $proxy = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $externalId = null, ?string $identifier = 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) + 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 $identifier = 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, ?bool $trackConversion = false, ?bool $archived = false, ?bool $publicStats = false, ?bool $proxy = false, ?bool $rewrite = false, ?bool $doIndex = false) { $this->url = $url; $this->domain = $domain; diff --git a/src/Models/Operations/UpsertLinkRequestBody.php b/src/Models/Operations/UpsertLinkRequestBody.php index 56cf8f8..ed55dd6 100644 --- a/src/Models/Operations/UpsertLinkRequestBody.php +++ b/src/Models/Operations/UpsertLinkRequestBody.php @@ -336,7 +336,7 @@ class UpsertLinkRequestBody * @param ?string $utmContent * @param ?string $ref */ - public function __construct(string $url, ?string $domain = null, ?string $key = null, ?string $prefix = null, ?bool $trackConversion = null, ?bool $archived = null, ?bool $publicStats = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?bool $proxy = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $externalId = null, ?string $identifier = 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) + 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 $identifier = 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, ?bool $trackConversion = false, ?bool $archived = false, ?bool $publicStats = false, ?bool $proxy = false, ?bool $rewrite = false, ?bool $doIndex = false) { $this->url = $url; $this->domain = $domain; diff --git a/src/SDKConfiguration.php b/src/SDKConfiguration.php index b4976ab..efe1e83 100644 --- a/src/SDKConfiguration.php +++ b/src/SDKConfiguration.php @@ -27,11 +27,11 @@ class SDKConfiguration public string $openapiDocVersion = '0.0.1'; - public string $sdkVersion = '0.6.9'; + public string $sdkVersion = '0.7.0'; - public string $genVersion = '2.429.0'; + public string $genVersion = '2.434.1'; - public string $userAgent = 'speakeasy-sdk/php 0.6.9 2.429.0 0.0.1 dub/dub-php'; + public string $userAgent = 'speakeasy-sdk/php 0.7.0 2.434.1 0.0.1 dub/dub-php'; public function getServerUrl(): string { diff --git a/src/Utils/Utils.php b/src/Utils/Utils.php index 59caaf2..0646ce4 100644 --- a/src/Utils/Utils.php +++ b/src/Utils/Utils.php @@ -12,14 +12,15 @@ class Utils { + /** - * little function to adjust the return type from DateTime|false to DateTime|null + * little function to adjust the return type from DateTime|false to DateTime */ - public static function parseDateTime(string $dateTimeString): ?\DateTime + public static function parseDateTime(string $dateTimeString): \DateTime { $val = \DateTime::createFromFormat('Y-m-d\\TH:i:s.uP', $dateTimeString); if ($val === false) { - return null; + throw new \InvalidArgumentException('Invalid date time string: '.$dateTimeString); } return $val;