@instantdb/admin
Advanced tools
Comparing version 0.12.19-experimental.0 to 0.12.19-experimental.1
@@ -163,6 +163,6 @@ import { tx, lookup, TransactionChunk, i, User, AuthToken, id } from "@instantdb/core"; | ||
declare function init<Schema = {}>(config: Config): InstantAdmin<Schema>; | ||
declare function init_experimental<Schema extends i.InstantGraph<any, any, any>, WithCardinalityInference extends boolean = true>(config: Config): InstantAdmin<Schema & { | ||
declare function init_experimental<Schema extends i.InstantGraph<any, any, any>, WithCardinalityInference extends boolean = true>(config: Config & { | ||
schema: Schema; | ||
cardinalityInference?: WithCardinalityInference; | ||
}>; | ||
}): InstantAdmin<Schema>; | ||
/** | ||
@@ -169,0 +169,0 @@ * |
@@ -145,2 +145,6 @@ "use strict"; | ||
this.query = (query) => { | ||
const withInference = Boolean(this.config.schema) && | ||
("cardinalityInference" in this.config | ||
? Boolean(this.config.cardinalityInference) | ||
: true); | ||
return jsonFetch(`${this.config.apiURI}/admin/query`, { | ||
@@ -151,3 +155,3 @@ method: "POST", | ||
query: query, | ||
"inference?": Boolean(this.config.schema), | ||
"inference?": withInference, | ||
}), | ||
@@ -154,0 +158,0 @@ }); |
@@ -163,6 +163,6 @@ import { tx, lookup, TransactionChunk, i, User, AuthToken, id } from "@instantdb/core"; | ||
declare function init<Schema = {}>(config: Config): InstantAdmin<Schema>; | ||
declare function init_experimental<Schema extends i.InstantGraph<any, any, any>, WithCardinalityInference extends boolean = true>(config: Config): InstantAdmin<Schema & { | ||
declare function init_experimental<Schema extends i.InstantGraph<any, any, any>, WithCardinalityInference extends boolean = true>(config: Config & { | ||
schema: Schema; | ||
cardinalityInference?: WithCardinalityInference; | ||
}>; | ||
}): InstantAdmin<Schema>; | ||
/** | ||
@@ -169,0 +169,0 @@ * |
@@ -136,2 +136,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
this.query = (query) => { | ||
const withInference = Boolean(this.config.schema) && | ||
("cardinalityInference" in this.config | ||
? Boolean(this.config.cardinalityInference) | ||
: true); | ||
return jsonFetch(`${this.config.apiURI}/admin/query`, { | ||
@@ -142,3 +146,3 @@ method: "POST", | ||
query: query, | ||
"inference?": Boolean(this.config.schema), | ||
"inference?": withInference, | ||
}), | ||
@@ -145,0 +149,0 @@ }); |
{ | ||
"name": "@instantdb/admin", | ||
"version": "v0.12.19-experimental.0", | ||
"version": "v0.12.19-experimental.1", | ||
"description": "Admin SDK for Instant DB", | ||
@@ -27,4 +27,4 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@instantdb/core": "v0.12.19-experimental.0" | ||
"@instantdb/core": "v0.12.19-experimental.1" | ||
} | ||
} |
@@ -354,9 +354,9 @@ import { | ||
WithCardinalityInference extends boolean = true, | ||
>(config: Config) { | ||
return new InstantAdmin< | ||
Schema & { | ||
schema: Schema; | ||
cardinalityInference?: WithCardinalityInference; | ||
} | ||
>(config); | ||
>( | ||
config: Config & { | ||
schema: Schema; | ||
cardinalityInference?: WithCardinalityInference; | ||
}, | ||
) { | ||
return new InstantAdmin<Schema>(config); | ||
} | ||
@@ -429,2 +429,8 @@ | ||
): Promise<QueryResponse<Q, Schema>> => { | ||
const withInference = | ||
Boolean(this.config.schema) && | ||
("cardinalityInference" in this.config | ||
? Boolean(this.config.cardinalityInference) | ||
: true); | ||
return jsonFetch(`${this.config.apiURI}/admin/query`, { | ||
@@ -435,3 +441,3 @@ method: "POST", | ||
query: query, | ||
"inference?": Boolean(this.config.schema), | ||
"inference?": withInference, | ||
}), | ||
@@ -438,0 +444,0 @@ }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
127945
2608