@clientcasa/sdk 0.7.3 → 0.7.5
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/esm/funcs/calendar-events-update.js +2 -1
- package/esm/funcs/calendar-events-update.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-update.js +2 -1
- package/esm/funcs/clients-update.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-update.js +2 -1
- package/esm/funcs/contracts-update.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-update.js +2 -1
- package/esm/funcs/event-days-update.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-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-update.js +2 -1
- package/esm/funcs/projects-update.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-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-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-update.js +2 -1
- package/esm/funcs/vendors-update.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-update.js +2 -1
- package/esm/funcs/webhooks-update.js.map +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/api-error.d.ts +20 -0
- package/esm/models/api-error.d.ts.map +1 -1
- package/esm/models/api-error.js +20 -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/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/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/transaction-create.d.ts +7 -0
- package/esm/models/transaction-create.d.ts.map +1 -1
- package/esm/models/transaction-create.js +2 -0
- package/esm/models/transaction-create.js.map +1 -1
- package/esm/models/transaction-update.d.ts +7 -0
- package/esm/models/transaction-update.d.ts.map +1 -1
- package/esm/models/transaction-update.js +2 -0
- package/esm/models/transaction-update.js.map +1 -1
- package/esm/models/transaction.d.ts +5 -0
- package/esm/models/transaction.d.ts.map +1 -1
- package/esm/models/transaction.js +2 -0
- package/esm/models/transaction.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-update.ts +6 -1
- package/src/funcs/catalog-items-update.ts +6 -1
- package/src/funcs/clients-update.ts +6 -1
- package/src/funcs/contacts-update.ts +6 -1
- package/src/funcs/contracts-update.ts +6 -1
- package/src/funcs/event-day-vendors-update.ts +6 -1
- package/src/funcs/event-days-update.ts +6 -1
- package/src/funcs/invoices-update.ts +6 -1
- package/src/funcs/milestones-update.ts +6 -1
- package/src/funcs/payments-update.ts +6 -1
- package/src/funcs/projects-update.ts +6 -1
- package/src/funcs/time-entries-update.ts +6 -1
- package/src/funcs/timeline-items-update.ts +6 -1
- package/src/funcs/transactions-create.ts +1 -1
- package/src/funcs/transactions-update.ts +7 -2
- package/src/funcs/vendors-update.ts +6 -1
- package/src/funcs/venues-update.ts +6 -1
- package/src/funcs/webhooks-update.ts +6 -1
- package/src/lib/config.ts +2 -2
- package/src/models/api-error.ts +20 -0
- package/src/models/calendar-event-update.ts +8 -8
- 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/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/transaction-create.ts +9 -0
- package/src/models/transaction-update.ts +9 -0
- package/src/models/transaction.ts +7 -0
- package/src/sdk/transactions.ts +2 -2
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import * as models from "../index.js";
|
|
7
8
|
|
|
8
9
|
export type UpdateProjectSecurity = {
|
|
@@ -15,6 +16,10 @@ export type UpdateProjectRequest = {
|
|
|
15
16
|
* UUID v4
|
|
16
17
|
*/
|
|
17
18
|
id: string;
|
|
19
|
+
/**
|
|
20
|
+
* Optional unique key that makes this request safely retryable. Replaying the same key returns the original response instead of creating a duplicate; reusing a key with a different request body returns 409.
|
|
21
|
+
*/
|
|
22
|
+
idempotencyKey?: string | undefined;
|
|
18
23
|
body: models.ProjectUpdate;
|
|
19
24
|
};
|
|
20
25
|
|
|
@@ -44,6 +49,7 @@ export function updateProjectSecurityToJSON(
|
|
|
44
49
|
/** @internal */
|
|
45
50
|
export type UpdateProjectRequest$Outbound = {
|
|
46
51
|
id: string;
|
|
52
|
+
"Idempotency-Key"?: string | undefined;
|
|
47
53
|
body: models.ProjectUpdate$Outbound;
|
|
48
54
|
};
|
|
49
55
|
|
|
@@ -51,10 +57,18 @@ export type UpdateProjectRequest$Outbound = {
|
|
|
51
57
|
export const UpdateProjectRequest$outboundSchema: z.ZodMiniType<
|
|
52
58
|
UpdateProjectRequest$Outbound,
|
|
53
59
|
UpdateProjectRequest
|
|
54
|
-
> = z.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
> = z.pipe(
|
|
61
|
+
z.object({
|
|
62
|
+
id: z.string(),
|
|
63
|
+
idempotencyKey: z.optional(z.string()),
|
|
64
|
+
body: models.ProjectUpdate$outboundSchema,
|
|
65
|
+
}),
|
|
66
|
+
z.transform((v) => {
|
|
67
|
+
return remap$(v, {
|
|
68
|
+
idempotencyKey: "Idempotency-Key",
|
|
69
|
+
});
|
|
70
|
+
}),
|
|
71
|
+
);
|
|
58
72
|
|
|
59
73
|
export function updateProjectRequestToJSON(
|
|
60
74
|
updateProjectRequest: UpdateProjectRequest,
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import * as models from "../index.js";
|
|
7
8
|
|
|
8
9
|
export type UpdateTimeEntrySecurity = {
|
|
@@ -15,6 +16,10 @@ export type UpdateTimeEntryRequest = {
|
|
|
15
16
|
* UUID v4
|
|
16
17
|
*/
|
|
17
18
|
id: string;
|
|
19
|
+
/**
|
|
20
|
+
* Optional unique key that makes this request safely retryable. Replaying the same key returns the original response instead of creating a duplicate; reusing a key with a different request body returns 409.
|
|
21
|
+
*/
|
|
22
|
+
idempotencyKey?: string | undefined;
|
|
18
23
|
body: models.TimeEntryUpdate;
|
|
19
24
|
};
|
|
20
25
|
|
|
@@ -44,6 +49,7 @@ export function updateTimeEntrySecurityToJSON(
|
|
|
44
49
|
/** @internal */
|
|
45
50
|
export type UpdateTimeEntryRequest$Outbound = {
|
|
46
51
|
id: string;
|
|
52
|
+
"Idempotency-Key"?: string | undefined;
|
|
47
53
|
body: models.TimeEntryUpdate$Outbound;
|
|
48
54
|
};
|
|
49
55
|
|
|
@@ -51,10 +57,18 @@ export type UpdateTimeEntryRequest$Outbound = {
|
|
|
51
57
|
export const UpdateTimeEntryRequest$outboundSchema: z.ZodMiniType<
|
|
52
58
|
UpdateTimeEntryRequest$Outbound,
|
|
53
59
|
UpdateTimeEntryRequest
|
|
54
|
-
> = z.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
> = z.pipe(
|
|
61
|
+
z.object({
|
|
62
|
+
id: z.string(),
|
|
63
|
+
idempotencyKey: z.optional(z.string()),
|
|
64
|
+
body: models.TimeEntryUpdate$outboundSchema,
|
|
65
|
+
}),
|
|
66
|
+
z.transform((v) => {
|
|
67
|
+
return remap$(v, {
|
|
68
|
+
idempotencyKey: "Idempotency-Key",
|
|
69
|
+
});
|
|
70
|
+
}),
|
|
71
|
+
);
|
|
58
72
|
|
|
59
73
|
export function updateTimeEntryRequestToJSON(
|
|
60
74
|
updateTimeEntryRequest: UpdateTimeEntryRequest,
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import * as models from "../index.js";
|
|
7
8
|
|
|
8
9
|
export type UpdateTimelineItemSecurity = {
|
|
@@ -15,6 +16,10 @@ export type UpdateTimelineItemRequest = {
|
|
|
15
16
|
* UUID v4
|
|
16
17
|
*/
|
|
17
18
|
id: string;
|
|
19
|
+
/**
|
|
20
|
+
* Optional unique key that makes this request safely retryable. Replaying the same key returns the original response instead of creating a duplicate; reusing a key with a different request body returns 409.
|
|
21
|
+
*/
|
|
22
|
+
idempotencyKey?: string | undefined;
|
|
18
23
|
body: models.TimelineItemUpdate;
|
|
19
24
|
};
|
|
20
25
|
|
|
@@ -44,6 +49,7 @@ export function updateTimelineItemSecurityToJSON(
|
|
|
44
49
|
/** @internal */
|
|
45
50
|
export type UpdateTimelineItemRequest$Outbound = {
|
|
46
51
|
id: string;
|
|
52
|
+
"Idempotency-Key"?: string | undefined;
|
|
47
53
|
body: models.TimelineItemUpdate$Outbound;
|
|
48
54
|
};
|
|
49
55
|
|
|
@@ -51,10 +57,18 @@ export type UpdateTimelineItemRequest$Outbound = {
|
|
|
51
57
|
export const UpdateTimelineItemRequest$outboundSchema: z.ZodMiniType<
|
|
52
58
|
UpdateTimelineItemRequest$Outbound,
|
|
53
59
|
UpdateTimelineItemRequest
|
|
54
|
-
> = z.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
> = z.pipe(
|
|
61
|
+
z.object({
|
|
62
|
+
id: z.string(),
|
|
63
|
+
idempotencyKey: z.optional(z.string()),
|
|
64
|
+
body: models.TimelineItemUpdate$outboundSchema,
|
|
65
|
+
}),
|
|
66
|
+
z.transform((v) => {
|
|
67
|
+
return remap$(v, {
|
|
68
|
+
idempotencyKey: "Idempotency-Key",
|
|
69
|
+
});
|
|
70
|
+
}),
|
|
71
|
+
);
|
|
58
72
|
|
|
59
73
|
export function updateTimelineItemRequestToJSON(
|
|
60
74
|
updateTimelineItemRequest: UpdateTimelineItemRequest,
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import * as models from "../index.js";
|
|
7
8
|
|
|
8
9
|
export type UpdateTransactionSecurity = {
|
|
@@ -15,6 +16,10 @@ export type UpdateTransactionRequest = {
|
|
|
15
16
|
* UUID v4
|
|
16
17
|
*/
|
|
17
18
|
id: string;
|
|
19
|
+
/**
|
|
20
|
+
* Optional unique key that makes this request safely retryable. Replaying the same key returns the original response instead of creating a duplicate; reusing a key with a different request body returns 409.
|
|
21
|
+
*/
|
|
22
|
+
idempotencyKey?: string | undefined;
|
|
18
23
|
body: models.TransactionUpdate;
|
|
19
24
|
};
|
|
20
25
|
|
|
@@ -44,6 +49,7 @@ export function updateTransactionSecurityToJSON(
|
|
|
44
49
|
/** @internal */
|
|
45
50
|
export type UpdateTransactionRequest$Outbound = {
|
|
46
51
|
id: string;
|
|
52
|
+
"Idempotency-Key"?: string | undefined;
|
|
47
53
|
body: models.TransactionUpdate$Outbound;
|
|
48
54
|
};
|
|
49
55
|
|
|
@@ -51,10 +57,18 @@ export type UpdateTransactionRequest$Outbound = {
|
|
|
51
57
|
export const UpdateTransactionRequest$outboundSchema: z.ZodMiniType<
|
|
52
58
|
UpdateTransactionRequest$Outbound,
|
|
53
59
|
UpdateTransactionRequest
|
|
54
|
-
> = z.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
> = z.pipe(
|
|
61
|
+
z.object({
|
|
62
|
+
id: z.string(),
|
|
63
|
+
idempotencyKey: z.optional(z.string()),
|
|
64
|
+
body: models.TransactionUpdate$outboundSchema,
|
|
65
|
+
}),
|
|
66
|
+
z.transform((v) => {
|
|
67
|
+
return remap$(v, {
|
|
68
|
+
idempotencyKey: "Idempotency-Key",
|
|
69
|
+
});
|
|
70
|
+
}),
|
|
71
|
+
);
|
|
58
72
|
|
|
59
73
|
export function updateTransactionRequestToJSON(
|
|
60
74
|
updateTransactionRequest: UpdateTransactionRequest,
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import * as models from "../index.js";
|
|
7
8
|
|
|
8
9
|
export type UpdateVendorSecurity = {
|
|
@@ -15,6 +16,10 @@ export type UpdateVendorRequest = {
|
|
|
15
16
|
* UUID v4
|
|
16
17
|
*/
|
|
17
18
|
id: string;
|
|
19
|
+
/**
|
|
20
|
+
* Optional unique key that makes this request safely retryable. Replaying the same key returns the original response instead of creating a duplicate; reusing a key with a different request body returns 409.
|
|
21
|
+
*/
|
|
22
|
+
idempotencyKey?: string | undefined;
|
|
18
23
|
body: models.VendorUpdate;
|
|
19
24
|
};
|
|
20
25
|
|
|
@@ -44,6 +49,7 @@ export function updateVendorSecurityToJSON(
|
|
|
44
49
|
/** @internal */
|
|
45
50
|
export type UpdateVendorRequest$Outbound = {
|
|
46
51
|
id: string;
|
|
52
|
+
"Idempotency-Key"?: string | undefined;
|
|
47
53
|
body: models.VendorUpdate$Outbound;
|
|
48
54
|
};
|
|
49
55
|
|
|
@@ -51,10 +57,18 @@ export type UpdateVendorRequest$Outbound = {
|
|
|
51
57
|
export const UpdateVendorRequest$outboundSchema: z.ZodMiniType<
|
|
52
58
|
UpdateVendorRequest$Outbound,
|
|
53
59
|
UpdateVendorRequest
|
|
54
|
-
> = z.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
> = z.pipe(
|
|
61
|
+
z.object({
|
|
62
|
+
id: z.string(),
|
|
63
|
+
idempotencyKey: z.optional(z.string()),
|
|
64
|
+
body: models.VendorUpdate$outboundSchema,
|
|
65
|
+
}),
|
|
66
|
+
z.transform((v) => {
|
|
67
|
+
return remap$(v, {
|
|
68
|
+
idempotencyKey: "Idempotency-Key",
|
|
69
|
+
});
|
|
70
|
+
}),
|
|
71
|
+
);
|
|
58
72
|
|
|
59
73
|
export function updateVendorRequestToJSON(
|
|
60
74
|
updateVendorRequest: UpdateVendorRequest,
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import * as models from "../index.js";
|
|
7
8
|
|
|
8
9
|
export type UpdateVenueSecurity = {
|
|
@@ -15,6 +16,10 @@ export type UpdateVenueRequest = {
|
|
|
15
16
|
* UUID v4
|
|
16
17
|
*/
|
|
17
18
|
id: string;
|
|
19
|
+
/**
|
|
20
|
+
* Optional unique key that makes this request safely retryable. Replaying the same key returns the original response instead of creating a duplicate; reusing a key with a different request body returns 409.
|
|
21
|
+
*/
|
|
22
|
+
idempotencyKey?: string | undefined;
|
|
18
23
|
body: models.VenueUpdate;
|
|
19
24
|
};
|
|
20
25
|
|
|
@@ -44,6 +49,7 @@ export function updateVenueSecurityToJSON(
|
|
|
44
49
|
/** @internal */
|
|
45
50
|
export type UpdateVenueRequest$Outbound = {
|
|
46
51
|
id: string;
|
|
52
|
+
"Idempotency-Key"?: string | undefined;
|
|
47
53
|
body: models.VenueUpdate$Outbound;
|
|
48
54
|
};
|
|
49
55
|
|
|
@@ -51,10 +57,18 @@ export type UpdateVenueRequest$Outbound = {
|
|
|
51
57
|
export const UpdateVenueRequest$outboundSchema: z.ZodMiniType<
|
|
52
58
|
UpdateVenueRequest$Outbound,
|
|
53
59
|
UpdateVenueRequest
|
|
54
|
-
> = z.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
> = z.pipe(
|
|
61
|
+
z.object({
|
|
62
|
+
id: z.string(),
|
|
63
|
+
idempotencyKey: z.optional(z.string()),
|
|
64
|
+
body: models.VenueUpdate$outboundSchema,
|
|
65
|
+
}),
|
|
66
|
+
z.transform((v) => {
|
|
67
|
+
return remap$(v, {
|
|
68
|
+
idempotencyKey: "Idempotency-Key",
|
|
69
|
+
});
|
|
70
|
+
}),
|
|
71
|
+
);
|
|
58
72
|
|
|
59
73
|
export function updateVenueRequestToJSON(
|
|
60
74
|
updateVenueRequest: UpdateVenueRequest,
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import * as models from "../index.js";
|
|
7
8
|
|
|
8
9
|
export type UpdateWebhookSecurity = {
|
|
@@ -15,6 +16,10 @@ export type UpdateWebhookRequest = {
|
|
|
15
16
|
* UUID v4
|
|
16
17
|
*/
|
|
17
18
|
id: string;
|
|
19
|
+
/**
|
|
20
|
+
* Optional unique key that makes this request safely retryable. Replaying the same key returns the original response instead of creating a duplicate; reusing a key with a different request body returns 409.
|
|
21
|
+
*/
|
|
22
|
+
idempotencyKey?: string | undefined;
|
|
18
23
|
body: models.WebhookUpdate;
|
|
19
24
|
};
|
|
20
25
|
|
|
@@ -44,6 +49,7 @@ export function updateWebhookSecurityToJSON(
|
|
|
44
49
|
/** @internal */
|
|
45
50
|
export type UpdateWebhookRequest$Outbound = {
|
|
46
51
|
id: string;
|
|
52
|
+
"Idempotency-Key"?: string | undefined;
|
|
47
53
|
body: models.WebhookUpdate$Outbound;
|
|
48
54
|
};
|
|
49
55
|
|
|
@@ -51,10 +57,18 @@ export type UpdateWebhookRequest$Outbound = {
|
|
|
51
57
|
export const UpdateWebhookRequest$outboundSchema: z.ZodMiniType<
|
|
52
58
|
UpdateWebhookRequest$Outbound,
|
|
53
59
|
UpdateWebhookRequest
|
|
54
|
-
> = z.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
> = z.pipe(
|
|
61
|
+
z.object({
|
|
62
|
+
id: z.string(),
|
|
63
|
+
idempotencyKey: z.optional(z.string()),
|
|
64
|
+
body: models.WebhookUpdate$outboundSchema,
|
|
65
|
+
}),
|
|
66
|
+
z.transform((v) => {
|
|
67
|
+
return remap$(v, {
|
|
68
|
+
idempotencyKey: "Idempotency-Key",
|
|
69
|
+
});
|
|
70
|
+
}),
|
|
71
|
+
);
|
|
58
72
|
|
|
59
73
|
export function updateWebhookRequestToJSON(
|
|
60
74
|
updateWebhookRequest: UpdateWebhookRequest,
|
|
@@ -31,6 +31,10 @@ export const TransactionCreateMode = {
|
|
|
31
31
|
export type TransactionCreateMode = ClosedEnum<typeof TransactionCreateMode>;
|
|
32
32
|
|
|
33
33
|
export type TransactionCreateAssignment = {
|
|
34
|
+
/**
|
|
35
|
+
* Opaque array-row identifier (not a UUID)
|
|
36
|
+
*/
|
|
37
|
+
id?: string | undefined;
|
|
34
38
|
/**
|
|
35
39
|
* UUID v4
|
|
36
40
|
*/
|
|
@@ -44,6 +48,7 @@ export type TransactionCreateAssignment = {
|
|
|
44
48
|
fixedAmount?: number | undefined;
|
|
45
49
|
startDate?: Date | undefined;
|
|
46
50
|
endDate?: Date | undefined;
|
|
51
|
+
allocationKey?: string | undefined;
|
|
47
52
|
};
|
|
48
53
|
|
|
49
54
|
export const TransactionCreateStatus = {
|
|
@@ -103,6 +108,7 @@ export const TransactionCreateMode$outboundSchema: z.ZodMiniEnum<
|
|
|
103
108
|
|
|
104
109
|
/** @internal */
|
|
105
110
|
export type TransactionCreateAssignment$Outbound = {
|
|
111
|
+
id?: string | undefined;
|
|
106
112
|
projectId?: string | undefined;
|
|
107
113
|
clientId?: string | undefined;
|
|
108
114
|
amount?: number | undefined;
|
|
@@ -110,6 +116,7 @@ export type TransactionCreateAssignment$Outbound = {
|
|
|
110
116
|
fixedAmount?: number | undefined;
|
|
111
117
|
startDate?: string | undefined;
|
|
112
118
|
endDate?: string | undefined;
|
|
119
|
+
allocationKey?: string | undefined;
|
|
113
120
|
};
|
|
114
121
|
|
|
115
122
|
/** @internal */
|
|
@@ -117,6 +124,7 @@ export const TransactionCreateAssignment$outboundSchema: z.ZodMiniType<
|
|
|
117
124
|
TransactionCreateAssignment$Outbound,
|
|
118
125
|
TransactionCreateAssignment
|
|
119
126
|
> = z.object({
|
|
127
|
+
id: z.optional(z.string()),
|
|
120
128
|
projectId: z.optional(z.string()),
|
|
121
129
|
clientId: z.optional(z.string()),
|
|
122
130
|
amount: z.optional(z.number()),
|
|
@@ -134,6 +142,7 @@ export const TransactionCreateAssignment$outboundSchema: z.ZodMiniType<
|
|
|
134
142
|
z.transform(v => v.toISOString().slice(0, "YYYY-MM-DD".length)),
|
|
135
143
|
),
|
|
136
144
|
),
|
|
145
|
+
allocationKey: z.optional(z.string()),
|
|
137
146
|
});
|
|
138
147
|
|
|
139
148
|
export function transactionCreateAssignmentToJSON(
|
|
@@ -31,6 +31,10 @@ export const TransactionUpdateMode = {
|
|
|
31
31
|
export type TransactionUpdateMode = ClosedEnum<typeof TransactionUpdateMode>;
|
|
32
32
|
|
|
33
33
|
export type TransactionUpdateAssignment = {
|
|
34
|
+
/**
|
|
35
|
+
* Opaque array-row identifier (not a UUID)
|
|
36
|
+
*/
|
|
37
|
+
id?: string | undefined;
|
|
34
38
|
/**
|
|
35
39
|
* UUID v4
|
|
36
40
|
*/
|
|
@@ -44,6 +48,7 @@ export type TransactionUpdateAssignment = {
|
|
|
44
48
|
fixedAmount?: number | undefined;
|
|
45
49
|
startDate?: Date | undefined;
|
|
46
50
|
endDate?: Date | undefined;
|
|
51
|
+
allocationKey?: string | undefined;
|
|
47
52
|
};
|
|
48
53
|
|
|
49
54
|
export const TransactionUpdateStatus = {
|
|
@@ -99,6 +104,7 @@ export const TransactionUpdateMode$outboundSchema: z.ZodMiniEnum<
|
|
|
99
104
|
|
|
100
105
|
/** @internal */
|
|
101
106
|
export type TransactionUpdateAssignment$Outbound = {
|
|
107
|
+
id?: string | undefined;
|
|
102
108
|
projectId?: string | undefined;
|
|
103
109
|
clientId?: string | undefined;
|
|
104
110
|
amount?: number | undefined;
|
|
@@ -106,6 +112,7 @@ export type TransactionUpdateAssignment$Outbound = {
|
|
|
106
112
|
fixedAmount?: number | undefined;
|
|
107
113
|
startDate?: string | undefined;
|
|
108
114
|
endDate?: string | undefined;
|
|
115
|
+
allocationKey?: string | undefined;
|
|
109
116
|
};
|
|
110
117
|
|
|
111
118
|
/** @internal */
|
|
@@ -113,6 +120,7 @@ export const TransactionUpdateAssignment$outboundSchema: z.ZodMiniType<
|
|
|
113
120
|
TransactionUpdateAssignment$Outbound,
|
|
114
121
|
TransactionUpdateAssignment
|
|
115
122
|
> = z.object({
|
|
123
|
+
id: z.optional(z.string()),
|
|
116
124
|
projectId: z.optional(z.string()),
|
|
117
125
|
clientId: z.optional(z.string()),
|
|
118
126
|
amount: z.optional(z.number()),
|
|
@@ -130,6 +138,7 @@ export const TransactionUpdateAssignment$outboundSchema: z.ZodMiniType<
|
|
|
130
138
|
z.transform(v => v.toISOString().slice(0, "YYYY-MM-DD".length)),
|
|
131
139
|
),
|
|
132
140
|
),
|
|
141
|
+
allocationKey: z.optional(z.string()),
|
|
133
142
|
});
|
|
134
143
|
|
|
135
144
|
export function transactionUpdateAssignmentToJSON(
|
|
@@ -32,6 +32,10 @@ export const TransactionMode = {
|
|
|
32
32
|
export type TransactionMode = OpenEnum<typeof TransactionMode>;
|
|
33
33
|
|
|
34
34
|
export type TransactionAssignment = {
|
|
35
|
+
/**
|
|
36
|
+
* Opaque array-row identifier (not a UUID)
|
|
37
|
+
*/
|
|
38
|
+
id: string | null;
|
|
35
39
|
/**
|
|
36
40
|
* UUID v4
|
|
37
41
|
*/
|
|
@@ -45,6 +49,7 @@ export type TransactionAssignment = {
|
|
|
45
49
|
fixedAmount: number | null;
|
|
46
50
|
startDate: Date | null;
|
|
47
51
|
endDate: Date | null;
|
|
52
|
+
allocationKey: string | null;
|
|
48
53
|
};
|
|
49
54
|
|
|
50
55
|
export const TransactionStatus = {
|
|
@@ -122,6 +127,7 @@ export const TransactionAssignment$inboundSchema: z.ZodMiniType<
|
|
|
122
127
|
TransactionAssignment,
|
|
123
128
|
unknown
|
|
124
129
|
> = z.object({
|
|
130
|
+
id: types.nullable(types.string()),
|
|
125
131
|
projectId: types.nullable(types.string()),
|
|
126
132
|
clientId: types.nullable(types.string()),
|
|
127
133
|
amount: types.nullable(types.number()),
|
|
@@ -129,6 +135,7 @@ export const TransactionAssignment$inboundSchema: z.ZodMiniType<
|
|
|
129
135
|
fixedAmount: types.nullable(types.number()),
|
|
130
136
|
startDate: types.nullable(types.date()),
|
|
131
137
|
endDate: types.nullable(types.date()),
|
|
138
|
+
allocationKey: types.nullable(types.string()),
|
|
132
139
|
});
|
|
133
140
|
|
|
134
141
|
export function transactionAssignmentFromJSON(
|
package/src/sdk/transactions.ts
CHANGED
|
@@ -36,7 +36,7 @@ export class Transactions extends ClientSDK {
|
|
|
36
36
|
* Create a transaction (expense or charge)
|
|
37
37
|
*
|
|
38
38
|
* @remarks
|
|
39
|
-
* 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.
|
|
39
|
+
* 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"`.
|
|
40
40
|
*/
|
|
41
41
|
async create(
|
|
42
42
|
security: operations.CreateTransactionSecurity,
|
|
@@ -90,7 +90,7 @@ export class Transactions extends ClientSDK {
|
|
|
90
90
|
* Update a transaction
|
|
91
91
|
*
|
|
92
92
|
* @remarks
|
|
93
|
-
* 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.
|
|
93
|
+
* 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"`.
|
|
94
94
|
*/
|
|
95
95
|
async update(
|
|
96
96
|
security: operations.UpdateTransactionSecurity,
|