@goatlab/typesense 0.1.0 → 0.1.2
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/dist/TypesenseApi.d.ts +5 -5
- package/dist/TypesenseApi.js +37 -36
- package/dist/TypesenseApi.js.map +1 -1
- package/dist/actions/admin/getCollectionStats.d.ts +1 -1
- package/dist/actions/admin/health.d.ts +1 -1
- package/dist/actions/admin/health.js +1 -1
- package/dist/actions/admin/health.js.map +1 -1
- package/dist/actions/admin/metrics.d.ts +1 -1
- package/dist/actions/admin/metrics.js.map +1 -1
- package/dist/actions/aliases/createOrUpdateAlias.d.ts +1 -1
- package/dist/actions/aliases/deleteAlias.d.ts +1 -1
- package/dist/actions/aliases/getAlias.d.ts +1 -1
- package/dist/actions/aliases/listAliases.d.ts +1 -1
- package/dist/actions/collections/createCollection.d.ts +1 -1
- package/dist/actions/collections/createCollection.js.map +1 -1
- package/dist/actions/collections/deleteCollection.d.ts +1 -1
- package/dist/actions/collections/getCollection.d.ts +1 -1
- package/dist/actions/collections/getOrCreateCollection.d.ts +1 -1
- package/dist/actions/collections/getOrCreateCollection.js +1 -1
- package/dist/actions/collections/getOrCreateCollection.js.map +1 -1
- package/dist/actions/collections/listCollections.d.ts +1 -1
- package/dist/actions/collections/updateCollection.d.ts +1 -1
- package/dist/actions/collections/updateCollection.js.map +1 -1
- package/dist/actions/documents/clearCollection.d.ts +1 -1
- package/dist/actions/documents/deleteByFilter.d.ts +1 -1
- package/dist/actions/documents/deleteDocument.d.ts +1 -1
- package/dist/actions/documents/deleteDocument.js.map +1 -1
- package/dist/actions/documents/exportDocuments.d.ts +3 -3
- package/dist/actions/documents/exportDocuments.js +6 -6
- package/dist/actions/documents/exportDocuments.js.map +1 -1
- package/dist/actions/documents/getDocumentById.d.ts +1 -1
- package/dist/actions/documents/getDocumentById.js.map +1 -1
- package/dist/actions/documents/importDocuments.d.ts +2 -2
- package/dist/actions/documents/importDocuments.js +11 -9
- package/dist/actions/documents/importDocuments.js.map +1 -1
- package/dist/actions/documents/insertDocument.d.ts +1 -1
- package/dist/actions/documents/insertDocument.js.map +1 -1
- package/dist/actions/documents/updateDocument.d.ts +1 -1
- package/dist/actions/documents/updateDocument.js.map +1 -1
- package/dist/actions/documents/upsertDocument.d.ts +1 -1
- package/dist/actions/documents/upsertDocument.js.map +1 -1
- package/dist/actions/overrides/deleteOverride.d.ts +1 -1
- package/dist/actions/overrides/deleteOverride.js.map +1 -1
- package/dist/actions/overrides/getOverride.d.ts +1 -1
- package/dist/actions/overrides/getOverride.js.map +1 -1
- package/dist/actions/overrides/listOverrides.d.ts +1 -1
- package/dist/actions/overrides/listOverrides.js.map +1 -1
- package/dist/actions/overrides/upsertOverride.d.ts +1 -1
- package/dist/actions/overrides/upsertOverride.js.map +1 -1
- package/dist/actions/presets/deletePreset.d.ts +1 -1
- package/dist/actions/presets/getPreset.d.ts +1 -1
- package/dist/actions/presets/listPresets.d.ts +1 -1
- package/dist/actions/presets/listPresets.js.map +1 -1
- package/dist/actions/presets/upsertPreset.d.ts +1 -1
- package/dist/actions/presets/upsertPreset.js.map +1 -1
- package/dist/actions/search/multiSearch.d.ts +1 -1
- package/dist/actions/search/multiSearch.js.map +1 -1
- package/dist/actions/search/search.d.ts +1 -1
- package/dist/actions/synonyms/deleteSynonym.d.ts +1 -1
- package/dist/actions/synonyms/deleteSynonym.js.map +1 -1
- package/dist/actions/synonyms/getSynonym.d.ts +1 -1
- package/dist/actions/synonyms/getSynonym.js.map +1 -1
- package/dist/actions/synonyms/listSynonyms.d.ts +1 -1
- package/dist/actions/synonyms/listSynonyms.js.map +1 -1
- package/dist/actions/synonyms/upsertSynonym.d.ts +1 -1
- package/dist/actions/synonyms/upsertSynonym.js.map +1 -1
- package/dist/components/export-formatter.d.ts +1 -1
- package/dist/components/export-formatter.js +21 -21
- package/dist/components/export-formatter.js.map +1 -1
- package/dist/components/http-client.d.ts +2 -1
- package/dist/components/http-client.js +21 -8
- package/dist/components/http-client.js.map +1 -1
- package/dist/components/resilience-policy.js +7 -7
- package/dist/components/resilience-policy.js.map +1 -1
- package/dist/components/schema-manager.js +36 -14
- package/dist/components/schema-manager.js.map +1 -1
- package/dist/components/typesense.filter-builder.js.map +1 -1
- package/dist/examples/multitenancy-example.js +5 -5
- package/dist/examples/multitenancy-example.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/tests/const.js +7 -7
- package/dist/tests/const.js.map +1 -1
- package/dist/tests/type-inference-example.js +3 -3
- package/dist/tests/type-inference-example.js.map +1 -1
- package/dist/typesense.model.js +19 -11
- package/dist/typesense.model.js.map +1 -1
- package/dist/utils/schema-to-types.js.map +1 -1
- package/dist/utils/schema-typed-api.d.ts +1 -1
- package/dist/utils/schema-typed-api.js.map +1 -1
- package/dist/utils/tenant.js +1 -1
- package/dist/utils/tenant.js.map +1 -1
- package/package.json +8 -8
package/dist/TypesenseApi.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { defineCollection as defineCollectionUtil, type InferFromCollection } from './utils/schema-to-types';
|
|
3
|
-
import { createSchemaTypedApi as createSchemaTypedApiUtil } from './utils/schema-typed-api';
|
|
4
|
-
import { TypesenseHttpClient, type HttpClientOptions } from './components/http-client';
|
|
1
|
+
import { type HttpClientOptions, TypesenseHttpClient } from './components/http-client';
|
|
5
2
|
import { ResiliencePolicy, type ResiliencePolicyOptions } from './components/resilience-policy';
|
|
6
3
|
import { CollectionSchemaManager } from './components/schema-manager';
|
|
4
|
+
import type { TypesenseCollection, TypesenseCollectionOptions, TypesenseDocument, TypesenseRateLimitInfo, WithRequiredId } from './typesense.model';
|
|
5
|
+
import { defineCollection as defineCollectionUtil } from './utils/schema-to-types';
|
|
6
|
+
import { createSchemaTypedApi as createSchemaTypedApiUtil } from './utils/schema-typed-api';
|
|
7
7
|
export interface TypesenseApiOptions extends Omit<HttpClientOptions, 'prefixUrl' | 'token'> {
|
|
8
8
|
prefixUrl: string;
|
|
9
9
|
token: string;
|
|
@@ -128,7 +128,7 @@ export declare class TypesenseApi<TDoc extends Record<string, any> = Record<stri
|
|
|
128
128
|
* })
|
|
129
129
|
* ```
|
|
130
130
|
*/
|
|
131
|
-
static createFromSchema<const C extends TypesenseCollection>(collection: C): (options: Omit<TypesenseApiOptions, "collectionName">) => TypesenseApi<InferFromCollection<C>>;
|
|
131
|
+
static createFromSchema<const C extends TypesenseCollection>(collection: C): (options: Omit<TypesenseApiOptions, "collectionName">) => TypesenseApi<import("./utils/schema-to-types").InferFromCollection<C>>;
|
|
132
132
|
constructor(options: TypesenseApiOptions);
|
|
133
133
|
private checkVersion;
|
|
134
134
|
/**
|
package/dist/TypesenseApi.js
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// Collections
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.TypesenseApi = exports.createTypedApi = void 0;
|
|
4
|
-
|
|
5
|
-
const createCollection_1 = require("./actions/collections/createCollection");
|
|
6
|
-
const getCollection_1 = require("./actions/collections/getCollection");
|
|
7
|
-
const updateCollection_1 = require("./actions/collections/updateCollection");
|
|
8
|
-
const deleteCollection_1 = require("./actions/collections/deleteCollection");
|
|
9
|
-
const listCollections_1 = require("./actions/collections/listCollections");
|
|
10
|
-
const getOrCreateCollection_1 = require("./actions/collections/getOrCreateCollection");
|
|
11
|
-
// Documents
|
|
12
|
-
const insertDocument_1 = require("./actions/documents/insertDocument");
|
|
13
|
-
const upsertDocument_1 = require("./actions/documents/upsertDocument");
|
|
14
|
-
const updateDocument_1 = require("./actions/documents/updateDocument");
|
|
15
|
-
const deleteDocument_1 = require("./actions/documents/deleteDocument");
|
|
16
|
-
const getDocumentById_1 = require("./actions/documents/getDocumentById");
|
|
17
|
-
const importDocuments_1 = require("./actions/documents/importDocuments");
|
|
18
|
-
const exportDocuments_1 = require("./actions/documents/exportDocuments");
|
|
19
|
-
const deleteByFilter_1 = require("./actions/documents/deleteByFilter");
|
|
20
|
-
const clearCollection_1 = require("./actions/documents/clearCollection");
|
|
21
|
-
// Search
|
|
22
|
-
const search_1 = require("./actions/search/search");
|
|
23
|
-
const multiSearch_1 = require("./actions/search/multiSearch");
|
|
5
|
+
const getCollectionStats_1 = require("./actions/admin/getCollectionStats");
|
|
24
6
|
// Admin
|
|
25
7
|
const health_1 = require("./actions/admin/health");
|
|
26
8
|
const metrics_1 = require("./actions/admin/metrics");
|
|
27
|
-
const getCollectionStats_1 = require("./actions/admin/getCollectionStats");
|
|
28
9
|
// Aliases
|
|
29
10
|
const createOrUpdateAlias_1 = require("./actions/aliases/createOrUpdateAlias");
|
|
11
|
+
const deleteAlias_1 = require("./actions/aliases/deleteAlias");
|
|
30
12
|
const getAlias_1 = require("./actions/aliases/getAlias");
|
|
31
13
|
const listAliases_1 = require("./actions/aliases/listAliases");
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
const
|
|
14
|
+
const createCollection_1 = require("./actions/collections/createCollection");
|
|
15
|
+
const deleteCollection_1 = require("./actions/collections/deleteCollection");
|
|
16
|
+
const getCollection_1 = require("./actions/collections/getCollection");
|
|
17
|
+
const getOrCreateCollection_1 = require("./actions/collections/getOrCreateCollection");
|
|
18
|
+
const listCollections_1 = require("./actions/collections/listCollections");
|
|
19
|
+
const updateCollection_1 = require("./actions/collections/updateCollection");
|
|
20
|
+
const clearCollection_1 = require("./actions/documents/clearCollection");
|
|
21
|
+
const deleteByFilter_1 = require("./actions/documents/deleteByFilter");
|
|
22
|
+
const deleteDocument_1 = require("./actions/documents/deleteDocument");
|
|
23
|
+
const exportDocuments_1 = require("./actions/documents/exportDocuments");
|
|
24
|
+
const getDocumentById_1 = require("./actions/documents/getDocumentById");
|
|
25
|
+
const importDocuments_1 = require("./actions/documents/importDocuments");
|
|
26
|
+
// Documents
|
|
27
|
+
const insertDocument_1 = require("./actions/documents/insertDocument");
|
|
28
|
+
const updateDocument_1 = require("./actions/documents/updateDocument");
|
|
29
|
+
const upsertDocument_1 = require("./actions/documents/upsertDocument");
|
|
30
|
+
const deleteOverride_1 = require("./actions/overrides/deleteOverride");
|
|
40
31
|
const getOverride_1 = require("./actions/overrides/getOverride");
|
|
41
32
|
const listOverrides_1 = require("./actions/overrides/listOverrides");
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const
|
|
33
|
+
// Overrides
|
|
34
|
+
const upsertOverride_1 = require("./actions/overrides/upsertOverride");
|
|
35
|
+
const deletePreset_1 = require("./actions/presets/deletePreset");
|
|
45
36
|
const getPreset_1 = require("./actions/presets/getPreset");
|
|
46
37
|
const listPresets_1 = require("./actions/presets/listPresets");
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
const
|
|
38
|
+
// Presets
|
|
39
|
+
const upsertPreset_1 = require("./actions/presets/upsertPreset");
|
|
40
|
+
const multiSearch_1 = require("./actions/search/multiSearch");
|
|
41
|
+
// Search
|
|
42
|
+
const search_1 = require("./actions/search/search");
|
|
43
|
+
const deleteSynonym_1 = require("./actions/synonyms/deleteSynonym");
|
|
44
|
+
const getSynonym_1 = require("./actions/synonyms/getSynonym");
|
|
45
|
+
const listSynonyms_1 = require("./actions/synonyms/listSynonyms");
|
|
46
|
+
// Synonyms
|
|
47
|
+
const upsertSynonym_1 = require("./actions/synonyms/upsertSynonym");
|
|
50
48
|
const http_client_1 = require("./components/http-client");
|
|
51
49
|
const resilience_policy_1 = require("./components/resilience-policy");
|
|
52
50
|
const schema_manager_1 = require("./components/schema-manager");
|
|
51
|
+
const schema_to_types_1 = require("./utils/schema-to-types");
|
|
52
|
+
const schema_typed_api_1 = require("./utils/schema-typed-api");
|
|
53
53
|
const tenant_1 = require("./utils/tenant");
|
|
54
54
|
/**
|
|
55
55
|
* Binds context to API functions by prepending context as first argument
|
|
@@ -182,6 +182,7 @@ class TypesenseApi {
|
|
|
182
182
|
error.retriesRemaining = 0;
|
|
183
183
|
throw error;
|
|
184
184
|
}
|
|
185
|
+
return undefined;
|
|
185
186
|
},
|
|
186
187
|
...(options.beforeRequest || [])
|
|
187
188
|
];
|
|
@@ -267,7 +268,7 @@ class TypesenseApi {
|
|
|
267
268
|
}
|
|
268
269
|
}
|
|
269
270
|
}
|
|
270
|
-
catch (
|
|
271
|
+
catch (_error) {
|
|
271
272
|
// Version check is optional, continue silently
|
|
272
273
|
}
|
|
273
274
|
}
|
package/dist/TypesenseApi.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypesenseApi.js","sourceRoot":"","sources":["../src/TypesenseApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TypesenseApi.js","sourceRoot":"","sources":["../src/TypesenseApi.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,2EAAuE;AACvE,QAAQ;AACR,mDAA8D;AAC9D,qDAA8D;AAC9D,UAAU;AACV,+EAA2E;AAC3E,+DAA2D;AAC3D,yDAAqD;AACrD,+DAA2D;AAC3D,6EAAyE;AACzE,6EAAyE;AACzE,uEAAmE;AACnE,uFAAmF;AACnF,2EAAuE;AACvE,6EAAyE;AACzE,yEAAqE;AACrE,uEAAmE;AACnE,uEAAmE;AACnE,yEAG4C;AAC5C,yEAAqE;AACrE,yEAAqE;AACrE,YAAY;AACZ,uEAAmE;AACnE,uEAAmE;AACnE,uEAAmE;AACnE,uEAAmE;AACnE,iEAA6D;AAC7D,qEAAiE;AACjE,YAAY;AACZ,uEAAmE;AACnE,iEAA6D;AAC7D,2DAAuD;AACvD,+DAA2D;AAC3D,UAAU;AACV,iEAA6D;AAC7D,8DAA0D;AAC1D,SAAS;AACT,oDAA0E;AAC1E,oEAAgE;AAChE,8DAA0D;AAC1D,kEAA8D;AAC9D,WAAW;AACX,oEAAgE;AAChE,0DAGiC;AACjC,sEAGuC;AACvC,gEAAqE;AAUrE,6DAAk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AM,KAAK,GAAG,EAAE,CAAC;gBAC7D,OAAO,KAAK,CAAA;YACd,CAAC;YACD,MAAM,KAAK,CAAA;QACb,CAAC;IACH,CAAC;IAED;;OAEG;IACH,OAAO;QACL,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,CAAA;QAC/B,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA;IACzB,CAAC;;AAraH,oCAsaC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TypesenseCollectionStats } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseCollectionStats } from '../../typesense.model';
|
|
3
3
|
export declare function getCollectionStats(ctx: TypesenseContext, collectionName?: string): Promise<TypesenseCollectionStats>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TypesenseHealthResponse } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseHealthResponse } from '../../typesense.model';
|
|
3
3
|
export declare function health(ctx: TypesenseContext): Promise<TypesenseHealthResponse>;
|
|
4
4
|
export declare function waitForHealth(ctx: TypesenseContext, maxRetries?: number, delayMs?: number): Promise<void>;
|
|
@@ -11,7 +11,7 @@ async function waitForHealth(ctx, maxRetries = 15, delayMs = 1000) {
|
|
|
11
11
|
await health(ctx);
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
|
-
catch (
|
|
14
|
+
catch (_error) {
|
|
15
15
|
if (i === maxRetries - 1) {
|
|
16
16
|
throw new Error(`Typesense failed to become healthy after ${maxRetries} retries`);
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"health.js","sourceRoot":"","sources":["../../../src/actions/admin/health.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"health.js","sourceRoot":"","sources":["../../../src/actions/admin/health.ts"],"names":[],"mappings":";;AAGA,wBAIC;AAED,sCAkBC;AAxBM,KAAK,UAAU,MAAM,CAC1B,GAAqB;IAErB,OAAO,MAAM,GAAG,CAAC,UAAU,CAAC,OAAO,CAA0B,SAAS,CAAC,CAAA;AACzE,CAAC;AAEM,KAAK,UAAU,aAAa,CACjC,GAAqB,EACrB,aAAqB,EAAE,EACvB,UAAkB,IAAI;IAEtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC;QACpC,IAAI,CAAC;YACH,MAAM,MAAM,CAAC,GAAG,CAAC,CAAA;YACjB,OAAM;QACR,CAAC;QAAC,OAAO,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,KAAK,UAAU,GAAG,CAAC,EAAE,CAAC;gBACzB,MAAM,IAAI,KAAK,CACb,4CAA4C,UAAU,UAAU,CACjE,CAAA;YACH,CAAC;YACD,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAA;QAC5D,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TypesenseMetrics } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseMetrics } from '../../typesense.model';
|
|
3
3
|
export declare function getMetrics(ctx: TypesenseContext): Promise<TypesenseMetrics>;
|
|
4
4
|
export declare function getStats(ctx: TypesenseContext): Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.js","sourceRoot":"","sources":["../../../src/actions/admin/metrics.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"metrics.js","sourceRoot":"","sources":["../../../src/actions/admin/metrics.ts"],"names":[],"mappings":";;AAGA,gCAIC;AAED,4BAEC;AARM,KAAK,UAAU,UAAU,CAC9B,GAAqB;IAErB,OAAO,MAAM,GAAG,CAAC,UAAU,CAAC,OAAO,CAAmB,eAAe,CAAC,CAAA;AACxE,CAAC;AAEM,KAAK,UAAU,QAAQ,CAAC,GAAqB;IAClD,OAAO,MAAM,GAAG,CAAC,UAAU,CAAC,OAAO,CAAM,aAAa,CAAC,CAAA;AACzD,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TypesenseAliasResponse } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseAliasResponse } from '../../typesense.model';
|
|
3
3
|
export declare function createOrUpdateAlias(ctx: TypesenseContext, aliasName: string, collectionName: string): Promise<TypesenseAliasResponse>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TypesenseAliasResponse } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseAliasResponse } from '../../typesense.model';
|
|
3
3
|
export declare function deleteAlias(ctx: TypesenseContext, aliasName: string): Promise<TypesenseAliasResponse>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TypesenseAliasResponse } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseAliasResponse } from '../../typesense.model';
|
|
3
3
|
export declare function getAlias(ctx: TypesenseContext, aliasName: string): Promise<TypesenseAliasResponse>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TypesenseAliasListResponse } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseAliasListResponse } from '../../typesense.model';
|
|
3
3
|
export declare function listAliases(ctx: TypesenseContext): Promise<TypesenseAliasListResponse>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TypesenseCollection, TypesenseCollectionOutput } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseCollection, TypesenseCollectionOutput } from '../../typesense.model';
|
|
3
3
|
export declare function createCollection(ctx: TypesenseContext, collection: TypesenseCollection): Promise<TypesenseCollectionOutput>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCollection.js","sourceRoot":"","sources":["../../../src/actions/collections/createCollection.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"createCollection.js","sourceRoot":"","sources":["../../../src/actions/collections/createCollection.ts"],"names":[],"mappings":";;AAMA,4CAsBC;AAtBM,KAAK,UAAU,gBAAgB,CACpC,GAAqB,EACrB,UAA+B;IAE/B,2DAA2D;IAC3D,MAAM,kBAAkB,GAAG;QACzB,GAAG,UAAU;QACb,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;KAChC,CAAA;IAED,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,OAAO,CACzC,cAAc,EACd;QACE,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,kBAAkB;KACzB,CACF,CAAA;IAED,iDAAiD;IACjD,GAAG,CAAC,aAAa,CAAC,eAAe,CAAC,kBAAkB,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAA;IAE9E,OAAO,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TypesenseCollectionOutput } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseCollectionOutput } from '../../typesense.model';
|
|
3
3
|
export declare function deleteCollection(ctx: TypesenseContext, collectionName?: string): Promise<TypesenseCollectionOutput>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TypesenseCollectionOutput } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseCollectionOutput } from '../../typesense.model';
|
|
3
3
|
export declare function getCollection(ctx: TypesenseContext, collectionName?: string): Promise<TypesenseCollectionOutput>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TypesenseCollection, TypesenseCollectionOutput } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseCollection, TypesenseCollectionOutput } from '../../typesense.model';
|
|
3
3
|
export declare function getOrCreateCollection(ctx: TypesenseContext, collection: TypesenseCollection): Promise<TypesenseCollectionOutput>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getOrCreateCollection = getOrCreateCollection;
|
|
4
|
-
const getCollection_1 = require("./getCollection");
|
|
5
4
|
const createCollection_1 = require("./createCollection");
|
|
5
|
+
const getCollection_1 = require("./getCollection");
|
|
6
6
|
async function getOrCreateCollection(ctx, collection) {
|
|
7
7
|
try {
|
|
8
8
|
// Try to get existing collection
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getOrCreateCollection.js","sourceRoot":"","sources":["../../../src/actions/collections/getOrCreateCollection.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"getOrCreateCollection.js","sourceRoot":"","sources":["../../../src/actions/collections/getOrCreateCollection.ts"],"names":[],"mappings":";;AAQA,sDAcC;AAjBD,yDAAqD;AACrD,mDAA+C;AAExC,KAAK,UAAU,qBAAqB,CACzC,GAAqB,EACrB,UAA+B;IAE/B,IAAI,CAAC;QACH,iCAAiC;QACjC,OAAO,MAAM,IAAA,6BAAa,EAAC,GAAG,EAAE,UAAU,CAAC,IAAI,CAAC,CAAA;IAClD,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,+CAA+C;QAC/C,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,QAAQ,EAAE,MAAM,KAAK,GAAG,EAAE,CAAC;YAC3D,OAAO,MAAM,IAAA,mCAAgB,EAAC,GAAG,EAAE,UAAU,CAAC,CAAA;QAChD,CAAC;QACD,MAAM,KAAK,CAAA;IACb,CAAC;AACH,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TypesenseCollectionOutput } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseCollectionOutput } from '../../typesense.model';
|
|
3
3
|
export declare function listCollections(ctx: TypesenseContext): Promise<TypesenseCollectionOutput[]>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TypesenseCollection, TypesenseCollectionOutput, TypesenseCollectionOptions } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseCollection, TypesenseCollectionOptions, TypesenseCollectionOutput } from '../../typesense.model';
|
|
3
3
|
export declare function updateCollection(ctx: TypesenseContext, collection: Partial<TypesenseCollection>, options?: TypesenseCollectionOptions): Promise<TypesenseCollectionOutput>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateCollection.js","sourceRoot":"","sources":["../../../src/actions/collections/updateCollection.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"updateCollection.js","sourceRoot":"","sources":["../../../src/actions/collections/updateCollection.ts"],"names":[],"mappings":";;AAOA,4CAmBC;AAnBM,KAAK,UAAU,gBAAgB,CACpC,GAAqB,EACrB,UAAwC,EACxC,OAAoC;IAEpC,MAAM,cAAc,GAAG,OAAO,EAAE,UAAU,IAAI,UAAU,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,EAAE,CAAA;IAE3E,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,OAAO,CACzC,gBAAgB,cAAc,EAAE,EAChC;QACE,MAAM,EAAE,OAAO;QACf,IAAI,EAAE,UAAU;KACjB,CACF,CAAA;IAED,eAAe;IACf,GAAG,CAAC,aAAa,CAAC,eAAe,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;IAEzD,OAAO,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TypesenseCollectionOptions } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseCollectionOptions } from '../../typesense.model';
|
|
3
3
|
export declare function clearCollection(ctx: TypesenseContext, options?: TypesenseCollectionOptions): Promise<{
|
|
4
4
|
num_deleted: number;
|
|
5
5
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TypesenseDeleteByFilterOptions, TypesenseCollectionOptions } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseCollectionOptions, TypesenseDeleteByFilterOptions } from '../../typesense.model';
|
|
3
3
|
export declare function deleteByFilter(ctx: TypesenseContext, filter: string, options?: TypesenseDeleteByFilterOptions & TypesenseCollectionOptions): Promise<{
|
|
4
4
|
num_deleted: number;
|
|
5
5
|
}>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TypesenseDocument, TypesenseCollectionOptions } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseCollectionOptions, TypesenseDocument } from '../../typesense.model';
|
|
3
3
|
export declare function deleteDocument<T extends Record<string, any>>(ctx: TypesenseContext, id: string | number, options?: TypesenseCollectionOptions): Promise<TypesenseDocument<T>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteDocument.js","sourceRoot":"","sources":["../../../src/actions/documents/deleteDocument.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"deleteDocument.js","sourceRoot":"","sources":["../../../src/actions/documents/deleteDocument.ts"],"names":[],"mappings":";;AAOA,wCAiBC;AAnBD,2DAAyD;AAElD,KAAK,UAAU,cAAc,CAClC,GAAqB,EACrB,EAAmB,EACnB,OAAoC;IAEpC,IAAI,CAAC,IAAA,mCAAiB,EAAC,EAAE,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAA;IACxC,CAAC;IAED,MAAM,cAAc,GAAG,OAAO,EAAE,UAAU,IAAI,GAAG,CAAC,IAAI,EAAE,CAAA;IAExD,OAAO,MAAM,GAAG,CAAC,UAAU,CAAC,OAAO,CACjC,gBAAgB,cAAc,cAAc,EAAE,EAAE,EAChD;QACE,MAAM,EAAE,QAAQ;KACjB,CACF,CAAA;AACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Readable } from 'stream';
|
|
2
|
-
import type { TypesenseDocument, TypesenseExportFormat, TypesenseExportOptions, TypesenseCollectionOptions } from '../../typesense.model';
|
|
1
|
+
import { Readable } from 'node:stream';
|
|
3
2
|
import type { TypesenseContext } from '../../types';
|
|
3
|
+
import type { TypesenseCollectionOptions, TypesenseDocument, TypesenseExportFormat, TypesenseExportOptions } from '../../typesense.model';
|
|
4
4
|
export declare function exportDocuments<T extends Record<string, any>>(ctx: TypesenseContext, format?: TypesenseExportFormat, options?: TypesenseExportOptions & TypesenseCollectionOptions): Promise<string | TypesenseDocument<T>[]>;
|
|
5
|
-
export declare function exportDocumentsStream<
|
|
5
|
+
export declare function exportDocumentsStream<_T extends Record<string, any>>(ctx: TypesenseContext, options?: TypesenseExportOptions & TypesenseCollectionOptions): Promise<Readable>;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.exportDocuments = exportDocuments;
|
|
4
4
|
exports.exportDocumentsStream = exportDocumentsStream;
|
|
5
|
-
const
|
|
6
|
-
const typesense_model_1 = require("../../typesense.model");
|
|
5
|
+
const node_stream_1 = require("node:stream");
|
|
7
6
|
const export_formatter_1 = require("../../components/export-formatter");
|
|
7
|
+
const typesense_model_1 = require("../../typesense.model");
|
|
8
8
|
async function exportDocuments(ctx, format = 'jsonl', options) {
|
|
9
9
|
// Validate format
|
|
10
10
|
const supportedFormats = ['jsonl', 'json', 'csv'];
|
|
@@ -12,7 +12,7 @@ async function exportDocuments(ctx, format = 'jsonl', options) {
|
|
|
12
12
|
throw new typesense_model_1.TypesenseError(`Unsupported export format: ${format}`, 400);
|
|
13
13
|
}
|
|
14
14
|
const collectionName = options?.collection || ctx.fqcn();
|
|
15
|
-
const { collection, ...exportOptions } = options || {};
|
|
15
|
+
const { collection: _, ...exportOptions } = options || {};
|
|
16
16
|
const searchParams = {
|
|
17
17
|
...exportOptions
|
|
18
18
|
// Note: Typesense export always returns JSONL regardless of format param
|
|
@@ -26,7 +26,7 @@ async function exportDocuments(ctx, format = 'jsonl', options) {
|
|
|
26
26
|
.filter(line => line.trim())
|
|
27
27
|
.map(line => JSON.parse(line));
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
if (format === 'csv') {
|
|
30
30
|
// For small datasets, convert JSONL to CSV
|
|
31
31
|
const documents = response
|
|
32
32
|
.split('\n')
|
|
@@ -38,7 +38,7 @@ async function exportDocuments(ctx, format = 'jsonl', options) {
|
|
|
38
38
|
}
|
|
39
39
|
async function exportDocumentsStream(ctx, options) {
|
|
40
40
|
const collectionName = options?.collection || ctx.fqcn();
|
|
41
|
-
const { collection, ...exportOptions } = options || {};
|
|
41
|
+
const { collection: _, ...exportOptions } = options || {};
|
|
42
42
|
const searchParams = {
|
|
43
43
|
...exportOptions
|
|
44
44
|
};
|
|
@@ -46,6 +46,6 @@ async function exportDocumentsStream(ctx, options) {
|
|
|
46
46
|
.stream(`/collections/${collectionName}/documents/export`, {
|
|
47
47
|
searchParams
|
|
48
48
|
})
|
|
49
|
-
.then(stream =>
|
|
49
|
+
.then(stream => node_stream_1.Readable.fromWeb(stream));
|
|
50
50
|
}
|
|
51
51
|
//# sourceMappingURL=exportDocuments.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exportDocuments.js","sourceRoot":"","sources":["../../../src/actions/documents/exportDocuments.ts"],"names":[],"mappings":";;AAWA,
|
|
1
|
+
{"version":3,"file":"exportDocuments.js","sourceRoot":"","sources":["../../../src/actions/documents/exportDocuments.ts"],"names":[],"mappings":";;AAWA,0CA0CC;AAED,sDAeC;AAtED,6CAAsC;AACtC,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AAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;QAEhC,OAAO,kCAAe,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;IAC7C,CAAC;IAED,OAAO,QAAQ,CAAA;AACjB,CAAC;AAEM,KAAK,UAAU,qBAAqB,CACzC,GAAqB,EACrB,OAA6D;IAE7D,MAAM,cAAc,GAAG,OAAO,EAAE,UAAU,IAAI,GAAG,CAAC,IAAI,EAAE,CAAA;IACxD,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,aAAa,EAAE,GAAG,OAAO,IAAI,EAAE,CAAA;IACzD,MAAM,YAAY,GAAQ;QACxB,GAAG,aAAa;KACjB,CAAA;IAED,OAAO,GAAG,CAAC,UAAU;SAClB,MAAM,CAAC,gBAAgB,cAAc,mBAAmB,EAAE;QACzD,YAAY;KACb,CAAC;SACD,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,sBAAQ,CAAC,OAAO,CAAC,MAAa,CAAC,CAAC,CAAA;AACpD,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TypesenseDocument, TypesenseCollectionOptions } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseCollectionOptions, TypesenseDocument } from '../../typesense.model';
|
|
3
3
|
export declare function getDocumentById<T extends Record<string, any>>(ctx: TypesenseContext, id: string | number, options?: TypesenseCollectionOptions): Promise<TypesenseDocument<T>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDocumentById.js","sourceRoot":"","sources":["../../../src/actions/documents/getDocumentById.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"getDocumentById.js","sourceRoot":"","sources":["../../../src/actions/documents/getDocumentById.ts"],"names":[],"mappings":";;AAOA,0CAcC;AAhBD,2DAAyD;AAElD,KAAK,UAAU,eAAe,CACnC,GAAqB,EACrB,EAAmB,EACnB,OAAoC;IAEpC,IAAI,CAAC,IAAA,mCAAiB,EAAC,EAAE,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAA;IACxC,CAAC;IAED,MAAM,cAAc,GAAG,OAAO,EAAE,UAAU,IAAI,GAAG,CAAC,IAAI,EAAE,CAAA;IAExD,OAAO,MAAM,GAAG,CAAC,UAAU,CAAC,OAAO,CACjC,gBAAgB,cAAc,cAAc,EAAE,EAAE,CACjD,CAAA;AACH,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Readable } from 'stream';
|
|
2
|
-
import type { TypesenseDocument, TypesenseImportResult, TypesenseImportFormat, TypesenseImportOptions, TypesenseCollectionOptions } from '../../typesense.model';
|
|
1
|
+
import { Readable } from 'node:stream';
|
|
3
2
|
import type { TypesenseContext } from '../../types';
|
|
3
|
+
import type { TypesenseCollectionOptions, TypesenseDocument, TypesenseImportFormat, TypesenseImportOptions, TypesenseImportResult } from '../../typesense.model';
|
|
4
4
|
export declare function importDocuments<T extends Record<string, any>>(ctx: TypesenseContext, documents: TypesenseDocument<T>[] | string | Readable, format?: TypesenseImportFormat, importOptions?: TypesenseImportOptions, collectionOptions?: TypesenseCollectionOptions): Promise<TypesenseImportResult[]>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.importDocuments = importDocuments;
|
|
4
|
-
const
|
|
5
|
-
const typesense_model_1 = require("../../typesense.model");
|
|
4
|
+
const node_stream_1 = require("node:stream");
|
|
6
5
|
const export_formatter_1 = require("../../components/export-formatter");
|
|
6
|
+
const typesense_model_1 = require("../../typesense.model");
|
|
7
7
|
async function importDocuments(ctx, documents, format = 'jsonl', importOptions, collectionOptions) {
|
|
8
8
|
// Validate format
|
|
9
9
|
const supportedFormats = ['jsonl', 'json', 'csv'];
|
|
@@ -12,22 +12,24 @@ async function importDocuments(ctx, documents, format = 'jsonl', importOptions,
|
|
|
12
12
|
}
|
|
13
13
|
const collectionName = collectionOptions?.collection || ctx.fqcn();
|
|
14
14
|
let bodyStream;
|
|
15
|
-
if (documents instanceof
|
|
15
|
+
if (documents instanceof node_stream_1.Readable) {
|
|
16
16
|
bodyStream = documents;
|
|
17
17
|
}
|
|
18
18
|
else if (typeof documents === 'string') {
|
|
19
19
|
if (format === 'csv') {
|
|
20
20
|
throw new typesense_model_1.TypesenseError('CSV import requires conversion', 400);
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
if (format === 'json') {
|
|
23
23
|
// Convert JSON array string to JSONL
|
|
24
24
|
const parsedDocuments = JSON.parse(documents);
|
|
25
|
-
const jsonlData = parsedDocuments
|
|
26
|
-
|
|
25
|
+
const jsonlData = parsedDocuments
|
|
26
|
+
.map((doc) => JSON.stringify(doc))
|
|
27
|
+
.join('\n');
|
|
28
|
+
bodyStream = node_stream_1.Readable.from([jsonlData]);
|
|
27
29
|
}
|
|
28
30
|
else {
|
|
29
31
|
// Assume it's already JSONL
|
|
30
|
-
bodyStream =
|
|
32
|
+
bodyStream = node_stream_1.Readable.from([documents]);
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
else {
|
|
@@ -36,7 +38,7 @@ async function importDocuments(ctx, documents, format = 'jsonl', importOptions,
|
|
|
36
38
|
throw new typesense_model_1.TypesenseError('CSV import requires conversion', 400);
|
|
37
39
|
}
|
|
38
40
|
const formatted = export_formatter_1.ExportFormatter.formatDocuments(documents, format);
|
|
39
|
-
bodyStream =
|
|
41
|
+
bodyStream = node_stream_1.Readable.from([formatted]);
|
|
40
42
|
}
|
|
41
43
|
const searchParams = {
|
|
42
44
|
...importOptions,
|
|
@@ -47,7 +49,7 @@ async function importDocuments(ctx, documents, format = 'jsonl', importOptions,
|
|
|
47
49
|
method: 'POST',
|
|
48
50
|
body: bodyStream,
|
|
49
51
|
searchParams,
|
|
50
|
-
timeout: ctx.httpClient
|
|
52
|
+
timeout: ctx.httpClient.importTimeout
|
|
51
53
|
});
|
|
52
54
|
// Parse JSONL response to array
|
|
53
55
|
return response
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"importDocuments.js","sourceRoot":"","sources":["../../../src/actions/documents/importDocuments.ts"],"names":[],"mappings":";;AAYA,
|
|
1
|
+
{"version":3,"file":"importDocuments.js","sourceRoot":"","sources":["../../../src/actions/documents/importDocuments.ts"],"names":[],"mappings":";;AAYA,0CA+DC;AA3ED,6CAAsC;AACtC,wEAAmE;AASnE,2DAAsD;AAE/C,KAAK,UAAU,eAAe,CACnC,GAAqB,EACrB,SAAqD,EACrD,SAAgC,OAAO,EACvC,aAAsC,EACtC,iBAA8C;IAE9C,kBAAkB;IAClB,MAAM,gBAAgB,GAA4B,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAA;IAC1E,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,gCAAc,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAA;IACrD,CAAC;IAED,MAAM,cAAc,GAAG,iBAAiB,EAAE,UAAU,IAAI,GAAG,CAAC,IAAI,EAAE,CAAA;IAClE,IAAI,UAAoB,CAAA;IAExB,IAAI,SAAS,YAAY,sBAAQ,EAAE,CAAC;QAClC,UAAU,GAAG,SAAS,CAAA;IACxB,CAAC;SAAM,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;QACzC,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;YACrB,MAAM,IAAI,gCAAc,CAAC,gCAAgC,EAAE,GAAG,CAAC,CAAA;QACjE,CAAC;QACD,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;YACtB,qCAAqC;YACrC,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;YAC7C,MAAM,SAAS,GAAG,eAAe;iBAC9B,GAAG,CAAC,CAAC,GAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,C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equiredId } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseCollectionOptions, TypesenseDocument, WithRequiredId } from '../../typesense.model';
|
|
3
3
|
export declare function insertDocument<TDoc extends Record<string, any>>(ctx: TypesenseContext<TDoc>, document: WithRequiredId<TDoc>, options?: TypesenseCollectionOptions): Promise<TypesenseDocument<TDoc>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insertDocument.js","sourceRoot":"","sources":["../../../src/actions/documents/insertDocument.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"insertDocument.js","sourceRoot":"","sources":["../../../src/actions/documents/insertDocument.ts"],"names":[],"mappings":";;AASA,wCAgDC;AAnDD,2DAAyE;AACzE,gFAA4E;AAErE,KAAK,UAAU,cAAc,CAClC,GAA2B,EAC3B,QAA8B,EAC9B,OAAoC;IAEpC,IAAI,CAAC,IAAA,mCAAiB,EAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,gCAAc,CAAC,+BAA+B,EAAE,GAAG,CAAC,CAAA;IAChE,CAAC;IAED,MAAM,cAAc,GAAG,OAAO,EAAE,UAAU,IAAI,GAAG,CAAC,IAAI,EAAE,CAAA;IAExD,IAAI,CAAC;QACH,OAAO,MAAM,GAAG,CAAC,UAAU,CAAC,OAAO,CACjC,gBAAgB,cAAc,YAAY,EAC1C;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,QAAQ;SACf,CACF,CAAA;IACH,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,oCAAoC;QACpC,IACE,GAAG,CAAC,oBAAoB;YACxB,CAAC,KAAK,CAAC,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,QAAQ,EAAE,MAAM,KAAK,GAAG,CAAC,EACxD,CAAC;YACD,6BAA6B;YAC7B,MAAM,cAAc,GAAG,GAAG,CAAC,aAAa,CAAC,uBAAuB,CAC9D,QAAQ,EACR,cAAc,CACf,CAAA;YAED,oBAAoB;YACpB,MAAM,IAAA,6CAAqB,EAAC,GAAG,EAAE;gBAC/B,GAAG,cAAc;gBACjB,IAAI,EAAE,cAAc;aACrB,CAAC,CAAA;YAEF,eAAe;YACf,OAAO,MAAM,GAAG,CAAC,UAAU,CAAC,OAAO,CACjC,gBAAgB,cAAc,YAAY,EAC1C;gBACE,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,QAAQ;aACf,CACF,CAAA;QACH,CAAC;QACD,MAAM,KAAK,CAAA;IACb,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TypesenseDocument, TypesenseCollectionOptions } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseCollectionOptions, TypesenseDocument } from '../../typesense.model';
|
|
3
3
|
export declare function updateDocument<TDoc extends Record<string, any>>(ctx: TypesenseContext<TDoc>, document: Partial<TypesenseDocument<TDoc>> & {
|
|
4
4
|
id: string | number;
|
|
5
5
|
}, options?: TypesenseCollectionOptions): Promise<TypesenseDocument<TDoc>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateDocument.js","sourceRoot":"","sources":["../../../src/actions/documents/updateDocument.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"updateDocument.js","sourceRoot":"","sources":["../../../src/actions/documents/updateDocument.ts"],"names":[],"mappings":";;AAOA,wCAkBC;AApBD,2DAAyE;AAElE,KAAK,UAAU,cAAc,CAClC,GAA2B,EAC3B,QAAoE,EACpE,OAAoC;IAEpC,IAAI,CAAC,IAAA,mCAAiB,EAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,gCAAc,CAAC,6CAA6C,EAAE,GAAG,CAAC,CAAA;IAC9E,CAAC;IAED,MAAM,cAAc,GAAG,OAAO,EAAE,UAAU,IAAI,GAAG,CAAC,IAAI,EAAE,CAAA;IAExD,OAAO,MAAM,GAAG,CAAC,UAAU,CAAC,OAAO,CACjC,gBAAgB,cAAc,cAAc,QAAQ,CAAC,EAAE,EAAE,EACzD;QACE,MAAM,EAAE,OAAO;QACf,IAAI,EAAE,QAAQ;KACf,CACF,CAAA;AACH,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TypesenseDocument, TypesenseCollectionOptions, WithRequiredId } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseCollectionOptions, TypesenseDocument, WithRequiredId } from '../../typesense.model';
|
|
3
3
|
export declare function upsertDocument<TDoc extends Record<string, any>>(ctx: TypesenseContext<TDoc>, document: WithRequiredId<TDoc>, options?: TypesenseCollectionOptions): Promise<TypesenseDocument<TDoc>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upsertDocument.js","sourceRoot":"","sources":["../../../src/actions/documents/upsertDocument.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"upsertDocument.js","sourceRoot":"","sources":["../../../src/actions/documents/upsertDocument.ts"],"names":[],"mappings":";;AAQA,wCAmBC;AArBD,2DAAyE;AAElE,KAAK,UAAU,cAAc,CAClC,GAA2B,EAC3B,QAA8B,EAC9B,OAAoC;IAEpC,IAAI,CAAC,IAAA,mCAAiB,EAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,gCAAc,CAAC,+BAA+B,EAAE,GAAG,CAAC,CAAA;IAChE,CAAC;IAED,MAAM,cAAc,GAAG,OAAO,EAAE,UAAU,IAAI,GAAG,CAAC,IAAI,EAAE,CAAA;IAExD,OAAO,MAAM,GAAG,CAAC,UAAU,CAAC,OAAO,CACjC,gBAAgB,cAAc,YAAY,EAC1C;QACE,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;KACnC,CACF,CAAA;AACH,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TypesenseOverrideResponse, TypesenseCollectionOptions } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseCollectionOptions, TypesenseOverrideResponse } from '../../typesense.model';
|
|
3
3
|
export declare function deleteOverride(ctx: TypesenseContext, overrideId: string, options?: TypesenseCollectionOptions): Promise<TypesenseOverrideResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteOverride.js","sourceRoot":"","sources":["../../../src/actions/overrides/deleteOverride.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"deleteOverride.js","sourceRoot":"","sources":["../../../src/actions/overrides/deleteOverride.ts"],"names":[],"mappings":";;AAMA,wCAWC;AAXM,KAAK,UAAU,cAAc,CAClC,GAAqB,EACrB,UAAkB,EAClB,OAAoC;IAEpC,MAAM,cAAc,GAAG,OAAO,EAAE,UAAU,IAAI,GAAG,CAAC,IAAI,EAAE,CAAA;IAExD,OAAO,MAAM,GAAG,CAAC,UAAU,CAAC,OAAO,CACjC,gBAAgB,cAAc,cAAc,UAAU,EAAE,EACxD,EAAE,MAAM,EAAE,QAAQ,EAAE,CACrB,CAAA;AACH,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TypesenseOverrideResponse, TypesenseCollectionOptions } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseCollectionOptions, TypesenseOverrideResponse } from '../../typesense.model';
|
|
3
3
|
export declare function getOverride(ctx: TypesenseContext, overrideId: string, options?: TypesenseCollectionOptions): Promise<TypesenseOverrideResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getOverride.js","sourceRoot":"","sources":["../../../src/actions/overrides/getOverride.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"getOverride.js","sourceRoot":"","sources":["../../../src/actions/overrides/getOverride.ts"],"names":[],"mappings":";;AAMA,kCAUC;AAVM,KAAK,UAAU,WAAW,CAC/B,GAAqB,EACrB,UAAkB,EAClB,OAAoC;IAEpC,MAAM,cAAc,GAAG,OAAO,EAAE,UAAU,IAAI,GAAG,CAAC,IAAI,EAAE,CAAA;IAExD,OAAO,MAAM,GAAG,CAAC,UAAU,CAAC,OAAO,CACjC,gBAAgB,cAAc,cAAc,UAAU,EAAE,CACzD,CAAA;AACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TypesenseOverrideResponse, TypesenseCollectionOptions } from '../../typesense.model';
|
|
2
1
|
import type { TypesenseContext } from '../../types';
|
|
2
|
+
import type { TypesenseCollectionOptions, TypesenseOverrideResponse } from '../../typesense.model';
|
|
3
3
|
export declare function listOverrides(ctx: TypesenseContext, options?: TypesenseCollectionOptions): Promise<{
|
|
4
4
|
overrides: TypesenseOverrideResponse[];
|
|
5
5
|
}>;
|