@clientcasa/sdk 0.7.5 → 0.7.7
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/catalog-items-delete.js +1 -1
- package/esm/funcs/catalog-items-delete.js.map +1 -1
- package/esm/funcs/clients-delete.js +1 -1
- package/esm/funcs/clients-delete.js.map +1 -1
- package/esm/funcs/contacts-delete.js +1 -1
- package/esm/funcs/contacts-delete.js.map +1 -1
- package/esm/funcs/contracts-delete.js +1 -1
- package/esm/funcs/contracts-delete.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-days-delete.js +1 -1
- package/esm/funcs/event-days-delete.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/milestones-delete.js +1 -1
- package/esm/funcs/milestones-delete.js.map +1 -1
- package/esm/funcs/projects-delete.js +1 -1
- package/esm/funcs/projects-delete.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/timeline-items-delete.js +1 -1
- package/esm/funcs/timeline-items-delete.js.map +1 -1
- package/esm/funcs/transactions-delete.js +1 -1
- package/esm/funcs/transactions-delete.js.map +1 -1
- package/esm/funcs/vendors-delete.js +1 -1
- package/esm/funcs/vendors-delete.js.map +1 -1
- package/esm/funcs/venues-delete.js +1 -1
- package/esm/funcs/venues-delete.js.map +1 -1
- package/esm/funcs/webhooks-delete.js +1 -1
- package/esm/funcs/webhooks-delete.js.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/models/api-error.d.ts +11 -0
- package/esm/models/api-error.d.ts.map +1 -1
- package/esm/models/api-error.js +11 -0
- package/esm/models/api-error.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/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/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/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/calendar-events-delete.ts +1 -1
- package/src/funcs/catalog-items-delete.ts +1 -1
- package/src/funcs/clients-delete.ts +1 -1
- package/src/funcs/contacts-delete.ts +1 -1
- package/src/funcs/contracts-delete.ts +1 -1
- package/src/funcs/event-day-vendors-delete.ts +1 -1
- package/src/funcs/event-days-delete.ts +1 -1
- package/src/funcs/form-attachments-get.ts +206 -0
- package/src/funcs/invoices-delete.ts +1 -1
- package/src/funcs/milestones-delete.ts +1 -1
- package/src/funcs/projects-delete.ts +1 -1
- package/src/funcs/time-entries-delete.ts +1 -1
- package/src/funcs/timeline-items-delete.ts +1 -1
- package/src/funcs/transactions-delete.ts +1 -1
- package/src/funcs/vendors-delete.ts +1 -1
- package/src/funcs/venues-delete.ts +1 -1
- package/src/funcs/webhooks-delete.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/api-error.ts +11 -0
- 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/get-form-attachment.ts +61 -0
- package/src/models/operations/index.ts +1 -0
- 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
|
@@ -0,0 +1,47 @@
|
|
|
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 FormAttachmentDownload = {
|
|
12
|
+
/**
|
|
13
|
+
* UUID v4
|
|
14
|
+
*/
|
|
15
|
+
id: string;
|
|
16
|
+
filename: string;
|
|
17
|
+
mimeType: string | null;
|
|
18
|
+
filesize: number | null;
|
|
19
|
+
downloadUrl: string;
|
|
20
|
+
/**
|
|
21
|
+
* ISO 8601 timestamp (UTC)
|
|
22
|
+
*/
|
|
23
|
+
expiresAt: Date;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const FormAttachmentDownload$inboundSchema: z.ZodMiniType<
|
|
28
|
+
FormAttachmentDownload,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
id: types.string(),
|
|
32
|
+
filename: types.string(),
|
|
33
|
+
mimeType: types.nullable(types.string()),
|
|
34
|
+
filesize: types.nullable(types.number()),
|
|
35
|
+
downloadUrl: types.string(),
|
|
36
|
+
expiresAt: types.date(),
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export function formAttachmentDownloadFromJSON(
|
|
40
|
+
jsonString: string,
|
|
41
|
+
): SafeParseResult<FormAttachmentDownload, SDKValidationError> {
|
|
42
|
+
return safeParse(
|
|
43
|
+
jsonString,
|
|
44
|
+
(x) => FormAttachmentDownload$inboundSchema.parse(JSON.parse(x)),
|
|
45
|
+
`Failed to parse 'FormAttachmentDownload' from JSON`,
|
|
46
|
+
);
|
|
47
|
+
}
|
package/src/models/index.ts
CHANGED
|
@@ -37,6 +37,7 @@ export * from "./event-day-vendor-list.js";
|
|
|
37
37
|
export * from "./event-day-vendor-update.js";
|
|
38
38
|
export * from "./event-day-vendor.js";
|
|
39
39
|
export * from "./event-day.js";
|
|
40
|
+
export * from "./form-attachment-download.js";
|
|
40
41
|
export * from "./form-list.js";
|
|
41
42
|
export * from "./form-submission-answer.js";
|
|
42
43
|
export * from "./form-submission-attachment.js";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
|
|
7
|
+
export type GetFormAttachmentSecurity = {
|
|
8
|
+
apiKey?: string | undefined;
|
|
9
|
+
bearer?: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type GetFormAttachmentRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* UUID v4
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export type GetFormAttachmentSecurity$Outbound = {
|
|
21
|
+
apiKey?: string | undefined;
|
|
22
|
+
bearer?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const GetFormAttachmentSecurity$outboundSchema: z.ZodMiniType<
|
|
27
|
+
GetFormAttachmentSecurity$Outbound,
|
|
28
|
+
GetFormAttachmentSecurity
|
|
29
|
+
> = z.object({
|
|
30
|
+
apiKey: z.optional(z.string()),
|
|
31
|
+
bearer: z.optional(z.string()),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export function getFormAttachmentSecurityToJSON(
|
|
35
|
+
getFormAttachmentSecurity: GetFormAttachmentSecurity,
|
|
36
|
+
): string {
|
|
37
|
+
return JSON.stringify(
|
|
38
|
+
GetFormAttachmentSecurity$outboundSchema.parse(getFormAttachmentSecurity),
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type GetFormAttachmentRequest$Outbound = {
|
|
44
|
+
id: string;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const GetFormAttachmentRequest$outboundSchema: z.ZodMiniType<
|
|
49
|
+
GetFormAttachmentRequest$Outbound,
|
|
50
|
+
GetFormAttachmentRequest
|
|
51
|
+
> = z.object({
|
|
52
|
+
id: z.string(),
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export function getFormAttachmentRequestToJSON(
|
|
56
|
+
getFormAttachmentRequest: GetFormAttachmentRequest,
|
|
57
|
+
): string {
|
|
58
|
+
return JSON.stringify(
|
|
59
|
+
GetFormAttachmentRequest$outboundSchema.parse(getFormAttachmentRequest),
|
|
60
|
+
);
|
|
61
|
+
}
|
|
@@ -45,6 +45,7 @@ export * from "./get-contract.js";
|
|
|
45
45
|
export * from "./get-document-version.js";
|
|
46
46
|
export * from "./get-event-day-vendor.js";
|
|
47
47
|
export * from "./get-event-day.js";
|
|
48
|
+
export * from "./get-form-attachment.js";
|
|
48
49
|
export * from "./get-form-submission.js";
|
|
49
50
|
export * from "./get-form.js";
|
|
50
51
|
export * from "./get-invoice.js";
|
|
@@ -48,9 +48,15 @@ export type TimelineItemCreateStatus = ClosedEnum<
|
|
|
48
48
|
>;
|
|
49
49
|
|
|
50
50
|
export type TimelineItemCreate = {
|
|
51
|
+
/**
|
|
52
|
+
* UUID v4
|
|
53
|
+
*/
|
|
51
54
|
eventDayId: string;
|
|
52
55
|
title: string;
|
|
53
56
|
description?: string | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* UUID v4
|
|
59
|
+
*/
|
|
54
60
|
categoryId?: string | undefined;
|
|
55
61
|
sortOrder?: number | undefined;
|
|
56
62
|
trackId?: string | undefined;
|
|
@@ -48,9 +48,15 @@ export type TimelineItemUpdateStatus = ClosedEnum<
|
|
|
48
48
|
>;
|
|
49
49
|
|
|
50
50
|
export type TimelineItemUpdate = {
|
|
51
|
+
/**
|
|
52
|
+
* UUID v4
|
|
53
|
+
*/
|
|
51
54
|
eventDayId?: string | undefined;
|
|
52
55
|
title?: string | undefined;
|
|
53
56
|
description?: string | null | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* UUID v4
|
|
59
|
+
*/
|
|
54
60
|
categoryId?: string | null | undefined;
|
|
55
61
|
sortOrder?: number | undefined;
|
|
56
62
|
trackId?: string | null | undefined;
|
|
@@ -51,9 +51,15 @@ export type TimelineItem = {
|
|
|
51
51
|
* UUID v4
|
|
52
52
|
*/
|
|
53
53
|
id: string;
|
|
54
|
+
/**
|
|
55
|
+
* UUID v4
|
|
56
|
+
*/
|
|
54
57
|
eventDayId: string;
|
|
55
58
|
title: string;
|
|
56
59
|
description: string | null;
|
|
60
|
+
/**
|
|
61
|
+
* UUID v4
|
|
62
|
+
*/
|
|
57
63
|
categoryId: string | null;
|
|
58
64
|
sortOrder: number;
|
|
59
65
|
trackId: string | null;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { formAttachmentsGet } from "../funcs/form-attachments-get.js";
|
|
6
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
+
import * as models from "../models/index.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
10
|
+
|
|
11
|
+
export class FormAttachments extends ClientSDK {
|
|
12
|
+
/**
|
|
13
|
+
* Get a form attachment download link
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* 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.
|
|
17
|
+
*/
|
|
18
|
+
async get(
|
|
19
|
+
security: operations.GetFormAttachmentSecurity,
|
|
20
|
+
request: operations.GetFormAttachmentRequest,
|
|
21
|
+
options?: RequestOptions,
|
|
22
|
+
): Promise<models.FormAttachmentDownload> {
|
|
23
|
+
return unwrapAsync(formAttachmentsGet(
|
|
24
|
+
this,
|
|
25
|
+
security,
|
|
26
|
+
request,
|
|
27
|
+
options,
|
|
28
|
+
));
|
|
29
|
+
}
|
|
30
|
+
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { Contracts } from "./contracts.js";
|
|
|
11
11
|
import { DocumentVersions } from "./document-versions.js";
|
|
12
12
|
import { EventDayVendors } from "./event-day-vendors.js";
|
|
13
13
|
import { EventDays } from "./event-days.js";
|
|
14
|
+
import { FormAttachments } from "./form-attachments.js";
|
|
14
15
|
import { FormSubmissions } from "./form-submissions.js";
|
|
15
16
|
import { FormsAndAgreements } from "./forms-and-agreements.js";
|
|
16
17
|
import { Forms } from "./forms.js";
|
|
@@ -74,6 +75,11 @@ export class ClientCasa extends ClientSDK {
|
|
|
74
75
|
return (this._formSubmissions ??= new FormSubmissions(this._options));
|
|
75
76
|
}
|
|
76
77
|
|
|
78
|
+
private _formAttachments?: FormAttachments;
|
|
79
|
+
get formAttachments(): FormAttachments {
|
|
80
|
+
return (this._formAttachments ??= new FormAttachments(this._options));
|
|
81
|
+
}
|
|
82
|
+
|
|
77
83
|
private _inquiries?: Inquiries;
|
|
78
84
|
get inquiries(): Inquiries {
|
|
79
85
|
return (this._inquiries ??= new Inquiries(this._options));
|