Skip to main content

@squidcloud/client

Enumerations

Classes

Interfaces

Type Aliases

AiActionType

Ƭ AiActionType: "chat" | "mutate" | "all"

Types of actions that can be performed on an AI chatbot.


AiAgentConfiguration

Ƭ AiAgentConfiguration: Object

Type declaration

NameType
apiKey?string

AiAgentContextMetadata

Ƭ AiAgentContextMetadata: Object

Type declaration

NameType
previewboolean
sizeBytes?number
textstring
titlestring
type?"text" | "url" | "file"

AiAgentData

Ƭ AiAgentData: Pick<AiAgentMetadata, typeof MUTABLE_AI_AGENT_METADATA_FIELDS[number]>


AiAgentId

Ƭ AiAgentId: string

ID of AI agent. Also known as AI profile id.


AiAgentMetadata

Ƭ AiAgentMetadata: Object

Type declaration

NameTypeDescription
auditLog?boolean-
connectedAgents?AiConnectedAgentMetadata[]List of child AI agents that can be used by the current agent.
connectedIntegrations?AiConnectedIntegrationMetadata[]List of connected integrations.
description?string-
embeddingModelName?AiEmbeddingsModelName'text-embedding-ada-002' if undefined.
feedbackInstructions?string-
functions?FunctionName[]List of AI functions attached to the profile by default.
instructionsRecord<string, string>-
isPublicboolean-
modelNameAiChatModelName-
strictContext?boolean-
vectorDbType?VectorDbType'pinecone' if undefined.

AiAudioCreateSpeechModelName

Ƭ AiAudioCreateSpeechModelName: typeof OPENAI_AUDIO_CREATE_SPEECH_MODEL_NAMES[number]


AiAudioCreateSpeechOptions

Ƭ AiAudioCreateSpeechOptions: OpenAiCreateSpeechOptions


AiAudioModelName

Ƭ AiAudioModelName: typeof OPENAI_AUDIO_MODEL_NAMES[number]


AiAudioTranscribeOptions

Ƭ AiAudioTranscribeOptions: WhisperOptions


AiAudioTranscriptionModelName

Ƭ AiAudioTranscriptionModelName: typeof AI_AUDIO_TRANSCRIPTION_MODEL_NAMES[number]


AiChatModelName

Ƭ AiChatModelName: typeof AI_CHAT_MODEL_NAMES[number]


AiContext

Ƭ AiContext: AiTextContext | AiUrlContext | AiFileContext


AiContextId

Ƭ AiContextId: string


AiContextMetadata

Ƭ AiContextMetadata: Record<string, AiContextMetadataValue>


AiContextMetadataFilter

Ƭ AiContextMetadataFilter: AiContextMetadataFieldFilter | AiContextMetadataAndFilter | AiContextMetadataOrFilter


AiContextMetadataSimpleFilter

Ƭ AiContextMetadataSimpleFilter: AiContextMetadataEqFilter | AiContextMetadataNeFilter | AiContextMetadataGtFilter | AiContextMetadataGteFilter | AiContextMetadataLtFilter | AiContextMetadataLteFilter | AiContextMetadataInFilter | AiContextMetadataNinFilter | AiContextMetadataExistsFilter


AiContextMetadataValue

Ƭ AiContextMetadataValue: number | string | boolean | undefined


AiContextMetadataValueArray

Ƭ AiContextMetadataValueArray: AiContextMetadataValue[]


AiContextType

Ƭ AiContextType: "text" | "url" | "file"


AiEmbeddingsModelName

Ƭ AiEmbeddingsModelName: typeof AI_EMBEDDINGS_MODEL_NAMES[number]


AiFileUrlType

Ƭ AiFileUrlType: "image"


AiFunctionParamType

Ƭ AiFunctionParamType: "string" | "number" | "boolean" | "date"


AiGenerateImageOptions

Ƭ AiGenerateImageOptions: DallEOptions | StableDiffusionCoreOptions | FluxOptions


AiImageModelName

Ƭ AiImageModelName: typeof AI_IMAGE_MODEL_NAMES[number]


AiMutationType

Ƭ AiMutationType: "insert" | "update" | "delete" | "append" | "feedback"


AiProfileId

Ƭ AiProfileId: AiAgentId


AiResourceType

Ƭ AiResourceType: "instruction" | "profile" | "context" | "contexts"


