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
|
@@ -10,7 +10,6 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
10
10
|
import { RequestOptions } from "../lib/sdks.js";
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import * as components from "../models/components/index.js";
|
|
14
13
|
import { DubError } from "../models/errors/duberror.js";
|
|
15
14
|
import {
|
|
16
15
|
ConnectionError,
|
|
@@ -27,19 +26,18 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
27
26
|
import { Result } from "../types/fp.js";
|
|
28
27
|
|
|
29
28
|
/**
|
|
30
|
-
*
|
|
29
|
+
* Reject a bounty submission
|
|
31
30
|
*
|
|
32
31
|
* @remarks
|
|
33
|
-
*
|
|
32
|
+
* Reject a bounty submission with a specified reason and optional note.
|
|
34
33
|
*/
|
|
35
|
-
export function
|
|
34
|
+
export function bountiesRejectSubmission(
|
|
36
35
|
client: DubCore,
|
|
37
|
-
|
|
38
|
-
requestBody?: operations.UpdateWorkspaceRequestBody | undefined,
|
|
36
|
+
request: operations.RejectBountySubmissionRequest,
|
|
39
37
|
options?: RequestOptions,
|
|
40
38
|
): APIPromise<
|
|
41
39
|
Result<
|
|
42
|
-
|
|
40
|
+
operations.RejectBountySubmissionResponseBody,
|
|
43
41
|
| errors.BadRequest
|
|
44
42
|
| errors.Unauthorized
|
|
45
43
|
| errors.Forbidden
|
|
@@ -61,21 +59,19 @@ export function workspacesUpdate(
|
|
|
61
59
|
> {
|
|
62
60
|
return new APIPromise($do(
|
|
63
61
|
client,
|
|
64
|
-
|
|
65
|
-
requestBody,
|
|
62
|
+
request,
|
|
66
63
|
options,
|
|
67
64
|
));
|
|
68
65
|
}
|
|
69
66
|
|
|
70
67
|
async function $do(
|
|
71
68
|
client: DubCore,
|
|
72
|
-
|
|
73
|
-
requestBody?: operations.UpdateWorkspaceRequestBody | undefined,
|
|
69
|
+
request: operations.RejectBountySubmissionRequest,
|
|
74
70
|
options?: RequestOptions,
|
|
75
71
|
): Promise<
|
|
76
72
|
[
|
|
77
73
|
Result<
|
|
78
|
-
|
|
74
|
+
operations.RejectBountySubmissionResponseBody,
|
|
79
75
|
| errors.BadRequest
|
|
80
76
|
| errors.Unauthorized
|
|
81
77
|
| errors.Forbidden
|
|
@@ -97,14 +93,10 @@ async function $do(
|
|
|
97
93
|
APICall,
|
|
98
94
|
]
|
|
99
95
|
> {
|
|
100
|
-
const input: operations.UpdateWorkspaceRequest = {
|
|
101
|
-
idOrSlug: idOrSlug,
|
|
102
|
-
requestBody: requestBody,
|
|
103
|
-
};
|
|
104
|
-
|
|
105
96
|
const parsed = safeParse(
|
|
106
|
-
|
|
107
|
-
(value) =>
|
|
97
|
+
request,
|
|
98
|
+
(value) =>
|
|
99
|
+
operations.RejectBountySubmissionRequest$outboundSchema.parse(value),
|
|
108
100
|
"Input validation failed",
|
|
109
101
|
);
|
|
110
102
|
if (!parsed.ok) {
|
|
@@ -114,13 +106,19 @@ async function $do(
|
|
|
114
106
|
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
115
107
|
|
|
116
108
|
const pathParams = {
|
|
117
|
-
|
|
109
|
+
bountyId: encodeSimple("bountyId", payload.bountyId, {
|
|
110
|
+
explode: false,
|
|
111
|
+
charEncoding: "percent",
|
|
112
|
+
}),
|
|
113
|
+
submissionId: encodeSimple("submissionId", payload.submissionId, {
|
|
118
114
|
explode: false,
|
|
119
115
|
charEncoding: "percent",
|
|
120
116
|
}),
|
|
121
117
|
};
|
|
122
118
|
|
|
123
|
-
const path = pathToFunc(
|
|
119
|
+
const path = pathToFunc(
|
|
120
|
+
"/bounties/{bountyId}/submissions/{submissionId}/reject",
|
|
121
|
+
)(pathParams);
|
|
124
122
|
|
|
125
123
|
const headers = new Headers(compactMap({
|
|
126
124
|
"Content-Type": "application/json",
|
|
@@ -134,7 +132,7 @@ async function $do(
|
|
|
134
132
|
const context = {
|
|
135
133
|
options: client._options,
|
|
136
134
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
137
|
-
operationID: "
|
|
135
|
+
operationID: "rejectBountySubmission",
|
|
138
136
|
oAuth2Scopes: null,
|
|
139
137
|
|
|
140
138
|
resolvedSecurity: requestSecurity,
|
|
@@ -148,7 +146,7 @@ async function $do(
|
|
|
148
146
|
|
|
149
147
|
const requestRes = client._createRequest(context, {
|
|
150
148
|
security: requestSecurity,
|
|
151
|
-
method: "
|
|
149
|
+
method: "POST",
|
|
152
150
|
baseURL: options?.serverURL,
|
|
153
151
|
path: path,
|
|
154
152
|
headers: headers,
|
|
@@ -189,7 +187,7 @@ async function $do(
|
|
|
189
187
|
};
|
|
190
188
|
|
|
191
189
|
const [result] = await M.match<
|
|
192
|
-
|
|
190
|
+
operations.RejectBountySubmissionResponseBody,
|
|
193
191
|
| errors.BadRequest
|
|
194
192
|
| errors.Unauthorized
|
|
195
193
|
| errors.Forbidden
|
|
@@ -208,7 +206,7 @@ async function $do(
|
|
|
208
206
|
| UnexpectedClientError
|
|
209
207
|
| SDKValidationError
|
|
210
208
|
>(
|
|
211
|
-
M.json(200,
|
|
209
|
+
M.json(200, operations.RejectBountySubmissionResponseBody$inboundSchema),
|
|
212
210
|
M.jsonErr(400, errors.BadRequest$inboundSchema),
|
|
213
211
|
M.jsonErr(401, errors.Unauthorized$inboundSchema),
|
|
214
212
|
M.jsonErr(403, errors.Forbidden$inboundSchema),
|
|
@@ -3,14 +3,13 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { DubCore } from "../core.js";
|
|
6
|
-
import {
|
|
6
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
7
7
|
import * as M from "../lib/matchers.js";
|
|
8
8
|
import { compactMap } from "../lib/primitives.js";
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { RequestOptions } from "../lib/sdks.js";
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import * as components from "../models/components/index.js";
|
|
14
13
|
import { DubError } from "../models/errors/duberror.js";
|
|
15
14
|
import {
|
|
16
15
|
ConnectionError,
|
|
@@ -27,18 +26,18 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
27
26
|
import { Result } from "../types/fp.js";
|
|
28
27
|
|
|
29
28
|
/**
|
|
30
|
-
*
|
|
29
|
+
* Deactivate a partner
|
|
31
30
|
*
|
|
32
31
|
* @remarks
|
|
33
|
-
*
|
|
32
|
+
* This will deactivate the partner from your program and disable all their active links. Their commissions and payouts will remain intact. You can reactivate them later if needed.
|
|
34
33
|
*/
|
|
35
|
-
export function
|
|
34
|
+
export function partnersDeactivate(
|
|
36
35
|
client: DubCore,
|
|
37
|
-
request
|
|
36
|
+
request?: operations.DeactivatePartnerRequestBody | undefined,
|
|
38
37
|
options?: RequestOptions,
|
|
39
38
|
): APIPromise<
|
|
40
39
|
Result<
|
|
41
|
-
|
|
40
|
+
operations.DeactivatePartnerResponseBody,
|
|
42
41
|
| errors.BadRequest
|
|
43
42
|
| errors.Unauthorized
|
|
44
43
|
| errors.Forbidden
|
|
@@ -67,12 +66,12 @@ export function workspacesGet(
|
|
|
67
66
|
|
|
68
67
|
async function $do(
|
|
69
68
|
client: DubCore,
|
|
70
|
-
request
|
|
69
|
+
request?: operations.DeactivatePartnerRequestBody | undefined,
|
|
71
70
|
options?: RequestOptions,
|
|
72
71
|
): Promise<
|
|
73
72
|
[
|
|
74
73
|
Result<
|
|
75
|
-
|
|
74
|
+
operations.DeactivatePartnerResponseBody,
|
|
76
75
|
| errors.BadRequest
|
|
77
76
|
| errors.Unauthorized
|
|
78
77
|
| errors.Forbidden
|
|
@@ -96,25 +95,24 @@ async function $do(
|
|
|
96
95
|
> {
|
|
97
96
|
const parsed = safeParse(
|
|
98
97
|
request,
|
|
99
|
-
(value) =>
|
|
98
|
+
(value) =>
|
|
99
|
+
operations.DeactivatePartnerRequestBody$outboundSchema.optional().parse(
|
|
100
|
+
value,
|
|
101
|
+
),
|
|
100
102
|
"Input validation failed",
|
|
101
103
|
);
|
|
102
104
|
if (!parsed.ok) {
|
|
103
105
|
return [parsed, { status: "invalid" }];
|
|
104
106
|
}
|
|
105
107
|
const payload = parsed.value;
|
|
106
|
-
const body =
|
|
108
|
+
const body = payload === undefined
|
|
109
|
+
? null
|
|
110
|
+
: encodeJSON("body", payload, { explode: true });
|
|
107
111
|
|
|
108
|
-
const
|
|
109
|
-
idOrSlug: encodeSimple("idOrSlug", payload.idOrSlug, {
|
|
110
|
-
explode: false,
|
|
111
|
-
charEncoding: "percent",
|
|
112
|
-
}),
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
const path = pathToFunc("/workspaces/{idOrSlug}")(pathParams);
|
|
112
|
+
const path = pathToFunc("/partners/deactivate")();
|
|
116
113
|
|
|
117
114
|
const headers = new Headers(compactMap({
|
|
115
|
+
"Content-Type": "application/json",
|
|
118
116
|
Accept: "application/json",
|
|
119
117
|
}));
|
|
120
118
|
|
|
@@ -125,7 +123,7 @@ async function $do(
|
|
|
125
123
|
const context = {
|
|
126
124
|
options: client._options,
|
|
127
125
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
128
|
-
operationID: "
|
|
126
|
+
operationID: "deactivatePartner",
|
|
129
127
|
oAuth2Scopes: null,
|
|
130
128
|
|
|
131
129
|
resolvedSecurity: requestSecurity,
|
|
@@ -139,7 +137,7 @@ async function $do(
|
|
|
139
137
|
|
|
140
138
|
const requestRes = client._createRequest(context, {
|
|
141
139
|
security: requestSecurity,
|
|
142
|
-
method: "
|
|
140
|
+
method: "POST",
|
|
143
141
|
baseURL: options?.serverURL,
|
|
144
142
|
path: path,
|
|
145
143
|
headers: headers,
|
|
@@ -180,7 +178,7 @@ async function $do(
|
|
|
180
178
|
};
|
|
181
179
|
|
|
182
180
|
const [result] = await M.match<
|
|
183
|
-
|
|
181
|
+
operations.DeactivatePartnerResponseBody,
|
|
184
182
|
| errors.BadRequest
|
|
185
183
|
| errors.Unauthorized
|
|
186
184
|
| errors.Forbidden
|
|
@@ -199,7 +197,7 @@ async function $do(
|
|
|
199
197
|
| UnexpectedClientError
|
|
200
198
|
| SDKValidationError
|
|
201
199
|
>(
|
|
202
|
-
M.json(200,
|
|
200
|
+
M.json(200, operations.DeactivatePartnerResponseBody$inboundSchema),
|
|
203
201
|
M.jsonErr(400, errors.BadRequest$inboundSchema),
|
|
204
202
|
M.jsonErr(401, errors.Unauthorized$inboundSchema),
|
|
205
203
|
M.jsonErr(403, errors.Forbidden$inboundSchema),
|
package/src/lib/config.ts
CHANGED
|
@@ -61,7 +61,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
63
|
openapiDocVersion: "0.0.1",
|
|
64
|
-
sdkVersion: "0.
|
|
65
|
-
genVersion: "2.
|
|
66
|
-
userAgent: "speakeasy-sdk/typescript 0.
|
|
64
|
+
sdkVersion: "0.71.0",
|
|
65
|
+
genVersion: "2.803.3",
|
|
66
|
+
userAgent: "speakeasy-sdk/typescript 0.71.0 2.803.3 0.0.1 dub",
|
|
67
67
|
} as const;
|
|
@@ -77,10 +77,6 @@ export type CommissionCreatedEventCustomer = {
|
|
|
77
77
|
* 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`).
|
|
78
78
|
*/
|
|
79
79
|
id: string;
|
|
80
|
-
/**
|
|
81
|
-
* Unique identifier for the customer in the client's app.
|
|
82
|
-
*/
|
|
83
|
-
externalId: string;
|
|
84
80
|
/**
|
|
85
81
|
* Name of the customer.
|
|
86
82
|
*/
|
|
@@ -93,6 +89,14 @@ export type CommissionCreatedEventCustomer = {
|
|
|
93
89
|
* Avatar URL of the customer.
|
|
94
90
|
*/
|
|
95
91
|
avatar?: string | null | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* Unique identifier for the customer in the client's app.
|
|
94
|
+
*/
|
|
95
|
+
externalId: string;
|
|
96
|
+
/**
|
|
97
|
+
* The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.
|
|
98
|
+
*/
|
|
99
|
+
stripeCustomerId?: string | null | undefined;
|
|
96
100
|
/**
|
|
97
101
|
* Country of the customer.
|
|
98
102
|
*/
|
|
@@ -106,9 +110,36 @@ export type CommissionCreatedEventCustomer = {
|
|
|
106
110
|
*/
|
|
107
111
|
saleAmount?: number | null | undefined;
|
|
108
112
|
/**
|
|
109
|
-
* The date the customer was created.
|
|
113
|
+
* The date the customer was created (usually the signup date or trial start date).
|
|
110
114
|
*/
|
|
111
115
|
createdAt: string;
|
|
116
|
+
/**
|
|
117
|
+
* The date the customer made their first sale. Useful for calculating the time to first sale and LTV.
|
|
118
|
+
*/
|
|
119
|
+
firstSaleAt?: string | null | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* The date the customer canceled their subscription. Useful for calculating LTV and churn rate.
|
|
122
|
+
*/
|
|
123
|
+
subscriptionCanceledAt?: string | null | undefined;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export type CommissionCreatedEventLink = {
|
|
127
|
+
/**
|
|
128
|
+
* The unique ID of the short link.
|
|
129
|
+
*/
|
|
130
|
+
id: string;
|
|
131
|
+
/**
|
|
132
|
+
* The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).
|
|
133
|
+
*/
|
|
134
|
+
shortLink: string;
|
|
135
|
+
/**
|
|
136
|
+
* 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).
|
|
137
|
+
*/
|
|
138
|
+
domain: string;
|
|
139
|
+
/**
|
|
140
|
+
* The short link slug. If not provided, a random 7-character slug will be generated.
|
|
141
|
+
*/
|
|
142
|
+
key: string;
|
|
112
143
|
};
|
|
113
144
|
|
|
114
145
|
export type CommissionCreatedEventData = {
|
|
@@ -132,6 +163,7 @@ export type CommissionCreatedEventData = {
|
|
|
132
163
|
updatedAt: string;
|
|
133
164
|
partner: CommissionCreatedEventPartner;
|
|
134
165
|
customer?: CommissionCreatedEventCustomer | null | undefined;
|
|
166
|
+
link: CommissionCreatedEventLink | null;
|
|
135
167
|
};
|
|
136
168
|
|
|
137
169
|
/**
|
|
@@ -255,26 +287,32 @@ export const CommissionCreatedEventCustomer$inboundSchema: z.ZodType<
|
|
|
255
287
|
unknown
|
|
256
288
|
> = z.object({
|
|
257
289
|
id: z.string(),
|
|
258
|
-
externalId: z.string(),
|
|
259
290
|
name: z.string(),
|
|
260
291
|
email: z.nullable(z.string()).optional(),
|
|
261
292
|
avatar: z.nullable(z.string()).optional(),
|
|
293
|
+
externalId: z.string(),
|
|
294
|
+
stripeCustomerId: z.nullable(z.string()).optional(),
|
|
262
295
|
country: z.nullable(z.string()).optional(),
|
|
263
296
|
sales: z.nullable(z.number()).optional(),
|
|
264
297
|
saleAmount: z.nullable(z.number()).optional(),
|
|
265
298
|
createdAt: z.string(),
|
|
299
|
+
firstSaleAt: z.nullable(z.string()).optional(),
|
|
300
|
+
subscriptionCanceledAt: z.nullable(z.string()).optional(),
|
|
266
301
|
});
|
|
267
302
|
/** @internal */
|
|
268
303
|
export type CommissionCreatedEventCustomer$Outbound = {
|
|
269
304
|
id: string;
|
|
270
|
-
externalId: string;
|
|
271
305
|
name: string;
|
|
272
306
|
email?: string | null | undefined;
|
|
273
307
|
avatar?: string | null | undefined;
|
|
308
|
+
externalId: string;
|
|
309
|
+
stripeCustomerId?: string | null | undefined;
|
|
274
310
|
country?: string | null | undefined;
|
|
275
311
|
sales?: number | null | undefined;
|
|
276
312
|
saleAmount?: number | null | undefined;
|
|
277
313
|
createdAt: string;
|
|
314
|
+
firstSaleAt?: string | null | undefined;
|
|
315
|
+
subscriptionCanceledAt?: string | null | undefined;
|
|
278
316
|
};
|
|
279
317
|
|
|
280
318
|
/** @internal */
|
|
@@ -284,14 +322,17 @@ export const CommissionCreatedEventCustomer$outboundSchema: z.ZodType<
|
|
|
284
322
|
CommissionCreatedEventCustomer
|
|
285
323
|
> = z.object({
|
|
286
324
|
id: z.string(),
|
|
287
|
-
externalId: z.string(),
|
|
288
325
|
name: z.string(),
|
|
289
326
|
email: z.nullable(z.string()).optional(),
|
|
290
327
|
avatar: z.nullable(z.string()).optional(),
|
|
328
|
+
externalId: z.string(),
|
|
329
|
+
stripeCustomerId: z.nullable(z.string()).optional(),
|
|
291
330
|
country: z.nullable(z.string()).optional(),
|
|
292
331
|
sales: z.nullable(z.number()).optional(),
|
|
293
332
|
saleAmount: z.nullable(z.number()).optional(),
|
|
294
333
|
createdAt: z.string(),
|
|
334
|
+
firstSaleAt: z.nullable(z.string()).optional(),
|
|
335
|
+
subscriptionCanceledAt: z.nullable(z.string()).optional(),
|
|
295
336
|
});
|
|
296
337
|
|
|
297
338
|
export function commissionCreatedEventCustomerToJSON(
|
|
@@ -313,6 +354,54 @@ export function commissionCreatedEventCustomerFromJSON(
|
|
|
313
354
|
);
|
|
314
355
|
}
|
|
315
356
|
|
|
357
|
+
/** @internal */
|
|
358
|
+
export const CommissionCreatedEventLink$inboundSchema: z.ZodType<
|
|
359
|
+
CommissionCreatedEventLink,
|
|
360
|
+
z.ZodTypeDef,
|
|
361
|
+
unknown
|
|
362
|
+
> = z.object({
|
|
363
|
+
id: z.string(),
|
|
364
|
+
shortLink: z.string(),
|
|
365
|
+
domain: z.string(),
|
|
366
|
+
key: z.string(),
|
|
367
|
+
});
|
|
368
|
+
/** @internal */
|
|
369
|
+
export type CommissionCreatedEventLink$Outbound = {
|
|
370
|
+
id: string;
|
|
371
|
+
shortLink: string;
|
|
372
|
+
domain: string;
|
|
373
|
+
key: string;
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
/** @internal */
|
|
377
|
+
export const CommissionCreatedEventLink$outboundSchema: z.ZodType<
|
|
378
|
+
CommissionCreatedEventLink$Outbound,
|
|
379
|
+
z.ZodTypeDef,
|
|
380
|
+
CommissionCreatedEventLink
|
|
381
|
+
> = z.object({
|
|
382
|
+
id: z.string(),
|
|
383
|
+
shortLink: z.string(),
|
|
384
|
+
domain: z.string(),
|
|
385
|
+
key: z.string(),
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
export function commissionCreatedEventLinkToJSON(
|
|
389
|
+
commissionCreatedEventLink: CommissionCreatedEventLink,
|
|
390
|
+
): string {
|
|
391
|
+
return JSON.stringify(
|
|
392
|
+
CommissionCreatedEventLink$outboundSchema.parse(commissionCreatedEventLink),
|
|
393
|
+
);
|
|
394
|
+
}
|
|
395
|
+
export function commissionCreatedEventLinkFromJSON(
|
|
396
|
+
jsonString: string,
|
|
397
|
+
): SafeParseResult<CommissionCreatedEventLink, SDKValidationError> {
|
|
398
|
+
return safeParse(
|
|
399
|
+
jsonString,
|
|
400
|
+
(x) => CommissionCreatedEventLink$inboundSchema.parse(JSON.parse(x)),
|
|
401
|
+
`Failed to parse 'CommissionCreatedEventLink' from JSON`,
|
|
402
|
+
);
|
|
403
|
+
}
|
|
404
|
+
|
|
316
405
|
/** @internal */
|
|
317
406
|
export const CommissionCreatedEventData$inboundSchema: z.ZodType<
|
|
318
407
|
CommissionCreatedEventData,
|
|
@@ -335,6 +424,7 @@ export const CommissionCreatedEventData$inboundSchema: z.ZodType<
|
|
|
335
424
|
customer: z.nullable(
|
|
336
425
|
z.lazy(() => CommissionCreatedEventCustomer$inboundSchema),
|
|
337
426
|
).optional(),
|
|
427
|
+
link: z.nullable(z.lazy(() => CommissionCreatedEventLink$inboundSchema)),
|
|
338
428
|
});
|
|
339
429
|
/** @internal */
|
|
340
430
|
export type CommissionCreatedEventData$Outbound = {
|
|
@@ -352,6 +442,7 @@ export type CommissionCreatedEventData$Outbound = {
|
|
|
352
442
|
updatedAt: string;
|
|
353
443
|
partner: CommissionCreatedEventPartner$Outbound;
|
|
354
444
|
customer?: CommissionCreatedEventCustomer$Outbound | null | undefined;
|
|
445
|
+
link: CommissionCreatedEventLink$Outbound | null;
|
|
355
446
|
};
|
|
356
447
|
|
|
357
448
|
/** @internal */
|
|
@@ -376,6 +467,7 @@ export const CommissionCreatedEventData$outboundSchema: z.ZodType<
|
|
|
376
467
|
customer: z.nullable(
|
|
377
468
|
z.lazy(() => CommissionCreatedEventCustomer$outboundSchema),
|
|
378
469
|
).optional(),
|
|
470
|
+
link: z.nullable(z.lazy(() => CommissionCreatedEventLink$outboundSchema)),
|
|
379
471
|
});
|
|
380
472
|
|
|
381
473
|
export function commissionCreatedEventDataToJSON(
|
|
@@ -25,10 +25,6 @@ export type Customer = {
|
|
|
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 Customer = {
|
|
|
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 Customer = {
|
|
|
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 LeadCreatedEventClick = {
|
|
@@ -314,26 +326,32 @@ export const Customer$inboundSchema: z.ZodType<
|
|
|
314
326
|
unknown
|
|
315
327
|
> = z.object({
|
|
316
328
|
id: z.string(),
|
|
317
|
-
externalId: z.string(),
|
|
318
329
|
name: z.string(),
|
|
319
330
|
email: z.nullable(z.string()).optional(),
|
|
320
331
|
avatar: z.nullable(z.string()).optional(),
|
|
332
|
+
externalId: z.string(),
|
|
333
|
+
stripeCustomerId: z.nullable(z.string()).optional(),
|
|
321
334
|
country: z.nullable(z.string()).optional(),
|
|
322
335
|
sales: z.nullable(z.number()).optional(),
|
|
323
336
|
saleAmount: z.nullable(z.number()).optional(),
|
|
324
337
|
createdAt: z.string(),
|
|
338
|
+
firstSaleAt: z.nullable(z.string()).optional(),
|
|
339
|
+
subscriptionCanceledAt: z.nullable(z.string()).optional(),
|
|
325
340
|
});
|
|
326
341
|
/** @internal */
|
|
327
342
|
export type Customer$Outbound = {
|
|
328
343
|
id: string;
|
|
329
|
-
externalId: string;
|
|
330
344
|
name: string;
|
|
331
345
|
email?: string | null | undefined;
|
|
332
346
|
avatar?: string | null | undefined;
|
|
347
|
+
externalId: string;
|
|
348
|
+
stripeCustomerId?: string | null | undefined;
|
|
333
349
|
country?: string | null | undefined;
|
|
334
350
|
sales?: number | null | undefined;
|
|
335
351
|
saleAmount?: number | null | undefined;
|
|
336
352
|
createdAt: string;
|
|
353
|
+
firstSaleAt?: string | null | undefined;
|
|
354
|
+
subscriptionCanceledAt?: string | null | undefined;
|
|
337
355
|
};
|
|
338
356
|
|
|
339
357
|
/** @internal */
|
|
@@ -343,14 +361,17 @@ export const Customer$outboundSchema: z.ZodType<
|
|
|
343
361
|
Customer
|
|
344
362
|
> = z.object({
|
|
345
363
|
id: z.string(),
|
|
346
|
-
externalId: z.string(),
|
|
347
364
|
name: z.string(),
|
|
348
365
|
email: z.nullable(z.string()).optional(),
|
|
349
366
|
avatar: z.nullable(z.string()).optional(),
|
|
367
|
+
externalId: z.string(),
|
|
368
|
+
stripeCustomerId: z.nullable(z.string()).optional(),
|
|
350
369
|
country: z.nullable(z.string()).optional(),
|
|
351
370
|
sales: z.nullable(z.number()).optional(),
|
|
352
371
|
saleAmount: z.nullable(z.number()).optional(),
|
|
353
372
|
createdAt: z.string(),
|
|
373
|
+
firstSaleAt: z.nullable(z.string()).optional(),
|
|
374
|
+
subscriptionCanceledAt: z.nullable(z.string()).optional(),
|
|
354
375
|
});
|
|
355
376
|
|
|
356
377
|
export function customerToJSON(customer: Customer): string {
|