dub 0.70.0 → 0.71.0
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 +11 -7
- package/dist/commonjs/funcs/bountiesApproveSubmission.d.ts +18 -0
- package/dist/commonjs/funcs/bountiesApproveSubmission.d.ts.map +1 -0
- package/dist/commonjs/funcs/bountiesApproveSubmission.js +140 -0
- package/dist/commonjs/funcs/bountiesApproveSubmission.js.map +1 -0
- package/dist/commonjs/funcs/bountiesListSubmissions.d.ts +18 -0
- package/dist/commonjs/funcs/bountiesListSubmissions.d.ts.map +1 -0
- package/dist/commonjs/funcs/bountiesListSubmissions.js +146 -0
- package/dist/commonjs/funcs/bountiesListSubmissions.js.map +1 -0
- package/dist/commonjs/funcs/bountiesRejectSubmission.d.ts +18 -0
- package/dist/commonjs/funcs/bountiesRejectSubmission.d.ts.map +1 -0
- package/dist/commonjs/funcs/{workspacesUpdate.js → bountiesRejectSubmission.js} +17 -18
- package/dist/commonjs/funcs/bountiesRejectSubmission.js.map +1 -0
- package/dist/commonjs/funcs/partnersDeactivate.d.ts +18 -0
- package/dist/commonjs/funcs/partnersDeactivate.d.ts.map +1 -0
- package/dist/commonjs/funcs/{workspacesGet.js → partnersDeactivate.js} +14 -18
- package/dist/commonjs/funcs/partnersDeactivate.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/models/components/commissioncreatedevent.d.ts +54 -6
- package/dist/commonjs/models/components/commissioncreatedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/commissioncreatedevent.js +33 -3
- package/dist/commonjs/models/components/commissioncreatedevent.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +0 -1
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +0 -1
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/leadcreatedevent.d.ts +21 -6
- package/dist/commonjs/models/components/leadcreatedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/leadcreatedevent.js +8 -2
- package/dist/commonjs/models/components/leadcreatedevent.js.map +1 -1
- package/dist/commonjs/models/components/partnerenrolledevent.d.ts +402 -0
- package/dist/commonjs/models/components/partnerenrolledevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/partnerenrolledevent.js +421 -1
- package/dist/commonjs/models/components/partnerenrolledevent.js.map +1 -1
- package/dist/commonjs/models/components/salecreatedevent.d.ts +21 -6
- package/dist/commonjs/models/components/salecreatedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/salecreatedevent.js +8 -2
- package/dist/commonjs/models/components/salecreatedevent.js.map +1 -1
- package/dist/commonjs/models/operations/approvebountysubmission.d.ts +130 -0
- package/dist/commonjs/models/operations/approvebountysubmission.d.ts.map +1 -0
- package/dist/commonjs/models/operations/approvebountysubmission.js +107 -0
- package/dist/commonjs/models/operations/approvebountysubmission.js.map +1 -0
- package/dist/commonjs/models/operations/createpartner.d.ts +130 -0
- package/dist/commonjs/models/operations/createpartner.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createpartner.js +183 -1
- package/dist/commonjs/models/operations/createpartner.js.map +1 -1
- package/dist/commonjs/models/operations/deactivatepartner.d.ts +34 -0
- package/dist/commonjs/models/operations/deactivatepartner.d.ts.map +1 -0
- package/dist/commonjs/models/operations/{getworkspace.js → deactivatepartner.js} +17 -7
- package/dist/commonjs/models/operations/deactivatepartner.js.map +1 -0
- package/dist/commonjs/models/operations/getcustomer.d.ts +17 -5
- package/dist/commonjs/models/operations/getcustomer.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getcustomer.js +4 -1
- package/dist/commonjs/models/operations/getcustomer.js.map +1 -1
- package/dist/commonjs/models/operations/getcustomers.d.ts +19 -5
- package/dist/commonjs/models/operations/getcustomers.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getcustomers.js +6 -1
- package/dist/commonjs/models/operations/getcustomers.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +4 -2
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +4 -2
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listbountysubmissions.d.ts +183 -0
- package/dist/commonjs/models/operations/listbountysubmissions.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listbountysubmissions.js +129 -0
- package/dist/commonjs/models/operations/listbountysubmissions.js.map +1 -0
- package/dist/commonjs/models/operations/listcommissions.d.ts +17 -5
- package/dist/commonjs/models/operations/listcommissions.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listcommissions.js +4 -1
- package/dist/commonjs/models/operations/listcommissions.js.map +1 -1
- package/dist/commonjs/models/operations/listevents.d.ts +34 -10
- package/dist/commonjs/models/operations/listevents.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listevents.js +8 -2
- package/dist/commonjs/models/operations/listevents.js.map +1 -1
- package/dist/commonjs/models/operations/listpartners.d.ts +130 -0
- package/dist/commonjs/models/operations/listpartners.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listpartners.js +179 -1
- package/dist/commonjs/models/operations/listpartners.js.map +1 -1
- package/dist/commonjs/models/operations/rejectbountysubmission.d.ts +151 -0
- package/dist/commonjs/models/operations/rejectbountysubmission.d.ts.map +1 -0
- package/dist/commonjs/models/operations/rejectbountysubmission.js +120 -0
- package/dist/commonjs/models/operations/rejectbountysubmission.js.map +1 -0
- package/dist/commonjs/models/operations/updatecommission.d.ts +17 -5
- package/dist/commonjs/models/operations/updatecommission.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatecommission.js +4 -1
- package/dist/commonjs/models/operations/updatecommission.js.map +1 -1
- package/dist/commonjs/models/operations/updatecustomer.d.ts +17 -5
- package/dist/commonjs/models/operations/updatecustomer.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatecustomer.js +4 -1
- package/dist/commonjs/models/operations/updatecustomer.js.map +1 -1
- package/dist/commonjs/models/operations/upsertpartnerlink.d.ts +3 -3
- package/dist/commonjs/models/operations/upsertpartnerlink.d.ts.map +1 -1
- package/dist/commonjs/models/operations/upsertpartnerlink.js +1 -1
- package/dist/commonjs/models/operations/upsertpartnerlink.js.map +1 -1
- package/dist/commonjs/sdk/bounties.d.ts +26 -0
- package/dist/commonjs/sdk/bounties.d.ts.map +1 -0
- package/dist/commonjs/sdk/bounties.js +42 -0
- package/dist/commonjs/sdk/bounties.js.map +1 -0
- package/dist/commonjs/sdk/partners.d.ts +7 -0
- package/dist/commonjs/sdk/partners.d.ts.map +1 -1
- package/dist/commonjs/sdk/partners.js +10 -0
- package/dist/commonjs/sdk/partners.js.map +1 -1
- package/dist/commonjs/sdk/sdk.d.ts +3 -3
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -4
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/bountiesApproveSubmission.d.ts +18 -0
- package/dist/esm/funcs/bountiesApproveSubmission.d.ts.map +1 -0
- package/dist/esm/funcs/bountiesApproveSubmission.js +104 -0
- package/dist/esm/funcs/bountiesApproveSubmission.js.map +1 -0
- package/dist/esm/funcs/bountiesListSubmissions.d.ts +18 -0
- package/dist/esm/funcs/bountiesListSubmissions.d.ts.map +1 -0
- package/dist/esm/funcs/bountiesListSubmissions.js +110 -0
- package/dist/esm/funcs/bountiesListSubmissions.js.map +1 -0
- package/dist/esm/funcs/bountiesRejectSubmission.d.ts +18 -0
- package/dist/esm/funcs/bountiesRejectSubmission.d.ts.map +1 -0
- package/dist/esm/funcs/{workspacesUpdate.js → bountiesRejectSubmission.js} +16 -17
- package/dist/esm/funcs/bountiesRejectSubmission.js.map +1 -0
- package/dist/esm/funcs/partnersDeactivate.d.ts +18 -0
- package/dist/esm/funcs/partnersDeactivate.d.ts.map +1 -0
- package/dist/esm/funcs/{workspacesGet.js → partnersDeactivate.js} +14 -18
- package/dist/esm/funcs/partnersDeactivate.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/models/components/commissioncreatedevent.d.ts +54 -6
- package/dist/esm/models/components/commissioncreatedevent.d.ts.map +1 -1
- package/dist/esm/models/components/commissioncreatedevent.js +30 -2
- package/dist/esm/models/components/commissioncreatedevent.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +0 -1
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +0 -1
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/leadcreatedevent.d.ts +21 -6
- package/dist/esm/models/components/leadcreatedevent.d.ts.map +1 -1
- package/dist/esm/models/components/leadcreatedevent.js +8 -2
- package/dist/esm/models/components/leadcreatedevent.js.map +1 -1
- package/dist/esm/models/components/partnerenrolledevent.d.ts +402 -0
- package/dist/esm/models/components/partnerenrolledevent.d.ts.map +1 -1
- package/dist/esm/models/components/partnerenrolledevent.js +391 -0
- package/dist/esm/models/components/partnerenrolledevent.js.map +1 -1
- package/dist/esm/models/components/salecreatedevent.d.ts +21 -6
- package/dist/esm/models/components/salecreatedevent.d.ts.map +1 -1
- package/dist/esm/models/components/salecreatedevent.js +8 -2
- package/dist/esm/models/components/salecreatedevent.js.map +1 -1
- package/dist/esm/models/operations/approvebountysubmission.d.ts +130 -0
- package/dist/esm/models/operations/approvebountysubmission.d.ts.map +1 -0
- package/dist/esm/models/operations/approvebountysubmission.js +67 -0
- package/dist/esm/models/operations/approvebountysubmission.js.map +1 -0
- package/dist/esm/models/operations/createpartner.d.ts +130 -0
- package/dist/esm/models/operations/createpartner.d.ts.map +1 -1
- package/dist/esm/models/operations/createpartner.js +168 -0
- package/dist/esm/models/operations/createpartner.js.map +1 -1
- package/dist/esm/models/operations/deactivatepartner.d.ts +34 -0
- package/dist/esm/models/operations/deactivatepartner.d.ts.map +1 -0
- package/dist/esm/models/operations/deactivatepartner.js +21 -0
- package/dist/esm/models/operations/deactivatepartner.js.map +1 -0
- package/dist/esm/models/operations/getcustomer.d.ts +17 -5
- package/dist/esm/models/operations/getcustomer.d.ts.map +1 -1
- package/dist/esm/models/operations/getcustomer.js +4 -1
- package/dist/esm/models/operations/getcustomer.js.map +1 -1
- package/dist/esm/models/operations/getcustomers.d.ts +19 -5
- package/dist/esm/models/operations/getcustomers.d.ts.map +1 -1
- package/dist/esm/models/operations/getcustomers.js +6 -1
- package/dist/esm/models/operations/getcustomers.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +4 -2
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +4 -2
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listbountysubmissions.d.ts +183 -0
- package/dist/esm/models/operations/listbountysubmissions.d.ts.map +1 -0
- package/dist/esm/models/operations/listbountysubmissions.js +90 -0
- package/dist/esm/models/operations/listbountysubmissions.js.map +1 -0
- package/dist/esm/models/operations/listcommissions.d.ts +17 -5
- package/dist/esm/models/operations/listcommissions.d.ts.map +1 -1
- package/dist/esm/models/operations/listcommissions.js +4 -1
- package/dist/esm/models/operations/listcommissions.js.map +1 -1
- package/dist/esm/models/operations/listevents.d.ts +34 -10
- package/dist/esm/models/operations/listevents.d.ts.map +1 -1
- package/dist/esm/models/operations/listevents.js +8 -2
- package/dist/esm/models/operations/listevents.js.map +1 -1
- package/dist/esm/models/operations/listpartners.d.ts +130 -0
- package/dist/esm/models/operations/listpartners.d.ts.map +1 -1
- package/dist/esm/models/operations/listpartners.js +164 -0
- package/dist/esm/models/operations/listpartners.js.map +1 -1
- package/dist/esm/models/operations/rejectbountysubmission.d.ts +151 -0
- package/dist/esm/models/operations/rejectbountysubmission.d.ts.map +1 -0
- package/dist/esm/models/operations/rejectbountysubmission.js +80 -0
- package/dist/esm/models/operations/rejectbountysubmission.js.map +1 -0
- package/dist/esm/models/operations/updatecommission.d.ts +17 -5
- package/dist/esm/models/operations/updatecommission.d.ts.map +1 -1
- package/dist/esm/models/operations/updatecommission.js +4 -1
- package/dist/esm/models/operations/updatecommission.js.map +1 -1
- package/dist/esm/models/operations/updatecustomer.d.ts +17 -5
- package/dist/esm/models/operations/updatecustomer.d.ts.map +1 -1
- package/dist/esm/models/operations/updatecustomer.js +4 -1
- package/dist/esm/models/operations/updatecustomer.js.map +1 -1
- package/dist/esm/models/operations/upsertpartnerlink.d.ts +3 -3
- package/dist/esm/models/operations/upsertpartnerlink.d.ts.map +1 -1
- package/dist/esm/models/operations/upsertpartnerlink.js +1 -1
- package/dist/esm/models/operations/upsertpartnerlink.js.map +1 -1
- package/dist/esm/sdk/bounties.d.ts +26 -0
- package/dist/esm/sdk/bounties.d.ts.map +1 -0
- package/dist/esm/sdk/bounties.js +38 -0
- package/dist/esm/sdk/bounties.js.map +1 -0
- package/dist/esm/sdk/partners.d.ts +7 -0
- package/dist/esm/sdk/partners.d.ts.map +1 -1
- package/dist/esm/sdk/partners.js +10 -0
- package/dist/esm/sdk/partners.js.map +1 -1
- package/dist/esm/sdk/sdk.d.ts +3 -3
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -4
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/bountiesApproveSubmission.ts +227 -0
- package/src/funcs/bountiesListSubmissions.ts +235 -0
- package/src/funcs/{workspacesUpdate.ts → bountiesRejectSubmission.ts} +23 -25
- package/src/funcs/{workspacesGet.ts → partnersDeactivate.ts} +21 -23
- package/src/lib/config.ts +3 -3
- package/src/models/components/commissioncreatedevent.ts +100 -8
- package/src/models/components/index.ts +0 -1
- package/src/models/components/leadcreatedevent.ts +29 -8
- package/src/models/components/partnerenrolledevent.ts +959 -0
- package/src/models/components/salecreatedevent.ts +29 -8
- package/src/models/operations/approvebountysubmission.ts +235 -0
- package/src/models/operations/createpartner.ts +415 -0
- package/src/models/operations/deactivatepartner.ts +74 -0
- package/src/models/operations/getcustomer.ts +21 -6
- package/src/models/operations/getcustomers.ts +23 -6
- package/src/models/operations/index.ts +4 -2
- package/src/models/operations/listbountysubmissions.ts +287 -0
- package/src/models/operations/listcommissions.ts +21 -6
- package/src/models/operations/listevents.ts +42 -12
- package/src/models/operations/listpartners.ts +446 -0
- package/src/models/operations/rejectbountysubmission.ts +261 -0
- package/src/models/operations/updatecommission.ts +21 -6
- package/src/models/operations/updatecustomer.ts +21 -6
- package/src/models/operations/upsertpartnerlink.ts +4 -4
- package/src/sdk/bounties.ts +63 -0
- package/src/sdk/partners.ts +18 -0
- package/src/sdk/sdk.ts +6 -6
- package/dist/commonjs/funcs/workspacesGet.d.ts +0 -19
- package/dist/commonjs/funcs/workspacesGet.d.ts.map +0 -1
- package/dist/commonjs/funcs/workspacesGet.js.map +0 -1
- package/dist/commonjs/funcs/workspacesUpdate.d.ts +0 -19
- package/dist/commonjs/funcs/workspacesUpdate.d.ts.map +0 -1
- package/dist/commonjs/funcs/workspacesUpdate.js.map +0 -1
- package/dist/commonjs/models/components/workspaceschema.d.ts +0 -222
- package/dist/commonjs/models/components/workspaceschema.d.ts.map +0 -1
- package/dist/commonjs/models/components/workspaceschema.js +0 -131
- package/dist/commonjs/models/components/workspaceschema.js.map +0 -1
- package/dist/commonjs/models/operations/getworkspace.d.ts +0 -15
- package/dist/commonjs/models/operations/getworkspace.d.ts.map +0 -1
- package/dist/commonjs/models/operations/getworkspace.js.map +0 -1
- package/dist/commonjs/models/operations/updateworkspace.d.ts +0 -33
- package/dist/commonjs/models/operations/updateworkspace.d.ts.map +0 -1
- package/dist/commonjs/models/operations/updateworkspace.js +0 -67
- package/dist/commonjs/models/operations/updateworkspace.js.map +0 -1
- package/dist/commonjs/sdk/workspaces.d.ts +0 -20
- package/dist/commonjs/sdk/workspaces.d.ts.map +0 -1
- package/dist/commonjs/sdk/workspaces.js +0 -32
- package/dist/commonjs/sdk/workspaces.js.map +0 -1
- package/dist/esm/funcs/workspacesGet.d.ts +0 -19
- package/dist/esm/funcs/workspacesGet.d.ts.map +0 -1
- package/dist/esm/funcs/workspacesGet.js.map +0 -1
- package/dist/esm/funcs/workspacesUpdate.d.ts +0 -19
- package/dist/esm/funcs/workspacesUpdate.d.ts.map +0 -1
- package/dist/esm/funcs/workspacesUpdate.js.map +0 -1
- package/dist/esm/models/components/workspaceschema.d.ts +0 -222
- package/dist/esm/models/components/workspaceschema.d.ts.map +0 -1
- package/dist/esm/models/components/workspaceschema.js +0 -92
- package/dist/esm/models/components/workspaceschema.js.map +0 -1
- package/dist/esm/models/operations/getworkspace.d.ts +0 -15
- package/dist/esm/models/operations/getworkspace.d.ts.map +0 -1
- package/dist/esm/models/operations/getworkspace.js +0 -12
- package/dist/esm/models/operations/getworkspace.js.map +0 -1
- package/dist/esm/models/operations/updateworkspace.d.ts +0 -33
- package/dist/esm/models/operations/updateworkspace.d.ts.map +0 -1
- package/dist/esm/models/operations/updateworkspace.js +0 -29
- package/dist/esm/models/operations/updateworkspace.js.map +0 -1
- package/dist/esm/sdk/workspaces.d.ts +0 -20
- package/dist/esm/sdk/workspaces.d.ts.map +0 -1
- package/dist/esm/sdk/workspaces.js +0 -28
- package/dist/esm/sdk/workspaces.js.map +0 -1
- package/src/models/components/workspaceschema.ts +0 -315
- package/src/models/operations/getworkspace.ts +0 -34
- package/src/models/operations/updateworkspace.ts +0 -78
- package/src/sdk/workspaces.ts +0 -48
|
@@ -25,10 +25,6 @@ export type SaleCreatedEventCustomer = {
|
|
|
25
25
|
* The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`).
|
|
26
26
|
*/
|
|
27
27
|
id: string;
|
|
28
|
-
/**
|
|
29
|
-
* Unique identifier for the customer in the client's app.
|
|
30
|
-
*/
|
|
31
|
-
externalId: string;
|
|
32
28
|
/**
|
|
33
29
|
* Name of the customer.
|
|
34
30
|
*/
|
|
@@ -41,6 +37,14 @@ export type SaleCreatedEventCustomer = {
|
|
|
41
37
|
* Avatar URL of the customer.
|
|
42
38
|
*/
|
|
43
39
|
avatar?: string | null | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Unique identifier for the customer in the client's app.
|
|
42
|
+
*/
|
|
43
|
+
externalId: string;
|
|
44
|
+
/**
|
|
45
|
+
* The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.
|
|
46
|
+
*/
|
|
47
|
+
stripeCustomerId?: string | null | undefined;
|
|
44
48
|
/**
|
|
45
49
|
* Country of the customer.
|
|
46
50
|
*/
|
|
@@ -54,9 +58,17 @@ export type SaleCreatedEventCustomer = {
|
|
|
54
58
|
*/
|
|
55
59
|
saleAmount?: number | null | undefined;
|
|
56
60
|
/**
|
|
57
|
-
* The date the customer was created.
|
|
61
|
+
* The date the customer was created (usually the signup date or trial start date).
|
|
58
62
|
*/
|
|
59
63
|
createdAt: string;
|
|
64
|
+
/**
|
|
65
|
+
* The date the customer made their first sale. Useful for calculating the time to first sale and LTV.
|
|
66
|
+
*/
|
|
67
|
+
firstSaleAt?: string | null | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* The date the customer canceled their subscription. Useful for calculating LTV and churn rate.
|
|
70
|
+
*/
|
|
71
|
+
subscriptionCanceledAt?: string | null | undefined;
|
|
60
72
|
};
|
|
61
73
|
|
|
62
74
|
export type SaleCreatedEventClick = {
|
|
@@ -322,26 +334,32 @@ export const SaleCreatedEventCustomer$inboundSchema: z.ZodType<
|
|
|
322
334
|
unknown
|
|
323
335
|
> = z.object({
|
|
324
336
|
id: z.string(),
|
|
325
|
-
externalId: z.string(),
|
|
326
337
|
name: z.string(),
|
|
327
338
|
email: z.nullable(z.string()).optional(),
|
|
328
339
|
avatar: z.nullable(z.string()).optional(),
|
|
340
|
+
externalId: z.string(),
|
|
341
|
+
stripeCustomerId: z.nullable(z.string()).optional(),
|
|
329
342
|
country: z.nullable(z.string()).optional(),
|
|
330
343
|
sales: z.nullable(z.number()).optional(),
|
|
331
344
|
saleAmount: z.nullable(z.number()).optional(),
|
|
332
345
|
createdAt: z.string(),
|
|
346
|
+
firstSaleAt: z.nullable(z.string()).optional(),
|
|
347
|
+
subscriptionCanceledAt: z.nullable(z.string()).optional(),
|
|
333
348
|
});
|
|
334
349
|
/** @internal */
|
|
335
350
|
export type SaleCreatedEventCustomer$Outbound = {
|
|
336
351
|
id: string;
|
|
337
|
-
externalId: string;
|
|
338
352
|
name: string;
|
|
339
353
|
email?: string | null | undefined;
|
|
340
354
|
avatar?: string | null | undefined;
|
|
355
|
+
externalId: string;
|
|
356
|
+
stripeCustomerId?: string | null | undefined;
|
|
341
357
|
country?: string | null | undefined;
|
|
342
358
|
sales?: number | null | undefined;
|
|
343
359
|
saleAmount?: number | null | undefined;
|
|
344
360
|
createdAt: string;
|
|
361
|
+
firstSaleAt?: string | null | undefined;
|
|
362
|
+
subscriptionCanceledAt?: string | null | undefined;
|
|
345
363
|
};
|
|
346
364
|
|
|
347
365
|
/** @internal */
|
|
@@ -351,14 +369,17 @@ export const SaleCreatedEventCustomer$outboundSchema: z.ZodType<
|
|
|
351
369
|
SaleCreatedEventCustomer
|
|
352
370
|
> = z.object({
|
|
353
371
|
id: z.string(),
|
|
354
|
-
externalId: z.string(),
|
|
355
372
|
name: z.string(),
|
|
356
373
|
email: z.nullable(z.string()).optional(),
|
|
357
374
|
avatar: z.nullable(z.string()).optional(),
|
|
375
|
+
externalId: z.string(),
|
|
376
|
+
stripeCustomerId: z.nullable(z.string()).optional(),
|
|
358
377
|
country: z.nullable(z.string()).optional(),
|
|
359
378
|
sales: z.nullable(z.number()).optional(),
|
|
360
379
|
saleAmount: z.nullable(z.number()).optional(),
|
|
361
380
|
createdAt: z.string(),
|
|
381
|
+
firstSaleAt: z.nullable(z.string()).optional(),
|
|
382
|
+
subscriptionCanceledAt: z.nullable(z.string()).optional(),
|
|
362
383
|
});
|
|
363
384
|
|
|
364
385
|
export function saleCreatedEventCustomerToJSON(
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type ApproveBountySubmissionRequestBody = {
|
|
13
|
+
/**
|
|
14
|
+
* The reward amount for the performance-based bounty. Applicable if the bounty reward amount is not set.
|
|
15
|
+
*/
|
|
16
|
+
rewardAmount?: number | null | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type ApproveBountySubmissionRequest = {
|
|
20
|
+
/**
|
|
21
|
+
* The ID of the bounty
|
|
22
|
+
*/
|
|
23
|
+
bountyId: string;
|
|
24
|
+
/**
|
|
25
|
+
* The ID of the bounty submission
|
|
26
|
+
*/
|
|
27
|
+
submissionId: string;
|
|
28
|
+
requestBody?: ApproveBountySubmissionRequestBody | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export type ApproveBountySubmissionFiles = {
|
|
32
|
+
/**
|
|
33
|
+
* The URL of the uploaded file.
|
|
34
|
+
*/
|
|
35
|
+
url: string;
|
|
36
|
+
/**
|
|
37
|
+
* The original file name.
|
|
38
|
+
*/
|
|
39
|
+
fileName: string;
|
|
40
|
+
/**
|
|
41
|
+
* The file size in bytes.
|
|
42
|
+
*/
|
|
43
|
+
size: number;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The status of the submission
|
|
48
|
+
*/
|
|
49
|
+
export const ApproveBountySubmissionStatus = {
|
|
50
|
+
Draft: "draft",
|
|
51
|
+
Submitted: "submitted",
|
|
52
|
+
Approved: "approved",
|
|
53
|
+
Rejected: "rejected",
|
|
54
|
+
} as const;
|
|
55
|
+
/**
|
|
56
|
+
* The status of the submission
|
|
57
|
+
*/
|
|
58
|
+
export type ApproveBountySubmissionStatus = ClosedEnum<
|
|
59
|
+
typeof ApproveBountySubmissionStatus
|
|
60
|
+
>;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The approved bounty submission.
|
|
64
|
+
*/
|
|
65
|
+
export type ApproveBountySubmissionResponseBody = {
|
|
66
|
+
/**
|
|
67
|
+
* The ID of the bounty submission
|
|
68
|
+
*/
|
|
69
|
+
id: string;
|
|
70
|
+
/**
|
|
71
|
+
* The ID of the bounty
|
|
72
|
+
*/
|
|
73
|
+
bountyId: string;
|
|
74
|
+
/**
|
|
75
|
+
* The ID of the partner
|
|
76
|
+
*/
|
|
77
|
+
partnerId: string;
|
|
78
|
+
/**
|
|
79
|
+
* The description of the submission
|
|
80
|
+
*/
|
|
81
|
+
description: string | null;
|
|
82
|
+
/**
|
|
83
|
+
* The URLs submitted for the submission
|
|
84
|
+
*/
|
|
85
|
+
urls: Array<string> | null;
|
|
86
|
+
/**
|
|
87
|
+
* The files uploaded for the submission
|
|
88
|
+
*/
|
|
89
|
+
files: Array<ApproveBountySubmissionFiles> | null;
|
|
90
|
+
/**
|
|
91
|
+
* The status of the submission
|
|
92
|
+
*/
|
|
93
|
+
status: ApproveBountySubmissionStatus;
|
|
94
|
+
/**
|
|
95
|
+
* The performance count of the submission
|
|
96
|
+
*/
|
|
97
|
+
performanceCount: number | null;
|
|
98
|
+
/**
|
|
99
|
+
* The date and time the submission was created
|
|
100
|
+
*/
|
|
101
|
+
createdAt: string;
|
|
102
|
+
/**
|
|
103
|
+
* The date and time the submission was completed
|
|
104
|
+
*/
|
|
105
|
+
completedAt: string | null;
|
|
106
|
+
/**
|
|
107
|
+
* The date and time the submission was reviewed
|
|
108
|
+
*/
|
|
109
|
+
reviewedAt: string | null;
|
|
110
|
+
/**
|
|
111
|
+
* The reason for rejecting the submission
|
|
112
|
+
*/
|
|
113
|
+
rejectionReason: string | null;
|
|
114
|
+
/**
|
|
115
|
+
* The note for rejecting the submission
|
|
116
|
+
*/
|
|
117
|
+
rejectionNote: string | null;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
/** @internal */
|
|
121
|
+
export type ApproveBountySubmissionRequestBody$Outbound = {
|
|
122
|
+
rewardAmount?: number | null | undefined;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
/** @internal */
|
|
126
|
+
export const ApproveBountySubmissionRequestBody$outboundSchema: z.ZodType<
|
|
127
|
+
ApproveBountySubmissionRequestBody$Outbound,
|
|
128
|
+
z.ZodTypeDef,
|
|
129
|
+
ApproveBountySubmissionRequestBody
|
|
130
|
+
> = z.object({
|
|
131
|
+
rewardAmount: z.nullable(z.number()).optional(),
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
export function approveBountySubmissionRequestBodyToJSON(
|
|
135
|
+
approveBountySubmissionRequestBody: ApproveBountySubmissionRequestBody,
|
|
136
|
+
): string {
|
|
137
|
+
return JSON.stringify(
|
|
138
|
+
ApproveBountySubmissionRequestBody$outboundSchema.parse(
|
|
139
|
+
approveBountySubmissionRequestBody,
|
|
140
|
+
),
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/** @internal */
|
|
145
|
+
export type ApproveBountySubmissionRequest$Outbound = {
|
|
146
|
+
bountyId: string;
|
|
147
|
+
submissionId: string;
|
|
148
|
+
RequestBody?: ApproveBountySubmissionRequestBody$Outbound | undefined;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
/** @internal */
|
|
152
|
+
export const ApproveBountySubmissionRequest$outboundSchema: z.ZodType<
|
|
153
|
+
ApproveBountySubmissionRequest$Outbound,
|
|
154
|
+
z.ZodTypeDef,
|
|
155
|
+
ApproveBountySubmissionRequest
|
|
156
|
+
> = z.object({
|
|
157
|
+
bountyId: z.string(),
|
|
158
|
+
submissionId: z.string(),
|
|
159
|
+
requestBody: z.lazy(() => ApproveBountySubmissionRequestBody$outboundSchema)
|
|
160
|
+
.optional(),
|
|
161
|
+
}).transform((v) => {
|
|
162
|
+
return remap$(v, {
|
|
163
|
+
requestBody: "RequestBody",
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
export function approveBountySubmissionRequestToJSON(
|
|
168
|
+
approveBountySubmissionRequest: ApproveBountySubmissionRequest,
|
|
169
|
+
): string {
|
|
170
|
+
return JSON.stringify(
|
|
171
|
+
ApproveBountySubmissionRequest$outboundSchema.parse(
|
|
172
|
+
approveBountySubmissionRequest,
|
|
173
|
+
),
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/** @internal */
|
|
178
|
+
export const ApproveBountySubmissionFiles$inboundSchema: z.ZodType<
|
|
179
|
+
ApproveBountySubmissionFiles,
|
|
180
|
+
z.ZodTypeDef,
|
|
181
|
+
unknown
|
|
182
|
+
> = z.object({
|
|
183
|
+
url: z.string(),
|
|
184
|
+
fileName: z.string(),
|
|
185
|
+
size: z.number(),
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
export function approveBountySubmissionFilesFromJSON(
|
|
189
|
+
jsonString: string,
|
|
190
|
+
): SafeParseResult<ApproveBountySubmissionFiles, SDKValidationError> {
|
|
191
|
+
return safeParse(
|
|
192
|
+
jsonString,
|
|
193
|
+
(x) => ApproveBountySubmissionFiles$inboundSchema.parse(JSON.parse(x)),
|
|
194
|
+
`Failed to parse 'ApproveBountySubmissionFiles' from JSON`,
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/** @internal */
|
|
199
|
+
export const ApproveBountySubmissionStatus$inboundSchema: z.ZodNativeEnum<
|
|
200
|
+
typeof ApproveBountySubmissionStatus
|
|
201
|
+
> = z.nativeEnum(ApproveBountySubmissionStatus);
|
|
202
|
+
|
|
203
|
+
/** @internal */
|
|
204
|
+
export const ApproveBountySubmissionResponseBody$inboundSchema: z.ZodType<
|
|
205
|
+
ApproveBountySubmissionResponseBody,
|
|
206
|
+
z.ZodTypeDef,
|
|
207
|
+
unknown
|
|
208
|
+
> = z.object({
|
|
209
|
+
id: z.string(),
|
|
210
|
+
bountyId: z.string(),
|
|
211
|
+
partnerId: z.string(),
|
|
212
|
+
description: z.nullable(z.string()),
|
|
213
|
+
urls: z.nullable(z.array(z.string())),
|
|
214
|
+
files: z.nullable(
|
|
215
|
+
z.array(z.lazy(() => ApproveBountySubmissionFiles$inboundSchema)),
|
|
216
|
+
),
|
|
217
|
+
status: ApproveBountySubmissionStatus$inboundSchema,
|
|
218
|
+
performanceCount: z.nullable(z.number()),
|
|
219
|
+
createdAt: z.string(),
|
|
220
|
+
completedAt: z.nullable(z.string()),
|
|
221
|
+
reviewedAt: z.nullable(z.string()),
|
|
222
|
+
rejectionReason: z.nullable(z.string()),
|
|
223
|
+
rejectionNote: z.nullable(z.string()),
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
export function approveBountySubmissionResponseBodyFromJSON(
|
|
227
|
+
jsonString: string,
|
|
228
|
+
): SafeParseResult<ApproveBountySubmissionResponseBody, SDKValidationError> {
|
|
229
|
+
return safeParse(
|
|
230
|
+
jsonString,
|
|
231
|
+
(x) =>
|
|
232
|
+
ApproveBountySubmissionResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
233
|
+
`Failed to parse 'ApproveBountySubmissionResponseBody' from JSON`,
|
|
234
|
+
);
|
|
235
|
+
}
|