Alias

Ƭ Alias: string

An alias for a join result. This is used to disambiguate fields in the result.


AnthropicChatModelName

Ƭ AnthropicChatModelName: typeof ANTHROPIC_CHAT_MODEL_NAMES[number]


ApiEndpointId

Ƭ ApiEndpointId: string


ApiInjectionFieldType

Ƭ ApiInjectionFieldType: typeof API_INJECTION_FIELD_TYPES[number]


ApiInjectionParameterLocation

Ƭ ApiInjectionParameterLocation: "header" | "query"


ApiInjectionSchema

Ƭ ApiInjectionSchema: Record<FieldName, ApiInjectionField>


ApiKey

Ƭ ApiKey: string

A type alias for an ApiKey.


ApiKeySource

Ƭ ApiKeySource: "user" | "system"

The possible sources for the LLM provider API key.


ApiParameterLocation

Ƭ ApiParameterLocation: "query" | "body" | "header" | "path"


ApiResponseParameterLocation

Ƭ ApiResponseParameterLocation: "header" | "body"


AppId

Ƭ AppId: string

A type alias for an application id.


ApplyStringFnPropertyMutation

Ƭ ApplyStringFnPropertyMutation: ApplyExtendString | ApplyTrimString

A property mutation that modifies a string


AskOptionsWithoutVoice

Ƭ AskOptionsWithoutVoice: Omit<AiAgentChatOptions, "voiceOptions" | "smoothTyping">


AssistantToolType

Ƭ AssistantToolType: "code_interpreter" | "file_search"


Auth

Ƭ Auth: AuthWithBearer | AuthWithApiKey

The authentication object for the current request.


AuthType

Ƭ AuthType: "Bearer" | "ApiKey"


ChatOptionsWithoutVoice

Ƭ ChatOptionsWithoutVoice: Omit<AiAgentChatOptions, "voiceOptions">


ClientId

Ƭ ClientId: string


ClientIdGeneratorFunction

Ƭ ClientIdGeneratorFunction: () => string

Type declaration

▸ (): string

@internal.

Returns

string


ClientRequestId

Ƭ ClientRequestId: string


ClientRequestIdGeneratorFunction

Ƭ ClientRequestIdGeneratorFunction: () => string

Type declaration

▸ (): string

@internal.

Returns

string


CollectionName

Ƭ CollectionName: string

A type alias for a collection name.


CollectionSchema

Ƭ CollectionSchema: Omit<ConvertDeep<JSONSchema>, "properties"> & { properties?: Record<string, TopLevelPropertySchema> }


Condition

Ƭ Condition<Doc>: SimpleCondition<Doc> | CompositeCondition<Doc>

A list of query conditions.

Type parameters

NameType
Docextends DocumentData = any

Conditions

Ƭ Conditions<Doc>: Condition<Doc>[]

Type parameters

NameType
Docextends DocumentData = any

CronExpressionString

Ƭ CronExpressionString: `${string} ${string} ${string} ${string} ${string}` | `${string} ${string} ${string} ${string}`

The supported cron expression string.


DatabaseActionType

Ƭ DatabaseActionType: "read" | "write" | "update" | "insert" | "delete" | "all"

The different types of actions that can be performed on a database.


DeepRecord

Ƭ DeepRecord<T, RemainingDepth, Prefix>: RemainingDepth extends 0 ? PropertiesWithPrefix<Prefix> : { [k in keyof T]-?: k extends string | number ? Record<`${Prefix}${k}`, T[k]> | (Required<T>[k] extends any[] ? never : Required<T>[k] extends object ? DeepRecord<Required<T>[k], Pred[RemainingDepth], `${Prefix}${k}.`> : never) : never }[keyof T]

Type parameters

NameType
TT
RemainingDepthextends number & keyof Pred = 5
Prefixextends string = ""

DestructorFn

Ƭ DestructorFn: () => Promise<void> | void

Type declaration

▸ (): Promise<void> | void

Returns

Promise<void> | void


DocId

Ƭ DocId: string

A type alias for a document id as string.


DocIdObj

Ƭ DocIdObj: Record<FieldName, any>

A type alias for a document id object when the ID is a composite of primary keys.


DocIdOrDocIdObj

Ƭ DocIdOrDocIdObj: DocId | DocIdObj

A type alias for a document id or a document id object.


DocTimestamp

