diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index fddcbe5..c954a76 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 43187d3e-7c3c-4c11-b5d4-4b2334fb6d96 management: - docChecksum: 46f65792e2db963b01085754a661b72a + docChecksum: adaa2bd5ce5c9f12fb83c88e3ea2c2e0 docVersion: 0.0.1 - speakeasyVersion: 1.470.1 - generationVersion: 2.493.34 - releaseVersion: 0.11.18 - configChecksum: fb0c3e6deeb5176675b76b59511a00ea + speakeasyVersion: 1.476.2 + generationVersion: 2.495.1 + releaseVersion: 0.11.19 + configChecksum: 7f6c2c3dbe10624b74890ad4c3629b15 repoURL: https://github.com/dubinc/dub-php.git installationURL: https://github.com/dubinc/dub-php published: true features: php: constsAndDefaults: 0.2.0 - core: 3.7.9 + core: 3.7.10 deprecations: 2.81.1 errors: 0.3.0 examples: 2.81.5 @@ -66,11 +66,22 @@ generatedFiles: - docs/Models/Components/Interval.md - docs/Models/Components/LeadCreatedEvent.md - docs/Models/Components/LeadCreatedEventClick.md + - docs/Models/Components/LeadCreatedEventCustomer.md - docs/Models/Components/LeadCreatedEventData.md - docs/Models/Components/LeadCreatedEventDataLink.md + - docs/Models/Components/LeadCreatedEventDiscount.md - docs/Models/Components/LeadCreatedEventEvent.md - docs/Models/Components/LeadCreatedEventGeo.md + - docs/Models/Components/LeadCreatedEventInterval.md - docs/Models/Components/LeadCreatedEventLink.md + - docs/Models/Components/LeadCreatedEventPartner.md + - docs/Models/Components/LeadCreatedEventType.md + - docs/Models/Components/LeadEvent.md + - docs/Models/Components/LeadEventClick.md + - docs/Models/Components/LeadEventCustomerLink.md + - docs/Models/Components/LeadEventEvent.md + - docs/Models/Components/LeadEventGeo.md + - docs/Models/Components/LeadEventLink.md - docs/Models/Components/Link.md - docs/Models/Components/LinkClickedEvent.md - docs/Models/Components/LinkClickedEventClick.md @@ -86,6 +97,7 @@ generatedFiles: - docs/Models/Components/LinkWebhookEventGeo.md - docs/Models/Components/One.md - docs/Models/Components/Partner.md + - docs/Models/Components/PaymentProcessor.md - docs/Models/Components/Plan.md - docs/Models/Components/RegisteredDomain.md - docs/Models/Components/Role.md @@ -101,7 +113,19 @@ generatedFiles: - docs/Models/Components/SaleCreatedEventInterval.md - docs/Models/Components/SaleCreatedEventLink.md - docs/Models/Components/SaleCreatedEventPartner.md + - docs/Models/Components/SaleCreatedEventSale.md - docs/Models/Components/SaleCreatedEventType.md + - docs/Models/Components/SaleEvent.md + - docs/Models/Components/SaleEventClick.md + - docs/Models/Components/SaleEventCustomer.md + - docs/Models/Components/SaleEventCustomerLink.md + - docs/Models/Components/SaleEventDiscount.md + - docs/Models/Components/SaleEventEvent.md + - docs/Models/Components/SaleEventGeo.md + - docs/Models/Components/SaleEventInterval.md + - docs/Models/Components/SaleEventLink.md + - docs/Models/Components/SaleEventPartner.md + - docs/Models/Components/SaleEventType.md - docs/Models/Components/Security.md - docs/Models/Components/TagSchema.md - docs/Models/Components/Three.md @@ -150,6 +174,7 @@ generatedFiles: - docs/Models/Operations/BulkUpdateLinksTagNames.md - docs/Models/Operations/Click.md - docs/Models/Operations/Color.md + - docs/Models/Operations/Country.md - docs/Models/Operations/CreateCustomerDiscount.md - docs/Models/Operations/CreateCustomerInterval.md - docs/Models/Operations/CreateCustomerLink.md @@ -165,6 +190,13 @@ generatedFiles: - docs/Models/Operations/CreateEmbedTokenResponseBody.md - docs/Models/Operations/CreateLinkRequestBody.md - docs/Models/Operations/CreateLinkResponse.md + - docs/Models/Operations/CreatePartnerDiscount.md + - docs/Models/Operations/CreatePartnerInterval.md + - docs/Models/Operations/CreatePartnerLink.md + - docs/Models/Operations/CreatePartnerRequestBody.md + - docs/Models/Operations/CreatePartnerResponse.md + - docs/Models/Operations/CreatePartnerResponseBody.md + - docs/Models/Operations/CreatePartnerType.md - docs/Models/Operations/CreateTagRequestBody.md - docs/Models/Operations/CreateTagResponse.md - docs/Models/Operations/Customer.md @@ -224,6 +256,7 @@ generatedFiles: - docs/Models/Operations/ListEventsQueryParamTagIds.md - docs/Models/Operations/ListEventsRequest.md - docs/Models/Operations/ListEventsResponse.md + - docs/Models/Operations/ListEventsResponseBody.md - docs/Models/Operations/One.md - docs/Models/Operations/Order.md - docs/Models/Operations/Partner.md @@ -246,6 +279,7 @@ generatedFiles: - docs/Models/Operations/Sort.md - docs/Models/Operations/SortBy.md - docs/Models/Operations/SortOrder.md + - docs/Models/Operations/Status.md - docs/Models/Operations/TagIds.md - docs/Models/Operations/TagNames.md - docs/Models/Operations/Three.md @@ -295,6 +329,7 @@ generatedFiles: - docs/sdks/events/README.md - docs/sdks/links/README.md - docs/sdks/metatags/README.md + - docs/sdks/partners/README.md - docs/sdks/qrcodes/README.md - docs/sdks/tags/README.md - docs/sdks/track/README.md @@ -362,11 +397,22 @@ generatedFiles: - src/Models/Components/Interval.php - src/Models/Components/LeadCreatedEvent.php - src/Models/Components/LeadCreatedEventClick.php + - src/Models/Components/LeadCreatedEventCustomer.php - src/Models/Components/LeadCreatedEventData.php - src/Models/Components/LeadCreatedEventDataLink.php + - src/Models/Components/LeadCreatedEventDiscount.php - src/Models/Components/LeadCreatedEventEvent.php - src/Models/Components/LeadCreatedEventGeo.php + - src/Models/Components/LeadCreatedEventInterval.php - src/Models/Components/LeadCreatedEventLink.php + - src/Models/Components/LeadCreatedEventPartner.php + - src/Models/Components/LeadCreatedEventType.php + - src/Models/Components/LeadEvent.php + - src/Models/Components/LeadEventClick.php + - src/Models/Components/LeadEventCustomerLink.php + - src/Models/Components/LeadEventEvent.php + - src/Models/Components/LeadEventGeo.php + - src/Models/Components/LeadEventLink.php - src/Models/Components/Link.php - src/Models/Components/LinkClickedEvent.php - src/Models/Components/LinkClickedEventClick.php @@ -381,6 +427,7 @@ generatedFiles: - src/Models/Components/LinkWebhookEventGeo.php - src/Models/Components/One.php - src/Models/Components/Partner.php + - src/Models/Components/PaymentProcessor.php - src/Models/Components/Plan.php - src/Models/Components/RegisteredDomain.php - src/Models/Components/Role.php @@ -396,7 +443,19 @@ generatedFiles: - src/Models/Components/SaleCreatedEventInterval.php - src/Models/Components/SaleCreatedEventLink.php - src/Models/Components/SaleCreatedEventPartner.php + - src/Models/Components/SaleCreatedEventSale.php - src/Models/Components/SaleCreatedEventType.php + - src/Models/Components/SaleEvent.php + - src/Models/Components/SaleEventClick.php + - src/Models/Components/SaleEventCustomer.php + - src/Models/Components/SaleEventCustomerLink.php + - src/Models/Components/SaleEventDiscount.php + - src/Models/Components/SaleEventEvent.php + - src/Models/Components/SaleEventGeo.php + - src/Models/Components/SaleEventInterval.php + - src/Models/Components/SaleEventLink.php + - src/Models/Components/SaleEventPartner.php + - src/Models/Components/SaleEventType.php - src/Models/Components/Security.php - src/Models/Components/TagSchema.php - src/Models/Components/Three.php @@ -450,6 +509,7 @@ generatedFiles: - src/Models/Operations/BulkUpdateLinksResponse.php - src/Models/Operations/Click.php - src/Models/Operations/Color.php + - src/Models/Operations/Country.php - src/Models/Operations/CreateCustomerDiscount.php - src/Models/Operations/CreateCustomerInterval.php - src/Models/Operations/CreateCustomerLink.php @@ -465,6 +525,13 @@ generatedFiles: - src/Models/Operations/CreateEmbedTokenResponseBody.php - src/Models/Operations/CreateLinkRequestBody.php - src/Models/Operations/CreateLinkResponse.php + - src/Models/Operations/CreatePartnerDiscount.php + - src/Models/Operations/CreatePartnerInterval.php + - src/Models/Operations/CreatePartnerLink.php + - src/Models/Operations/CreatePartnerRequestBody.php + - src/Models/Operations/CreatePartnerResponse.php + - src/Models/Operations/CreatePartnerResponseBody.php + - src/Models/Operations/CreatePartnerType.php - src/Models/Operations/CreateTagRequestBody.php - src/Models/Operations/CreateTagResponse.php - src/Models/Operations/Customer.php @@ -536,6 +603,7 @@ generatedFiles: - src/Models/Operations/Sort.php - src/Models/Operations/SortBy.php - src/Models/Operations/SortOrder.php + - src/Models/Operations/Status.php - src/Models/Operations/Three.php - src/Models/Operations/TrackLeadRequestBody.php - src/Models/Operations/TrackLeadResponse.php @@ -571,6 +639,7 @@ generatedFiles: - src/Models/Operations/UpdateWorkspaceResponse.php - src/Models/Operations/UpsertLinkRequestBody.php - src/Models/Operations/UpsertLinkResponse.php + - src/Partners.php - src/QRCodes.php - src/SDKConfiguration.php - src/Tags.php @@ -1452,5 +1521,28 @@ examples: responses: "200": application/json: {"title": "Dub.co - Link Management for Modern Marketing Teams", "description": "Dub.co is the open-source link management infrastructure ...", "image": "https://assets.dub.co/thumbnail.jpg"} + createPartner: + speakeasy-default-create-partner: + responses: + "201": + application/json: {"id": "", "name": "", "email": "Loyal79@yahoo.com", "image": "https://loremflickr.com/1/679?lock=7139282333236917", "country": "Slovenia", "bio": "", "stripeConnectId": "", "payoutsEnabled": false, "createdAt": "1730216446017", "updatedAt": "1738019902359", "status": "pending", "link": {"id": "", "shortLink": "https://agile-defendant.biz/", "domain": "better-fedora.biz", "key": "", "url": "https://calculating-pearl.info/", "clicks": 0, "leads": 0, "sales": 0, "saleAmount": 0}, "commissionAmount": 365.21, "earnings": 6216.36} + "400": + application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} + "401": + application/json: {"error": {"code": "unauthorized", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unauthorized"}} + "403": + application/json: {"error": {"code": "forbidden", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#forbidden"}} + "404": + application/json: {"error": {"code": "not_found", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#not-found"}} + "409": + application/json: {"error": {"code": "conflict", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#conflict"}} + "410": + application/json: {"error": {"code": "invite_expired", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#invite-expired"}} + "422": + application/json: {"error": {"code": "unprocessable_entity", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unprocessable-entity"}} + "429": + application/json: {"error": {"code": "rate_limit_exceeded", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#rate-limit_exceeded"}} + "500": + application/json: {"error": {"code": "internal_server_error", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#internal-server_error"}} examplesVersion: 1.0.0 generatedTests: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 10c2e88..f898ce4 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -13,7 +13,7 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false php: - version: 0.11.18 + version: 0.11.19 additionalDependencies: autoload: {} autoload-dev: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 89c49d3..01109c2 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.470.1 +speakeasyVersion: 1.476.2 sources: dub: sourceNamespace: dub - sourceRevisionDigest: sha256:5328e731f1fac74c8c302cd09057098694e391457174a24ba009527eced36feb - sourceBlobDigest: sha256:2f976de813f654333718329c8b83b019a8ec90020cca102f257c686b338a51ce + sourceRevisionDigest: sha256:1e3daf3eb06228806a38c0576a9737557e5800d414806c0858bb2a627e360922 + sourceBlobDigest: sha256:cb6f4266fa1867dc7c1addc33802928e6153d0ec07a01270b22fdc25cc192efa tags: - latest - - speakeasy-sdk-regen-1737591555 + - speakeasy-sdk-regen-1738023568 - 0.0.1 targets: my-first-target: source: dub sourceNamespace: dub - sourceRevisionDigest: sha256:5328e731f1fac74c8c302cd09057098694e391457174a24ba009527eced36feb - sourceBlobDigest: sha256:2f976de813f654333718329c8b83b019a8ec90020cca102f257c686b338a51ce + sourceRevisionDigest: sha256:1e3daf3eb06228806a38c0576a9737557e5800d414806c0858bb2a627e360922 + sourceBlobDigest: sha256:cb6f4266fa1867dc7c1addc33802928e6153d0ec07a01270b22fdc25cc192efa codeSamplesNamespace: code-samples-php-my-first-target - codeSamplesRevisionDigest: sha256:96f48f1b572fb53d77e12cfd0a9914b46cce79f1af48ae7aef442efbfe91d204 + codeSamplesRevisionDigest: sha256:4fc0b8e89fb36cd7edb0299cedc526e472df8f9e0e37398a0f56478df64e348e workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 6f20593..a2d2270 100644 --- a/README.md +++ b/README.md @@ -208,6 +208,10 @@ if ($response->responseBodies !== null) { * [get](docs/sdks/metatags/README.md#get) - Retrieve the metatags for a URL +### [partners](docs/sdks/partners/README.md) + +* [create](docs/sdks/partners/README.md#create) - Create a new partner + ### [qrCodes](docs/sdks/qrcodes/README.md) * [get](docs/sdks/qrcodes/README.md#get) - Retrieve a QR code diff --git a/RELEASES.md b/RELEASES.md index d5417b8..4b908b3 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -630,4 +630,14 @@ Based on: ### Generated - [php v0.11.18] . ### Releases -- [Composer v0.11.18] https://packagist.org/packages/dub/dub-php#v0.11.18 - . \ No newline at end of file +- [Composer v0.11.18] https://packagist.org/packages/dub/dub-php#v0.11.18 - . + +## 2025-01-28 00:19:14 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.476.2 (2.495.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [php v0.11.19] . +### Releases +- [Composer v0.11.19] https://packagist.org/packages/dub/dub-php#v0.11.19 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 86c349a..1e00912 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -62,7 +62,7 @@ actions: "x-codeSamples": - "lang": "php" "label": "listEvents" - "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Operations;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n$request = new Operations\\ListEventsRequest(\n timezone: 'America/New_York',\n city: 'New York',\n device: 'Desktop',\n browser: 'Chrome',\n os: 'Windows',\n referer: 'google.com',\n refererUrl: 'https://dub.co/blog',\n);\n\n$response = $sdk->events->list(\n request: $request\n);\n\nif ($response->clickEvents !== null) {\n // handle response\n}" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Operations;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n$request = new Operations\\ListEventsRequest(\n timezone: 'America/New_York',\n city: 'New York',\n device: 'Desktop',\n browser: 'Chrome',\n os: 'Windows',\n referer: 'google.com',\n refererUrl: 'https://dub.co/blog',\n);\n\n$response = $sdk->events->list(\n request: $request\n);\n\nif ($response->oneOf !== null) {\n // handle response\n}" - target: $["paths"]["/links"]["get"] update: "x-codeSamples": @@ -129,6 +129,12 @@ actions: - "lang": "php" "label": "getMetatags" "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n\n\n$response = $sdk->metatags->get(\n url: 'https://dub.co'\n);\n\nif ($response->object !== null) {\n // handle response\n}" + - target: $["paths"]["/partners"]["post"] + update: + "x-codeSamples": + - "lang": "php" + "label": "createPartner" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Operations;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n$request = new Operations\\CreatePartnerRequestBody(\n programId: '',\n name: '',\n email: 'Loyal79@yahoo.com',\n username: 'Aaliyah_Borer',\n);\n\n$response = $sdk->partners->create(\n request: $request\n);\n\nif ($response->object !== null) {\n // handle response\n}" - target: $["paths"]["/qr"]["get"] update: "x-codeSamples": diff --git a/docs/Models/Components/Customer.md b/docs/Models/Components/Customer.md index 30e2ae2..bd2581e 100644 --- a/docs/Models/Components/Customer.md +++ b/docs/Models/Components/Customer.md @@ -3,15 +3,15 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The unique identifier of the customer in Dub. | -| `externalId` | *string* | :heavy_check_mark: | Unique identifier for the customer in the client's app. | -| `name` | *string* | :heavy_check_mark: | Name of the customer. | -| `createdAt` | *string* | :heavy_check_mark: | The date the customer was created. | -| `email` | *?string* | :heavy_minus_sign: | Email of the customer. | -| `avatar` | *?string* | :heavy_minus_sign: | Avatar URL of the customer. | -| `country` | *?string* | :heavy_minus_sign: | Country of the customer. | -| `link` | [?Components\LeadCreatedEventDataLink](../../Models/Components/LeadCreatedEventDataLink.md) | :heavy_minus_sign: | N/A | -| `partner` | [?Components\Partner](../../Models/Components/Partner.md) | :heavy_minus_sign: | N/A | -| `discount` | [?Components\Discount](../../Models/Components/Discount.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique identifier of the customer in Dub. | +| `externalId` | *string* | :heavy_check_mark: | Unique identifier for the customer in the client's app. | +| `name` | *string* | :heavy_check_mark: | Name of the customer. | +| `createdAt` | *string* | :heavy_check_mark: | The date the customer was created. | +| `email` | *?string* | :heavy_minus_sign: | Email of the customer. | +| `avatar` | *?string* | :heavy_minus_sign: | Avatar URL of the customer. | +| `country` | *?string* | :heavy_minus_sign: | Country of the customer. | +| `link` | [?Components\LeadEventCustomerLink](../../Models/Components/LeadEventCustomerLink.md) | :heavy_minus_sign: | N/A | +| `partner` | [?Components\Partner](../../Models/Components/Partner.md) | :heavy_minus_sign: | N/A | +| `discount` | [?Components\Discount](../../Models/Components/Discount.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/LeadCreatedEventCustomer.md b/docs/Models/Components/LeadCreatedEventCustomer.md new file mode 100644 index 0000000..5ccf923 --- /dev/null +++ b/docs/Models/Components/LeadCreatedEventCustomer.md @@ -0,0 +1,17 @@ +# LeadCreatedEventCustomer + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique identifier of the customer in Dub. | +| `externalId` | *string* | :heavy_check_mark: | Unique identifier for the customer in the client's app. | +| `name` | *string* | :heavy_check_mark: | Name of the customer. | +| `createdAt` | *string* | :heavy_check_mark: | The date the customer was created. | +| `email` | *?string* | :heavy_minus_sign: | Email of the customer. | +| `avatar` | *?string* | :heavy_minus_sign: | Avatar URL of the customer. | +| `country` | *?string* | :heavy_minus_sign: | Country of the customer. | +| `link` | [?Components\LeadCreatedEventDataLink](../../Models/Components/LeadCreatedEventDataLink.md) | :heavy_minus_sign: | N/A | +| `partner` | [?Components\LeadCreatedEventPartner](../../Models/Components/LeadCreatedEventPartner.md) | :heavy_minus_sign: | N/A | +| `discount` | [?Components\LeadCreatedEventDiscount](../../Models/Components/LeadCreatedEventDiscount.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/LeadCreatedEventData.md b/docs/Models/Components/LeadCreatedEventData.md index a9ee4f6..a203d6c 100644 --- a/docs/Models/Components/LeadCreatedEventData.md +++ b/docs/Models/Components/LeadCreatedEventData.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `eventName` | *string* | :heavy_check_mark: | N/A | -| `customer` | [Components\Customer](../../Models/Components/Customer.md) | :heavy_check_mark: | N/A | -| `click` | [Components\LeadCreatedEventClick](../../Models/Components/LeadCreatedEventClick.md) | :heavy_check_mark: | N/A | -| `link` | [Components\LeadCreatedEventLink](../../Models/Components/LeadCreatedEventLink.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `eventName` | *string* | :heavy_check_mark: | N/A | +| `customer` | [Components\LeadCreatedEventCustomer](../../Models/Components/LeadCreatedEventCustomer.md) | :heavy_check_mark: | N/A | +| `click` | [Components\LeadCreatedEventClick](../../Models/Components/LeadCreatedEventClick.md) | :heavy_check_mark: | N/A | +| `link` | [Components\LeadCreatedEventLink](../../Models/Components/LeadCreatedEventLink.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/LeadCreatedEventDiscount.md b/docs/Models/Components/LeadCreatedEventDiscount.md new file mode 100644 index 0000000..85ea1e7 --- /dev/null +++ b/docs/Models/Components/LeadCreatedEventDiscount.md @@ -0,0 +1,14 @@ +# LeadCreatedEventDiscount + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `amount` | *float* | :heavy_check_mark: | N/A | +| `type` | [Components\LeadCreatedEventType](../../Models/Components/LeadCreatedEventType.md) | :heavy_check_mark: | N/A | +| `couponId` | *string* | :heavy_check_mark: | N/A | +| `couponTestId` | *string* | :heavy_check_mark: | N/A | +| `duration` | *float* | :heavy_check_mark: | N/A | +| `interval` | [Components\LeadCreatedEventInterval](../../Models/Components/LeadCreatedEventInterval.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/LeadCreatedEventInterval.md b/docs/Models/Components/LeadCreatedEventInterval.md new file mode 100644 index 0000000..e8b92db --- /dev/null +++ b/docs/Models/Components/LeadCreatedEventInterval.md @@ -0,0 +1,9 @@ +# LeadCreatedEventInterval + + +## Values + +| Name | Value | +| ------- | ------- | +| `Month` | month | +| `Year` | year | \ No newline at end of file diff --git a/docs/Models/Components/LeadCreatedEventPartner.md b/docs/Models/Components/LeadCreatedEventPartner.md new file mode 100644 index 0000000..dc98bfb --- /dev/null +++ b/docs/Models/Components/LeadCreatedEventPartner.md @@ -0,0 +1,11 @@ +# LeadCreatedEventPartner + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `email` | *string* | :heavy_check_mark: | N/A | +| `image` | *?string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/LeadCreatedEventType.md b/docs/Models/Components/LeadCreatedEventType.md new file mode 100644 index 0000000..e85a3db --- /dev/null +++ b/docs/Models/Components/LeadCreatedEventType.md @@ -0,0 +1,9 @@ +# LeadCreatedEventType + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `Percentage` | percentage | +| `Flat` | flat | \ No newline at end of file diff --git a/docs/Models/Components/LeadEvent.md b/docs/Models/Components/LeadEvent.md new file mode 100644 index 0000000..ff7a2ef --- /dev/null +++ b/docs/Models/Components/LeadEvent.md @@ -0,0 +1,27 @@ +# LeadEvent + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `event` | [Components\LeadEventEvent](../../Models/Components/LeadEventEvent.md) | :heavy_check_mark: | N/A | +| `eventId` | *string* | :heavy_check_mark: | N/A | +| `eventName` | *string* | :heavy_check_mark: | N/A | +| `click` | [Components\LeadEventClick](../../Models/Components/LeadEventClick.md) | :heavy_check_mark: | N/A | +| `link` | [Components\LeadEventLink](../../Models/Components/LeadEventLink.md) | :heavy_check_mark: | N/A | +| `customer` | [Components\Customer](../../Models/Components/Customer.md) | :heavy_check_mark: | N/A | +| ~~`clickId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `click.id` instead. | +| ~~`linkId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `link.id` instead. | +| ~~`domain`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `link.domain` instead. | +| ~~`key`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `link.key` instead. | +| ~~`url`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `click.url` instead. | +| ~~`continent`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `click.continent` instead. | +| ~~`country`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `click.country` instead. | +| ~~`city`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `click.city` instead. | +| ~~`device`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `click.device` instead. | +| ~~`browser`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `click.browser` instead. | +| ~~`os`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `click.os` instead. | +| ~~`qr`~~ | *float* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `click.qr` instead. | +| ~~`ip`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `click.ip` instead. | +| `timestamp` | *?string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/LeadEventClick.md b/docs/Models/Components/LeadEventClick.md new file mode 100644 index 0000000..b7c2d18 --- /dev/null +++ b/docs/Models/Components/LeadEventClick.md @@ -0,0 +1,20 @@ +# LeadEventClick + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `url` | *string* | :heavy_check_mark: | N/A | +| `country` | *string* | :heavy_check_mark: | N/A | +| `city` | *string* | :heavy_check_mark: | N/A | +| `region` | *string* | :heavy_check_mark: | N/A | +| `continent` | *string* | :heavy_check_mark: | N/A | +| `device` | *string* | :heavy_check_mark: | N/A | +| `browser` | *string* | :heavy_check_mark: | N/A | +| `os` | *string* | :heavy_check_mark: | N/A | +| `referer` | *string* | :heavy_check_mark: | N/A | +| `refererUrl` | *string* | :heavy_check_mark: | N/A | +| `ip` | *string* | :heavy_check_mark: | N/A | +| `qr` | *?bool* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/LeadEventCustomerLink.md b/docs/Models/Components/LeadEventCustomerLink.md new file mode 100644 index 0000000..0545887 --- /dev/null +++ b/docs/Models/Components/LeadEventCustomerLink.md @@ -0,0 +1,12 @@ +# LeadEventCustomerLink + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique ID of the short link. | +| `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. | +| `shortLink` | *string* | :heavy_check_mark: | The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). | +| `programId` | *string* | :heavy_check_mark: | The ID of the program the short link is associated with. | \ No newline at end of file diff --git a/docs/Models/Components/LeadEventEvent.md b/docs/Models/Components/LeadEventEvent.md new file mode 100644 index 0000000..c9f3f52 --- /dev/null +++ b/docs/Models/Components/LeadEventEvent.md @@ -0,0 +1,8 @@ +# LeadEventEvent + + +## Values + +| Name | Value | +| ------ | ------ | +| `Lead` | lead | \ No newline at end of file diff --git a/docs/Models/Components/LeadEventGeo.md b/docs/Models/Components/LeadEventGeo.md new file mode 100644 index 0000000..8c156f9 --- /dev/null +++ b/docs/Models/Components/LeadEventGeo.md @@ -0,0 +1,259 @@ +# LeadEventGeo + +Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `af` | *?string* | :heavy_minus_sign: | N/A | +| `al` | *?string* | :heavy_minus_sign: | N/A | +| `dz` | *?string* | :heavy_minus_sign: | N/A | +| `as` | *?string* | :heavy_minus_sign: | N/A | +| `ad` | *?string* | :heavy_minus_sign: | N/A | +| `ao` | *?string* | :heavy_minus_sign: | N/A | +| `ai` | *?string* | :heavy_minus_sign: | N/A | +| `aq` | *?string* | :heavy_minus_sign: | N/A | +| `ag` | *?string* | :heavy_minus_sign: | N/A | +| `ar` | *?string* | :heavy_minus_sign: | N/A | +| `am` | *?string* | :heavy_minus_sign: | N/A | +| `aw` | *?string* | :heavy_minus_sign: | N/A | +| `au` | *?string* | :heavy_minus_sign: | N/A | +| `at` | *?string* | :heavy_minus_sign: | N/A | +| `az` | *?string* | :heavy_minus_sign: | N/A | +| `bs` | *?string* | :heavy_minus_sign: | N/A | +| `bh` | *?string* | :heavy_minus_sign: | N/A | +| `bd` | *?string* | :heavy_minus_sign: | N/A | +| `bb` | *?string* | :heavy_minus_sign: | N/A | +| `by` | *?string* | :heavy_minus_sign: | N/A | +| `be` | *?string* | :heavy_minus_sign: | N/A | +| `bz` | *?string* | :heavy_minus_sign: | N/A | +| `bj` | *?string* | :heavy_minus_sign: | N/A | +| `bm` | *?string* | :heavy_minus_sign: | N/A | +| `bt` | *?string* | :heavy_minus_sign: | N/A | +| `bo` | *?string* | :heavy_minus_sign: | N/A | +| `ba` | *?string* | :heavy_minus_sign: | N/A | +| `bw` | *?string* | :heavy_minus_sign: | N/A | +| `bv` | *?string* | :heavy_minus_sign: | N/A | +| `br` | *?string* | :heavy_minus_sign: | N/A | +| `io` | *?string* | :heavy_minus_sign: | N/A | +| `bn` | *?string* | :heavy_minus_sign: | N/A | +| `bg` | *?string* | :heavy_minus_sign: | N/A | +| `bf` | *?string* | :heavy_minus_sign: | N/A | +| `bi` | *?string* | :heavy_minus_sign: | N/A | +| `kh` | *?string* | :heavy_minus_sign: | N/A | +| `cm` | *?string* | :heavy_minus_sign: | N/A | +| `ca` | *?string* | :heavy_minus_sign: | N/A | +| `cv` | *?string* | :heavy_minus_sign: | N/A | +| `ky` | *?string* | :heavy_minus_sign: | N/A | +| `cf` | *?string* | :heavy_minus_sign: | N/A | +| `td` | *?string* | :heavy_minus_sign: | N/A | +| `cl` | *?string* | :heavy_minus_sign: | N/A | +| `cn` | *?string* | :heavy_minus_sign: | N/A | +| `cx` | *?string* | :heavy_minus_sign: | N/A | +| `cc` | *?string* | :heavy_minus_sign: | N/A | +| `co` | *?string* | :heavy_minus_sign: | N/A | +| `km` | *?string* | :heavy_minus_sign: | N/A | +| `cg` | *?string* | :heavy_minus_sign: | N/A | +| `cd` | *?string* | :heavy_minus_sign: | N/A | +| `ck` | *?string* | :heavy_minus_sign: | N/A | +| `cr` | *?string* | :heavy_minus_sign: | N/A | +| `ci` | *?string* | :heavy_minus_sign: | N/A | +| `hr` | *?string* | :heavy_minus_sign: | N/A | +| `cu` | *?string* | :heavy_minus_sign: | N/A | +| `cy` | *?string* | :heavy_minus_sign: | N/A | +| `cz` | *?string* | :heavy_minus_sign: | N/A | +| `dk` | *?string* | :heavy_minus_sign: | N/A | +| `dj` | *?string* | :heavy_minus_sign: | N/A | +| `dm` | *?string* | :heavy_minus_sign: | N/A | +| `do` | *?string* | :heavy_minus_sign: | N/A | +| `ec` | *?string* | :heavy_minus_sign: | N/A | +| `eg` | *?string* | :heavy_minus_sign: | N/A | +| `sv` | *?string* | :heavy_minus_sign: | N/A | +| `gq` | *?string* | :heavy_minus_sign: | N/A | +| `er` | *?string* | :heavy_minus_sign: | N/A | +| `ee` | *?string* | :heavy_minus_sign: | N/A | +| `et` | *?string* | :heavy_minus_sign: | N/A | +| `fk` | *?string* | :heavy_minus_sign: | N/A | +| `fo` | *?string* | :heavy_minus_sign: | N/A | +| `fj` | *?string* | :heavy_minus_sign: | N/A | +| `fi` | *?string* | :heavy_minus_sign: | N/A | +| `fr` | *?string* | :heavy_minus_sign: | N/A | +| `gf` | *?string* | :heavy_minus_sign: | N/A | +| `pf` | *?string* | :heavy_minus_sign: | N/A | +| `tf` | *?string* | :heavy_minus_sign: | N/A | +| `ga` | *?string* | :heavy_minus_sign: | N/A | +| `gm` | *?string* | :heavy_minus_sign: | N/A | +| `ge` | *?string* | :heavy_minus_sign: | N/A | +| `de` | *?string* | :heavy_minus_sign: | N/A | +| `gh` | *?string* | :heavy_minus_sign: | N/A | +| `gi` | *?string* | :heavy_minus_sign: | N/A | +| `gr` | *?string* | :heavy_minus_sign: | N/A | +| `gl` | *?string* | :heavy_minus_sign: | N/A | +| `gd` | *?string* | :heavy_minus_sign: | N/A | +| `gp` | *?string* | :heavy_minus_sign: | N/A | +| `gu` | *?string* | :heavy_minus_sign: | N/A | +| `gt` | *?string* | :heavy_minus_sign: | N/A | +| `gn` | *?string* | :heavy_minus_sign: | N/A | +| `gw` | *?string* | :heavy_minus_sign: | N/A | +| `gy` | *?string* | :heavy_minus_sign: | N/A | +| `ht` | *?string* | :heavy_minus_sign: | N/A | +| `hm` | *?string* | :heavy_minus_sign: | N/A | +| `va` | *?string* | :heavy_minus_sign: | N/A | +| `hn` | *?string* | :heavy_minus_sign: | N/A | +| `hk` | *?string* | :heavy_minus_sign: | N/A | +| `hu` | *?string* | :heavy_minus_sign: | N/A | +| `is` | *?string* | :heavy_minus_sign: | N/A | +| `in` | *?string* | :heavy_minus_sign: | N/A | +| `id` | *?string* | :heavy_minus_sign: | N/A | +| `ir` | *?string* | :heavy_minus_sign: | N/A | +| `iq` | *?string* | :heavy_minus_sign: | N/A | +| `ie` | *?string* | :heavy_minus_sign: | N/A | +| `il` | *?string* | :heavy_minus_sign: | N/A | +| `it` | *?string* | :heavy_minus_sign: | N/A | +| `jm` | *?string* | :heavy_minus_sign: | N/A | +| `jp` | *?string* | :heavy_minus_sign: | N/A | +| `jo` | *?string* | :heavy_minus_sign: | N/A | +| `kz` | *?string* | :heavy_minus_sign: | N/A | +| `ke` | *?string* | :heavy_minus_sign: | N/A | +| `ki` | *?string* | :heavy_minus_sign: | N/A | +| `kp` | *?string* | :heavy_minus_sign: | N/A | +| `kr` | *?string* | :heavy_minus_sign: | N/A | +| `kw` | *?string* | :heavy_minus_sign: | N/A | +| `kg` | *?string* | :heavy_minus_sign: | N/A | +| `la` | *?string* | :heavy_minus_sign: | N/A | +| `lv` | *?string* | :heavy_minus_sign: | N/A | +| `lb` | *?string* | :heavy_minus_sign: | N/A | +| `ls` | *?string* | :heavy_minus_sign: | N/A | +| `lr` | *?string* | :heavy_minus_sign: | N/A | +| `ly` | *?string* | :heavy_minus_sign: | N/A | +| `li` | *?string* | :heavy_minus_sign: | N/A | +| `lt` | *?string* | :heavy_minus_sign: | N/A | +| `lu` | *?string* | :heavy_minus_sign: | N/A | +| `mo` | *?string* | :heavy_minus_sign: | N/A | +| `mg` | *?string* | :heavy_minus_sign: | N/A | +| `mw` | *?string* | :heavy_minus_sign: | N/A | +| `my` | *?string* | :heavy_minus_sign: | N/A | +| `mv` | *?string* | :heavy_minus_sign: | N/A | +| `ml` | *?string* | :heavy_minus_sign: | N/A | +| `mt` | *?string* | :heavy_minus_sign: | N/A | +| `mh` | *?string* | :heavy_minus_sign: | N/A | +| `mq` | *?string* | :heavy_minus_sign: | N/A | +| `mr` | *?string* | :heavy_minus_sign: | N/A | +| `mu` | *?string* | :heavy_minus_sign: | N/A | +| `yt` | *?string* | :heavy_minus_sign: | N/A | +| `mx` | *?string* | :heavy_minus_sign: | N/A | +| `fm` | *?string* | :heavy_minus_sign: | N/A | +| `md` | *?string* | :heavy_minus_sign: | N/A | +| `mc` | *?string* | :heavy_minus_sign: | N/A | +| `mn` | *?string* | :heavy_minus_sign: | N/A | +| `ms` | *?string* | :heavy_minus_sign: | N/A | +| `ma` | *?string* | :heavy_minus_sign: | N/A | +| `mz` | *?string* | :heavy_minus_sign: | N/A | +| `mm` | *?string* | :heavy_minus_sign: | N/A | +| `na` | *?string* | :heavy_minus_sign: | N/A | +| `nr` | *?string* | :heavy_minus_sign: | N/A | +| `np` | *?string* | :heavy_minus_sign: | N/A | +| `nl` | *?string* | :heavy_minus_sign: | N/A | +| `nc` | *?string* | :heavy_minus_sign: | N/A | +| `nz` | *?string* | :heavy_minus_sign: | N/A | +| `ni` | *?string* | :heavy_minus_sign: | N/A | +| `ne` | *?string* | :heavy_minus_sign: | N/A | +| `ng` | *?string* | :heavy_minus_sign: | N/A | +| `nu` | *?string* | :heavy_minus_sign: | N/A | +| `nf` | *?string* | :heavy_minus_sign: | N/A | +| `mk` | *?string* | :heavy_minus_sign: | N/A | +| `mp` | *?string* | :heavy_minus_sign: | N/A | +| `no` | *?string* | :heavy_minus_sign: | N/A | +| `om` | *?string* | :heavy_minus_sign: | N/A | +| `pk` | *?string* | :heavy_minus_sign: | N/A | +| `pw` | *?string* | :heavy_minus_sign: | N/A | +| `ps` | *?string* | :heavy_minus_sign: | N/A | +| `pa` | *?string* | :heavy_minus_sign: | N/A | +| `pg` | *?string* | :heavy_minus_sign: | N/A | +| `py` | *?string* | :heavy_minus_sign: | N/A | +| `pe` | *?string* | :heavy_minus_sign: | N/A | +| `ph` | *?string* | :heavy_minus_sign: | N/A | +| `pn` | *?string* | :heavy_minus_sign: | N/A | +| `pl` | *?string* | :heavy_minus_sign: | N/A | +| `pt` | *?string* | :heavy_minus_sign: | N/A | +| `pr` | *?string* | :heavy_minus_sign: | N/A | +| `qa` | *?string* | :heavy_minus_sign: | N/A | +| `re` | *?string* | :heavy_minus_sign: | N/A | +| `ro` | *?string* | :heavy_minus_sign: | N/A | +| `ru` | *?string* | :heavy_minus_sign: | N/A | +| `rw` | *?string* | :heavy_minus_sign: | N/A | +| `sh` | *?string* | :heavy_minus_sign: | N/A | +| `kn` | *?string* | :heavy_minus_sign: | N/A | +| `lc` | *?string* | :heavy_minus_sign: | N/A | +| `pm` | *?string* | :heavy_minus_sign: | N/A | +| `vc` | *?string* | :heavy_minus_sign: | N/A | +| `ws` | *?string* | :heavy_minus_sign: | N/A | +| `sm` | *?string* | :heavy_minus_sign: | N/A | +| `st` | *?string* | :heavy_minus_sign: | N/A | +| `sa` | *?string* | :heavy_minus_sign: | N/A | +| `sn` | *?string* | :heavy_minus_sign: | N/A | +| `sc` | *?string* | :heavy_minus_sign: | N/A | +| `sl` | *?string* | :heavy_minus_sign: | N/A | +| `sg` | *?string* | :heavy_minus_sign: | N/A | +| `sk` | *?string* | :heavy_minus_sign: | N/A | +| `si` | *?string* | :heavy_minus_sign: | N/A | +| `sb` | *?string* | :heavy_minus_sign: | N/A | +| `so` | *?string* | :heavy_minus_sign: | N/A | +| `za` | *?string* | :heavy_minus_sign: | N/A | +| `gs` | *?string* | :heavy_minus_sign: | N/A | +| `es` | *?string* | :heavy_minus_sign: | N/A | +| `lk` | *?string* | :heavy_minus_sign: | N/A | +| `sd` | *?string* | :heavy_minus_sign: | N/A | +| `sr` | *?string* | :heavy_minus_sign: | N/A | +| `sj` | *?string* | :heavy_minus_sign: | N/A | +| `sz` | *?string* | :heavy_minus_sign: | N/A | +| `se` | *?string* | :heavy_minus_sign: | N/A | +| `ch` | *?string* | :heavy_minus_sign: | N/A | +| `sy` | *?string* | :heavy_minus_sign: | N/A | +| `tw` | *?string* | :heavy_minus_sign: | N/A | +| `tj` | *?string* | :heavy_minus_sign: | N/A | +| `tz` | *?string* | :heavy_minus_sign: | N/A | +| `th` | *?string* | :heavy_minus_sign: | N/A | +| `tl` | *?string* | :heavy_minus_sign: | N/A | +| `tg` | *?string* | :heavy_minus_sign: | N/A | +| `tk` | *?string* | :heavy_minus_sign: | N/A | +| `to` | *?string* | :heavy_minus_sign: | N/A | +| `tt` | *?string* | :heavy_minus_sign: | N/A | +| `tn` | *?string* | :heavy_minus_sign: | N/A | +| `tr` | *?string* | :heavy_minus_sign: | N/A | +| `tm` | *?string* | :heavy_minus_sign: | N/A | +| `tc` | *?string* | :heavy_minus_sign: | N/A | +| `tv` | *?string* | :heavy_minus_sign: | N/A | +| `ug` | *?string* | :heavy_minus_sign: | N/A | +| `ua` | *?string* | :heavy_minus_sign: | N/A | +| `ae` | *?string* | :heavy_minus_sign: | N/A | +| `gb` | *?string* | :heavy_minus_sign: | N/A | +| `us` | *?string* | :heavy_minus_sign: | N/A | +| `um` | *?string* | :heavy_minus_sign: | N/A | +| `uy` | *?string* | :heavy_minus_sign: | N/A | +| `uz` | *?string* | :heavy_minus_sign: | N/A | +| `vu` | *?string* | :heavy_minus_sign: | N/A | +| `ve` | *?string* | :heavy_minus_sign: | N/A | +| `vn` | *?string* | :heavy_minus_sign: | N/A | +| `vg` | *?string* | :heavy_minus_sign: | N/A | +| `vi` | *?string* | :heavy_minus_sign: | N/A | +| `wf` | *?string* | :heavy_minus_sign: | N/A | +| `eh` | *?string* | :heavy_minus_sign: | N/A | +| `ye` | *?string* | :heavy_minus_sign: | N/A | +| `zm` | *?string* | :heavy_minus_sign: | N/A | +| `zw` | *?string* | :heavy_minus_sign: | N/A | +| `ax` | *?string* | :heavy_minus_sign: | N/A | +| `bq` | *?string* | :heavy_minus_sign: | N/A | +| `cw` | *?string* | :heavy_minus_sign: | N/A | +| `gg` | *?string* | :heavy_minus_sign: | N/A | +| `im` | *?string* | :heavy_minus_sign: | N/A | +| `je` | *?string* | :heavy_minus_sign: | N/A | +| `me` | *?string* | :heavy_minus_sign: | N/A | +| `bl` | *?string* | :heavy_minus_sign: | N/A | +| `mf` | *?string* | :heavy_minus_sign: | N/A | +| `rs` | *?string* | :heavy_minus_sign: | N/A | +| `sx` | *?string* | :heavy_minus_sign: | N/A | +| `ss` | *?string* | :heavy_minus_sign: | N/A | +| `xk` | *?string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/LeadEventLink.md b/docs/Models/Components/LeadEventLink.md new file mode 100644 index 0000000..fa9417d --- /dev/null +++ b/docs/Models/Components/LeadEventLink.md @@ -0,0 +1,51 @@ +# LeadEventLink + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique ID of the short link. | +| `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: | N/A | +| `expiresAt` | *string* | :heavy_check_mark: | N/A | +| `webhookIds` | array<*string*> | :heavy_check_mark: | The IDs of the webhooks that the short link is associated with. | +| `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. | +| `lastClicked` | *string* | :heavy_check_mark: | N/A | +| `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. | +| `trackConversion` | *?bool* | :heavy_minus_sign: | N/A | +| `externalId` | *string* | :heavy_check_mark: | The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. | +| `tenantId` | *string* | :heavy_check_mark: | The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. | +| `archived` | *?bool* | :heavy_minus_sign: | N/A | +| `expiredUrl` | *string* | :heavy_check_mark: | N/A | +| `password` | *string* | :heavy_check_mark: | The password required to access the destination URL of the short link. | +| `proxy` | *?bool* | :heavy_minus_sign: | N/A | +| `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: | N/A | +| `doIndex` | *?bool* | :heavy_minus_sign: | N/A | +| `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\LeadEventGeo](../../Models/Components/LeadEventGeo.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: | N/A | +| ~~`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. | +| `utmSource` | *string* | :heavy_check_mark: | The UTM source of the short link. | +| `utmMedium` | *string* | :heavy_check_mark: | The UTM medium of the short link. | +| `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 | +| `clicks` | *?float* | :heavy_minus_sign: | The number of clicks on the short link. | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads the short links has generated. | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales the short links has generated. | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total dollar amount of sales the short links has generated (in cents). | +| `programId` | *string* | :heavy_check_mark: | The ID of the program the short link is associated with. | \ No newline at end of file diff --git a/docs/Models/Components/PaymentProcessor.md b/docs/Models/Components/PaymentProcessor.md new file mode 100644 index 0000000..26ca8cf --- /dev/null +++ b/docs/Models/Components/PaymentProcessor.md @@ -0,0 +1,12 @@ +# PaymentProcessor + +The payment processor via which the sale was made. + + +## Values + +| Name | Value | +| --------- | --------- | +| `Stripe` | stripe | +| `Shopify` | shopify | +| `Paddle` | paddle | \ No newline at end of file diff --git a/docs/Models/Components/Sale.md b/docs/Models/Components/Sale.md index db774b2..cd80c49 100644 --- a/docs/Models/Components/Sale.md +++ b/docs/Models/Components/Sale.md @@ -3,9 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `amount` | *float* | :heavy_check_mark: | N/A | -| `currency` | *string* | :heavy_check_mark: | N/A | -| `paymentProcessor` | *string* | :heavy_check_mark: | N/A | -| `invoiceId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `amount` | *int* | :heavy_check_mark: | The amount of the sale. Should be passed in cents. | +| `paymentProcessor` | [Components\PaymentProcessor](../../Models/Components/PaymentProcessor.md) | :heavy_check_mark: | The payment processor via which the sale was made. | +| `invoiceId` | *?string* | :heavy_minus_sign: | The invoice ID of the sale. | \ No newline at end of file diff --git a/docs/Models/Components/SaleCreatedEventData.md b/docs/Models/Components/SaleCreatedEventData.md index 9690364..0f0f36a 100644 --- a/docs/Models/Components/SaleCreatedEventData.md +++ b/docs/Models/Components/SaleCreatedEventData.md @@ -9,4 +9,4 @@ | `customer` | [Components\SaleCreatedEventCustomer](../../Models/Components/SaleCreatedEventCustomer.md) | :heavy_check_mark: | N/A | | `click` | [Components\SaleCreatedEventClick](../../Models/Components/SaleCreatedEventClick.md) | :heavy_check_mark: | N/A | | `link` | [Components\SaleCreatedEventLink](../../Models/Components/SaleCreatedEventLink.md) | :heavy_check_mark: | N/A | -| `sale` | [Components\Sale](../../Models/Components/Sale.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `sale` | [Components\SaleCreatedEventSale](../../Models/Components/SaleCreatedEventSale.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/SaleCreatedEventSale.md b/docs/Models/Components/SaleCreatedEventSale.md new file mode 100644 index 0000000..8973d13 --- /dev/null +++ b/docs/Models/Components/SaleCreatedEventSale.md @@ -0,0 +1,11 @@ +# SaleCreatedEventSale + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `amount` | *float* | :heavy_check_mark: | N/A | +| `currency` | *string* | :heavy_check_mark: | N/A | +| `paymentProcessor` | *string* | :heavy_check_mark: | N/A | +| `invoiceId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/SaleEvent.md b/docs/Models/Components/SaleEvent.md new file mode 100644 index 0000000..d027947 --- /dev/null +++ b/docs/Models/Components/SaleEvent.md @@ -0,0 +1,31 @@ +# SaleEvent + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `event` | [Components\SaleEventEvent](../../Models/Components/SaleEventEvent.md) | :heavy_check_mark: | N/A | +| `eventId` | *string* | :heavy_check_mark: | N/A | +| `eventName` | *string* | :heavy_check_mark: | N/A | +| `link` | [Components\SaleEventLink](../../Models/Components/SaleEventLink.md) | :heavy_check_mark: | N/A | +| `click` | [Components\SaleEventClick](../../Models/Components/SaleEventClick.md) | :heavy_check_mark: | N/A | +| `customer` | [Components\SaleEventCustomer](../../Models/Components/SaleEventCustomer.md) | :heavy_check_mark: | N/A | +| `sale` | [Components\Sale](../../Models/Components/Sale.md) | :heavy_check_mark: | N/A | +| ~~`saleAmount`~~ | *float* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `sale.amount` instead. | +| ~~`invoiceId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `sale.invoiceId` instead. | +| `paymentProcessor` | *string* | :heavy_check_mark: | Deprecated. Use `sale.paymentProcessor` instead. | +| ~~`clickId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `click.id` instead. | +| ~~`linkId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `link.id` instead. | +| ~~`domain`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `link.domain` instead. | +| ~~`key`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `link.key` instead. | +| ~~`url`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `click.url` instead. | +| ~~`continent`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `click.continent` instead. | +| ~~`country`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `click.country` instead. | +| ~~`city`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `click.city` instead. | +| ~~`device`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `click.device` instead. | +| ~~`browser`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `click.browser` instead. | +| ~~`os`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `click.os` instead. | +| ~~`qr`~~ | *float* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `click.qr` instead. | +| ~~`ip`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use `click.ip` instead. | +| `timestamp` | *?string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/SaleEventClick.md b/docs/Models/Components/SaleEventClick.md new file mode 100644 index 0000000..40f92c0 --- /dev/null +++ b/docs/Models/Components/SaleEventClick.md @@ -0,0 +1,20 @@ +# SaleEventClick + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `url` | *string* | :heavy_check_mark: | N/A | +| `country` | *string* | :heavy_check_mark: | N/A | +| `city` | *string* | :heavy_check_mark: | N/A | +| `region` | *string* | :heavy_check_mark: | N/A | +| `continent` | *string* | :heavy_check_mark: | N/A | +| `device` | *string* | :heavy_check_mark: | N/A | +| `browser` | *string* | :heavy_check_mark: | N/A | +| `os` | *string* | :heavy_check_mark: | N/A | +| `referer` | *string* | :heavy_check_mark: | N/A | +| `refererUrl` | *string* | :heavy_check_mark: | N/A | +| `ip` | *string* | :heavy_check_mark: | N/A | +| `qr` | *?bool* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/SaleEventCustomer.md b/docs/Models/Components/SaleEventCustomer.md new file mode 100644 index 0000000..2262991 --- /dev/null +++ b/docs/Models/Components/SaleEventCustomer.md @@ -0,0 +1,17 @@ +# SaleEventCustomer + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique identifier of the customer in Dub. | +| `externalId` | *string* | :heavy_check_mark: | Unique identifier for the customer in the client's app. | +| `name` | *string* | :heavy_check_mark: | Name of the customer. | +| `createdAt` | *string* | :heavy_check_mark: | The date the customer was created. | +| `email` | *?string* | :heavy_minus_sign: | Email of the customer. | +| `avatar` | *?string* | :heavy_minus_sign: | Avatar URL of the customer. | +| `country` | *?string* | :heavy_minus_sign: | Country of the customer. | +| `link` | [?Components\SaleEventCustomerLink](../../Models/Components/SaleEventCustomerLink.md) | :heavy_minus_sign: | N/A | +| `partner` | [?Components\SaleEventPartner](../../Models/Components/SaleEventPartner.md) | :heavy_minus_sign: | N/A | +| `discount` | [?Components\SaleEventDiscount](../../Models/Components/SaleEventDiscount.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/SaleEventCustomerLink.md b/docs/Models/Components/SaleEventCustomerLink.md new file mode 100644 index 0000000..a3a4eba --- /dev/null +++ b/docs/Models/Components/SaleEventCustomerLink.md @@ -0,0 +1,12 @@ +# SaleEventCustomerLink + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique ID of the short link. | +| `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. | +| `shortLink` | *string* | :heavy_check_mark: | The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). | +| `programId` | *string* | :heavy_check_mark: | The ID of the program the short link is associated with. | \ No newline at end of file diff --git a/docs/Models/Components/SaleEventDiscount.md b/docs/Models/Components/SaleEventDiscount.md new file mode 100644 index 0000000..52b9728 --- /dev/null +++ b/docs/Models/Components/SaleEventDiscount.md @@ -0,0 +1,14 @@ +# SaleEventDiscount + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `amount` | *float* | :heavy_check_mark: | N/A | +| `type` | [Components\SaleEventType](../../Models/Components/SaleEventType.md) | :heavy_check_mark: | N/A | +| `couponId` | *string* | :heavy_check_mark: | N/A | +| `couponTestId` | *string* | :heavy_check_mark: | N/A | +| `duration` | *float* | :heavy_check_mark: | N/A | +| `interval` | [Components\SaleEventInterval](../../Models/Components/SaleEventInterval.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/SaleEventEvent.md b/docs/Models/Components/SaleEventEvent.md new file mode 100644 index 0000000..80d463a --- /dev/null +++ b/docs/Models/Components/SaleEventEvent.md @@ -0,0 +1,8 @@ +# SaleEventEvent + + +## Values + +| Name | Value | +| ------ | ------ | +| `Sale` | sale | \ No newline at end of file diff --git a/docs/Models/Components/SaleEventGeo.md b/docs/Models/Components/SaleEventGeo.md new file mode 100644 index 0000000..9f4abaa --- /dev/null +++ b/docs/Models/Components/SaleEventGeo.md @@ -0,0 +1,259 @@ +# SaleEventGeo + +Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `af` | *?string* | :heavy_minus_sign: | N/A | +| `al` | *?string* | :heavy_minus_sign: | N/A | +| `dz` | *?string* | :heavy_minus_sign: | N/A | +| `as` | *?string* | :heavy_minus_sign: | N/A | +| `ad` | *?string* | :heavy_minus_sign: | N/A | +| `ao` | *?string* | :heavy_minus_sign: | N/A | +| `ai` | *?string* | :heavy_minus_sign: | N/A | +| `aq` | *?string* | :heavy_minus_sign: | N/A | +| `ag` | *?string* | :heavy_minus_sign: | N/A | +| `ar` | *?string* | :heavy_minus_sign: | N/A | +| `am` | *?string* | :heavy_minus_sign: | N/A | +| `aw` | *?string* | :heavy_minus_sign: | N/A | +| `au` | *?string* | :heavy_minus_sign: | N/A | +| `at` | *?string* | :heavy_minus_sign: | N/A | +| `az` | *?string* | :heavy_minus_sign: | N/A | +| `bs` | *?string* | :heavy_minus_sign: | N/A | +| `bh` | *?string* | :heavy_minus_sign: | N/A | +| `bd` | *?string* | :heavy_minus_sign: | N/A | +| `bb` | *?string* | :heavy_minus_sign: | N/A | +| `by` | *?string* | :heavy_minus_sign: | N/A | +| `be` | *?string* | :heavy_minus_sign: | N/A | +| `bz` | *?string* | :heavy_minus_sign: | N/A | +| `bj` | *?string* | :heavy_minus_sign: | N/A | +| `bm` | *?string* | :heavy_minus_sign: | N/A | +| `bt` | *?string* | :heavy_minus_sign: | N/A | +| `bo` | *?string* | :heavy_minus_sign: | N/A | +| `ba` | *?string* | :heavy_minus_sign: | N/A | +| `bw` | *?string* | :heavy_minus_sign: | N/A | +| `bv` | *?string* | :heavy_minus_sign: | N/A | +| `br` | *?string* | :heavy_minus_sign: | N/A | +| `io` | *?string* | :heavy_minus_sign: | N/A | +| `bn` | *?string* | :heavy_minus_sign: | N/A | +| `bg` | *?string* | :heavy_minus_sign: | N/A | +| `bf` | *?string* | :heavy_minus_sign: | N/A | +| `bi` | *?string* | :heavy_minus_sign: | N/A | +| `kh` | *?string* | :heavy_minus_sign: | N/A | +| `cm` | *?string* | :heavy_minus_sign: | N/A | +| `ca` | *?string* | :heavy_minus_sign: | N/A | +| `cv` | *?string* | :heavy_minus_sign: | N/A | +| `ky` | *?string* | :heavy_minus_sign: | N/A | +| `cf` | *?string* | :heavy_minus_sign: | N/A | +| `td` | *?string* | :heavy_minus_sign: | N/A | +| `cl` | *?string* | :heavy_minus_sign: | N/A | +| `cn` | *?string* | :heavy_minus_sign: | N/A | +| `cx` | *?string* | :heavy_minus_sign: | N/A | +| `cc` | *?string* | :heavy_minus_sign: | N/A | +| `co` | *?string* | :heavy_minus_sign: | N/A | +| `km` | *?string* | :heavy_minus_sign: | N/A | +| `cg` | *?string* | :heavy_minus_sign: | N/A | +| `cd` | *?string* | :heavy_minus_sign: | N/A | +| `ck` | *?string* | :heavy_minus_sign: | N/A | +| `cr` | *?string* | :heavy_minus_sign: | N/A | +| `ci` | *?string* | :heavy_minus_sign: | N/A | +| `hr` | *?string* | :heavy_minus_sign: | N/A | +| `cu` | *?string* | :heavy_minus_sign: | N/A | +| `cy` | *?string* | :heavy_minus_sign: | N/A | +| `cz` | *?string* | :heavy_minus_sign: | N/A | +| `dk` | *?string* | :heavy_minus_sign: | N/A | +| `dj` | *?string* | :heavy_minus_sign: | N/A | +| `dm` | *?string* | :heavy_minus_sign: | N/A | +| `do` | *?string* | :heavy_minus_sign: | N/A | +| `ec` | *?string* | :heavy_minus_sign: | N/A | +| `eg` | *?string* | :heavy_minus_sign: | N/A | +| `sv` | *?string* | :heavy_minus_sign: | N/A | +| `gq` | *?string* | :heavy_minus_sign: | N/A | +| `er` | *?string* | :heavy_minus_sign: | N/A | +| `ee` | *?string* | :heavy_minus_sign: | N/A | +| `et` | *?string* | :heavy_minus_sign: | N/A | +| `fk` | *?string* | :heavy_minus_sign: | N/A | +| `fo` | *?string* | :heavy_minus_sign: | N/A | +| `fj` | *?string* | :heavy_minus_sign: | N/A | +| `fi` | *?string* | :heavy_minus_sign: | N/A | +| `fr` | *?string* | :heavy_minus_sign: | N/A | +| `gf` | *?string* | :heavy_minus_sign: | N/A | +| `pf` | *?string* | :heavy_minus_sign: | N/A | +| `tf` | *?string* | :heavy_minus_sign: | N/A | +| `ga` | *?string* | :heavy_minus_sign: | N/A | +| `gm` | *?string* | :heavy_minus_sign: | N/A | +| `ge` | *?string* | :heavy_minus_sign: | N/A | +| `de` | *?string* | :heavy_minus_sign: | N/A | +| `gh` | *?string* | :heavy_minus_sign: | N/A | +| `gi` | *?string* | :heavy_minus_sign: | N/A | +| `gr` | *?string* | :heavy_minus_sign: | N/A | +| `gl` | *?string* | :heavy_minus_sign: | N/A | +| `gd` | *?string* | :heavy_minus_sign: | N/A | +| `gp` | *?string* | :heavy_minus_sign: | N/A | +| `gu` | *?string* | :heavy_minus_sign: | N/A | +| `gt` | *?string* | :heavy_minus_sign: | N/A | +| `gn` | *?string* | :heavy_minus_sign: | N/A | +| `gw` | *?string* | :heavy_minus_sign: | N/A | +| `gy` | *?string* | :heavy_minus_sign: | N/A | +| `ht` | *?string* | :heavy_minus_sign: | N/A | +| `hm` | *?string* | :heavy_minus_sign: | N/A | +| `va` | *?string* | :heavy_minus_sign: | N/A | +| `hn` | *?string* | :heavy_minus_sign: | N/A | +| `hk` | *?string* | :heavy_minus_sign: | N/A | +| `hu` | *?string* | :heavy_minus_sign: | N/A | +| `is` | *?string* | :heavy_minus_sign: | N/A | +| `in` | *?string* | :heavy_minus_sign: | N/A | +| `id` | *?string* | :heavy_minus_sign: | N/A | +| `ir` | *?string* | :heavy_minus_sign: | N/A | +| `iq` | *?string* | :heavy_minus_sign: | N/A | +| `ie` | *?string* | :heavy_minus_sign: | N/A | +| `il` | *?string* | :heavy_minus_sign: | N/A | +| `it` | *?string* | :heavy_minus_sign: | N/A | +| `jm` | *?string* | :heavy_minus_sign: | N/A | +| `jp` | *?string* | :heavy_minus_sign: | N/A | +| `jo` | *?string* | :heavy_minus_sign: | N/A | +| `kz` | *?string* | :heavy_minus_sign: | N/A | +| `ke` | *?string* | :heavy_minus_sign: | N/A | +| `ki` | *?string* | :heavy_minus_sign: | N/A | +| `kp` | *?string* | :heavy_minus_sign: | N/A | +| `kr` | *?string* | :heavy_minus_sign: | N/A | +| `kw` | *?string* | :heavy_minus_sign: | N/A | +| `kg` | *?string* | :heavy_minus_sign: | N/A | +| `la` | *?string* | :heavy_minus_sign: | N/A | +| `lv` | *?string* | :heavy_minus_sign: | N/A | +| `lb` | *?string* | :heavy_minus_sign: | N/A | +| `ls` | *?string* | :heavy_minus_sign: | N/A | +| `lr` | *?string* | :heavy_minus_sign: | N/A | +| `ly` | *?string* | :heavy_minus_sign: | N/A | +| `li` | *?string* | :heavy_minus_sign: | N/A | +| `lt` | *?string* | :heavy_minus_sign: | N/A | +| `lu` | *?string* | :heavy_minus_sign: | N/A | +| `mo` | *?string* | :heavy_minus_sign: | N/A | +| `mg` | *?string* | :heavy_minus_sign: | N/A | +| `mw` | *?string* | :heavy_minus_sign: | N/A | +| `my` | *?string* | :heavy_minus_sign: | N/A | +| `mv` | *?string* | :heavy_minus_sign: | N/A | +| `ml` | *?string* | :heavy_minus_sign: | N/A | +| `mt` | *?string* | :heavy_minus_sign: | N/A | +| `mh` | *?string* | :heavy_minus_sign: | N/A | +| `mq` | *?string* | :heavy_minus_sign: | N/A | +| `mr` | *?string* | :heavy_minus_sign: | N/A | +| `mu` | *?string* | :heavy_minus_sign: | N/A | +| `yt` | *?string* | :heavy_minus_sign: | N/A | +| `mx` | *?string* | :heavy_minus_sign: | N/A | +| `fm` | *?string* | :heavy_minus_sign: | N/A | +| `md` | *?string* | :heavy_minus_sign: | N/A | +| `mc` | *?string* | :heavy_minus_sign: | N/A | +| `mn` | *?string* | :heavy_minus_sign: | N/A | +| `ms` | *?string* | :heavy_minus_sign: | N/A | +| `ma` | *?string* | :heavy_minus_sign: | N/A | +| `mz` | *?string* | :heavy_minus_sign: | N/A | +| `mm` | *?string* | :heavy_minus_sign: | N/A | +| `na` | *?string* | :heavy_minus_sign: | N/A | +| `nr` | *?string* | :heavy_minus_sign: | N/A | +| `np` | *?string* | :heavy_minus_sign: | N/A | +| `nl` | *?string* | :heavy_minus_sign: | N/A | +| `nc` | *?string* | :heavy_minus_sign: | N/A | +| `nz` | *?string* | :heavy_minus_sign: | N/A | +| `ni` | *?string* | :heavy_minus_sign: | N/A | +| `ne` | *?string* | :heavy_minus_sign: | N/A | +| `ng` | *?string* | :heavy_minus_sign: | N/A | +| `nu` | *?string* | :heavy_minus_sign: | N/A | +| `nf` | *?string* | :heavy_minus_sign: | N/A | +| `mk` | *?string* | :heavy_minus_sign: | N/A | +| `mp` | *?string* | :heavy_minus_sign: | N/A | +| `no` | *?string* | :heavy_minus_sign: | N/A | +| `om` | *?string* | :heavy_minus_sign: | N/A | +| `pk` | *?string* | :heavy_minus_sign: | N/A | +| `pw` | *?string* | :heavy_minus_sign: | N/A | +| `ps` | *?string* | :heavy_minus_sign: | N/A | +| `pa` | *?string* | :heavy_minus_sign: | N/A | +| `pg` | *?string* | :heavy_minus_sign: | N/A | +| `py` | *?string* | :heavy_minus_sign: | N/A | +| `pe` | *?string* | :heavy_minus_sign: | N/A | +| `ph` | *?string* | :heavy_minus_sign: | N/A | +| `pn` | *?string* | :heavy_minus_sign: | N/A | +| `pl` | *?string* | :heavy_minus_sign: | N/A | +| `pt` | *?string* | :heavy_minus_sign: | N/A | +| `pr` | *?string* | :heavy_minus_sign: | N/A | +| `qa` | *?string* | :heavy_minus_sign: | N/A | +| `re` | *?string* | :heavy_minus_sign: | N/A | +| `ro` | *?string* | :heavy_minus_sign: | N/A | +| `ru` | *?string* | :heavy_minus_sign: | N/A | +| `rw` | *?string* | :heavy_minus_sign: | N/A | +| `sh` | *?string* | :heavy_minus_sign: | N/A | +| `kn` | *?string* | :heavy_minus_sign: | N/A | +| `lc` | *?string* | :heavy_minus_sign: | N/A | +| `pm` | *?string* | :heavy_minus_sign: | N/A | +| `vc` | *?string* | :heavy_minus_sign: | N/A | +| `ws` | *?string* | :heavy_minus_sign: | N/A | +| `sm` | *?string* | :heavy_minus_sign: | N/A | +| `st` | *?string* | :heavy_minus_sign: | N/A | +| `sa` | *?string* | :heavy_minus_sign: | N/A | +| `sn` | *?string* | :heavy_minus_sign: | N/A | +| `sc` | *?string* | :heavy_minus_sign: | N/A | +| `sl` | *?string* | :heavy_minus_sign: | N/A | +| `sg` | *?string* | :heavy_minus_sign: | N/A | +| `sk` | *?string* | :heavy_minus_sign: | N/A | +| `si` | *?string* | :heavy_minus_sign: | N/A | +| `sb` | *?string* | :heavy_minus_sign: | N/A | +| `so` | *?string* | :heavy_minus_sign: | N/A | +| `za` | *?string* | :heavy_minus_sign: | N/A | +| `gs` | *?string* | :heavy_minus_sign: | N/A | +| `es` | *?string* | :heavy_minus_sign: | N/A | +| `lk` | *?string* | :heavy_minus_sign: | N/A | +| `sd` | *?string* | :heavy_minus_sign: | N/A | +| `sr` | *?string* | :heavy_minus_sign: | N/A | +| `sj` | *?string* | :heavy_minus_sign: | N/A | +| `sz` | *?string* | :heavy_minus_sign: | N/A | +| `se` | *?string* | :heavy_minus_sign: | N/A | +| `ch` | *?string* | :heavy_minus_sign: | N/A | +| `sy` | *?string* | :heavy_minus_sign: | N/A | +| `tw` | *?string* | :heavy_minus_sign: | N/A | +| `tj` | *?string* | :heavy_minus_sign: | N/A | +| `tz` | *?string* | :heavy_minus_sign: | N/A | +| `th` | *?string* | :heavy_minus_sign: | N/A | +| `tl` | *?string* | :heavy_minus_sign: | N/A | +| `tg` | *?string* | :heavy_minus_sign: | N/A | +| `tk` | *?string* | :heavy_minus_sign: | N/A | +| `to` | *?string* | :heavy_minus_sign: | N/A | +| `tt` | *?string* | :heavy_minus_sign: | N/A | +| `tn` | *?string* | :heavy_minus_sign: | N/A | +| `tr` | *?string* | :heavy_minus_sign: | N/A | +| `tm` | *?string* | :heavy_minus_sign: | N/A | +| `tc` | *?string* | :heavy_minus_sign: | N/A | +| `tv` | *?string* | :heavy_minus_sign: | N/A | +| `ug` | *?string* | :heavy_minus_sign: | N/A | +| `ua` | *?string* | :heavy_minus_sign: | N/A | +| `ae` | *?string* | :heavy_minus_sign: | N/A | +| `gb` | *?string* | :heavy_minus_sign: | N/A | +| `us` | *?string* | :heavy_minus_sign: | N/A | +| `um` | *?string* | :heavy_minus_sign: | N/A | +| `uy` | *?string* | :heavy_minus_sign: | N/A | +| `uz` | *?string* | :heavy_minus_sign: | N/A | +| `vu` | *?string* | :heavy_minus_sign: | N/A | +| `ve` | *?string* | :heavy_minus_sign: | N/A | +| `vn` | *?string* | :heavy_minus_sign: | N/A | +| `vg` | *?string* | :heavy_minus_sign: | N/A | +| `vi` | *?string* | :heavy_minus_sign: | N/A | +| `wf` | *?string* | :heavy_minus_sign: | N/A | +| `eh` | *?string* | :heavy_minus_sign: | N/A | +| `ye` | *?string* | :heavy_minus_sign: | N/A | +| `zm` | *?string* | :heavy_minus_sign: | N/A | +| `zw` | *?string* | :heavy_minus_sign: | N/A | +| `ax` | *?string* | :heavy_minus_sign: | N/A | +| `bq` | *?string* | :heavy_minus_sign: | N/A | +| `cw` | *?string* | :heavy_minus_sign: | N/A | +| `gg` | *?string* | :heavy_minus_sign: | N/A | +| `im` | *?string* | :heavy_minus_sign: | N/A | +| `je` | *?string* | :heavy_minus_sign: | N/A | +| `me` | *?string* | :heavy_minus_sign: | N/A | +| `bl` | *?string* | :heavy_minus_sign: | N/A | +| `mf` | *?string* | :heavy_minus_sign: | N/A | +| `rs` | *?string* | :heavy_minus_sign: | N/A | +| `sx` | *?string* | :heavy_minus_sign: | N/A | +| `ss` | *?string* | :heavy_minus_sign: | N/A | +| `xk` | *?string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/SaleEventInterval.md b/docs/Models/Components/SaleEventInterval.md new file mode 100644 index 0000000..a0f34e4 --- /dev/null +++ b/docs/Models/Components/SaleEventInterval.md @@ -0,0 +1,9 @@ +# SaleEventInterval + + +## Values + +| Name | Value | +| ------- | ------- | +| `Month` | month | +| `Year` | year | \ No newline at end of file diff --git a/docs/Models/Components/SaleEventLink.md b/docs/Models/Components/SaleEventLink.md new file mode 100644 index 0000000..e1cff10 --- /dev/null +++ b/docs/Models/Components/SaleEventLink.md @@ -0,0 +1,51 @@ +# SaleEventLink + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique ID of the short link. | +| `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: | N/A | +| `expiresAt` | *string* | :heavy_check_mark: | N/A | +| `webhookIds` | array<*string*> | :heavy_check_mark: | The IDs of the webhooks that the short link is associated with. | +| `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. | +| `lastClicked` | *string* | :heavy_check_mark: | N/A | +| `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. | +| `trackConversion` | *?bool* | :heavy_minus_sign: | N/A | +| `externalId` | *string* | :heavy_check_mark: | The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. | +| `tenantId` | *string* | :heavy_check_mark: | The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. | +| `archived` | *?bool* | :heavy_minus_sign: | N/A | +| `expiredUrl` | *string* | :heavy_check_mark: | N/A | +| `password` | *string* | :heavy_check_mark: | The password required to access the destination URL of the short link. | +| `proxy` | *?bool* | :heavy_minus_sign: | N/A | +| `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: | N/A | +| `doIndex` | *?bool* | :heavy_minus_sign: | N/A | +| `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\SaleEventGeo](../../Models/Components/SaleEventGeo.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: | N/A | +| ~~`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. | +| `utmSource` | *string* | :heavy_check_mark: | The UTM source of the short link. | +| `utmMedium` | *string* | :heavy_check_mark: | The UTM medium of the short link. | +| `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 | +| `clicks` | *?float* | :heavy_minus_sign: | The number of clicks on the short link. | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads the short links has generated. | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales the short links has generated. | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total dollar amount of sales the short links has generated (in cents). | +| `programId` | *string* | :heavy_check_mark: | The ID of the program the short link is associated with. | \ No newline at end of file diff --git a/docs/Models/Components/SaleEventPartner.md b/docs/Models/Components/SaleEventPartner.md new file mode 100644 index 0000000..51afd86 --- /dev/null +++ b/docs/Models/Components/SaleEventPartner.md @@ -0,0 +1,11 @@ +# SaleEventPartner + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `email` | *string* | :heavy_check_mark: | N/A | +| `image` | *?string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/SaleEventType.md b/docs/Models/Components/SaleEventType.md new file mode 100644 index 0000000..7c44f5f --- /dev/null +++ b/docs/Models/Components/SaleEventType.md @@ -0,0 +1,9 @@ +# SaleEventType + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `Percentage` | percentage | +| `Flat` | flat | \ No newline at end of file diff --git a/docs/Models/Operations/Country.md b/docs/Models/Operations/Country.md new file mode 100644 index 0000000..9721bb3 --- /dev/null +++ b/docs/Models/Operations/Country.md @@ -0,0 +1,259 @@ +# Country + +Country where the partner is based. + + +## Values + +| Name | Value | +| ----- | ----- | +| `Af` | AF | +| `Al` | AL | +| `Dz` | DZ | +| `As` | AS | +| `Ad` | AD | +| `Ao` | AO | +| `Ai` | AI | +| `Aq` | AQ | +| `Ag` | AG | +| `Ar` | AR | +| `Am` | AM | +| `Aw` | AW | +| `Au` | AU | +| `At` | AT | +| `Az` | AZ | +| `Bs` | BS | +| `Bh` | BH | +| `Bd` | BD | +| `Bb` | BB | +| `By` | BY | +| `Be` | BE | +| `Bz` | BZ | +| `Bj` | BJ | +| `Bm` | BM | +| `Bt` | BT | +| `Bo` | BO | +| `Ba` | BA | +| `Bw` | BW | +| `Bv` | BV | +| `Br` | BR | +| `Io` | IO | +| `Bn` | BN | +| `Bg` | BG | +| `Bf` | BF | +| `Bi` | BI | +| `Kh` | KH | +| `Cm` | CM | +| `Ca` | CA | +| `Cv` | CV | +| `Ky` | KY | +| `Cf` | CF | +| `Td` | TD | +| `Cl` | CL | +| `Cn` | CN | +| `Cx` | CX | +| `Cc` | CC | +| `Co` | CO | +| `Km` | KM | +| `Cg` | CG | +| `Cd` | CD | +| `Ck` | CK | +| `Cr` | CR | +| `Ci` | CI | +| `Hr` | HR | +| `Cu` | CU | +| `Cy` | CY | +| `Cz` | CZ | +| `Dk` | DK | +| `Dj` | DJ | +| `Dm` | DM | +| `Do` | DO | +| `Ec` | EC | +| `Eg` | EG | +| `Sv` | SV | +| `Gq` | GQ | +| `Er` | ER | +| `Ee` | EE | +| `Et` | ET | +| `Fk` | FK | +| `Fo` | FO | +| `Fj` | FJ | +| `Fi` | FI | +| `Fr` | FR | +| `Gf` | GF | +| `Pf` | PF | +| `Tf` | TF | +| `Ga` | GA | +| `Gm` | GM | +| `Ge` | GE | +| `De` | DE | +| `Gh` | GH | +| `Gi` | GI | +| `Gr` | GR | +| `Gl` | GL | +| `Gd` | GD | +| `Gp` | GP | +| `Gu` | GU | +| `Gt` | GT | +| `Gn` | GN | +| `Gw` | GW | +| `Gy` | GY | +| `Ht` | HT | +| `Hm` | HM | +| `Va` | VA | +| `Hn` | HN | +| `Hk` | HK | +| `Hu` | HU | +| `Is` | IS | +| `In` | IN | +| `Id` | ID | +| `Ir` | IR | +| `Iq` | IQ | +| `Ie` | IE | +| `Il` | IL | +| `It` | IT | +| `Jm` | JM | +| `Jp` | JP | +| `Jo` | JO | +| `Kz` | KZ | +| `Ke` | KE | +| `Ki` | KI | +| `Kp` | KP | +| `Kr` | KR | +| `Kw` | KW | +| `Kg` | KG | +| `La` | LA | +| `Lv` | LV | +| `Lb` | LB | +| `Ls` | LS | +| `Lr` | LR | +| `Ly` | LY | +| `Li` | LI | +| `Lt` | LT | +| `Lu` | LU | +| `Mo` | MO | +| `Mg` | MG | +| `Mw` | MW | +| `My` | MY | +| `Mv` | MV | +| `Ml` | ML | +| `Mt` | MT | +| `Mh` | MH | +| `Mq` | MQ | +| `Mr` | MR | +| `Mu` | MU | +| `Yt` | YT | +| `Mx` | MX | +| `Fm` | FM | +| `Md` | MD | +| `Mc` | MC | +| `Mn` | MN | +| `Ms` | MS | +| `Ma` | MA | +| `Mz` | MZ | +| `Mm` | MM | +| `Na` | NA | +| `Nr` | NR | +| `Np` | NP | +| `Nl` | NL | +| `Nc` | NC | +| `Nz` | NZ | +| `Ni` | NI | +| `Ne` | NE | +| `Ng` | NG | +| `Nu` | NU | +| `Nf` | NF | +| `Mk` | MK | +| `Mp` | MP | +| `No` | NO | +| `Om` | OM | +| `Pk` | PK | +| `Pw` | PW | +| `Ps` | PS | +| `Pa` | PA | +| `Pg` | PG | +| `Py` | PY | +| `Pe` | PE | +| `Ph` | PH | +| `Pn` | PN | +| `Pl` | PL | +| `Pt` | PT | +| `Pr` | PR | +| `Qa` | QA | +| `Re` | RE | +| `Ro` | RO | +| `Ru` | RU | +| `Rw` | RW | +| `Sh` | SH | +| `Kn` | KN | +| `Lc` | LC | +| `Pm` | PM | +| `Vc` | VC | +| `Ws` | WS | +| `Sm` | SM | +| `St` | ST | +| `Sa` | SA | +| `Sn` | SN | +| `Sc` | SC | +| `Sl` | SL | +| `Sg` | SG | +| `Sk` | SK | +| `Si` | SI | +| `Sb` | SB | +| `So` | SO | +| `Za` | ZA | +| `Gs` | GS | +| `Es` | ES | +| `Lk` | LK | +| `Sd` | SD | +| `Sr` | SR | +| `Sj` | SJ | +| `Sz` | SZ | +| `Se` | SE | +| `Ch` | CH | +| `Sy` | SY | +| `Tw` | TW | +| `Tj` | TJ | +| `Tz` | TZ | +| `Th` | TH | +| `Tl` | TL | +| `Tg` | TG | +| `Tk` | TK | +| `To` | TO | +| `Tt` | TT | +| `Tn` | TN | +| `Tr` | TR | +| `Tm` | TM | +| `Tc` | TC | +| `Tv` | TV | +| `Ug` | UG | +| `Ua` | UA | +| `Ae` | AE | +| `Gb` | GB | +| `Us` | US | +| `Um` | UM | +| `Uy` | UY | +| `Uz` | UZ | +| `Vu` | VU | +| `Ve` | VE | +| `Vn` | VN | +| `Vg` | VG | +| `Vi` | VI | +| `Wf` | WF | +| `Eh` | EH | +| `Ye` | YE | +| `Zm` | ZM | +| `Zw` | ZW | +| `Ax` | AX | +| `Bq` | BQ | +| `Cw` | CW | +| `Gg` | GG | +| `Im` | IM | +| `Je` | JE | +| `Me` | ME | +| `Bl` | BL | +| `Mf` | MF | +| `Rs` | RS | +| `Sx` | SX | +| `Ss` | SS | +| `Xk` | XK | \ No newline at end of file diff --git a/docs/Models/Operations/CreatePartnerDiscount.md b/docs/Models/Operations/CreatePartnerDiscount.md new file mode 100644 index 0000000..b509534 --- /dev/null +++ b/docs/Models/Operations/CreatePartnerDiscount.md @@ -0,0 +1,14 @@ +# CreatePartnerDiscount + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `amount` | *float* | :heavy_check_mark: | N/A | +| `type` | [Operations\CreatePartnerType](../../Models/Operations/CreatePartnerType.md) | :heavy_check_mark: | N/A | +| `couponId` | *string* | :heavy_check_mark: | N/A | +| `couponTestId` | *string* | :heavy_check_mark: | N/A | +| `duration` | *float* | :heavy_check_mark: | N/A | +| `interval` | [Operations\CreatePartnerInterval](../../Models/Operations/CreatePartnerInterval.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/CreatePartnerInterval.md b/docs/Models/Operations/CreatePartnerInterval.md new file mode 100644 index 0000000..a6a2d35 --- /dev/null +++ b/docs/Models/Operations/CreatePartnerInterval.md @@ -0,0 +1,9 @@ +# CreatePartnerInterval + + +## Values + +| Name | Value | +| ------- | ------- | +| `Month` | month | +| `Year` | year | \ No newline at end of file diff --git a/docs/Models/Operations/CreatePartnerLink.md b/docs/Models/Operations/CreatePartnerLink.md new file mode 100644 index 0000000..f362ba2 --- /dev/null +++ b/docs/Models/Operations/CreatePartnerLink.md @@ -0,0 +1,16 @@ +# CreatePartnerLink + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique ID of the short link. | +| `shortLink` | *string* | :heavy_check_mark: | The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). | +| `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. | +| `clicks` | *?float* | :heavy_minus_sign: | The number of clicks on the short link. | +| `leads` | *?float* | :heavy_minus_sign: | The number of leads the short links has generated. | +| `sales` | *?float* | :heavy_minus_sign: | The number of sales the short links has generated. | +| `saleAmount` | *?float* | :heavy_minus_sign: | The total dollar amount of sales the short links has generated (in cents). | \ No newline at end of file diff --git a/docs/Models/Operations/CreatePartnerRequestBody.md b/docs/Models/Operations/CreatePartnerRequestBody.md new file mode 100644 index 0000000..fb9b38d --- /dev/null +++ b/docs/Models/Operations/CreatePartnerRequestBody.md @@ -0,0 +1,14 @@ +# CreatePartnerRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `programId` | *string* | :heavy_check_mark: | The ID of the program to create a partner for. | +| `name` | *string* | :heavy_check_mark: | Full legal name of the partner. | +| `email` | *string* | :heavy_check_mark: | Email for the partner in your system. Partners will be able to claim their profile by signing up to Dub Partners with this email. | +| `username` | *string* | :heavy_check_mark: | A unique username for the partner in your system. This will be used to create a short link for the partner using your program's default domain. | +| `image` | *?string* | :heavy_minus_sign: | Avatar image for the partner – if not provided, a default avatar will be used. | +| `country` | [?Operations\Country](../../Models/Operations/Country.md) | :heavy_minus_sign: | Country where the partner is based. | +| `description` | *?string* | :heavy_minus_sign: | A brief description of the partner and their background. | \ No newline at end of file diff --git a/docs/Models/Operations/CreatePartnerResponse.md b/docs/Models/Operations/CreatePartnerResponse.md new file mode 100644 index 0000000..1f342f1 --- /dev/null +++ b/docs/Models/Operations/CreatePartnerResponse.md @@ -0,0 +1,11 @@ +# CreatePartnerResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [?Operations\CreatePartnerResponseBody](../../Models/Operations/CreatePartnerResponseBody.md) | :heavy_minus_sign: | The created partner | \ No newline at end of file diff --git a/docs/Models/Operations/CreatePartnerResponseBody.md b/docs/Models/Operations/CreatePartnerResponseBody.md new file mode 100644 index 0000000..efc1ea9 --- /dev/null +++ b/docs/Models/Operations/CreatePartnerResponseBody.md @@ -0,0 +1,25 @@ +# CreatePartnerResponseBody + +The created partner + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `country` | *string* | :heavy_check_mark: | N/A | +| `payoutsEnabled` | *bool* | :heavy_check_mark: | N/A | +| `createdAt` | *string* | :heavy_check_mark: | N/A | +| `updatedAt` | *string* | :heavy_check_mark: | N/A | +| `status` | [Operations\Status](../../Models/Operations/Status.md) | :heavy_check_mark: | N/A | +| `earnings` | *float* | :heavy_check_mark: | N/A | +| `email` | *string* | :heavy_check_mark: | N/A | +| `image` | *string* | :heavy_check_mark: | N/A | +| `bio` | *string* | :heavy_check_mark: | N/A | +| `stripeConnectId` | *string* | :heavy_check_mark: | N/A | +| `link` | [Operations\CreatePartnerLink](../../Models/Operations/CreatePartnerLink.md) | :heavy_check_mark: | N/A | +| `commissionAmount` | *float* | :heavy_check_mark: | N/A | +| `couponId` | *?string* | :heavy_minus_sign: | N/A | +| `discount` | [?Operations\CreatePartnerDiscount](../../Models/Operations/CreatePartnerDiscount.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/CreatePartnerType.md b/docs/Models/Operations/CreatePartnerType.md new file mode 100644 index 0000000..d35dbc3 --- /dev/null +++ b/docs/Models/Operations/CreatePartnerType.md @@ -0,0 +1,9 @@ +# CreatePartnerType + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `Percentage` | percentage | +| `Flat` | flat | \ No newline at end of file diff --git a/docs/Models/Operations/ListEventsResponse.md b/docs/Models/Operations/ListEventsResponse.md index 34e3464..413e2ea 100644 --- a/docs/Models/Operations/ListEventsResponse.md +++ b/docs/Models/Operations/ListEventsResponse.md @@ -8,4 +8,4 @@ | `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `clickEvents` | array<[Components\ClickEvent](../../Models/Components/ClickEvent.md)> | :heavy_minus_sign: | A list of events | \ No newline at end of file +| `oneOf` | [?array](../../Models/Operations/ListEventsResponseBody.md) | :heavy_minus_sign: | A list of events | \ No newline at end of file diff --git a/docs/Models/Operations/ListEventsResponseBody.md b/docs/Models/Operations/ListEventsResponseBody.md new file mode 100644 index 0000000..ad052f1 --- /dev/null +++ b/docs/Models/Operations/ListEventsResponseBody.md @@ -0,0 +1,34 @@ +# ListEventsResponseBody + +A list of events + + +## Supported Types + +### `array` + +```php +/** +* @var array +*/ +array $value = /* values here */ +``` + +### `array` + +```php +/** +* @var array +*/ +array $value = /* values here */ +``` + +### `array` + +```php +/** +* @var array +*/ +array $value = /* values here */ +``` + diff --git a/docs/Models/Operations/Status.md b/docs/Models/Operations/Status.md new file mode 100644 index 0000000..7144366 --- /dev/null +++ b/docs/Models/Operations/Status.md @@ -0,0 +1,10 @@ +# Status + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `Approved` | approved | +| `Pending` | pending | +| `Rejected` | rejected | \ No newline at end of file diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md index 42b7e6b..c01fb20 100644 --- a/docs/sdks/events/README.md +++ b/docs/sdks/events/README.md @@ -41,7 +41,7 @@ $response = $sdk->events->list( request: $request ); -if ($response->clickEvents !== null) { +if ($response->oneOf !== null) { // handle response } ``` diff --git a/docs/sdks/partners/README.md b/docs/sdks/partners/README.md new file mode 100644 index 0000000..bb8f250 --- /dev/null +++ b/docs/sdks/partners/README.md @@ -0,0 +1,69 @@ +# Partners +(*partners*) + +## Overview + +### Available Operations + +* [create](#create) - Create a new partner + +## create + +Create a new partner for a program. If partner exists, automatically enrolls them. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Dub; +use Dub\Models\Operations; + +$sdk = Dub\Dub::builder() + ->setSecurity( + 'DUB_API_KEY' + ) + ->build(); + +$request = new Operations\CreatePartnerRequestBody( + programId: '', + name: '', + email: 'Loyal79@yahoo.com', + username: 'Aaliyah_Borer', +); + +$response = $sdk->partners->create( + request: $request +); + +if ($response->object !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `$request` | [Operations\CreatePartnerRequestBody](../../Models/Operations/CreatePartnerRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[?Operations\CreatePartnerResponse](../../Models/Operations/CreatePartnerResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| Errors\BadRequest | 400 | application/json | +| Errors\Unauthorized | 401 | application/json | +| Errors\Forbidden | 403 | application/json | +| Errors\NotFound | 404 | application/json | +| Errors\Conflict | 409 | application/json | +| Errors\InviteExpired | 410 | application/json | +| Errors\UnprocessableEntity | 422 | application/json | +| Errors\RateLimitExceeded | 429 | application/json | +| Errors\InternalServerError | 500 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/src/Dub.php b/src/Dub.php index 44c9a59..41a70ec 100644 --- a/src/Dub.php +++ b/src/Dub.php @@ -32,6 +32,8 @@ class Dub public Customers $customers; + public Partners $partners; + public Workspaces $workspaces; public EmbedTokens $embedTokens; @@ -63,6 +65,7 @@ public function __construct( $this->domains = new Domains($this->sdkConfiguration); $this->track = new Track($this->sdkConfiguration); $this->customers = new Customers($this->sdkConfiguration); + $this->partners = new Partners($this->sdkConfiguration); $this->workspaces = new Workspaces($this->sdkConfiguration); $this->embedTokens = new EmbedTokens($this->sdkConfiguration); $this->qrCodes = new QRCodes($this->sdkConfiguration); diff --git a/src/Events.php b/src/Events.php index c5c77b7..eec404b 100644 --- a/src/Events.php +++ b/src/Events.php @@ -88,12 +88,12 @@ public function list(?Operations\ListEventsRequest $request = null, ?Options $op $serializer = Utils\JSON::createSerializer(); $responseData = (string) $httpResponse->getBody(); - $obj = $serializer->deserialize($responseData, 'array<\Dub\Models\Components\ClickEvent>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize($responseData, 'array<\Dub\Models\Components\ClickEvent>|array<\Dub\Models\Components\LeadEvent>|array<\Dub\Models\Components\SaleEvent>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); $response = new Operations\ListEventsResponse( statusCode: $statusCode, contentType: $contentType, rawResponse: $httpResponse, - clickEvents: $obj); + oneOf: $obj); return $response; } else { diff --git a/src/Links.php b/src/Links.php index c9fa43e..372be79 100644 --- a/src/Links.php +++ b/src/Links.php @@ -89,7 +89,7 @@ public function createMany(?array $request = null, ?Options $options = null): Op $serializer = Utils\JSON::createSerializer(); $responseData = (string) $httpResponse->getBody(); - $obj = $serializer->deserialize($responseData, 'array', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize($responseData, 'array<\Dub\Models\Components\LinkSchema|\Dub\Models\Components\LinkErrorSchema>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); $response = new Operations\BulkCreateLinksResponse( statusCode: $statusCode, contentType: $contentType, diff --git a/src/Models/Components/Customer.php b/src/Models/Components/Customer.php index f5013cc..805dbdf 100644 --- a/src/Models/Components/Customer.php +++ b/src/Models/Components/Customer.php @@ -72,12 +72,12 @@ class Customer /** * - * @var ?LeadCreatedEventDataLink $link + * @var ?LeadEventCustomerLink $link */ #[\Speakeasy\Serializer\Annotation\SerializedName('link')] - #[\Speakeasy\Serializer\Annotation\Type('\Dub\Models\Components\LeadCreatedEventDataLink|null')] + #[\Speakeasy\Serializer\Annotation\Type('\Dub\Models\Components\LeadEventCustomerLink|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?LeadCreatedEventDataLink $link = null; + public ?LeadEventCustomerLink $link = null; /** * @@ -105,11 +105,11 @@ class Customer * @param ?string $email * @param ?string $avatar * @param ?string $country - * @param ?LeadCreatedEventDataLink $link + * @param ?LeadEventCustomerLink $link * @param ?Partner $partner * @param ?Discount $discount */ - public function __construct(string $id, string $externalId, string $name, string $createdAt, ?string $email = null, ?string $avatar = null, ?string $country = null, ?LeadCreatedEventDataLink $link = null, ?Partner $partner = null, ?Discount $discount = null) + public function __construct(string $id, string $externalId, string $name, string $createdAt, ?string $email = null, ?string $avatar = null, ?string $country = null, ?LeadEventCustomerLink $link = null, ?Partner $partner = null, ?Discount $discount = null) { $this->id = $id; $this->externalId = $externalId; diff --git a/src/Models/Components/LeadCreatedEventCustomer.php b/src/Models/Components/LeadCreatedEventCustomer.php new file mode 100644 index 0000000..1a34e04 --- /dev/null +++ b/src/Models/Components/LeadCreatedEventCustomer.php @@ -0,0 +1,125 @@ +id = $id; + $this->externalId = $externalId; + $this->name = $name; + $this->createdAt = $createdAt; + $this->email = $email; + $this->avatar = $avatar; + $this->country = $country; + $this->link = $link; + $this->partner = $partner; + $this->discount = $discount; + } +} \ No newline at end of file diff --git a/src/Models/Components/LeadCreatedEventData.php b/src/Models/Components/LeadCreatedEventData.php index 40cade1..fed378c 100644 --- a/src/Models/Components/LeadCreatedEventData.php +++ b/src/Models/Components/LeadCreatedEventData.php @@ -20,11 +20,11 @@ class LeadCreatedEventData /** * - * @var Customer $customer + * @var LeadCreatedEventCustomer $customer */ #[\Speakeasy\Serializer\Annotation\SerializedName('customer')] - #[\Speakeasy\Serializer\Annotation\Type('\Dub\Models\Components\Customer')] - public Customer $customer; + #[\Speakeasy\Serializer\Annotation\Type('\Dub\Models\Components\LeadCreatedEventCustomer')] + public LeadCreatedEventCustomer $customer; /** * @@ -44,11 +44,11 @@ class LeadCreatedEventData /** * @param string $eventName - * @param Customer $customer + * @param LeadCreatedEventCustomer $customer * @param LeadCreatedEventClick $click * @param LeadCreatedEventLink $link */ - public function __construct(string $eventName, Customer $customer, LeadCreatedEventClick $click, LeadCreatedEventLink $link) + public function __construct(string $eventName, LeadCreatedEventCustomer $customer, LeadCreatedEventClick $click, LeadCreatedEventLink $link) { $this->eventName = $eventName; $this->customer = $customer; diff --git a/src/Models/Components/LeadCreatedEventDiscount.php b/src/Models/Components/LeadCreatedEventDiscount.php new file mode 100644 index 0000000..7921981 --- /dev/null +++ b/src/Models/Components/LeadCreatedEventDiscount.php @@ -0,0 +1,84 @@ +id = $id; + $this->amount = $amount; + $this->type = $type; + $this->couponId = $couponId; + $this->couponTestId = $couponTestId; + $this->duration = $duration; + $this->interval = $interval; + } +} \ No newline at end of file diff --git a/src/Models/Components/LeadCreatedEventInterval.php b/src/Models/Components/LeadCreatedEventInterval.php new file mode 100644 index 0000000..c18a11e --- /dev/null +++ b/src/Models/Components/LeadCreatedEventInterval.php @@ -0,0 +1,16 @@ +id = $id; + $this->name = $name; + $this->email = $email; + $this->image = $image; + } +} \ No newline at end of file diff --git a/src/Models/Components/LeadCreatedEventType.php b/src/Models/Components/LeadCreatedEventType.php new file mode 100644 index 0000000..8827bd2 --- /dev/null +++ b/src/Models/Components/LeadCreatedEventType.php @@ -0,0 +1,16 @@ +event = $event; + $this->eventId = $eventId; + $this->eventName = $eventName; + $this->click = $click; + $this->link = $link; + $this->customer = $customer; + $this->clickId = $clickId; + $this->linkId = $linkId; + $this->domain = $domain; + $this->key = $key; + $this->url = $url; + $this->continent = $continent; + $this->country = $country; + $this->city = $city; + $this->device = $device; + $this->browser = $browser; + $this->os = $os; + $this->qr = $qr; + $this->ip = $ip; + $this->timestamp = $timestamp; + } +} \ No newline at end of file diff --git a/src/Models/Components/LeadEventClick.php b/src/Models/Components/LeadEventClick.php new file mode 100644 index 0000000..c52e940 --- /dev/null +++ b/src/Models/Components/LeadEventClick.php @@ -0,0 +1,137 @@ +id = $id; + $this->url = $url; + $this->country = $country; + $this->city = $city; + $this->region = $region; + $this->continent = $continent; + $this->device = $device; + $this->browser = $browser; + $this->os = $os; + $this->referer = $referer; + $this->refererUrl = $refererUrl; + $this->ip = $ip; + $this->qr = $qr; + } +} \ No newline at end of file diff --git a/src/Models/Components/LeadEventCustomerLink.php b/src/Models/Components/LeadEventCustomerLink.php new file mode 100644 index 0000000..d41d33c --- /dev/null +++ b/src/Models/Components/LeadEventCustomerLink.php @@ -0,0 +1,69 @@ +id = $id; + $this->domain = $domain; + $this->key = $key; + $this->shortLink = $shortLink; + $this->programId = $programId; + } +} \ No newline at end of file diff --git a/src/Models/Components/LeadEventEvent.php b/src/Models/Components/LeadEventEvent.php new file mode 100644 index 0000000..c8b686a --- /dev/null +++ b/src/Models/Components/LeadEventEvent.php @@ -0,0 +1,15 @@ +af = $af; + $this->al = $al; + $this->dz = $dz; + $this->as = $as; + $this->ad = $ad; + $this->ao = $ao; + $this->ai = $ai; + $this->aq = $aq; + $this->ag = $ag; + $this->ar = $ar; + $this->am = $am; + $this->aw = $aw; + $this->au = $au; + $this->at = $at; + $this->az = $az; + $this->bs = $bs; + $this->bh = $bh; + $this->bd = $bd; + $this->bb = $bb; + $this->by = $by; + $this->be = $be; + $this->bz = $bz; + $this->bj = $bj; + $this->bm = $bm; + $this->bt = $bt; + $this->bo = $bo; + $this->ba = $ba; + $this->bw = $bw; + $this->bv = $bv; + $this->br = $br; + $this->io = $io; + $this->bn = $bn; + $this->bg = $bg; + $this->bf = $bf; + $this->bi = $bi; + $this->kh = $kh; + $this->cm = $cm; + $this->ca = $ca; + $this->cv = $cv; + $this->ky = $ky; + $this->cf = $cf; + $this->td = $td; + $this->cl = $cl; + $this->cn = $cn; + $this->cx = $cx; + $this->cc = $cc; + $this->co = $co; + $this->km = $km; + $this->cg = $cg; + $this->cd = $cd; + $this->ck = $ck; + $this->cr = $cr; + $this->ci = $ci; + $this->hr = $hr; + $this->cu = $cu; + $this->cy = $cy; + $this->cz = $cz; + $this->dk = $dk; + $this->dj = $dj; + $this->dm = $dm; + $this->do = $do; + $this->ec = $ec; + $this->eg = $eg; + $this->sv = $sv; + $this->gq = $gq; + $this->er = $er; + $this->ee = $ee; + $this->et = $et; + $this->fk = $fk; + $this->fo = $fo; + $this->fj = $fj; + $this->fi = $fi; + $this->fr = $fr; + $this->gf = $gf; + $this->pf = $pf; + $this->tf = $tf; + $this->ga = $ga; + $this->gm = $gm; + $this->ge = $ge; + $this->de = $de; + $this->gh = $gh; + $this->gi = $gi; + $this->gr = $gr; + $this->gl = $gl; + $this->gd = $gd; + $this->gp = $gp; + $this->gu = $gu; + $this->gt = $gt; + $this->gn = $gn; + $this->gw = $gw; + $this->gy = $gy; + $this->ht = $ht; + $this->hm = $hm; + $this->va = $va; + $this->hn = $hn; + $this->hk = $hk; + $this->hu = $hu; + $this->is = $is; + $this->in = $in; + $this->id = $id; + $this->ir = $ir; + $this->iq = $iq; + $this->ie = $ie; + $this->il = $il; + $this->it = $it; + $this->jm = $jm; + $this->jp = $jp; + $this->jo = $jo; + $this->kz = $kz; + $this->ke = $ke; + $this->ki = $ki; + $this->kp = $kp; + $this->kr = $kr; + $this->kw = $kw; + $this->kg = $kg; + $this->la = $la; + $this->lv = $lv; + $this->lb = $lb; + $this->ls = $ls; + $this->lr = $lr; + $this->ly = $ly; + $this->li = $li; + $this->lt = $lt; + $this->lu = $lu; + $this->mo = $mo; + $this->mg = $mg; + $this->mw = $mw; + $this->my = $my; + $this->mv = $mv; + $this->ml = $ml; + $this->mt = $mt; + $this->mh = $mh; + $this->mq = $mq; + $this->mr = $mr; + $this->mu = $mu; + $this->yt = $yt; + $this->mx = $mx; + $this->fm = $fm; + $this->md = $md; + $this->mc = $mc; + $this->mn = $mn; + $this->ms = $ms; + $this->ma = $ma; + $this->mz = $mz; + $this->mm = $mm; + $this->na = $na; + $this->nr = $nr; + $this->np = $np; + $this->nl = $nl; + $this->nc = $nc; + $this->nz = $nz; + $this->ni = $ni; + $this->ne = $ne; + $this->ng = $ng; + $this->nu = $nu; + $this->nf = $nf; + $this->mk = $mk; + $this->mp = $mp; + $this->no = $no; + $this->om = $om; + $this->pk = $pk; + $this->pw = $pw; + $this->ps = $ps; + $this->pa = $pa; + $this->pg = $pg; + $this->py = $py; + $this->pe = $pe; + $this->ph = $ph; + $this->pn = $pn; + $this->pl = $pl; + $this->pt = $pt; + $this->pr = $pr; + $this->qa = $qa; + $this->re = $re; + $this->ro = $ro; + $this->ru = $ru; + $this->rw = $rw; + $this->sh = $sh; + $this->kn = $kn; + $this->lc = $lc; + $this->pm = $pm; + $this->vc = $vc; + $this->ws = $ws; + $this->sm = $sm; + $this->st = $st; + $this->sa = $sa; + $this->sn = $sn; + $this->sc = $sc; + $this->sl = $sl; + $this->sg = $sg; + $this->sk = $sk; + $this->si = $si; + $this->sb = $sb; + $this->so = $so; + $this->za = $za; + $this->gs = $gs; + $this->es = $es; + $this->lk = $lk; + $this->sd = $sd; + $this->sr = $sr; + $this->sj = $sj; + $this->sz = $sz; + $this->se = $se; + $this->ch = $ch; + $this->sy = $sy; + $this->tw = $tw; + $this->tj = $tj; + $this->tz = $tz; + $this->th = $th; + $this->tl = $tl; + $this->tg = $tg; + $this->tk = $tk; + $this->to = $to; + $this->tt = $tt; + $this->tn = $tn; + $this->tr = $tr; + $this->tm = $tm; + $this->tc = $tc; + $this->tv = $tv; + $this->ug = $ug; + $this->ua = $ua; + $this->ae = $ae; + $this->gb = $gb; + $this->us = $us; + $this->um = $um; + $this->uy = $uy; + $this->uz = $uz; + $this->vu = $vu; + $this->ve = $ve; + $this->vn = $vn; + $this->vg = $vg; + $this->vi = $vi; + $this->wf = $wf; + $this->eh = $eh; + $this->ye = $ye; + $this->zm = $zm; + $this->zw = $zw; + $this->ax = $ax; + $this->bq = $bq; + $this->cw = $cw; + $this->gg = $gg; + $this->im = $im; + $this->je = $je; + $this->me = $me; + $this->bl = $bl; + $this->mf = $mf; + $this->rs = $rs; + $this->sx = $sx; + $this->ss = $ss; + $this->xk = $xk; + } +} \ No newline at end of file diff --git a/src/Models/Components/LeadEventLink.php b/src/Models/Components/LeadEventLink.php new file mode 100644 index 0000000..9dfe93b --- /dev/null +++ b/src/Models/Components/LeadEventLink.php @@ -0,0 +1,461 @@ + $webhookIds + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('webhookIds')] + #[\Speakeasy\Serializer\Annotation\Type('array')] + public array $webhookIds; + + /** + * The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). + * + * @var string $shortLink + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('shortLink')] + public string $shortLink; + + /** + * The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`). + * + * @var string $qrCode + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('qrCode')] + public string $qrCode; + + /** + * The workspace ID of the short link. + * + * @var string $workspaceId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('workspaceId')] + public string $workspaceId; + + /** + * + * @var string $lastClicked + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('lastClicked')] + public string $lastClicked; + + /** + * + * @var string $createdAt + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('createdAt')] + public string $createdAt; + + /** + * + * @var string $updatedAt + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('updatedAt')] + public string $updatedAt; + + /** + * The project ID of the short link. This field is deprecated – use `workspaceId` instead. + * + * @var string $projectId + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('projectId')] + public string $projectId; + + /** + * + * @var ?bool $trackConversion + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('trackConversion')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?bool $trackConversion = null; + + /** + * The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. + * + * @var ?string $externalId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('externalId')] + public ?string $externalId; + + /** + * The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. + * + * @var ?string $tenantId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('tenantId')] + public ?string $tenantId; + + /** + * + * @var ?bool $archived + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('archived')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?bool $archived = null; + + /** + * + * @var ?string $expiredUrl + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('expiredUrl')] + public ?string $expiredUrl; + + /** + * The password required to access the destination URL of the short link. + * + * @var ?string $password + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('password')] + public ?string $password; + + /** + * + * @var ?bool $proxy + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('proxy')] + #[\Speakeasy\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. + * + * @var ?string $title + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('title')] + public ?string $title; + + /** + * The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. + * + * @var ?string $description + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('description')] + public ?string $description; + + /** + * The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. + * + * @var ?string $image + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('image')] + public ?string $image; + + /** + * 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 + * + * @var ?string $video + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('video')] + public ?string $video; + + /** + * + * @var ?bool $rewrite + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('rewrite')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?bool $rewrite = null; + + /** + * + * @var ?bool $doIndex + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('doIndex')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?bool $doIndex = null; + + /** + * The iOS destination URL for the short link for iOS device targeting. + * + * @var ?string $ios + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('ios')] + public ?string $ios; + + /** + * The Android destination URL for the short link for Android device targeting. + * + * @var ?string $android + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('android')] + public ?string $android; + + /** + * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo + * + * @var ?LeadEventGeo $geo + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('geo')] + #[\Speakeasy\Serializer\Annotation\Type('\Dub\Models\Components\LeadEventGeo|null')] + public ?LeadEventGeo $geo; + + /** + * + * @var ?bool $publicStats + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('publicStats')] + #[\Speakeasy\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. + * + * @var ?string $tagId + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('tagId')] + public ?string $tagId; + + /** + * The tags assigned to the short link. + * + * @var ?array $tags + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('tags')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Dub\Models\Components\TagSchema>|null')] + public ?array $tags; + + /** + * The comments for the short link. + * + * @var ?string $comments + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('comments')] + public ?string $comments; + + /** + * The UTM source of the short link. + * + * @var ?string $utmSource + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('utm_source')] + public ?string $utmSource; + + /** + * The UTM medium of the short link. + * + * @var ?string $utmMedium + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('utm_medium')] + public ?string $utmMedium; + + /** + * The UTM campaign of the short link. + * + * @var ?string $utmCampaign + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('utm_campaign')] + public ?string $utmCampaign; + + /** + * The UTM term of the short link. + * + * @var ?string $utmTerm + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('utm_term')] + public ?string $utmTerm; + + /** + * The UTM content of the short link. + * + * @var ?string $utmContent + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('utm_content')] + public ?string $utmContent; + + /** + * + * @var ?string $userId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('userId')] + public ?string $userId; + + /** + * The ID of the program the short link is associated with. + * + * @var ?string $programId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('programId')] + public ?string $programId; + + /** + * The number of clicks on the short link. + * + * @var ?float $clicks + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('clicks')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $clicks = null; + + /** + * The number of leads the short links has generated. + * + * @var ?float $leads + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('leads')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $leads = null; + + /** + * The number of sales the short links has generated. + * + * @var ?float $sales + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('sales')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $sales = null; + + /** + * The total dollar amount of sales the short links has generated (in cents). + * + * @var ?float $saleAmount + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('saleAmount')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $saleAmount = null; + + /** + * @param string $id + * @param string $domain + * @param string $key + * @param string $url + * @param string $expiresAt + * @param array $webhookIds + * @param string $shortLink + * @param string $qrCode + * @param string $workspaceId + * @param string $lastClicked + * @param string $createdAt + * @param string $updatedAt + * @param string $projectId + * @param ?bool $trackConversion + * @param ?string $externalId + * @param ?string $tenantId + * @param ?bool $archived + * @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 ?LeadEventGeo $geo + * @param ?bool $publicStats + * @param ?string $tagId + * @param ?array $tags + * @param ?string $comments + * @param ?string $utmSource + * @param ?string $utmMedium + * @param ?string $utmCampaign + * @param ?string $utmTerm + * @param ?string $utmContent + * @param ?string $userId + * @param ?float $clicks + * @param ?float $leads + * @param ?float $sales + * @param ?float $saleAmount + * @param ?string $programId + */ + public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $tenantId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?LeadEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?string $programId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) + { + $this->id = $id; + $this->domain = $domain; + $this->key = $key; + $this->url = $url; + $this->expiresAt = $expiresAt; + $this->webhookIds = $webhookIds; + $this->shortLink = $shortLink; + $this->qrCode = $qrCode; + $this->workspaceId = $workspaceId; + $this->lastClicked = $lastClicked; + $this->createdAt = $createdAt; + $this->updatedAt = $updatedAt; + $this->projectId = $projectId; + $this->trackConversion = $trackConversion; + $this->externalId = $externalId; + $this->tenantId = $tenantId; + $this->archived = $archived; + $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; + $this->utmSource = $utmSource; + $this->utmMedium = $utmMedium; + $this->utmCampaign = $utmCampaign; + $this->utmTerm = $utmTerm; + $this->utmContent = $utmContent; + $this->userId = $userId; + $this->programId = $programId; + $this->clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; + } +} \ No newline at end of file diff --git a/src/Models/Components/PaymentProcessor.php b/src/Models/Components/PaymentProcessor.php new file mode 100644 index 0000000..d984017 --- /dev/null +++ b/src/Models/Components/PaymentProcessor.php @@ -0,0 +1,18 @@ +amount = $amount; - $this->currency = $currency; $this->paymentProcessor = $paymentProcessor; $this->invoiceId = $invoiceId; } diff --git a/src/Models/Components/SaleCreatedEventData.php b/src/Models/Components/SaleCreatedEventData.php index 1e112ec..a4e4896 100644 --- a/src/Models/Components/SaleCreatedEventData.php +++ b/src/Models/Components/SaleCreatedEventData.php @@ -44,20 +44,20 @@ class SaleCreatedEventData /** * - * @var Sale $sale + * @var SaleCreatedEventSale $sale */ #[\Speakeasy\Serializer\Annotation\SerializedName('sale')] - #[\Speakeasy\Serializer\Annotation\Type('\Dub\Models\Components\Sale')] - public Sale $sale; + #[\Speakeasy\Serializer\Annotation\Type('\Dub\Models\Components\SaleCreatedEventSale')] + public SaleCreatedEventSale $sale; /** * @param string $eventName * @param SaleCreatedEventCustomer $customer * @param SaleCreatedEventClick $click * @param SaleCreatedEventLink $link - * @param Sale $sale + * @param SaleCreatedEventSale $sale */ - public function __construct(string $eventName, SaleCreatedEventCustomer $customer, SaleCreatedEventClick $click, SaleCreatedEventLink $link, Sale $sale) + public function __construct(string $eventName, SaleCreatedEventCustomer $customer, SaleCreatedEventClick $click, SaleCreatedEventLink $link, SaleCreatedEventSale $sale) { $this->eventName = $eventName; $this->customer = $customer; diff --git a/src/Models/Components/SaleCreatedEventSale.php b/src/Models/Components/SaleCreatedEventSale.php new file mode 100644 index 0000000..067b581 --- /dev/null +++ b/src/Models/Components/SaleCreatedEventSale.php @@ -0,0 +1,55 @@ +amount = $amount; + $this->currency = $currency; + $this->paymentProcessor = $paymentProcessor; + $this->invoiceId = $invoiceId; + } +} \ No newline at end of file diff --git a/src/Models/Components/SaleEvent.php b/src/Models/Components/SaleEvent.php new file mode 100644 index 0000000..271404f --- /dev/null +++ b/src/Models/Components/SaleEvent.php @@ -0,0 +1,272 @@ +event = $event; + $this->eventId = $eventId; + $this->eventName = $eventName; + $this->link = $link; + $this->click = $click; + $this->customer = $customer; + $this->sale = $sale; + $this->saleAmount = $saleAmount; + $this->invoiceId = $invoiceId; + $this->paymentProcessor = $paymentProcessor; + $this->clickId = $clickId; + $this->linkId = $linkId; + $this->domain = $domain; + $this->key = $key; + $this->url = $url; + $this->continent = $continent; + $this->country = $country; + $this->city = $city; + $this->device = $device; + $this->browser = $browser; + $this->os = $os; + $this->qr = $qr; + $this->ip = $ip; + $this->timestamp = $timestamp; + } +} \ No newline at end of file diff --git a/src/Models/Components/SaleEventClick.php b/src/Models/Components/SaleEventClick.php new file mode 100644 index 0000000..d54e6fc --- /dev/null +++ b/src/Models/Components/SaleEventClick.php @@ -0,0 +1,137 @@ +id = $id; + $this->url = $url; + $this->country = $country; + $this->city = $city; + $this->region = $region; + $this->continent = $continent; + $this->device = $device; + $this->browser = $browser; + $this->os = $os; + $this->referer = $referer; + $this->refererUrl = $refererUrl; + $this->ip = $ip; + $this->qr = $qr; + } +} \ No newline at end of file diff --git a/src/Models/Components/SaleEventCustomer.php b/src/Models/Components/SaleEventCustomer.php new file mode 100644 index 0000000..ef66a41 --- /dev/null +++ b/src/Models/Components/SaleEventCustomer.php @@ -0,0 +1,125 @@ +id = $id; + $this->externalId = $externalId; + $this->name = $name; + $this->createdAt = $createdAt; + $this->email = $email; + $this->avatar = $avatar; + $this->country = $country; + $this->link = $link; + $this->partner = $partner; + $this->discount = $discount; + } +} \ No newline at end of file diff --git a/src/Models/Components/SaleEventCustomerLink.php b/src/Models/Components/SaleEventCustomerLink.php new file mode 100644 index 0000000..44b6497 --- /dev/null +++ b/src/Models/Components/SaleEventCustomerLink.php @@ -0,0 +1,69 @@ +id = $id; + $this->domain = $domain; + $this->key = $key; + $this->shortLink = $shortLink; + $this->programId = $programId; + } +} \ No newline at end of file diff --git a/src/Models/Components/SaleEventDiscount.php b/src/Models/Components/SaleEventDiscount.php new file mode 100644 index 0000000..c97d090 --- /dev/null +++ b/src/Models/Components/SaleEventDiscount.php @@ -0,0 +1,84 @@ +id = $id; + $this->amount = $amount; + $this->type = $type; + $this->couponId = $couponId; + $this->couponTestId = $couponTestId; + $this->duration = $duration; + $this->interval = $interval; + } +} \ No newline at end of file diff --git a/src/Models/Components/SaleEventEvent.php b/src/Models/Components/SaleEventEvent.php new file mode 100644 index 0000000..323c383 --- /dev/null +++ b/src/Models/Components/SaleEventEvent.php @@ -0,0 +1,15 @@ +af = $af; + $this->al = $al; + $this->dz = $dz; + $this->as = $as; + $this->ad = $ad; + $this->ao = $ao; + $this->ai = $ai; + $this->aq = $aq; + $this->ag = $ag; + $this->ar = $ar; + $this->am = $am; + $this->aw = $aw; + $this->au = $au; + $this->at = $at; + $this->az = $az; + $this->bs = $bs; + $this->bh = $bh; + $this->bd = $bd; + $this->bb = $bb; + $this->by = $by; + $this->be = $be; + $this->bz = $bz; + $this->bj = $bj; + $this->bm = $bm; + $this->bt = $bt; + $this->bo = $bo; + $this->ba = $ba; + $this->bw = $bw; + $this->bv = $bv; + $this->br = $br; + $this->io = $io; + $this->bn = $bn; + $this->bg = $bg; + $this->bf = $bf; + $this->bi = $bi; + $this->kh = $kh; + $this->cm = $cm; + $this->ca = $ca; + $this->cv = $cv; + $this->ky = $ky; + $this->cf = $cf; + $this->td = $td; + $this->cl = $cl; + $this->cn = $cn; + $this->cx = $cx; + $this->cc = $cc; + $this->co = $co; + $this->km = $km; + $this->cg = $cg; + $this->cd = $cd; + $this->ck = $ck; + $this->cr = $cr; + $this->ci = $ci; + $this->hr = $hr; + $this->cu = $cu; + $this->cy = $cy; + $this->cz = $cz; + $this->dk = $dk; + $this->dj = $dj; + $this->dm = $dm; + $this->do = $do; + $this->ec = $ec; + $this->eg = $eg; + $this->sv = $sv; + $this->gq = $gq; + $this->er = $er; + $this->ee = $ee; + $this->et = $et; + $this->fk = $fk; + $this->fo = $fo; + $this->fj = $fj; + $this->fi = $fi; + $this->fr = $fr; + $this->gf = $gf; + $this->pf = $pf; + $this->tf = $tf; + $this->ga = $ga; + $this->gm = $gm; + $this->ge = $ge; + $this->de = $de; + $this->gh = $gh; + $this->gi = $gi; + $this->gr = $gr; + $this->gl = $gl; + $this->gd = $gd; + $this->gp = $gp; + $this->gu = $gu; + $this->gt = $gt; + $this->gn = $gn; + $this->gw = $gw; + $this->gy = $gy; + $this->ht = $ht; + $this->hm = $hm; + $this->va = $va; + $this->hn = $hn; + $this->hk = $hk; + $this->hu = $hu; + $this->is = $is; + $this->in = $in; + $this->id = $id; + $this->ir = $ir; + $this->iq = $iq; + $this->ie = $ie; + $this->il = $il; + $this->it = $it; + $this->jm = $jm; + $this->jp = $jp; + $this->jo = $jo; + $this->kz = $kz; + $this->ke = $ke; + $this->ki = $ki; + $this->kp = $kp; + $this->kr = $kr; + $this->kw = $kw; + $this->kg = $kg; + $this->la = $la; + $this->lv = $lv; + $this->lb = $lb; + $this->ls = $ls; + $this->lr = $lr; + $this->ly = $ly; + $this->li = $li; + $this->lt = $lt; + $this->lu = $lu; + $this->mo = $mo; + $this->mg = $mg; + $this->mw = $mw; + $this->my = $my; + $this->mv = $mv; + $this->ml = $ml; + $this->mt = $mt; + $this->mh = $mh; + $this->mq = $mq; + $this->mr = $mr; + $this->mu = $mu; + $this->yt = $yt; + $this->mx = $mx; + $this->fm = $fm; + $this->md = $md; + $this->mc = $mc; + $this->mn = $mn; + $this->ms = $ms; + $this->ma = $ma; + $this->mz = $mz; + $this->mm = $mm; + $this->na = $na; + $this->nr = $nr; + $this->np = $np; + $this->nl = $nl; + $this->nc = $nc; + $this->nz = $nz; + $this->ni = $ni; + $this->ne = $ne; + $this->ng = $ng; + $this->nu = $nu; + $this->nf = $nf; + $this->mk = $mk; + $this->mp = $mp; + $this->no = $no; + $this->om = $om; + $this->pk = $pk; + $this->pw = $pw; + $this->ps = $ps; + $this->pa = $pa; + $this->pg = $pg; + $this->py = $py; + $this->pe = $pe; + $this->ph = $ph; + $this->pn = $pn; + $this->pl = $pl; + $this->pt = $pt; + $this->pr = $pr; + $this->qa = $qa; + $this->re = $re; + $this->ro = $ro; + $this->ru = $ru; + $this->rw = $rw; + $this->sh = $sh; + $this->kn = $kn; + $this->lc = $lc; + $this->pm = $pm; + $this->vc = $vc; + $this->ws = $ws; + $this->sm = $sm; + $this->st = $st; + $this->sa = $sa; + $this->sn = $sn; + $this->sc = $sc; + $this->sl = $sl; + $this->sg = $sg; + $this->sk = $sk; + $this->si = $si; + $this->sb = $sb; + $this->so = $so; + $this->za = $za; + $this->gs = $gs; + $this->es = $es; + $this->lk = $lk; + $this->sd = $sd; + $this->sr = $sr; + $this->sj = $sj; + $this->sz = $sz; + $this->se = $se; + $this->ch = $ch; + $this->sy = $sy; + $this->tw = $tw; + $this->tj = $tj; + $this->tz = $tz; + $this->th = $th; + $this->tl = $tl; + $this->tg = $tg; + $this->tk = $tk; + $this->to = $to; + $this->tt = $tt; + $this->tn = $tn; + $this->tr = $tr; + $this->tm = $tm; + $this->tc = $tc; + $this->tv = $tv; + $this->ug = $ug; + $this->ua = $ua; + $this->ae = $ae; + $this->gb = $gb; + $this->us = $us; + $this->um = $um; + $this->uy = $uy; + $this->uz = $uz; + $this->vu = $vu; + $this->ve = $ve; + $this->vn = $vn; + $this->vg = $vg; + $this->vi = $vi; + $this->wf = $wf; + $this->eh = $eh; + $this->ye = $ye; + $this->zm = $zm; + $this->zw = $zw; + $this->ax = $ax; + $this->bq = $bq; + $this->cw = $cw; + $this->gg = $gg; + $this->im = $im; + $this->je = $je; + $this->me = $me; + $this->bl = $bl; + $this->mf = $mf; + $this->rs = $rs; + $this->sx = $sx; + $this->ss = $ss; + $this->xk = $xk; + } +} \ No newline at end of file diff --git a/src/Models/Components/SaleEventInterval.php b/src/Models/Components/SaleEventInterval.php new file mode 100644 index 0000000..c527ab3 --- /dev/null +++ b/src/Models/Components/SaleEventInterval.php @@ -0,0 +1,16 @@ + $webhookIds + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('webhookIds')] + #[\Speakeasy\Serializer\Annotation\Type('array')] + public array $webhookIds; + + /** + * The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). + * + * @var string $shortLink + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('shortLink')] + public string $shortLink; + + /** + * The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`). + * + * @var string $qrCode + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('qrCode')] + public string $qrCode; + + /** + * The workspace ID of the short link. + * + * @var string $workspaceId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('workspaceId')] + public string $workspaceId; + + /** + * + * @var string $lastClicked + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('lastClicked')] + public string $lastClicked; + + /** + * + * @var string $createdAt + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('createdAt')] + public string $createdAt; + + /** + * + * @var string $updatedAt + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('updatedAt')] + public string $updatedAt; + + /** + * The project ID of the short link. This field is deprecated – use `workspaceId` instead. + * + * @var string $projectId + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('projectId')] + public string $projectId; + + /** + * + * @var ?bool $trackConversion + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('trackConversion')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?bool $trackConversion = null; + + /** + * The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. + * + * @var ?string $externalId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('externalId')] + public ?string $externalId; + + /** + * The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. + * + * @var ?string $tenantId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('tenantId')] + public ?string $tenantId; + + /** + * + * @var ?bool $archived + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('archived')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?bool $archived = null; + + /** + * + * @var ?string $expiredUrl + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('expiredUrl')] + public ?string $expiredUrl; + + /** + * The password required to access the destination URL of the short link. + * + * @var ?string $password + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('password')] + public ?string $password; + + /** + * + * @var ?bool $proxy + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('proxy')] + #[\Speakeasy\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. + * + * @var ?string $title + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('title')] + public ?string $title; + + /** + * The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. + * + * @var ?string $description + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('description')] + public ?string $description; + + /** + * The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. + * + * @var ?string $image + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('image')] + public ?string $image; + + /** + * 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 + * + * @var ?string $video + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('video')] + public ?string $video; + + /** + * + * @var ?bool $rewrite + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('rewrite')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?bool $rewrite = null; + + /** + * + * @var ?bool $doIndex + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('doIndex')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?bool $doIndex = null; + + /** + * The iOS destination URL for the short link for iOS device targeting. + * + * @var ?string $ios + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('ios')] + public ?string $ios; + + /** + * The Android destination URL for the short link for Android device targeting. + * + * @var ?string $android + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('android')] + public ?string $android; + + /** + * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo + * + * @var ?SaleEventGeo $geo + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('geo')] + #[\Speakeasy\Serializer\Annotation\Type('\Dub\Models\Components\SaleEventGeo|null')] + public ?SaleEventGeo $geo; + + /** + * + * @var ?bool $publicStats + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('publicStats')] + #[\Speakeasy\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. + * + * @var ?string $tagId + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('tagId')] + public ?string $tagId; + + /** + * The tags assigned to the short link. + * + * @var ?array $tags + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('tags')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Dub\Models\Components\TagSchema>|null')] + public ?array $tags; + + /** + * The comments for the short link. + * + * @var ?string $comments + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('comments')] + public ?string $comments; + + /** + * The UTM source of the short link. + * + * @var ?string $utmSource + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('utm_source')] + public ?string $utmSource; + + /** + * The UTM medium of the short link. + * + * @var ?string $utmMedium + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('utm_medium')] + public ?string $utmMedium; + + /** + * The UTM campaign of the short link. + * + * @var ?string $utmCampaign + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('utm_campaign')] + public ?string $utmCampaign; + + /** + * The UTM term of the short link. + * + * @var ?string $utmTerm + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('utm_term')] + public ?string $utmTerm; + + /** + * The UTM content of the short link. + * + * @var ?string $utmContent + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('utm_content')] + public ?string $utmContent; + + /** + * + * @var ?string $userId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('userId')] + public ?string $userId; + + /** + * The ID of the program the short link is associated with. + * + * @var ?string $programId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('programId')] + public ?string $programId; + + /** + * The number of clicks on the short link. + * + * @var ?float $clicks + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('clicks')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $clicks = null; + + /** + * The number of leads the short links has generated. + * + * @var ?float $leads + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('leads')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $leads = null; + + /** + * The number of sales the short links has generated. + * + * @var ?float $sales + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('sales')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $sales = null; + + /** + * The total dollar amount of sales the short links has generated (in cents). + * + * @var ?float $saleAmount + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('saleAmount')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $saleAmount = null; + + /** + * @param string $id + * @param string $domain + * @param string $key + * @param string $url + * @param string $expiresAt + * @param array $webhookIds + * @param string $shortLink + * @param string $qrCode + * @param string $workspaceId + * @param string $lastClicked + * @param string $createdAt + * @param string $updatedAt + * @param string $projectId + * @param ?bool $trackConversion + * @param ?string $externalId + * @param ?string $tenantId + * @param ?bool $archived + * @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 ?SaleEventGeo $geo + * @param ?bool $publicStats + * @param ?string $tagId + * @param ?array $tags + * @param ?string $comments + * @param ?string $utmSource + * @param ?string $utmMedium + * @param ?string $utmCampaign + * @param ?string $utmTerm + * @param ?string $utmContent + * @param ?string $userId + * @param ?float $clicks + * @param ?float $leads + * @param ?float $sales + * @param ?float $saleAmount + * @param ?string $programId + */ + public function __construct(string $id, string $domain, string $key, string $url, string $expiresAt, array $webhookIds, string $shortLink, string $qrCode, string $workspaceId, string $lastClicked, string $createdAt, string $updatedAt, string $projectId, ?bool $trackConversion = null, ?string $externalId = null, ?string $tenantId = null, ?bool $archived = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?SaleEventGeo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $comments = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?string $programId = null, ?float $clicks = 0, ?float $leads = 0, ?float $sales = 0, ?float $saleAmount = 0) + { + $this->id = $id; + $this->domain = $domain; + $this->key = $key; + $this->url = $url; + $this->expiresAt = $expiresAt; + $this->webhookIds = $webhookIds; + $this->shortLink = $shortLink; + $this->qrCode = $qrCode; + $this->workspaceId = $workspaceId; + $this->lastClicked = $lastClicked; + $this->createdAt = $createdAt; + $this->updatedAt = $updatedAt; + $this->projectId = $projectId; + $this->trackConversion = $trackConversion; + $this->externalId = $externalId; + $this->tenantId = $tenantId; + $this->archived = $archived; + $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; + $this->utmSource = $utmSource; + $this->utmMedium = $utmMedium; + $this->utmCampaign = $utmCampaign; + $this->utmTerm = $utmTerm; + $this->utmContent = $utmContent; + $this->userId = $userId; + $this->programId = $programId; + $this->clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; + } +} \ No newline at end of file diff --git a/src/Models/Components/SaleEventPartner.php b/src/Models/Components/SaleEventPartner.php new file mode 100644 index 0000000..106d0e4 --- /dev/null +++ b/src/Models/Components/SaleEventPartner.php @@ -0,0 +1,56 @@ +id = $id; + $this->name = $name; + $this->email = $email; + $this->image = $image; + } +} \ No newline at end of file diff --git a/src/Models/Components/SaleEventType.php b/src/Models/Components/SaleEventType.php new file mode 100644 index 0000000..eba861c --- /dev/null +++ b/src/Models/Components/SaleEventType.php @@ -0,0 +1,16 @@ + $responseBodies + * @var ?array $responseBodies */ public ?array $responseBodies = null; @@ -43,7 +43,7 @@ class BulkCreateLinksResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse - * @param ?array $responseBodies + * @param ?array $responseBodies */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?array $responseBodies = null) { diff --git a/src/Models/Operations/Country.php b/src/Models/Operations/Country.php new file mode 100644 index 0000000..bc4befd --- /dev/null +++ b/src/Models/Operations/Country.php @@ -0,0 +1,265 @@ +|null $tagIds */ #[\Speakeasy\Serializer\Annotation\SerializedName('tagIds')] - #[\Speakeasy\Serializer\Annotation\Type('string|array')] + #[\Speakeasy\Serializer\Annotation\Type('string|array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public string|array|null $tagIds = null; @@ -90,7 +90,7 @@ class CreateLinkRequestBody * @var string|array|null $tagNames */ #[\Speakeasy\Serializer\Annotation\SerializedName('tagNames')] - #[\Speakeasy\Serializer\Annotation\Type('string|array')] + #[\Speakeasy\Serializer\Annotation\Type('string|array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public string|array|null $tagNames = null; diff --git a/src/Models/Operations/CreatePartnerDiscount.php b/src/Models/Operations/CreatePartnerDiscount.php new file mode 100644 index 0000000..8fd6024 --- /dev/null +++ b/src/Models/Operations/CreatePartnerDiscount.php @@ -0,0 +1,84 @@ +id = $id; + $this->amount = $amount; + $this->type = $type; + $this->couponId = $couponId; + $this->couponTestId = $couponTestId; + $this->duration = $duration; + $this->interval = $interval; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreatePartnerInterval.php b/src/Models/Operations/CreatePartnerInterval.php new file mode 100644 index 0000000..6fb237e --- /dev/null +++ b/src/Models/Operations/CreatePartnerInterval.php @@ -0,0 +1,16 @@ +id = $id; + $this->shortLink = $shortLink; + $this->domain = $domain; + $this->key = $key; + $this->url = $url; + $this->clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreatePartnerRequestBody.php b/src/Models/Operations/CreatePartnerRequestBody.php new file mode 100644 index 0000000..b1cab08 --- /dev/null +++ b/src/Models/Operations/CreatePartnerRequestBody.php @@ -0,0 +1,93 @@ +programId = $programId; + $this->name = $name; + $this->email = $email; + $this->username = $username; + $this->image = $image; + $this->country = $country; + $this->description = $description; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreatePartnerResponse.php b/src/Models/Operations/CreatePartnerResponse.php new file mode 100644 index 0000000..dd22cf4 --- /dev/null +++ b/src/Models/Operations/CreatePartnerResponse.php @@ -0,0 +1,55 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreatePartnerResponseBody.php b/src/Models/Operations/CreatePartnerResponseBody.php new file mode 100644 index 0000000..5303d29 --- /dev/null +++ b/src/Models/Operations/CreatePartnerResponseBody.php @@ -0,0 +1,169 @@ +id = $id; + $this->name = $name; + $this->country = $country; + $this->payoutsEnabled = $payoutsEnabled; + $this->createdAt = $createdAt; + $this->updatedAt = $updatedAt; + $this->status = $status; + $this->earnings = $earnings; + $this->email = $email; + $this->image = $image; + $this->bio = $bio; + $this->stripeConnectId = $stripeConnectId; + $this->link = $link; + $this->commissionAmount = $commissionAmount; + $this->couponId = $couponId; + $this->discount = $discount; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreatePartnerType.php b/src/Models/Operations/CreatePartnerType.php new file mode 100644 index 0000000..712aa8a --- /dev/null +++ b/src/Models/Operations/CreatePartnerType.php @@ -0,0 +1,16 @@ +|null $tagIds */ #[\Speakeasy\Serializer\Annotation\SerializedName('tagIds')] - #[\Speakeasy\Serializer\Annotation\Type('string|array')] + #[\Speakeasy\Serializer\Annotation\Type('string|array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public string|array|null $tagIds = null; @@ -64,7 +64,7 @@ class Data * @var string|array|null $tagNames */ #[\Speakeasy\Serializer\Annotation\SerializedName('tagNames')] - #[\Speakeasy\Serializer\Annotation\Type('string|array')] + #[\Speakeasy\Serializer\Annotation\Type('string|array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public string|array|null $tagNames = null; diff --git a/src/Models/Operations/ListEventsResponse.php b/src/Models/Operations/ListEventsResponse.php index e3d2912..d296743 100644 --- a/src/Models/Operations/ListEventsResponse.php +++ b/src/Models/Operations/ListEventsResponse.php @@ -35,21 +35,21 @@ class ListEventsResponse /** * A list of events * - * @var ?array $clickEvents + * @var array|array|array|null $oneOf */ - public ?array $clickEvents = null; + public ?array $oneOf = null; /** * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse - * @param ?array $clickEvents + * @param array|array|array|null $oneOf */ - public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?array $clickEvents = null) + public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?array $oneOf = null) { $this->contentType = $contentType; $this->statusCode = $statusCode; $this->rawResponse = $rawResponse; - $this->clickEvents = $clickEvents; + $this->oneOf = $oneOf; } } \ No newline at end of file diff --git a/src/Models/Operations/RequestBody.php b/src/Models/Operations/RequestBody.php index 852a28f..6cd3c64 100644 --- a/src/Models/Operations/RequestBody.php +++ b/src/Models/Operations/RequestBody.php @@ -80,7 +80,7 @@ class RequestBody * @var string|array|null $tagIds */ #[\Speakeasy\Serializer\Annotation\SerializedName('tagIds')] - #[\Speakeasy\Serializer\Annotation\Type('string|array')] + #[\Speakeasy\Serializer\Annotation\Type('string|array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public string|array|null $tagIds = null; @@ -90,7 +90,7 @@ class RequestBody * @var string|array|null $tagNames */ #[\Speakeasy\Serializer\Annotation\SerializedName('tagNames')] - #[\Speakeasy\Serializer\Annotation\Type('string|array')] + #[\Speakeasy\Serializer\Annotation\Type('string|array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public string|array|null $tagNames = null; diff --git a/src/Models/Operations/Status.php b/src/Models/Operations/Status.php new file mode 100644 index 0000000..f048f61 --- /dev/null +++ b/src/Models/Operations/Status.php @@ -0,0 +1,17 @@ +|null $tagIds */ #[\Speakeasy\Serializer\Annotation\SerializedName('tagIds')] - #[\Speakeasy\Serializer\Annotation\Type('string|array')] + #[\Speakeasy\Serializer\Annotation\Type('string|array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public string|array|null $tagIds = null; @@ -91,7 +91,7 @@ class UpdateLinkRequestBody * @var string|array|null $tagNames */ #[\Speakeasy\Serializer\Annotation\SerializedName('tagNames')] - #[\Speakeasy\Serializer\Annotation\Type('string|array')] + #[\Speakeasy\Serializer\Annotation\Type('string|array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public string|array|null $tagNames = null; diff --git a/src/Models/Operations/UpsertLinkRequestBody.php b/src/Models/Operations/UpsertLinkRequestBody.php index cd44577..5253c55 100644 --- a/src/Models/Operations/UpsertLinkRequestBody.php +++ b/src/Models/Operations/UpsertLinkRequestBody.php @@ -80,7 +80,7 @@ class UpsertLinkRequestBody * @var string|array|null $tagIds */ #[\Speakeasy\Serializer\Annotation\SerializedName('tagIds')] - #[\Speakeasy\Serializer\Annotation\Type('string|array')] + #[\Speakeasy\Serializer\Annotation\Type('string|array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public string|array|null $tagIds = null; @@ -90,7 +90,7 @@ class UpsertLinkRequestBody * @var string|array|null $tagNames */ #[\Speakeasy\Serializer\Annotation\SerializedName('tagNames')] - #[\Speakeasy\Serializer\Annotation\Type('string|array')] + #[\Speakeasy\Serializer\Annotation\Type('string|array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public string|array|null $tagNames = null; diff --git a/src/Partners.php b/src/Partners.php new file mode 100644 index 0000000..b79c6b4 --- /dev/null +++ b/src/Partners.php @@ -0,0 +1,211 @@ +sdkConfiguration = $sdkConfig; + } + /** + * @param string $baseUrl + * @param array $urlVariables + * + * @return string + */ + public function getUrl(string $baseUrl, array $urlVariables): string + { + $serverDetails = $this->sdkConfiguration->getServerDetails(); + + if ($baseUrl == null) { + $baseUrl = $serverDetails->baseUrl; + } + + if ($urlVariables == null) { + $urlVariables = $serverDetails->options; + } + + return Utils\Utils::templateUrl($baseUrl, $urlVariables); + } + + /** + * Create a new partner + * + * Create a new partner for a program. If partner exists, automatically enrolls them. + * + * @param ?Operations\CreatePartnerRequestBody $request + * @return Operations\CreatePartnerResponse + * @throws \Dub\Models\Errors\SDKException + */ + public function create(?Operations\CreatePartnerRequestBody $request = null, ?Options $options = null): Operations\CreatePartnerResponse + { + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/partners'); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + $body = Utils\Utils::serializeRequestBody($request, 'request', 'json'); + if ($body !== null) { + $httpOptions = array_merge_recursive($httpOptions, $body); + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); + $hookContext = new HookContext('createPartner', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode == 404 || $statusCode == 409 || $statusCode == 410 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + if ($statusCode == 201) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Operations\CreatePartnerResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\CreatePartnerResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + object: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode == 400) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode == 401) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode == 403) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode == 404) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode == 409) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode == 410) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode == 422) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode == 429) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode == 500) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500) { + throw new \Dub\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif ($statusCode >= 500 && $statusCode < 600) { + throw new \Dub\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + +} \ No newline at end of file diff --git a/src/SDKConfiguration.php b/src/SDKConfiguration.php index b4fd42e..d6318d3 100644 --- a/src/SDKConfiguration.php +++ b/src/SDKConfiguration.php @@ -26,11 +26,11 @@ class SDKConfiguration public string $openapiDocVersion = '0.0.1'; - public string $sdkVersion = '0.11.18'; + public string $sdkVersion = '0.11.19'; - public string $genVersion = '2.493.34'; + public string $genVersion = '2.495.1'; - public string $userAgent = 'speakeasy-sdk/php 0.11.18 2.493.34 0.0.1 dub/dub-php'; + public string $userAgent = 'speakeasy-sdk/php 0.11.19 2.495.1 0.0.1 dub/dub-php'; public ?RetryConfig $retryConfig = null; diff --git a/src/Utils/UnionHandler.php b/src/Utils/UnionHandler.php index 7b1e1ad..ff3b7b2 100644 --- a/src/Utils/UnionHandler.php +++ b/src/Utils/UnionHandler.php @@ -152,8 +152,7 @@ public function deserializeUnion(DeserializationVisitorInterface $visitor, mixed $typeToTry = $possibleType['name']; if ($typeToTry === 'array') { - $typeNames = array_map(fn ($t) => $t['name'], $possibleType['params']); - $typeToTry = 'array<'.implode(', ', $typeNames).'>'; + $typeToTry = $this->resolveArrayTypes($possibleType); } if ($typeToTry === 'enum') { $typeToTry = $possibleType['params'][0]['name']; @@ -315,4 +314,26 @@ private function reorderTypes(array $type): array return $type; } + + + /** + * @param array $possibleType + * @return string + */ + private function resolveArrayTypes(array $possibleType): string + { + $typeNames = []; + foreach ($possibleType['params'] as $param) { + + if ($param['name'] === 'union') { + $innerTypes = array_map(fn ($t) => $t['name'], $param['params']); + $typeNames[] = $typeToTry = implode('|', $innerTypes); + } else { + $typeNames[] = $param['name']; + } + } + $typeToTry = 'array<'.implode(', ', $typeNames).'>'; + + return $typeToTry; + } }