@factify/sdk 0.3.15-rc.1 → 0.3.15-rc.3

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 (107) hide show
  1. package/README.md +7 -0
  2. package/dist/commonjs/funcs/documentsGetDocumentQuota.d.ts +18 -0
  3. package/dist/commonjs/funcs/documentsGetDocumentQuota.d.ts.map +1 -0
  4. package/dist/commonjs/funcs/documentsGetDocumentQuota.js +110 -0
  5. package/dist/commonjs/funcs/documentsGetDocumentQuota.js.map +1 -0
  6. package/dist/commonjs/funcs/userPreferencesGetUserPreferences.d.ts +18 -0
  7. package/dist/commonjs/funcs/userPreferencesGetUserPreferences.d.ts.map +1 -0
  8. package/dist/commonjs/funcs/userPreferencesGetUserPreferences.js +110 -0
  9. package/dist/commonjs/funcs/userPreferencesGetUserPreferences.js.map +1 -0
  10. package/dist/commonjs/lib/config.d.ts +3 -3
  11. package/dist/commonjs/lib/config.js +3 -3
  12. package/dist/commonjs/models/components/getdocumentquotaresponse.d.ts +30 -0
  13. package/dist/commonjs/models/components/getdocumentquotaresponse.d.ts.map +1 -0
  14. package/dist/commonjs/models/components/getdocumentquotaresponse.js +53 -0
  15. package/dist/commonjs/models/components/getdocumentquotaresponse.js.map +1 -0
  16. package/dist/commonjs/models/components/getuserpreferencesresponse.d.ts +20 -0
  17. package/dist/commonjs/models/components/getuserpreferencesresponse.d.ts.map +1 -0
  18. package/dist/commonjs/models/components/getuserpreferencesresponse.js +58 -0
  19. package/dist/commonjs/models/components/getuserpreferencesresponse.js.map +1 -0
  20. package/dist/commonjs/models/components/index.d.ts +2 -0
  21. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  22. package/dist/commonjs/models/components/index.js +2 -0
  23. package/dist/commonjs/models/components/index.js.map +1 -1
  24. package/dist/commonjs/models/operations/getdocumentquota.d.ts +14 -0
  25. package/dist/commonjs/models/operations/getdocumentquota.d.ts.map +1 -0
  26. package/dist/commonjs/models/operations/getdocumentquota.js +58 -0
  27. package/dist/commonjs/models/operations/getdocumentquota.js.map +1 -0
  28. package/dist/commonjs/models/operations/getuserpreferences.d.ts +14 -0
  29. package/dist/commonjs/models/operations/getuserpreferences.d.ts.map +1 -0
  30. package/dist/commonjs/models/operations/getuserpreferences.js +58 -0
  31. package/dist/commonjs/models/operations/getuserpreferences.js.map +1 -0
  32. package/dist/commonjs/models/operations/index.d.ts +2 -0
  33. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  34. package/dist/commonjs/models/operations/index.js +2 -0
  35. package/dist/commonjs/models/operations/index.js.map +1 -1
  36. package/dist/commonjs/sdk/documents.d.ts +7 -0
  37. package/dist/commonjs/sdk/documents.d.ts.map +1 -1
  38. package/dist/commonjs/sdk/documents.js +10 -0
  39. package/dist/commonjs/sdk/documents.js.map +1 -1
  40. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  41. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  42. package/dist/commonjs/sdk/sdk.js +4 -0
  43. package/dist/commonjs/sdk/sdk.js.map +1 -1
  44. package/dist/commonjs/sdk/userpreferences.d.ts +12 -0
  45. package/dist/commonjs/sdk/userpreferences.d.ts.map +1 -0
  46. package/dist/commonjs/sdk/userpreferences.js +22 -0
  47. package/dist/commonjs/sdk/userpreferences.js.map +1 -0
  48. package/dist/esm/funcs/documentsGetDocumentQuota.d.ts +18 -0
  49. package/dist/esm/funcs/documentsGetDocumentQuota.d.ts.map +1 -0
  50. package/dist/esm/funcs/documentsGetDocumentQuota.js +74 -0
  51. package/dist/esm/funcs/documentsGetDocumentQuota.js.map +1 -0
  52. package/dist/esm/funcs/userPreferencesGetUserPreferences.d.ts +18 -0
  53. package/dist/esm/funcs/userPreferencesGetUserPreferences.d.ts.map +1 -0
  54. package/dist/esm/funcs/userPreferencesGetUserPreferences.js +74 -0
  55. package/dist/esm/funcs/userPreferencesGetUserPreferences.js.map +1 -0
  56. package/dist/esm/lib/config.d.ts +3 -3
  57. package/dist/esm/lib/config.js +3 -3
  58. package/dist/esm/models/components/getdocumentquotaresponse.d.ts +30 -0
  59. package/dist/esm/models/components/getdocumentquotaresponse.d.ts.map +1 -0
  60. package/dist/esm/models/components/getdocumentquotaresponse.js +16 -0
  61. package/dist/esm/models/components/getdocumentquotaresponse.js.map +1 -0
  62. package/dist/esm/models/components/getuserpreferencesresponse.d.ts +20 -0
  63. package/dist/esm/models/components/getuserpreferencesresponse.d.ts.map +1 -0
  64. package/dist/esm/models/components/getuserpreferencesresponse.js +21 -0
  65. package/dist/esm/models/components/getuserpreferencesresponse.js.map +1 -0
  66. package/dist/esm/models/components/index.d.ts +2 -0
  67. package/dist/esm/models/components/index.d.ts.map +1 -1
  68. package/dist/esm/models/components/index.js +2 -0
  69. package/dist/esm/models/components/index.js.map +1 -1
  70. package/dist/esm/models/operations/getdocumentquota.d.ts +14 -0
  71. package/dist/esm/models/operations/getdocumentquota.d.ts.map +1 -0
  72. package/dist/esm/models/operations/getdocumentquota.js +21 -0
  73. package/dist/esm/models/operations/getdocumentquota.js.map +1 -0
  74. package/dist/esm/models/operations/getuserpreferences.d.ts +14 -0
  75. package/dist/esm/models/operations/getuserpreferences.d.ts.map +1 -0
  76. package/dist/esm/models/operations/getuserpreferences.js +21 -0
  77. package/dist/esm/models/operations/getuserpreferences.js.map +1 -0
  78. package/dist/esm/models/operations/index.d.ts +2 -0
  79. package/dist/esm/models/operations/index.d.ts.map +1 -1
  80. package/dist/esm/models/operations/index.js +2 -0
  81. package/dist/esm/models/operations/index.js.map +1 -1
  82. package/dist/esm/sdk/documents.d.ts +7 -0
  83. package/dist/esm/sdk/documents.d.ts.map +1 -1
  84. package/dist/esm/sdk/documents.js +10 -0
  85. package/dist/esm/sdk/documents.js.map +1 -1
  86. package/dist/esm/sdk/sdk.d.ts +3 -0
  87. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  88. package/dist/esm/sdk/sdk.js +4 -0
  89. package/dist/esm/sdk/sdk.js.map +1 -1
  90. package/dist/esm/sdk/userpreferences.d.ts +12 -0
  91. package/dist/esm/sdk/userpreferences.d.ts.map +1 -0
  92. package/dist/esm/sdk/userpreferences.js +18 -0
  93. package/dist/esm/sdk/userpreferences.js.map +1 -0
  94. package/jsr.json +1 -1
  95. package/package.json +1 -1
  96. package/src/funcs/documentsGetDocumentQuota.ts +155 -0
  97. package/src/funcs/userPreferencesGetUserPreferences.ts +155 -0
  98. package/src/lib/config.ts +3 -3
  99. package/src/models/components/getdocumentquotaresponse.ts +53 -0
  100. package/src/models/components/getuserpreferencesresponse.ts +51 -0
  101. package/src/models/components/index.ts +2 -0
  102. package/src/models/operations/getdocumentquota.ts +42 -0
  103. package/src/models/operations/getuserpreferences.ts +42 -0
  104. package/src/models/operations/index.ts +2 -0
  105. package/src/sdk/documents.ts +16 -0
  106. package/src/sdk/sdk.ts +6 -0
  107. package/src/sdk/userpreferences.ts +25 -0