Ƭ DocTimestamp: number


DocumentData

Ƭ DocumentData: Record<FieldName, any | undefined>

A generic document data type.


DocumentFileDataType

Ƭ DocumentFileDataType: "image"


EnvironmentId

Ƭ EnvironmentId: typeof ENVIRONMENT_IDS[number]


FieldName

Ƭ FieldName<T>: string & keyof T

A type alias for a field name.

Type parameters

NameType
Tany

FieldOf

Ƭ FieldOf<T, K>: Extract<T, Record<K, any>>[K]

Type parameters

NameType
TT
Kextends UnionKeys<T>

FieldPath

Ƭ FieldPath: string


FieldType

Ƭ FieldType: PrimitiveFieldType | FieldType[] | { [key: string]: FieldType; }


FluxModelName

Ƭ FluxModelName: typeof FLUX_MODEL_NAMES[number]


FunctionName

Ƭ FunctionName: string


GeminiChatModelName

Ƭ GeminiChatModelName: typeof GEMINI_CHAT_MODEL_NAMES[number]


HttpMethod

Ƭ HttpMethod: "post" | "get" | "delete" | "patch" | "put"


IntegrationApiEndpoints

Ƭ IntegrationApiEndpoints: Record<ApiEndpointId, ApiEndpoint>


IntegrationId

Ƭ IntegrationId: string

A type alias for an integration id.


IntegrationSchemaType

Ƭ IntegrationSchemaType: typeof INTEGRATION_SCHEMA_TYPES[number]


IntegrationType

Ƭ IntegrationType: typeof INTEGRATION_TYPES[number]


MetricActionType

Ƭ MetricActionType: "write" | "all"

The different type of actions for metrics.


MetricDomain

Ƭ MetricDomain: typeof METRIC_DOMAIN[number]


MetricFunction

Ƭ MetricFunction: typeof METRIC_FUNCTIONS[number]


MetricIntervalAlignment

Ƭ MetricIntervalAlignment: typeof METRIC_INTERVAL_ALIGNMENT[number]

Indicates how to align per-point periods in metric queries.


MetricReport

Ƭ MetricReport<MetricNameType>: Omit<Metric<MetricNameType>, "tags" | "timestamp"> & Partial<Pick<Metric, "tags" | "timestamp">>

MetricReport represents a single metric event with some optional fields. These optional fields are automatically populated by Squid with default values.

Type parameters

NameType
MetricNameTypestring

MutableAiAgentMetadataFieldsType

Ƭ MutableAiAgentMetadataFieldsType: keyof Pick<AiAgentMetadata, "modelName" | "description" | "isPublic" | "functions" | "connectedAgents" | "connectedIntegrations" | "auditLog">


Mutation

Ƭ Mutation<T>: UpdateMutation<T> | InsertMutation<T> | DeleteMutation

A mutation on a document.

Type parameters

NameType
Tany

MutationType

Ƭ MutationType: typeof MUTATION_TYPES[number]


OpenAiAudioCreateSpeechModelName

Ƭ OpenAiAudioCreateSpeechModelName: typeof OPENAI_AUDIO_CREATE_SPEECH_MODEL_NAMES[number]


OpenAiAudioTranscriptionModelName

Ƭ OpenAiAudioTranscriptionModelName: typeof OPENAI_AUDIO_TRANSCRIPTION_MODEL_NAMES[number]


OpenAiChatModelName

Ƭ OpenAiChatModelName: typeof OPENAI_CHAT_MODEL_NAMES[number]


OpenAiCreateSpeechFormat

Ƭ OpenAiCreateSpeechFormat: typeof OPEN_AI_CREATE_SPEECH_FORMATS[number]


OpenAiImageModelName

Ƭ OpenAiImageModelName: typeof OPENAI_IMAGE_MODEL_NAMES[number]


OpenAiResponseFormat

Ƭ OpenAiResponseFormat: "text" | "json_object"


Operator

Ƭ Operator: typeof ALL_OPERATORS[number]

An operator in a query condition.


PartialBy

Ƭ PartialBy<T, K>: Omit<T, K> & Partial<Pick<T, K>>

Type parameters

NameType
TT
Kextends keyof T

Paths

Ƭ Paths<T>: UnionKeys<DeepRecord<T>>

Type parameters

Name
T

PrimitiveFieldType

Ƭ PrimitiveFieldType: string | number | boolean | null | Date


