@functional-systems/lambdadb 0.3.2 → 0.3.4-dev.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.
- package/README.md +44 -2
- package/dist/commonjs/client.d.ts +6 -6
- package/dist/commonjs/client.d.ts.map +1 -1
- package/dist/commonjs/client.js +33 -9
- package/dist/commonjs/client.js.map +1 -1
- package/dist/commonjs/funcs/collectionsDocsBulkUpsert.d.ts +1 -1
- package/dist/commonjs/funcs/collectionsDocsBulkUpsert.js +1 -1
- package/dist/commonjs/funcs/collectionsDocsGetBulkUpsert.d.ts +2 -2
- package/dist/commonjs/funcs/collectionsDocsGetBulkUpsert.d.ts.map +1 -1
- package/dist/commonjs/funcs/collectionsDocsGetBulkUpsert.js +3 -3
- package/dist/commonjs/funcs/collectionsDocsGetBulkUpsert.js.map +1 -1
- package/dist/commonjs/lib/matchers.d.ts.map +1 -1
- package/dist/commonjs/lib/matchers.js +17 -1
- package/dist/commonjs/lib/matchers.js.map +1 -1
- package/dist/commonjs/lib/schemas.d.ts +6 -0
- package/dist/commonjs/lib/schemas.d.ts.map +1 -1
- package/dist/commonjs/lib/schemas.js +9 -0
- package/dist/commonjs/lib/schemas.js.map +1 -1
- package/dist/commonjs/models/collectionresponse.js +4 -4
- package/dist/commonjs/models/collectionresponse.js.map +1 -1
- package/dist/commonjs/models/errors/badrequesterror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/badrequesterror.js +2 -1
- package/dist/commonjs/models/errors/badrequesterror.js.map +1 -1
- package/dist/commonjs/models/errors/internalservererror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/internalservererror.js +2 -1
- package/dist/commonjs/models/errors/internalservererror.js.map +1 -1
- package/dist/commonjs/models/errors/resourcealreadyexistserror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/resourcealreadyexistserror.js +2 -1
- package/dist/commonjs/models/errors/resourcealreadyexistserror.js.map +1 -1
- package/dist/commonjs/models/errors/resourcenotfounderror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/resourcenotfounderror.js +2 -1
- package/dist/commonjs/models/errors/resourcenotfounderror.js.map +1 -1
- package/dist/commonjs/models/errors/toomanyrequestserror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/toomanyrequestserror.js +2 -1
- package/dist/commonjs/models/errors/toomanyrequestserror.js.map +1 -1
- package/dist/commonjs/models/errors/unauthenticatederror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/unauthenticatederror.js +2 -1
- package/dist/commonjs/models/errors/unauthenticatederror.js.map +1 -1
- package/dist/commonjs/models/indexconfigsunion.d.ts +76 -4
- package/dist/commonjs/models/indexconfigsunion.d.ts.map +1 -1
- package/dist/commonjs/models/indexconfigsunion.js +58 -3
- package/dist/commonjs/models/indexconfigsunion.js.map +1 -1
- package/dist/commonjs/models/operations/fetchdocs.js +1 -1
- package/dist/commonjs/models/operations/fetchdocs.js.map +1 -1
- package/dist/commonjs/models/operations/getbulkupsertdocs.js +3 -3
- package/dist/commonjs/models/operations/getbulkupsertdocs.js.map +1 -1
- package/dist/commonjs/models/operations/listcollections.js +1 -1
- package/dist/commonjs/models/operations/listcollections.js.map +1 -1
- package/dist/commonjs/models/operations/listdocs.js +2 -2
- package/dist/commonjs/models/operations/listdocs.js.map +1 -1
- package/dist/commonjs/models/operations/querycollection.d.ts +1 -1
- package/dist/commonjs/models/operations/querycollection.js +3 -3
- package/dist/commonjs/models/operations/querycollection.js.map +1 -1
- package/dist/commonjs/models/operations/updatedocs.d.ts +1 -1
- package/dist/commonjs/models/operations/upsertdocs.d.ts +1 -1
- package/dist/commonjs/models/partitionconfig.js +3 -3
- package/dist/commonjs/models/partitionconfig.js.map +1 -1
- package/dist/commonjs/sdk/docs.d.ts +2 -2
- package/dist/commonjs/sdk/docs.js +2 -2
- package/dist/commonjs/types/errors.d.ts +1 -1
- package/dist/commonjs/types/errors.d.ts.map +1 -1
- package/dist/commonjs/types/public.d.ts +1 -1
- package/dist/commonjs/types/public.d.ts.map +1 -1
- package/dist/commonjs/types/public.js.map +1 -1
- package/dist/esm/client.d.ts +6 -6
- package/dist/esm/client.d.ts.map +1 -1
- package/dist/esm/client.js +33 -9
- package/dist/esm/client.js.map +1 -1
- package/dist/esm/funcs/collectionsDocsBulkUpsert.d.ts +1 -1
- package/dist/esm/funcs/collectionsDocsBulkUpsert.js +1 -1
- package/dist/esm/funcs/collectionsDocsGetBulkUpsert.d.ts +2 -2
- package/dist/esm/funcs/collectionsDocsGetBulkUpsert.d.ts.map +1 -1
- package/dist/esm/funcs/collectionsDocsGetBulkUpsert.js +3 -3
- package/dist/esm/funcs/collectionsDocsGetBulkUpsert.js.map +1 -1
- package/dist/esm/lib/matchers.d.ts.map +1 -1
- package/dist/esm/lib/matchers.js +17 -1
- package/dist/esm/lib/matchers.js.map +1 -1
- package/dist/esm/lib/schemas.d.ts +6 -0
- package/dist/esm/lib/schemas.d.ts.map +1 -1
- package/dist/esm/lib/schemas.js +9 -1
- package/dist/esm/lib/schemas.js.map +1 -1
- package/dist/esm/models/collectionresponse.js +5 -5
- package/dist/esm/models/collectionresponse.js.map +1 -1
- package/dist/esm/models/errors/badrequesterror.d.ts.map +1 -1
- package/dist/esm/models/errors/badrequesterror.js +2 -1
- package/dist/esm/models/errors/badrequesterror.js.map +1 -1
- package/dist/esm/models/errors/internalservererror.d.ts.map +1 -1
- package/dist/esm/models/errors/internalservererror.js +2 -1
- package/dist/esm/models/errors/internalservererror.js.map +1 -1
- package/dist/esm/models/errors/resourcealreadyexistserror.d.ts.map +1 -1
- package/dist/esm/models/errors/resourcealreadyexistserror.js +2 -1
- package/dist/esm/models/errors/resourcealreadyexistserror.js.map +1 -1
- package/dist/esm/models/errors/resourcenotfounderror.d.ts.map +1 -1
- package/dist/esm/models/errors/resourcenotfounderror.js +2 -1
- package/dist/esm/models/errors/resourcenotfounderror.js.map +1 -1
- package/dist/esm/models/errors/toomanyrequestserror.d.ts.map +1 -1
- package/dist/esm/models/errors/toomanyrequestserror.js +2 -1
- package/dist/esm/models/errors/toomanyrequestserror.js.map +1 -1
- package/dist/esm/models/errors/unauthenticatederror.d.ts.map +1 -1
- package/dist/esm/models/errors/unauthenticatederror.js +2 -1
- package/dist/esm/models/errors/unauthenticatederror.js.map +1 -1
- package/dist/esm/models/indexconfigsunion.d.ts +76 -4
- package/dist/esm/models/indexconfigsunion.d.ts.map +1 -1
- package/dist/esm/models/indexconfigsunion.js +54 -3
- package/dist/esm/models/indexconfigsunion.js.map +1 -1
- package/dist/esm/models/operations/fetchdocs.js +2 -2
- package/dist/esm/models/operations/fetchdocs.js.map +1 -1
- package/dist/esm/models/operations/getbulkupsertdocs.js +4 -4
- package/dist/esm/models/operations/getbulkupsertdocs.js.map +1 -1
- package/dist/esm/models/operations/listcollections.js +2 -2
- package/dist/esm/models/operations/listcollections.js.map +1 -1
- package/dist/esm/models/operations/listdocs.js +3 -3
- package/dist/esm/models/operations/listdocs.js.map +1 -1
- package/dist/esm/models/operations/querycollection.d.ts +1 -1
- package/dist/esm/models/operations/querycollection.js +4 -4
- package/dist/esm/models/operations/querycollection.js.map +1 -1
- package/dist/esm/models/operations/updatedocs.d.ts +1 -1
- package/dist/esm/models/operations/upsertdocs.d.ts +1 -1
- package/dist/esm/models/partitionconfig.js +4 -4
- package/dist/esm/models/partitionconfig.js.map +1 -1
- package/dist/esm/sdk/docs.d.ts +2 -2
- package/dist/esm/sdk/docs.js +2 -2
- package/dist/esm/types/errors.d.ts +1 -1
- package/dist/esm/types/errors.d.ts.map +1 -1
- package/dist/esm/types/public.d.ts +1 -1
- package/dist/esm/types/public.d.ts.map +1 -1
- package/dist/esm/types/public.js.map +1 -1
- package/package.json +2 -2
- package/src/client.ts +38 -9
- package/src/funcs/collectionsDocsBulkUpsert.ts +1 -1
- package/src/funcs/collectionsDocsGetBulkUpsert.ts +6 -2
- package/src/lib/matchers.ts +18 -1
- package/src/lib/schemas.ts +12 -0
- package/src/models/collectionresponse.ts +5 -5
- package/src/models/errors/badrequesterror.ts +2 -1
- package/src/models/errors/internalservererror.ts +2 -1
- package/src/models/errors/resourcealreadyexistserror.ts +2 -1
- package/src/models/errors/resourcenotfounderror.ts +2 -1
- package/src/models/errors/toomanyrequestserror.ts +2 -1
- package/src/models/errors/unauthenticatederror.ts +2 -1
- package/src/models/indexconfigsunion.ts +162 -5
- package/src/models/operations/fetchdocs.ts +2 -2
- package/src/models/operations/getbulkupsertdocs.ts +4 -4
- package/src/models/operations/listcollections.ts +2 -2
- package/src/models/operations/listdocs.ts +3 -3
- package/src/models/operations/querycollection.ts +5 -5
- package/src/models/operations/updatedocs.ts +1 -1
- package/src/models/operations/upsertdocs.ts +1 -1
- package/src/models/partitionconfig.ts +4 -4
- package/src/sdk/docs.ts +2 -2
- package/src/types/errors.ts +3 -1
- package/src/types/public.ts +3 -0
- package/test/null-response.test.mjs +73 -0
- package/test/public-api.test.mjs +348 -0
- package/tsconfig.json +1 -2
- package/.devcontainer/devcontainer.json +0 -45
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listdocs.js","sourceRoot":"","sources":["../../../../src/models/operations/listdocs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"listdocs.js","sourceRoot":"","sources":["../../../../src/models/operations/listdocs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAmDlE,gBAAgB;AAChB,MAAM,CAAC,MAAM,8BAA8B,GAIvC,CAAC,CAAC,MAAM,CAAC;IACX,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACjC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC;AAEH,MAAM,UAAU,qBAAqB,CACnC,eAAgC;IAEhC,OAAO,IAAI,CAAC,SAAS,CAAC,8BAA8B,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,yBAAyB,GAIlC,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;CACvB,CAAC,CAAC;AAEH,gBAAgB;AAChB,MAAM,CAAC,MAAM,8BAA8B,GAIvC,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACvB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,yBAAyB,CAAC;IACxC,aAAa,EAAE,eAAe,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC;IACrD,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE;IACzB,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC;CAChD,CAAC,CAAC;AAEH,MAAM,UAAU,wBAAwB,CACtC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,8BAA8B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC1D,8CAA8C,CAC/C,CAAC;AACJ,CAAC"}
|
|
@@ -8,7 +8,7 @@ export type QueryCollectionRequestBody = {
|
|
|
8
8
|
*/
|
|
9
9
|
size?: number | undefined;
|
|
10
10
|
/**
|
|
11
|
-
* Query object.
|
|
11
|
+
* Query object. For managed embedding vector fields, use knn.queryText. For unmanaged vector fields, use knn.queryVector.
|
|
12
12
|
*/
|
|
13
13
|
query: {
|
|
14
14
|
[k: string]: any;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as z from "zod/v3";
|
|
5
5
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
6
|
+
import { nullToUndefined, safeParse } from "../../lib/schemas.js";
|
|
7
7
|
import * as models from "../index.js";
|
|
8
8
|
/** @internal */
|
|
9
9
|
export const QueryCollectionRequestBody$outboundSchema = z.object({
|
|
@@ -33,7 +33,7 @@ export function queryCollectionRequestToJSON(queryCollectionRequest) {
|
|
|
33
33
|
/** @internal */
|
|
34
34
|
export const QueryCollectionDoc$inboundSchema = z.object({
|
|
35
35
|
collection: z.string(),
|
|
36
|
-
score: z.number().optional(),
|
|
36
|
+
score: nullToUndefined(z.number().optional()),
|
|
37
37
|
doc: z.record(z.any()),
|
|
38
38
|
});
|
|
39
39
|
export function queryCollectionDocFromJSON(jsonString) {
|
|
@@ -42,11 +42,11 @@ export function queryCollectionDocFromJSON(jsonString) {
|
|
|
42
42
|
/** @internal */
|
|
43
43
|
export const QueryCollectionResponse$inboundSchema = z.object({
|
|
44
44
|
took: z.number().int(),
|
|
45
|
-
maxScore: z.number().optional(),
|
|
45
|
+
maxScore: nullToUndefined(z.number().optional()),
|
|
46
46
|
total: z.number().int(),
|
|
47
47
|
docs: z.array(z.lazy(() => QueryCollectionDoc$inboundSchema)),
|
|
48
48
|
isDocsInline: z.boolean(),
|
|
49
|
-
docsUrl: z.string().optional(),
|
|
49
|
+
docsUrl: nullToUndefined(z.string().optional()),
|
|
50
50
|
});
|
|
51
51
|
export function queryCollectionResponseFromJSON(jsonString) {
|
|
52
52
|
return safeParse(jsonString, (x) => QueryCollectionResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'QueryCollectionResponse' from JSON`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"querycollection.js","sourceRoot":"","sources":["../../../../src/models/operations/querycollection.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"querycollection.js","sourceRoot":"","sources":["../../../../src/models/operations/querycollection.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGlE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AA2FtC,gBAAgB;AAChB,MAAM,CAAC,MAAM,yCAAyC,GAIlD,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACjC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;IACxB,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAC1C,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAC1C,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC3C,MAAM,EAAE,MAAM,CAAC,kCAAkC,CAAC,QAAQ,EAAE;IAC5D,eAAe,EAAE,MAAM,CAAC,8BAA8B,CAAC,QAAQ,EAAE;CAClE,CAAC,CAAC;AAEH,MAAM,UAAU,gCAAgC,CAC9C,0BAAsD;IAEtD,OAAO,IAAI,CAAC,SAA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AAC,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC;IAChD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACvB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,gCAAgC,CAAC,CAAC;IAC7D,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE;IACzB,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC;CAChD,CAAC,CAAC;AAEH,MAAM,UAAU,+BAA+B,CAC7C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,qCAAqC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACjE,qDAAqD,CACtD,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v3";
|
|
2
2
|
export type UpdateDocsRequestBody = {
|
|
3
3
|
/**
|
|
4
|
-
* A list of documents to update. Each document must contain 'id' field to be updated.
|
|
4
|
+
* A list of documents to update. Each document must contain 'id' field to be updated. For managed embedding vector fields, omit the managed vector field and update only the configured source text field.
|
|
5
5
|
*/
|
|
6
6
|
docs: Array<{
|
|
7
7
|
[k: string]: any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v3";
|
|
2
2
|
export type UpsertDocsRequestBody = {
|
|
3
3
|
/**
|
|
4
|
-
* A list of documents to upsert.
|
|
4
|
+
* A list of documents to upsert. For managed embedding vector fields, omit the managed vector field and provide only the configured source text field.
|
|
5
5
|
*/
|
|
6
6
|
docs: Array<{
|
|
7
7
|
[k: string]: any;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
import * as z from "zod/v3";
|
|
5
|
-
import { safeParse } from "../lib/schemas.js";
|
|
5
|
+
import { nullToUndefined, safeParse } from "../lib/schemas.js";
|
|
6
6
|
/**
|
|
7
7
|
* Partition field data type.
|
|
8
8
|
*/
|
|
@@ -16,9 +16,9 @@ export const DataType$inboundSchema = z
|
|
|
16
16
|
export const DataType$outboundSchema = DataType$inboundSchema;
|
|
17
17
|
/** @internal */
|
|
18
18
|
export const PartitionConfig$inboundSchema = z.object({
|
|
19
|
-
fieldName: z.string().optional(),
|
|
20
|
-
dataType: DataType$inboundSchema.optional(),
|
|
21
|
-
numPartitions: z.number().int().optional(),
|
|
19
|
+
fieldName: nullToUndefined(z.string().optional()),
|
|
20
|
+
dataType: nullToUndefined(DataType$inboundSchema.optional()),
|
|
21
|
+
numPartitions: nullToUndefined(z.number().int().optional()),
|
|
22
22
|
});
|
|
23
23
|
/** @internal */
|
|
24
24
|
export const PartitionConfig$outboundSchema = z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partitionconfig.js","sourceRoot":"","sources":["../../../src/models/partitionconfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"partitionconfig.js","sourceRoot":"","sources":["../../../src/models/partitionconfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAK/D;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,OAAO,EAAE,SAAS;CACV,CAAC;AAqBX,gBAAgB;AAChB,MAAM,CAAC,MAAM,sBAAsB,GAAqC,CAAC;KACtE,UAAU,CAAC,QAAQ,CAAC,CAAC;AACxB,gBAAgB;AAChB,MAAM,CAAC,MAAM,uBAAuB,GAClC,sBAAsB,CAAC;AAEzB,gBAAgB;AAChB,MAAM,CAAC,MAAM,6BAA6B,GAItC,CAAC,CAAC,MAAM,CAAC;IACX,SAAS,EAAE,eAAe,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC;IACjD,QAAQ,EAAE,eAAe,CAAC,sBAAsB,CAAC,QAAQ,EAAE,CAAC;IAC5D,aAAa,EAAE,eAAe,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;CAC5D,CAAC,CAAC;AAQH,gBAAgB;AAChB,MAAM,CAAC,MAAM,8BAA8B,GAIvC,CAAC,CAAC,MAAM,CAAC;IACX,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,QAAQ,EAAE,uBAAuB,CAAC,QAAQ,EAAE;IAC5C,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC;AAEH,MAAM,UAAU,qBAAqB,CACnC,eAAgC;IAEhC,OAAO,IAAI,CAAC,SAAS,CAAC,8BAA8B,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;AAC/E,CAAC;AACD,MAAM,UAAU,uBAAuB,CACrC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,6BAA6B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACzD,6CAA6C,CAC9C,CAAC;AACJ,CAAC"}
|
package/dist/esm/sdk/docs.d.ts
CHANGED
|
@@ -14,11 +14,11 @@ export declare class Docs extends ClientSDK {
|
|
|
14
14
|
*/
|
|
15
15
|
upsert(request: operations.UpsertDocsRequest, options?: RequestOptions): Promise<models.MessageResponse>;
|
|
16
16
|
/**
|
|
17
|
-
* Request required info to upload documents.
|
|
17
|
+
* Request required info to upload documents. Bulk upsert is not supported for collections with managed embedding vector fields.
|
|
18
18
|
*/
|
|
19
19
|
getBulkUpsert(request: operations.GetBulkUpsertDocsRequest, options?: RequestOptions): Promise<operations.GetBulkUpsertDocsResponse>;
|
|
20
20
|
/**
|
|
21
|
-
* Bulk upsert documents into a collection. Note that the maximum supported object size is 200MB.
|
|
21
|
+
* Bulk upsert documents into a collection. Note that the maximum supported object size is 200MB. Bulk upsert is not supported for collections with managed embedding vector fields.
|
|
22
22
|
*/
|
|
23
23
|
bulkUpsert(request: operations.BulkUpsertDocsRequest, options?: RequestOptions): Promise<models.MessageResponse>;
|
|
24
24
|
/**
|
package/dist/esm/sdk/docs.js
CHANGED
|
@@ -27,13 +27,13 @@ export class Docs extends ClientSDK {
|
|
|
27
27
|
return unwrapAsync(collectionsDocsUpsert(this, request, options));
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
* Request required info to upload documents.
|
|
30
|
+
* Request required info to upload documents. Bulk upsert is not supported for collections with managed embedding vector fields.
|
|
31
31
|
*/
|
|
32
32
|
async getBulkUpsert(request, options) {
|
|
33
33
|
return unwrapAsync(collectionsDocsGetBulkUpsert(this, request, options));
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
|
-
* Bulk upsert documents into a collection. Note that the maximum supported object size is 200MB.
|
|
36
|
+
* Bulk upsert documents into a collection. Note that the maximum supported object size is 200MB. Bulk upsert is not supported for collections with managed embedding vector fields.
|
|
37
37
|
*/
|
|
38
38
|
async bulkUpsert(request, options) {
|
|
39
39
|
return unwrapAsync(collectionsDocsBulkUpsert(this, request, options));
|
|
@@ -30,5 +30,5 @@ export type DeleteDocsError = UpdateCollectionError;
|
|
|
30
30
|
export type FetchDocsError = UpdateCollectionError;
|
|
31
31
|
export type BulkUpsertDocsError = UpdateCollectionError;
|
|
32
32
|
/** Errors that can occur when getting bulk upsert docs info. */
|
|
33
|
-
export type GetBulkUpsertDocsError = ListCollectionsError;
|
|
33
|
+
export type GetBulkUpsertDocsError = errors.BadRequestError | ListCollectionsError;
|
|
34
34
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/types/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAG9C,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,sCAAsC,CAAC;AAG9C,MAAM,MAAM,mBAAmB,GAC3B,aAAa,GACb,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CAAC;AAIvB,gIAAgI;AAChI,MAAM,MAAM,oBAAoB,GAC5B,MAAM,CAAC,oBAAoB,GAC3B,MAAM,CAAC,qBAAqB,GAC5B,MAAM,CAAC,oBAAoB,GAC3B,MAAM,CAAC,mBAAmB,GAC1B,mBAAmB,CAAC;AAExB,wDAAwD;AACxD,MAAM,MAAM,qBAAqB,GAC7B,MAAM,CAAC,eAAe,GACtB,MAAM,CAAC,oBAAoB,GAC3B,MAAM,CAAC,0BA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AqB,CAAC;AAClD,MAAM,MAAM,eAAe,GAAG,qBAAqB,CAAC;AACpD,MAAM,MAAM,eAAe,GAAG,qBAAqB,CAAC;AACpD,MAAM,MAAM,eAAe,GAAG,qBAAqB,CAAC;AACpD,MAAM,MAAM,cAAc,GAAG,qBAAqB,CAAC;AACnD,MAAM,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAExD,gEAAgE;AAChE,MAAM,MAAM,sBAAsB,GAC9B,MAAM,CAAC,eAAe,GACtB,oBAAoB,CAAC"}
|
|
@@ -25,7 +25,7 @@ export type { ListDocsResponse, ListDocsDoc, } from "../models/operations/listdo
|
|
|
25
25
|
export type { MessageResponse } from "../models/index.js";
|
|
26
26
|
export type { FetchDocsResponse, FetchDocsDoc, } from "../models/operations/fetchdocs.js";
|
|
27
27
|
export type { GetBulkUpsertDocsResponse } from "../models/operations/getbulkupsertdocs.js";
|
|
28
|
-
export type { IndexConfigsUnion, PartitionConfig, PartitionFilter, FieldsSelectorUnion, CollectionResponse, } from "../models/index.js";
|
|
28
|
+
export type { IndexConfigsUnion, IndexConfigsManagedEmbeddingVector, EmbeddingConfig, EmbeddingProvider, PartitionConfig, PartitionFilter, FieldsSelectorUnion, CollectionResponse, } from "../models/index.js";
|
|
29
29
|
import type { CollectionResponse as CollectionResponseModel } from "../models/index.js";
|
|
30
30
|
/**
|
|
31
31
|
* Collection response with timestamp fields as Date (for better DX).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/types/public.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,YAAY,EAAE,uBAAuB,IAAI,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjH,YAAY,EAAE,2BAA2B,IAAI,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACrH,YAAY,EAAE,0BAA0B,IAAI,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAClH,YAAY,EAAE,qBAAqB,IAAI,eAAe,EAAE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ACjB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,KAAK,EAAE,kBAAkB,IAAI,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAExF;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC5C,uBAAuB,EACvB,WAAW,GAAG,WAAW,GAAG,eAAe,CAC5C,GAAG;IACF,SAAS,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAC7B,SAAS,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAC7B,aAAa,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG;IAC7C,WAAW,EAAE,2BAA2B,EAAE,CAAC;IAC3C,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC,CAAC;AAEF;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,CAAC,EAAE,uBAAuB,GACzB,2BAA2B,CAQ7B;AAED,yEAAyE;AACzE,wBAAgB,gCAAgC,CAAC,GAAG,EAAE;IACpD,WAAW,EAAE,uBAAuB,EAAE,CAAC;IACvC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC,GAAG,gCAAgC,CAMnC;AAED,6DAA6D;AAC7D,MAAM,MAAM,8BAA8B,GAAG;IAC3C,UAAU,EAAE,2BAA2B,CAAC;CACzC,CAAC;AAEF,uEAAuE;AACvE,wBAAgB,8BAA8B,CAAC,GAAG,EAAE;IAClD,UAAU,EAAE,uBAAuB,CAAC;CACrC,GAAG,8BAA8B,CAEjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/types/public.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/types/public.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgFH;;GAEG;AACH,MAAM,UAAU,2BAA2B,CACzC,CAA0B;IAE1B,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,GAAG,CAAC,CAAC;IAC3D,MAAM,GAAG,GAAgC,EAAE,GAAG,IAAI,EAAE,CAAC;IACrD,IAAI,SAAS,IAAI,IAAI;QAAE,GAAG,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IAClE,IAAI,SAAS,IAAI,IAAI;QAAE,GAAG,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IAClE,IAAI,aAAa,IAAI,IAAI;QACvB,GAAG,CAAC,aAAa,GAAG,IAAI,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IACrD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,gCAAgC,CAAC,GAGhD;IACC,MAAM,GAAG,GAAqC;QAC5C,WAAW,EAAE,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,2BAA2B,CAAC;KAC9D,CAAC;IACF,IAAI,GAAG,CAAC,aAAa,KAAK,SAAS;QAAE,GAAG,CAAC,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC;IAC3E,OAAO,GAAG,CAAC;AACb,CAAC;AAOD,uEAAuE;AACvE,MAAM,UAAU,8BAA8B,CAAC,GAE9C;IACC,OAAO,EAAE,UAAU,EAAE,2BAA2B,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;AACrE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@functional-systems/lambdadb",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4-dev.0",
|
|
4
4
|
"author": "Functional Systems, Inc.",
|
|
5
5
|
"homepage": "https://github.com/lambdadb/lambdadb-typescript-client#readme",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"scripts": {
|
|
29
29
|
"lint": "eslint --cache --max-warnings=0 src",
|
|
30
30
|
"build": "tshy",
|
|
31
|
-
"test": "
|
|
31
|
+
"test": "npm run build && node --test test/*.test.mjs",
|
|
32
32
|
"prepublishOnly": "npm run build"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
package/src/client.ts
CHANGED
|
@@ -26,6 +26,7 @@ import { collectionsDocsListDocs } from "./funcs/collectionsDocsListDocs.js";
|
|
|
26
26
|
import { collectionsDocsUpdate } from "./funcs/collectionsDocsUpdate.js";
|
|
27
27
|
import { collectionsDocsUpsert } from "./funcs/collectionsDocsUpsert.js";
|
|
28
28
|
import type { RequestOptions } from "./lib/sdks.js";
|
|
29
|
+
import { UnexpectedClientError } from "./models/errors/httpclienterrors.js";
|
|
29
30
|
import { unwrapAsync, OK, ERR } from "./types/fp.js";
|
|
30
31
|
import type { Result } from "./types/fp.js";
|
|
31
32
|
import type * as operations from "./models/operations/index.js";
|
|
@@ -89,12 +90,40 @@ async function fetchDocsFromUrl<T>(docsUrl: string): Promise<T[]> {
|
|
|
89
90
|
const res = await fetch(docsUrl);
|
|
90
91
|
if (!res.ok) {
|
|
91
92
|
const text = await res.text();
|
|
92
|
-
throw new
|
|
93
|
+
throw new UnexpectedClientError(
|
|
93
94
|
`Failed to fetch documents from URL: ${res.status} ${res.statusText}${text ? ` - ${text}` : ""}`,
|
|
94
95
|
);
|
|
95
96
|
}
|
|
96
|
-
const
|
|
97
|
-
|
|
97
|
+
const text = await res.text();
|
|
98
|
+
if (text.trim() === "") {
|
|
99
|
+
return [];
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
let payload: unknown;
|
|
103
|
+
try {
|
|
104
|
+
payload = JSON.parse(text);
|
|
105
|
+
} catch (cause) {
|
|
106
|
+
throw new UnexpectedClientError(
|
|
107
|
+
"Failed to parse documents from URL as JSON",
|
|
108
|
+
{ cause },
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (payload == null) {
|
|
113
|
+
return [];
|
|
114
|
+
}
|
|
115
|
+
if (typeof payload !== "object" || Array.isArray(payload)) {
|
|
116
|
+
throw new UnexpectedClientError("Unexpected document payload shape from URL");
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const { docs } = payload as { docs?: unknown };
|
|
120
|
+
if (docs == null) {
|
|
121
|
+
return [];
|
|
122
|
+
}
|
|
123
|
+
if (!Array.isArray(docs)) {
|
|
124
|
+
throw new UnexpectedClientError("Unexpected docs payload shape from URL");
|
|
125
|
+
}
|
|
126
|
+
return docs as T[];
|
|
98
127
|
}
|
|
99
128
|
|
|
100
129
|
/** Default base URL for the LambdaDB API. */
|
|
@@ -646,7 +675,7 @@ class CollectionDocs {
|
|
|
646
675
|
}
|
|
647
676
|
|
|
648
677
|
/**
|
|
649
|
-
* Get presigned URL and metadata for bulk upload (up to 200MB).
|
|
678
|
+
* Get presigned URL and metadata for bulk upload (up to 200MB). Not supported for collections with managed embedding vector fields.
|
|
650
679
|
*/
|
|
651
680
|
async getBulkUpsert(options?: RequestOptions) {
|
|
652
681
|
return unwrapAsync(
|
|
@@ -659,7 +688,7 @@ class CollectionDocs {
|
|
|
659
688
|
}
|
|
660
689
|
|
|
661
690
|
/**
|
|
662
|
-
* Get presigned URL and metadata for bulk upload (Safe: returns Result instead of throwing).
|
|
691
|
+
* Get presigned URL and metadata for bulk upload (Safe: returns Result instead of throwing). Not supported for collections with managed embedding vector fields.
|
|
663
692
|
*/
|
|
664
693
|
async getBulkUpsertSafe(
|
|
665
694
|
options?: RequestOptions,
|
|
@@ -672,7 +701,7 @@ class CollectionDocs {
|
|
|
672
701
|
}
|
|
673
702
|
|
|
674
703
|
/**
|
|
675
|
-
* Trigger bulk upsert with an object key from getBulkUpsert().
|
|
704
|
+
* Trigger bulk upsert with an object key from getBulkUpsert(). Not supported for collections with managed embedding vector fields.
|
|
676
705
|
*/
|
|
677
706
|
async bulkUpsert(
|
|
678
707
|
body: BulkUpsertInput,
|
|
@@ -691,7 +720,7 @@ class CollectionDocs {
|
|
|
691
720
|
}
|
|
692
721
|
|
|
693
722
|
/**
|
|
694
|
-
* Trigger bulk upsert (Safe: returns Result instead of throwing).
|
|
723
|
+
* Trigger bulk upsert (Safe: returns Result instead of throwing). Not supported for collections with managed embedding vector fields.
|
|
695
724
|
*/
|
|
696
725
|
async bulkUpsertSafe(
|
|
697
726
|
body: BulkUpsertInput,
|
|
@@ -705,7 +734,7 @@ class CollectionDocs {
|
|
|
705
734
|
}
|
|
706
735
|
|
|
707
736
|
/**
|
|
708
|
-
* Bulk upsert documents in one call (up to 200MB). Abstracts getBulkUpsert,
|
|
737
|
+
* Bulk upsert documents in one call (up to 200MB). Not supported for collections with managed embedding vector fields. Abstracts getBulkUpsert,
|
|
709
738
|
* S3 upload via presigned URL, and bulkUpsert. Use this for better DX when
|
|
710
739
|
* you have a document list; use getBulkUpsert + bulkUpsert for low-level control.
|
|
711
740
|
*/
|
|
@@ -741,7 +770,7 @@ class CollectionDocs {
|
|
|
741
770
|
}
|
|
742
771
|
|
|
743
772
|
/**
|
|
744
|
-
* Bulk upsert documents in one call (Safe: returns Result instead of throwing).
|
|
773
|
+
* Bulk upsert documents in one call (Safe: returns Result instead of throwing). Not supported for collections with managed embedding vector fields.
|
|
745
774
|
* May return Error for local failures (payload size, upload). API errors use GetBulkUpsertDocsError or BulkUpsertDocsError.
|
|
746
775
|
*/
|
|
747
776
|
async bulkUpsertDocsSafe(
|
|
@@ -27,7 +27,7 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
27
27
|
import { Result } from "../types/fp.js";
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* Bulk upsert documents into a collection. Note that the maximum supported object size is 200MB.
|
|
30
|
+
* Bulk upsert documents into a collection. Note that the maximum supported object size is 200MB. Bulk upsert is not supported for collections with managed embedding vector fields.
|
|
31
31
|
*/
|
|
32
32
|
export function collectionsDocsBulkUpsert(
|
|
33
33
|
client: LambdaDBCore,
|
|
@@ -26,7 +26,7 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
26
26
|
import { Result } from "../types/fp.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* Request required info to upload documents.
|
|
29
|
+
* Request required info to upload documents. Bulk upsert is not supported for collections with managed embedding vector fields.
|
|
30
30
|
*/
|
|
31
31
|
export function collectionsDocsGetBulkUpsert(
|
|
32
32
|
client: LambdaDBCore,
|
|
@@ -35,6 +35,7 @@ export function collectionsDocsGetBulkUpsert(
|
|
|
35
35
|
): APIPromise<
|
|
36
36
|
Result<
|
|
37
37
|
operations.GetBulkUpsertDocsResponse,
|
|
38
|
+
| errors.BadRequestError
|
|
38
39
|
| errors.UnauthenticatedError
|
|
39
40
|
| errors.ResourceNotFoundError
|
|
40
41
|
| errors.TooManyRequestsError
|
|
@@ -64,6 +65,7 @@ async function $do(
|
|
|
64
65
|
[
|
|
65
66
|
Result<
|
|
66
67
|
operations.GetBulkUpsertDocsResponse,
|
|
68
|
+
| errors.BadRequestError
|
|
67
69
|
| errors.UnauthenticatedError
|
|
68
70
|
| errors.ResourceNotFoundError
|
|
69
71
|
| errors.TooManyRequestsError
|
|
@@ -152,7 +154,7 @@ async function $do(
|
|
|
152
154
|
|
|
153
155
|
const doResult = await client._do(req, {
|
|
154
156
|
context,
|
|
155
|
-
errorCodes: ["401", "404", "429", "4XX", "500", "5XX"],
|
|
157
|
+
errorCodes: ["400", "401", "404", "429", "4XX", "500", "5XX"],
|
|
156
158
|
retryConfig: context.retryConfig,
|
|
157
159
|
retryCodes: context.retryCodes,
|
|
158
160
|
});
|
|
@@ -167,6 +169,7 @@ async function $do(
|
|
|
167
169
|
|
|
168
170
|
const [result] = await M.match<
|
|
169
171
|
operations.GetBulkUpsertDocsResponse,
|
|
172
|
+
| errors.BadRequestError
|
|
170
173
|
| errors.UnauthenticatedError
|
|
171
174
|
| errors.ResourceNotFoundError
|
|
172
175
|
| errors.TooManyRequestsError
|
|
@@ -181,6 +184,7 @@ async function $do(
|
|
|
181
184
|
| SDKValidationError
|
|
182
185
|
>(
|
|
183
186
|
M.json(200, operations.GetBulkUpsertDocsResponse$inboundSchema),
|
|
187
|
+
M.jsonErr(400, errors.BadRequestError$inboundSchema),
|
|
184
188
|
M.jsonErr(401, errors.UnauthenticatedError$inboundSchema),
|
|
185
189
|
M.jsonErr(404, errors.ResourceNotFoundError$inboundSchema),
|
|
186
190
|
M.jsonErr(429, errors.TooManyRequestsError$inboundSchema),
|
package/src/lib/matchers.ts
CHANGED
|
@@ -224,7 +224,24 @@ export function match<T, E>(
|
|
|
224
224
|
switch (encoding) {
|
|
225
225
|
case "json":
|
|
226
226
|
body = await response.text();
|
|
227
|
-
|
|
227
|
+
if (body.trim() === "") {
|
|
228
|
+
raw = undefined;
|
|
229
|
+
break;
|
|
230
|
+
}
|
|
231
|
+
try {
|
|
232
|
+
raw = JSON.parse(body);
|
|
233
|
+
} catch (cause) {
|
|
234
|
+
return [ERR(
|
|
235
|
+
new ResponseValidationError("Response validation failed", {
|
|
236
|
+
cause,
|
|
237
|
+
rawValue: body,
|
|
238
|
+
rawMessage: "Response validation failed",
|
|
239
|
+
request,
|
|
240
|
+
response,
|
|
241
|
+
body,
|
|
242
|
+
}),
|
|
243
|
+
), body];
|
|
244
|
+
}
|
|
228
245
|
break;
|
|
229
246
|
case "jsonl":
|
|
230
247
|
raw = response.body;
|
package/src/lib/schemas.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
output,
|
|
7
|
+
preprocess,
|
|
7
8
|
ZodEffects,
|
|
8
9
|
ZodError,
|
|
9
10
|
ZodObject,
|
|
@@ -50,6 +51,17 @@ export function safeParse<Inp, Out>(
|
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Converts explicit JSON nulls to undefined before applying the provided
|
|
56
|
+
* schema. This lets inbound response schemas tolerate APIs that return
|
|
57
|
+
* `null` instead of omitting optional fields.
|
|
58
|
+
*/
|
|
59
|
+
export function nullToUndefined<T extends ZodTypeAny>(
|
|
60
|
+
schema: T,
|
|
61
|
+
): ZodEffects<T, output<T>, unknown> {
|
|
62
|
+
return preprocess((value) => value === null ? undefined : value, schema);
|
|
63
|
+
}
|
|
64
|
+
|
|
53
65
|
export function collectExtraKeys<
|
|
54
66
|
Shape extends ZodRawShape,
|
|
55
67
|
Catchall extends ZodTypeAny,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
-
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
import { nullToUndefined, safeParse } from "../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
9
9
|
import {
|
|
@@ -74,12 +74,12 @@ export const CollectionResponse$inboundSchema: z.ZodType<
|
|
|
74
74
|
projectName: z.string(),
|
|
75
75
|
collectionName: z.string(),
|
|
76
76
|
indexConfigs: z.record(IndexConfigsUnion$inboundSchema),
|
|
77
|
-
partitionConfig: PartitionConfig$inboundSchema.optional(),
|
|
77
|
+
partitionConfig: nullToUndefined(PartitionConfig$inboundSchema.optional()),
|
|
78
78
|
numPartitions: z.number().int(),
|
|
79
79
|
numDocs: z.number().int(),
|
|
80
|
-
sourceProjectName: z.string().optional(),
|
|
81
|
-
sourceCollectionName: z.string().optional(),
|
|
82
|
-
sourceCollectionVersionId: z.string().optional(),
|
|
80
|
+
sourceProjectName: nullToUndefined(z.string().optional()),
|
|
81
|
+
sourceCollectionName: nullToUndefined(z.string().optional()),
|
|
82
|
+
sourceCollectionVersionId: nullToUndefined(z.string().optional()),
|
|
83
83
|
collectionStatus: Status$inboundSchema,
|
|
84
84
|
createdAt: z.number().int(),
|
|
85
85
|
updatedAt: z.number().int(),
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import { nullToUndefined } from "../../lib/schemas.js";
|
|
6
7
|
import { LambdaDBError } from "./lambdadberror.js";
|
|
7
8
|
|
|
8
9
|
export type BadRequestErrorData = {
|
|
@@ -31,7 +32,7 @@ export const BadRequestError$inboundSchema: z.ZodType<
|
|
|
31
32
|
z.ZodTypeDef,
|
|
32
33
|
unknown
|
|
33
34
|
> = z.object({
|
|
34
|
-
message: z.string().optional(),
|
|
35
|
+
message: nullToUndefined(z.string().optional()),
|
|
35
36
|
request$: z.instanceof(Request),
|
|
36
37
|
response$: z.instanceof(Response),
|
|
37
38
|
body$: z.string(),
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import { nullToUndefined } from "../../lib/schemas.js";
|
|
6
7
|
import { LambdaDBError } from "./lambdadberror.js";
|
|
7
8
|
|
|
8
9
|
export type InternalServerErrorData = {
|
|
@@ -31,7 +32,7 @@ export const InternalServerError$inboundSchema: z.ZodType<
|
|
|
31
32
|
z.ZodTypeDef,
|
|
32
33
|
unknown
|
|
33
34
|
> = z.object({
|
|
34
|
-
message: z.string().optional(),
|
|
35
|
+
message: nullToUndefined(z.string().optional()),
|
|
35
36
|
request$: z.instanceof(Request),
|
|
36
37
|
response$: z.instanceof(Response),
|
|
37
38
|
body$: z.string(),
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import { nullToUndefined } from "../../lib/schemas.js";
|
|
6
7
|
import { LambdaDBError } from "./lambdadberror.js";
|
|
7
8
|
|
|
8
9
|
export type ResourceAlreadyExistsErrorData = {
|
|
@@ -31,7 +32,7 @@ export const ResourceAlreadyExistsError$inboundSchema: z.ZodType<
|
|
|
31
32
|
z.ZodTypeDef,
|
|
32
33
|
unknown
|
|
33
34
|
> = z.object({
|
|
34
|
-
message: z.string().optional(),
|
|
35
|
+
message: nullToUndefined(z.string().optional()),
|
|
35
36
|
request$: z.instanceof(Request),
|
|
36
37
|
response$: z.instanceof(Response),
|
|
37
38
|
body$: z.string(),
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import { nullToUndefined } from "../../lib/schemas.js";
|
|
6
7
|
import { LambdaDBError } from "./lambdadberror.js";
|
|
7
8
|
|
|
8
9
|
export type ResourceNotFoundErrorData = {
|
|
@@ -31,7 +32,7 @@ export const ResourceNotFoundError$inboundSchema: z.ZodType<
|
|
|
31
32
|
z.ZodTypeDef,
|
|
32
33
|
unknown
|
|
33
34
|
> = z.object({
|
|
34
|
-
message: z.string().optional(),
|
|
35
|
+
message: nullToUndefined(z.string().optional()),
|
|
35
36
|
request$: z.instanceof(Request),
|
|
36
37
|
response$: z.instanceof(Response),
|
|
37
38
|
body$: z.string(),
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import { nullToUndefined } from "../../lib/schemas.js";
|
|
6
7
|
import { LambdaDBError } from "./lambdadberror.js";
|
|
7
8
|
|
|
8
9
|
export type TooManyRequestsErrorData = {
|
|
@@ -31,7 +32,7 @@ export const TooManyRequestsError$inboundSchema: z.ZodType<
|
|
|
31
32
|
z.ZodTypeDef,
|
|
32
33
|
unknown
|
|
33
34
|
> = z.object({
|
|
34
|
-
message: z.string().optional(),
|
|
35
|
+
message: nullToUndefined(z.string().optional()),
|
|
35
36
|
request$: z.instanceof(Request),
|
|
36
37
|
response$: z.instanceof(Response),
|
|
37
38
|
body$: z.string(),
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import { nullToUndefined } from "../../lib/schemas.js";
|
|
6
7
|
import { LambdaDBError } from "./lambdadberror.js";
|
|
7
8
|
|
|
8
9
|
export type UnauthenticatedErrorData = {
|
|
@@ -31,7 +32,7 @@ export const UnauthenticatedError$inboundSchema: z.ZodType<
|
|
|
31
32
|
z.ZodTypeDef,
|
|
32
33
|
unknown
|
|
33
34
|
> = z.object({
|
|
34
|
-
message: z.string().optional(),
|
|
35
|
+
message: nullToUndefined(z.string().optional()),
|
|
35
36
|
request$: z.instanceof(Request),
|
|
36
37
|
response$: z.instanceof(Response),
|
|
37
38
|
body$: z.string(),
|