@@ -0,0 +1,155 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { FactifyCore } from "../core.js";
6
+ import * as M from "../lib/matchers.js";
7
+ import { compactMap } from "../lib/primitives.js";
8
+ import { RequestOptions } from "../lib/sdks.js";
9
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
10
+ import { pathToFunc } from "../lib/url.js";
11
+ import { FactifyError } from "../models/errors/factifyerror.js";
12
+ import {
13
+ ConnectionError,
14
+ InvalidRequestError,
15
+ RequestAbortedError,
16
+ RequestTimeoutError,
17
+ UnexpectedClientError,
18
+ } from "../models/errors/httpclienterrors.js";
19
+ import * as errors from "../models/errors/index.js";
20
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
21
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
22
+ import * as operations from "../models/operations/index.js";
23
+ import { APICall, APIPromise } from "../types/async.js";
24
+ import { Result } from "../types/fp.js";
25
+
26
+ /**
27
+ * Get user preferences
28
+ *
29
+ * @remarks
30
+ * Returns the authenticated user's onboarding preferences. Only available for user accounts, not API keys.
31
+ */
32
+ export function userPreferencesGetUserPreferences(
33
+ client: FactifyCore,
34
+ options?: RequestOptions,
35
+ ): APIPromise<
36
+ Result<
37
+ operations.GetUserPreferencesResponse,
38
+ | errors.ErrorResponse
39
+ | FactifyError
40
+ | ResponseValidationError
41
+ | ConnectionError
42
+ | RequestAbortedError
43
+ | RequestTimeoutError
44
+ | InvalidRequestError
45
+ | UnexpectedClientError
46
+ | SDKValidationError
47
+ >
48
+ > {
49
+ return new APIPromise($do(
50
+ client,
51
+ options,
52
+ ));
53
+ }
54
+
55
+ async function $do(
56
+ client: FactifyCore,
57
+ options?: RequestOptions,
58
+ ): Promise<
59
+ [
60
+ Result<
61
+ operations.GetUserPreferencesResponse,
62
+ | errors.ErrorResponse
63
+ | FactifyError
64
+ | ResponseValidationError
65
+ | ConnectionError
66
+ | RequestAbortedError
67
+ | RequestTimeoutError
68
+ | InvalidRequestError
69
+ | UnexpectedClientError
70
+ | SDKValidationError
71
+ >,
72
+ APICall,
73
+ ]
74
+ > {
75
+ const path = pathToFunc("/v1beta/user-preferences")();
76
+
77
+ const headers = new Headers(compactMap({
78
+ Accept: "application/json",
79
+ }));
80
+
81
+ const secConfig = await extractSecurity(client._options.bearerAuth);
82
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
83
+ const requestSecurity = resolveGlobalSecurity(securityInput);
84
+
85
+ const context = {
86
+ options: client._options,
87
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
88
+ operationID: "getUserPreferences",
89
+ oAuth2Scopes: null,
90
+
91
+ resolvedSecurity: requestSecurity,
92
+
93
+ securitySource: client._options.bearerAuth,
94
+ retryConfig: options?.retries
95
+ || client._options.retryConfig
96
+ || { strategy: "none" },
97
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
98
+ };
99
+
100
+ const requestRes = client._createRequest(context, {
101
+ security: requestSecurity,
102
+ method: "GET",
103
+ baseURL: options?.serverURL,
104
+ path: path,
105
+ headers: headers,
106
+ userAgent: client._options.userAgent,
107
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
108
+ }, options);
109
+ if (!requestRes.ok) {
110
+ return [requestRes, { status: "invalid" }];
111
+ }
112
+ const req = requestRes.value;
113
+
114
+ const doResult = await client._do(req, {
115
+ context,
116
+ errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "5XX"],
117
+ retryConfig: context.retryConfig,
118
+ retryCodes: context.retryCodes,
119
+ });
120
+ if (!doResult.ok) {
121
+ return [doResult, { status: "request-error", request: req }];
122
+ }
123
+ const response = doResult.value;
124
+
125
+ const responseFields = {
126
+ HttpMeta: { Response: response, Request: req },
127
+ };
128
+
129
+ const [result] = await M.match<
130
+ operations.GetUserPreferencesResponse,
131
+ | errors.ErrorResponse
132
+ | FactifyError
133
+ | ResponseValidationError
134
+ | ConnectionError
135
+ | RequestAbortedError
136
+ | RequestTimeoutError
137
+ | InvalidRequestError
138
+ | UnexpectedClientError
139
+ | SDKValidationError
140
+ >(
141
+ M.json(200, operations.GetUserPreferencesResponse$inboundSchema, {
142
+ key: "Result",
143
+ }),
144
+ M.jsonErr([400, 401, 403, 404], errors.ErrorResponse$inboundSchema),
145
+ M.jsonErr(429, errors.ErrorResponse$inboundSchema, { hdrs: true }),
146
+ M.jsonErr(500, errors.ErrorResponse$inboundSchema),
147
+ M.fail("4XX"),
148
+ M.fail("5XX"),
149
+ )(response, req, { extraFields: responseFields });
150
+ if (!result.ok) {
151
+ return [result, { status: "complete", request: req, response }];
152
+ }
153
+
154
+ return [result, { status: "complete", request: req, response }];
155
+ }
package/src/lib/config.ts CHANGED
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
65
65
  export const SDK_METADATA = {
66
66
  language: "typescript",
67
67
  openapiDocVersion: "1.0.0",
68
- sdkVersion: "0.3.15-rc.1",
69
- genVersion: "2.855.2",
70
- userAgent: "speakeasy-sdk/typescript 0.3.15-rc.1 2.855.2 1.0.0 @factify/sdk",
68
+ sdkVersion: "0.3.15-rc.3",
69
+ genVersion: "2.859.2",
70
+ userAgent: "speakeasy-sdk/typescript 0.3.15-rc.3 2.859.2 1.0.0 @factify/sdk",
71
71
  } as const;
