@squidcloud/client 1.0.157 → 1.0.158
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/cjs/index.js +20 -11
- package/dist/internal-common/src/public-types/integration-types.d.ts +1 -0
- package/dist/internal-common/src/public-types/integrations/auth.types.d.ts +6 -0
- package/dist/internal-common/src/public-types/integrations/schemas.d.ts +3 -2
- package/dist/internal-common/src/public-utils/id-utils.d.ts +2 -0
- package/dist/internal-common/src/schema/schema.types.d.ts +4 -4
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -27937,6 +27937,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
27937
27937
|
ClientConnectionState: () => (/* reexport */ ClientConnectionState),
|
|
27938
27938
|
CollectionReference: () => (/* reexport */ CollectionReference),
|
|
27939
27939
|
CronExpression: () => (/* reexport */ CronExpression),
|
|
27940
|
+
DEFAULT_SHORT_ID_LENGTH: () => (/* reexport */ DEFAULT_SHORT_ID_LENGTH),
|
|
27940
27941
|
DatabaseIntegrationTypes: () => (/* reexport */ DatabaseIntegrationTypes),
|
|
27941
27942
|
DistributedLockContext: () => (/* reexport */ DistributedLockContext),
|
|
27942
27943
|
DocumentReference: () => (/* reexport */ DocumentReference),
|
|
@@ -27958,6 +27959,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
27958
27959
|
QueryBuilder: () => (/* reexport */ QueryBuilder),
|
|
27959
27960
|
QueryContext: () => (/* reexport */ QueryContext),
|
|
27960
27961
|
QueryMappingManager: () => (/* reexport */ QueryMappingManager),
|
|
27962
|
+
SQUID_CLOUD_IDS: () => (/* reexport */ SQUID_CLOUD_IDS),
|
|
27961
27963
|
Squid: () => (/* reexport */ Squid),
|
|
27962
27964
|
SquidPlaceholderId: () => (/* reexport */ SquidPlaceholderId),
|
|
27963
27965
|
SupportedSquidRegions: () => (/* reexport */ SupportedSquidRegions),
|
|
@@ -28633,6 +28635,7 @@ var IntegrationType;
|
|
|
28633
28635
|
IntegrationType["ai_chatbot"] = "ai_chatbot";
|
|
28634
28636
|
IntegrationType["cognito"] = "cognito";
|
|
28635
28637
|
IntegrationType["okta"] = "okta";
|
|
28638
|
+
IntegrationType["descope"] = "descope";
|
|
28636
28639
|
// Coming Soon
|
|
28637
28640
|
IntegrationType["algolia"] = "algolia";
|
|
28638
28641
|
IntegrationType["elastic_observability"] = "elastic_observability";
|
|
@@ -28711,6 +28714,7 @@ const AuthIntegrationTypes = [
|
|
|
28711
28714
|
IntegrationType.jwt_hmac,
|
|
28712
28715
|
IntegrationType.cognito,
|
|
28713
28716
|
IntegrationType.okta,
|
|
28717
|
+
IntegrationType.descope,
|
|
28714
28718
|
];
|
|
28715
28719
|
function isDataIntegrationType(type) {
|
|
28716
28720
|
return DatabaseIntegrationTypes.includes(type);
|
|
@@ -29644,6 +29648,8 @@ class QueryContext {
|
|
|
29644
29648
|
|
|
29645
29649
|
;// CONCATENATED MODULE: ../internal-common/src/public-types/regions.ts
|
|
29646
29650
|
|
|
29651
|
+
/** @internal */
|
|
29652
|
+
const SQUID_CLOUD_IDS = ['aws', 'gcp', 'azure'];
|
|
29647
29653
|
/**
|
|
29648
29654
|
* The list of supported Squid regions.
|
|
29649
29655
|
* @internal
|
|
@@ -29757,8 +29763,10 @@ function generateId() {
|
|
|
29757
29763
|
return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16);
|
|
29758
29764
|
});
|
|
29759
29765
|
}
|
|
29766
|
+
/** Default length if ID produced by `generateShortId`. */
|
|
29767
|
+
const DEFAULT_SHORT_ID_LENGTH = 18;
|
|
29760
29768
|
/** Generates an ID of the given `length` using lowercase latin letters and digits.. */
|
|
29761
|
-
function generateShortId(length =
|
|
29769
|
+
function generateShortId(length = DEFAULT_SHORT_ID_LENGTH) {
|
|
29762
29770
|
const characters = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
|
29763
29771
|
let id = '';
|
|
29764
29772
|
for (let i = 0; i < length; i++) {
|
|
@@ -45711,12 +45719,13 @@ const kotlinControllers = [
|
|
|
45711
45719
|
'native-query',
|
|
45712
45720
|
'application-kotlin',
|
|
45713
45721
|
'openapi',
|
|
45722
|
+
'secret',
|
|
45714
45723
|
];
|
|
45715
45724
|
function getApplicationUrl(regionPrefix, appId, path) {
|
|
45716
45725
|
const baseUrl = 'https://squid.cloud';
|
|
45717
45726
|
const parsedBaseUrl = new URL(baseUrl);
|
|
45718
45727
|
parsedBaseUrl.host = `${appId}.${regionPrefix}.${parsedBaseUrl.host}`;
|
|
45719
|
-
const controller = path.split('/')[0] || '';
|
|
45728
|
+
const controller = path.replace(/^\//g, '').split('/')[0] || '';
|
|
45720
45729
|
if (isLocal(regionPrefix)) {
|
|
45721
45730
|
parsedBaseUrl.protocol = 'http';
|
|
45722
45731
|
parsedBaseUrl.port = kotlinControllers.includes(controller) ? '8001' : '8000';
|
|
@@ -48338,25 +48347,25 @@ class SecretClient {
|
|
|
48338
48347
|
}
|
|
48339
48348
|
async get(key) {
|
|
48340
48349
|
const request = { key };
|
|
48341
|
-
return (await this.rpcManager.post('
|
|
48350
|
+
return (await this.rpcManager.post('secret/get', request)) || undefined;
|
|
48342
48351
|
}
|
|
48343
48352
|
getAll() {
|
|
48344
|
-
return this.rpcManager.post('
|
|
48353
|
+
return this.rpcManager.post('secret/getAll', {});
|
|
48345
48354
|
}
|
|
48346
48355
|
upsert(key, value) {
|
|
48347
48356
|
return this.upsertMany([{ key, value }]).then(entries => entries[0]);
|
|
48348
48357
|
}
|
|
48349
48358
|
upsertMany(entries) {
|
|
48350
48359
|
const request = { entries };
|
|
48351
|
-
return this.rpcManager.post('
|
|
48360
|
+
return this.rpcManager.post('secret/upsert', request);
|
|
48352
48361
|
}
|
|
48353
48362
|
delete(key) {
|
|
48354
48363
|
const request = { keys: [key] };
|
|
48355
|
-
return this.rpcManager.post('
|
|
48364
|
+
return this.rpcManager.post('secret/delete', request);
|
|
48356
48365
|
}
|
|
48357
48366
|
deleteMany(keys) {
|
|
48358
48367
|
const request = { keys };
|
|
48359
|
-
return this.rpcManager.post('
|
|
48368
|
+
return this.rpcManager.post('secret/delete', request);
|
|
48360
48369
|
}
|
|
48361
48370
|
get apiKeys() {
|
|
48362
48371
|
return new ApiKeysSecretClient(this.rpcManager);
|
|
@@ -48368,18 +48377,18 @@ class ApiKeysSecretClient {
|
|
|
48368
48377
|
}
|
|
48369
48378
|
get(key) {
|
|
48370
48379
|
const request = { key };
|
|
48371
|
-
return this.rpcManager.post('
|
|
48380
|
+
return this.rpcManager.post('secret/api-key/get', request);
|
|
48372
48381
|
}
|
|
48373
48382
|
getAll() {
|
|
48374
|
-
return this.rpcManager.post('
|
|
48383
|
+
return this.rpcManager.post('secret/api-key/getAll', {});
|
|
48375
48384
|
}
|
|
48376
48385
|
upsert(key) {
|
|
48377
48386
|
const request = { key };
|
|
48378
|
-
return this.rpcManager.post('
|
|
48387
|
+
return this.rpcManager.post('secret/api-key/upsert', request);
|
|
48379
48388
|
}
|
|
48380
48389
|
delete(key) {
|
|
48381
48390
|
const request = { key };
|
|
48382
|
-
return this.rpcManager.post('
|
|
48391
|
+
return this.rpcManager.post('secret/api-key/delete', request);
|
|
48383
48392
|
}
|
|
48384
48393
|
}
|
|
48385
48394
|
|
|
@@ -46,3 +46,9 @@ export interface JwtHmacIntegrationConfig extends BaseIntegrationConfig {
|
|
|
46
46
|
verifyUri?: string;
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
+
export interface DescopeIntegrationConfig extends BaseIntegrationConfig {
|
|
50
|
+
type: IntegrationType.descope;
|
|
51
|
+
configuration: {
|
|
52
|
+
projectId: string;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AiChatbotIntegrationConfig } from './ai_chatbot.types';
|
|
2
2
|
import { GraphQLIntegrationConfig, HttpApiIntegrationConfig, IntegrationApiSchema, IntegrationGraphQLSchema, TestGraphQLDataConnectionRequest } from './api.types';
|
|
3
|
-
import { Auth0IntegrationConfig, CognitoIntegrationConfig, JwtHmacIntegrationConfig, JwtRsaIntegrationConfig, OktaIntegrationConfig } from './auth.types';
|
|
3
|
+
import { Auth0IntegrationConfig, CognitoIntegrationConfig, DescopeIntegrationConfig, JwtHmacIntegrationConfig, JwtRsaIntegrationConfig, OktaIntegrationConfig } from './auth.types';
|
|
4
4
|
import { BaseDatabaseIntegrationConfig, BigQueryIntegrationConfig, CockroachIntegrationConfig, IntegrationDataSchema, InternalIntegrationConfig, MongoIntegrationConfig, MssqlIntegrationConfig, MySqlIntegrationConfig, OracleIntegrationConfig, PinotIntegrationConfig, PostgresIntegrationConfig, SnowflakeIntegrationConfig, TestDataConnectionRequest } from './database.types';
|
|
5
5
|
import { DatadogIntegrationConfig, NewRelicIntegrationConfig } from './observability.types';
|
|
6
6
|
import { IntegrationId } from '../communication.types';
|
|
@@ -26,6 +26,7 @@ export interface IntegrationConfigTypes {
|
|
|
26
26
|
[IntegrationType.ai_chatbot]: AiChatbotIntegrationConfig;
|
|
27
27
|
[IntegrationType.cognito]: CognitoIntegrationConfig;
|
|
28
28
|
[IntegrationType.okta]: OktaIntegrationConfig;
|
|
29
|
+
[IntegrationType.descope]: DescopeIntegrationConfig;
|
|
29
30
|
}
|
|
30
31
|
export interface IntegrationSchemaTypes {
|
|
31
32
|
[IntegrationType.built_in_db]: IntegrationDataSchema;
|
|
@@ -50,7 +51,7 @@ export type DatabaseIntegrationType = (typeof DatabaseIntegrationTypes)[number];
|
|
|
50
51
|
export type DatabaseIntegrationConfig = IntegrationConfigTypes[DatabaseIntegrationType];
|
|
51
52
|
export declare const ApiIntegrationTypes: readonly [IntegrationType.api, IntegrationType.graphql];
|
|
52
53
|
export declare const ObservabilityIntegrationTypes: readonly [IntegrationType.datadog, IntegrationType.newrelic];
|
|
53
|
-
export declare const AuthIntegrationTypes: readonly [IntegrationType.auth0, IntegrationType.jwt_rsa, IntegrationType.jwt_hmac, IntegrationType.cognito, IntegrationType.okta];
|
|
54
|
+
export declare const AuthIntegrationTypes: readonly [IntegrationType.auth0, IntegrationType.jwt_rsa, IntegrationType.jwt_hmac, IntegrationType.cognito, IntegrationType.okta, IntegrationType.descope];
|
|
54
55
|
export type ApiIntegrationType = (typeof ApiIntegrationTypes)[number];
|
|
55
56
|
export type ApiIntegrationConfig = IntegrationConfigTypes[ApiIntegrationType];
|
|
56
57
|
export type ObservabilityIntegrationType = (typeof ObservabilityIntegrationTypes)[number];
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/** Generates a UUID-style ID. */
|
|
2
2
|
export declare function generateId(): string;
|
|
3
|
+
/** Default length if ID produced by `generateShortId`. */
|
|
4
|
+
export declare const DEFAULT_SHORT_ID_LENGTH = 18;
|
|
3
5
|
/** Generates an ID of the given `length` using lowercase latin letters and digits.. */
|
|
4
6
|
export declare function generateShortId(length?: number): string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { JSONSchema } from 'json-schema-typed';
|
|
2
2
|
export type FieldPlaceholder = '__SQUID_SERVER_TIMESTAMP__' | '__SQUID_CLIENT_IP__' | '__SQUID_USER_ID__' | '__SQUID_API_KEY__';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
3
|
+
export declare const BASIC_FIELD_TYPES: readonly ["string", "integer", "number", "boolean", "map", "array", "any"];
|
|
4
|
+
export declare const CUSTOM_FIELD_TYPES: readonly ["date", "json", "objectId"];
|
|
5
|
+
export declare const DATA_SCHEMA_FIELD_TYPES: readonly ["string", "integer", "number", "boolean", "map", "array", "any", "date", "json", "objectId"];
|
|
6
|
+
export type DataSchemaFieldType = (typeof DATA_SCHEMA_FIELD_TYPES)[number];
|
|
7
7
|
type ConvertDeep<T extends JSONSchema> = Exclude<T, boolean> & {
|
|
8
8
|
properties?: Record<string, ConvertDeep<JSONSchema>>;
|
|
9
9
|
patternProperties?: Record<string, ConvertDeep<JSONSchema>>;
|