dub 0.46.7 → 0.46.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/RUNTIMES.md +27 -1
- package/dist/commonjs/funcs/analyticsRetrieve.js +29 -29
- package/dist/commonjs/funcs/analyticsRetrieve.js.map +1 -1
- package/dist/commonjs/funcs/customersCreate.js +4 -4
- package/dist/commonjs/funcs/customersCreate.js.map +1 -1
- package/dist/commonjs/funcs/customersDelete.js +4 -4
- package/dist/commonjs/funcs/customersDelete.js.map +1 -1
- package/dist/commonjs/funcs/customersGet.js +4 -4
- package/dist/commonjs/funcs/customersGet.js.map +1 -1
- package/dist/commonjs/funcs/customersList.js +4 -4
- package/dist/commonjs/funcs/customersList.js.map +1 -1
- package/dist/commonjs/funcs/customersUpdate.js +4 -4
- package/dist/commonjs/funcs/customersUpdate.js.map +1 -1
- package/dist/commonjs/funcs/domainsCreate.js +4 -4
- package/dist/commonjs/funcs/domainsCreate.js.map +1 -1
- package/dist/commonjs/funcs/domainsDelete.js +4 -4
- package/dist/commonjs/funcs/domainsDelete.js.map +1 -1
- package/dist/commonjs/funcs/domainsList.js +10 -10
- package/dist/commonjs/funcs/domainsList.js.map +1 -1
- package/dist/commonjs/funcs/domainsUpdate.js +4 -4
- package/dist/commonjs/funcs/domainsUpdate.js.map +1 -1
- package/dist/commonjs/funcs/embedTokensCreate.js +4 -4
- package/dist/commonjs/funcs/embedTokensCreate.js.map +1 -1
- package/dist/commonjs/funcs/eventsList.js +32 -32
- package/dist/commonjs/funcs/eventsList.js.map +1 -1
- package/dist/commonjs/funcs/linksCount.js +13 -13
- package/dist/commonjs/funcs/linksCount.js.map +1 -1
- package/dist/commonjs/funcs/linksCreate.js +4 -4
- package/dist/commonjs/funcs/linksCreate.js.map +1 -1
- package/dist/commonjs/funcs/linksCreateMany.js +4 -4
- package/dist/commonjs/funcs/linksCreateMany.js.map +1 -1
- package/dist/commonjs/funcs/linksDelete.js +4 -4
- package/dist/commonjs/funcs/linksDelete.js.map +1 -1
- package/dist/commonjs/funcs/linksDeleteMany.js +4 -4
- package/dist/commonjs/funcs/linksDeleteMany.js.map +1 -1
- package/dist/commonjs/funcs/linksGet.js +8 -8
- package/dist/commonjs/funcs/linksGet.js.map +1 -1
- package/dist/commonjs/funcs/linksList.js +17 -17
- package/dist/commonjs/funcs/linksList.js.map +1 -1
- package/dist/commonjs/funcs/linksUpdate.js +4 -4
- package/dist/commonjs/funcs/linksUpdate.js.map +1 -1
- package/dist/commonjs/funcs/linksUpdateMany.js +4 -4
- package/dist/commonjs/funcs/linksUpdateMany.js.map +1 -1
- package/dist/commonjs/funcs/linksUpsert.js +4 -4
- package/dist/commonjs/funcs/linksUpsert.js.map +1 -1
- package/dist/commonjs/funcs/metatagsGet.js +4 -4
- package/dist/commonjs/funcs/metatagsGet.js.map +1 -1
- package/dist/commonjs/funcs/qrCodesGet.js +4 -4
- package/dist/commonjs/funcs/qrCodesGet.js.map +1 -1
- package/dist/commonjs/funcs/tagsCreate.js +4 -4
- package/dist/commonjs/funcs/tagsCreate.js.map +1 -1
- package/dist/commonjs/funcs/tagsDelete.js +4 -4
- package/dist/commonjs/funcs/tagsDelete.js.map +1 -1
- package/dist/commonjs/funcs/tagsList.js +4 -4
- package/dist/commonjs/funcs/tagsList.js.map +1 -1
- package/dist/commonjs/funcs/tagsUpdate.js +4 -4
- package/dist/commonjs/funcs/tagsUpdate.js.map +1 -1
- package/dist/commonjs/funcs/trackLead.js +4 -4
- package/dist/commonjs/funcs/trackLead.js.map +1 -1
- package/dist/commonjs/funcs/trackSale.js +4 -4
- package/dist/commonjs/funcs/trackSale.js.map +1 -1
- package/dist/commonjs/funcs/workspacesGet.js +4 -4
- package/dist/commonjs/funcs/workspacesGet.js.map +1 -1
- package/dist/commonjs/funcs/workspacesUpdate.js +4 -4
- package/dist/commonjs/funcs/workspacesUpdate.js.map +1 -1
- package/dist/commonjs/hooks/auth.js +1 -2
- package/dist/commonjs/hooks/auth.js.map +1 -1
- package/dist/commonjs/hooks/base-url.js +1 -2
- package/dist/commonjs/hooks/base-url.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +4 -5
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/lib/encodings.js +18 -19
- package/dist/commonjs/lib/encodings.js.map +1 -1
- package/dist/commonjs/lib/http.js +1 -2
- package/dist/commonjs/lib/http.js.map +1 -1
- package/dist/commonjs/lib/matchers.js +5 -6
- package/dist/commonjs/lib/matchers.js.map +1 -1
- package/dist/commonjs/lib/primitives.js +1 -1
- package/dist/commonjs/lib/primitives.js.map +1 -1
- package/dist/commonjs/lib/retries.js +3 -4
- package/dist/commonjs/lib/retries.js.map +1 -1
- package/dist/commonjs/lib/sdks.js +15 -16
- package/dist/commonjs/lib/sdks.js.map +1 -1
- package/dist/commonjs/lib/security.js +2 -2
- package/dist/commonjs/lib/security.js.map +1 -1
- package/dist/commonjs/lib/url.js +1 -1
- package/dist/commonjs/lib/url.js.map +1 -1
- package/dist/commonjs/models/components/leadcreatedevent.d.ts +177 -0
- package/dist/commonjs/models/components/leadcreatedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/leadcreatedevent.js +161 -1
- package/dist/commonjs/models/components/leadcreatedevent.js.map +1 -1
- package/dist/commonjs/models/components/leadevent.d.ts +177 -0
- package/dist/commonjs/models/components/leadevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/leadevent.js +158 -1
- package/dist/commonjs/models/components/leadevent.js.map +1 -1
- package/dist/commonjs/models/components/salecreatedevent.d.ts +177 -0
- package/dist/commonjs/models/components/salecreatedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/salecreatedevent.js +161 -1
- package/dist/commonjs/models/components/salecreatedevent.js.map +1 -1
- package/dist/commonjs/models/components/saleevent.d.ts +177 -0
- package/dist/commonjs/models/components/saleevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/saleevent.js +159 -1
- package/dist/commonjs/models/components/saleevent.js.map +1 -1
- package/dist/commonjs/models/errors/badrequest.js +1 -2
- package/dist/commonjs/models/errors/badrequest.js.map +1 -1
- package/dist/commonjs/models/errors/conflict.js +1 -2
- package/dist/commonjs/models/errors/conflict.js.map +1 -1
- package/dist/commonjs/models/errors/forbidden.js +1 -2
- package/dist/commonjs/models/errors/forbidden.js.map +1 -1
- package/dist/commonjs/models/errors/httpclienterrors.js +2 -2
- package/dist/commonjs/models/errors/httpclienterrors.js.map +1 -1
- package/dist/commonjs/models/errors/internalservererror.js +1 -2
- package/dist/commonjs/models/errors/internalservererror.js.map +1 -1
- package/dist/commonjs/models/errors/inviteexpired.js +1 -2
- package/dist/commonjs/models/errors/inviteexpired.js.map +1 -1
- package/dist/commonjs/models/errors/notfound.js +1 -2
- package/dist/commonjs/models/errors/notfound.js.map +1 -1
- package/dist/commonjs/models/errors/ratelimitexceeded.js +1 -2
- package/dist/commonjs/models/errors/ratelimitexceeded.js.map +1 -1
- package/dist/commonjs/models/errors/unauthorized.js +1 -2
- package/dist/commonjs/models/errors/unauthorized.js.map +1 -1
- package/dist/commonjs/models/errors/unprocessableentity.js +1 -2
- package/dist/commonjs/models/errors/unprocessableentity.js.map +1 -1
- package/dist/commonjs/models/operations/createcustomer.d.ts +178 -0
- package/dist/commonjs/models/operations/createcustomer.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createcustomer.js +158 -1
- package/dist/commonjs/models/operations/createcustomer.js.map +1 -1
- package/dist/commonjs/models/operations/getcustomer.d.ts +178 -0
- package/dist/commonjs/models/operations/getcustomer.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getcustomer.js +158 -1
- package/dist/commonjs/models/operations/getcustomer.js.map +1 -1
- package/dist/commonjs/models/operations/getcustomers.d.ts +178 -0
- package/dist/commonjs/models/operations/getcustomers.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getcustomers.js +155 -1
- package/dist/commonjs/models/operations/getcustomers.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +0 -1
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +0 -1
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/updatecustomer.d.ts +178 -0
- package/dist/commonjs/models/operations/updatecustomer.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatecustomer.js +158 -1
- package/dist/commonjs/models/operations/updatecustomer.js.map +1 -1
- package/dist/commonjs/sdk/sdk.js +11 -22
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/track.d.ts +0 -9
- package/dist/commonjs/sdk/track.d.ts.map +1 -1
- package/dist/commonjs/sdk/track.js +0 -12
- package/dist/commonjs/sdk/track.js.map +1 -1
- package/dist/esm/funcs/analyticsRetrieve.js +29 -29
- package/dist/esm/funcs/analyticsRetrieve.js.map +1 -1
- package/dist/esm/funcs/customersCreate.js +4 -4
- package/dist/esm/funcs/customersCreate.js.map +1 -1
- package/dist/esm/funcs/customersDelete.js +4 -4
- package/dist/esm/funcs/customersDelete.js.map +1 -1
- package/dist/esm/funcs/customersGet.js +4 -4
- package/dist/esm/funcs/customersGet.js.map +1 -1
- package/dist/esm/funcs/customersList.js +4 -4
- package/dist/esm/funcs/customersList.js.map +1 -1
- package/dist/esm/funcs/customersUpdate.js +4 -4
- package/dist/esm/funcs/customersUpdate.js.map +1 -1
- package/dist/esm/funcs/domainsCreate.js +4 -4
- package/dist/esm/funcs/domainsCreate.js.map +1 -1
- package/dist/esm/funcs/domainsDelete.js +4 -4
- package/dist/esm/funcs/domainsDelete.js.map +1 -1
- package/dist/esm/funcs/domainsList.js +10 -10
- package/dist/esm/funcs/domainsList.js.map +1 -1
- package/dist/esm/funcs/domainsUpdate.js +4 -4
- package/dist/esm/funcs/domainsUpdate.js.map +1 -1
- package/dist/esm/funcs/embedTokensCreate.js +4 -4
- package/dist/esm/funcs/embedTokensCreate.js.map +1 -1
- package/dist/esm/funcs/eventsList.js +32 -32
- package/dist/esm/funcs/eventsList.js.map +1 -1
- package/dist/esm/funcs/linksCount.js +13 -13
- package/dist/esm/funcs/linksCount.js.map +1 -1
- package/dist/esm/funcs/linksCreate.js +4 -4
- package/dist/esm/funcs/linksCreate.js.map +1 -1
- package/dist/esm/funcs/linksCreateMany.js +4 -4
- package/dist/esm/funcs/linksCreateMany.js.map +1 -1
- package/dist/esm/funcs/linksDelete.js +4 -4
- package/dist/esm/funcs/linksDelete.js.map +1 -1
- package/dist/esm/funcs/linksDeleteMany.js +4 -4
- package/dist/esm/funcs/linksDeleteMany.js.map +1 -1
- package/dist/esm/funcs/linksGet.js +8 -8
- package/dist/esm/funcs/linksGet.js.map +1 -1
- package/dist/esm/funcs/linksList.js +17 -17
- package/dist/esm/funcs/linksList.js.map +1 -1
- package/dist/esm/funcs/linksUpdate.js +4 -4
- package/dist/esm/funcs/linksUpdate.js.map +1 -1
- package/dist/esm/funcs/linksUpdateMany.js +4 -4
- package/dist/esm/funcs/linksUpdateMany.js.map +1 -1
- package/dist/esm/funcs/linksUpsert.js +4 -4
- package/dist/esm/funcs/linksUpsert.js.map +1 -1
- package/dist/esm/funcs/metatagsGet.js +4 -4
- package/dist/esm/funcs/metatagsGet.js.map +1 -1
- package/dist/esm/funcs/qrCodesGet.js +4 -4
- package/dist/esm/funcs/qrCodesGet.js.map +1 -1
- package/dist/esm/funcs/tagsCreate.js +4 -4
- package/dist/esm/funcs/tagsCreate.js.map +1 -1
- package/dist/esm/funcs/tagsDelete.js +4 -4
- package/dist/esm/funcs/tagsDelete.js.map +1 -1
- package/dist/esm/funcs/tagsList.js +4 -4
- package/dist/esm/funcs/tagsList.js.map +1 -1
- package/dist/esm/funcs/tagsUpdate.js +4 -4
- package/dist/esm/funcs/tagsUpdate.js.map +1 -1
- package/dist/esm/funcs/trackLead.js +4 -4
- package/dist/esm/funcs/trackLead.js.map +1 -1
- package/dist/esm/funcs/trackSale.js +4 -4
- package/dist/esm/funcs/trackSale.js.map +1 -1
- package/dist/esm/funcs/workspacesGet.js +4 -4
- package/dist/esm/funcs/workspacesGet.js.map +1 -1
- package/dist/esm/funcs/workspacesUpdate.js +4 -4
- package/dist/esm/funcs/workspacesUpdate.js.map +1 -1
- package/dist/esm/hooks/auth.js +1 -2
- package/dist/esm/hooks/auth.js.map +1 -1
- package/dist/esm/hooks/base-url.js +1 -2
- package/dist/esm/hooks/base-url.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +4 -5
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/lib/encodings.js +18 -19
- package/dist/esm/lib/encodings.js.map +1 -1
- package/dist/esm/lib/http.js +1 -2
- package/dist/esm/lib/http.js.map +1 -1
- package/dist/esm/lib/matchers.js +5 -6
- package/dist/esm/lib/matchers.js.map +1 -1
- package/dist/esm/lib/primitives.js +1 -1
- package/dist/esm/lib/primitives.js.map +1 -1
- package/dist/esm/lib/retries.js +3 -4
- package/dist/esm/lib/retries.js.map +1 -1
- package/dist/esm/lib/sdks.js +15 -16
- package/dist/esm/lib/sdks.js.map +1 -1
- package/dist/esm/lib/security.js +2 -2
- package/dist/esm/lib/security.js.map +1 -1
- package/dist/esm/lib/url.js +1 -1
- package/dist/esm/lib/url.js.map +1 -1
- package/dist/esm/models/components/leadcreatedevent.d.ts +177 -0
- package/dist/esm/models/components/leadcreatedevent.d.ts.map +1 -1
- package/dist/esm/models/components/leadcreatedevent.js +153 -0
- package/dist/esm/models/components/leadcreatedevent.js.map +1 -1
- package/dist/esm/models/components/leadevent.d.ts +177 -0
- package/dist/esm/models/components/leadevent.d.ts.map +1 -1
- package/dist/esm/models/components/leadevent.js +150 -0
- package/dist/esm/models/components/leadevent.js.map +1 -1
- package/dist/esm/models/components/salecreatedevent.d.ts +177 -0
- package/dist/esm/models/components/salecreatedevent.d.ts.map +1 -1
- package/dist/esm/models/components/salecreatedevent.js +153 -0
- package/dist/esm/models/components/salecreatedevent.js.map +1 -1
- package/dist/esm/models/components/saleevent.d.ts +177 -0
- package/dist/esm/models/components/saleevent.d.ts.map +1 -1
- package/dist/esm/models/components/saleevent.js +151 -0
- package/dist/esm/models/components/saleevent.js.map +1 -1
- package/dist/esm/models/errors/badrequest.js +1 -2
- package/dist/esm/models/errors/badrequest.js.map +1 -1
- package/dist/esm/models/errors/conflict.js +1 -2
- package/dist/esm/models/errors/conflict.js.map +1 -1
- package/dist/esm/models/errors/forbidden.js +1 -2
- package/dist/esm/models/errors/forbidden.js.map +1 -1
- package/dist/esm/models/errors/httpclienterrors.js +2 -2
- package/dist/esm/models/errors/httpclienterrors.js.map +1 -1
- package/dist/esm/models/errors/internalservererror.js +1 -2
- package/dist/esm/models/errors/internalservererror.js.map +1 -1
- package/dist/esm/models/errors/inviteexpired.js +1 -2
- package/dist/esm/models/errors/inviteexpired.js.map +1 -1
- package/dist/esm/models/errors/notfound.js +1 -2
- package/dist/esm/models/errors/notfound.js.map +1 -1
- package/dist/esm/models/errors/ratelimitexceeded.js +1 -2
- package/dist/esm/models/errors/ratelimitexceeded.js.map +1 -1
- package/dist/esm/models/errors/unauthorized.js +1 -2
- package/dist/esm/models/errors/unauthorized.js.map +1 -1
- package/dist/esm/models/errors/unprocessableentity.js +1 -2
- package/dist/esm/models/errors/unprocessableentity.js.map +1 -1
- package/dist/esm/models/operations/createcustomer.d.ts +178 -0
- package/dist/esm/models/operations/createcustomer.d.ts.map +1 -1
- package/dist/esm/models/operations/createcustomer.js +151 -0
- package/dist/esm/models/operations/createcustomer.js.map +1 -1
- package/dist/esm/models/operations/getcustomer.d.ts +178 -0
- package/dist/esm/models/operations/getcustomer.d.ts.map +1 -1
- package/dist/esm/models/operations/getcustomer.js +151 -0
- package/dist/esm/models/operations/getcustomer.js.map +1 -1
- package/dist/esm/models/operations/getcustomers.d.ts +178 -0
- package/dist/esm/models/operations/getcustomers.d.ts.map +1 -1
- package/dist/esm/models/operations/getcustomers.js +148 -0
- package/dist/esm/models/operations/getcustomers.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +0 -1
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +0 -1
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/updatecustomer.d.ts +178 -0
- package/dist/esm/models/operations/updatecustomer.d.ts.map +1 -1
- package/dist/esm/models/operations/updatecustomer.js +151 -0
- package/dist/esm/models/operations/updatecustomer.js.map +1 -1
- package/dist/esm/sdk/sdk.js +11 -22
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/track.d.ts +0 -9
- package/dist/esm/sdk/track.d.ts.map +1 -1
- package/dist/esm/sdk/track.js +0 -12
- package/dist/esm/sdk/track.js.map +1 -1
- package/docs/sdks/track/README.md +0 -84
- package/package.json +1 -1
- package/src/funcs/domainsList.ts +2 -2
- package/src/funcs/linksList.ts +2 -2
- package/src/lib/config.ts +3 -3
- package/src/lib/security.ts +1 -1
- package/src/models/components/leadcreatedevent.ts +322 -0
- package/src/models/components/leadevent.ts +302 -0
- package/src/models/components/salecreatedevent.ts +322 -0
- package/src/models/components/saleevent.ts +318 -0
- package/src/models/operations/createcustomer.ts +319 -0
- package/src/models/operations/getcustomer.ts +317 -0
- package/src/models/operations/getcustomers.ts +293 -0
- package/src/models/operations/index.ts +0 -1
- package/src/models/operations/updatecustomer.ts +319 -0
- package/src/sdk/track.ts +0 -20
- package/dist/commonjs/funcs/trackCustomer.d.ts +0 -18
- package/dist/commonjs/funcs/trackCustomer.d.ts.map +0 -1
- package/dist/commonjs/funcs/trackCustomer.js +0 -117
- package/dist/commonjs/funcs/trackCustomer.js.map +0 -1
- package/dist/commonjs/models/operations/trackcustomer.d.ts +0 -81
- package/dist/commonjs/models/operations/trackcustomer.d.ts.map +0 -1
- package/dist/commonjs/models/operations/trackcustomer.js +0 -98
- package/dist/commonjs/models/operations/trackcustomer.js.map +0 -1
- package/dist/esm/funcs/trackCustomer.d.ts +0 -18
- package/dist/esm/funcs/trackCustomer.d.ts.map +0 -1
- package/dist/esm/funcs/trackCustomer.js +0 -90
- package/dist/esm/funcs/trackCustomer.js.map +0 -1
- package/dist/esm/models/operations/trackcustomer.d.ts +0 -81
- package/dist/esm/models/operations/trackcustomer.d.ts.map +0 -1
- package/dist/esm/models/operations/trackcustomer.js +0 -68
- package/dist/esm/models/operations/trackcustomer.js.map +0 -1
- package/src/funcs/trackCustomer.ts +0 -175
- package/src/models/operations/trackcustomer.ts +0 -163
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
10
|
|
|
@@ -14,6 +15,58 @@ export type GetCustomerRequest = {
|
|
|
14
15
|
id: string;
|
|
15
16
|
};
|
|
16
17
|
|
|
18
|
+
export type GetCustomerLink = {
|
|
19
|
+
/**
|
|
20
|
+
* The unique ID of the short link.
|
|
21
|
+
*/
|
|
22
|
+
id: string;
|
|
23
|
+
/**
|
|
24
|
+
* 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).
|
|
25
|
+
*/
|
|
26
|
+
domain: string;
|
|
27
|
+
/**
|
|
28
|
+
* The short link slug. If not provided, a random 7-character slug will be generated.
|
|
29
|
+
*/
|
|
30
|
+
key: string;
|
|
31
|
+
/**
|
|
32
|
+
* The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).
|
|
33
|
+
*/
|
|
34
|
+
shortLink: string;
|
|
35
|
+
/**
|
|
36
|
+
* The ID of the program the short link is associated with.
|
|
37
|
+
*/
|
|
38
|
+
programId: string | null;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export type GetCustomerPartner = {
|
|
42
|
+
id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
email: string;
|
|
45
|
+
image?: string | null | undefined;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const GetCustomerType = {
|
|
49
|
+
Percentage: "percentage",
|
|
50
|
+
Flat: "flat",
|
|
51
|
+
} as const;
|
|
52
|
+
export type GetCustomerType = ClosedEnum<typeof GetCustomerType>;
|
|
53
|
+
|
|
54
|
+
export const GetCustomerInterval = {
|
|
55
|
+
Month: "month",
|
|
56
|
+
Year: "year",
|
|
57
|
+
} as const;
|
|
58
|
+
export type GetCustomerInterval = ClosedEnum<typeof GetCustomerInterval>;
|
|
59
|
+
|
|
60
|
+
export type GetCustomerDiscount = {
|
|
61
|
+
id: string;
|
|
62
|
+
couponId: string | null;
|
|
63
|
+
couponTestId: string | null;
|
|
64
|
+
amount: number;
|
|
65
|
+
type: GetCustomerType;
|
|
66
|
+
duration: number | null;
|
|
67
|
+
interval: GetCustomerInterval | null;
|
|
68
|
+
};
|
|
69
|
+
|
|
17
70
|
/**
|
|
18
71
|
* The customer object.
|
|
19
72
|
*/
|
|
@@ -38,10 +91,17 @@ export type GetCustomerResponseBody = {
|
|
|
38
91
|
* Avatar URL of the customer.
|
|
39
92
|
*/
|
|
40
93
|
avatar?: string | null | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Country of the customer.
|
|
96
|
+
*/
|
|
97
|
+
country?: string | null | undefined;
|
|
41
98
|
/**
|
|
42
99
|
* The date the customer was created.
|
|
43
100
|
*/
|
|
44
101
|
createdAt: string;
|
|
102
|
+
link?: GetCustomerLink | null | undefined;
|
|
103
|
+
partner?: GetCustomerPartner | null | undefined;
|
|
104
|
+
discount?: GetCustomerDiscount | null | undefined;
|
|
45
105
|
};
|
|
46
106
|
|
|
47
107
|
/** @internal */
|
|
@@ -98,6 +158,247 @@ export function getCustomerRequestFromJSON(
|
|
|
98
158
|
);
|
|
99
159
|
}
|
|
100
160
|
|
|
161
|
+
/** @internal */
|
|
162
|
+
export const GetCustomerLink$inboundSchema: z.ZodType<
|
|
163
|
+
GetCustomerLink,
|
|
164
|
+
z.ZodTypeDef,
|
|
165
|
+
unknown
|
|
166
|
+
> = z.object({
|
|
167
|
+
id: z.string(),
|
|
168
|
+
domain: z.string(),
|
|
169
|
+
key: z.string(),
|
|
170
|
+
shortLink: z.string(),
|
|
171
|
+
programId: z.nullable(z.string()),
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
/** @internal */
|
|
175
|
+
export type GetCustomerLink$Outbound = {
|
|
176
|
+
id: string;
|
|
177
|
+
domain: string;
|
|
178
|
+
key: string;
|
|
179
|
+
shortLink: string;
|
|
180
|
+
programId: string | null;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
/** @internal */
|
|
184
|
+
export const GetCustomerLink$outboundSchema: z.ZodType<
|
|
185
|
+
GetCustomerLink$Outbound,
|
|
186
|
+
z.ZodTypeDef,
|
|
187
|
+
GetCustomerLink
|
|
188
|
+
> = z.object({
|
|
189
|
+
id: z.string(),
|
|
190
|
+
domain: z.string(),
|
|
191
|
+
key: z.string(),
|
|
192
|
+
shortLink: z.string(),
|
|
193
|
+
programId: z.nullable(z.string()),
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* @internal
|
|
198
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
199
|
+
*/
|
|
200
|
+
export namespace GetCustomerLink$ {
|
|
201
|
+
/** @deprecated use `GetCustomerLink$inboundSchema` instead. */
|
|
202
|
+
export const inboundSchema = GetCustomerLink$inboundSchema;
|
|
203
|
+
/** @deprecated use `GetCustomerLink$outboundSchema` instead. */
|
|
204
|
+
export const outboundSchema = GetCustomerLink$outboundSchema;
|
|
205
|
+
/** @deprecated use `GetCustomerLink$Outbound` instead. */
|
|
206
|
+
export type Outbound = GetCustomerLink$Outbound;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export function getCustomerLinkToJSON(
|
|
210
|
+
getCustomerLink: GetCustomerLink,
|
|
211
|
+
): string {
|
|
212
|
+
return JSON.stringify(GetCustomerLink$outboundSchema.parse(getCustomerLink));
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export function getCustomerLinkFromJSON(
|
|
216
|
+
jsonString: string,
|
|
217
|
+
): SafeParseResult<GetCustomerLink, SDKValidationError> {
|
|
218
|
+
return safeParse(
|
|
219
|
+
jsonString,
|
|
220
|
+
(x) => GetCustomerLink$inboundSchema.parse(JSON.parse(x)),
|
|
221
|
+
`Failed to parse 'GetCustomerLink' from JSON`,
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/** @internal */
|
|
226
|
+
export const GetCustomerPartner$inboundSchema: z.ZodType<
|
|
227
|
+
GetCustomerPartner,
|
|
228
|
+
z.ZodTypeDef,
|
|
229
|
+
unknown
|
|
230
|
+
> = z.object({
|
|
231
|
+
id: z.string(),
|
|
232
|
+
name: z.string(),
|
|
233
|
+
email: z.string(),
|
|
234
|
+
image: z.nullable(z.string()).optional(),
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
/** @internal */
|
|
238
|
+
export type GetCustomerPartner$Outbound = {
|
|
239
|
+
id: string;
|
|
240
|
+
name: string;
|
|
241
|
+
email: string;
|
|
242
|
+
image?: string | null | undefined;
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
/** @internal */
|
|
246
|
+
export const GetCustomerPartner$outboundSchema: z.ZodType<
|
|
247
|
+
GetCustomerPartner$Outbound,
|
|
248
|
+
z.ZodTypeDef,
|
|
249
|
+
GetCustomerPartner
|
|
250
|
+
> = z.object({
|
|
251
|
+
id: z.string(),
|
|
252
|
+
name: z.string(),
|
|
253
|
+
email: z.string(),
|
|
254
|
+
image: z.nullable(z.string()).optional(),
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* @internal
|
|
259
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
260
|
+
*/
|
|
261
|
+
export namespace GetCustomerPartner$ {
|
|
262
|
+
/** @deprecated use `GetCustomerPartner$inboundSchema` instead. */
|
|
263
|
+
export const inboundSchema = GetCustomerPartner$inboundSchema;
|
|
264
|
+
/** @deprecated use `GetCustomerPartner$outboundSchema` instead. */
|
|
265
|
+
export const outboundSchema = GetCustomerPartner$outboundSchema;
|
|
266
|
+
/** @deprecated use `GetCustomerPartner$Outbound` instead. */
|
|
267
|
+
export type Outbound = GetCustomerPartner$Outbound;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export function getCustomerPartnerToJSON(
|
|
271
|
+
getCustomerPartner: GetCustomerPartner,
|
|
272
|
+
): string {
|
|
273
|
+
return JSON.stringify(
|
|
274
|
+
GetCustomerPartner$outboundSchema.parse(getCustomerPartner),
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export function getCustomerPartnerFromJSON(
|
|
279
|
+
jsonString: string,
|
|
280
|
+
): SafeParseResult<GetCustomerPartner, SDKValidationError> {
|
|
281
|
+
return safeParse(
|
|
282
|
+
jsonString,
|
|
283
|
+
(x) => GetCustomerPartner$inboundSchema.parse(JSON.parse(x)),
|
|
284
|
+
`Failed to parse 'GetCustomerPartner' from JSON`,
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/** @internal */
|
|
289
|
+
export const GetCustomerType$inboundSchema: z.ZodNativeEnum<
|
|
290
|
+
typeof GetCustomerType
|
|
291
|
+
> = z.nativeEnum(GetCustomerType);
|
|
292
|
+
|
|
293
|
+
/** @internal */
|
|
294
|
+
export const GetCustomerType$outboundSchema: z.ZodNativeEnum<
|
|
295
|
+
typeof GetCustomerType
|
|
296
|
+
> = GetCustomerType$inboundSchema;
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* @internal
|
|
300
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
301
|
+
*/
|
|
302
|
+
export namespace GetCustomerType$ {
|
|
303
|
+
/** @deprecated use `GetCustomerType$inboundSchema` instead. */
|
|
304
|
+
export const inboundSchema = GetCustomerType$inboundSchema;
|
|
305
|
+
/** @deprecated use `GetCustomerType$outboundSchema` instead. */
|
|
306
|
+
export const outboundSchema = GetCustomerType$outboundSchema;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/** @internal */
|
|
310
|
+
export const GetCustomerInterval$inboundSchema: z.ZodNativeEnum<
|
|
311
|
+
typeof GetCustomerInterval
|
|
312
|
+
> = z.nativeEnum(GetCustomerInterval);
|
|
313
|
+
|
|
314
|
+
/** @internal */
|
|
315
|
+
export const GetCustomerInterval$outboundSchema: z.ZodNativeEnum<
|
|
316
|
+
typeof GetCustomerInterval
|
|
317
|
+
> = GetCustomerInterval$inboundSchema;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* @internal
|
|
321
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
322
|
+
*/
|
|
323
|
+
export namespace GetCustomerInterval$ {
|
|
324
|
+
/** @deprecated use `GetCustomerInterval$inboundSchema` instead. */
|
|
325
|
+
export const inboundSchema = GetCustomerInterval$inboundSchema;
|
|
326
|
+
/** @deprecated use `GetCustomerInterval$outboundSchema` instead. */
|
|
327
|
+
export const outboundSchema = GetCustomerInterval$outboundSchema;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/** @internal */
|
|
331
|
+
export const GetCustomerDiscount$inboundSchema: z.ZodType<
|
|
332
|
+
GetCustomerDiscount,
|
|
333
|
+
z.ZodTypeDef,
|
|
334
|
+
unknown
|
|
335
|
+
> = z.object({
|
|
336
|
+
id: z.string(),
|
|
337
|
+
couponId: z.nullable(z.string()),
|
|
338
|
+
couponTestId: z.nullable(z.string()),
|
|
339
|
+
amount: z.number(),
|
|
340
|
+
type: GetCustomerType$inboundSchema,
|
|
341
|
+
duration: z.nullable(z.number()),
|
|
342
|
+
interval: z.nullable(GetCustomerInterval$inboundSchema),
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
/** @internal */
|
|
346
|
+
export type GetCustomerDiscount$Outbound = {
|
|
347
|
+
id: string;
|
|
348
|
+
couponId: string | null;
|
|
349
|
+
couponTestId: string | null;
|
|
350
|
+
amount: number;
|
|
351
|
+
type: string;
|
|
352
|
+
duration: number | null;
|
|
353
|
+
interval: string | null;
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
/** @internal */
|
|
357
|
+
export const GetCustomerDiscount$outboundSchema: z.ZodType<
|
|
358
|
+
GetCustomerDiscount$Outbound,
|
|
359
|
+
z.ZodTypeDef,
|
|
360
|
+
GetCustomerDiscount
|
|
361
|
+
> = z.object({
|
|
362
|
+
id: z.string(),
|
|
363
|
+
couponId: z.nullable(z.string()),
|
|
364
|
+
couponTestId: z.nullable(z.string()),
|
|
365
|
+
amount: z.number(),
|
|
366
|
+
type: GetCustomerType$outboundSchema,
|
|
367
|
+
duration: z.nullable(z.number()),
|
|
368
|
+
interval: z.nullable(GetCustomerInterval$outboundSchema),
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* @internal
|
|
373
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
374
|
+
*/
|
|
375
|
+
export namespace GetCustomerDiscount$ {
|
|
376
|
+
/** @deprecated use `GetCustomerDiscount$inboundSchema` instead. */
|
|
377
|
+
export const inboundSchema = GetCustomerDiscount$inboundSchema;
|
|
378
|
+
/** @deprecated use `GetCustomerDiscount$outboundSchema` instead. */
|
|
379
|
+
export const outboundSchema = GetCustomerDiscount$outboundSchema;
|
|
380
|
+
/** @deprecated use `GetCustomerDiscount$Outbound` instead. */
|
|
381
|
+
export type Outbound = GetCustomerDiscount$Outbound;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export function getCustomerDiscountToJSON(
|
|
385
|
+
getCustomerDiscount: GetCustomerDiscount,
|
|
386
|
+
): string {
|
|
387
|
+
return JSON.stringify(
|
|
388
|
+
GetCustomerDiscount$outboundSchema.parse(getCustomerDiscount),
|
|
389
|
+
);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
export function getCustomerDiscountFromJSON(
|
|
393
|
+
jsonString: string,
|
|
394
|
+
): SafeParseResult<GetCustomerDiscount, SDKValidationError> {
|
|
395
|
+
return safeParse(
|
|
396
|
+
jsonString,
|
|
397
|
+
(x) => GetCustomerDiscount$inboundSchema.parse(JSON.parse(x)),
|
|
398
|
+
`Failed to parse 'GetCustomerDiscount' from JSON`,
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
|
|
101
402
|
/** @internal */
|
|
102
403
|
export const GetCustomerResponseBody$inboundSchema: z.ZodType<
|
|
103
404
|
GetCustomerResponseBody,
|
|
@@ -109,7 +410,13 @@ export const GetCustomerResponseBody$inboundSchema: z.ZodType<
|
|
|
109
410
|
name: z.string(),
|
|
110
411
|
email: z.nullable(z.string()).optional(),
|
|
111
412
|
avatar: z.nullable(z.string()).optional(),
|
|
413
|
+
country: z.nullable(z.string()).optional(),
|
|
112
414
|
createdAt: z.string(),
|
|
415
|
+
link: z.nullable(z.lazy(() => GetCustomerLink$inboundSchema)).optional(),
|
|
416
|
+
partner: z.nullable(z.lazy(() => GetCustomerPartner$inboundSchema))
|
|
417
|
+
.optional(),
|
|
418
|
+
discount: z.nullable(z.lazy(() => GetCustomerDiscount$inboundSchema))
|
|
419
|
+
.optional(),
|
|
113
420
|
});
|
|
114
421
|
|
|
115
422
|
/** @internal */
|
|
@@ -119,7 +426,11 @@ export type GetCustomerResponseBody$Outbound = {
|
|
|
119
426
|
name: string;
|
|
120
427
|
email?: string | null | undefined;
|
|
121
428
|
avatar?: string | null | undefined;
|
|
429
|
+
country?: string | null | undefined;
|
|
122
430
|
createdAt: string;
|
|
431
|
+
link?: GetCustomerLink$Outbound | null | undefined;
|
|
432
|
+
partner?: GetCustomerPartner$Outbound | null | undefined;
|
|
433
|
+
discount?: GetCustomerDiscount$Outbound | null | undefined;
|
|
123
434
|
};
|
|
124
435
|
|
|
125
436
|
/** @internal */
|
|
@@ -133,7 +444,13 @@ export const GetCustomerResponseBody$outboundSchema: z.ZodType<
|
|
|
133
444
|
name: z.string(),
|
|
134
445
|
email: z.nullable(z.string()).optional(),
|
|
135
446
|
avatar: z.nullable(z.string()).optional(),
|
|
447
|
+
country: z.nullable(z.string()).optional(),
|
|
136
448
|
createdAt: z.string(),
|
|
449
|
+
link: z.nullable(z.lazy(() => GetCustomerLink$outboundSchema)).optional(),
|
|
450
|
+
partner: z.nullable(z.lazy(() => GetCustomerPartner$outboundSchema))
|
|
451
|
+
.optional(),
|
|
452
|
+
discount: z.nullable(z.lazy(() => GetCustomerDiscount$outboundSchema))
|
|
453
|
+
.optional(),
|
|
137
454
|
});
|
|
138
455
|
|
|
139
456
|
/**
|
|
@@ -4,9 +4,62 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
10
|
|
|
11
|
+
export type Link = {
|
|
12
|
+
/**
|
|
13
|
+
* The unique ID of the short link.
|
|
14
|
+
*/
|
|
15
|
+
id: string;
|
|
16
|
+
/**
|
|
17
|
+
* 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).
|
|
18
|
+
*/
|
|
19
|
+
domain: string;
|
|
20
|
+
/**
|
|
21
|
+
* The short link slug. If not provided, a random 7-character slug will be generated.
|
|
22
|
+
*/
|
|
23
|
+
key: string;
|
|
24
|
+
/**
|
|
25
|
+
* The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).
|
|
26
|
+
*/
|
|
27
|
+
shortLink: string;
|
|
28
|
+
/**
|
|
29
|
+
* The ID of the program the short link is associated with.
|
|
30
|
+
*/
|
|
31
|
+
programId: string | null;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type Partner = {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
email: string;
|
|
38
|
+
image?: string | null | undefined;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const Type = {
|
|
42
|
+
Percentage: "percentage",
|
|
43
|
+
Flat: "flat",
|
|
44
|
+
} as const;
|
|
45
|
+
export type Type = ClosedEnum<typeof Type>;
|
|
46
|
+
|
|
47
|
+
export const GetCustomersInterval = {
|
|
48
|
+
Month: "month",
|
|
49
|
+
Year: "year",
|
|
50
|
+
} as const;
|
|
51
|
+
export type GetCustomersInterval = ClosedEnum<typeof GetCustomersInterval>;
|
|
52
|
+
|
|
53
|
+
export type Discount = {
|
|
54
|
+
id: string;
|
|
55
|
+
couponId: string | null;
|
|
56
|
+
couponTestId: string | null;
|
|
57
|
+
amount: number;
|
|
58
|
+
type: Type;
|
|
59
|
+
duration: number | null;
|
|
60
|
+
interval: GetCustomersInterval | null;
|
|
61
|
+
};
|
|
62
|
+
|
|
10
63
|
export type ResponseBody = {
|
|
11
64
|
/**
|
|
12
65
|
* The unique identifier of the customer in Dub.
|
|
@@ -28,12 +81,240 @@ export type ResponseBody = {
|
|
|
28
81
|
* Avatar URL of the customer.
|
|
29
82
|
*/
|
|
30
83
|
avatar?: string | null | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Country of the customer.
|
|
86
|
+
*/
|
|
87
|
+
country?: string | null | undefined;
|
|
31
88
|
/**
|
|
32
89
|
* The date the customer was created.
|
|
33
90
|
*/
|
|
34
91
|
createdAt: string;
|
|
92
|
+
link?: Link | null | undefined;
|
|
93
|
+
partner?: Partner | null | undefined;
|
|
94
|
+
discount?: Discount | null | undefined;
|
|
35
95
|
};
|
|
36
96
|
|
|
97
|
+
/** @internal */
|
|
98
|
+
export const Link$inboundSchema: z.ZodType<Link, z.ZodTypeDef, unknown> = z
|
|
99
|
+
.object({
|
|
100
|
+
id: z.string(),
|
|
101
|
+
domain: z.string(),
|
|
102
|
+
key: z.string(),
|
|
103
|
+
shortLink: z.string(),
|
|
104
|
+
programId: z.nullable(z.string()),
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
/** @internal */
|
|
108
|
+
export type Link$Outbound = {
|
|
109
|
+
id: string;
|
|
110
|
+
domain: string;
|
|
111
|
+
key: string;
|
|
112
|
+
shortLink: string;
|
|
113
|
+
programId: string | null;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
/** @internal */
|
|
117
|
+
export const Link$outboundSchema: z.ZodType<Link$Outbound, z.ZodTypeDef, Link> =
|
|
118
|
+
z.object({
|
|
119
|
+
id: z.string(),
|
|
120
|
+
domain: z.string(),
|
|
121
|
+
key: z.string(),
|
|
122
|
+
shortLink: z.string(),
|
|
123
|
+
programId: z.nullable(z.string()),
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @internal
|
|
128
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
129
|
+
*/
|
|
130
|
+
export namespace Link$ {
|
|
131
|
+
/** @deprecated use `Link$inboundSchema` instead. */
|
|
132
|
+
export const inboundSchema = Link$inboundSchema;
|
|
133
|
+
/** @deprecated use `Link$outboundSchema` instead. */
|
|
134
|
+
export const outboundSchema = Link$outboundSchema;
|
|
135
|
+
/** @deprecated use `Link$Outbound` instead. */
|
|
136
|
+
export type Outbound = Link$Outbound;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function linkToJSON(link: Link): string {
|
|
140
|
+
return JSON.stringify(Link$outboundSchema.parse(link));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export function linkFromJSON(
|
|
144
|
+
jsonString: string,
|
|
145
|
+
): SafeParseResult<Link, SDKValidationError> {
|
|
146
|
+
return safeParse(
|
|
147
|
+
jsonString,
|
|
148
|
+
(x) => Link$inboundSchema.parse(JSON.parse(x)),
|
|
149
|
+
`Failed to parse 'Link' from JSON`,
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/** @internal */
|
|
154
|
+
export const Partner$inboundSchema: z.ZodType<Partner, z.ZodTypeDef, unknown> =
|
|
155
|
+
z.object({
|
|
156
|
+
id: z.string(),
|
|
157
|
+
name: z.string(),
|
|
158
|
+
email: z.string(),
|
|
159
|
+
image: z.nullable(z.string()).optional(),
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
/** @internal */
|
|
163
|
+
export type Partner$Outbound = {
|
|
164
|
+
id: string;
|
|
165
|
+
name: string;
|
|
166
|
+
email: string;
|
|
167
|
+
image?: string | null | undefined;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
/** @internal */
|
|
171
|
+
export const Partner$outboundSchema: z.ZodType<
|
|
172
|
+
Partner$Outbound,
|
|
173
|
+
z.ZodTypeDef,
|
|
174
|
+
Partner
|
|
175
|
+
> = z.object({
|
|
176
|
+
id: z.string(),
|
|
177
|
+
name: z.string(),
|
|
178
|
+
email: z.string(),
|
|
179
|
+
image: z.nullable(z.string()).optional(),
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* @internal
|
|
184
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
185
|
+
*/
|
|
186
|
+
export namespace Partner$ {
|
|
187
|
+
/** @deprecated use `Partner$inboundSchema` instead. */
|
|
188
|
+
export const inboundSchema = Partner$inboundSchema;
|
|
189
|
+
/** @deprecated use `Partner$outboundSchema` instead. */
|
|
190
|
+
export const outboundSchema = Partner$outboundSchema;
|
|
191
|
+
/** @deprecated use `Partner$Outbound` instead. */
|
|
192
|
+
export type Outbound = Partner$Outbound;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export function partnerToJSON(partner: Partner): string {
|
|
196
|
+
return JSON.stringify(Partner$outboundSchema.parse(partner));
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export function partnerFromJSON(
|
|
200
|
+
jsonString: string,
|
|
201
|
+
): SafeParseResult<Partner, SDKValidationError> {
|
|
202
|
+
return safeParse(
|
|
203
|
+
jsonString,
|
|
204
|
+
(x) => Partner$inboundSchema.parse(JSON.parse(x)),
|
|
205
|
+
`Failed to parse 'Partner' from JSON`,
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/** @internal */
|
|
210
|
+
export const Type$inboundSchema: z.ZodNativeEnum<typeof Type> = z.nativeEnum(
|
|
211
|
+
Type,
|
|
212
|
+
);
|
|
213
|
+
|
|
214
|
+
/** @internal */
|
|
215
|
+
export const Type$outboundSchema: z.ZodNativeEnum<typeof Type> =
|
|
216
|
+
Type$inboundSchema;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* @internal
|
|
220
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
221
|
+
*/
|
|
222
|
+
export namespace Type$ {
|
|
223
|
+
/** @deprecated use `Type$inboundSchema` instead. */
|
|
224
|
+
export const inboundSchema = Type$inboundSchema;
|
|
225
|
+
/** @deprecated use `Type$outboundSchema` instead. */
|
|
226
|
+
export const outboundSchema = Type$outboundSchema;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/** @internal */
|
|
230
|
+
export const GetCustomersInterval$inboundSchema: z.ZodNativeEnum<
|
|
231
|
+
typeof GetCustomersInterval
|
|
232
|
+
> = z.nativeEnum(GetCustomersInterval);
|
|
233
|
+
|
|
234
|
+
/** @internal */
|
|
235
|
+
export const GetCustomersInterval$outboundSchema: z.ZodNativeEnum<
|
|
236
|
+
typeof GetCustomersInterval
|
|
237
|
+
> = GetCustomersInterval$inboundSchema;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* @internal
|
|
241
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
242
|
+
*/
|
|
243
|
+
export namespace GetCustomersInterval$ {
|
|
244
|
+
/** @deprecated use `GetCustomersInterval$inboundSchema` instead. */
|
|
245
|
+
export const inboundSchema = GetCustomersInterval$inboundSchema;
|
|
246
|
+
/** @deprecated use `GetCustomersInterval$outboundSchema` instead. */
|
|
247
|
+
export const outboundSchema = GetCustomersInterval$outboundSchema;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/** @internal */
|
|
251
|
+
export const Discount$inboundSchema: z.ZodType<
|
|
252
|
+
Discount,
|
|
253
|
+
z.ZodTypeDef,
|
|
254
|
+
unknown
|
|
255
|
+
> = z.object({
|
|
256
|
+
id: z.string(),
|
|
257
|
+
couponId: z.nullable(z.string()),
|
|
258
|
+
couponTestId: z.nullable(z.string()),
|
|
259
|
+
amount: z.number(),
|
|
260
|
+
type: Type$inboundSchema,
|
|
261
|
+
duration: z.nullable(z.number()),
|
|
262
|
+
interval: z.nullable(GetCustomersInterval$inboundSchema),
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
/** @internal */
|
|
266
|
+
export type Discount$Outbound = {
|
|
267
|
+
id: string;
|
|
268
|
+
couponId: string | null;
|
|
269
|
+
couponTestId: string | null;
|
|
270
|
+
amount: number;
|
|
271
|
+
type: string;
|
|
272
|
+
duration: number | null;
|
|
273
|
+
interval: string | null;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
/** @internal */
|
|
277
|
+
export const Discount$outboundSchema: z.ZodType<
|
|
278
|
+
Discount$Outbound,
|
|
279
|
+
z.ZodTypeDef,
|
|
280
|
+
Discount
|
|
281
|
+
> = z.object({
|
|
282
|
+
id: z.string(),
|
|
283
|
+
couponId: z.nullable(z.string()),
|
|
284
|
+
couponTestId: z.nullable(z.string()),
|
|
285
|
+
amount: z.number(),
|
|
286
|
+
type: Type$outboundSchema,
|
|
287
|
+
duration: z.nullable(z.number()),
|
|
288
|
+
interval: z.nullable(GetCustomersInterval$outboundSchema),
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* @internal
|
|
293
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
294
|
+
*/
|
|
295
|
+
export namespace Discount$ {
|
|
296
|
+
/** @deprecated use `Discount$inboundSchema` instead. */
|
|
297
|
+
export const inboundSchema = Discount$inboundSchema;
|
|
298
|
+
/** @deprecated use `Discount$outboundSchema` instead. */
|
|
299
|
+
export const outboundSchema = Discount$outboundSchema;
|
|
300
|
+
/** @deprecated use `Discount$Outbound` instead. */
|
|
301
|
+
export type Outbound = Discount$Outbound;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export function discountToJSON(discount: Discount): string {
|
|
305
|
+
return JSON.stringify(Discount$outboundSchema.parse(discount));
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export function discountFromJSON(
|
|
309
|
+
jsonString: string,
|
|
310
|
+
): SafeParseResult<Discount, SDKValidationError> {
|
|
311
|
+
return safeParse(
|
|
312
|
+
jsonString,
|
|
313
|
+
(x) => Discount$inboundSchema.parse(JSON.parse(x)),
|
|
314
|
+
`Failed to parse 'Discount' from JSON`,
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
|
|
37
318
|
/** @internal */
|
|
38
319
|
export const ResponseBody$inboundSchema: z.ZodType<
|
|
39
320
|
ResponseBody,
|
|
@@ -45,7 +326,11 @@ export const ResponseBody$inboundSchema: z.ZodType<
|
|
|
45
326
|
name: z.string(),
|
|
46
327
|
email: z.nullable(z.string()).optional(),
|
|
47
328
|
avatar: z.nullable(z.string()).optional(),
|
|
329
|
+
country: z.nullable(z.string()).optional(),
|
|
48
330
|
createdAt: z.string(),
|
|
331
|
+
link: z.nullable(z.lazy(() => Link$inboundSchema)).optional(),
|
|
332
|
+
partner: z.nullable(z.lazy(() => Partner$inboundSchema)).optional(),
|
|
333
|
+
discount: z.nullable(z.lazy(() => Discount$inboundSchema)).optional(),
|
|
49
334
|
});
|
|
50
335
|
|
|
51
336
|
/** @internal */
|
|
@@ -55,7 +340,11 @@ export type ResponseBody$Outbound = {
|
|
|
55
340
|
name: string;
|
|
56
341
|
email?: string | null | undefined;
|
|
57
342
|
avatar?: string | null | undefined;
|
|
343
|
+
country?: string | null | undefined;
|
|
58
344
|
createdAt: string;
|
|
345
|
+
link?: Link$Outbound | null | undefined;
|
|
346
|
+
partner?: Partner$Outbound | null | undefined;
|
|
347
|
+
discount?: Discount$Outbound | null | undefined;
|
|
59
348
|
};
|
|
60
349
|
|
|
61
350
|
/** @internal */
|
|
@@ -69,7 +358,11 @@ export const ResponseBody$outboundSchema: z.ZodType<
|
|
|
69
358
|
name: z.string(),
|
|
70
359
|
email: z.nullable(z.string()).optional(),
|
|
71
360
|
avatar: z.nullable(z.string()).optional(),
|
|
361
|
+
country: z.nullable(z.string()).optional(),
|
|
72
362
|
createdAt: z.string(),
|
|
363
|
+
link: z.nullable(z.lazy(() => Link$outboundSchema)).optional(),
|
|
364
|
+
partner: z.nullable(z.lazy(() => Partner$outboundSchema)).optional(),
|
|
365
|
+
discount: z.nullable(z.lazy(() => Discount$outboundSchema)).optional(),
|
|
73
366
|
});
|
|
74
367
|
|
|
75
368
|
/**
|
|
@@ -25,7 +25,6 @@ export * from "./getworkspace.js";
|
|
|
25
25
|
export * from "./listdomains.js";
|
|
26
26
|
export * from "./listevents.js";
|
|
27
27
|
export * from "./retrieveanalytics.js";
|
|
28
|
-
export * from "./trackcustomer.js";
|
|
29
28
|
export * from "./tracklead.js";
|
|
30
29
|
export * from "./tracksale.js";
|
|
31
30
|
export * from "./updatecustomer.js";
|