dub 0.71.7 → 0.72.1
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/FUNCTIONS.md +2 -2
- package/README.md +2 -0
- package/dist/commonjs/funcs/analyticsRetrieve.js +1 -0
- package/dist/commonjs/funcs/analyticsRetrieve.js.map +1 -1
- package/dist/commonjs/funcs/commissionsCreate.d.ts +18 -0
- package/dist/commonjs/funcs/commissionsCreate.d.ts.map +1 -0
- package/dist/commonjs/funcs/commissionsCreate.js +121 -0
- package/dist/commonjs/funcs/commissionsCreate.js.map +1 -0
- package/dist/commonjs/funcs/commissionsList.js +3 -5
- package/dist/commonjs/funcs/commissionsList.js.map +1 -1
- package/dist/commonjs/funcs/customersList.js +2 -5
- package/dist/commonjs/funcs/customersList.js.map +1 -1
- package/dist/commonjs/funcs/eventsList.js +1 -0
- package/dist/commonjs/funcs/eventsList.js.map +1 -1
- package/dist/commonjs/funcs/linksList.js +0 -3
- package/dist/commonjs/funcs/linksList.js.map +1 -1
- package/dist/commonjs/funcs/partnerApplicationsApprove.d.ts +1 -1
- package/dist/commonjs/funcs/partnerApplicationsApprove.d.ts.map +1 -1
- package/dist/commonjs/funcs/partnerApplicationsApprove.js +3 -3
- package/dist/commonjs/funcs/partnerApplicationsApprove.js.map +1 -1
- package/dist/commonjs/funcs/partnerApplicationsReject.d.ts +1 -1
- package/dist/commonjs/funcs/partnerApplicationsReject.d.ts.map +1 -1
- package/dist/commonjs/funcs/partnerApplicationsReject.js +3 -3
- package/dist/commonjs/funcs/partnerApplicationsReject.js.map +1 -1
- package/dist/commonjs/funcs/partnersRetrieveLinks.d.ts +1 -1
- package/dist/commonjs/funcs/partnersRetrieveLinks.d.ts.map +1 -1
- package/dist/commonjs/funcs/partnersRetrieveLinks.js +3 -3
- package/dist/commonjs/funcs/partnersRetrieveLinks.js.map +1 -1
- 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 +3 -2
- package/dist/commonjs/models/components/commissioncreatedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/commissioncreatedevent.js +3 -2
- package/dist/commonjs/models/components/commissioncreatedevent.js.map +1 -1
- package/dist/commonjs/models/components/leadcreatedevent.d.ts +2 -2
- package/dist/commonjs/models/components/leadcreatedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/leadcreatedevent.js +2 -2
- package/dist/commonjs/models/components/leadcreatedevent.js.map +1 -1
- package/dist/commonjs/models/components/partnerenrolledevent.d.ts +60 -8
- package/dist/commonjs/models/components/partnerenrolledevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/partnerenrolledevent.js +47 -6
- package/dist/commonjs/models/components/partnerenrolledevent.js.map +1 -1
- package/dist/commonjs/models/components/salecreatedevent.d.ts +2 -2
- package/dist/commonjs/models/components/salecreatedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/salecreatedevent.js +2 -2
- package/dist/commonjs/models/components/salecreatedevent.js.map +1 -1
- package/dist/commonjs/models/operations/approvepartnerapplication.d.ts +34 -0
- package/dist/commonjs/models/operations/approvepartnerapplication.d.ts.map +1 -0
- package/dist/commonjs/models/operations/{approvepartner.js → approvepartnerapplication.js} +10 -10
- package/dist/commonjs/models/operations/approvepartnerapplication.js.map +1 -0
- package/dist/commonjs/models/operations/createcommission.d.ts +227 -0
- package/dist/commonjs/models/operations/createcommission.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createcommission.js +131 -0
- package/dist/commonjs/models/operations/createcommission.js.map +1 -0
- package/dist/commonjs/models/operations/createpartner.d.ts +44 -6
- package/dist/commonjs/models/operations/createpartner.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createpartner.js +28 -3
- package/dist/commonjs/models/operations/createpartner.js.map +1 -1
- package/dist/commonjs/models/operations/getcustomer.d.ts +1 -1
- package/dist/commonjs/models/operations/getcustomer.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getcustomer.js +1 -1
- package/dist/commonjs/models/operations/getcustomer.js.map +1 -1
- package/dist/commonjs/models/operations/getcustomers.d.ts +1 -1
- package/dist/commonjs/models/operations/getcustomers.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getcustomers.js +1 -1
- package/dist/commonjs/models/operations/getcustomers.js.map +1 -1
- package/dist/commonjs/models/operations/getlinks.d.ts +0 -63
- package/dist/commonjs/models/operations/getlinks.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getlinks.js +1 -39
- package/dist/commonjs/models/operations/getlinks.js.map +1 -1
- package/dist/commonjs/models/operations/gettags.d.ts +8 -8
- package/dist/commonjs/models/operations/gettags.d.ts.map +1 -1
- package/dist/commonjs/models/operations/gettags.js +7 -7
- package/dist/commonjs/models/operations/gettags.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +4 -3
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +4 -3
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listcommissions.d.ts +19 -3
- package/dist/commonjs/models/operations/listcommissions.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listcommissions.js +7 -1
- package/dist/commonjs/models/operations/listcommissions.js.map +1 -1
- package/dist/commonjs/models/operations/listevents.d.ts +17 -10
- package/dist/commonjs/models/operations/listevents.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listevents.js +14 -9
- package/dist/commonjs/models/operations/listevents.js.map +1 -1
- package/dist/commonjs/models/operations/listpartners.d.ts +44 -6
- package/dist/commonjs/models/operations/listpartners.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listpartners.js +29 -3
- package/dist/commonjs/models/operations/listpartners.js.map +1 -1
- package/dist/commonjs/models/operations/rejectpartnerapplication.d.ts +84 -0
- package/dist/commonjs/models/operations/rejectpartnerapplication.d.ts.map +1 -0
- package/dist/commonjs/models/operations/{rejectpartner.js → rejectpartnerapplication.js} +23 -11
- package/dist/commonjs/models/operations/rejectpartnerapplication.js.map +1 -0
- package/dist/commonjs/models/operations/retrieveanalytics.d.ts +6 -0
- package/dist/commonjs/models/operations/retrieveanalytics.d.ts.map +1 -1
- package/dist/commonjs/models/operations/retrieveanalytics.js +2 -0
- package/dist/commonjs/models/operations/retrieveanalytics.js.map +1 -1
- package/dist/{esm/models/operations/retrievelinks.d.ts → commonjs/models/operations/retrievepartnerlinks.d.ts} +8 -8
- package/dist/commonjs/models/operations/retrievepartnerlinks.d.ts.map +1 -0
- package/dist/commonjs/models/operations/{retrievelinks.js → retrievepartnerlinks.js} +10 -10
- package/dist/commonjs/models/operations/retrievepartnerlinks.js.map +1 -0
- package/dist/commonjs/models/operations/tracklead.d.ts +4 -4
- package/dist/commonjs/models/operations/tracklead.d.ts.map +1 -1
- package/dist/commonjs/models/operations/tracklead.js +6 -6
- package/dist/commonjs/models/operations/tracklead.js.map +1 -1
- package/dist/commonjs/models/operations/tracksale.d.ts +2 -0
- package/dist/commonjs/models/operations/tracksale.d.ts.map +1 -1
- package/dist/commonjs/models/operations/tracksale.js +2 -0
- package/dist/commonjs/models/operations/tracksale.js.map +1 -1
- package/dist/commonjs/models/operations/updatecommission.d.ts +2 -1
- package/dist/commonjs/models/operations/updatecommission.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatecommission.js +2 -1
- package/dist/commonjs/models/operations/updatecommission.js.map +1 -1
- package/dist/commonjs/models/operations/updatecustomer.d.ts +1 -1
- package/dist/commonjs/models/operations/updatecustomer.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatecustomer.js +1 -1
- package/dist/commonjs/models/operations/updatecustomer.js.map +1 -1
- package/dist/commonjs/models/operations/updatefolder.d.ts +1 -1
- package/dist/commonjs/models/operations/updatefolder.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatefolder.js +1 -1
- package/dist/commonjs/models/operations/updatefolder.js.map +1 -1
- package/dist/commonjs/sdk/commissions.d.ts +7 -0
- package/dist/commonjs/sdk/commissions.d.ts.map +1 -1
- package/dist/commonjs/sdk/commissions.js +10 -0
- package/dist/commonjs/sdk/commissions.js.map +1 -1
- package/dist/commonjs/sdk/partnerapplications.d.ts +2 -2
- package/dist/commonjs/sdk/partnerapplications.d.ts.map +1 -1
- package/dist/commonjs/sdk/partnerapplications.js.map +1 -1
- package/dist/commonjs/sdk/partners.d.ts +1 -1
- package/dist/commonjs/sdk/partners.d.ts.map +1 -1
- package/dist/commonjs/sdk/partners.js.map +1 -1
- package/dist/commonjs/types/async.d.ts.map +1 -1
- package/dist/commonjs/types/async.js +8 -7
- package/dist/commonjs/types/async.js.map +1 -1
- package/dist/esm/funcs/analyticsRetrieve.js +1 -0
- package/dist/esm/funcs/analyticsRetrieve.js.map +1 -1
- package/dist/esm/funcs/commissionsCreate.d.ts +18 -0
- package/dist/esm/funcs/commissionsCreate.d.ts.map +1 -0
- package/dist/esm/funcs/commissionsCreate.js +85 -0
- package/dist/esm/funcs/commissionsCreate.js.map +1 -0
- package/dist/esm/funcs/commissionsList.js +3 -2
- package/dist/esm/funcs/commissionsList.js.map +1 -1
- package/dist/esm/funcs/customersList.js +2 -2
- package/dist/esm/funcs/customersList.js.map +1 -1
- package/dist/esm/funcs/eventsList.js +1 -0
- package/dist/esm/funcs/eventsList.js.map +1 -1
- package/dist/esm/funcs/linksList.js +0 -3
- package/dist/esm/funcs/linksList.js.map +1 -1
- package/dist/esm/funcs/partnerApplicationsApprove.d.ts +1 -1
- package/dist/esm/funcs/partnerApplicationsApprove.d.ts.map +1 -1
- package/dist/esm/funcs/partnerApplicationsApprove.js +3 -3
- package/dist/esm/funcs/partnerApplicationsApprove.js.map +1 -1
- package/dist/esm/funcs/partnerApplicationsReject.d.ts +1 -1
- package/dist/esm/funcs/partnerApplicationsReject.d.ts.map +1 -1
- package/dist/esm/funcs/partnerApplicationsReject.js +3 -3
- package/dist/esm/funcs/partnerApplicationsReject.js.map +1 -1
- package/dist/esm/funcs/partnersRetrieveLinks.d.ts +1 -1
- package/dist/esm/funcs/partnersRetrieveLinks.d.ts.map +1 -1
- package/dist/esm/funcs/partnersRetrieveLinks.js +3 -3
- package/dist/esm/funcs/partnersRetrieveLinks.js.map +1 -1
- 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 +3 -2
- package/dist/esm/models/components/commissioncreatedevent.d.ts.map +1 -1
- package/dist/esm/models/components/commissioncreatedevent.js +3 -2
- package/dist/esm/models/components/commissioncreatedevent.js.map +1 -1
- package/dist/esm/models/components/leadcreatedevent.d.ts +2 -2
- package/dist/esm/models/components/leadcreatedevent.d.ts.map +1 -1
- package/dist/esm/models/components/leadcreatedevent.js +2 -2
- package/dist/esm/models/components/leadcreatedevent.js.map +1 -1
- package/dist/esm/models/components/partnerenrolledevent.d.ts +60 -8
- package/dist/esm/models/components/partnerenrolledevent.d.ts.map +1 -1
- package/dist/esm/models/components/partnerenrolledevent.js +43 -4
- package/dist/esm/models/components/partnerenrolledevent.js.map +1 -1
- package/dist/esm/models/components/salecreatedevent.d.ts +2 -2
- package/dist/esm/models/components/salecreatedevent.d.ts.map +1 -1
- package/dist/esm/models/components/salecreatedevent.js +2 -2
- package/dist/esm/models/components/salecreatedevent.js.map +1 -1
- package/dist/esm/models/operations/approvepartnerapplication.d.ts +34 -0
- package/dist/esm/models/operations/approvepartnerapplication.d.ts.map +1 -0
- package/dist/esm/models/operations/approvepartnerapplication.js +21 -0
- package/dist/esm/models/operations/approvepartnerapplication.js.map +1 -0
- package/dist/esm/models/operations/createcommission.d.ts +227 -0
- package/dist/esm/models/operations/createcommission.d.ts.map +1 -0
- package/dist/esm/models/operations/createcommission.js +88 -0
- package/dist/esm/models/operations/createcommission.js.map +1 -0
- package/dist/esm/models/operations/createpartner.d.ts +44 -6
- package/dist/esm/models/operations/createpartner.d.ts.map +1 -1
- package/dist/esm/models/operations/createpartner.js +26 -2
- package/dist/esm/models/operations/createpartner.js.map +1 -1
- package/dist/esm/models/operations/getcustomer.d.ts +1 -1
- package/dist/esm/models/operations/getcustomer.d.ts.map +1 -1
- package/dist/esm/models/operations/getcustomer.js +1 -1
- package/dist/esm/models/operations/getcustomer.js.map +1 -1
- package/dist/esm/models/operations/getcustomers.d.ts +1 -1
- package/dist/esm/models/operations/getcustomers.d.ts.map +1 -1
- package/dist/esm/models/operations/getcustomers.js +1 -1
- package/dist/esm/models/operations/getcustomers.js.map +1 -1
- package/dist/esm/models/operations/getlinks.d.ts +0 -63
- package/dist/esm/models/operations/getlinks.d.ts.map +1 -1
- package/dist/esm/models/operations/getlinks.js +0 -38
- package/dist/esm/models/operations/getlinks.js.map +1 -1
- package/dist/esm/models/operations/gettags.d.ts +8 -8
- package/dist/esm/models/operations/gettags.d.ts.map +1 -1
- package/dist/esm/models/operations/gettags.js +6 -6
- package/dist/esm/models/operations/gettags.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +4 -3
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +4 -3
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listcommissions.d.ts +19 -3
- package/dist/esm/models/operations/listcommissions.d.ts.map +1 -1
- package/dist/esm/models/operations/listcommissions.js +7 -1
- package/dist/esm/models/operations/listcommissions.js.map +1 -1
- package/dist/esm/models/operations/listevents.d.ts +17 -10
- package/dist/esm/models/operations/listevents.d.ts.map +1 -1
- package/dist/esm/models/operations/listevents.js +13 -8
- package/dist/esm/models/operations/listevents.js.map +1 -1
- package/dist/esm/models/operations/listpartners.d.ts +44 -6
- package/dist/esm/models/operations/listpartners.d.ts.map +1 -1
- package/dist/esm/models/operations/listpartners.js +27 -2
- package/dist/esm/models/operations/listpartners.js.map +1 -1
- package/dist/esm/models/operations/rejectpartnerapplication.d.ts +84 -0
- package/dist/esm/models/operations/rejectpartnerapplication.d.ts.map +1 -0
- package/dist/esm/models/operations/rejectpartnerapplication.js +46 -0
- package/dist/esm/models/operations/rejectpartnerapplication.js.map +1 -0
- package/dist/esm/models/operations/retrieveanalytics.d.ts +6 -0
- package/dist/esm/models/operations/retrieveanalytics.d.ts.map +1 -1
- package/dist/esm/models/operations/retrieveanalytics.js +2 -0
- package/dist/esm/models/operations/retrieveanalytics.js.map +1 -1
- package/dist/{commonjs/models/operations/retrievelinks.d.ts → esm/models/operations/retrievepartnerlinks.d.ts} +8 -8
- package/dist/esm/models/operations/retrievepartnerlinks.d.ts.map +1 -0
- package/dist/esm/models/operations/retrievepartnerlinks.js +30 -0
- package/dist/esm/models/operations/retrievepartnerlinks.js.map +1 -0
- package/dist/esm/models/operations/tracklead.d.ts +4 -4
- package/dist/esm/models/operations/tracklead.d.ts.map +1 -1
- package/dist/esm/models/operations/tracklead.js +4 -4
- package/dist/esm/models/operations/tracklead.js.map +1 -1
- package/dist/esm/models/operations/tracksale.d.ts +2 -0
- package/dist/esm/models/operations/tracksale.d.ts.map +1 -1
- package/dist/esm/models/operations/tracksale.js +2 -0
- package/dist/esm/models/operations/tracksale.js.map +1 -1
- package/dist/esm/models/operations/updatecommission.d.ts +2 -1
- package/dist/esm/models/operations/updatecommission.d.ts.map +1 -1
- package/dist/esm/models/operations/updatecommission.js +2 -1
- package/dist/esm/models/operations/updatecommission.js.map +1 -1
- package/dist/esm/models/operations/updatecustomer.d.ts +1 -1
- package/dist/esm/models/operations/updatecustomer.d.ts.map +1 -1
- package/dist/esm/models/operations/updatecustomer.js +1 -1
- package/dist/esm/models/operations/updatecustomer.js.map +1 -1
- package/dist/esm/models/operations/updatefolder.d.ts +1 -1
- package/dist/esm/models/operations/updatefolder.d.ts.map +1 -1
- package/dist/esm/models/operations/updatefolder.js +1 -1
- package/dist/esm/models/operations/updatefolder.js.map +1 -1
- package/dist/esm/sdk/commissions.d.ts +7 -0
- package/dist/esm/sdk/commissions.d.ts.map +1 -1
- package/dist/esm/sdk/commissions.js +10 -0
- package/dist/esm/sdk/commissions.js.map +1 -1
- package/dist/esm/sdk/partnerapplications.d.ts +2 -2
- package/dist/esm/sdk/partnerapplications.d.ts.map +1 -1
- package/dist/esm/sdk/partnerapplications.js.map +1 -1
- package/dist/esm/sdk/partners.d.ts +1 -1
- package/dist/esm/sdk/partners.d.ts.map +1 -1
- package/dist/esm/sdk/partners.js.map +1 -1
- package/dist/esm/types/async.d.ts.map +1 -1
- package/dist/esm/types/async.js +8 -7
- package/dist/esm/types/async.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +2 -3
- package/src/funcs/analyticsRetrieve.ts +1 -0
- package/src/funcs/commissionsCreate.ts +208 -0
- package/src/funcs/commissionsList.ts +3 -2
- package/src/funcs/customersList.ts +2 -2
- package/src/funcs/eventsList.ts +1 -0
- package/src/funcs/linksList.ts +0 -3
- package/src/funcs/partnerApplicationsApprove.ts +11 -8
- package/src/funcs/partnerApplicationsReject.ts +11 -8
- package/src/funcs/partnersRetrieveLinks.ts +13 -8
- package/src/lib/config.ts +3 -3
- package/src/models/components/commissioncreatedevent.ts +5 -4
- package/src/models/components/leadcreatedevent.ts +4 -4
- package/src/models/components/partnerenrolledevent.ts +100 -12
- package/src/models/components/salecreatedevent.ts +4 -4
- package/src/models/operations/{approvepartner.ts → approvepartnerapplication.ts} +18 -15
- package/src/models/operations/createcommission.ts +369 -0
- package/src/models/operations/createpartner.ts +74 -8
- package/src/models/operations/getcustomer.ts +2 -2
- package/src/models/operations/getcustomers.ts +2 -2
- package/src/models/operations/getlinks.ts +0 -76
- package/src/models/operations/gettags.ts +14 -18
- package/src/models/operations/index.ts +4 -3
- package/src/models/operations/listcommissions.ts +21 -4
- package/src/models/operations/listevents.ts +24 -18
- package/src/models/operations/listpartners.ts +69 -8
- package/src/models/operations/rejectpartnerapplication.ts +139 -0
- package/src/models/operations/retrieveanalytics.ts +7 -0
- package/src/models/operations/{retrievelinks.ts → retrievepartnerlinks.ts} +17 -15
- package/src/models/operations/tracklead.ts +9 -9
- package/src/models/operations/tracksale.ts +2 -0
- package/src/models/operations/updatecommission.ts +3 -2
- package/src/models/operations/updatecustomer.ts +2 -2
- package/src/models/operations/updatefolder.ts +2 -2
- package/src/sdk/commissions.ts +18 -0
- package/src/sdk/partnerapplications.ts +4 -4
- package/src/sdk/partners.ts +2 -2
- package/src/types/async.ts +8 -7
- package/dist/commonjs/models/operations/approvepartner.d.ts +0 -34
- package/dist/commonjs/models/operations/approvepartner.d.ts.map +0 -1
- package/dist/commonjs/models/operations/approvepartner.js.map +0 -1
- package/dist/commonjs/models/operations/rejectpartner.d.ts +0 -60
- package/dist/commonjs/models/operations/rejectpartner.d.ts.map +0 -1
- package/dist/commonjs/models/operations/rejectpartner.js.map +0 -1
- package/dist/commonjs/models/operations/retrievelinks.d.ts.map +0 -1
- package/dist/commonjs/models/operations/retrievelinks.js.map +0 -1
- package/dist/esm/models/operations/approvepartner.d.ts +0 -34
- package/dist/esm/models/operations/approvepartner.d.ts.map +0 -1
- package/dist/esm/models/operations/approvepartner.js +0 -21
- package/dist/esm/models/operations/approvepartner.js.map +0 -1
- package/dist/esm/models/operations/rejectpartner.d.ts +0 -60
- package/dist/esm/models/operations/rejectpartner.d.ts.map +0 -1
- package/dist/esm/models/operations/rejectpartner.js +0 -34
- package/dist/esm/models/operations/rejectpartner.js.map +0 -1
- package/dist/esm/models/operations/retrievelinks.d.ts.map +0 -1
- package/dist/esm/models/operations/retrievelinks.js +0 -30
- package/dist/esm/models/operations/retrievelinks.js.map +0 -1
- package/src/models/operations/rejectpartner.ts +0 -104
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The full customer object to associate the commission with. Useful for creating the customer on demand.
|
|
12
|
+
*/
|
|
13
|
+
export type RequestBodyCustomer = {
|
|
14
|
+
/**
|
|
15
|
+
* The customer's email address.
|
|
16
|
+
*/
|
|
17
|
+
email?: string | null | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* The customer's name. If not provided, the email address will be used, and if email is not provided, a random name will be generated.
|
|
20
|
+
*/
|
|
21
|
+
name?: string | null | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* The customer's avatar URL. If not provided, a random avatar will be generated.
|
|
24
|
+
*/
|
|
25
|
+
avatar?: string | null | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* The customer's unique identifier your database. This is useful for associating subsequent conversion events from Dub's API to your internal systems.
|
|
28
|
+
*/
|
|
29
|
+
externalId: string;
|
|
30
|
+
/**
|
|
31
|
+
* The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.
|
|
32
|
+
*/
|
|
33
|
+
stripeCustomerId?: string | null | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* The customer's country in ISO 3166-1 alpha-2 format. Updating this field will only affect the customer's country in Dub's system (and has no effect on existing conversion events).
|
|
36
|
+
*/
|
|
37
|
+
country: string;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type RequestBody3 = {
|
|
41
|
+
type: "sale";
|
|
42
|
+
/**
|
|
43
|
+
* The ID of the partner to create the commission for.
|
|
44
|
+
*/
|
|
45
|
+
partnerId: string;
|
|
46
|
+
/**
|
|
47
|
+
* The customer ID to associate the commission with. Useful if the customer was already created in a prior operation and you want to associate the commission with it.
|
|
48
|
+
*/
|
|
49
|
+
customerId?: string | null | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* The full customer object to associate the commission with. Useful for creating the customer on demand.
|
|
52
|
+
*/
|
|
53
|
+
customer?: RequestBodyCustomer | null | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* The partner link ID to associate the commission with. If not provided, default to the link with the most revenue.
|
|
56
|
+
*/
|
|
57
|
+
linkId?: string | null | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* When `true`, import all unimported paid Stripe invoices for the customer and create a commission for each. When `false`, create a single manual sale event using `saleAmount`.
|
|
60
|
+
*/
|
|
61
|
+
importStripeInvoices?: boolean | null | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Required when `importStripeInvoices` is `false`. The sale amount in cents for the manual sale event. Ignored when importing from Stripe.
|
|
64
|
+
*/
|
|
65
|
+
saleAmount?: number | null | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Only used when `importStripeInvoices` is `false`. The date of the manual sale event. Defaults to the current date and time if not provided.
|
|
68
|
+
*/
|
|
69
|
+
saleEventDate?: string | null | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Only used when `importStripeInvoices` is `false`. An optional invoice ID to attach to the generated sale event and commission entry for deduplication.
|
|
72
|
+
*/
|
|
73
|
+
invoiceId?: string | null | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Only used when `importStripeInvoices` is `false`. An optional product ID stored on the sale event metadata – will also impact commission earnings calculation (if a `Sale` `Product ID` modifier is set).
|
|
76
|
+
*/
|
|
77
|
+
productId?: string | null | undefined;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* The full customer object to associate the commission with. Useful for creating the customer on demand.
|
|
82
|
+
*/
|
|
83
|
+
export type Customer = {
|
|
84
|
+
/**
|
|
85
|
+
* The customer's email address.
|
|
86
|
+
*/
|
|
87
|
+
email?: string | null | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* The customer's name. If not provided, the email address will be used, and if email is not provided, a random name will be generated.
|
|
90
|
+
*/
|
|
91
|
+
name?: string | null | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* The customer's avatar URL. If not provided, a random avatar will be generated.
|
|
94
|
+
*/
|
|
95
|
+
avatar?: string | null | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* The customer's unique identifier your database. This is useful for associating subsequent conversion events from Dub's API to your internal systems.
|
|
98
|
+
*/
|
|
99
|
+
externalId: string;
|
|
100
|
+
/**
|
|
101
|
+
* The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.
|
|
102
|
+
*/
|
|
103
|
+
stripeCustomerId?: string | null | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* The customer's country in ISO 3166-1 alpha-2 format. Updating this field will only affect the customer's country in Dub's system (and has no effect on existing conversion events).
|
|
106
|
+
*/
|
|
107
|
+
country: string;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export type RequestBody2 = {
|
|
111
|
+
type: "lead";
|
|
112
|
+
/**
|
|
113
|
+
* The ID of the partner to create the commission for.
|
|
114
|
+
*/
|
|
115
|
+
partnerId: string;
|
|
116
|
+
/**
|
|
117
|
+
* The customer ID to associate the commission with. Useful if the customer was already created in a prior operation and you want to associate the commission with it.
|
|
118
|
+
*/
|
|
119
|
+
customerId?: string | null | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* The full customer object to associate the commission with. Useful for creating the customer on demand.
|
|
122
|
+
*/
|
|
123
|
+
customer?: Customer | null | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* The partner link ID to associate the commission with. If not provided, default to the link with the most revenue.
|
|
126
|
+
*/
|
|
127
|
+
linkId?: string | null | undefined;
|
|
128
|
+
/**
|
|
129
|
+
* The date and time of the lead event. If not provided, defaults to the current date and time.
|
|
130
|
+
*/
|
|
131
|
+
leadEventDate?: string | null | undefined;
|
|
132
|
+
/**
|
|
133
|
+
* The name of the lead event. If not provided, defaults to 'Sign up'.
|
|
134
|
+
*/
|
|
135
|
+
leadEventName?: string | null | undefined;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
export type RequestBody1 = {
|
|
139
|
+
type: "custom";
|
|
140
|
+
/**
|
|
141
|
+
* The ID of the partner to create the commission for.
|
|
142
|
+
*/
|
|
143
|
+
partnerId: string;
|
|
144
|
+
/**
|
|
145
|
+
* The commission amount in cents.
|
|
146
|
+
*/
|
|
147
|
+
amount: number;
|
|
148
|
+
/**
|
|
149
|
+
* If not provided, the current date will be used.
|
|
150
|
+
*/
|
|
151
|
+
date?: string | null | undefined;
|
|
152
|
+
/**
|
|
153
|
+
* The description of the commission.
|
|
154
|
+
*/
|
|
155
|
+
description?: string | null | undefined;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
export type CreateCommissionRequestBody =
|
|
159
|
+
| RequestBody1
|
|
160
|
+
| RequestBody2
|
|
161
|
+
| RequestBody3;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* The request was accepted and commission creation was queued.
|
|
165
|
+
*/
|
|
166
|
+
export type CreateCommissionResponseBody = {
|
|
167
|
+
success: boolean;
|
|
168
|
+
message: string;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
/** @internal */
|
|
172
|
+
export type RequestBodyCustomer$Outbound = {
|
|
173
|
+
email?: string | null | undefined;
|
|
174
|
+
name?: string | null | undefined;
|
|
175
|
+
avatar?: string | null | undefined;
|
|
176
|
+
externalId: string;
|
|
177
|
+
stripeCustomerId?: string | null | undefined;
|
|
178
|
+
country: string;
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
/** @internal */
|
|
182
|
+
export const RequestBodyCustomer$outboundSchema: z.ZodType<
|
|
183
|
+
RequestBodyCustomer$Outbound,
|
|
184
|
+
z.ZodTypeDef,
|
|
185
|
+
RequestBodyCustomer
|
|
186
|
+
> = z.object({
|
|
187
|
+
email: z.nullable(z.string()).optional(),
|
|
188
|
+
name: z.nullable(z.string()).optional(),
|
|
189
|
+
avatar: z.nullable(z.string()).optional(),
|
|
190
|
+
externalId: z.string(),
|
|
191
|
+
stripeCustomerId: z.nullable(z.string()).optional(),
|
|
192
|
+
country: z.string(),
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
export function requestBodyCustomerToJSON(
|
|
196
|
+
requestBodyCustomer: RequestBodyCustomer,
|
|
197
|
+
): string {
|
|
198
|
+
return JSON.stringify(
|
|
199
|
+
RequestBodyCustomer$outboundSchema.parse(requestBodyCustomer),
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/** @internal */
|
|
204
|
+
export type RequestBody3$Outbound = {
|
|
205
|
+
type: "sale";
|
|
206
|
+
partnerId: string;
|
|
207
|
+
customerId?: string | null | undefined;
|
|
208
|
+
customer?: RequestBodyCustomer$Outbound | null | undefined;
|
|
209
|
+
linkId?: string | null | undefined;
|
|
210
|
+
importStripeInvoices: boolean | null;
|
|
211
|
+
saleAmount?: number | null | undefined;
|
|
212
|
+
saleEventDate?: string | null | undefined;
|
|
213
|
+
invoiceId?: string | null | undefined;
|
|
214
|
+
productId?: string | null | undefined;
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
/** @internal */
|
|
218
|
+
export const RequestBody3$outboundSchema: z.ZodType<
|
|
219
|
+
RequestBody3$Outbound,
|
|
220
|
+
z.ZodTypeDef,
|
|
221
|
+
RequestBody3
|
|
222
|
+
> = z.object({
|
|
223
|
+
type: z.literal("sale"),
|
|
224
|
+
partnerId: z.string(),
|
|
225
|
+
customerId: z.nullable(z.string()).optional(),
|
|
226
|
+
customer: z.nullable(z.lazy(() => RequestBodyCustomer$outboundSchema))
|
|
227
|
+
.optional(),
|
|
228
|
+
linkId: z.nullable(z.string()).optional(),
|
|
229
|
+
importStripeInvoices: z.nullable(z.boolean().default(false)),
|
|
230
|
+
saleAmount: z.nullable(z.number()).optional(),
|
|
231
|
+
saleEventDate: z.nullable(z.string()).optional(),
|
|
232
|
+
invoiceId: z.nullable(z.string()).optional(),
|
|
233
|
+
productId: z.nullable(z.string()).optional(),
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
export function requestBody3ToJSON(requestBody3: RequestBody3): string {
|
|
237
|
+
return JSON.stringify(RequestBody3$outboundSchema.parse(requestBody3));
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/** @internal */
|
|
241
|
+
export type Customer$Outbound = {
|
|
242
|
+
email?: string | null | undefined;
|
|
243
|
+
name?: string | null | undefined;
|
|
244
|
+
avatar?: string | null | undefined;
|
|
245
|
+
externalId: string;
|
|
246
|
+
stripeCustomerId?: string | null | undefined;
|
|
247
|
+
country: string;
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
/** @internal */
|
|
251
|
+
export const Customer$outboundSchema: z.ZodType<
|
|
252
|
+
Customer$Outbound,
|
|
253
|
+
z.ZodTypeDef,
|
|
254
|
+
Customer
|
|
255
|
+
> = z.object({
|
|
256
|
+
email: z.nullable(z.string()).optional(),
|
|
257
|
+
name: z.nullable(z.string()).optional(),
|
|
258
|
+
avatar: z.nullable(z.string()).optional(),
|
|
259
|
+
externalId: z.string(),
|
|
260
|
+
stripeCustomerId: z.nullable(z.string()).optional(),
|
|
261
|
+
country: z.string(),
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
export function customerToJSON(customer: Customer): string {
|
|
265
|
+
return JSON.stringify(Customer$outboundSchema.parse(customer));
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/** @internal */
|
|
269
|
+
export type RequestBody2$Outbound = {
|
|
270
|
+
type: "lead";
|
|
271
|
+
partnerId: string;
|
|
272
|
+
customerId?: string | null | undefined;
|
|
273
|
+
customer?: Customer$Outbound | null | undefined;
|
|
274
|
+
linkId?: string | null | undefined;
|
|
275
|
+
leadEventDate?: string | null | undefined;
|
|
276
|
+
leadEventName: string | null;
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
/** @internal */
|
|
280
|
+
export const RequestBody2$outboundSchema: z.ZodType<
|
|
281
|
+
RequestBody2$Outbound,
|
|
282
|
+
z.ZodTypeDef,
|
|
283
|
+
RequestBody2
|
|
284
|
+
> = z.object({
|
|
285
|
+
type: z.literal("lead"),
|
|
286
|
+
partnerId: z.string(),
|
|
287
|
+
customerId: z.nullable(z.string()).optional(),
|
|
288
|
+
customer: z.nullable(z.lazy(() => Customer$outboundSchema)).optional(),
|
|
289
|
+
linkId: z.nullable(z.string()).optional(),
|
|
290
|
+
leadEventDate: z.nullable(z.string()).optional(),
|
|
291
|
+
leadEventName: z.nullable(z.string().default("Sign up")),
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
export function requestBody2ToJSON(requestBody2: RequestBody2): string {
|
|
295
|
+
return JSON.stringify(RequestBody2$outboundSchema.parse(requestBody2));
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/** @internal */
|
|
299
|
+
export type RequestBody1$Outbound = {
|
|
300
|
+
type: "custom";
|
|
301
|
+
partnerId: string;
|
|
302
|
+
amount: number;
|
|
303
|
+
date?: string | null | undefined;
|
|
304
|
+
description?: string | null | undefined;
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
/** @internal */
|
|
308
|
+
export const RequestBody1$outboundSchema: z.ZodType<
|
|
309
|
+
RequestBody1$Outbound,
|
|
310
|
+
z.ZodTypeDef,
|
|
311
|
+
RequestBody1
|
|
312
|
+
> = z.object({
|
|
313
|
+
type: z.literal("custom"),
|
|
314
|
+
partnerId: z.string(),
|
|
315
|
+
amount: z.number(),
|
|
316
|
+
date: z.nullable(z.string()).optional(),
|
|
317
|
+
description: z.nullable(z.string()).optional(),
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
export function requestBody1ToJSON(requestBody1: RequestBody1): string {
|
|
321
|
+
return JSON.stringify(RequestBody1$outboundSchema.parse(requestBody1));
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/** @internal */
|
|
325
|
+
export type CreateCommissionRequestBody$Outbound =
|
|
326
|
+
| RequestBody1$Outbound
|
|
327
|
+
| RequestBody2$Outbound
|
|
328
|
+
| RequestBody3$Outbound;
|
|
329
|
+
|
|
330
|
+
/** @internal */
|
|
331
|
+
export const CreateCommissionRequestBody$outboundSchema: z.ZodType<
|
|
332
|
+
CreateCommissionRequestBody$Outbound,
|
|
333
|
+
z.ZodTypeDef,
|
|
334
|
+
CreateCommissionRequestBody
|
|
335
|
+
> = z.union([
|
|
336
|
+
z.lazy(() => RequestBody1$outboundSchema),
|
|
337
|
+
z.lazy(() => RequestBody2$outboundSchema),
|
|
338
|
+
z.lazy(() => RequestBody3$outboundSchema),
|
|
339
|
+
]);
|
|
340
|
+
|
|
341
|
+
export function createCommissionRequestBodyToJSON(
|
|
342
|
+
createCommissionRequestBody: CreateCommissionRequestBody,
|
|
343
|
+
): string {
|
|
344
|
+
return JSON.stringify(
|
|
345
|
+
CreateCommissionRequestBody$outboundSchema.parse(
|
|
346
|
+
createCommissionRequestBody,
|
|
347
|
+
),
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/** @internal */
|
|
352
|
+
export const CreateCommissionResponseBody$inboundSchema: z.ZodType<
|
|
353
|
+
CreateCommissionResponseBody,
|
|
354
|
+
z.ZodTypeDef,
|
|
355
|
+
unknown
|
|
356
|
+
> = z.object({
|
|
357
|
+
success: z.boolean(),
|
|
358
|
+
message: z.string(),
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
export function createCommissionResponseBodyFromJSON(
|
|
362
|
+
jsonString: string,
|
|
363
|
+
): SafeParseResult<CreateCommissionResponseBody, SDKValidationError> {
|
|
364
|
+
return safeParse(
|
|
365
|
+
jsonString,
|
|
366
|
+
(x) => CreateCommissionResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
367
|
+
`Failed to parse 'CreateCommissionResponseBody' from JSON`,
|
|
368
|
+
);
|
|
369
|
+
}
|
|
@@ -156,6 +156,23 @@ export type CreatePartnerRequestBody = {
|
|
|
156
156
|
linkProps?: LinkProps | undefined;
|
|
157
157
|
};
|
|
158
158
|
|
|
159
|
+
/**
|
|
160
|
+
* The partner's network status on Dub.
|
|
161
|
+
*/
|
|
162
|
+
export const CreatePartnerNetworkStatus = {
|
|
163
|
+
Draft: "draft",
|
|
164
|
+
Submitted: "submitted",
|
|
165
|
+
Approved: "approved",
|
|
166
|
+
Rejected: "rejected",
|
|
167
|
+
Trusted: "trusted",
|
|
168
|
+
} as const;
|
|
169
|
+
/**
|
|
170
|
+
* The partner's network status on Dub.
|
|
171
|
+
*/
|
|
172
|
+
export type CreatePartnerNetworkStatus = ClosedEnum<
|
|
173
|
+
typeof CreatePartnerNetworkStatus
|
|
174
|
+
>;
|
|
175
|
+
|
|
159
176
|
/**
|
|
160
177
|
* The partner's default payout method. Connect: Bank account payouts via Stripe Connect; Stablecoin: USDC payouts directly to a crypto wallet; PayPal: Payouts via PayPal
|
|
161
178
|
*/
|
|
@@ -402,6 +419,11 @@ export type CreatePartnerApplication = {
|
|
|
402
419
|
reviewedAt: string | null;
|
|
403
420
|
};
|
|
404
421
|
|
|
422
|
+
export type CreatePartnerTags = {
|
|
423
|
+
id: string;
|
|
424
|
+
name: string;
|
|
425
|
+
};
|
|
426
|
+
|
|
405
427
|
/**
|
|
406
428
|
* The created or updated partner
|
|
407
429
|
*/
|
|
@@ -415,9 +437,9 @@ export type CreatePartnerResponseBody = {
|
|
|
415
437
|
*/
|
|
416
438
|
name: string;
|
|
417
439
|
/**
|
|
418
|
-
*
|
|
440
|
+
* The partner's unique username on Dub.
|
|
419
441
|
*/
|
|
420
|
-
|
|
442
|
+
username: string | null;
|
|
421
443
|
/**
|
|
422
444
|
* The partner's email address. Should be a unique value across Dub.
|
|
423
445
|
*/
|
|
@@ -434,6 +456,14 @@ export type CreatePartnerResponseBody = {
|
|
|
434
456
|
* The partner's country (required for tax purposes).
|
|
435
457
|
*/
|
|
436
458
|
country: string | null;
|
|
459
|
+
/**
|
|
460
|
+
* If the partner profile type is a company, this is the partner's legal company name.
|
|
461
|
+
*/
|
|
462
|
+
companyName: string | null;
|
|
463
|
+
/**
|
|
464
|
+
* The partner's network status on Dub.
|
|
465
|
+
*/
|
|
466
|
+
networkStatus: CreatePartnerNetworkStatus;
|
|
437
467
|
/**
|
|
438
468
|
* The partner's default payout method. Connect: Bank account payouts via Stripe Connect; Stablecoin: USDC payouts directly to a crypto wallet; PayPal: Payouts via PayPal
|
|
439
469
|
*/
|
|
@@ -450,10 +480,6 @@ export type CreatePartnerResponseBody = {
|
|
|
450
480
|
* The date when the partner enabled payouts.
|
|
451
481
|
*/
|
|
452
482
|
payoutsEnabledAt: string | null;
|
|
453
|
-
/**
|
|
454
|
-
* The date when the partner received the trusted badge in the partner network.
|
|
455
|
-
*/
|
|
456
|
-
trustedAt: string | null;
|
|
457
483
|
/**
|
|
458
484
|
* The date when the partner's identity was verified.
|
|
459
485
|
*/
|
|
@@ -490,6 +516,7 @@ export type CreatePartnerResponseBody = {
|
|
|
490
516
|
clickRewardId?: string | null | undefined;
|
|
491
517
|
leadRewardId?: string | null | undefined;
|
|
492
518
|
saleRewardId?: string | null | undefined;
|
|
519
|
+
referralRewardId?: string | null | undefined;
|
|
493
520
|
discountId?: string | null | undefined;
|
|
494
521
|
/**
|
|
495
522
|
* If the partner submitted an application to join the program, this is the ID of the application.
|
|
@@ -508,6 +535,10 @@ export type CreatePartnerResponseBody = {
|
|
|
508
535
|
* Linked program application, including review outcome when applicable.
|
|
509
536
|
*/
|
|
510
537
|
application?: CreatePartnerApplication | null | undefined;
|
|
538
|
+
/**
|
|
539
|
+
* The tags associated with the partner.
|
|
540
|
+
*/
|
|
541
|
+
tags?: Array<CreatePartnerTags> | undefined;
|
|
511
542
|
/**
|
|
512
543
|
* The total number of clicks on the partner's links
|
|
513
544
|
*/
|
|
@@ -580,6 +611,12 @@ export type CreatePartnerResponseBody = {
|
|
|
580
611
|
* The partner's TikTok username (e.g. `johndoe`).
|
|
581
612
|
*/
|
|
582
613
|
tiktok?: string | null | undefined;
|
|
614
|
+
/**
|
|
615
|
+
* DEPRECATED: Use `networkStatus` instead.
|
|
616
|
+
*
|
|
617
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
618
|
+
*/
|
|
619
|
+
trustedAt?: string | null | undefined;
|
|
583
620
|
};
|
|
584
621
|
|
|
585
622
|
/** @internal */
|
|
@@ -742,6 +779,11 @@ export function createPartnerRequestBodyToJSON(
|
|
|
742
779
|
);
|
|
743
780
|
}
|
|
744
781
|
|
|
782
|
+
/** @internal */
|
|
783
|
+
export const CreatePartnerNetworkStatus$inboundSchema: z.ZodNativeEnum<
|
|
784
|
+
typeof CreatePartnerNetworkStatus
|
|
785
|
+
> = z.nativeEnum(CreatePartnerNetworkStatus);
|
|
786
|
+
|
|
745
787
|
/** @internal */
|
|
746
788
|
export const CreatePartnerDefaultPayoutMethod$inboundSchema: z.ZodNativeEnum<
|
|
747
789
|
typeof CreatePartnerDefaultPayoutMethod
|
|
@@ -1137,6 +1179,26 @@ export function createPartnerApplicationFromJSON(
|
|
|
1137
1179
|
);
|
|
1138
1180
|
}
|
|
1139
1181
|
|
|
1182
|
+
/** @internal */
|
|
1183
|
+
export const CreatePartnerTags$inboundSchema: z.ZodType<
|
|
1184
|
+
CreatePartnerTags,
|
|
1185
|
+
z.ZodTypeDef,
|
|
1186
|
+
unknown
|
|
1187
|
+
> = z.object({
|
|
1188
|
+
id: z.string(),
|
|
1189
|
+
name: z.string(),
|
|
1190
|
+
});
|
|
1191
|
+
|
|
1192
|
+
export function createPartnerTagsFromJSON(
|
|
1193
|
+
jsonString: string,
|
|
1194
|
+
): SafeParseResult<CreatePartnerTags, SDKValidationError> {
|
|
1195
|
+
return safeParse(
|
|
1196
|
+
jsonString,
|
|
1197
|
+
(x) => CreatePartnerTags$inboundSchema.parse(JSON.parse(x)),
|
|
1198
|
+
`Failed to parse 'CreatePartnerTags' from JSON`,
|
|
1199
|
+
);
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1140
1202
|
/** @internal */
|
|
1141
1203
|
export const CreatePartnerResponseBody$inboundSchema: z.ZodType<
|
|
1142
1204
|
CreatePartnerResponseBody,
|
|
@@ -1145,18 +1207,19 @@ export const CreatePartnerResponseBody$inboundSchema: z.ZodType<
|
|
|
1145
1207
|
> = z.object({
|
|
1146
1208
|
id: z.string(),
|
|
1147
1209
|
name: z.string(),
|
|
1148
|
-
|
|
1210
|
+
username: z.nullable(z.string()),
|
|
1149
1211
|
email: z.nullable(z.string()),
|
|
1150
1212
|
image: z.nullable(z.string()),
|
|
1151
1213
|
description: z.nullable(z.string()).optional(),
|
|
1152
1214
|
country: z.nullable(z.string()),
|
|
1215
|
+
companyName: z.nullable(z.string()),
|
|
1216
|
+
networkStatus: CreatePartnerNetworkStatus$inboundSchema,
|
|
1153
1217
|
defaultPayoutMethod: z.nullable(
|
|
1154
1218
|
CreatePartnerDefaultPayoutMethod$inboundSchema,
|
|
1155
1219
|
),
|
|
1156
1220
|
paypalEmail: z.nullable(z.string()),
|
|
1157
1221
|
stripeConnectId: z.nullable(z.string()),
|
|
1158
1222
|
payoutsEnabledAt: z.nullable(z.string()),
|
|
1159
|
-
trustedAt: z.nullable(z.string()),
|
|
1160
1223
|
identityVerifiedAt: z.nullable(z.string()),
|
|
1161
1224
|
programId: z.string(),
|
|
1162
1225
|
groupId: z.nullable(z.string()).optional(),
|
|
@@ -1169,6 +1232,7 @@ export const CreatePartnerResponseBody$inboundSchema: z.ZodType<
|
|
|
1169
1232
|
clickRewardId: z.nullable(z.string()).optional(),
|
|
1170
1233
|
leadRewardId: z.nullable(z.string()).optional(),
|
|
1171
1234
|
saleRewardId: z.nullable(z.string()).optional(),
|
|
1235
|
+
referralRewardId: z.nullable(z.string()).optional(),
|
|
1172
1236
|
discountId: z.nullable(z.string()).optional(),
|
|
1173
1237
|
applicationId: z.nullable(z.string()).optional(),
|
|
1174
1238
|
bannedAt: z.nullable(z.string()).optional(),
|
|
@@ -1178,6 +1242,7 @@ export const CreatePartnerResponseBody$inboundSchema: z.ZodType<
|
|
|
1178
1242
|
).optional(),
|
|
1179
1243
|
application: z.nullable(z.lazy(() => CreatePartnerApplication$inboundSchema))
|
|
1180
1244
|
.optional(),
|
|
1245
|
+
tags: z.array(z.lazy(() => CreatePartnerTags$inboundSchema)).optional(),
|
|
1181
1246
|
totalClicks: z.number().default(0),
|
|
1182
1247
|
totalLeads: z.number().default(0),
|
|
1183
1248
|
totalConversions: z.number().default(0),
|
|
@@ -1196,6 +1261,7 @@ export const CreatePartnerResponseBody$inboundSchema: z.ZodType<
|
|
|
1196
1261
|
linkedin: z.nullable(z.string()).optional(),
|
|
1197
1262
|
instagram: z.nullable(z.string()).optional(),
|
|
1198
1263
|
tiktok: z.nullable(z.string()).optional(),
|
|
1264
|
+
trustedAt: z.nullable(z.string()).optional(),
|
|
1199
1265
|
});
|
|
1200
1266
|
|
|
1201
1267
|
export function createPartnerResponseBodyFromJSON(
|
|
@@ -93,7 +93,7 @@ export type GetCustomerResponseBody = {
|
|
|
93
93
|
/**
|
|
94
94
|
* Name of the customer.
|
|
95
95
|
*/
|
|
96
|
-
name
|
|
96
|
+
name?: string | null | undefined;
|
|
97
97
|
/**
|
|
98
98
|
* Email of the customer.
|
|
99
99
|
*/
|
|
@@ -248,7 +248,7 @@ export const GetCustomerResponseBody$inboundSchema: z.ZodType<
|
|
|
248
248
|
unknown
|
|
249
249
|
> = z.object({
|
|
250
250
|
id: z.string(),
|
|
251
|
-
name: z.string(),
|
|
251
|
+
name: z.nullable(z.string()).optional(),
|
|
252
252
|
email: z.nullable(z.string()).optional(),
|
|
253
253
|
avatar: z.nullable(z.string()).optional(),
|
|
254
254
|
externalId: z.string(),
|
|
@@ -169,7 +169,7 @@ export type GetCustomersResponseBody = {
|
|
|
169
169
|
/**
|
|
170
170
|
* Name of the customer.
|
|
171
171
|
*/
|
|
172
|
-
name
|
|
172
|
+
name?: string | null | undefined;
|
|
173
173
|
/**
|
|
174
174
|
* Email of the customer.
|
|
175
175
|
*/
|
|
@@ -362,7 +362,7 @@ export const GetCustomersResponseBody$inboundSchema: z.ZodType<
|
|
|
362
362
|
unknown
|
|
363
363
|
> = z.object({
|
|
364
364
|
id: z.string(),
|
|
365
|
-
name: z.string(),
|
|
365
|
+
name: z.nullable(z.string()).optional(),
|
|
366
366
|
email: z.nullable(z.string()).optional(),
|
|
367
367
|
avatar: z.nullable(z.string()).optional(),
|
|
368
368
|
externalId: z.string(),
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
9
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
9
|
import * as components from "../components/index.js";
|
|
11
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
@@ -20,50 +19,6 @@ export type QueryParamTagIds = string | Array<string>;
|
|
|
20
19
|
*/
|
|
21
20
|
export type QueryParamTagNames = string | Array<string>;
|
|
22
21
|
|
|
23
|
-
/**
|
|
24
|
-
* The field to sort the links by. The default is `createdAt`.
|
|
25
|
-
*/
|
|
26
|
-
export const SortBy = {
|
|
27
|
-
CreatedAt: "createdAt",
|
|
28
|
-
Clicks: "clicks",
|
|
29
|
-
SaleAmount: "saleAmount",
|
|
30
|
-
LastClicked: "lastClicked",
|
|
31
|
-
} as const;
|
|
32
|
-
/**
|
|
33
|
-
* The field to sort the links by. The default is `createdAt`.
|
|
34
|
-
*/
|
|
35
|
-
export type SortBy = ClosedEnum<typeof SortBy>;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* The sort order. The default is `desc`.
|
|
39
|
-
*/
|
|
40
|
-
export const SortOrder = {
|
|
41
|
-
Asc: "asc",
|
|
42
|
-
Desc: "desc",
|
|
43
|
-
} as const;
|
|
44
|
-
/**
|
|
45
|
-
* The sort order. The default is `desc`.
|
|
46
|
-
*/
|
|
47
|
-
export type SortOrder = ClosedEnum<typeof SortOrder>;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* DEPRECATED. Use `sortBy` instead.
|
|
51
|
-
*
|
|
52
|
-
* @deprecated enum: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
53
|
-
*/
|
|
54
|
-
export const Sort = {
|
|
55
|
-
CreatedAt: "createdAt",
|
|
56
|
-
Clicks: "clicks",
|
|
57
|
-
SaleAmount: "saleAmount",
|
|
58
|
-
LastClicked: "lastClicked",
|
|
59
|
-
} as const;
|
|
60
|
-
/**
|
|
61
|
-
* DEPRECATED. Use `sortBy` instead.
|
|
62
|
-
*
|
|
63
|
-
* @deprecated enum: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
64
|
-
*/
|
|
65
|
-
export type Sort = ClosedEnum<typeof Sort>;
|
|
66
|
-
|
|
67
22
|
export type GetLinksRequest = {
|
|
68
23
|
/**
|
|
69
24
|
* The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned.
|
|
@@ -105,18 +60,6 @@ export type GetLinksRequest = {
|
|
|
105
60
|
* DEPRECATED. Filter for links that have at least one tag assigned to them.
|
|
106
61
|
*/
|
|
107
62
|
withTags?: boolean | undefined;
|
|
108
|
-
/**
|
|
109
|
-
* The field to sort the links by. The default is `createdAt`.
|
|
110
|
-
*/
|
|
111
|
-
sortBy?: SortBy | undefined;
|
|
112
|
-
/**
|
|
113
|
-
* The sort order. The default is `desc`.
|
|
114
|
-
*/
|
|
115
|
-
sortOrder?: SortOrder | undefined;
|
|
116
|
-
/**
|
|
117
|
-
* DEPRECATED. Use `sortBy` instead.
|
|
118
|
-
*/
|
|
119
|
-
sort?: Sort | undefined;
|
|
120
63
|
/**
|
|
121
64
|
* If specified, the query only searches for results before this cursor. Mutually exclusive with `startingAfter`.
|
|
122
65
|
*/
|
|
@@ -175,19 +118,6 @@ export function queryParamTagNamesToJSON(
|
|
|
175
118
|
);
|
|
176
119
|
}
|
|
177
120
|
|
|
178
|
-
/** @internal */
|
|
179
|
-
export const SortBy$outboundSchema: z.ZodNativeEnum<typeof SortBy> = z
|
|
180
|
-
.nativeEnum(SortBy);
|
|
181
|
-
|
|
182
|
-
/** @internal */
|
|
183
|
-
export const SortOrder$outboundSchema: z.ZodNativeEnum<typeof SortOrder> = z
|
|
184
|
-
.nativeEnum(SortOrder);
|
|
185
|
-
|
|
186
|
-
/** @internal */
|
|
187
|
-
export const Sort$outboundSchema: z.ZodNativeEnum<typeof Sort> = z.nativeEnum(
|
|
188
|
-
Sort,
|
|
189
|
-
);
|
|
190
|
-
|
|
191
121
|
/** @internal */
|
|
192
122
|
export type GetLinksRequest$Outbound = {
|
|
193
123
|
domain?: string | undefined;
|
|
@@ -200,9 +130,6 @@ export type GetLinksRequest$Outbound = {
|
|
|
200
130
|
tenantId?: string | undefined;
|
|
201
131
|
showArchived: boolean;
|
|
202
132
|
withTags: boolean;
|
|
203
|
-
sortBy: string;
|
|
204
|
-
sortOrder: string;
|
|
205
|
-
sort: string;
|
|
206
133
|
endingBefore?: string | undefined;
|
|
207
134
|
startingAfter?: string | undefined;
|
|
208
135
|
page?: number | undefined;
|
|
@@ -225,9 +152,6 @@ export const GetLinksRequest$outboundSchema: z.ZodType<
|
|
|
225
152
|
tenantId: z.string().optional(),
|
|
226
153
|
showArchived: z.boolean().default(false),
|
|
227
154
|
withTags: z.boolean().default(false),
|
|
228
|
-
sortBy: SortBy$outboundSchema.default("createdAt"),
|
|
229
|
-
sortOrder: SortOrder$outboundSchema.default("desc"),
|
|
230
|
-
sort: Sort$outboundSchema.default("createdAt"),
|
|
231
155
|
endingBefore: z.string().optional(),
|
|
232
156
|
startingAfter: z.string().optional(),
|
|
233
157
|
page: z.number().optional(),
|