PropertyMutation

Ƭ PropertyMutation<Value>: ApplyNumericFnPropertyMutation | ApplyStringFnPropertyMutation | ValueUpdatePropertyMutation<Value> | RemovePropertyMutation

A representation of a single property update

Type parameters

NameType
Valueany

PropertySchema

Ƭ PropertySchema: ConvertDeep<JSONSchema>


QueryMetricsRequest

Ƭ QueryMetricsRequest<NameType>: QuerySquidMetricsRequest<NameType extends SquidMetricName ? NameType : SquidMetricName> | QueryUserMetricsRequest<NameType>

Type parameters

NameType
NameTypeextends string = string

QueryMetricsResponse

Ƭ QueryMetricsResponse<NameType>: Required<QuerySquidMetricsResponse<NameType extends SquidMetricName ? NameType : SquidMetricName> | QueryUserMetricsResponse<NameType>>

Type parameters

NameType
NameTypeextends string = string

QueryMetricsResultPoint

Ƭ QueryMetricsResultPoint: [number, ...(number | null)[]]

Every result point is a list of [timestamp, values...], where list of values are defined by the list of functions in the request. If there is no data for the point 'null' is used as a 'value'. The timestamp is always equal to the point period start date and is measured in Unix epoch seconds.


SchedulerId

Ƭ SchedulerId: string

A type alias for a string that represents a scheduler id.


SecretKey

Ƭ SecretKey: string

The secret key, an alias for a string.


SecretValue

Ƭ SecretValue: string | number | boolean

The secret value.


SerializedJoinQuery

Ƭ SerializedJoinQuery: Object

Type declaration

NameType
dereferenceboolean
groupedboolean
joinConditionsRecord<Alias, JoinCondition>
joinsRecord<Alias, Query<DocumentData>>
leftToRightRecord<Alias, Alias[]>
root{ alias: Alias ; query: Query }
root.aliasAlias
root.queryQuery
type"join"

SerializedMergedQuery

Ƭ SerializedMergedQuery: Object

Type declaration

NameType
queriesSerializedQuery[]
type"merged"

SerializedQuery

Ƭ SerializedQuery: SerializedSimpleQuery | SerializedJoinQuery | SerializedMergedQuery


SerializedSimpleQuery

Ƭ SerializedSimpleQuery: Object

Type declaration

NameType
dereferenceboolean
queryQuery
type"simple"

ServiceFunctionName

Ƭ ServiceFunctionName: `${ServiceName}:${FunctionName}`


ServiceName

Ƭ ServiceName: string


SetSecretEntry

Ƭ SetSecretEntry: Object

Type declaration

NameType
keySecretKey
value?SecretValue

SquidDeveloperId

Ƭ SquidDeveloperId: string


SquidDocId

Ƭ SquidDocId: string


SquidMetricName

Ƭ SquidMetricName: typeof SQUID_METRIC_NAMES[number]


SquidRegion

Ƭ SquidRegion: typeof SQUID_REGIONS[number]

Region type used by Squid.


StableDiffusionModelName

Ƭ StableDiffusionModelName: typeof STABLE_DIFFUSION_MODEL_NAMES[number]


StorageActionType

Ƭ StorageActionType: "read" | "write" | "update" | "insert" | "delete" | "all"

The different types of actions that can be performed for storage.


StorageFunctionality

Ƭ StorageFunctionality: "fileUpload" | "getFileMetadata" | "getDownloadUrl" | "deleteFiles" | "listDirectoryContents"


TopLevelPropertySchema

Ƭ TopLevelPropertySchema: PropertySchema & { dataType?: string ; hidden?: boolean ; isComputed?: boolean ; isDefaultComputed?: boolean ; primaryKey?: boolean }


TopicActionType

Ƭ TopicActionType: "read" | "write" | "all"

The different types of actions that can be performed on a topic.


TopicName

Ƭ TopicName: string


TransactionId

Ƭ TransactionId: string

A transactionId - alias for string


TriggerId

Ƭ TriggerId: string

A type alias for a string that represents a trigger id.


UnionKeys

Ƭ UnionKeys<T>: T extends any ? keyof T : never

Type parameters

Name
T

VectorDbType

Ƭ VectorDbType: typeof VECTOR_DB_TYPES[number]


WebhookId

Ƭ WebhookId: string

A type alias for a string that represents a webhook.

