@clientcasa/sdk 0.4.1 → 0.5.0

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.
Files changed (93) hide show
  1. package/README.md +7 -0
  2. package/esm/funcs/document-versions-get.d.ts +16 -0
  3. package/esm/funcs/document-versions-get.d.ts.map +1 -0
  4. package/esm/funcs/document-versions-get.js +107 -0
  5. package/esm/funcs/document-versions-get.js.map +1 -0
  6. package/esm/funcs/document-versions-list.d.ts +21 -0
  7. package/esm/funcs/document-versions-list.d.ts.map +1 -0
  8. package/esm/funcs/document-versions-list.js +145 -0
  9. package/esm/funcs/document-versions-list.js.map +1 -0
  10. package/esm/funcs/invoices-list.js +1 -0
  11. package/esm/funcs/invoices-list.js.map +1 -1
  12. package/esm/lib/config.d.ts +3 -3
  13. package/esm/lib/config.js +3 -3
  14. package/esm/lib/sdks.d.ts.map +1 -1
  15. package/esm/lib/sdks.js +37 -12
  16. package/esm/lib/sdks.js.map +1 -1
  17. package/esm/models/client-create.d.ts +5 -0
  18. package/esm/models/client-create.d.ts.map +1 -1
  19. package/esm/models/client-create.js +3 -0
  20. package/esm/models/client-create.js.map +1 -1
  21. package/esm/models/client-tax-settings.d.ts +21 -0
  22. package/esm/models/client-tax-settings.d.ts.map +1 -0
  23. package/esm/models/client-tax-settings.js +25 -0
  24. package/esm/models/client-tax-settings.js.map +1 -0
  25. package/esm/models/client-update.d.ts +5 -0
  26. package/esm/models/client-update.d.ts.map +1 -1
  27. package/esm/models/client-update.js +3 -0
  28. package/esm/models/client-update.js.map +1 -1
  29. package/esm/models/client.d.ts +25 -0
  30. package/esm/models/client.d.ts.map +1 -1
  31. package/esm/models/client.js +22 -0
  32. package/esm/models/client.js.map +1 -1
  33. package/esm/models/document-version-list.d.ts +13 -0
  34. package/esm/models/document-version-list.d.ts.map +1 -0
  35. package/esm/models/document-version-list.js +16 -0
  36. package/esm/models/document-version-list.js.map +1 -0
  37. package/esm/models/document-version.d.ts +106 -0
  38. package/esm/models/document-version.d.ts.map +1 -0
  39. package/esm/models/document-version.js +67 -0
  40. package/esm/models/document-version.js.map +1 -0
  41. package/esm/models/index.d.ts +3 -0
  42. package/esm/models/index.d.ts.map +1 -1
  43. package/esm/models/index.js +3 -0
  44. package/esm/models/index.js.map +1 -1
  45. package/esm/models/invoice.d.ts +4 -0
  46. package/esm/models/invoice.d.ts.map +1 -1
  47. package/esm/models/invoice.js +1 -0
  48. package/esm/models/invoice.js.map +1 -1
  49. package/esm/models/operations/get-document-version.d.ts +27 -0
  50. package/esm/models/operations/get-document-version.d.ts.map +1 -0
  51. package/esm/models/operations/get-document-version.js +20 -0
  52. package/esm/models/operations/get-document-version.js.map +1 -0
  53. package/esm/models/operations/index.d.ts +2 -0
  54. package/esm/models/operations/index.d.ts.map +1 -1
  55. package/esm/models/operations/index.js +2 -0
  56. package/esm/models/operations/index.js.map +1 -1
  57. package/esm/models/operations/list-document-versions.d.ts +61 -0
  58. package/esm/models/operations/list-document-versions.d.ts.map +1 -0
  59. package/esm/models/operations/list-document-versions.js +47 -0
  60. package/esm/models/operations/list-document-versions.js.map +1 -0
  61. package/esm/models/operations/list-invoices.d.ts +5 -0
  62. package/esm/models/operations/list-invoices.d.ts.map +1 -1
  63. package/esm/models/operations/list-invoices.js +1 -0
  64. package/esm/models/operations/list-invoices.js.map +1 -1
  65. package/esm/sdk/document-versions.d.ts +20 -0
  66. package/esm/sdk/document-versions.d.ts.map +1 -0
  67. package/esm/sdk/document-versions.js +26 -0
  68. package/esm/sdk/document-versions.js.map +1 -0
  69. package/esm/sdk/sdk.d.ts +3 -0
  70. package/esm/sdk/sdk.d.ts.map +1 -1
  71. package/esm/sdk/sdk.js +5 -0
  72. package/esm/sdk/sdk.js.map +1 -1
  73. package/jsr.json +1 -1
  74. package/package.json +1 -1
  75. package/src/funcs/document-versions-get.ts +203 -0
  76. package/src/funcs/document-versions-list.ts +284 -0
  77. package/src/funcs/invoices-list.ts +1 -0
  78. package/src/lib/config.ts +3 -3
  79. package/src/lib/sdks.ts +41 -13
  80. package/src/models/client-create.ts +11 -0
  81. package/src/models/client-tax-settings.ts +58 -0
  82. package/src/models/client-update.ts +11 -0
  83. package/src/models/client.ts +56 -0
  84. package/src/models/document-version-list.ts +40 -0
  85. package/src/models/document-version.ts +175 -0
  86. package/src/models/index.ts +3 -0
  87. package/src/models/invoice.ts +5 -0
  88. package/src/models/operations/get-document-version.ts +61 -0
  89. package/src/models/operations/index.ts +2 -0
  90. package/src/models/operations/list-document-versions.ts +132 -0
  91. package/src/models/operations/list-invoices.ts +6 -0
  92. package/src/sdk/document-versions.ts +50 -0
  93. package/src/sdk/sdk.ts +6 -0
