@clientcasa/sdk 0.7.4 → 0.7.6
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 +5 -0
- package/esm/funcs/calendar-events-delete.js +1 -1
- package/esm/funcs/calendar-events-delete.js.map +1 -1
- package/esm/funcs/calendar-events-update.js +2 -1
- package/esm/funcs/calendar-events-update.js.map +1 -1
- package/esm/funcs/catalog-items-delete.js +1 -1
- package/esm/funcs/catalog-items-delete.js.map +1 -1
- package/esm/funcs/catalog-items-update.js +2 -1
- package/esm/funcs/catalog-items-update.js.map +1 -1
- package/esm/funcs/clients-delete.js +1 -1
- package/esm/funcs/clients-delete.js.map +1 -1
- package/esm/funcs/clients-update.js +2 -1
- package/esm/funcs/clients-update.js.map +1 -1
- package/esm/funcs/contacts-delete.js +1 -1
- package/esm/funcs/contacts-delete.js.map +1 -1
- package/esm/funcs/contacts-update.js +2 -1
- package/esm/funcs/contacts-update.js.map +1 -1
- package/esm/funcs/contracts-delete.js +1 -1
- package/esm/funcs/contracts-delete.js.map +1 -1
- package/esm/funcs/contracts-update.js +2 -1
- package/esm/funcs/contracts-update.js.map +1 -1
- package/esm/funcs/event-day-vendors-delete.js +1 -1
- package/esm/funcs/event-day-vendors-delete.js.map +1 -1
- package/esm/funcs/event-day-vendors-update.js +2 -1
- package/esm/funcs/event-day-vendors-update.js.map +1 -1
- package/esm/funcs/event-days-delete.js +1 -1
- package/esm/funcs/event-days-delete.js.map +1 -1
- package/esm/funcs/event-days-update.js +2 -1
- package/esm/funcs/event-days-update.js.map +1 -1
- package/esm/funcs/form-attachments-get.d.ts +19 -0
- package/esm/funcs/form-attachments-get.d.ts.map +1 -0
- package/esm/funcs/form-attachments-get.js +110 -0
- package/esm/funcs/form-attachments-get.js.map +1 -0
- package/esm/funcs/invoices-delete.js +1 -1
- package/esm/funcs/invoices-delete.js.map +1 -1
- package/esm/funcs/invoices-update.js +2 -1
- package/esm/funcs/invoices-update.js.map +1 -1
- package/esm/funcs/milestones-delete.js +1 -1
- package/esm/funcs/milestones-delete.js.map +1 -1
- package/esm/funcs/milestones-update.js +2 -1
- package/esm/funcs/milestones-update.js.map +1 -1
- package/esm/funcs/payments-update.js +2 -1
- package/esm/funcs/payments-update.js.map +1 -1
- package/esm/funcs/projects-delete.js +1 -1
- package/esm/funcs/projects-delete.js.map +1 -1
- package/esm/funcs/projects-update.js +2 -1
- package/esm/funcs/projects-update.js.map +1 -1
- package/esm/funcs/time-entries-delete.js +1 -1
- package/esm/funcs/time-entries-delete.js.map +1 -1
- package/esm/funcs/time-entries-update.js +2 -1
- package/esm/funcs/time-entries-update.js.map +1 -1
- package/esm/funcs/timeline-items-delete.js +1 -1
- package/esm/funcs/timeline-items-delete.js.map +1 -1
- package/esm/funcs/timeline-items-update.js +2 -1
- package/esm/funcs/timeline-items-update.js.map +1 -1
- package/esm/funcs/transactions-create.d.ts +1 -1
- package/esm/funcs/transactions-create.js +1 -1
- package/esm/funcs/transactions-delete.js +1 -1
- package/esm/funcs/transactions-delete.js.map +1 -1
- package/esm/funcs/transactions-update.d.ts +1 -1
- package/esm/funcs/transactions-update.js +3 -2
- package/esm/funcs/transactions-update.js.map +1 -1
- package/esm/funcs/vendors-delete.js +1 -1
- package/esm/funcs/vendors-delete.js.map +1 -1
- package/esm/funcs/vendors-update.js +2 -1
- package/esm/funcs/vendors-update.js.map +1 -1
- package/esm/funcs/venues-delete.js +1 -1
- package/esm/funcs/venues-delete.js.map +1 -1
- package/esm/funcs/venues-update.js +2 -1
- package/esm/funcs/venues-update.js.map +1 -1
- package/esm/funcs/webhooks-delete.js +1 -1
- package/esm/funcs/webhooks-delete.js.map +1 -1
- package/esm/funcs/webhooks-update.js +2 -1
- package/esm/funcs/webhooks-update.js.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/config.js.map +1 -1
- package/esm/models/api-error.d.ts +16 -0
- package/esm/models/api-error.d.ts.map +1 -1
- package/esm/models/api-error.js +16 -0
- package/esm/models/api-error.js.map +1 -1
- package/esm/models/calendar-event-update.d.ts +5 -5
- package/esm/models/calendar-event-update.d.ts.map +1 -1
- package/esm/models/calendar-event-update.js +1 -1
- package/esm/models/calendar-event-update.js.map +1 -1
- package/esm/models/event-day-vendor-create.d.ts +6 -0
- package/esm/models/event-day-vendor-create.d.ts.map +1 -1
- package/esm/models/event-day-vendor-create.js.map +1 -1
- package/esm/models/event-day-vendor-update.d.ts +6 -0
- package/esm/models/event-day-vendor-update.d.ts.map +1 -1
- package/esm/models/event-day-vendor-update.js.map +1 -1
- package/esm/models/event-day-vendor.d.ts +6 -0
- package/esm/models/event-day-vendor.d.ts.map +1 -1
- package/esm/models/event-day-vendor.js.map +1 -1
- package/esm/models/form-attachment-download.d.ts +21 -0
- package/esm/models/form-attachment-download.d.ts.map +1 -0
- package/esm/models/form-attachment-download.js +19 -0
- package/esm/models/form-attachment-download.js.map +1 -0
- package/esm/models/index.d.ts +1 -0
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +1 -0
- package/esm/models/index.js.map +1 -1
- package/esm/models/operations/create-calendar-event.d.ts +1 -1
- package/esm/models/operations/create-catalog-item.d.ts +1 -1
- package/esm/models/operations/create-client.d.ts +1 -1
- package/esm/models/operations/create-contact.d.ts +1 -1
- package/esm/models/operations/create-contract.d.ts +1 -1
- package/esm/models/operations/create-event-day-vendor.d.ts +1 -1
- package/esm/models/operations/create-event-day.d.ts +1 -1
- package/esm/models/operations/create-inquiry.d.ts +1 -1
- package/esm/models/operations/create-invoice.d.ts +1 -1
- package/esm/models/operations/create-milestone.d.ts +1 -1
- package/esm/models/operations/create-payment.d.ts +1 -1
- package/esm/models/operations/create-project.d.ts +1 -1
- package/esm/models/operations/create-time-entry.d.ts +1 -1
- package/esm/models/operations/create-timeline-item.d.ts +1 -1
- package/esm/models/operations/create-transaction.d.ts +1 -1
- package/esm/models/operations/create-vendor.d.ts +1 -1
- package/esm/models/operations/create-venue.d.ts +1 -1
- package/esm/models/operations/create-webhook.d.ts +1 -1
- package/esm/models/operations/get-form-attachment.d.ts +27 -0
- package/esm/models/operations/get-form-attachment.d.ts.map +1 -0
- package/esm/models/operations/get-form-attachment.js +20 -0
- package/esm/models/operations/get-form-attachment.js.map +1 -0
- package/esm/models/operations/index.d.ts +1 -0
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +1 -0
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/list-calendar-events.d.ts +2 -2
- package/esm/models/operations/list-client-documents.d.ts +9 -0
- package/esm/models/operations/list-client-documents.d.ts.map +1 -1
- package/esm/models/operations/list-client-documents.js +3 -0
- package/esm/models/operations/list-client-documents.js.map +1 -1
- package/esm/models/operations/list-event-day-vendors.d.ts +6 -0
- package/esm/models/operations/list-event-day-vendors.d.ts.map +1 -1
- package/esm/models/operations/list-event-day-vendors.js.map +1 -1
- package/esm/models/operations/list-time-entries.d.ts +19 -2
- package/esm/models/operations/list-time-entries.d.ts.map +1 -1
- package/esm/models/operations/list-time-entries.js +10 -1
- package/esm/models/operations/list-time-entries.js.map +1 -1
- package/esm/models/operations/list-timeline-items.d.ts +3 -0
- package/esm/models/operations/list-timeline-items.d.ts.map +1 -1
- package/esm/models/operations/list-timeline-items.js.map +1 -1
- package/esm/models/operations/list-webhooks.d.ts +18 -2
- package/esm/models/operations/list-webhooks.d.ts.map +1 -1
- package/esm/models/operations/list-webhooks.js +10 -1
- package/esm/models/operations/list-webhooks.js.map +1 -1
- package/esm/models/operations/update-calendar-event.d.ts +5 -0
- package/esm/models/operations/update-calendar-event.d.ts.map +1 -1
- package/esm/models/operations/update-calendar-event.js +8 -2
- package/esm/models/operations/update-calendar-event.js.map +1 -1
- package/esm/models/operations/update-catalog-item.d.ts +5 -0
- package/esm/models/operations/update-catalog-item.d.ts.map +1 -1
- package/esm/models/operations/update-catalog-item.js +8 -2
- package/esm/models/operations/update-catalog-item.js.map +1 -1
- package/esm/models/operations/update-client.d.ts +5 -0
- package/esm/models/operations/update-client.d.ts.map +1 -1
- package/esm/models/operations/update-client.js +8 -2
- package/esm/models/operations/update-client.js.map +1 -1
- package/esm/models/operations/update-contact.d.ts +5 -0
- package/esm/models/operations/update-contact.d.ts.map +1 -1
- package/esm/models/operations/update-contact.js +8 -2
- package/esm/models/operations/update-contact.js.map +1 -1
- package/esm/models/operations/update-contract.d.ts +5 -0
- package/esm/models/operations/update-contract.d.ts.map +1 -1
- package/esm/models/operations/update-contract.js +8 -2
- package/esm/models/operations/update-contract.js.map +1 -1
- package/esm/models/operations/update-event-day-vendor.d.ts +5 -0
- package/esm/models/operations/update-event-day-vendor.d.ts.map +1 -1
- package/esm/models/operations/update-event-day-vendor.js +8 -2
- package/esm/models/operations/update-event-day-vendor.js.map +1 -1
- package/esm/models/operations/update-event-day.d.ts +5 -0
- package/esm/models/operations/update-event-day.d.ts.map +1 -1
- package/esm/models/operations/update-event-day.js +8 -2
- package/esm/models/operations/update-event-day.js.map +1 -1
- package/esm/models/operations/update-invoice.d.ts +5 -0
- package/esm/models/operations/update-invoice.d.ts.map +1 -1
- package/esm/models/operations/update-invoice.js +8 -2
- package/esm/models/operations/update-invoice.js.map +1 -1
- package/esm/models/operations/update-milestone.d.ts +5 -0
- package/esm/models/operations/update-milestone.d.ts.map +1 -1
- package/esm/models/operations/update-milestone.js +8 -2
- package/esm/models/operations/update-milestone.js.map +1 -1
- package/esm/models/operations/update-payment.d.ts +5 -0
- package/esm/models/operations/update-payment.d.ts.map +1 -1
- package/esm/models/operations/update-payment.js +8 -2
- package/esm/models/operations/update-payment.js.map +1 -1
- package/esm/models/operations/update-project.d.ts +5 -0
- package/esm/models/operations/update-project.d.ts.map +1 -1
- package/esm/models/operations/update-project.js +8 -2
- package/esm/models/operations/update-project.js.map +1 -1
- package/esm/models/operations/update-time-entry.d.ts +5 -0
- package/esm/models/operations/update-time-entry.d.ts.map +1 -1
- package/esm/models/operations/update-time-entry.js +8 -2
- package/esm/models/operations/update-time-entry.js.map +1 -1
- package/esm/models/operations/update-timeline-item.d.ts +5 -0
- package/esm/models/operations/update-timeline-item.d.ts.map +1 -1
- package/esm/models/operations/update-timeline-item.js +8 -2
- package/esm/models/operations/update-timeline-item.js.map +1 -1
- package/esm/models/operations/update-transaction.d.ts +5 -0
- package/esm/models/operations/update-transaction.d.ts.map +1 -1
- package/esm/models/operations/update-transaction.js +8 -2
- package/esm/models/operations/update-transaction.js.map +1 -1
- package/esm/models/operations/update-vendor.d.ts +5 -0
- package/esm/models/operations/update-vendor.d.ts.map +1 -1
- package/esm/models/operations/update-vendor.js +8 -2
- package/esm/models/operations/update-vendor.js.map +1 -1
- package/esm/models/operations/update-venue.d.ts +5 -0
- package/esm/models/operations/update-venue.d.ts.map +1 -1
- package/esm/models/operations/update-venue.js +8 -2
- package/esm/models/operations/update-venue.js.map +1 -1
- package/esm/models/operations/update-webhook.d.ts +5 -0
- package/esm/models/operations/update-webhook.d.ts.map +1 -1
- package/esm/models/operations/update-webhook.js +8 -2
- package/esm/models/operations/update-webhook.js.map +1 -1
- package/esm/models/timeline-item-create.d.ts +6 -0
- package/esm/models/timeline-item-create.d.ts.map +1 -1
- package/esm/models/timeline-item-create.js.map +1 -1
- package/esm/models/timeline-item-update.d.ts +6 -0
- package/esm/models/timeline-item-update.d.ts.map +1 -1
- package/esm/models/timeline-item-update.js.map +1 -1
- package/esm/models/timeline-item.d.ts +6 -0
- package/esm/models/timeline-item.d.ts.map +1 -1
- package/esm/models/timeline-item.js.map +1 -1
- package/esm/sdk/form-attachments.d.ts +13 -0
- package/esm/sdk/form-attachments.d.ts.map +1 -0
- package/esm/sdk/form-attachments.js +18 -0
- package/esm/sdk/form-attachments.js.map +1 -0
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +5 -0
- package/esm/sdk/sdk.js.map +1 -1
- package/esm/sdk/transactions.d.ts +2 -2
- package/esm/sdk/transactions.js +2 -2
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/calendar-events-delete.ts +1 -1
- package/src/funcs/calendar-events-update.ts +6 -1
- package/src/funcs/catalog-items-delete.ts +1 -1
- package/src/funcs/catalog-items-update.ts +6 -1
- package/src/funcs/clients-delete.ts +1 -1
- package/src/funcs/clients-update.ts +6 -1
- package/src/funcs/contacts-delete.ts +1 -1
- package/src/funcs/contacts-update.ts +6 -1
- package/src/funcs/contracts-delete.ts +1 -1
- package/src/funcs/contracts-update.ts +6 -1
- package/src/funcs/event-day-vendors-delete.ts +1 -1
- package/src/funcs/event-day-vendors-update.ts +6 -1
- package/src/funcs/event-days-delete.ts +1 -1
- package/src/funcs/event-days-update.ts +6 -1
- package/src/funcs/form-attachments-get.ts +206 -0
- package/src/funcs/invoices-delete.ts +1 -1
- package/src/funcs/invoices-update.ts +6 -1
- package/src/funcs/milestones-delete.ts +1 -1
- package/src/funcs/milestones-update.ts +6 -1
- package/src/funcs/payments-update.ts +6 -1
- package/src/funcs/projects-delete.ts +1 -1
- package/src/funcs/projects-update.ts +6 -1
- package/src/funcs/time-entries-delete.ts +1 -1
- package/src/funcs/time-entries-update.ts +6 -1
- package/src/funcs/timeline-items-delete.ts +1 -1
- package/src/funcs/timeline-items-update.ts +6 -1
- package/src/funcs/transactions-create.ts +1 -1
- package/src/funcs/transactions-delete.ts +1 -1
- package/src/funcs/transactions-update.ts +7 -2
- package/src/funcs/vendors-delete.ts +1 -1
- package/src/funcs/vendors-update.ts +6 -1
- package/src/funcs/venues-delete.ts +1 -1
- package/src/funcs/venues-update.ts +6 -1
- package/src/funcs/webhooks-delete.ts +1 -1
- package/src/funcs/webhooks-update.ts +6 -1
- package/src/lib/config.ts +3 -3
- package/src/models/api-error.ts +16 -0
- package/src/models/calendar-event-update.ts +8 -8
- package/src/models/event-day-vendor-create.ts +6 -0
- package/src/models/event-day-vendor-update.ts +6 -0
- package/src/models/event-day-vendor.ts +6 -0
- package/src/models/form-attachment-download.ts +47 -0
- package/src/models/index.ts +1 -0
- package/src/models/operations/create-calendar-event.ts +1 -1
- package/src/models/operations/create-catalog-item.ts +1 -1
- package/src/models/operations/create-client.ts +1 -1
- package/src/models/operations/create-contact.ts +1 -1
- package/src/models/operations/create-contract.ts +1 -1
- package/src/models/operations/create-event-day-vendor.ts +1 -1
- package/src/models/operations/create-event-day.ts +1 -1
- package/src/models/operations/create-inquiry.ts +1 -1
- package/src/models/operations/create-invoice.ts +1 -1
- package/src/models/operations/create-milestone.ts +1 -1
- package/src/models/operations/create-payment.ts +1 -1
- package/src/models/operations/create-project.ts +1 -1
- package/src/models/operations/create-time-entry.ts +1 -1
- package/src/models/operations/create-timeline-item.ts +1 -1
- package/src/models/operations/create-transaction.ts +1 -1
- package/src/models/operations/create-vendor.ts +1 -1
- package/src/models/operations/create-venue.ts +1 -1
- package/src/models/operations/create-webhook.ts +1 -1
- package/src/models/operations/get-form-attachment.ts +61 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/list-calendar-events.ts +2 -2
- package/src/models/operations/list-client-documents.ts +9 -0
- package/src/models/operations/list-event-day-vendors.ts +6 -0
- package/src/models/operations/list-time-entries.ts +24 -3
- package/src/models/operations/list-timeline-items.ts +3 -0
- package/src/models/operations/list-webhooks.ts +23 -3
- package/src/models/operations/update-calendar-event.ts +18 -4
- package/src/models/operations/update-catalog-item.ts +18 -4
- package/src/models/operations/update-client.ts +18 -4
- package/src/models/operations/update-contact.ts +18 -4
- package/src/models/operations/update-contract.ts +18 -4
- package/src/models/operations/update-event-day-vendor.ts +18 -4
- package/src/models/operations/update-event-day.ts +18 -4
- package/src/models/operations/update-invoice.ts +18 -4
- package/src/models/operations/update-milestone.ts +18 -4
- package/src/models/operations/update-payment.ts +18 -4
- package/src/models/operations/update-project.ts +18 -4
- package/src/models/operations/update-time-entry.ts +18 -4
- package/src/models/operations/update-timeline-item.ts +18 -4
- package/src/models/operations/update-transaction.ts +18 -4
- package/src/models/operations/update-vendor.ts +18 -4
- package/src/models/operations/update-venue.ts +18 -4
- package/src/models/operations/update-webhook.ts +18 -4
- package/src/models/timeline-item-create.ts +6 -0
- package/src/models/timeline-item-update.ts +6 -0
- package/src/models/timeline-item.ts +6 -0
- package/src/sdk/form-attachments.ts +30 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/transactions.ts +2 -2
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { ClientCasaCore } from "../core.js";
|
|
7
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
8
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
9
|
+
import * as M from "../lib/matchers.js";
|
|
10
|
+
import { compactMap } from "../lib/primitives.js";
|
|
11
|
+
import { safeParse } from "../lib/schemas.js";
|
|
12
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
13
|
+
import { resolveSecurity } from "../lib/security.js";
|
|
14
|
+
import { pathToFunc } from "../lib/url.js";
|
|
15
|
+
import { ClientCasaError } from "../models/errors/client-casa-error.js";
|
|
16
|
+
import {
|
|
17
|
+
ConnectionError,
|
|
18
|
+
InvalidRequestError,
|
|
19
|
+
RequestAbortedError,
|
|
20
|
+
RequestTimeoutError,
|
|
21
|
+
UnexpectedClientError,
|
|
22
|
+
} from "../models/errors/http-client-errors.js";
|
|
23
|
+
import * as errors from "../models/errors/index.js";
|
|
24
|
+
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
|
|
26
|
+
import * as models from "../models/index.js";
|
|
27
|
+
import * as operations from "../models/operations/index.js";
|
|
28
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
29
|
+
import { Result } from "../types/fp.js";
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Get a form attachment download link
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* Returns the attachment metadata plus a short-lived direct download link. The link expires — fetch it promptly and do not store it; request the attachment again for a fresh one. The scope is `form-submissions:read`: an attachment belongs to a submission, so a token that may read submissions may read their files. The link always downloads rather than renders inline, because these bytes were uploaded by an anonymous visitor through a public form.
|
|
36
|
+
*/
|
|
37
|
+
export function formAttachmentsGet(
|
|
38
|
+
client: ClientCasaCore,
|
|
39
|
+
security: operations.GetFormAttachmentSecurity,
|
|
40
|
+
request: operations.GetFormAttachmentRequest,
|
|
41
|
+
options?: RequestOptions,
|
|
42
|
+
): APIPromise<
|
|
43
|
+
Result<
|
|
44
|
+
models.FormAttachmentDownload,
|
|
45
|
+
| errors.ApiError
|
|
46
|
+
| ClientCasaError
|
|
47
|
+
| ResponseValidationError
|
|
48
|
+
| ConnectionError
|
|
49
|
+
| RequestAbortedError
|
|
50
|
+
| RequestTimeoutError
|
|
51
|
+
| InvalidRequestError
|
|
52
|
+
| UnexpectedClientError
|
|
53
|
+
| SDKValidationError
|
|
54
|
+
>
|
|
55
|
+
> {
|
|
56
|
+
return new APIPromise($do(
|
|
57
|
+
client,
|
|
58
|
+
security,
|
|
59
|
+
request,
|
|
60
|
+
options,
|
|
61
|
+
));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async function $do(
|
|
65
|
+
client: ClientCasaCore,
|
|
66
|
+
security: operations.GetFormAttachmentSecurity,
|
|
67
|
+
request: operations.GetFormAttachmentRequest,
|
|
68
|
+
options?: RequestOptions,
|
|
69
|
+
): Promise<
|
|
70
|
+
[
|
|
71
|
+
Result<
|
|
72
|
+
models.FormAttachmentDownload,
|
|
73
|
+
| errors.ApiError
|
|
74
|
+
| ClientCasaError
|
|
75
|
+
| ResponseValidationError
|
|
76
|
+
| ConnectionError
|
|
77
|
+
| RequestAbortedError
|
|
78
|
+
| RequestTimeoutError
|
|
79
|
+
| InvalidRequestError
|
|
80
|
+
| UnexpectedClientError
|
|
81
|
+
| SDKValidationError
|
|
82
|
+
>,
|
|
83
|
+
APICall,
|
|
84
|
+
]
|
|
85
|
+
> {
|
|
86
|
+
const parsed = safeParse(
|
|
87
|
+
request,
|
|
88
|
+
(value) =>
|
|
89
|
+
z.parse(operations.GetFormAttachmentRequest$outboundSchema, value),
|
|
90
|
+
"Input validation failed",
|
|
91
|
+
);
|
|
92
|
+
if (!parsed.ok) {
|
|
93
|
+
return [parsed, { status: "invalid" }];
|
|
94
|
+
}
|
|
95
|
+
const payload = parsed.value;
|
|
96
|
+
const body = null;
|
|
97
|
+
|
|
98
|
+
const pathParams = {
|
|
99
|
+
id: encodeSimple("id", payload.id, {
|
|
100
|
+
explode: false,
|
|
101
|
+
charEncoding: "percent",
|
|
102
|
+
}),
|
|
103
|
+
};
|
|
104
|
+
const path = pathToFunc("/api/v1/form-attachments/{id}")(pathParams);
|
|
105
|
+
|
|
106
|
+
const headers = new Headers(compactMap({
|
|
107
|
+
Accept: "application/json",
|
|
108
|
+
}));
|
|
109
|
+
|
|
110
|
+
const requestSecurity = resolveSecurity(
|
|
111
|
+
[
|
|
112
|
+
{
|
|
113
|
+
fieldName: "x-api-key",
|
|
114
|
+
type: "apiKey:header",
|
|
115
|
+
value: security?.apiKey,
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
[
|
|
119
|
+
{
|
|
120
|
+
fieldName: "Authorization",
|
|
121
|
+
type: "http:bearer",
|
|
122
|
+
value: security?.bearer,
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
const context = {
|
|
128
|
+
options: client._options,
|
|
129
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
130
|
+
operationID: "getFormAttachment",
|
|
131
|
+
oAuth2Scopes: null,
|
|
132
|
+
|
|
133
|
+
resolvedSecurity: requestSecurity,
|
|
134
|
+
|
|
135
|
+
securitySource: security,
|
|
136
|
+
retryConfig: options?.retries
|
|
137
|
+
|| client._options.retryConfig
|
|
138
|
+
|| {
|
|
139
|
+
strategy: "backoff",
|
|
140
|
+
backoff: {
|
|
141
|
+
initialInterval: 500,
|
|
142
|
+
maxInterval: 30000,
|
|
143
|
+
exponent: 1.5,
|
|
144
|
+
maxElapsedTime: 30000,
|
|
145
|
+
},
|
|
146
|
+
retryConnectionErrors: true,
|
|
147
|
+
}
|
|
148
|
+
|| { strategy: "none" },
|
|
149
|
+
retryCodes: options?.retryCodes || ["429", "5XX"],
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const requestRes = client._createRequest(context, {
|
|
153
|
+
security: requestSecurity,
|
|
154
|
+
method: "GET",
|
|
155
|
+
baseURL: options?.serverURL,
|
|
156
|
+
path: path,
|
|
157
|
+
headers: headers,
|
|
158
|
+
body: body,
|
|
159
|
+
userAgent: client._options.userAgent,
|
|
160
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
161
|
+
}, options);
|
|
162
|
+
if (!requestRes.ok) {
|
|
163
|
+
return [requestRes, { status: "invalid" }];
|
|
164
|
+
}
|
|
165
|
+
const req = requestRes.value;
|
|
166
|
+
|
|
167
|
+
const doResult = await client._do(req, {
|
|
168
|
+
context,
|
|
169
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
170
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
171
|
+
retryConfig: context.retryConfig,
|
|
172
|
+
retryCodes: context.retryCodes,
|
|
173
|
+
});
|
|
174
|
+
if (!doResult.ok) {
|
|
175
|
+
return [doResult, { status: "request-error", request: req }];
|
|
176
|
+
}
|
|
177
|
+
const response = doResult.value;
|
|
178
|
+
|
|
179
|
+
const responseFields = {
|
|
180
|
+
HttpMeta: { Response: response, Request: req },
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
const [result] = await M.match<
|
|
184
|
+
models.FormAttachmentDownload,
|
|
185
|
+
| errors.ApiError
|
|
186
|
+
| ClientCasaError
|
|
187
|
+
| ResponseValidationError
|
|
188
|
+
| ConnectionError
|
|
189
|
+
| RequestAbortedError
|
|
190
|
+
| RequestTimeoutError
|
|
191
|
+
| InvalidRequestError
|
|
192
|
+
| UnexpectedClientError
|
|
193
|
+
| SDKValidationError
|
|
194
|
+
>(
|
|
195
|
+
M.json(200, models.FormAttachmentDownload$inboundSchema),
|
|
196
|
+
M.jsonErr([401, 403, 404, 429], errors.ApiError$inboundSchema),
|
|
197
|
+
M.jsonErr(500, errors.ApiError$inboundSchema),
|
|
198
|
+
M.fail("4XX"),
|
|
199
|
+
M.fail("5XX"),
|
|
200
|
+
)(response, req, { extraFields: responseFields });
|
|
201
|
+
if (!result.ok) {
|
|
202
|
+
return [result, { status: "complete", request: req, response }];
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
return [result, { status: "complete", request: req, response }];
|
|
206
|
+
}
|
|
@@ -188,7 +188,7 @@ async function $do(
|
|
|
188
188
|
| SDKValidationError
|
|
189
189
|
>(
|
|
190
190
|
M.nil(204, z.void()),
|
|
191
|
-
M.jsonErr([401, 403, 404, 429], errors.ApiError$inboundSchema),
|
|
191
|
+
M.jsonErr([401, 403, 404, 409, 429], errors.ApiError$inboundSchema),
|
|
192
192
|
M.jsonErr(500, errors.ApiError$inboundSchema),
|
|
193
193
|
M.fail("4XX"),
|
|
194
194
|
M.fail("5XX"),
|
|
@@ -102,6 +102,11 @@ async function $do(
|
|
|
102
102
|
const headers = new Headers(compactMap({
|
|
103
103
|
"Content-Type": "application/json",
|
|
104
104
|
Accept: "application/json",
|
|
105
|
+
"Idempotency-Key": encodeSimple(
|
|
106
|
+
"Idempotency-Key",
|
|
107
|
+
payload["Idempotency-Key"],
|
|
108
|
+
{ explode: false, charEncoding: "none" },
|
|
109
|
+
),
|
|
105
110
|
}));
|
|
106
111
|
|
|
107
112
|
const requestSecurity = resolveSecurity(
|
|
@@ -190,7 +195,7 @@ async function $do(
|
|
|
190
195
|
| SDKValidationError
|
|
191
196
|
>(
|
|
192
197
|
M.json(200, models.Invoice$inboundSchema),
|
|
193
|
-
M.jsonErr([400, 401, 403, 404, 429], errors.ApiError$inboundSchema),
|
|
198
|
+
M.jsonErr([400, 401, 403, 404, 409, 429], errors.ApiError$inboundSchema),
|
|
194
199
|
M.jsonErr(500, errors.ApiError$inboundSchema),
|
|
195
200
|
M.fail("4XX"),
|
|
196
201
|
M.fail("5XX"),
|
|
@@ -188,7 +188,7 @@ async function $do(
|
|
|
188
188
|
| SDKValidationError
|
|
189
189
|
>(
|
|
190
190
|
M.nil(204, z.void()),
|
|
191
|
-
M.jsonErr([401, 403, 404, 429], errors.ApiError$inboundSchema),
|
|
191
|
+
M.jsonErr([401, 403, 404, 409, 429], errors.ApiError$inboundSchema),
|
|
192
192
|
M.jsonErr(500, errors.ApiError$inboundSchema),
|
|
193
193
|
M.fail("4XX"),
|
|
194
194
|
M.fail("5XX"),
|
|
@@ -102,6 +102,11 @@ async function $do(
|
|
|
102
102
|
const headers = new Headers(compactMap({
|
|
103
103
|
"Content-Type": "application/json",
|
|
104
104
|
Accept: "application/json",
|
|
105
|
+
"Idempotency-Key": encodeSimple(
|
|
106
|
+
"Idempotency-Key",
|
|
107
|
+
payload["Idempotency-Key"],
|
|
108
|
+
{ explode: false, charEncoding: "none" },
|
|
109
|
+
),
|
|
105
110
|
}));
|
|
106
111
|
|
|
107
112
|
const requestSecurity = resolveSecurity(
|
|
@@ -190,7 +195,7 @@ async function $do(
|
|
|
190
195
|
| SDKValidationError
|
|
191
196
|
>(
|
|
192
197
|
M.json(200, models.Milestone$inboundSchema),
|
|
193
|
-
M.jsonErr([400, 401, 403, 404, 429], errors.ApiError$inboundSchema),
|
|
198
|
+
M.jsonErr([400, 401, 403, 404, 409, 429], errors.ApiError$inboundSchema),
|
|
194
199
|
M.jsonErr(500, errors.ApiError$inboundSchema),
|
|
195
200
|
M.fail("4XX"),
|
|
196
201
|
M.fail("5XX"),
|
|
@@ -102,6 +102,11 @@ async function $do(
|
|
|
102
102
|
const headers = new Headers(compactMap({
|
|
103
103
|
"Content-Type": "application/json",
|
|
104
104
|
Accept: "application/json",
|
|
105
|
+
"Idempotency-Key": encodeSimple(
|
|
106
|
+
"Idempotency-Key",
|
|
107
|
+
payload["Idempotency-Key"],
|
|
108
|
+
{ explode: false, charEncoding: "none" },
|
|
109
|
+
),
|
|
105
110
|
}));
|
|
106
111
|
|
|
107
112
|
const requestSecurity = resolveSecurity(
|
|
@@ -190,7 +195,7 @@ async function $do(
|
|
|
190
195
|
| SDKValidationError
|
|
191
196
|
>(
|
|
192
197
|
M.json(200, models.Payment$inboundSchema),
|
|
193
|
-
M.jsonErr([400, 401, 403, 404, 429], errors.ApiError$inboundSchema),
|
|
198
|
+
M.jsonErr([400, 401, 403, 404, 409, 429], errors.ApiError$inboundSchema),
|
|
194
199
|
M.jsonErr(500, errors.ApiError$inboundSchema),
|
|
195
200
|
M.fail("4XX"),
|
|
196
201
|
M.fail("5XX"),
|
|
@@ -188,7 +188,7 @@ async function $do(
|
|
|
188
188
|
| SDKValidationError
|
|
189
189
|
>(
|
|
190
190
|
M.nil(204, z.void()),
|
|
191
|
-
M.jsonErr([401, 403, 404, 429], errors.ApiError$inboundSchema),
|
|
191
|
+
M.jsonErr([401, 403, 404, 409, 429], errors.ApiError$inboundSchema),
|
|
192
192
|
M.jsonErr(500, errors.ApiError$inboundSchema),
|
|
193
193
|
M.fail("4XX"),
|
|
194
194
|
M.fail("5XX"),
|
|
@@ -102,6 +102,11 @@ async function $do(
|
|
|
102
102
|
const headers = new Headers(compactMap({
|
|
103
103
|
"Content-Type": "application/json",
|
|
104
104
|
Accept: "application/json",
|
|
105
|
+
"Idempotency-Key": encodeSimple(
|
|
106
|
+
"Idempotency-Key",
|
|
107
|
+
payload["Idempotency-Key"],
|
|
108
|
+
{ explode: false, charEncoding: "none" },
|
|
109
|
+
),
|
|
105
110
|
}));
|
|
106
111
|
|
|
107
112
|
const requestSecurity = resolveSecurity(
|
|
@@ -190,7 +195,7 @@ async function $do(
|
|
|
190
195
|
| SDKValidationError
|
|
191
196
|
>(
|
|
192
197
|
M.json(200, models.Project$inboundSchema),
|
|
193
|
-
M.jsonErr([400, 401, 403, 404, 429], errors.ApiError$inboundSchema),
|
|
198
|
+
M.jsonErr([400, 401, 403, 404, 409, 429], errors.ApiError$inboundSchema),
|
|
194
199
|
M.jsonErr(500, errors.ApiError$inboundSchema),
|
|
195
200
|
M.fail("4XX"),
|
|
196
201
|
M.fail("5XX"),
|
|
@@ -191,7 +191,7 @@ async function $do(
|
|
|
191
191
|
| SDKValidationError
|
|
192
192
|
>(
|
|
193
193
|
M.nil(204, z.void()),
|
|
194
|
-
M.jsonErr([401, 403, 404, 429], errors.ApiError$inboundSchema),
|
|
194
|
+
M.jsonErr([401, 403, 404, 409, 429], errors.ApiError$inboundSchema),
|
|
195
195
|
M.jsonErr(500, errors.ApiError$inboundSchema),
|
|
196
196
|
M.fail("4XX"),
|
|
197
197
|
M.fail("5XX"),
|
|
@@ -105,6 +105,11 @@ async function $do(
|
|
|
105
105
|
const headers = new Headers(compactMap({
|
|
106
106
|
"Content-Type": "application/json",
|
|
107
107
|
Accept: "application/json",
|
|
108
|
+
"Idempotency-Key": encodeSimple(
|
|
109
|
+
"Idempotency-Key",
|
|
110
|
+
payload["Idempotency-Key"],
|
|
111
|
+
{ explode: false, charEncoding: "none" },
|
|
112
|
+
),
|
|
108
113
|
}));
|
|
109
114
|
|
|
110
115
|
const requestSecurity = resolveSecurity(
|
|
@@ -193,7 +198,7 @@ async function $do(
|
|
|
193
198
|
| SDKValidationError
|
|
194
199
|
>(
|
|
195
200
|
M.json(200, models.TimeEntry$inboundSchema),
|
|
196
|
-
M.jsonErr([400, 401, 403, 404, 429], errors.ApiError$inboundSchema),
|
|
201
|
+
M.jsonErr([400, 401, 403, 404, 409, 429], errors.ApiError$inboundSchema),
|
|
197
202
|
M.jsonErr(500, errors.ApiError$inboundSchema),
|
|
198
203
|
M.fail("4XX"),
|
|
199
204
|
M.fail("5XX"),
|
|
@@ -189,7 +189,7 @@ async function $do(
|
|
|
189
189
|
| SDKValidationError
|
|
190
190
|
>(
|
|
191
191
|
M.nil(204, z.void()),
|
|
192
|
-
M.jsonErr([401, 403, 404, 429], errors.ApiError$inboundSchema),
|
|
192
|
+
M.jsonErr([401, 403, 404, 409, 429], errors.ApiError$inboundSchema),
|
|
193
193
|
M.jsonErr(500, errors.ApiError$inboundSchema),
|
|
194
194
|
M.fail("4XX"),
|
|
195
195
|
M.fail("5XX"),
|
|
@@ -103,6 +103,11 @@ async function $do(
|
|
|
103
103
|
const headers = new Headers(compactMap({
|
|
104
104
|
"Content-Type": "application/json",
|
|
105
105
|
Accept: "application/json",
|
|
106
|
+
"Idempotency-Key": encodeSimple(
|
|
107
|
+
"Idempotency-Key",
|
|
108
|
+
payload["Idempotency-Key"],
|
|
109
|
+
{ explode: false, charEncoding: "none" },
|
|
110
|
+
),
|
|
106
111
|
}));
|
|
107
112
|
|
|
108
113
|
const requestSecurity = resolveSecurity(
|
|
@@ -191,7 +196,7 @@ async function $do(
|
|
|
191
196
|
| SDKValidationError
|
|
192
197
|
>(
|
|
193
198
|
M.json(200, models.TimelineItem$inboundSchema),
|
|
194
|
-
M.jsonErr([400, 401, 403, 404, 429], errors.ApiError$inboundSchema),
|
|
199
|
+
M.jsonErr([400, 401, 403, 404, 409, 429], errors.ApiError$inboundSchema),
|
|
195
200
|
M.jsonErr(500, errors.ApiError$inboundSchema),
|
|
196
201
|
M.fail("4XX"),
|
|
197
202
|
M.fail("5XX"),
|
|
@@ -32,7 +32,7 @@ import { Result } from "../types/fp.js";
|
|
|
32
32
|
* Create a transaction (expense or charge)
|
|
33
33
|
*
|
|
34
34
|
* @remarks
|
|
35
|
-
* A `global` transaction applies org-wide (all clients for revenue, overhead for cost), so it cannot carry `assignments` — send an empty array, or use mode `each`/`split` to scope it.
|
|
35
|
+
* A `global` transaction applies org-wide (all clients for revenue, overhead for cost), so it cannot carry `assignments` — send an empty array, or use mode `each`/`split` to scope it. Enforced against the *stored* row as well as the request body, so a PATCH that omits `mode` is still checked. Refused with `400 invalid_request` and `details.code: "global_mode_has_assignments"`.
|
|
36
36
|
*/
|
|
37
37
|
export function transactionsCreate(
|
|
38
38
|
client: ClientCasaCore,
|
|
@@ -192,7 +192,7 @@ async function $do(
|
|
|
192
192
|
| SDKValidationError
|
|
193
193
|
>(
|
|
194
194
|
M.nil(204, z.void()),
|
|
195
|
-
M.jsonErr([401, 403, 404, 429], errors.ApiError$inboundSchema),
|
|
195
|
+
M.jsonErr([401, 403, 404, 409, 429], errors.ApiError$inboundSchema),
|
|
196
196
|
M.jsonErr(500, errors.ApiError$inboundSchema),
|
|
197
197
|
M.fail("4XX"),
|
|
198
198
|
M.fail("5XX"),
|
|
@@ -32,7 +32,7 @@ import { Result } from "../types/fp.js";
|
|
|
32
32
|
* Update a transaction
|
|
33
33
|
*
|
|
34
34
|
* @remarks
|
|
35
|
-
* Transactions billed to a sent/paid invoice may be frozen — the server will return 409 if so. A `global` transaction applies org-wide (all clients for revenue, overhead for cost), so it cannot carry `assignments` — send an empty array, or use mode `each`/`split` to scope it.
|
|
35
|
+
* Transactions billed to a sent/paid invoice may be frozen — the server will return 409 if so. A `global` transaction applies org-wide (all clients for revenue, overhead for cost), so it cannot carry `assignments` — send an empty array, or use mode `each`/`split` to scope it. Enforced against the *stored* row as well as the request body, so a PATCH that omits `mode` is still checked. Refused with `400 invalid_request` and `details.code: "global_mode_has_assignments"`.
|
|
36
36
|
*/
|
|
37
37
|
export function transactionsUpdate(
|
|
38
38
|
client: ClientCasaCore,
|
|
@@ -106,6 +106,11 @@ async function $do(
|
|
|
106
106
|
const headers = new Headers(compactMap({
|
|
107
107
|
"Content-Type": "application/json",
|
|
108
108
|
Accept: "application/json",
|
|
109
|
+
"Idempotency-Key": encodeSimple(
|
|
110
|
+
"Idempotency-Key",
|
|
111
|
+
payload["Idempotency-Key"],
|
|
112
|
+
{ explode: false, charEncoding: "none" },
|
|
113
|
+
),
|
|
109
114
|
}));
|
|
110
115
|
|
|
111
116
|
const requestSecurity = resolveSecurity(
|
|
@@ -194,7 +199,7 @@ async function $do(
|
|
|
194
199
|
| SDKValidationError
|
|
195
200
|
>(
|
|
196
201
|
M.json(200, models.Transaction$inboundSchema),
|
|
197
|
-
M.jsonErr([400, 401, 403, 404, 429], errors.ApiError$inboundSchema),
|
|
202
|
+
M.jsonErr([400, 401, 403, 404, 409, 429], errors.ApiError$inboundSchema),
|
|
198
203
|
M.jsonErr(500, errors.ApiError$inboundSchema),
|
|
199
204
|
M.fail("4XX"),
|
|
200
205
|
M.fail("5XX"),
|
|
@@ -188,7 +188,7 @@ async function $do(
|
|
|
188
188
|
| SDKValidationError
|
|
189
189
|
>(
|
|
190
190
|
M.nil(204, z.void()),
|
|
191
|
-
M.jsonErr([401, 403, 404, 429], errors.ApiError$inboundSchema),
|
|
191
|
+
M.jsonErr([401, 403, 404, 409, 429], errors.ApiError$inboundSchema),
|
|
192
192
|
M.jsonErr(500, errors.ApiError$inboundSchema),
|
|
193
193
|
M.fail("4XX"),
|
|
194
194
|
M.fail("5XX"),
|
|
@@ -102,6 +102,11 @@ async function $do(
|
|
|
102
102
|
const headers = new Headers(compactMap({
|
|
103
103
|
"Content-Type": "application/json",
|
|
104
104
|
Accept: "application/json",
|
|
105
|
+
"Idempotency-Key": encodeSimple(
|
|
106
|
+
"Idempotency-Key",
|
|
107
|
+
payload["Idempotency-Key"],
|
|
108
|
+
{ explode: false, charEncoding: "none" },
|
|
109
|
+
),
|
|
105
110
|
}));
|
|
106
111
|
|
|
107
112
|
const requestSecurity = resolveSecurity(
|
|
@@ -190,7 +195,7 @@ async function $do(
|
|
|
190
195
|
| SDKValidationError
|
|
191
196
|
>(
|
|
192
197
|
M.json(200, models.Vendor$inboundSchema),
|
|
193
|
-
M.jsonErr([400, 401, 403, 404, 429], errors.ApiError$inboundSchema),
|
|
198
|
+
M.jsonErr([400, 401, 403, 404, 409, 429], errors.ApiError$inboundSchema),
|
|
194
199
|
M.jsonErr(500, errors.ApiError$inboundSchema),
|
|
195
200
|
M.fail("4XX"),
|
|
196
201
|
M.fail("5XX"),
|
|
@@ -188,7 +188,7 @@ async function $do(
|
|
|
188
188
|
| SDKValidationError
|
|
189
189
|
>(
|
|
190
190
|
M.nil(204, z.void()),
|
|
191
|
-
M.jsonErr([401, 403, 404, 429], errors.ApiError$inboundSchema),
|
|
191
|
+
M.jsonErr([401, 403, 404, 409, 429], errors.ApiError$inboundSchema),
|
|
192
192
|
M.jsonErr(500, errors.ApiError$inboundSchema),
|
|
193
193
|
M.fail("4XX"),
|
|
194
194
|
M.fail("5XX"),
|
|
@@ -102,6 +102,11 @@ async function $do(
|
|
|
102
102
|
const headers = new Headers(compactMap({
|
|
103
103
|
"Content-Type": "application/json",
|
|
104
104
|
Accept: "application/json",
|
|
105
|
+
"Idempotency-Key": encodeSimple(
|
|
106
|
+
"Idempotency-Key",
|
|
107
|
+
payload["Idempotency-Key"],
|
|
108
|
+
{ explode: false, charEncoding: "none" },
|
|
109
|
+
),
|
|
105
110
|
}));
|
|
106
111
|
|
|
107
112
|
const requestSecurity = resolveSecurity(
|
|
@@ -190,7 +195,7 @@ async function $do(
|
|
|
190
195
|
| SDKValidationError
|
|
191
196
|
>(
|
|
192
197
|
M.json(200, models.Venue$inboundSchema),
|
|
193
|
-
M.jsonErr([400, 401, 403, 404, 429], errors.ApiError$inboundSchema),
|
|
198
|
+
M.jsonErr([400, 401, 403, 404, 409, 429], errors.ApiError$inboundSchema),
|
|
194
199
|
M.jsonErr(500, errors.ApiError$inboundSchema),
|
|
195
200
|
M.fail("4XX"),
|
|
196
201
|
M.fail("5XX"),
|
|
@@ -188,7 +188,7 @@ async function $do(
|
|
|
188
188
|
| SDKValidationError
|
|
189
189
|
>(
|
|
190
190
|
M.nil(204, z.void()),
|
|
191
|
-
M.jsonErr([401, 403, 404, 429], errors.ApiError$inboundSchema),
|
|
191
|
+
M.jsonErr([401, 403, 404, 409, 429], errors.ApiError$inboundSchema),
|
|
192
192
|
M.jsonErr(500, errors.ApiError$inboundSchema),
|
|
193
193
|
M.fail("4XX"),
|
|
194
194
|
M.fail("5XX"),
|
|
@@ -105,6 +105,11 @@ async function $do(
|
|
|
105
105
|
const headers = new Headers(compactMap({
|
|
106
106
|
"Content-Type": "application/json",
|
|
107
107
|
Accept: "application/json",
|
|
108
|
+
"Idempotency-Key": encodeSimple(
|
|
109
|
+
"Idempotency-Key",
|
|
110
|
+
payload["Idempotency-Key"],
|
|
111
|
+
{ explode: false, charEncoding: "none" },
|
|
112
|
+
),
|
|
108
113
|
}));
|
|
109
114
|
|
|
110
115
|
const requestSecurity = resolveSecurity(
|
|
@@ -193,7 +198,7 @@ async function $do(
|
|
|
193
198
|
| SDKValidationError
|
|
194
199
|
>(
|
|
195
200
|
M.json(200, models.Webhook$inboundSchema),
|
|
196
|
-
M.jsonErr([400, 401, 403, 404, 429], errors.ApiError$inboundSchema),
|
|
201
|
+
M.jsonErr([400, 401, 403, 404, 409, 429], errors.ApiError$inboundSchema),
|
|
197
202
|
M.jsonErr(500, errors.ApiError$inboundSchema),
|
|
198
203
|
M.fail("4XX"),
|
|
199
204
|
M.fail("5XX"),
|
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.7.
|
|
65
|
-
genVersion: "2.
|
|
66
|
-
userAgent: "speakeasy-sdk/typescript 0.7.
|
|
64
|
+
sdkVersion: "0.7.6",
|
|
65
|
+
genVersion: "2.937.18",
|
|
66
|
+
userAgent: "speakeasy-sdk/typescript 0.7.6 2.937.18 1.0.0 @clientcasa/sdk",
|
|
67
67
|
} as const;
|
package/src/models/api-error.ts
CHANGED
|
@@ -14,9 +14,12 @@ export const Code = {
|
|
|
14
14
|
Unauthorized: "unauthorized",
|
|
15
15
|
Forbidden: "forbidden",
|
|
16
16
|
NotFound: "not_found",
|
|
17
|
+
MethodNotAllowed: "method_not_allowed",
|
|
17
18
|
InvalidRequest: "invalid_request",
|
|
18
19
|
RateLimited: "rate_limited",
|
|
19
20
|
Conflict: "conflict",
|
|
21
|
+
RequestInProgress: "request_in_progress",
|
|
22
|
+
IdempotencyKeyReused: "idempotency_key_reused",
|
|
20
23
|
Gone: "gone",
|
|
21
24
|
PayloadTooLarge: "payload_too_large",
|
|
22
25
|
ClientError: "client_error",
|
|
@@ -26,24 +29,37 @@ export type Code = OpenEnum<typeof Code>;
|
|
|
26
29
|
|
|
27
30
|
export const DetailsCode = {
|
|
28
31
|
ArchivedRecordReadOnly: "archived_record_read_only",
|
|
32
|
+
PausedTransactionWindowLocked: "paused_transaction_window_locked",
|
|
29
33
|
RecordHasDependents: "record_has_dependents",
|
|
30
34
|
DuplicateRecord: "duplicate_record",
|
|
31
35
|
RecordImmutable: "record_immutable",
|
|
32
36
|
QuotaExceeded: "quota_exceeded",
|
|
33
37
|
InvalidPayload: "invalid_payload",
|
|
38
|
+
GlobalModeHasAssignments: "global_mode_has_assignments",
|
|
34
39
|
UnsupportedFileType: "unsupported_file_type",
|
|
35
40
|
FileTooLarge: "file_too_large",
|
|
36
41
|
CrossOrganization: "cross_organization",
|
|
37
42
|
LinkedRecordNotFound: "linked_record_not_found",
|
|
43
|
+
LinkedRecordsMultipleOrganizations: "linked_records_multiple_organizations",
|
|
38
44
|
RateLimited: "rate_limited",
|
|
39
45
|
RevenueOnInternalProject: "revenue_on_internal_project",
|
|
40
46
|
NumberSeriesUnlocked: "number_series_unlocked",
|
|
41
47
|
InvoiceNotDeletable: "invoice_not_deletable",
|
|
48
|
+
SaleNotDeletable: "sale_not_deletable",
|
|
42
49
|
TaxCategoryDefault: "tax_category_default",
|
|
43
50
|
TaxCategoryReferenced: "tax_category_referenced",
|
|
44
51
|
RecipePricePropagationFailed: "recipe_price_propagation_failed",
|
|
45
52
|
PriceHistoryHeadMismatch: "price_history_head_mismatch",
|
|
46
53
|
PriceHistoryNotDerived: "price_history_not_derived",
|
|
54
|
+
TimeEntryAlreadyBilled: "time_entry_already_billed",
|
|
55
|
+
ChargePeriodAlreadyBilled: "charge_period_already_billed",
|
|
56
|
+
OwnerImmutable: "owner_immutable",
|
|
57
|
+
PaymentClientMismatch: "payment_client_mismatch",
|
|
58
|
+
PaymentTargetNotCollectible: "payment_target_not_collectible",
|
|
59
|
+
CurrencyLocked: "currency_locked",
|
|
60
|
+
EventDayCompanionWriteFailed: "event_day_companion_write_failed",
|
|
61
|
+
TimelineAnchorMissing: "timeline_anchor_missing",
|
|
62
|
+
UnknownAssignmentId: "unknown_assignment_id",
|
|
47
63
|
} as const;
|
|
48
64
|
export type DetailsCode = OpenEnum<typeof DetailsCode>;
|
|
49
65
|
|
|
@@ -25,16 +25,16 @@ export type CalendarEventUpdate = {
|
|
|
25
25
|
*/
|
|
26
26
|
clientId?: string | null | undefined;
|
|
27
27
|
actionable?: boolean | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* ISO 8601 timestamp (UTC)
|
|
30
|
-
*/
|
|
31
|
-
completedAt?: Date | null | undefined;
|
|
32
28
|
recurring?: boolean | undefined;
|
|
33
29
|
rrule?: string | null | undefined;
|
|
34
30
|
/**
|
|
35
31
|
* ISO 8601 timestamp (UTC)
|
|
36
32
|
*/
|
|
37
33
|
recurrenceEnd?: Date | null | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* ISO 8601 timestamp (UTC)
|
|
36
|
+
*/
|
|
37
|
+
completedAt?: Date | null | undefined;
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
/** @internal */
|
|
@@ -47,10 +47,10 @@ export type CalendarEventUpdate$Outbound = {
|
|
|
47
47
|
projectId?: string | null | undefined;
|
|
48
48
|
clientId?: string | null | undefined;
|
|
49
49
|
actionable?: boolean | undefined;
|
|
50
|
-
completedAt?: string | null | undefined;
|
|
51
50
|
recurring?: boolean | undefined;
|
|
52
51
|
rrule?: string | null | undefined;
|
|
53
52
|
recurrenceEnd?: string | null | undefined;
|
|
53
|
+
completedAt?: string | null | undefined;
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
/** @internal */
|
|
@@ -68,14 +68,14 @@ export const CalendarEventUpdate$outboundSchema: z.ZodMiniType<
|
|
|
68
68
|
projectId: z.optional(z.nullable(z.string())),
|
|
69
69
|
clientId: z.optional(z.nullable(z.string())),
|
|
70
70
|
actionable: z.optional(z.boolean()),
|
|
71
|
-
completedAt: z.optional(
|
|
72
|
-
z.nullable(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
73
|
-
),
|
|
74
71
|
recurring: z.optional(z.boolean()),
|
|
75
72
|
rrule: z.optional(z.nullable(z.string())),
|
|
76
73
|
recurrenceEnd: z.optional(
|
|
77
74
|
z.nullable(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
78
75
|
),
|
|
76
|
+
completedAt: z.optional(
|
|
77
|
+
z.nullable(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
78
|
+
),
|
|
79
79
|
});
|
|
80
80
|
|
|
81
81
|
export function calendarEventUpdateToJSON(
|
|
@@ -15,7 +15,13 @@ export type EventDayVendorCreateConfirmationStatus = ClosedEnum<
|
|
|
15
15
|
>;
|
|
16
16
|
|
|
17
17
|
export type EventDayVendorCreate = {
|
|
18
|
+
/**
|
|
19
|
+
* UUID v4
|
|
20
|
+
*/
|
|
18
21
|
eventDayId: string;
|
|
22
|
+
/**
|
|
23
|
+
* UUID v4
|
|
24
|
+
*/
|
|
19
25
|
vendorId: string;
|
|
20
26
|
role?: string | undefined;
|
|
21
27
|
callTime?: string | undefined;
|