@superblocksteam/sdk-api 2.0.99 → 2.0.100-next.1
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/files.d.ts +68 -0
- package/dist/files.d.ts.map +1 -0
- package/dist/files.js +42 -0
- package/dist/files.js.map +1 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/base/rest-api-integration-client.d.ts.map +1 -1
- package/dist/integrations/base/rest-api-integration-client.js +6 -35
- package/dist/integrations/base/rest-api-integration-client.js.map +1 -1
- package/dist/integrations/cosmosdb/client.d.ts.map +1 -1
- package/dist/integrations/cosmosdb/client.js +30 -63
- package/dist/integrations/cosmosdb/client.js.map +1 -1
- package/dist/integrations/cosmosdb/client.test.d.ts +8 -0
- package/dist/integrations/cosmosdb/client.test.d.ts.map +1 -0
- package/dist/integrations/cosmosdb/client.test.js +141 -0
- package/dist/integrations/cosmosdb/client.test.js.map +1 -0
- package/dist/integrations/declarations.d.ts +106 -66
- package/dist/integrations/declarations.d.ts.map +1 -1
- package/dist/integrations/declarations.js +33 -0
- package/dist/integrations/declarations.js.map +1 -1
- package/dist/integrations/declarations.test.d.ts +2 -0
- package/dist/integrations/declarations.test.d.ts.map +1 -0
- package/dist/integrations/declarations.test.js +40 -0
- package/dist/integrations/declarations.test.js.map +1 -0
- package/dist/integrations/gcs/client.d.ts.map +1 -1
- package/dist/integrations/gcs/client.js +1 -1
- package/dist/integrations/gcs/client.js.map +1 -1
- package/dist/integrations/index.d.ts +3 -1
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/index.js +2 -1
- package/dist/integrations/index.js.map +1 -1
- package/dist/integrations/python/client.test.js +1 -3
- package/dist/integrations/python/client.test.js.map +1 -1
- package/dist/integrations/redis/client.d.ts.map +1 -1
- package/dist/integrations/redis/client.js +8 -1
- package/dist/integrations/redis/client.js.map +1 -1
- package/dist/integrations/registry.d.ts +1 -0
- package/dist/integrations/registry.d.ts.map +1 -1
- package/dist/integrations/registry.js +6 -0
- package/dist/integrations/registry.js.map +1 -1
- package/dist/integrations/restapiintegration/client.d.ts +19 -0
- package/dist/integrations/restapiintegration/client.d.ts.map +1 -0
- package/dist/integrations/restapiintegration/client.js +18 -0
- package/dist/integrations/restapiintegration/client.js.map +1 -0
- package/dist/integrations/restapiintegration/index.d.ts +6 -0
- package/dist/integrations/restapiintegration/index.d.ts.map +1 -0
- package/dist/integrations/restapiintegration/index.js +5 -0
- package/dist/integrations/restapiintegration/index.js.map +1 -0
- package/dist/integrations/restapiintegration/types.d.ts +33 -0
- package/dist/integrations/restapiintegration/types.d.ts.map +1 -0
- package/dist/integrations/restapiintegration/types.js +5 -0
- package/dist/integrations/restapiintegration/types.js.map +1 -0
- package/dist/integrations/snowflake/types.d.ts +4 -4
- package/package.json +3 -2
- package/src/files.ts +54 -0
- package/src/index.ts +21 -0
- package/src/integrations/base/rest-api-integration-client.ts +6 -43
- package/src/integrations/cosmosdb/client.test.ts +209 -0
- package/src/integrations/cosmosdb/client.ts +66 -75
- package/src/integrations/declarations.test.ts +64 -0
- package/src/integrations/declarations.ts +231 -134
- package/src/integrations/gcs/client.ts +1 -5
- package/src/integrations/index.ts +6 -0
- package/src/integrations/python/client.test.ts +5 -3
- package/src/integrations/redis/client.ts +10 -1
- package/src/integrations/registry.ts +11 -0
- package/src/integrations/restapiintegration/client.ts +21 -0
- package/src/integrations/restapiintegration/index.ts +6 -0
- package/src/integrations/restapiintegration/types.ts +40 -0
- package/src/integrations/snowflake/README.md +7 -7
- package/src/integrations/snowflake/types.ts +4 -4
package/dist/files.d.ts
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical file schemas and types for SDK API inputs.
|
|
3
|
+
*
|
|
4
|
+
* These helpers model the file objects that Superblocks injects for FilePicker
|
|
5
|
+
* inputs. Use the minimal file-ref contract when you want to pass files by
|
|
6
|
+
* reference to storage integrations, and the readable file contract when your
|
|
7
|
+
* API needs to call `readContentsAsync()` or `readContents()`.
|
|
8
|
+
*/
|
|
9
|
+
import { z } from "zod";
|
|
10
|
+
/**
|
|
11
|
+
* Minimal file reference contract.
|
|
12
|
+
*
|
|
13
|
+
* Good for by-reference uploads where the storage plugin resolves the file
|
|
14
|
+
* bytes using `$superblocksId`, such as S3 or GCS `uploadMultipleObjects()`.
|
|
15
|
+
*/
|
|
16
|
+
export declare const fileRefSchema: z.ZodObject<{
|
|
17
|
+
name: z.ZodString;
|
|
18
|
+
type: z.ZodOptional<z.ZodString>;
|
|
19
|
+
$superblocksId: z.ZodString;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
name: string;
|
|
22
|
+
$superblocksId: string;
|
|
23
|
+
type?: string | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
name: string;
|
|
26
|
+
$superblocksId: string;
|
|
27
|
+
type?: string | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
/**
|
|
30
|
+
* Runtime-readable file contract.
|
|
31
|
+
*
|
|
32
|
+
* Good for APIs that need to inspect file contents in code via
|
|
33
|
+
* `readContentsAsync()` or `readContents()`.
|
|
34
|
+
*/
|
|
35
|
+
export declare const readableFileSchema: z.ZodObject<{
|
|
36
|
+
name: z.ZodString;
|
|
37
|
+
type: z.ZodOptional<z.ZodString>;
|
|
38
|
+
$superblocksId: z.ZodString;
|
|
39
|
+
} & {
|
|
40
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
extension: z.ZodOptional<z.ZodString>;
|
|
42
|
+
previewUrl: z.ZodOptional<z.ZodString>;
|
|
43
|
+
readContentsAsync: z.ZodType<(mode?: string) => Promise<string | Buffer>, z.ZodTypeDef, (mode?: string) => Promise<string | Buffer>>;
|
|
44
|
+
readContents: z.ZodType<(mode?: string) => string | Buffer, z.ZodTypeDef, (mode?: string) => string | Buffer>;
|
|
45
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
46
|
+
name: z.ZodString;
|
|
47
|
+
type: z.ZodOptional<z.ZodString>;
|
|
48
|
+
$superblocksId: z.ZodString;
|
|
49
|
+
} & {
|
|
50
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
extension: z.ZodOptional<z.ZodString>;
|
|
52
|
+
previewUrl: z.ZodOptional<z.ZodString>;
|
|
53
|
+
readContentsAsync: z.ZodType<(mode?: string) => Promise<string | Buffer>, z.ZodTypeDef, (mode?: string) => Promise<string | Buffer>>;
|
|
54
|
+
readContents: z.ZodType<(mode?: string) => string | Buffer, z.ZodTypeDef, (mode?: string) => string | Buffer>;
|
|
55
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
56
|
+
name: z.ZodString;
|
|
57
|
+
type: z.ZodOptional<z.ZodString>;
|
|
58
|
+
$superblocksId: z.ZodString;
|
|
59
|
+
} & {
|
|
60
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
extension: z.ZodOptional<z.ZodString>;
|
|
62
|
+
previewUrl: z.ZodOptional<z.ZodString>;
|
|
63
|
+
readContentsAsync: z.ZodType<(mode?: string) => Promise<string | Buffer>, z.ZodTypeDef, (mode?: string) => Promise<string | Buffer>>;
|
|
64
|
+
readContents: z.ZodType<(mode?: string) => string | Buffer, z.ZodTypeDef, (mode?: string) => string | Buffer>;
|
|
65
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
66
|
+
export type FileRef = z.infer<typeof fileRefSchema>;
|
|
67
|
+
export type ReadableFile = z.infer<typeof readableFileSchema>;
|
|
68
|
+
//# sourceMappingURL=files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../src/files.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;EAIxB,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;yCA9BrB,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,wBAAnC,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;oCAKK,MAAM,KAAK,MAAM,GAAG,MAAM,wBAA1B,MAAM,KAAK,MAAM,GAAG,MAAM;;;;;;;;;yCALlE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,wBAAnC,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;oCAKK,MAAM,KAAK,MAAM,GAAG,MAAM,wBAA1B,MAAM,KAAK,MAAM,GAAG,MAAM;;;;;;;;;yCALlE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,wBAAnC,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;oCAKK,MAAM,KAAK,MAAM,GAAG,MAAM,wBAA1B,MAAM,KAAK,MAAM,GAAG,MAAM;gCAiC5D,CAAC;AAEjB,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACpD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
package/dist/files.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical file schemas and types for SDK API inputs.
|
|
3
|
+
*
|
|
4
|
+
* These helpers model the file objects that Superblocks injects for FilePicker
|
|
5
|
+
* inputs. Use the minimal file-ref contract when you want to pass files by
|
|
6
|
+
* reference to storage integrations, and the readable file contract when your
|
|
7
|
+
* API needs to call `readContentsAsync()` or `readContents()`.
|
|
8
|
+
*/
|
|
9
|
+
import { z } from "zod";
|
|
10
|
+
const readableAsyncMethodSchema = z.custom((value) => typeof value === "function", {
|
|
11
|
+
message: "Expected readContentsAsync to be a function",
|
|
12
|
+
});
|
|
13
|
+
const readableSyncMethodSchema = z.custom((value) => typeof value === "function", {
|
|
14
|
+
message: "Expected readContents to be a function",
|
|
15
|
+
});
|
|
16
|
+
/**
|
|
17
|
+
* Minimal file reference contract.
|
|
18
|
+
*
|
|
19
|
+
* Good for by-reference uploads where the storage plugin resolves the file
|
|
20
|
+
* bytes using `$superblocksId`, such as S3 or GCS `uploadMultipleObjects()`.
|
|
21
|
+
*/
|
|
22
|
+
export const fileRefSchema = z.object({
|
|
23
|
+
name: z.string(),
|
|
24
|
+
type: z.string().optional(),
|
|
25
|
+
$superblocksId: z.string(),
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* Runtime-readable file contract.
|
|
29
|
+
*
|
|
30
|
+
* Good for APIs that need to inspect file contents in code via
|
|
31
|
+
* `readContentsAsync()` or `readContents()`.
|
|
32
|
+
*/
|
|
33
|
+
export const readableFileSchema = fileRefSchema
|
|
34
|
+
.extend({
|
|
35
|
+
size: z.number().optional(),
|
|
36
|
+
extension: z.string().optional(),
|
|
37
|
+
previewUrl: z.string().optional(),
|
|
38
|
+
readContentsAsync: readableAsyncMethodSchema,
|
|
39
|
+
readContents: readableSyncMethodSchema,
|
|
40
|
+
})
|
|
41
|
+
.passthrough();
|
|
42
|
+
//# sourceMappingURL=files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../src/files.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAExC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,UAAU,EAAE;IACxC,OAAO,EAAE,6CAA6C;CACvD,CAAC,CAAC;AAEH,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CACvC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,UAAU,EACtC;IACE,OAAO,EAAE,wCAAwC;CAClD,CACF,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;CAC3B,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa;KAC5C,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,iBAAiB,EAAE,yBAAyB;IAC5C,YAAY,EAAE,wBAAwB;CACvC,CAAC;KACD,WAAW,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -51,10 +51,12 @@
|
|
|
51
51
|
* @packageDocumentation
|
|
52
52
|
*/
|
|
53
53
|
export { z } from "zod";
|
|
54
|
+
export { fileRefSchema, readableFileSchema } from "./files.js";
|
|
55
|
+
export type { FileRef, ReadableFile } from "./files.js";
|
|
54
56
|
export { api, __setEntryPoint, type CompiledApi, streamingApi, isStreamingApi, type StreamingApiConfig, type CompiledStreamingApi, } from "./api/index.js";
|
|
55
57
|
export type { ExtractApiInput, ExtractApiOutput } from "./api/definition.js";
|
|
56
58
|
export type { ApiConfig, ApiContext, ApiUser, Logger, BaseIntegrationClient, IntegrationRef, AnyIntegrationRef, IntegrationsMap, } from "./types.js";
|
|
57
|
-
export { postgres, slack, openai, anthropic, stripe, github, notion, snowflake, snowflakeCortex, airtable, asana, bitbucket, box, circleci, cohere, confluence, datadog, dropbox, elasticsearch, fireworks, front, gemini, googleAnalytics, googleDrive, groq, hubspot, intercom, jira, launchDarkly, mistral, pagerDuty, perplexity, segment, sendGrid, stabilityAI, twilio, zendesk, zoom, graphql, mysql, mariadb, mssql, cockroachdb, oracledb, redshift, athena, databricks, bigquery, mongodb, dynamodb, cosmosdb, couchbase, s3, gcs, googleSheets, kafka, kinesis, salesforce, redis, superblocksOcr, python, type IntegrationDeclaration, type PostgresRef, type SlackRef, type OpenAIRef, type AnthropicRef, type StripeRef, type GitHubRef, type NotionRef, type SnowflakeRef, type SnowflakeCortexRef, type AirtableRef, type AsanaRef, type BitbucketRef, type BoxRef, type CircleCIRef, type CohereRef, type ConfluenceRef, type DatadogRef, type DropboxRef, type ElasticSearchRef, type FireworksRef, type FrontRef, type GeminiRef, type GoogleAnalyticsRef, type GoogleDriveRef, type GroqRef, type HubSpotRef, type IntercomRef, type JiraRef, type LaunchDarklyRef, type MistralRef, type PagerDutyRef, type PerplexityRef, type SegmentRef, type SendGridRef, type StabilityAIRef, type TwilioRef, type ZendeskRef, type ZoomRef, type GraphQLRef, type MySQLRef, type MariaDBRef, type MSSQLRef, type CockroachDBRef, type OracleDBRef, type RedshiftRef, type AthenaRef, type DatabricksRef, type BigQueryRef, type MongoDBRef, type DynamoDBRef, type CosmosDBRef, type CouchbaseRef, type S3Ref, type GCSRef, type GoogleSheetsRef, type KafkaRef, type KinesisRef, type SalesforceRef, type RedisRef, type SuperblocksOCRRef, type PythonRef, } from "./integrations/index.js";
|
|
59
|
+
export { postgres, slack, openai, anthropic, stripe, github, notion, snowflake, snowflakeCortex, airtable, asana, bitbucket, box, circleci, cohere, confluence, datadog, dropbox, elasticsearch, fireworks, front, gemini, googleAnalytics, googleDrive, groq, hubspot, intercom, jira, launchDarkly, mistral, pagerDuty, perplexity, segment, sendGrid, stabilityAI, twilio, zendesk, zoom, graphql, mysql, mariadb, mssql, cockroachdb, oracledb, redshift, athena, databricks, bigquery, mongodb, dynamodb, cosmosdb, couchbase, s3, gcs, googleSheets, kafka, kinesis, salesforce, redis, superblocksOcr, python, restApiIntegration, getIntegrationDeclarations, confluent, redpanda, lakebase, snowflakePostgres, smtp, type IntegrationDeclaration, type PostgresRef, type SlackRef, type OpenAIRef, type AnthropicRef, type StripeRef, type GitHubRef, type NotionRef, type SnowflakeRef, type SnowflakeCortexRef, type AirtableRef, type AsanaRef, type BitbucketRef, type BoxRef, type CircleCIRef, type CohereRef, type ConfluenceRef, type DatadogRef, type DropboxRef, type ElasticSearchRef, type FireworksRef, type FrontRef, type GeminiRef, type GoogleAnalyticsRef, type GoogleDriveRef, type GroqRef, type HubSpotRef, type IntercomRef, type JiraRef, type LaunchDarklyRef, type MistralRef, type PagerDutyRef, type PerplexityRef, type SegmentRef, type SendGridRef, type StabilityAIRef, type TwilioRef, type ZendeskRef, type ZoomRef, type GraphQLRef, type MySQLRef, type MariaDBRef, type MSSQLRef, type CockroachDBRef, type OracleDBRef, type RedshiftRef, type AthenaRef, type DatabricksRef, type BigQueryRef, type MongoDBRef, type DynamoDBRef, type CosmosDBRef, type CouchbaseRef, type S3Ref, type GCSRef, type GoogleSheetsRef, type KafkaRef, type KinesisRef, type SalesforceRef, type RedisRef, type SuperblocksOCRRef, type PythonRef, type RestApiIntegrationRef, type ConfluentRef, type RedpandaRef, type LakebaseRef, type SnowflakePostgresRef, type SmtpRef, } from "./integrations/index.js";
|
|
58
60
|
export type { PostgresClient } from "./integrations/postgres/index.js";
|
|
59
61
|
export type { SlackClient } from "./integrations/slack/index.js";
|
|
60
62
|
export type { SnowflakeClient } from "./integrations/snowflake/index.js";
|
|
@@ -101,6 +103,10 @@ export type { GCSClient } from "./integrations/gcs/index.js";
|
|
|
101
103
|
export type { GoogleSheetsClient } from "./integrations/gsheets/index.js";
|
|
102
104
|
export type { SuperblocksOCRClient } from "./integrations/superblocks-ocr/index.js";
|
|
103
105
|
export type { PythonClient } from "./integrations/python/index.js";
|
|
106
|
+
export type { RestApiIntegrationPluginClient } from "./integrations/restapiintegration/index.js";
|
|
107
|
+
export type { LakebaseClient } from "./integrations/lakebase/index.js";
|
|
108
|
+
export type { SnowflakePostgresClient } from "./integrations/snowflakepostgres/index.js";
|
|
109
|
+
export type { SmtpClient, SmtpSendOptions } from "./integrations/smtp/index.js";
|
|
104
110
|
export { execute, executeApi, executeStreamingApi, createStreamingApiGenerator, createApiContext, createStreamingApiContext, SdkError, InputValidationError, OutputValidationError, IntegrationNotFoundError, IntegrationError, ExecutionError, ErrorCode, } from "./runtime/index.js";
|
|
105
111
|
export type { UnifiedExecuteApiRequest, AnyCompiledApi, ExecuteApiRequest, ExecuteApiResponse, ExecuteApiSuccessResponse, ExecuteApiErrorResponse, ExecuteStreamingApiRequest, StreamingApiCallbacks, StreamingApiError, ExecuteStreamingApiResult, CreateContextOptions, CreateStreamingContextOptions, ErrorCodeType, } from "./runtime/index.js";
|
|
106
112
|
export { createClient, isPluginSupported, SUPPORTED_PLUGINS, } from "./integrations/index.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EACL,GAAG,EACH,eAAe,EACf,KAAK,WAAW,EAEhB,YAAY,EACZ,cAAc,EACd,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,GAC1B,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG7E,YAAY,EACV,SAAS,EACT,UAAU,EACV,OAAO,EACP,MAAM,EACN,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,eAAe,GAChB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,QAAQ,EACR,KAAK,EACL,MAAM,EACN,SAAS,EACT,MAAM,EACN,MAAM,EACN,MAAM,EACN,SAAS,EACT,eAAe,EACf,QAAQ,EACR,KAAK,EACL,SAAS,EACT,GAAG,EACH,QAAQ,EACR,MAAM,EACN,UAAU,EACV,OAAO,EACP,OAAO,EACP,aAAa,EACb,SAAS,EACT,KAAK,EACL,MAAM,EACN,eAAe,EACf,WAAW,EACX,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,SAAS,EACT,UAAU,EACV,OAAO,EACP,QAAQ,EACR,WAAW,EACX,MAAM,EACN,OAAO,EACP,IAAI,EACJ,OAAO,EACP,KAAK,EACL,OAAO,EACP,KAAK,EACL,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,UAAU,EACV,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,EAAE,EACF,GAAG,EACH,YAAY,EACZ,KAAK,EACL,OAAO,EACP,UAAU,EACV,KAAK,EACL,cAAc,EACd,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC/D,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAGxD,OAAO,EACL,GAAG,EACH,eAAe,EACf,KAAK,WAAW,EAEhB,YAAY,EACZ,cAAc,EACd,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,GAC1B,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG7E,YAAY,EACV,SAAS,EACT,UAAU,EACV,OAAO,EACP,MAAM,EACN,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,eAAe,GAChB,M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AAS,GACV,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EAEV,wBAAwB,EACxB,cAAc,EAEd,iBAAiB,EACjB,kBAAkB,EAClB,yBAAyB,EACzB,uBAAuB,EACvB,0BAA0B,EAC1B,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EAEzB,oBAAoB,EACpB,6BAA6B,EAC7B,aAAa,GACd,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EACV,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,sBAAsB,EACtB,aAAa,EACb,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,0BAA0B,EAC1B,WAAW,GACZ,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -52,12 +52,14 @@
|
|
|
52
52
|
*/
|
|
53
53
|
// Re-export Zod for convenience
|
|
54
54
|
export { z } from "zod";
|
|
55
|
+
// Canonical file contracts
|
|
56
|
+
export { fileRefSchema, readableFileSchema } from "./files.js";
|
|
55
57
|
// API definition and registry
|
|
56
58
|
export { api, __setEntryPoint,
|
|
57
59
|
// Streaming API support
|
|
58
60
|
streamingApi, isStreamingApi, } from "./api/index.js";
|
|
59
61
|
// Integration declaration functions
|
|
60
|
-
export { postgres, slack, openai, anthropic, stripe, github, notion, snowflake, snowflakeCortex, airtable, asana, bitbucket, box, circleci, cohere, confluence, datadog, dropbox, elasticsearch, fireworks, front, gemini, googleAnalytics, googleDrive, groq, hubspot, intercom, jira, launchDarkly, mistral, pagerDuty, perplexity, segment, sendGrid, stabilityAI, twilio, zendesk, zoom, graphql, mysql, mariadb, mssql, cockroachdb, oracledb, redshift, athena, databricks, bigquery, mongodb, dynamodb, cosmosdb, couchbase, s3, gcs, googleSheets, kafka, kinesis, salesforce, redis, superblocksOcr, python, } from "./integrations/index.js";
|
|
62
|
+
export { postgres, slack, openai, anthropic, stripe, github, notion, snowflake, snowflakeCortex, airtable, asana, bitbucket, box, circleci, cohere, confluence, datadog, dropbox, elasticsearch, fireworks, front, gemini, googleAnalytics, googleDrive, groq, hubspot, intercom, jira, launchDarkly, mistral, pagerDuty, perplexity, segment, sendGrid, stabilityAI, twilio, zendesk, zoom, graphql, mysql, mariadb, mssql, cockroachdb, oracledb, redshift, athena, databricks, bigquery, mongodb, dynamodb, cosmosdb, couchbase, s3, gcs, googleSheets, kafka, kinesis, salesforce, redis, superblocksOcr, python, restApiIntegration, getIntegrationDeclarations, confluent, redpanda, lakebase, snowflakePostgres, smtp, } from "./integrations/index.js";
|
|
61
63
|
// Runtime (for orchestrator use)
|
|
62
64
|
export {
|
|
63
65
|
// Unified executor (recommended - handles both regular and streaming)
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,gCAAgC;AAChC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8BAA8B;AAC9B,OAAO,EACL,GAAG,EACH,eAAe;AAEf,wBAAwB;AACxB,YAAY,EACZ,cAAc,GAGf,MAAM,gBAAgB,CAAC;AAiBxB,oCAAoC;AACpC,OAAO,EACL,QAAQ,EACR,KAAK,EACL,MAAM,EACN,SAAS,EACT,MAAM,EACN,MAAM,EACN,MAAM,EACN,SAAS,EACT,eAAe,EACf,QAAQ,EACR,KAAK,EACL,SAAS,EACT,GAAG,EACH,QAAQ,EACR,MAAM,EACN,UAAU,EACV,OAAO,EACP,OAAO,EACP,aAAa,EACb,SAAS,EACT,KAAK,EACL,MAAM,EACN,eAAe,EACf,WAAW,EACX,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,SAAS,EACT,UAAU,EACV,OAAO,EACP,QAAQ,EACR,WAAW,EACX,MAAM,EACN,OAAO,EACP,IAAI,EACJ,OAAO,EACP,KAAK,EACL,OAAO,EACP,KAAK,EACL,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,UAAU,EACV,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,EAAE,EACF,GAAG,EACH,YAAY,EACZ,KAAK,EACL,OAAO,EACP,UAAU,EACV,KAAK,EACL,cAAc,EACd,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,gCAAgC;AAChC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,2BAA2B;AAC3B,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAG/D,8BAA8B;AAC9B,OAAO,EACL,GAAG,EACH,eAAe;AAEf,wBAAwB;AACxB,YAAY,EACZ,cAAc,GAGf,MAAM,gBAAgB,CAAC;AAiBxB,oCAAoC;AACpC,OAAO,EACL,QAAQ,EACR,KAAK,EACL,MAAM,EACN,SAAS,EACT,MAAM,EACN,MAAM,EACN,MAAM,EACN,SAAS,EACT,eAAe,EACf,QAAQ,EACR,KAAK,EACL,SAAS,EACT,GAAG,EACH,QAAQ,EACR,MAAM,EACN,UAAU,EACV,OAAO,EACP,OAAO,EACP,aAAa,EACb,SAAS,EACT,KAAK,EACL,MAAM,EACN,eAAe,EACf,WAAW,EACX,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,SAAS,EACT,UAAU,EACV,OAAO,EACP,QAAQ,EACR,WAAW,EACX,MAAM,EACN,OAAO,EACP,IAAI,EACJ,OAAO,EACP,KAAK,EACL,OAAO,EACP,KAAK,EACL,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,UAAU,EACV,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,EAAE,EACF,GAAG,EACH,YAAY,EACZ,KAAK,EACL,OAAO,EACP,UAAU,EACV,KAAK,EACL,cAAc,EACd,MAAM,EACN,kBAAkB,EAClB,0BAA0B,EAC1B,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,IAAI,GAsEL,MAAM,yBAAyB,CAAC;AAwEjC,iCAAiC;AACjC,OAAO;AACL,sEAAsE;AACtE,OAAO;AACP,4DAA4D;AAC5D,UAAU,EACV,mBAAmB,EACnB,2BAA2B;AAC3B,oBAAoB;AACpB,gBAAgB,EAChB,yBAAyB;AACzB,cAAc;AACd,QAAQ,EACR,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,SAAS,GACV,MAAM,oBAAoB,CAAC;AAqB5B,8CAA8C;AAC9C,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AAYjC,wBAAwB;AACxB,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,0BAA0B,EAC1B,WAAW,GACZ,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rest-api-integration-client.d.ts","sourceRoot":"","sources":["../../../src/integrations/base/rest-api-integration-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,IAAI,wBAAwB,EAAE,MAAM,yEAAyE,CAAC;AAClI,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qDAAqD,CAAC;AACpF,OAAO,KAAK,EAAE,iBAAiB,EAAE,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B,CAAC,KAAK,CAAC,EACjC,MAAM,EAAE,gBAAgB,CAAC,KAAK,EAAE,SAAS,CAAC,GAAG;QAC3C,QAAQ,EAAE,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;KAClC,EACD,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC,SAAS,CAAC;IAuErB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwCG;IACI,gBAAgB,CAAC,KAAK,EAAE,MAAM,EACnC,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAAC,EACjC,MAAM,EAAE,sBAAsB,CAAC,KAAK,EAAE,MAAM,CAAC,EAC7C,QAAQ,CAAC,EAAE,aAAa,GACvB,aAAa,CAAC,MAAM,CAAC;CAoFzB"}
|
|
@@ -34,24 +34,9 @@ export class RestApiIntegrationClient {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
async apiRequest(options, schema, metadata) {
|
|
37
|
-
// Validate
|
|
38
|
-
if
|
|
39
|
-
|
|
40
|
-
throw new RestApiValidationError("Body schema is required when body is provided in options", {
|
|
41
|
-
zodError: {
|
|
42
|
-
name: "ZodError",
|
|
43
|
-
issues: [
|
|
44
|
-
{
|
|
45
|
-
code: "custom",
|
|
46
|
-
path: ["body"],
|
|
47
|
-
message: "Body provided but schema.body is null/undefined",
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
},
|
|
51
|
-
data: options.body,
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
// Validate body against schema
|
|
37
|
+
// Validate request body against schema if both are present.
|
|
38
|
+
// Body schema is optional — if not provided, the body is sent unvalidated.
|
|
39
|
+
if (options.body !== undefined && schema?.body) {
|
|
55
40
|
const bodyParseResult = schema.body.safeParse(options.body);
|
|
56
41
|
if (!bodyParseResult.success) {
|
|
57
42
|
throw new RestApiValidationError(`Request body validation failed: ${bodyParseResult.error.message}`, {
|
|
@@ -147,23 +132,9 @@ export class RestApiIntegrationClient {
|
|
|
147
132
|
throw new Error(`Streaming is not supported for integration "${this.name}". ` +
|
|
148
133
|
"The orchestrator must provide a streaming query executor.");
|
|
149
134
|
}
|
|
150
|
-
// Validate
|
|
151
|
-
if
|
|
152
|
-
|
|
153
|
-
throw new RestApiValidationError("Body schema is required when body is provided in options", {
|
|
154
|
-
zodError: {
|
|
155
|
-
name: "ZodError",
|
|
156
|
-
issues: [
|
|
157
|
-
{
|
|
158
|
-
code: "custom",
|
|
159
|
-
path: ["body"],
|
|
160
|
-
message: "Body provided but schema.body is null/undefined",
|
|
161
|
-
},
|
|
162
|
-
],
|
|
163
|
-
},
|
|
164
|
-
data: options.body,
|
|
165
|
-
});
|
|
166
|
-
}
|
|
135
|
+
// Validate request body against schema if both are present.
|
|
136
|
+
// Body schema is optional — if not provided, the body is sent unvalidated.
|
|
137
|
+
if (options.body !== undefined && schema?.body) {
|
|
167
138
|
const bodyParseResult = schema.body.safeParse(options.body);
|
|
168
139
|
if (!bodyParseResult.success) {
|
|
169
140
|
throw new RestApiValidationError(`Request body validation failed: ${bodyParseResult.error.message}`, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rest-api-integration-client.js","sourceRoot":"","sources":["../../../src/integrations/base/rest-api-integration-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkBH,OAAO,EACL,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AAKzB;;;;;;GAMG;AACH,MAAM,OAAgB,wBAAwB;IAMnC,IAAI,CAAS;IACb,QAAQ,CAAS;IACjB,MAAM,CAAoB;IAEhB,YAAY,CAAgB;IAC5B,qBAAqB,CAA0B;IAElE,YACE,MAAyB,EACzB,YAA2B,EAC3B,qBAA8C;QAE9C,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;IACrD,CAAC;IAED;;OAEG;IACO,WAAW,CAAC,GAAW,EAAE,KAAc;QAC/C,OAAO;YACL,GAAG;YACH,KAAK,EAAE,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;SACjE,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,UAAU,CACd,OAAiC,EACjC,MAEC,EACD,QAAwB;QAExB,
|
|
1
|
+
{"version":3,"file":"rest-api-integration-client.js","sourceRoot":"","sources":["../../../src/integrations/base/rest-api-integration-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkBH,OAAO,EACL,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AAKzB;;;;;;GAMG;AACH,MAAM,OAAgB,wBAAwB;IAMnC,IAAI,CAAS;IACb,QAAQ,CAAS;IACjB,MAAM,CAAoB;IAEhB,YAAY,CAAgB;IAC5B,qBAAqB,CAA0B;IAElE,YACE,MAAyB,EACzB,YAA2B,EAC3B,qBAA8C;QAE9C,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;IACrD,CAAC;IAED;;OAEG;IACO,WAAW,CAAC,GAAW,EAAE,KAAc;QAC/C,OAAO;YACL,GAAG;YACH,KAAK,EAAE,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;SACjE,CAAC;IACJ,CAAC;IAED,KAAK,CAA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AC,EAAE,MAAM,EACrB,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC,OAAO,CAAC;CAcpB"}
|
|
@@ -55,19 +55,15 @@ export class CosmosDBClientImpl {
|
|
|
55
55
|
return parseResult.data;
|
|
56
56
|
}
|
|
57
57
|
async query(containerId, sql, schema, options, metadata) {
|
|
58
|
+
// Proto JSON format for: oneof cosmosdb_action { Sql sql = 5; }
|
|
59
|
+
// Sql.oneof action { Singleton singleton = 1; }
|
|
58
60
|
const request = {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
containerId,
|
|
66
|
-
query: sql,
|
|
67
|
-
crossPartition: options?.crossPartition ?? false,
|
|
68
|
-
partitionKey: options?.partitionKey,
|
|
69
|
-
},
|
|
70
|
-
},
|
|
61
|
+
sql: {
|
|
62
|
+
singleton: {
|
|
63
|
+
containerId,
|
|
64
|
+
query: sql,
|
|
65
|
+
crossPartition: options?.crossPartition ?? false,
|
|
66
|
+
partitionKey: options?.partitionKey,
|
|
71
67
|
},
|
|
72
68
|
},
|
|
73
69
|
};
|
|
@@ -75,16 +71,11 @@ export class CosmosDBClientImpl {
|
|
|
75
71
|
return this.validate(result, schema);
|
|
76
72
|
}
|
|
77
73
|
async read(containerId, id, schema, partitionKey, metadata) {
|
|
74
|
+
// Proto JSON format for: oneof cosmosdb_action { PointOperation point_operation = 6; }
|
|
78
75
|
const request = {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
containerId,
|
|
83
|
-
action: {
|
|
84
|
-
case: "read",
|
|
85
|
-
value: { id, partitionKey },
|
|
86
|
-
},
|
|
87
|
-
},
|
|
76
|
+
pointOperation: {
|
|
77
|
+
containerId,
|
|
78
|
+
read: { id, partitionKey },
|
|
88
79
|
},
|
|
89
80
|
};
|
|
90
81
|
const result = await this.exec(request, "read", metadata);
|
|
@@ -92,17 +83,11 @@ export class CosmosDBClientImpl {
|
|
|
92
83
|
}
|
|
93
84
|
async create(containerId, body, partitionKey, metadata) {
|
|
94
85
|
const request = {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
case: "create",
|
|
101
|
-
value: {
|
|
102
|
-
body: typeof body === "string" ? body : JSON.stringify(body),
|
|
103
|
-
partitionKey,
|
|
104
|
-
},
|
|
105
|
-
},
|
|
86
|
+
pointOperation: {
|
|
87
|
+
containerId,
|
|
88
|
+
create: {
|
|
89
|
+
body: typeof body === "string" ? body : JSON.stringify(body),
|
|
90
|
+
partitionKey,
|
|
106
91
|
},
|
|
107
92
|
},
|
|
108
93
|
};
|
|
@@ -110,17 +95,11 @@ export class CosmosDBClientImpl {
|
|
|
110
95
|
}
|
|
111
96
|
async replace(containerId, body, partitionKey, metadata) {
|
|
112
97
|
const request = {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
case: "replace",
|
|
119
|
-
value: {
|
|
120
|
-
body: typeof body === "string" ? body : JSON.stringify(body),
|
|
121
|
-
partitionKey,
|
|
122
|
-
},
|
|
123
|
-
},
|
|
98
|
+
pointOperation: {
|
|
99
|
+
containerId,
|
|
100
|
+
replace: {
|
|
101
|
+
body: typeof body === "string" ? body : JSON.stringify(body),
|
|
102
|
+
partitionKey,
|
|
124
103
|
},
|
|
125
104
|
},
|
|
126
105
|
};
|
|
@@ -128,17 +107,11 @@ export class CosmosDBClientImpl {
|
|
|
128
107
|
}
|
|
129
108
|
async upsert(containerId, body, partitionKey, metadata) {
|
|
130
109
|
const request = {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
case: "upsert",
|
|
137
|
-
value: {
|
|
138
|
-
body: typeof body === "string" ? body : JSON.stringify(body),
|
|
139
|
-
partitionKey,
|
|
140
|
-
},
|
|
141
|
-
},
|
|
110
|
+
pointOperation: {
|
|
111
|
+
containerId,
|
|
112
|
+
upsert: {
|
|
113
|
+
body: typeof body === "string" ? body : JSON.stringify(body),
|
|
114
|
+
partitionKey,
|
|
142
115
|
},
|
|
143
116
|
},
|
|
144
117
|
};
|
|
@@ -146,15 +119,9 @@ export class CosmosDBClientImpl {
|
|
|
146
119
|
}
|
|
147
120
|
async deleteItem(containerId, id, partitionKey, metadata) {
|
|
148
121
|
const request = {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
containerId,
|
|
153
|
-
action: {
|
|
154
|
-
case: "delete",
|
|
155
|
-
value: { id, partitionKey },
|
|
156
|
-
},
|
|
157
|
-
},
|
|
122
|
+
pointOperation: {
|
|
123
|
+
containerId,
|
|
124
|
+
delete: { id, partitionKey },
|
|
158
125
|
},
|
|
159
126
|
};
|
|
160
127
|
return this.exec(request, "delete", metadata);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/integrations/cosmosdb/client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAQ3D;;;;;GAKG;AACH,MAAM,OAAO,kBAAkB;IAGpB,MAAM,CAAoB;IAClB,YAAY,CAAgB;IAE7C,YAAY,MAAyB,EAAE,YAA2B;QAChE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;IAC1B,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;IAC9B,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,IAAI,CAChB,OAAwB,EACxB,SAAiB,EACjB,QAAwB;QAExB,IAAI,CAAC;YACH,OAAO,MAAM,IAAI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AC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;oBAC5D,YAAY;iBACb;aACF;SACF,CAAC;QAEF,OAAO,IAAI,CAAC,IAAI,CACd,OAA6C,EAC7C,SAAS,EACT,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CACV,WAAmB,EACnB,IAAa,EACb,YAAqB,EACrB,QAAwB;QAExB,MAAM,OAAO,GAAG;YACd,cAAc,EAAE;gBACd,WAAW;gBACX,MAAM,EAAE;oBACN,IAAI,EAAE,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;oBAC5D,YAAY;iBACb;aACF;SACF,CAAC;QAEF,OAAO,IAAI,CAAC,IAAI,CACd,OAA6C,EAC7C,QAAQ,EACR,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,UAAU,CACd,WAAmB,EACnB,EAAU,EACV,YAAqB,EACrB,QAAwB;QAExB,MAAM,OAAO,GAAG;YACd,cAAc,EAAE;gBACd,WAAW;gBACX,MAAM,EAAE,EAAE,EAAE,EAAE,YAAY,EAAE;aAC7B;SACF,CAAC;QAEF,OAAO,IAAI,CAAC,IAAI,CACd,OAA6C,EAC7C,QAAQ,EACR,QAAQ,CACT,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.test.d.ts","sourceRoot":"","sources":["../../../src/integrations/cosmosdb/client.test.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit tests for CosmosDB client.
|
|
3
|
+
*
|
|
4
|
+
* Validates the exact proto JSON structure passed to executeQuery for each
|
|
5
|
+
* CosmosDB operation: query, read, create, replace, upsert, deleteItem.
|
|
6
|
+
*/
|
|
7
|
+
import { describe, it, expect, vi } from "vitest";
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
import { CosmosDBClientImpl } from "./client.js";
|
|
10
|
+
/** Minimal integration config for testing. */
|
|
11
|
+
const TEST_CONFIG = {
|
|
12
|
+
id: "cosmosdb-test-id",
|
|
13
|
+
name: "Test CosmosDB",
|
|
14
|
+
pluginId: "cosmosdb",
|
|
15
|
+
configuration: {},
|
|
16
|
+
};
|
|
17
|
+
function createClient(mockResult = []) {
|
|
18
|
+
const executeQuery = vi.fn().mockResolvedValue(mockResult);
|
|
19
|
+
const client = new CosmosDBClientImpl(TEST_CONFIG, executeQuery);
|
|
20
|
+
return { client, executeQuery };
|
|
21
|
+
}
|
|
22
|
+
describe("CosmosDBClientImpl", () => {
|
|
23
|
+
describe("query", () => {
|
|
24
|
+
it("passes the correct proto JSON structure to executeQuery", async () => {
|
|
25
|
+
const { client, executeQuery } = createClient([{ id: "doc-1" }]);
|
|
26
|
+
await client.query("my-container", "SELECT * FROM c", z.array(z.object({ id: z.string() }).passthrough()), { crossPartition: true, partitionKey: "pk-1" });
|
|
27
|
+
expect(executeQuery).toHaveBeenCalledOnce();
|
|
28
|
+
expect(executeQuery).toHaveBeenCalledWith({
|
|
29
|
+
sql: {
|
|
30
|
+
singleton: {
|
|
31
|
+
containerId: "my-container",
|
|
32
|
+
query: "SELECT * FROM c",
|
|
33
|
+
crossPartition: true,
|
|
34
|
+
partitionKey: "pk-1",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
}, undefined, undefined);
|
|
38
|
+
});
|
|
39
|
+
it("defaults crossPartition to false when not specified", async () => {
|
|
40
|
+
const { client, executeQuery } = createClient([]);
|
|
41
|
+
await client.query("container-1", "SELECT TOP 1 * FROM c", z.array(z.unknown()));
|
|
42
|
+
const request = executeQuery.mock.calls[0][0];
|
|
43
|
+
expect(request.sql.singleton.crossPartition).toBe(false);
|
|
44
|
+
expect(request.sql.singleton.partitionKey).toBeUndefined();
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
describe("read", () => {
|
|
48
|
+
it("passes the correct proto JSON structure to executeQuery", async () => {
|
|
49
|
+
const { client, executeQuery } = createClient({
|
|
50
|
+
id: "doc-1",
|
|
51
|
+
name: "test",
|
|
52
|
+
});
|
|
53
|
+
await client.read("my-container", "doc-1", z.object({ id: z.string(), name: z.string() }), "pk-value");
|
|
54
|
+
expect(executeQuery).toHaveBeenCalledOnce();
|
|
55
|
+
expect(executeQuery).toHaveBeenCalledWith({
|
|
56
|
+
pointOperation: {
|
|
57
|
+
containerId: "my-container",
|
|
58
|
+
read: { id: "doc-1", partitionKey: "pk-value" },
|
|
59
|
+
},
|
|
60
|
+
}, undefined, undefined);
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
describe("create", () => {
|
|
64
|
+
it("passes the correct proto JSON structure with object body", async () => {
|
|
65
|
+
const body = { id: "new-doc", value: 42 };
|
|
66
|
+
const { client, executeQuery } = createClient(body);
|
|
67
|
+
await client.create("my-container", body, "pk-value");
|
|
68
|
+
expect(executeQuery).toHaveBeenCalledOnce();
|
|
69
|
+
expect(executeQuery).toHaveBeenCalledWith({
|
|
70
|
+
pointOperation: {
|
|
71
|
+
containerId: "my-container",
|
|
72
|
+
create: {
|
|
73
|
+
body: JSON.stringify(body),
|
|
74
|
+
partitionKey: "pk-value",
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
}, undefined, undefined);
|
|
78
|
+
});
|
|
79
|
+
it("passes string body as-is", async () => {
|
|
80
|
+
const bodyStr = '{"id":"doc-str"}';
|
|
81
|
+
const { client, executeQuery } = createClient({});
|
|
82
|
+
await client.create("my-container", bodyStr);
|
|
83
|
+
const request = executeQuery.mock.calls[0][0];
|
|
84
|
+
expect(request.pointOperation.create.body).toBe(bodyStr);
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
describe("replace", () => {
|
|
88
|
+
it("passes the correct proto JSON structure to executeQuery", async () => {
|
|
89
|
+
const body = { id: "doc-1", value: "updated" };
|
|
90
|
+
const { client, executeQuery } = createClient(body);
|
|
91
|
+
await client.replace("my-container", body, "pk-value");
|
|
92
|
+
expect(executeQuery).toHaveBeenCalledOnce();
|
|
93
|
+
expect(executeQuery).toHaveBeenCalledWith({
|
|
94
|
+
pointOperation: {
|
|
95
|
+
containerId: "my-container",
|
|
96
|
+
replace: {
|
|
97
|
+
body: JSON.stringify(body),
|
|
98
|
+
partitionKey: "pk-value",
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
}, undefined, undefined);
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
describe("upsert", () => {
|
|
105
|
+
it("passes the correct proto JSON structure to executeQuery", async () => {
|
|
106
|
+
const body = { id: "doc-1", value: "upserted" };
|
|
107
|
+
const { client, executeQuery } = createClient(body);
|
|
108
|
+
await client.upsert("my-container", body, "pk-value");
|
|
109
|
+
expect(executeQuery).toHaveBeenCalledOnce();
|
|
110
|
+
expect(executeQuery).toHaveBeenCalledWith({
|
|
111
|
+
pointOperation: {
|
|
112
|
+
containerId: "my-container",
|
|
113
|
+
upsert: {
|
|
114
|
+
body: JSON.stringify(body),
|
|
115
|
+
partitionKey: "pk-value",
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
}, undefined, undefined);
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
describe("deleteItem", () => {
|
|
122
|
+
it("passes the correct proto JSON structure to executeQuery", async () => {
|
|
123
|
+
const { client, executeQuery } = createClient({});
|
|
124
|
+
await client.deleteItem("my-container", "doc-to-delete", "pk-value");
|
|
125
|
+
expect(executeQuery).toHaveBeenCalledOnce();
|
|
126
|
+
expect(executeQuery).toHaveBeenCalledWith({
|
|
127
|
+
pointOperation: {
|
|
128
|
+
containerId: "my-container",
|
|
129
|
+
delete: { id: "doc-to-delete", partitionKey: "pk-value" },
|
|
130
|
+
},
|
|
131
|
+
}, undefined, undefined);
|
|
132
|
+
});
|
|
133
|
+
it("passes undefined partitionKey when not specified", async () => {
|
|
134
|
+
const { client, executeQuery } = createClient({});
|
|
135
|
+
await client.deleteItem("my-container", "doc-1");
|
|
136
|
+
const request = executeQuery.mock.calls[0][0];
|
|
137
|
+
expect(request.pointOperation.delete.partitionKey).toBeUndefined();
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
//# sourceMappingURL=client.test.js.map
|