@@ -0,0 +1,175 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ import { OpenEnum } from "../types/enums.js";
9
+ import { Result as SafeParseResult } from "../types/fp.js";
10
+ import * as types from "../types/primitives.js";
11
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
12
+
13
+ export const DocumentType = {
14
+ SmartFile: "smart-file",
15
+ Invoice: "invoice",
16
+ StandaloneContract: "standalone-contract",
17
+ } as const;
18
+ export type DocumentType = OpenEnum<typeof DocumentType>;
19
+
20
+ export type DocumentRef = {
21
+ relationTo: string;
22
+ value: string;
23
+ };
24
+
25
+ export const VersionStatus = {
26
+ Issued: "issued",
27
+ Superseded: "superseded",
28
+ Voided: "voided",
29
+ } as const;
30
+ export type VersionStatus = OpenEnum<typeof VersionStatus>;
31
+
32
+ export const AcceptedBy = {
33
+ Client: "client",
34
+ Operator: "operator",
35
+ Signing: "signing",
36
+ Backfill: "backfill",
37
+ } as const;
38
+ export type AcceptedBy = OpenEnum<typeof AcceptedBy>;
39
+
40
+ export type DocumentVersion = {
41
+ /**
42
+ * UUID v4
43
+ */
44
+ id: string;
45
+ documentType: DocumentType;
46
+ /**
47
+ * UUID v4
48
+ */
49
+ documentId: string | null;
50
+ documentRef: DocumentRef | null;
51
+ versionNumber: number;
52
+ subVersionNumber: number;
53
+ versionStatus: VersionStatus;
54
+ contentHash: string;
55
+ currency: string;
56
+ /**
57
+ * ISO 8601 timestamp (UTC)
58
+ */
59
+ issuedAt: Date | null;
60
+ /**
61
+ * ISO 8601 timestamp (UTC)
62
+ */
63
+ viewedAt: Date | null;
64
+ /**
65
+ * ISO 8601 timestamp (UTC)
66
+ */
67
+ acceptedAt: Date | null;
68
+ acceptedBy: AcceptedBy | null;
69
+ /**
70
+ * ISO 8601 timestamp (UTC)
71
+ */
72
+ supersededAt: Date | null;
73
+ /**
74
+ * UUID v4
75
+ */
76
+ supersededByVersionId: string | null;
77
+ /**
78
+ * ISO 8601 timestamp (UTC)
79
+ */
80
+ voidedAt: Date | null;
81
+ /**
82
+ * ISO 8601 timestamp (UTC)
83
+ */
84
+ quoteConvertedAt: Date | null;
85
+ /**
86
+ * ISO 8601 timestamp (UTC)
87
+ */
88
+ expiresAt: Date | null;
89
+ /**
90
+ * UUID v4
91
+ */
92
+ engagementProjectId: string | null;
93
+ /**
94
+ * UUID v4
95
+ */
96
+ parentVersionId: string | null;
97
+ /**
98
+ * ISO 8601 timestamp (UTC)
99
+ */
100
+ createdAt: Date;
101
+ /**
102
+ * ISO 8601 timestamp (UTC)
103
+ */
104
+ updatedAt: Date;
105
+ };
106
+
107
+ /** @internal */
108
+ export const DocumentType$inboundSchema: z.ZodMiniType<DocumentType, unknown> =
109
+ openEnums.inboundSchema(DocumentType);
110
+
111
+ /** @internal */
112
+ export const DocumentRef$inboundSchema: z.ZodMiniType<DocumentRef, unknown> = z
113
+ .object({
114
+ relationTo: types.string(),
115
+ value: types.string(),
116
+ });
117
+
118
+ export function documentRefFromJSON(
119
+ jsonString: string,
120
+ ): SafeParseResult<DocumentRef, SDKValidationError> {
121
+ return safeParse(
122
+ jsonString,
123
+ (x) => DocumentRef$inboundSchema.parse(JSON.parse(x)),
124
+ `Failed to parse 'DocumentRef' from JSON`,
125
+ );
126
+ }
127
+
128
+ /** @internal */
129
+ export const VersionStatus$inboundSchema: z.ZodMiniType<
130
+ VersionStatus,
131
+ unknown
132
+ > = openEnums.inboundSchema(VersionStatus);
133
+
134
+ /** @internal */
135
+ export const AcceptedBy$inboundSchema: z.ZodMiniType<AcceptedBy, unknown> =
136
+ openEnums.inboundSchema(AcceptedBy);
137
+
138
+ /** @internal */
139
+ export const DocumentVersion$inboundSchema: z.ZodMiniType<
140
+ DocumentVersion,
141
+ unknown
142
+ > = z.object({
143
+ id: types.string(),
144
+ documentType: DocumentType$inboundSchema,
145
+ documentId: types.nullable(types.string()),
146
+ documentRef: types.nullable(z.lazy(() => DocumentRef$inboundSchema)),
147
+ versionNumber: types.number(),
148
+ subVersionNumber: types.number(),
149
+ versionStatus: VersionStatus$inboundSchema,
150
+ contentHash: types.string(),
151
+ currency: types.string(),
152
+ issuedAt: types.nullable(types.date()),
153
+ viewedAt: types.nullable(types.date()),
154
+ acceptedAt: types.nullable(types.date()),
155
+ acceptedBy: types.nullable(AcceptedBy$inboundSchema),
156
+ supersededAt: types.nullable(types.date()),
157
+ supersededByVersionId: types.nullable(types.string()),
158
+ voidedAt: types.nullable(types.date()),
159
+ quoteConvertedAt: types.nullable(types.date()),
160
+ expiresAt: types.nullable(types.date()),
161
+ engagementProjectId: types.nullable(types.string()),
162
+ parentVersionId: types.nullable(types.string()),
163
+ createdAt: types.date(),
164
+ updatedAt: types.date(),
165
+ });
166
+
167
+ export function documentVersionFromJSON(
168
+ jsonString: string,
169
+ ): SafeParseResult<DocumentVersion, SDKValidationError> {
170
+ return safeParse(
171
+ jsonString,
172
+ (x) => DocumentVersion$inboundSchema.parse(JSON.parse(x)),
173
+ `Failed to parse 'DocumentVersion' from JSON`,
174
+ );
175
+ }
@@ -15,6 +15,7 @@ export * from "./client-create.js";
15
15
  export * from "./client-document-list.js";
