@clientcasa/sdk 0.3.0 → 0.4.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/README.md +19 -24
- package/esm/funcs/catalog-items-list.js +1 -0
- package/esm/funcs/catalog-items-list.js.map +1 -1
- package/esm/funcs/{inquiries-get.d.ts → form-submissions-get.d.ts} +3 -3
- package/esm/funcs/form-submissions-get.d.ts.map +1 -0
- package/esm/funcs/{inquiries-delete.js → form-submissions-get.js} +9 -8
- package/esm/funcs/form-submissions-get.js.map +1 -0
- package/esm/funcs/form-submissions-list.d.ts +21 -0
- package/esm/funcs/form-submissions-list.d.ts.map +1 -0
- package/esm/funcs/{inquiries-list.js → form-submissions-list.js} +14 -9
- package/esm/funcs/form-submissions-list.js.map +1 -0
- package/esm/funcs/{proposals-get.d.ts → forms-and-agreements-get.d.ts} +2 -2
- package/esm/funcs/forms-and-agreements-get.d.ts.map +1 -0
- package/esm/funcs/{proposals-get.js → forms-and-agreements-get.js} +6 -6
- package/esm/funcs/forms-and-agreements-get.js.map +1 -0
- package/esm/funcs/{inquiries-delete.d.ts → forms-and-agreements-list.d.ts} +6 -3
- package/esm/funcs/forms-and-agreements-list.d.ts.map +1 -0
- package/esm/funcs/{proposals-list.js → forms-and-agreements-list.js} +8 -8
- package/esm/funcs/forms-and-agreements-list.js.map +1 -0
- package/esm/funcs/{proposals-list.d.ts → forms-get.d.ts} +4 -6
- package/esm/funcs/forms-get.d.ts.map +1 -0
- package/esm/funcs/{inquiries-get.js → forms-get.js} +7 -7
- package/esm/funcs/forms-get.js.map +1 -0
- package/esm/funcs/{inquiries-list.d.ts → forms-list.d.ts} +3 -3
- package/esm/funcs/forms-list.d.ts.map +1 -0
- package/esm/funcs/forms-list.js +138 -0
- package/esm/funcs/forms-list.js.map +1 -0
- package/esm/funcs/invoices-create.d.ts +1 -1
- package/esm/funcs/invoices-create.js +1 -1
- package/esm/funcs/invoices-list.js +1 -0
- package/esm/funcs/invoices-list.js.map +1 -1
- package/esm/funcs/milestones-create.d.ts +1 -1
- package/esm/funcs/milestones-create.js +1 -1
- package/esm/hooks/types.d.ts +1 -0
- package/esm/hooks/types.d.ts.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/sdks.d.ts.map +1 -1
- package/esm/lib/sdks.js +13 -4
- package/esm/lib/sdks.js.map +1 -1
- package/esm/models/api-error.d.ts +1 -0
- package/esm/models/api-error.d.ts.map +1 -1
- package/esm/models/api-error.js +1 -0
- package/esm/models/api-error.js.map +1 -1
- package/esm/models/catalog-item.d.ts +17 -0
- package/esm/models/catalog-item.d.ts.map +1 -1
- package/esm/models/catalog-item.js +15 -0
- package/esm/models/catalog-item.js.map +1 -1
- package/esm/models/client-create.d.ts +5 -1
- package/esm/models/client-create.d.ts.map +1 -1
- package/esm/models/client-create.js +5 -1
- package/esm/models/client-create.js.map +1 -1
- package/esm/models/client-document-list.d.ts +13 -0
- package/esm/models/client-document-list.d.ts.map +1 -0
- package/esm/models/client-document-list.js +16 -0
- package/esm/models/client-document-list.js.map +1 -0
- package/esm/models/client-document.d.ts +70 -0
- package/esm/models/client-document.d.ts.map +1 -0
- package/esm/models/client-document.js +45 -0
- package/esm/models/client-document.js.map +1 -0
- package/esm/models/client-update.d.ts +5 -1
- package/esm/models/client-update.d.ts.map +1 -1
- package/esm/models/client-update.js +5 -1
- package/esm/models/client-update.js.map +1 -1
- package/esm/models/client.d.ts +5 -1
- package/esm/models/client.d.ts.map +1 -1
- package/esm/models/client.js +5 -1
- package/esm/models/client.js.map +1 -1
- package/esm/models/contact.d.ts +1 -1
- package/esm/models/contact.d.ts.map +1 -1
- package/esm/models/contact.js +1 -1
- package/esm/models/contact.js.map +1 -1
- package/esm/models/contract-create.d.ts +0 -5
- package/esm/models/contract-create.d.ts.map +1 -1
- package/esm/models/contract-create.js +0 -1
- package/esm/models/contract-create.js.map +1 -1
- package/esm/models/contract.d.ts +0 -4
- package/esm/models/contract.d.ts.map +1 -1
- package/esm/models/contract.js +0 -1
- package/esm/models/contract.js.map +1 -1
- package/esm/models/form-list.d.ts +13 -0
- package/esm/models/form-list.d.ts.map +1 -0
- package/esm/models/form-list.js +17 -0
- package/esm/models/form-list.js.map +1 -0
- package/esm/models/form-submission-answer.d.ts +12 -0
- package/esm/models/form-submission-answer.d.ts.map +1 -0
- package/esm/models/form-submission-answer.js +16 -0
- package/esm/models/form-submission-answer.js.map +1 -0
- package/esm/models/form-submission-list.d.ts +13 -0
- package/esm/models/form-submission-list.d.ts.map +1 -0
- package/esm/models/form-submission-list.js +16 -0
- package/esm/models/form-submission-list.js.map +1 -0
- package/esm/models/form-submission.d.ts +54 -0
- package/esm/models/form-submission.d.ts.map +1 -0
- package/esm/models/form-submission.js +38 -0
- package/esm/models/form-submission.js.map +1 -0
- package/esm/models/form.d.ts +36 -0
- package/esm/models/form.d.ts.map +1 -0
- package/esm/models/form.js +30 -0
- package/esm/models/form.js.map +1 -0
- package/esm/models/index.d.ts +7 -8
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +7 -8
- package/esm/models/index.js.map +1 -1
- package/esm/models/invoice.d.ts +4 -1
- package/esm/models/invoice.d.ts.map +1 -1
- package/esm/models/invoice.js +1 -1
- package/esm/models/invoice.js.map +1 -1
- package/esm/models/milestone-create.d.ts +1 -1
- package/esm/models/milestone-create.js +1 -1
- package/esm/models/milestone-create.js.map +1 -1
- package/esm/models/milestone.d.ts +1 -1
- package/esm/models/milestone.js +1 -1
- package/esm/models/milestone.js.map +1 -1
- package/esm/models/operations/get-client-document.d.ts +27 -0
- package/esm/models/operations/get-client-document.d.ts.map +1 -0
- package/esm/models/operations/get-client-document.js +20 -0
- package/esm/models/operations/get-client-document.js.map +1 -0
- package/esm/models/operations/get-form-submission.d.ts +27 -0
- package/esm/models/operations/get-form-submission.d.ts.map +1 -0
- package/esm/models/operations/get-form-submission.js +20 -0
- package/esm/models/operations/get-form-submission.js.map +1 -0
- package/esm/models/operations/get-form.d.ts +27 -0
- package/esm/models/operations/get-form.d.ts.map +1 -0
- package/esm/models/operations/get-form.js +20 -0
- package/esm/models/operations/get-form.js.map +1 -0
- package/esm/models/operations/index.d.ts +6 -10
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +6 -10
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/list-catalog-items.d.ts +9 -0
- package/esm/models/operations/list-catalog-items.d.ts.map +1 -1
- package/esm/models/operations/list-catalog-items.js +8 -0
- package/esm/models/operations/list-catalog-items.js.map +1 -1
- package/esm/models/operations/list-client-documents.d.ts +61 -0
- package/esm/models/operations/list-client-documents.d.ts.map +1 -0
- package/esm/models/operations/list-client-documents.js +50 -0
- package/esm/models/operations/list-client-documents.js.map +1 -0
- package/esm/models/operations/list-clients.d.ts +5 -1
- package/esm/models/operations/list-clients.d.ts.map +1 -1
- package/esm/models/operations/list-clients.js +5 -1
- package/esm/models/operations/list-clients.js.map +1 -1
- package/esm/models/operations/list-form-submissions.d.ts +64 -0
- package/esm/models/operations/list-form-submissions.d.ts.map +1 -0
- package/esm/models/operations/list-form-submissions.js +51 -0
- package/esm/models/operations/list-form-submissions.js.map +1 -0
- package/esm/models/operations/list-forms.d.ts +47 -0
- package/esm/models/operations/list-forms.d.ts.map +1 -0
- package/esm/models/operations/list-forms.js +43 -0
- package/esm/models/operations/list-forms.js.map +1 -0
- package/esm/models/operations/list-invoices.d.ts +18 -1
- package/esm/models/operations/list-invoices.d.ts.map +1 -1
- package/esm/models/operations/list-invoices.js +10 -1
- package/esm/models/operations/list-invoices.js.map +1 -1
- package/esm/models/operations/list-milestones.d.ts +1 -1
- package/esm/models/operations/list-milestones.js +1 -1
- package/esm/models/operations/list-milestones.js.map +1 -1
- package/esm/models/operations/list-payments.d.ts +4 -4
- package/esm/models/operations/list-payments.d.ts.map +1 -1
- package/esm/models/operations/list-payments.js +3 -3
- package/esm/models/operations/list-payments.js.map +1 -1
- package/esm/models/operations/list-webhooks.d.ts +10 -11
- package/esm/models/operations/list-webhooks.d.ts.map +1 -1
- package/esm/models/operations/list-webhooks.js +10 -11
- package/esm/models/operations/list-webhooks.js.map +1 -1
- package/esm/models/webhook-create.d.ts +10 -11
- package/esm/models/webhook-create.d.ts.map +1 -1
- package/esm/models/webhook-create.js +10 -11
- package/esm/models/webhook-create.js.map +1 -1
- package/esm/models/webhook-update.d.ts +10 -11
- package/esm/models/webhook-update.d.ts.map +1 -1
- package/esm/models/webhook-update.js +10 -11
- package/esm/models/webhook-update.js.map +1 -1
- package/esm/models/webhook.d.ts +10 -11
- package/esm/models/webhook.d.ts.map +1 -1
- package/esm/models/webhook.js +10 -11
- package/esm/models/webhook.js.map +1 -1
- package/esm/sdk/form-submissions.d.ts +20 -0
- package/esm/sdk/form-submissions.d.ts.map +1 -0
- package/esm/sdk/form-submissions.js +26 -0
- package/esm/sdk/form-submissions.js.map +1 -0
- package/esm/sdk/forms-and-agreements.d.ts +17 -0
- package/esm/sdk/forms-and-agreements.d.ts.map +1 -0
- package/esm/sdk/forms-and-agreements.js +23 -0
- package/esm/sdk/forms-and-agreements.js.map +1 -0
- package/esm/sdk/forms.d.ts +17 -0
- package/esm/sdk/forms.d.ts.map +1 -0
- package/esm/sdk/forms.js +23 -0
- package/esm/sdk/forms.js.map +1 -0
- package/esm/sdk/invoices.d.ts +1 -1
- package/esm/sdk/invoices.js +1 -1
- package/esm/sdk/milestones.d.ts +1 -1
- package/esm/sdk/milestones.js +1 -1
- package/esm/sdk/sdk.d.ts +9 -6
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +15 -10
- package/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/catalog-items-list.ts +1 -0
- package/src/funcs/{proposals-delete.ts → form-submissions-get.ts} +16 -14
- package/src/funcs/form-submissions-list.ts +284 -0
- package/src/funcs/{proposals-get.ts → forms-and-agreements-get.ts} +13 -12
- package/src/funcs/{proposals-list.ts → forms-and-agreements-list.ts} +15 -15
- package/src/funcs/{inquiries-get.ts → forms-get.ts} +13 -13
- package/src/funcs/{inquiries-list.ts → forms-list.ts} +17 -22
- package/src/funcs/invoices-create.ts +1 -1
- package/src/funcs/invoices-list.ts +1 -0
- package/src/funcs/milestones-create.ts +1 -1
- package/src/hooks/types.ts +1 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/sdks.ts +13 -4
- package/src/models/api-error.ts +1 -0
- package/src/models/catalog-item.ts +28 -0
- package/src/models/client-create.ts +5 -1
- package/src/models/client-document-list.ts +40 -0
- package/src/models/client-document.ts +114 -0
- package/src/models/client-update.ts +5 -1
- package/src/models/client.ts +5 -1
- package/src/models/contact.ts +2 -2
- package/src/models/contract-create.ts +0 -6
- package/src/models/contract.ts +0 -5
- package/src/models/{inquiry-list.ts → form-list.ts} +9 -9
- package/src/models/form-submission-answer.ts +35 -0
- package/src/models/form-submission-list.ts +40 -0
- package/src/models/form-submission.ts +99 -0
- package/src/models/form.ts +67 -0
- package/src/models/index.ts +7 -8
- package/src/models/invoice.ts +5 -1
- package/src/models/milestone-create.ts +1 -1
- package/src/models/milestone.ts +1 -1
- package/src/models/operations/get-client-document.ts +61 -0
- package/src/models/operations/get-form-submission.ts +61 -0
- package/src/models/operations/get-form.ts +55 -0
- package/src/models/operations/index.ts +6 -10
- package/src/models/operations/list-catalog-items.ts +13 -0
- package/src/models/operations/list-client-documents.ts +132 -0
- package/src/models/operations/list-clients.ts +5 -1
- package/src/models/operations/list-form-submissions.ts +142 -0
- package/src/models/operations/list-forms.ts +112 -0
- package/src/models/operations/list-invoices.ts +23 -1
- package/src/models/operations/list-milestones.ts +1 -1
- package/src/models/operations/list-payments.ts +7 -5
- package/src/models/operations/list-webhooks.ts +10 -11
- package/src/models/webhook-create.ts +10 -11
- package/src/models/webhook-update.ts +10 -11
- package/src/models/webhook.ts +10 -11
- package/src/sdk/form-submissions.ts +50 -0
- package/src/sdk/forms-and-agreements.ts +47 -0
- package/src/sdk/forms.ts +45 -0
- package/src/sdk/invoices.ts +1 -1
- package/src/sdk/milestones.ts +1 -1
- package/src/sdk/sdk.ts +18 -12
- package/esm/funcs/inquiries-create.d.ts +0 -19
- package/esm/funcs/inquiries-create.d.ts.map +0 -1
- package/esm/funcs/inquiries-create.js +0 -96
- package/esm/funcs/inquiries-create.js.map +0 -1
- package/esm/funcs/inquiries-delete.d.ts.map +0 -1
- package/esm/funcs/inquiries-delete.js.map +0 -1
- package/esm/funcs/inquiries-get.d.ts.map +0 -1
- package/esm/funcs/inquiries-get.js.map +0 -1
- package/esm/funcs/inquiries-list.d.ts.map +0 -1
- package/esm/funcs/inquiries-list.js.map +0 -1
- package/esm/funcs/inquiries-update.d.ts +0 -19
- package/esm/funcs/inquiries-update.d.ts.map +0 -1
- package/esm/funcs/inquiries-update.js +0 -111
- package/esm/funcs/inquiries-update.js.map +0 -1
- package/esm/funcs/proposals-create.d.ts +0 -19
- package/esm/funcs/proposals-create.d.ts.map +0 -1
- package/esm/funcs/proposals-create.js +0 -96
- package/esm/funcs/proposals-create.js.map +0 -1
- package/esm/funcs/proposals-delete.d.ts +0 -15
- package/esm/funcs/proposals-delete.d.ts.map +0 -1
- package/esm/funcs/proposals-delete.js +0 -106
- package/esm/funcs/proposals-delete.js.map +0 -1
- package/esm/funcs/proposals-get.d.ts.map +0 -1
- package/esm/funcs/proposals-get.js.map +0 -1
- package/esm/funcs/proposals-list.d.ts.map +0 -1
- package/esm/funcs/proposals-list.js.map +0 -1
- package/esm/funcs/proposals-update.d.ts +0 -19
- package/esm/funcs/proposals-update.d.ts.map +0 -1
- package/esm/funcs/proposals-update.js +0 -111
- package/esm/funcs/proposals-update.js.map +0 -1
- package/esm/models/inquiry-create.d.ts +0 -45
- package/esm/models/inquiry-create.d.ts.map +0 -1
- package/esm/models/inquiry-create.js +0 -28
- package/esm/models/inquiry-create.js.map +0 -1
- package/esm/models/inquiry-list.d.ts +0 -13
- package/esm/models/inquiry-list.d.ts.map +0 -1
- package/esm/models/inquiry-list.js +0 -17
- package/esm/models/inquiry-list.js.map +0 -1
- package/esm/models/inquiry-update.d.ts +0 -45
- package/esm/models/inquiry-update.d.ts.map +0 -1
- package/esm/models/inquiry-update.js +0 -29
- package/esm/models/inquiry-update.js.map +0 -1
- package/esm/models/inquiry.d.ts +0 -78
- package/esm/models/inquiry.d.ts.map +0 -1
- package/esm/models/inquiry.js +0 -51
- package/esm/models/inquiry.js.map +0 -1
- package/esm/models/operations/create-inquiry.d.ts +0 -30
- package/esm/models/operations/create-inquiry.d.ts.map +0 -1
- package/esm/models/operations/create-inquiry.js +0 -27
- package/esm/models/operations/create-inquiry.js.map +0 -1
- package/esm/models/operations/create-proposal.d.ts +0 -30
- package/esm/models/operations/create-proposal.d.ts.map +0 -1
- package/esm/models/operations/create-proposal.js +0 -27
- package/esm/models/operations/create-proposal.js.map +0 -1
- package/esm/models/operations/delete-inquiry.d.ts +0 -27
- package/esm/models/operations/delete-inquiry.d.ts.map +0 -1
- package/esm/models/operations/delete-inquiry.js +0 -20
- package/esm/models/operations/delete-inquiry.js.map +0 -1
- package/esm/models/operations/delete-proposal.d.ts +0 -27
- package/esm/models/operations/delete-proposal.d.ts.map +0 -1
- package/esm/models/operations/delete-proposal.js +0 -20
- package/esm/models/operations/delete-proposal.js.map +0 -1
- package/esm/models/operations/get-inquiry.d.ts +0 -27
- package/esm/models/operations/get-inquiry.d.ts.map +0 -1
- package/esm/models/operations/get-inquiry.js +0 -20
- package/esm/models/operations/get-inquiry.js.map +0 -1
- package/esm/models/operations/get-proposal.d.ts +0 -27
- package/esm/models/operations/get-proposal.d.ts.map +0 -1
- package/esm/models/operations/get-proposal.js +0 -20
- package/esm/models/operations/get-proposal.js.map +0 -1
- package/esm/models/operations/list-inquiries.d.ts +0 -60
- package/esm/models/operations/list-inquiries.d.ts.map +0 -1
- package/esm/models/operations/list-inquiries.js +0 -55
- package/esm/models/operations/list-inquiries.js.map +0 -1
- package/esm/models/operations/list-proposals.d.ts +0 -56
- package/esm/models/operations/list-proposals.d.ts.map +0 -1
- package/esm/models/operations/list-proposals.js +0 -48
- package/esm/models/operations/list-proposals.js.map +0 -1
- package/esm/models/operations/update-inquiry.d.ts +0 -30
- package/esm/models/operations/update-inquiry.d.ts.map +0 -1
- package/esm/models/operations/update-inquiry.js +0 -22
- package/esm/models/operations/update-inquiry.js.map +0 -1
- package/esm/models/operations/update-proposal.d.ts +0 -30
- package/esm/models/operations/update-proposal.d.ts.map +0 -1
- package/esm/models/operations/update-proposal.js +0 -22
- package/esm/models/operations/update-proposal.js.map +0 -1
- package/esm/models/proposal-create.d.ts +0 -45
- package/esm/models/proposal-create.d.ts.map +0 -1
- package/esm/models/proposal-create.js +0 -26
- package/esm/models/proposal-create.js.map +0 -1
- package/esm/models/proposal-list.d.ts +0 -13
- package/esm/models/proposal-list.d.ts.map +0 -1
- package/esm/models/proposal-list.js +0 -16
- package/esm/models/proposal-list.js.map +0 -1
- package/esm/models/proposal-update.d.ts +0 -43
- package/esm/models/proposal-update.d.ts.map +0 -1
- package/esm/models/proposal-update.js +0 -27
- package/esm/models/proposal-update.js.map +0 -1
- package/esm/models/proposal.d.ts +0 -70
- package/esm/models/proposal.d.ts.map +0 -1
- package/esm/models/proposal.js +0 -52
- package/esm/models/proposal.js.map +0 -1
- package/esm/sdk/inquiries.d.ts +0 -35
- package/esm/sdk/inquiries.d.ts.map +0 -1
- package/esm/sdk/inquiries.js +0 -50
- package/esm/sdk/inquiries.js.map +0 -1
- package/esm/sdk/proposals.d.ts +0 -35
- package/esm/sdk/proposals.d.ts.map +0 -1
- package/esm/sdk/proposals.js +0 -50
- package/esm/sdk/proposals.js.map +0 -1
- package/src/funcs/inquiries-create.ts +0 -195
- package/src/funcs/inquiries-delete.ts +0 -201
- package/src/funcs/inquiries-update.ts +0 -206
- package/src/funcs/proposals-create.ts +0 -195
- package/src/funcs/proposals-update.ts +0 -206
- package/src/models/inquiry-create.ts +0 -72
- package/src/models/inquiry-update.ts +0 -80
- package/src/models/inquiry.ts +0 -123
- package/src/models/operations/create-inquiry.ts +0 -73
- package/src/models/operations/create-proposal.ts +0 -73
- package/src/models/operations/delete-inquiry.ts +0 -61
- package/src/models/operations/delete-proposal.ts +0 -61
- package/src/models/operations/get-inquiry.ts +0 -61
- package/src/models/operations/get-proposal.ts +0 -61
- package/src/models/operations/list-inquiries.ts +0 -130
- package/src/models/operations/list-proposals.ts +0 -123
- package/src/models/operations/update-inquiry.ts +0 -65
- package/src/models/operations/update-proposal.ts +0 -65
- package/src/models/proposal-create.ts +0 -86
- package/src/models/proposal-list.ts +0 -35
- package/src/models/proposal-update.ts +0 -84
- package/src/models/proposal.ts +0 -120
- package/src/sdk/inquiries.ts +0 -102
- package/src/sdk/proposals.ts +0 -102
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: "1.0.0",
|
|
64
|
-
sdkVersion: "0.
|
|
65
|
-
genVersion: "2.
|
|
66
|
-
userAgent: "speakeasy-sdk/typescript 0.
|
|
64
|
+
sdkVersion: "0.4.1",
|
|
65
|
+
genVersion: "2.900.0",
|
|
66
|
+
userAgent: "speakeasy-sdk/typescript 0.4.1 2.900.0 1.0.0 @clientcasa/sdk",
|
|
67
67
|
} as const;
|
package/src/lib/sdks.ts
CHANGED
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
matchContentType,
|
|
25
25
|
} from "./http.js";
|
|
26
26
|
import { Logger } from "./logger.js";
|
|
27
|
+
import { combineSignals } from "./primitives.js";
|
|
27
28
|
import { retry, RetryConfig } from "./retries.js";
|
|
28
29
|
import { SecurityState } from "./security.js";
|
|
29
30
|
|
|
@@ -197,9 +198,8 @@ export class ClientSDK {
|
|
|
197
198
|
...options?.fetchOptions,
|
|
198
199
|
...options,
|
|
199
200
|
};
|
|
200
|
-
if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) {
|
|
201
|
-
|
|
202
|
-
fetchOptions.signal = timeoutSignal;
|
|
201
|
+
if (!fetchOptions?.signal && conf.timeoutMs != null && conf.timeoutMs > 0) {
|
|
202
|
+
context.timeoutMs = conf.timeoutMs;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
if (conf.body instanceof ReadableStream) {
|
|
@@ -246,10 +246,19 @@ export class ClientSDK {
|
|
|
246
246
|
>
|
|
247
247
|
> {
|
|
248
248
|
const { context, isErrorStatusCode } = options;
|
|
249
|
+
const timeoutMs = context.timeoutMs;
|
|
249
250
|
|
|
250
251
|
return retry(
|
|
251
252
|
async () => {
|
|
252
|
-
const
|
|
253
|
+
const cloned = request.clone();
|
|
254
|
+
let attempt = cloned;
|
|
255
|
+
if (timeoutMs != null && timeoutMs > 0) {
|
|
256
|
+
const timeoutSignal = AbortSignal.timeout(timeoutMs);
|
|
257
|
+
const combined = combineSignals(cloned.signal, timeoutSignal)
|
|
258
|
+
?? timeoutSignal;
|
|
259
|
+
attempt = new Request(cloned, { signal: combined });
|
|
260
|
+
}
|
|
261
|
+
const req = await this.#hooks.beforeRequest(context, attempt);
|
|
253
262
|
await logRequest(this.#logger, req).catch((e) =>
|
|
254
263
|
this.#logger?.log("Failed to log request:", e)
|
|
255
264
|
);
|
package/src/models/api-error.ts
CHANGED
|
@@ -40,6 +40,18 @@ export const CatalogItemPricingMode = {
|
|
|
40
40
|
} as const;
|
|
41
41
|
export type CatalogItemPricingMode = OpenEnum<typeof CatalogItemPricingMode>;
|
|
42
42
|
|
|
43
|
+
export const Composition = {
|
|
44
|
+
Atom: "atom",
|
|
45
|
+
Bundle: "bundle",
|
|
46
|
+
} as const;
|
|
47
|
+
export type Composition = OpenEnum<typeof Composition>;
|
|
48
|
+
|
|
49
|
+
export const BundlePriceMode = {
|
|
50
|
+
Sum: "sum",
|
|
51
|
+
Fixed: "fixed",
|
|
52
|
+
} as const;
|
|
53
|
+
export type BundlePriceMode = OpenEnum<typeof BundlePriceMode>;
|
|
54
|
+
|
|
43
55
|
export const CatalogItemStatus = {
|
|
44
56
|
Active: "active",
|
|
45
57
|
Paused: "paused",
|
|
@@ -61,6 +73,9 @@ export type CatalogItem = {
|
|
|
61
73
|
defaultFrequency: CatalogItemDefaultFrequency;
|
|
62
74
|
type: CatalogItemType;
|
|
63
75
|
pricingMode: CatalogItemPricingMode;
|
|
76
|
+
composition: Composition;
|
|
77
|
+
bundlePriceMode: BundlePriceMode | null;
|
|
78
|
+
bundleFixedPrice: number | null;
|
|
64
79
|
/**
|
|
65
80
|
* UUID v4
|
|
66
81
|
*/
|
|
@@ -104,6 +119,16 @@ export const CatalogItemPricingMode$inboundSchema: z.ZodMiniType<
|
|
|
104
119
|
unknown
|
|
105
120
|
> = openEnums.inboundSchema(CatalogItemPricingMode);
|
|
106
121
|
|
|
122
|
+
/** @internal */
|
|
123
|
+
export const Composition$inboundSchema: z.ZodMiniType<Composition, unknown> =
|
|
124
|
+
openEnums.inboundSchema(Composition);
|
|
125
|
+
|
|
126
|
+
/** @internal */
|
|
127
|
+
export const BundlePriceMode$inboundSchema: z.ZodMiniType<
|
|
128
|
+
BundlePriceMode,
|
|
129
|
+
unknown
|
|
130
|
+
> = openEnums.inboundSchema(BundlePriceMode);
|
|
131
|
+
|
|
107
132
|
/** @internal */
|
|
108
133
|
export const CatalogItemStatus$inboundSchema: z.ZodMiniType<
|
|
109
134
|
CatalogItemStatus,
|
|
@@ -123,6 +148,9 @@ export const CatalogItem$inboundSchema: z.ZodMiniType<CatalogItem, unknown> = z
|
|
|
123
148
|
defaultFrequency: CatalogItemDefaultFrequency$inboundSchema,
|
|
124
149
|
type: CatalogItemType$inboundSchema,
|
|
125
150
|
pricingMode: CatalogItemPricingMode$inboundSchema,
|
|
151
|
+
composition: Composition$inboundSchema,
|
|
152
|
+
bundlePriceMode: types.nullable(BundlePriceMode$inboundSchema),
|
|
153
|
+
bundleFixedPrice: types.nullable(types.number()),
|
|
126
154
|
taxCategoryId: types.nullable(types.string()),
|
|
127
155
|
status: CatalogItemStatus$inboundSchema,
|
|
128
156
|
clientId: types.nullable(types.string()),
|
|
@@ -6,9 +6,13 @@ import * as z from "zod/v4-mini";
|
|
|
6
6
|
import { ClosedEnum } from "../types/enums.js";
|
|
7
7
|
|
|
8
8
|
export const ClientCreateStatus = {
|
|
9
|
-
|
|
9
|
+
New: "new",
|
|
10
|
+
Contacted: "contacted",
|
|
11
|
+
Qualified: "qualified",
|
|
10
12
|
Active: "active",
|
|
11
13
|
Inactive: "inactive",
|
|
14
|
+
Declined: "declined",
|
|
15
|
+
Spam: "spam",
|
|
12
16
|
} as const;
|
|
13
17
|
export type ClientCreateStatus = ClosedEnum<typeof ClientCreateStatus>;
|
|
14
18
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import {
|
|
9
|
+
ClientDocument,
|
|
10
|
+
ClientDocument$inboundSchema,
|
|
11
|
+
} from "./client-document.js";
|
|
12
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
13
|
+
import {
|
|
14
|
+
PaginationMeta,
|
|
15
|
+
PaginationMeta$inboundSchema,
|
|
16
|
+
} from "./pagination-meta.js";
|
|
17
|
+
|
|
18
|
+
export type ClientDocumentList = {
|
|
19
|
+
data: Array<ClientDocument>;
|
|
20
|
+
pagination: PaginationMeta;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const ClientDocumentList$inboundSchema: z.ZodMiniType<
|
|
25
|
+
ClientDocumentList,
|
|
26
|
+
unknown
|
|
27
|
+
> = z.object({
|
|
28
|
+
data: z.array(ClientDocument$inboundSchema),
|
|
29
|
+
pagination: PaginationMeta$inboundSchema,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export function clientDocumentListFromJSON(
|
|
33
|
+
jsonString: string,
|
|
34
|
+
): SafeParseResult<ClientDocumentList, SDKValidationError> {
|
|
35
|
+
return safeParse(
|
|
36
|
+
jsonString,
|
|
37
|
+
(x) => ClientDocumentList$inboundSchema.parse(JSON.parse(x)),
|
|
38
|
+
`Failed to parse 'ClientDocumentList' from JSON`,
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
|
+
import * as types from "../types/primitives.js";
|
|
11
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
12
|
+
|
|
13
|
+
export const ClientDocumentKind = {
|
|
14
|
+
SmartFile: "smart-file",
|
|
15
|
+
} as const;
|
|
16
|
+
export type ClientDocumentKind = ClosedEnum<typeof ClientDocumentKind>;
|
|
17
|
+
|
|
18
|
+
export const ClientDocumentStatus = {
|
|
19
|
+
Draft: "draft",
|
|
20
|
+
Sent: "sent",
|
|
21
|
+
Viewed: "viewed",
|
|
22
|
+
InProgress: "in_progress",
|
|
23
|
+
Accepted: "accepted",
|
|
24
|
+
Completed: "completed",
|
|
25
|
+
Expired: "expired",
|
|
26
|
+
Void: "void",
|
|
27
|
+
} as const;
|
|
28
|
+
export type ClientDocumentStatus = OpenEnum<typeof ClientDocumentStatus>;
|
|
29
|
+
|
|
30
|
+
export type ClientDocument = {
|
|
31
|
+
/**
|
|
32
|
+
* UUID v4
|
|
33
|
+
*/
|
|
34
|
+
id: string;
|
|
35
|
+
kind: ClientDocumentKind;
|
|
36
|
+
title: string | null;
|
|
37
|
+
status: ClientDocumentStatus;
|
|
38
|
+
/**
|
|
39
|
+
* UUID v4
|
|
40
|
+
*/
|
|
41
|
+
contactId: string | null;
|
|
42
|
+
/**
|
|
43
|
+
* UUID v4
|
|
44
|
+
*/
|
|
45
|
+
clientId: string | null;
|
|
46
|
+
/**
|
|
47
|
+
* UUID v4
|
|
48
|
+
*/
|
|
49
|
+
projectId: string | null;
|
|
50
|
+
/**
|
|
51
|
+
* UUID v4
|
|
52
|
+
*/
|
|
53
|
+
engagementProjectId: string | null;
|
|
54
|
+
isTemplate: boolean;
|
|
55
|
+
clientUrl: string | null;
|
|
56
|
+
/**
|
|
57
|
+
* ISO 8601 timestamp (UTC)
|
|
58
|
+
*/
|
|
59
|
+
quoteConvertedAt: Date | null;
|
|
60
|
+
/**
|
|
61
|
+
* ISO 8601 timestamp (UTC)
|
|
62
|
+
*/
|
|
63
|
+
expiresAt: Date | null;
|
|
64
|
+
/**
|
|
65
|
+
* ISO 8601 timestamp (UTC)
|
|
66
|
+
*/
|
|
67
|
+
createdAt: Date;
|
|
68
|
+
/**
|
|
69
|
+
* ISO 8601 timestamp (UTC)
|
|
70
|
+
*/
|
|
71
|
+
updatedAt: Date;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/** @internal */
|
|
75
|
+
export const ClientDocumentKind$inboundSchema: z.ZodMiniEnum<
|
|
76
|
+
typeof ClientDocumentKind
|
|
77
|
+
> = z.enum(ClientDocumentKind);
|
|
78
|
+
|
|
79
|
+
/** @internal */
|
|
80
|
+
export const ClientDocumentStatus$inboundSchema: z.ZodMiniType<
|
|
81
|
+
ClientDocumentStatus,
|
|
82
|
+
unknown
|
|
83
|
+
> = openEnums.inboundSchema(ClientDocumentStatus);
|
|
84
|
+
|
|
85
|
+
/** @internal */
|
|
86
|
+
export const ClientDocument$inboundSchema: z.ZodMiniType<
|
|
87
|
+
ClientDocument,
|
|
88
|
+
unknown
|
|
89
|
+
> = z.object({
|
|
90
|
+
id: types.string(),
|
|
91
|
+
kind: ClientDocumentKind$inboundSchema,
|
|
92
|
+
title: types.nullable(types.string()),
|
|
93
|
+
status: ClientDocumentStatus$inboundSchema,
|
|
94
|
+
contactId: types.nullable(types.string()),
|
|
95
|
+
clientId: types.nullable(types.string()),
|
|
96
|
+
projectId: types.nullable(types.string()),
|
|
97
|
+
engagementProjectId: types.nullable(types.string()),
|
|
98
|
+
isTemplate: types.boolean(),
|
|
99
|
+
clientUrl: types.nullable(types.string()),
|
|
100
|
+
quoteConvertedAt: types.nullable(types.date()),
|
|
101
|
+
expiresAt: types.nullable(types.date()),
|
|
102
|
+
createdAt: types.date(),
|
|
103
|
+
updatedAt: types.date(),
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
export function clientDocumentFromJSON(
|
|
107
|
+
jsonString: string,
|
|
108
|
+
): SafeParseResult<ClientDocument, SDKValidationError> {
|
|
109
|
+
return safeParse(
|
|
110
|
+
jsonString,
|
|
111
|
+
(x) => ClientDocument$inboundSchema.parse(JSON.parse(x)),
|
|
112
|
+
`Failed to parse 'ClientDocument' from JSON`,
|
|
113
|
+
);
|
|
114
|
+
}
|
|
@@ -6,9 +6,13 @@ import * as z from "zod/v4-mini";
|
|
|
6
6
|
import { ClosedEnum } from "../types/enums.js";
|
|
7
7
|
|
|
8
8
|
export const ClientUpdateStatus = {
|
|
9
|
-
|
|
9
|
+
New: "new",
|
|
10
|
+
Contacted: "contacted",
|
|
11
|
+
Qualified: "qualified",
|
|
10
12
|
Active: "active",
|
|
11
13
|
Inactive: "inactive",
|
|
14
|
+
Declined: "declined",
|
|
15
|
+
Spam: "spam",
|
|
12
16
|
} as const;
|
|
13
17
|
export type ClientUpdateStatus = ClosedEnum<typeof ClientUpdateStatus>;
|
|
14
18
|
|
package/src/models/client.ts
CHANGED
|
@@ -11,9 +11,13 @@ import * as types from "../types/primitives.js";
|
|
|
11
11
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
12
12
|
|
|
13
13
|
export const ClientStatus = {
|
|
14
|
-
|
|
14
|
+
New: "new",
|
|
15
|
+
Contacted: "contacted",
|
|
16
|
+
Qualified: "qualified",
|
|
15
17
|
Active: "active",
|
|
16
18
|
Inactive: "inactive",
|
|
19
|
+
Declined: "declined",
|
|
20
|
+
Spam: "spam",
|
|
17
21
|
} as const;
|
|
18
22
|
export type ClientStatus = OpenEnum<typeof ClientStatus>;
|
|
19
23
|
|
package/src/models/contact.ts
CHANGED
|
@@ -35,7 +35,7 @@ export type Contact = {
|
|
|
35
35
|
/**
|
|
36
36
|
* UUID v4
|
|
37
37
|
*/
|
|
38
|
-
|
|
38
|
+
sourceSubmissionId: string | null;
|
|
39
39
|
/**
|
|
40
40
|
* ISO 8601 timestamp (UTC)
|
|
41
41
|
*/
|
|
@@ -60,7 +60,7 @@ export const Contact$inboundSchema: z.ZodMiniType<Contact, unknown> = z.object({
|
|
|
60
60
|
role: ContactRole$inboundSchema,
|
|
61
61
|
isPrimary: types.boolean(),
|
|
62
62
|
clientId: types.nullable(types.string()),
|
|
63
|
-
|
|
63
|
+
sourceSubmissionId: types.nullable(types.string()),
|
|
64
64
|
createdAt: types.date(),
|
|
65
65
|
updatedAt: types.date(),
|
|
66
66
|
});
|
|
@@ -14,10 +14,6 @@ export type ContractCreate = {
|
|
|
14
14
|
* UUID v4
|
|
15
15
|
*/
|
|
16
16
|
billingContactId?: string | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* UUID v4
|
|
19
|
-
*/
|
|
20
|
-
proposalId?: string | undefined;
|
|
21
17
|
/**
|
|
22
18
|
* UUID v4
|
|
23
19
|
*/
|
|
@@ -37,7 +33,6 @@ export type ContractCreate$Outbound = {
|
|
|
37
33
|
title: string;
|
|
38
34
|
clientId: string;
|
|
39
35
|
billingContactId?: string | undefined;
|
|
40
|
-
proposalId?: string | undefined;
|
|
41
36
|
projectId?: string | undefined;
|
|
42
37
|
sourceTemplateId?: string | undefined;
|
|
43
38
|
issueDate?: string | undefined;
|
|
@@ -54,7 +49,6 @@ export const ContractCreate$outboundSchema: z.ZodMiniType<
|
|
|
54
49
|
title: z.string(),
|
|
55
50
|
clientId: z.string(),
|
|
56
51
|
billingContactId: z.optional(z.string()),
|
|
57
|
-
proposalId: z.optional(z.string()),
|
|
58
52
|
projectId: z.optional(z.string()),
|
|
59
53
|
sourceTemplateId: z.optional(z.string()),
|
|
60
54
|
issueDate: z.optional(
|
package/src/models/contract.ts
CHANGED
|
@@ -73,10 +73,6 @@ export type Contract = {
|
|
|
73
73
|
* UUID v4
|
|
74
74
|
*/
|
|
75
75
|
billingContactId: string | null;
|
|
76
|
-
/**
|
|
77
|
-
* UUID v4
|
|
78
|
-
*/
|
|
79
|
-
proposalId: string | null;
|
|
80
76
|
/**
|
|
81
77
|
* UUID v4
|
|
82
78
|
*/
|
|
@@ -173,7 +169,6 @@ export const Contract$inboundSchema: z.ZodMiniType<Contract, unknown> = z
|
|
|
173
169
|
title: types.string(),
|
|
174
170
|
clientId: types.string(),
|
|
175
171
|
billingContactId: types.nullable(types.string()),
|
|
176
|
-
proposalId: types.nullable(types.string()),
|
|
177
172
|
projectId: types.nullable(types.string()),
|
|
178
173
|
sourceTemplateId: types.nullable(types.string()),
|
|
179
174
|
status: ContractStatus$inboundSchema,
|
|
@@ -6,30 +6,30 @@ import * as z from "zod/v4-mini";
|
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
9
|
-
import {
|
|
9
|
+
import { Form, Form$inboundSchema } from "./form.js";
|
|
10
10
|
import {
|
|
11
11
|
PaginationMeta,
|
|
12
12
|
PaginationMeta$inboundSchema,
|
|
13
13
|
} from "./pagination-meta.js";
|
|
14
14
|
|
|
15
|
-
export type
|
|
16
|
-
data: Array<
|
|
15
|
+
export type FormList = {
|
|
16
|
+
data: Array<Form>;
|
|
17
17
|
pagination: PaginationMeta;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
/** @internal */
|
|
21
|
-
export const
|
|
21
|
+
export const FormList$inboundSchema: z.ZodMiniType<FormList, unknown> = z
|
|
22
22
|
.object({
|
|
23
|
-
data: z.array(
|
|
23
|
+
data: z.array(Form$inboundSchema),
|
|
24
24
|
pagination: PaginationMeta$inboundSchema,
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
-
export function
|
|
27
|
+
export function formListFromJSON(
|
|
28
28
|
jsonString: string,
|
|
29
|
-
): SafeParseResult<
|
|
29
|
+
): SafeParseResult<FormList, SDKValidationError> {
|
|
30
30
|
return safeParse(
|
|
31
31
|
jsonString,
|
|
32
|
-
(x) =>
|
|
33
|
-
`Failed to parse '
|
|
32
|
+
(x) => FormList$inboundSchema.parse(JSON.parse(x)),
|
|
33
|
+
`Failed to parse 'FormList' from JSON`,
|
|
34
34
|
);
|
|
35
35
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import * as types from "../types/primitives.js";
|
|
9
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
10
|
+
|
|
11
|
+
export type FormSubmissionAnswer = {
|
|
12
|
+
fieldId: string;
|
|
13
|
+
question: string;
|
|
14
|
+
answer: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const FormSubmissionAnswer$inboundSchema: z.ZodMiniType<
|
|
19
|
+
FormSubmissionAnswer,
|
|
20
|
+
unknown
|
|
21
|
+
> = z.object({
|
|
22
|
+
fieldId: types.string(),
|
|
23
|
+
question: types.string(),
|
|
24
|
+
answer: types.string(),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export function formSubmissionAnswerFromJSON(
|
|
28
|
+
jsonString: string,
|
|
29
|
+
): SafeParseResult<FormSubmissionAnswer, SDKValidationError> {
|
|
30
|
+
return safeParse(
|
|
31
|
+
jsonString,
|
|
32
|
+
(x) => FormSubmissionAnswer$inboundSchema.parse(JSON.parse(x)),
|
|
33
|
+
`Failed to parse 'FormSubmissionAnswer' from JSON`,
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
9
|
+
import {
|
|
10
|
+
FormSubmission,
|
|
11
|
+
FormSubmission$inboundSchema,
|
|
12
|
+
} from "./form-submission.js";
|
|
13
|
+
import {
|
|
14
|
+
PaginationMeta,
|
|
15
|
+
PaginationMeta$inboundSchema,
|
|
16
|
+
} from "./pagination-meta.js";
|
|
17
|
+
|
|
18
|
+
export type FormSubmissionList = {
|
|
19
|
+
data: Array<FormSubmission>;
|
|
20
|
+
pagination: PaginationMeta;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const FormSubmissionList$inboundSchema: z.ZodMiniType<
|
|
25
|
+
FormSubmissionList,
|
|
26
|
+
unknown
|
|
27
|
+
> = z.object({
|
|
28
|
+
data: z.array(FormSubmission$inboundSchema),
|
|
29
|
+
pagination: PaginationMeta$inboundSchema,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export function formSubmissionListFromJSON(
|
|
33
|
+
jsonString: string,
|
|
34
|
+
): SafeParseResult<FormSubmissionList, SDKValidationError> {
|
|
35
|
+
return safeParse(
|
|
36
|
+
jsonString,
|
|
37
|
+
(x) => FormSubmissionList$inboundSchema.parse(JSON.parse(x)),
|
|
38
|
+
`Failed to parse 'FormSubmissionList' from JSON`,
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
import { OpenEnum } from "../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
|
+
import * as types from "../types/primitives.js";
|
|
11
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
12
|
+
import {
|
|
13
|
+
FormSubmissionAnswer,
|
|
14
|
+
FormSubmissionAnswer$inboundSchema,
|
|
15
|
+
} from "./form-submission-answer.js";
|
|
16
|
+
|
|
17
|
+
export const FormSubmissionKind = {
|
|
18
|
+
Inquiry: "inquiry",
|
|
19
|
+
Questionnaire: "questionnaire",
|
|
20
|
+
} as const;
|
|
21
|
+
export type FormSubmissionKind = OpenEnum<typeof FormSubmissionKind>;
|
|
22
|
+
|
|
23
|
+
export const FormSubmissionStatus = {
|
|
24
|
+
InProgress: "in_progress",
|
|
25
|
+
Submitted: "submitted",
|
|
26
|
+
} as const;
|
|
27
|
+
export type FormSubmissionStatus = OpenEnum<typeof FormSubmissionStatus>;
|
|
28
|
+
|
|
29
|
+
export type FormSubmission = {
|
|
30
|
+
/**
|
|
31
|
+
* UUID v4
|
|
32
|
+
*/
|
|
33
|
+
id: string;
|
|
34
|
+
/**
|
|
35
|
+
* UUID v4
|
|
36
|
+
*/
|
|
37
|
+
formId: string;
|
|
38
|
+
kind: FormSubmissionKind | null;
|
|
39
|
+
status: FormSubmissionStatus;
|
|
40
|
+
/**
|
|
41
|
+
* UUID v4
|
|
42
|
+
*/
|
|
43
|
+
contactId: string | null;
|
|
44
|
+
/**
|
|
45
|
+
* UUID v4
|
|
46
|
+
*/
|
|
47
|
+
clientId: string | null;
|
|
48
|
+
source: string | null;
|
|
49
|
+
submittedAt: Date | null;
|
|
50
|
+
answers: Array<FormSubmissionAnswer> | null;
|
|
51
|
+
/**
|
|
52
|
+
* ISO 8601 timestamp (UTC)
|
|
53
|
+
*/
|
|
54
|
+
createdAt: Date;
|
|
55
|
+
/**
|
|
56
|
+
* ISO 8601 timestamp (UTC)
|
|
57
|
+
*/
|
|
58
|
+
updatedAt: Date;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const FormSubmissionKind$inboundSchema: z.ZodMiniType<
|
|
63
|
+
FormSubmissionKind,
|
|
64
|
+
unknown
|
|
65
|
+
> = openEnums.inboundSchema(FormSubmissionKind);
|
|
66
|
+
|
|
67
|
+
/** @internal */
|
|
68
|
+
export const FormSubmissionStatus$inboundSchema: z.ZodMiniType<
|
|
69
|
+
FormSubmissionStatus,
|
|
70
|
+
unknown
|
|
71
|
+
> = openEnums.inboundSchema(FormSubmissionStatus);
|
|
72
|
+
|
|
73
|
+
/** @internal */
|
|
74
|
+
export const FormSubmission$inboundSchema: z.ZodMiniType<
|
|
75
|
+
FormSubmission,
|
|
76
|
+
unknown
|
|
77
|
+
> = z.object({
|
|
78
|
+
id: types.string(),
|
|
79
|
+
formId: types.string(),
|
|
80
|
+
kind: types.nullable(FormSubmissionKind$inboundSchema),
|
|
81
|
+
status: FormSubmissionStatus$inboundSchema,
|
|
82
|
+
contactId: types.nullable(types.string()),
|
|
83
|
+
clientId: types.nullable(types.string()),
|
|
84
|
+
source: types.nullable(types.string()),
|
|
85
|
+
submittedAt: types.nullable(types.date()),
|
|
86
|
+
answers: types.nullable(z.array(FormSubmissionAnswer$inboundSchema)),
|
|
87
|
+
createdAt: types.date(),
|
|
88
|
+
updatedAt: types.date(),
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
export function formSubmissionFromJSON(
|
|
92
|
+
jsonString: string,
|
|
93
|
+
): SafeParseResult<FormSubmission, SDKValidationError> {
|
|
94
|
+
return safeParse(
|
|
95
|
+
jsonString,
|
|
96
|
+
(x) => FormSubmission$inboundSchema.parse(JSON.parse(x)),
|
|
97
|
+
`Failed to parse 'FormSubmission' from JSON`,
|
|
98
|
+
);
|
|
99
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
import { OpenEnum } from "../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
|
+
import * as types from "../types/primitives.js";
|
|
11
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
12
|
+
|
|
13
|
+
export const FormKind = {
|
|
14
|
+
Inquiry: "inquiry",
|
|
15
|
+
Questionnaire: "questionnaire",
|
|
16
|
+
} as const;
|
|
17
|
+
export type FormKind = OpenEnum<typeof FormKind>;
|
|
18
|
+
|
|
19
|
+
export type Form = {
|
|
20
|
+
/**
|
|
21
|
+
* UUID v4
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
title: string | null;
|
|
26
|
+
description: string | null;
|
|
27
|
+
kind: FormKind;
|
|
28
|
+
slug: string | null;
|
|
29
|
+
enabled: boolean;
|
|
30
|
+
isDefault: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* ISO 8601 timestamp (UTC)
|
|
33
|
+
*/
|
|
34
|
+
createdAt: Date;
|
|
35
|
+
/**
|
|
36
|
+
* ISO 8601 timestamp (UTC)
|
|
37
|
+
*/
|
|
38
|
+
updatedAt: Date;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const FormKind$inboundSchema: z.ZodMiniType<FormKind, unknown> =
|
|
43
|
+
openEnums.inboundSchema(FormKind);
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const Form$inboundSchema: z.ZodMiniType<Form, unknown> = z.object({
|
|
47
|
+
id: types.string(),
|
|
48
|
+
name: types.string(),
|
|
49
|
+
title: types.nullable(types.string()),
|
|
50
|
+
description: types.nullable(types.string()),
|
|
51
|
+
kind: FormKind$inboundSchema,
|
|
52
|
+
slug: types.nullable(types.string()),
|
|
53
|
+
enabled: types.boolean(),
|
|
54
|
+
isDefault: types.boolean(),
|
|
55
|
+
createdAt: types.date(),
|
|
56
|
+
updatedAt: types.date(),
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export function formFromJSON(
|
|
60
|
+
jsonString: string,
|
|
61
|
+
): SafeParseResult<Form, SDKValidationError> {
|
|
62
|
+
return safeParse(
|
|
63
|
+
jsonString,
|
|
64
|
+
(x) => Form$inboundSchema.parse(JSON.parse(x)),
|
|
65
|
+
`Failed to parse 'Form' from JSON`,
|
|
66
|
+
);
|
|
67
|
+
}
|