Variables

AI_AGENTS_INTEGRATION_ID

Const AI_AGENTS_INTEGRATION_ID: IntegrationId = 'ai_agents'


AI_AUDIO_CREATE_SPEECH_MODEL_NAMES

Const AI_AUDIO_CREATE_SPEECH_MODEL_NAMES: readonly ["tts-1", "tts-1-hd"]


AI_AUDIO_TRANSCRIPTION_MODEL_NAMES

Const AI_AUDIO_TRANSCRIPTION_MODEL_NAMES: readonly ["whisper-1"]


AI_CHAT_MODEL_NAMES

Const AI_CHAT_MODEL_NAMES: readonly ["gpt-4o", "gpt-4o-mini", "o1", "o1-mini", "o3-mini", "claude-3-5-haiku-latest", "claude-3-5-sonnet-latest", "gemini-1.5-pro", "gemini-2.0-flash"]

The supported AI model names.


AI_EMBEDDINGS_MODEL_NAMES

Const AI_EMBEDDINGS_MODEL_NAMES: readonly ["text-embedding-3-small", "text-embedding-3-large", "text-embedding-ada-002"]


AI_IMAGE_MODEL_NAMES

Const AI_IMAGE_MODEL_NAMES: readonly ["dall-e-3", "stable-diffusion-core", "flux-pro-1.1"]


ALL_OPERATORS

Const ALL_OPERATORS: readonly ["in", "not in", "array_includes_some", "array_includes_all", "array_not_includes", "==", "!=", ">=", "<=", ">", "<", "like", "not like", "like_cs", "not like_cs"]


ANTHROPIC_CHAT_MODEL_NAMES

Const ANTHROPIC_CHAT_MODEL_NAMES: readonly ["claude-3-5-haiku-latest", "claude-3-5-sonnet-latest"]


API_INJECTION_FIELD_TYPES

Const API_INJECTION_FIELD_TYPES: readonly ["secret", "regular"]


ARRAY_OPERATORS

Const ARRAY_OPERATORS: readonly ["in", "not in", "array_includes_some", "array_includes_all", "array_not_includes"]


AUTH_INTEGRATION_TYPES

Const AUTH_INTEGRATION_TYPES: readonly ["auth0", "jwt_rsa", "jwt_hmac", "cognito", "okta", "descope", "firebase_auth"]


BUILT_IN_AGENT_ID

Const BUILT_IN_AGENT_ID: "built_in_agent"


BUILT_IN_DB_INTEGRATION_ID

Const BUILT_IN_DB_INTEGRATION_ID: IntegrationId = 'built_in_db'


BUILT_IN_QUEUE_INTEGRATION_ID

Const BUILT_IN_QUEUE_INTEGRATION_ID: IntegrationId = 'built_in_queue'


BUILT_IN_STORAGE_INTEGRATION_ID

Const BUILT_IN_STORAGE_INTEGRATION_ID: IntegrationId = 'built_in_storage'

ID for the cloud specific storage integration: s3 (built_in_s3) or gcs (built_in_gcs).


CLIENT_ID_GENERATOR_KEY

Const CLIENT_ID_GENERATOR_KEY: "SQUID_CLIENT_ID_GENERATOR"

@internal.


CLIENT_REQUEST_ID_GENERATOR_KEY

Const CLIENT_REQUEST_ID_GENERATOR_KEY: "SQUID_CLIENT_REQUEST_ID_GENERATOR"

@internal.


DATA_INTEGRATION_TYPES

Const DATA_INTEGRATION_TYPES: readonly ["bigquery", "built_in_db", "clickhouse", "cockroach", "mongo", "mssql", "mysql", "oracledb", "postgres", "sap_hana", "snowflake"]


DEFAULT_SHORT_ID_LENGTH

Const DEFAULT_SHORT_ID_LENGTH: 18

Default length if ID produced by generateShortId.


ENVIRONMENT_IDS

Const ENVIRONMENT_IDS: readonly ["dev", "prod"]


FETCH_BEYOND_LIMIT

Const FETCH_BEYOND_LIMIT: 100


FLUX_MODEL_NAMES

Const FLUX_MODEL_NAMES: readonly ["flux-pro-1.1"]


GEMINI_CHAT_MODEL_NAMES

Const GEMINI_CHAT_MODEL_NAMES: readonly ["gemini-1.5-pro", "gemini-2.0-flash"]