16
16
  export * from "./client-document.js";
17
17
  export * from "./client-list.js";
18
+ export * from "./client-tax-settings.js";
18
19
  export * from "./client-update.js";
19
20
  export * from "./client.js";
20
21
  export * from "./contact-create.js";
@@ -25,6 +26,8 @@ export * from "./contract-create.js";
25
26
  export * from "./contract-list.js";
26
27
  export * from "./contract-update.js";
27
28
  export * from "./contract.js";
29
+ export * from "./document-version-list.js";
30
+ export * from "./document-version.js";
28
31
  export * from "./form-list.js";
29
32
  export * from "./form-submission-answer.js";
30
33
  export * from "./form-submission-list.js";
@@ -53,6 +53,10 @@ export type Invoice = {
53
53
  * Derived (read-only): true when the invoice is past its due date with a balance still owing (status is sent or partial). Not a stored status.
54
54
  */
55
55
  overdue: boolean;
56
+ /**
57
+ * Read-only: the voided invoice this one was issued to correct (void & reissue). Null otherwise. To find the forward link — the corrected invoice that replaced a given one — list with `?supersedesInvoice={id}`.
58
+ */
59
+ supersedesInvoice: string | null;
56
60
  paymentTerms: string | null;
57
61
  notes: string | null;
58
62
  /**
@@ -95,6 +99,7 @@ export const Invoice$inboundSchema: z.ZodMiniType<Invoice, unknown> = z.object({
95
99
  amountPaid: types.number(),
96
100
  balanceDue: types.number(),
97
101
  overdue: types.boolean(),
102
+ supersedesInvoice: types.nullable(types.string()),
98
103
  paymentTerms: types.nullable(types.string()),
99
104
  notes: types.nullable(types.string()),
100
105
  paidAt: types.nullable(types.date()),
@@ -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 GetDocumentVersionSecurity = {
8
+ apiKey?: string | undefined;
9
+ bearer?: string | undefined;
10
+ };
11
+
12
+ export type GetDocumentVersionRequest = {
13
+ /**
14
+ * UUID v4
15
+ */
16
+ id: string;
17
+ };
18
+
19
+ /** @internal */
20
+ export type GetDocumentVersionSecurity$Outbound = {
21
+ apiKey?: string | undefined;
22
+ bearer?: string | undefined;
23
+ };
24
+
25
+ /** @internal */
26
+ export const GetDocumentVersionSecurity$outboundSchema: z.ZodMiniType<
27
+ GetDocumentVersionSecurity$Outbound,
28
+ GetDocumentVersionSecurity
29
+ > = z.object({
30
+ apiKey: z.optional(z.string()),
31
+ bearer: z.optional(z.string()),
32
+ });
33
+
34
+ export function getDocumentVersionSecurityToJSON(
35
+ getDocumentVersionSecurity: GetDocumentVersionSecurity,
36
+ ): string {
37
+ return JSON.stringify(
38
+ GetDocumentVersionSecurity$outboundSchema.parse(getDocumentVersionSecurity),
39
+ );
40
+ }
41
+
42
+ /** @internal */
43
+ export type GetDocumentVersionRequest$Outbound = {
44
+ id: string;
45
+ };
46
+
47
+ /** @internal */
48
+ export const GetDocumentVersionRequest$outboundSchema: z.ZodMiniType<
49
+ GetDocumentVersionRequest$Outbound,
50
+ GetDocumentVersionRequest
51
+ > = z.object({
52
+ id: z.string(),
53
+ });
54
+
55
+ export function getDocumentVersionRequestToJSON(
56
+ getDocumentVersionRequest: GetDocumentVersionRequest,
57
+ ): string {
58
+ return JSON.stringify(
59
+ GetDocumentVersionRequest$outboundSchema.parse(getDocumentVersionRequest),
60
+ );
61
+ }
@@ -31,6 +31,7 @@ export * from "./get-client-document.js";
31
31
  export * from "./get-client.js";
