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
|
|
|
@@ -26,6 +27,58 @@ export type CreateCustomerRequestBody = {
|
|
|
26
27
|
externalId: string;
|
|
27
28
|
};
|
|
28
29
|
|
|
30
|
+
export type CreateCustomerLink = {
|
|
31
|
+
/**
|
|
32
|
+
* The unique ID of the short link.
|
|
33
|
+
*/
|
|
34
|
+
id: string;
|
|
35
|
+
/**
|
|
36
|
+
* 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).
|
|
37
|
+
*/
|
|
38
|
+
domain: string;
|
|
39
|
+
/**
|
|
40
|
+
* The short link slug. If not provided, a random 7-character slug will be generated.
|
|
41
|
+
*/
|
|
42
|
+
key: string;
|
|
43
|
+
/**
|
|
44
|
+
* The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).
|
|
45
|
+
*/
|
|
46
|
+
shortLink: string;
|
|
47
|
+
/**
|
|
48
|
+
* The ID of the program the short link is associated with.
|
|
49
|
+
*/
|
|
50
|
+
programId: string | null;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export type CreateCustomerPartner = {
|
|
54
|
+
id: string;
|
|
55
|
+
name: string;
|
|
56
|
+
email: string;
|
|
57
|
+
image?: string | null | undefined;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const CreateCustomerType = {
|
|
61
|
+
Percentage: "percentage",
|
|
62
|
+
Flat: "flat",
|
|
63
|
+
} as const;
|
|
64
|
+
export type CreateCustomerType = ClosedEnum<typeof CreateCustomerType>;
|
|
65
|
+
|
|
66
|
+
export const CreateCustomerInterval = {
|
|
67
|
+
Month: "month",
|
|
68
|
+
Year: "year",
|
|
69
|
+
} as const;
|
|
70
|
+
export type CreateCustomerInterval = ClosedEnum<typeof CreateCustomerInterval>;
|
|
71
|
+
|
|
72
|
+
export type CreateCustomerDiscount = {
|
|
73
|
+
id: string;
|
|
74
|
+
couponId: string | null;
|
|
75
|
+
couponTestId: string | null;
|
|
76
|
+
amount: number;
|
|
77
|
+
type: CreateCustomerType;
|
|
78
|
+
duration: number | null;
|
|
79
|
+
interval: CreateCustomerInterval | null;
|
|
80
|
+
};
|
|
81
|
+
|
|
29
82
|
/**
|
|
30
83
|
* The customer was created.
|
|
31
84
|
*/
|
|
@@ -50,10 +103,17 @@ export type CreateCustomerResponseBody = {
|
|
|
50
103
|
* Avatar URL of the customer.
|
|
51
104
|
*/
|
|
52
105
|
avatar?: string | null | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* Country of the customer.
|
|
108
|
+
*/
|
|
109
|
+
country?: string | null | undefined;
|
|
53
110
|
/**
|
|
54
111
|
* The date the customer was created.
|
|
55
112
|
*/
|
|
56
113
|
createdAt: string;
|
|
114
|
+
link?: CreateCustomerLink | null | undefined;
|
|
115
|
+
partner?: CreateCustomerPartner | null | undefined;
|
|
116
|
+
discount?: CreateCustomerDiscount | null | undefined;
|
|
57
117
|
};
|
|
58
118
|
|
|
59
119
|
/** @internal */
|
|
@@ -119,6 +179,249 @@ export function createCustomerRequestBodyFromJSON(
|
|
|
119
179
|
);
|
|
120
180
|
}
|
|
121
181
|
|
|
182
|
+
/** @internal */
|
|
183
|
+
export const CreateCustomerLink$inboundSchema: z.ZodType<
|
|
184
|
+
CreateCustomerLink,
|
|
185
|
+
z.ZodTypeDef,
|
|
186
|
+
unknown
|
|
187
|
+
> = z.object({
|
|
188
|
+
id: z.string(),
|
|
189
|
+
domain: z.string(),
|
|
190
|
+
key: z.string(),
|
|
191
|
+
shortLink: z.string(),
|
|
192
|
+
programId: z.nullable(z.string()),
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
/** @internal */
|
|
196
|
+
export type CreateCustomerLink$Outbound = {
|
|
197
|
+
id: string;
|
|
198
|
+
domain: string;
|
|
199
|
+
key: string;
|
|
200
|
+
shortLink: string;
|
|
201
|
+
programId: string | null;
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
/** @internal */
|
|
205
|
+
export const CreateCustomerLink$outboundSchema: z.ZodType<
|
|
206
|
+
CreateCustomerLink$Outbound,
|
|
207
|
+
z.ZodTypeDef,
|
|
208
|
+
CreateCustomerLink
|
|
209
|
+
> = z.object({
|
|
210
|
+
id: z.string(),
|
|
211
|
+
domain: z.string(),
|
|
212
|
+
key: z.string(),
|
|
213
|
+
shortLink: z.string(),
|
|
214
|
+
programId: z.nullable(z.string()),
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* @internal
|
|
219
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
220
|
+
*/
|
|
221
|
+
export namespace CreateCustomerLink$ {
|
|
222
|
+
/** @deprecated use `CreateCustomerLink$inboundSchema` instead. */
|
|
223
|
+
export const inboundSchema = CreateCustomerLink$inboundSchema;
|
|
224
|
+
/** @deprecated use `CreateCustomerLink$outboundSchema` instead. */
|
|
225
|
+
export const outboundSchema = CreateCustomerLink$outboundSchema;
|
|
226
|
+
/** @deprecated use `CreateCustomerLink$Outbound` instead. */
|
|
227
|
+
export type Outbound = CreateCustomerLink$Outbound;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export function createCustomerLinkToJSON(
|
|
231
|
+
createCustomerLink: CreateCustomerLink,
|
|
232
|
+
): string {
|
|
233
|
+
return JSON.stringify(
|
|
234
|
+
CreateCustomerLink$outboundSchema.parse(createCustomerLink),
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export function createCustomerLinkFromJSON(
|
|
239
|
+
jsonString: string,
|
|
240
|
+
): SafeParseResult<CreateCustomerLink, SDKValidationError> {
|
|
241
|
+
return safeParse(
|
|
242
|
+
jsonString,
|
|
243
|
+
(x) => CreateCustomerLink$inboundSchema.parse(JSON.parse(x)),
|
|
244
|
+
`Failed to parse 'CreateCustomerLink' from JSON`,
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/** @internal */
|
|
249
|
+
export const CreateCustomerPartner$inboundSchema: z.ZodType<
|
|
250
|
+
CreateCustomerPartner,
|
|
251
|
+
z.ZodTypeDef,
|
|
252
|
+
unknown
|
|
253
|
+
> = z.object({
|
|
254
|
+
id: z.string(),
|
|
255
|
+
name: z.string(),
|
|
256
|
+
email: z.string(),
|
|
257
|
+
image: z.nullable(z.string()).optional(),
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
/** @internal */
|
|
261
|
+
export type CreateCustomerPartner$Outbound = {
|
|
262
|
+
id: string;
|
|
263
|
+
name: string;
|
|
264
|
+
email: string;
|
|
265
|
+
image?: string | null | undefined;
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
/** @internal */
|
|
269
|
+
export const CreateCustomerPartner$outboundSchema: z.ZodType<
|
|
270
|
+
CreateCustomerPartner$Outbound,
|
|
271
|
+
z.ZodTypeDef,
|
|
272
|
+
CreateCustomerPartner
|
|
273
|
+
> = z.object({
|
|
274
|
+
id: z.string(),
|
|
275
|
+
name: z.string(),
|
|
276
|
+
email: z.string(),
|
|
277
|
+
image: z.nullable(z.string()).optional(),
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* @internal
|
|
282
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
283
|
+
*/
|
|
284
|
+
export namespace CreateCustomerPartner$ {
|
|
285
|
+
/** @deprecated use `CreateCustomerPartner$inboundSchema` instead. */
|
|
286
|
+
export const inboundSchema = CreateCustomerPartner$inboundSchema;
|
|
287
|
+
/** @deprecated use `CreateCustomerPartner$outboundSchema` instead. */
|
|
288
|
+
export const outboundSchema = CreateCustomerPartner$outboundSchema;
|
|
289
|
+
/** @deprecated use `CreateCustomerPartner$Outbound` instead. */
|
|
290
|
+
export type Outbound = CreateCustomerPartner$Outbound;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export function createCustomerPartnerToJSON(
|
|
294
|
+
createCustomerPartner: CreateCustomerPartner,
|
|
295
|
+
): string {
|
|
296
|
+
return JSON.stringify(
|
|
297
|
+
CreateCustomerPartner$outboundSchema.parse(createCustomerPartner),
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export function createCustomerPartnerFromJSON(
|
|
302
|
+
jsonString: string,
|
|
303
|
+
): SafeParseResult<CreateCustomerPartner, SDKValidationError> {
|
|
304
|
+
return safeParse(
|
|
305
|
+
jsonString,
|
|
306
|
+
(x) => CreateCustomerPartner$inboundSchema.parse(JSON.parse(x)),
|
|
307
|
+
`Failed to parse 'CreateCustomerPartner' from JSON`,
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/** @internal */
|
|
312
|
+
export const CreateCustomerType$inboundSchema: z.ZodNativeEnum<
|
|
313
|
+
typeof CreateCustomerType
|
|
314
|
+
> = z.nativeEnum(CreateCustomerType);
|
|
315
|
+
|
|
316
|
+
/** @internal */
|
|
317
|
+
export const CreateCustomerType$outboundSchema: z.ZodNativeEnum<
|
|
318
|
+
typeof CreateCustomerType
|
|
319
|
+
> = CreateCustomerType$inboundSchema;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* @internal
|
|
323
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
324
|
+
*/
|
|
325
|
+
export namespace CreateCustomerType$ {
|
|
326
|
+
/** @deprecated use `CreateCustomerType$inboundSchema` instead. */
|
|
327
|
+
export const inboundSchema = CreateCustomerType$inboundSchema;
|
|
328
|
+
/** @deprecated use `CreateCustomerType$outboundSchema` instead. */
|
|
329
|
+
export const outboundSchema = CreateCustomerType$outboundSchema;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/** @internal */
|
|
333
|
+
export const CreateCustomerInterval$inboundSchema: z.ZodNativeEnum<
|
|
334
|
+
typeof CreateCustomerInterval
|
|
335
|
+
> = z.nativeEnum(CreateCustomerInterval);
|
|
336
|
+
|
|
337
|
+
/** @internal */
|
|
338
|
+
export const CreateCustomerInterval$outboundSchema: z.ZodNativeEnum<
|
|
339
|
+
typeof CreateCustomerInterval
|
|
340
|
+
> = CreateCustomerInterval$inboundSchema;
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* @internal
|
|
344
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
345
|
+
*/
|
|
346
|
+
export namespace CreateCustomerInterval$ {
|
|
347
|
+
/** @deprecated use `CreateCustomerInterval$inboundSchema` instead. */
|
|
348
|
+
export const inboundSchema = CreateCustomerInterval$inboundSchema;
|
|
349
|
+
/** @deprecated use `CreateCustomerInterval$outboundSchema` instead. */
|
|
350
|
+
export const outboundSchema = CreateCustomerInterval$outboundSchema;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/** @internal */
|
|
354
|
+
export const CreateCustomerDiscount$inboundSchema: z.ZodType<
|
|
355
|
+
CreateCustomerDiscount,
|
|
356
|
+
z.ZodTypeDef,
|
|
357
|
+
unknown
|
|
358
|
+
> = z.object({
|
|
359
|
+
id: z.string(),
|
|
360
|
+
couponId: z.nullable(z.string()),
|
|
361
|
+
couponTestId: z.nullable(z.string()),
|
|
362
|
+
amount: z.number(),
|
|
363
|
+
type: CreateCustomerType$inboundSchema,
|
|
364
|
+
duration: z.nullable(z.number()),
|
|
365
|
+
interval: z.nullable(CreateCustomerInterval$inboundSchema),
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
/** @internal */
|
|
369
|
+
export type CreateCustomerDiscount$Outbound = {
|
|
370
|
+
id: string;
|
|
371
|
+
couponId: string | null;
|
|
372
|
+
couponTestId: string | null;
|
|
373
|
+
amount: number;
|
|
374
|
+
type: string;
|
|
375
|
+
duration: number | null;
|
|
376
|
+
interval: string | null;
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
/** @internal */
|
|
380
|
+
export const CreateCustomerDiscount$outboundSchema: z.ZodType<
|
|
381
|
+
CreateCustomerDiscount$Outbound,
|
|
382
|
+
z.ZodTypeDef,
|
|
383
|
+
CreateCustomerDiscount
|
|
384
|
+
> = z.object({
|
|
385
|
+
id: z.string(),
|
|
386
|
+
couponId: z.nullable(z.string()),
|
|
387
|
+
couponTestId: z.nullable(z.string()),
|
|
388
|
+
amount: z.number(),
|
|
389
|
+
type: CreateCustomerType$outboundSchema,
|
|
390
|
+
duration: z.nullable(z.number()),
|
|
391
|
+
interval: z.nullable(CreateCustomerInterval$outboundSchema),
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* @internal
|
|
396
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
397
|
+
*/
|
|
398
|
+
export namespace CreateCustomerDiscount$ {
|
|
399
|
+
/** @deprecated use `CreateCustomerDiscount$inboundSchema` instead. */
|
|
400
|
+
export const inboundSchema = CreateCustomerDiscount$inboundSchema;
|
|
401
|
+
/** @deprecated use `CreateCustomerDiscount$outboundSchema` instead. */
|
|
402
|
+
export const outboundSchema = CreateCustomerDiscount$outboundSchema;
|
|
403
|
+
/** @deprecated use `CreateCustomerDiscount$Outbound` instead. */
|
|
404
|
+
export type Outbound = CreateCustomerDiscount$Outbound;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
export function createCustomerDiscountToJSON(
|
|
408
|
+
createCustomerDiscount: CreateCustomerDiscount,
|
|
409
|
+
): string {
|
|
410
|
+
return JSON.stringify(
|
|
411
|
+
CreateCustomerDiscount$outboundSchema.parse(createCustomerDiscount),
|
|
412
|
+
);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
export function createCustomerDiscountFromJSON(
|
|
416
|
+
jsonString: string,
|
|
417
|
+
): SafeParseResult<CreateCustomerDiscount, SDKValidationError> {
|
|
418
|
+
return safeParse(
|
|
419
|
+
jsonString,
|
|
420
|
+
(x) => CreateCustomerDiscount$inboundSchema.parse(JSON.parse(x)),
|
|
421
|
+
`Failed to parse 'CreateCustomerDiscount' from JSON`,
|
|
422
|
+
);
|
|
423
|
+
}
|
|
424
|
+
|
|
122
425
|
/** @internal */
|
|
123
426
|
export const CreateCustomerResponseBody$inboundSchema: z.ZodType<
|
|
124
427
|
CreateCustomerResponseBody,
|
|
@@ -130,7 +433,13 @@ export const CreateCustomerResponseBody$inboundSchema: z.ZodType<
|
|
|
130
433
|
name: z.string(),
|
|
131
434
|
email: z.nullable(z.string()).optional(),
|
|
132
435
|
avatar: z.nullable(z.string()).optional(),
|
|
436
|
+
country: z.nullable(z.string()).optional(),
|
|
133
437
|
createdAt: z.string(),
|
|
438
|
+
link: z.nullable(z.lazy(() => CreateCustomerLink$inboundSchema)).optional(),
|
|
439
|
+
partner: z.nullable(z.lazy(() => CreateCustomerPartner$inboundSchema))
|
|
440
|
+
.optional(),
|
|
441
|
+
discount: z.nullable(z.lazy(() => CreateCustomerDiscount$inboundSchema))
|
|
442
|
+
.optional(),
|
|
134
443
|
});
|
|
135
444
|
|
|
136
445
|
/** @internal */
|
|
@@ -140,7 +449,11 @@ export type CreateCustomerResponseBody$Outbound = {
|
|
|
140
449
|
name: string;
|
|
141
450
|
email?: string | null | undefined;
|
|
142
451
|
avatar?: string | null | undefined;
|
|
452
|
+
country?: string | null | undefined;
|
|
143
453
|
createdAt: string;
|
|
454
|
+
link?: CreateCustomerLink$Outbound | null | undefined;
|
|
455
|
+
partner?: CreateCustomerPartner$Outbound | null | undefined;
|
|
456
|
+
discount?: CreateCustomerDiscount$Outbound | null | undefined;
|
|
144
457
|
};
|
|
145
458
|
|
|
146
459
|
/** @internal */
|
|
@@ -154,7 +467,13 @@ export const CreateCustomerResponseBody$outboundSchema: z.ZodType<
|
|
|
154
467
|
name: z.string(),
|
|
155
468
|
email: z.nullable(z.string()).optional(),
|
|
156
469
|
avatar: z.nullable(z.string()).optional(),
|
|
470
|
+
country: z.nullable(z.string()).optional(),
|
|
157
471
|
createdAt: z.string(),
|
|
472
|
+
link: z.nullable(z.lazy(() => CreateCustomerLink$outboundSchema)).optional(),
|
|
473
|
+
partner: z.nullable(z.lazy(() => CreateCustomerPartner$outboundSchema))
|
|
474
|
+
.optional(),
|
|
475
|
+
discount: z.nullable(z.lazy(() => CreateCustomerDiscount$outboundSchema))
|
|
476
|
+
.optional(),
|
|
158
477
|
});
|
|
159
478
|
|
|
160
479
|
/**
|