GRAPHQL_INTEGRATION_TYPES

Const GRAPHQL_INTEGRATION_TYPES: readonly ["graphql", "linear"]


HTTP_INTEGRATION_TYPES

Const HTTP_INTEGRATION_TYPES: readonly ["api", "confluence"]


INTEGRATION_SCHEMA_TYPES

Const INTEGRATION_SCHEMA_TYPES: readonly ["data", "api", "graphql"]


INTEGRATION_TYPES

Const INTEGRATION_TYPES: readonly ["active_directory", "ai_agents", "ai_chatbot", "algolia", "alloydb", "api", "auth0", "azure_cosmosdb", "azure_postgresql", "azure_sql", "bigquery", "built_in_db", "built_in_gcs", "built_in_queue", "built_in_s3", "cassandra", "clickhouse", "cloudsql", "cockroach", "cognito", "confluence", "confluent", "datadog", "db2", "descope", "documentdb", "dynamodb", "elastic_enterprise_search", "elastic_observability", "elastic_search", "firebase_auth", "firestore", "gcs", "google_docs", "google_drive", "graphql", "hubspot", "jira", "jwt_hmac", "jwt_rsa", "kafka", "linear", "mariadb", "monday", "mongo", "mssql", "mysql", "newrelic", "okta", "onedrive", "oracledb", "pinecone", "postgres", "redis", "s3", "salesforce_crm", "sap_hana", "sentry", "servicenow", "snowflake", "spanner", "xata", "zendesk", "mail", "slack"]

List of all integration types supported by Squid.


LIMIT_UNDERFLOW_TRIGGER

Const LIMIT_UNDERFLOW_TRIGGER: 20


METRIC_DOMAIN

Const METRIC_DOMAIN: readonly ["user", "squid"]

Defines source of the metric: reported by user or automatically collected by the system (Squid).


METRIC_FUNCTIONS

Const METRIC_FUNCTIONS: readonly ["sum", "max", "min", "average", "median", "p95", "p99", "count"]


METRIC_INTERVAL_ALIGNMENT

Const METRIC_INTERVAL_ALIGNMENT: readonly ["align-by-start-time", "align-by-end-time"]


MUTABLE_AI_AGENT_METADATA_FIELDS

Const MUTABLE_AI_AGENT_METADATA_FIELDS: MutableAiAgentMetadataFieldsType[]

List of fields that can be updated in runtime via API.


MUTATION_TYPES

Const MUTATION_TYPES: readonly ["insert", "update", "delete"]

The mutation type.


OPENAI_AUDIO_CREATE_SPEECH_MODEL_NAMES

Const OPENAI_AUDIO_CREATE_SPEECH_MODEL_NAMES: readonly ["tts-1", "tts-1-hd"]


OPENAI_AUDIO_MODEL_NAMES

Const OPENAI_AUDIO_MODEL_NAMES: readonly ["whisper-1", "tts-1", "tts-1-hd"]


OPENAI_AUDIO_TRANSCRIPTION_MODEL_NAMES

Const OPENAI_AUDIO_TRANSCRIPTION_MODEL_NAMES: readonly ["whisper-1"]


OPENAI_CHAT_MODEL_NAMES

Const OPENAI_CHAT_MODEL_NAMES: readonly ["gpt-4o", "gpt-4o-mini", "o1", "o1-mini", "o3-mini"]

The supported OpenAI models


OPENAI_EMBEDDINGS_MODEL_NAMES

Const OPENAI_EMBEDDINGS_MODEL_NAMES: readonly ["text-embedding-3-small", "text-embedding-3-large", "text-embedding-ada-002"]


OPENAI_IMAGE_MODEL_NAMES

Const OPENAI_IMAGE_MODEL_NAMES: readonly ["dall-e-3"]

The supported AI image generation model names.


OPEN_AI_CREATE_SPEECH_FORMATS

Const OPEN_AI_CREATE_SPEECH_FORMATS: readonly ["mp3", "opus", "aac", "flac", "wav", "pcm"]


SQUID_METRIC_NAMES

Const SQUID_METRIC_NAMES: readonly ["squid_functionExecution_count", "squid_functionExecution_time"]

Name of metrics publicly provided by the system.

  • Metrics suffixed by '_time' are 'gauge' metrics.
  • Metrics suffixed by 'count' are 'count' metrics. All Squid metrics starts with `squid` prefix.