@@ -0,0 +1,53 @@
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/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * GetDocumentQuotaResponse contains the document quota for the organization.
13
+ */
14
+ export type GetDocumentQuotaResponse = {
15
+ /**
16
+ * Remaining documents that can be created (limit minus used, floored at 0).
17
+ *
18
+ * @remarks
19
+ * When limit is 0 (unlimited), this field is 0 and should be ignored by clients.
20
+ */
21
+ available?: number | undefined;
22
+ /**
23
+ * Maximum documents allowed for this organization.
24
+ *
25
+ * @remarks
26
+ * 0 means unlimited (no quota enforced).
27
+ */
28
+ limit?: number | undefined;
29
+ /**
30
+ * Number of documents counting against quota (excludes demo, includes trashed).
31
+ */
32
+ used?: number | undefined;
33
+ };
34
+
35
+ /** @internal */
36
+ export const GetDocumentQuotaResponse$inboundSchema: z.ZodMiniType<
37
+ GetDocumentQuotaResponse,
38
+ unknown
39
+ > = z.object({
40
+ available: types.optional(types.number()),
41
+ limit: types.optional(types.number()),
42
+ used: types.optional(types.number()),
43
+ });
44
+
45
+ export function getDocumentQuotaResponseFromJSON(
46
+ jsonString: string,
47
+ ): SafeParseResult<GetDocumentQuotaResponse, SDKValidationError> {
48
+ return safeParse(
49
+ jsonString,
50
+ (x) => GetDocumentQuotaResponse$inboundSchema.parse(JSON.parse(x)),
51
+ `Failed to parse 'GetDocumentQuotaResponse' from JSON`,
52
+ );
53
+ }
@@ -0,0 +1,51 @@
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 { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as types from "../../types/primitives.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ /**
13
+ * GetUserPreferencesResponse contains the user's onboarding preferences.
14
+ */
15
+ export type GetUserPreferencesResponse = {
16
+ /**
17
+ * Whether the user has completed the document tour.
18
+ */
19
+ hasCompletedDocumentTour?: boolean | undefined;
20
+ /**
21
+ * Whether the user has completed the hub onboarding flow.
22
+ */
23
+ hasCompletedHubOnboarding?: boolean | undefined;
24
+ };
25
+
26
+ /** @internal */
27
+ export const GetUserPreferencesResponse$inboundSchema: z.ZodMiniType<
28
+ GetUserPreferencesResponse,
29
+ unknown
30
+ > = z.pipe(
31
+ z.object({
32
+ has_completed_document_tour: types.optional(types.boolean()),
33
+ has_completed_hub_onboarding: types.optional(types.boolean()),
34
+ }),
35
+ z.transform((v) => {
36
+ return remap$(v, {
37
+ "has_completed_document_tour": "hasCompletedDocumentTour",
38
+ "has_completed_hub_onboarding": "hasCompletedHubOnboarding",
39
+ });
40
+ }),
41
+ );
42
+
43
+ export function getUserPreferencesResponseFromJSON(
44
+ jsonString: string,
45
+ ): SafeParseResult<GetUserPreferencesResponse, SDKValidationError> {
46
+ return safeParse(
47
+ jsonString,
48
+ (x) => GetUserPreferencesResponse$inboundSchema.parse(JSON.parse(x)),
49
+ `Failed to parse 'GetUserPreferencesResponse' from JSON`,
50
+ );
51
+ }
@@ -30,10 +30,12 @@ export * from "./empty.js";
30
30
  export * from "./errordetail.js";
31
31
  export * from "./errorresponse.js";
32
32
  export * from "./generateentrypageresponse.js";
33
+ export * from "./getdocumentquotaresponse.js";
33
34
  export * from "./getdocumentresponse.js";
34
35
  export * from "./getorganizationquotaresponse.js";
35
36
  export * from "./getorganizationresponse.js";
36
37
  export * from "./getusagehistoryresponse.js";
38
+ export * from "./getuserpreferencesresponse.js";
37
39
  export * from "./listapikeyquotasresponse.js";
38
40
  export * from "./listapikeysresponse.js";
39
41
  export * from "./listdocumentpoliciesresponse.js";
@@ -0,0 +1,42 @@
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 { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type GetDocumentQuotaResponse = {
13
+ headers: { [k: string]: Array<string> };
14
+ result: components.GetDocumentQuotaResponse;
15
+ };
16
+
17
+ /** @internal */
18
+ export const GetDocumentQuotaResponse$inboundSchema: z.ZodMiniType<
19
+ GetDocumentQuotaResponse,
20
+ unknown
21
+ > = z.pipe(
22
+ z.object({
23
+ Headers: z._default(z.record(z.string(), z.array(z.string())), {}),
24
+ Result: components.GetDocumentQuotaResponse$inboundSchema,
25
+ }),
26
+ z.transform((v) => {
27
+ return remap$(v, {
28
+ "Headers": "headers",
29
+ "Result": "result",
30
+ });
31
+ }),
32
+ );
33
+
34
+ export function getDocumentQuotaResponseFromJSON(
35
+ jsonString: string,
36
+ ): SafeParseResult<GetDocumentQuotaResponse, SDKValidationError> {
37
+ return safeParse(
38
+ jsonString,
39
+ (x) => GetDocumentQuotaResponse$inboundSchema.parse(JSON.parse(x)),
40
+ `Failed to parse 'GetDocumentQuotaResponse' from JSON`,
41
+ );
42
+ }
@@ -0,0 +1,42 @@
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 { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type GetUserPreferencesResponse = {
13
+ headers: { [k: string]: Array<string> };
14
+ result: components.GetUserPreferencesResponse;
15
+ };
16
+
17
+ /** @internal */
18
+ export const GetUserPreferencesResponse$inboundSchema: z.ZodMiniType<
19
+ GetUserPreferencesResponse,
20
+ unknown
21
+ > = z.pipe(
22
+ z.object({
23
+ Headers: z._default(z.record(z.string(), z.array(z.string())), {}),
24
+ Result: components.GetUserPreferencesResponse$inboundSchema,
25
+ }),
26
+ z.transform((v) => {
27
+ return remap$(v, {
28
+ "Headers": "headers",
29
+ "Result": "result",
30
+ });
31
+ }),
32
+ );
33
+
34
+ export function getUserPreferencesResponseFromJSON(
35
+ jsonString: string,
36
+ ): SafeParseResult<GetUserPreferencesResponse, SDKValidationError> {
37
+ return safeParse(
38
+ jsonString,
39
+ (x) => GetUserPreferencesResponse$inboundSchema.parse(JSON.parse(x)),
40
+ `Failed to parse 'GetUserPreferencesResponse' from JSON`,
41
+ );
42
+ }
@@ -14,9 +14,11 @@ export * from "./deleteapikeyquota.js";
14
14
  export * from "./detachdocumentpolicy.js";
15
15
  export * from "./generatedocumententrypage.js";
16
16
  export * from "./getdocument.js";
17
+ export * from "./getdocumentquota.js";
17
18
  export * from "./getorganization.js";
18
19
  export * from "./getorganizationquota.js";
19
20
  export * from "./getusagehistory.js";
21
+ export * from "./getuserpreferences.js";
20
22
  export * from "./getversion.js";
21
23
  export * from "./listapikeyquotas.js";
22
24
  export * from "./listapikeys.js";
@@ -4,6 +4,7 @@
4
4
 
5
5
  import { documentsCreate } from "../funcs/documentsCreate.js";
6
6
  import { documentsGet } from "../funcs/documentsGet.js";
7
+ import { documentsGetDocumentQuota } from "../funcs/documentsGetDocumentQuota.js";
7
8
  import { documentsList } from "../funcs/documentsList.js";
8
9
  import { documentsUpdate } from "../funcs/documentsUpdate.js";
9
10
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
@@ -49,6 +50,21 @@ export class Documents extends ClientSDK {
49
50
  ));
50
51
  }
51
52
 
53
+ /**
54
+ * Get document quota
55
+ *
56
+ * @remarks
57
+ * Returns the document quota status for the authenticated user's organization, including the number of documents used, the configured limit, and remaining capacity.
58
+ */
59
+ async getDocumentQuota(
60
+ options?: RequestOptions,
61
+ ): Promise<operations.GetDocumentQuotaResponse> {
62
+ return unwrapAsync(documentsGetDocumentQuota(
63
+ this,
64
+ options,
65
+ ));
66
+ }
67
+
52
68
  /**
53
69
  * Retrieve a document
54
70
  *
package/src/sdk/sdk.ts CHANGED
@@ -10,6 +10,7 @@ import { Organizations } from "./organizations.js";
10
10
  import { Policies } from "./policies.js";
11
11
  import { Quotas } from "./quotas.js";
12
12
  import { Usage } from "./usage.js";
13
+ import { UserPreferences } from "./userpreferences.js";
13
14
  import { Versions } from "./versions.js";
14
15
 
15
16
  export class Factify extends ClientSDK {
@@ -52,4 +53,9 @@ export class Factify extends ClientSDK {
52
53
  get usage(): Usage {
53
54
  return (this._usage ??= new Usage(this._options));
54
55
  }
56
+
57
+ private _userPreferences?: UserPreferences;
58
+ get userPreferences(): UserPreferences {
59
+ return (this._userPreferences ??= new UserPreferences(this._options));
60
+ }
55
61
  }
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { userPreferencesGetUserPreferences } from "../funcs/userPreferencesGetUserPreferences.js";
6
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
7
+ import * as operations from "../models/operations/index.js";
8
+ import { unwrapAsync } from "../types/fp.js";
9
+
10
+ export class UserPreferences extends ClientSDK {
11
+ /**
12
+ * Get user preferences
13
+ *
14
+ * @remarks
15
+ * Returns the authenticated user's onboarding preferences. Only available for user accounts, not API keys.
16
+ */
17
+ async getUserPreferences(
18
+ options?: RequestOptions,
19
+ ): Promise<operations.GetUserPreferencesResponse> {
20
+ return unwrapAsync(userPreferencesGetUserPreferences(
21
+ this,
22
+ options,
23
+ ));
24
+ }
25
+ }