32
32
  export * from "./get-contact.js";
33
33
  export * from "./get-contract.js";
34
+ export * from "./get-document-version.js";
34
35
  export * from "./get-form-submission.js";
35
36
  export * from "./get-form.js";
36
37
  export * from "./get-invoice.js";
@@ -47,6 +48,7 @@ export * from "./list-client-documents.js";
47
48
  export * from "./list-clients.js";
48
49
  export * from "./list-contacts.js";
49
50
  export * from "./list-contracts.js";
51
+ export * from "./list-document-versions.js";
50
52
  export * from "./list-form-submissions.js";
51
53
  export * from "./list-forms.js";
52
54
  export * from "./list-invoices.js";
@@ -0,0 +1,132 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdk-validation-error.js";
11
+ import * as models from "../index.js";
12
+
13
+ export type ListDocumentVersionsSecurity = {
14
+ apiKey?: string | undefined;
15
+ bearer?: string | undefined;
16
+ };
17
+
18
+ export const DocumentType = {
19
+ SmartFile: "smart-file",
20
+ Invoice: "invoice",
21
+ StandaloneContract: "standalone-contract",
22
+ } as const;
23
+ export type DocumentType = ClosedEnum<typeof DocumentType>;
24
+
25
+ export type ListDocumentVersionsRequest = {
26
+ page?: number | undefined;
27
+ pageSize?: number | undefined;
28
+ documentType?: DocumentType | undefined;
29
+ /**
30
+ * Filter to a smart-file (client-document) id.
31
+ */
32
+ documentId?: string | undefined;
33
+ /**
34
+ * Filter to an invoice id.
35
+ */
36
+ invoiceId?: string | undefined;
37
+ /**
38
+ * Filter to a standalone-contract id.
39
+ */
40
+ contractId?: string | undefined;
41
+ };
42
+
43
+ export type ListDocumentVersionsResponse = {
44
+ result: models.DocumentVersionList;
45
+ };
46
+
47
+ /** @internal */
48
+ export type ListDocumentVersionsSecurity$Outbound = {
49
+ apiKey?: string | undefined;
50
+ bearer?: string | undefined;
51
+ };
52
+
53
+ /** @internal */
54
+ export const ListDocumentVersionsSecurity$outboundSchema: z.ZodMiniType<
55
+ ListDocumentVersionsSecurity$Outbound,
56
+ ListDocumentVersionsSecurity
57
+ > = z.object({
58
+ apiKey: z.optional(z.string()),
59
+ bearer: z.optional(z.string()),
60
+ });
61
+
62
+ export function listDocumentVersionsSecurityToJSON(
63
+ listDocumentVersionsSecurity: ListDocumentVersionsSecurity,
64
+ ): string {
65
+ return JSON.stringify(
66
+ ListDocumentVersionsSecurity$outboundSchema.parse(
67
+ listDocumentVersionsSecurity,
68
+ ),
69
+ );
70
+ }
71
+
72
+ /** @internal */
73
+ export const DocumentType$outboundSchema: z.ZodMiniEnum<typeof DocumentType> = z
74
+ .enum(DocumentType);
75
+
76
+ /** @internal */
77
+ export type ListDocumentVersionsRequest$Outbound = {
78
+ page: number;
79
+ pageSize: number;
80
+ documentType?: string | undefined;
81
+ documentId?: string | undefined;
82
+ invoiceId?: string | undefined;
83
+ contractId?: string | undefined;
84
+ };
85
+
86
+ /** @internal */
87
+ export const ListDocumentVersionsRequest$outboundSchema: z.ZodMiniType<
88
+ ListDocumentVersionsRequest$Outbound,
89
+ ListDocumentVersionsRequest
90
+ > = z.object({
91
+ page: z._default(z.int(), 1),
92
+ pageSize: z._default(z.int(), 25),
93
+ documentType: z.optional(DocumentType$outboundSchema),
94
+ documentId: z.optional(z.string()),
95
+ invoiceId: z.optional(z.string()),
96
+ contractId: z.optional(z.string()),
97
+ });
98
+
99
+ export function listDocumentVersionsRequestToJSON(
100
+ listDocumentVersionsRequest: ListDocumentVersionsRequest,
101
+ ): string {
102
+ return JSON.stringify(
103
+ ListDocumentVersionsRequest$outboundSchema.parse(
104
+ listDocumentVersionsRequest,
105
+ ),
106
+ );
107
+ }
108
+
109
+ /** @internal */
110
+ export const ListDocumentVersionsResponse$inboundSchema: z.ZodMiniType<
111
+ ListDocumentVersionsResponse,
112
+ unknown
113
+ > = z.pipe(
114
+ z.object({
115
+ Result: models.DocumentVersionList$inboundSchema,
116
+ }),
117
+ z.transform((v) => {
118
+ return remap$(v, {
119
+ "Result": "result",
120
+ });
121
+ }),
122
+ );
123
+
124
+ export function listDocumentVersionsResponseFromJSON(
125
+ jsonString: string,
126
+ ): SafeParseResult<ListDocumentVersionsResponse, SDKValidationError> {
127
+ return safeParse(
128
+ jsonString,
129
+ (x) => ListDocumentVersionsResponse$inboundSchema.parse(JSON.parse(x)),
130
+ `Failed to parse 'ListDocumentVersionsResponse' from JSON`,
131
+ );
132
+ }
@@ -48,6 +48,10 @@ export type ListInvoicesRequest = {
48
48
  * Filter by the derived overdue condition. `true` → sent/partial invoices past their due date; `false` → everything else. (Replaces the removed `status=overdue` filter.)
49
49
  */
50
50
  overdue?: Overdue | undefined;
51
+ /**
52
+ * Return the invoice that supersedes (replaces) the given invoice id — the forward void→reissue link.
53
+ */
54
+ supersedesInvoice?: string | undefined;
51
55
  };