SQUID_REGIONS

Const SQUID_REGIONS: readonly ["us-east-1.aws", "ap-south-1.aws", "us-central1.gcp"]

The list of regions in Squid.


STABLE_DIFFUSION_MODEL_NAMES

Const STABLE_DIFFUSION_MODEL_NAMES: readonly ["stable-diffusion-core"]


VECTOR_DB_TYPES

Const VECTOR_DB_TYPES: readonly ["pinecone", "postgres"]

Functions

base64ToFile

base64ToFile(base64, filename, mimeType?): File

Parameters

NameType
base64string
filenamestring
mimeType?string

Returns

File


deserializeQuery

deserializeQuery<ReturnType>(squid, serializedQuery): SnapshotEmitter<ReturnType>

Type parameters

NameType
ReturnTypeany

Parameters

NameType
squidSquid
serializedQuerySerializedQuery

Returns

SnapshotEmitter<ReturnType>


generateId

generateId(): string

Generates a UUID-style ID.

Returns

string


generateShortId

generateShortId(length?, prefix?): string

Generates an ID of the given length using lowercase latin letters and digits. If the 'prefix' provided replaces the first generated characters with the prefix.

Parameters

NameTypeDefault value
lengthnumberDEFAULT_SHORT_ID_LENGTH
prefixstring''

Returns

string


getConsoleBaseUrl

getConsoleBaseUrl(appRegion, path?): string

Parameters

NameTypeDefault value
appRegionstringundefined
pathstring''

Returns

string


isSimpleCondition

isSimpleCondition(condition): condition is SimpleCondition<any, string, "in" | "not in" | "array_includes_some" | "array_includes_all" | "array_not_includes" | "==" | "!=" | ">=" | "<=" | ">" | "<" | "like" | "not like" | "like_cs" | "not like_cs">

Parameters

NameType
conditionCondition<any>

Returns

condition is SimpleCondition<any, string, "in" | "not in" | "array_includes_some" | "array_includes_all" | "array_not_includes" | "==" | "!=" | ">=" | "<=" | ">" | "<" | "like" | "not like" | "like_cs" | "not like_cs">


rawSquidHttpDelete

rawSquidHttpDelete<ResponseType, RequestType>(input): Promise<HttpResponse<ResponseType>>

Type parameters

NameType
ResponseTypeunknown
RequestTypeunknown

Parameters

NameType
inputOmit<HttpRequestInput<RequestType>, "method" | "files" | "filesFieldName">

Returns

Promise<HttpResponse<ResponseType>>


rawSquidHttpGet

rawSquidHttpGet<ResponseType, RequestType>(input): Promise<HttpResponse<ResponseType>>

Type parameters

NameType
ResponseTypeunknown
RequestTypeunknown

Parameters

NameType
inputOmit<HttpRequestInput<RequestType>, "method" | "files" | "filesFieldName">

Returns

Promise<HttpResponse<ResponseType>>


rawSquidHttpPatch

rawSquidHttpPatch<ResponseType, RequestType>(input): Promise<HttpResponse<ResponseType>>

Type parameters

NameType
ResponseTypeunknown
RequestTypeunknown

Parameters

NameType
inputOmit<HttpRequestInput<RequestType>, "method"> & { files?: (BlobAndFilename | File)[] ; filesFieldName?: string }

Returns

Promise<HttpResponse<ResponseType>>


rawSquidHttpPut

rawSquidHttpPut<ResponseType, RequestType>(input): Promise<HttpResponse<ResponseType>>

Type parameters

NameType
ResponseTypeunknown
RequestTypeunknown

Parameters

NameType
inputOmit<HttpRequestInput<RequestType>, "method"> & { files?: (BlobAndFilename | File)[] ; filesFieldName?: string }

Returns

Promise<HttpResponse<ResponseType>>


visitQueryResults

visitQueryResults<T>(query, callback, pageSize?): Promise<VisitQueryResultsStats>

Reads all objects from the query in a safe way (with pagination) and calls callback() on every object. The iteration is interrupted if error is thrown.

Type parameters

NameType
Textends DocumentData

Parameters

NameTypeDefault value
queryQueryBuilder<T>undefined
callback(t: T) => Promise<unknown>undefined
pageSizenumber500

Returns

Promise<VisitQueryResultsStats>