52
56
 
53
57
  export type ListInvoicesResponse = {
@@ -94,6 +98,7 @@ export type ListInvoicesRequest$Outbound = {
94
98
  clientId?: string | undefined;
95
99
  status?: string | undefined;
96
100
  overdue?: string | undefined;
101
+ supersedesInvoice?: string | undefined;
97
102
  };
98
103
 
99
104
  /** @internal */
@@ -106,6 +111,7 @@ export const ListInvoicesRequest$outboundSchema: z.ZodMiniType<
106
111
  clientId: z.optional(z.string()),
107
112
  status: z.optional(ListInvoicesStatus$outboundSchema),
108
113
  overdue: z.optional(Overdue$outboundSchema),
114
+ supersedesInvoice: z.optional(z.string()),
109
115
  });
110
116
 
111
117
  export function listInvoicesRequestToJSON(
@@ -0,0 +1,50 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { documentVersionsGet } from "../funcs/document-versions-get.js";
6
+ import { documentVersionsList } from "../funcs/document-versions-list.js";
7
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
8
+ import * as models from "../models/index.js";
9
+ import * as operations from "../models/operations/index.js";
10
+ import { unwrapAsync } from "../types/fp.js";
11
+ import { PageIterator, unwrapResultIterator } from "../types/operations.js";
12
+
13
+ export class DocumentVersions extends ClientSDK {
14
+ /**
15
+ * List document versions
16
+ *
17
+ * @remarks
18
+ * Read-only audit trail of issued document versions across smart-files, invoices, and standalone contracts. Checkpoints (internal draft edit-history) are never returned. Frozen content and client access tokens are not exposed.
19
+ */
20
+ async list(
21
+ security: operations.ListDocumentVersionsSecurity,
22
+ request?: operations.ListDocumentVersionsRequest | undefined,
23
+ options?: RequestOptions,
24
+ ): Promise<
25
+ PageIterator<operations.ListDocumentVersionsResponse, { page: number }>
26
+ > {
27
+ return unwrapResultIterator(documentVersionsList(
28
+ this,
29
+ security,
30
+ request,
31
+ options,
32
+ ));
33
+ }
34
+
35
+ /**
36
+ * Get a document version
37
+ */
38
+ async get(
39
+ security: operations.GetDocumentVersionSecurity,
40
+ request: operations.GetDocumentVersionRequest,
41
+ options?: RequestOptions,
42
+ ): Promise<models.DocumentVersion> {
43
+ return unwrapAsync(documentVersionsGet(
44
+ this,
45
+ security,
46
+ request,
47
+ options,
48
+ ));
49
+ }
50
+ }
package/src/sdk/sdk.ts CHANGED
@@ -8,6 +8,7 @@ import { CatalogItems } from "./catalog-items.js";
8
8
  import { Clients } from "./clients.js";
9
9
  import { Contacts } from "./contacts.js";
10
10
  import { Contracts } from "./contracts.js";
11
+ import { DocumentVersions } from "./document-versions.js";
11
12
  import { FormSubmissions } from "./form-submissions.js";
12
13
  import { FormsAndAgreements } from "./forms-and-agreements.js";
13
14
  import { Forms } from "./forms.js";
@@ -51,6 +52,11 @@ export class ClientCasa extends ClientSDK {
51
52
  return (this._formsAndAgreements ??= new FormsAndAgreements(this._options));
52
53
  }
53
54
 
55
+ private _documentVersions?: DocumentVersions;
56
+ get documentVersions(): DocumentVersions {
57
+ return (this._documentVersions ??= new DocumentVersions(this._options));
58
+ }
59
+
54
60
  private _forms?: Forms;
55
61
  get forms(): Forms {
56
62
  return (this._forms ??= new Forms(this._options));