@collective-intelligence/extensions-sdk-backend 0.1.30 → 0.1.31
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/README.md +169 -2
- package/dist/effect/datasets/external-dataset-provider.d.ts +15 -0
- package/dist/effect/datasets/managed-dataset-provider.d.ts +16 -0
- package/dist/effect/datasets/provider-implementations.d.ts +31 -0
- package/dist/effect/schemas/dataset-schema.d.ts +862 -0
- package/dist/effect/schemas/defaults.d.ts +13 -0
- package/dist/effect/schemas/schema.d.ts +23 -0
- package/dist/effect.d.ts +10 -1
- package/dist/effect.js +1 -0
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -114,9 +114,9 @@ Details keep only camelCase identifier, code, count, and flag metadata: `id`,
|
|
|
114
114
|
`resourceType`, `scopeKind`, `authorityMode`, `configured`,
|
|
115
115
|
`permissionGranted`, and `reachable`; other keys are dropped.
|
|
116
116
|
|
|
117
|
-
The
|
|
117
|
+
The root `.` exposes ordinary values and `PromiseLike` results. The `./effect` export holds the Effect adapter; see [Effect adapter (`./effect`)](#effect-adapter-effect). Private host implementations stay outside this package.
|
|
118
118
|
|
|
119
|
-
`effect` (`^4.1.0`) is a required peer. Install it next to the SDK and keep one `effect` version in the application. The package root does not load it
|
|
119
|
+
`effect` (`^4.1.0`) is a required peer. Install it next to the SDK and keep one `effect` version in the application. The package root does not load it; only `./effect` does.
|
|
120
120
|
|
|
121
121
|
For local validation, `test/consumer` is a private workspace with explicit SDK dependencies. Run `bun run test:pack` to verify the published boundary: it copies the consumer without local `node_modules` and installs the packed SDK artifacts in a temporary directory, so workspace links cannot satisfy its imports.
|
|
122
122
|
|
|
@@ -433,6 +433,173 @@ Declare `entitySchemaFqn: "*"` for a connector-wide fallback adapter. Hosts sele
|
|
|
433
433
|
one exact schema adapter first, then one wildcard adapter; ambiguous matches are
|
|
434
434
|
errors. The wildcard uses the existing declaration shape.
|
|
435
435
|
|
|
436
|
+
## Effect adapter (`./effect`)
|
|
437
|
+
|
|
438
|
+
`@collective-intelligence/extensions-sdk-backend/effect` holds the Effect Schema
|
|
439
|
+
adapter for `@collective-intelligence/extensions-sdk` and the Effect Dataset
|
|
440
|
+
Provider ports. Use it only when an extension is authored with Effect. It was
|
|
441
|
+
the package `@collective-intelligence/extensions-sdk-backend-effect`, which now
|
|
442
|
+
re-exports these names and is deprecated.
|
|
443
|
+
|
|
444
|
+
`ExternalDatasetProvider` and `ManagedDatasetProvider` have two meanings. At
|
|
445
|
+
`./effect` they are the Effect tags of the provider services; at `.` they are
|
|
446
|
+
the abstract base classes. The class that
|
|
447
|
+
`makeExternalDatasetProviderImplementation` or
|
|
448
|
+
`makeManagedDatasetProviderImplementation` returns extends the `.` class.
|
|
449
|
+
The tag keys keep the prefix
|
|
450
|
+
`@collective-intelligence/extensions-sdk-backend-effect/`, so a tag of an older
|
|
451
|
+
copy of the deprecated package still matches.
|
|
452
|
+
|
|
453
|
+
`ci package build` bundles `./effect` into the release and keeps `.`
|
|
454
|
+
Host-provided. An earlier CLI keeps `./effect` external, and
|
|
455
|
+
`ci package validate` rejects the release; see the CLI `CHANGELOG.md`.
|
|
456
|
+
|
|
457
|
+
```ts
|
|
458
|
+
import { effectSchema } from "@collective-intelligence/extensions-sdk-backend/effect"
|
|
459
|
+
import { Schema } from "effect"
|
|
460
|
+
|
|
461
|
+
const Count = effectSchema(Schema.NumberFromString, { codec: true })
|
|
462
|
+
|
|
463
|
+
await Count.validate("42") // { value: 42 }
|
|
464
|
+
await Count.encode(42) // { value: "42" }
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
`effectSchema(...)` infers Effect's encoded type as the package wire type and
|
|
468
|
+
its decoded type as the implementation value. It delegates validation,
|
|
469
|
+
defaults, refinements, transforms, and encoding to Effect, including
|
|
470
|
+
asynchronous schemas.
|
|
471
|
+
|
|
472
|
+
Effect's static `Codec` type does not reveal whether a schema uses a forbidden
|
|
473
|
+
encoding getter. For that reason, `effectSchema(schema)` safely creates a
|
|
474
|
+
decoder-only source. A package author must explicitly select codec capability
|
|
475
|
+
for an output schema:
|
|
476
|
+
|
|
477
|
+
```ts
|
|
478
|
+
const InputOnly = effectSchema(nativeSchema)
|
|
479
|
+
const InputAndOutput = effectSchema(nativeCodec, { codec: true })
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
The default source has no runtime `encode` function or output projection and
|
|
483
|
+
therefore does not satisfy the package codec capability required by output
|
|
484
|
+
declarations. Both decoding and encoding must be service-free when codec
|
|
485
|
+
capability is selected.
|
|
486
|
+
|
|
487
|
+
The adapter projects Effect's encoded side to deterministic Draft 2020-12 for
|
|
488
|
+
both codec directions as a portable interchange artifact. Runtime payloads
|
|
489
|
+
are decoded and encoded only by Effect; projections are never runtime
|
|
490
|
+
validation authority. Effect's decoded/type-side JSON Schema is not the
|
|
491
|
+
emitted wire contract. Projection fidelity is conservatively marked
|
|
492
|
+
`structural`: Effect remains authoritative for semantics that JSON Schema may
|
|
493
|
+
only approximate. Native Effect schema objects stay in runtime sidecars and
|
|
494
|
+
are never part of portable manifests or declaration hashes.
|
|
495
|
+
|
|
496
|
+
The projection closes ordinary `Schema.Struct` objects, including nested
|
|
497
|
+
structs, while retaining the value schema of explicit `Schema.Record` index
|
|
498
|
+
signatures. It uses Effect's `onExcessProperty: "error"` JSON Schema generation
|
|
499
|
+
option for this portable artifact. Effect's default decoder can still ignore
|
|
500
|
+
unknown properties, so an author asserting `exact` fidelity must separately
|
|
501
|
+
prove wire equivalence for the schema and decoding options in use.
|
|
502
|
+
|
|
503
|
+
Effect's `withDecodingDefault*` defaults are opaque Effects, so the projection
|
|
504
|
+
cannot show them. `withWorkflowDefault(value)` makes a struct key optional,
|
|
505
|
+
applies `value` when decoding, and annotates the same value as the projected
|
|
506
|
+
JSON Schema `default`, which editors show and consumer profiles validate:
|
|
507
|
+
|
|
508
|
+
```ts
|
|
509
|
+
import { withWorkflowDefault } from "@collective-intelligence/extensions-sdk-backend/effect"
|
|
510
|
+
|
|
511
|
+
const Config = Schema.Struct({
|
|
512
|
+
mode: Schema.Literals(["text", "structured"]).pipe(
|
|
513
|
+
withWorkflowDefault("text")
|
|
514
|
+
)
|
|
515
|
+
})
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
When the author has separately proved that the encoded Effect contract and
|
|
519
|
+
its projected JSON Schema accept exactly the same wire values, an exact-only
|
|
520
|
+
consumer can be selected explicitly:
|
|
521
|
+
|
|
522
|
+
```ts
|
|
523
|
+
const ExactInput = effectSchema(Schema.Boolean, { fidelity: "exact" })
|
|
524
|
+
const ExactCodec = effectSchema(Schema.String, {
|
|
525
|
+
codec: true,
|
|
526
|
+
fidelity: "exact"
|
|
527
|
+
})
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
This is an author assertion, not provider inference; transformed or refined
|
|
531
|
+
schemas should remain `structural` unless equivalence is covered by tests.
|
|
532
|
+
|
|
533
|
+
Interactive forms require closed object schemas. Opt into rejection of unknown
|
|
534
|
+
properties for both native decoding/encoding and the wire projection:
|
|
535
|
+
|
|
536
|
+
```ts
|
|
537
|
+
const Form = effectSchema(Schema.Struct({ name: Schema.String }), {
|
|
538
|
+
codec: true,
|
|
539
|
+
fidelity: "exact",
|
|
540
|
+
onExcessProperty: "error"
|
|
541
|
+
})
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
When the option is omitted, projections close unmodeled object properties while
|
|
545
|
+
native validation retains Effect's permissive behavior. Explicitly selecting
|
|
546
|
+
`onExcessProperty: "ignore"` also leaves those properties open in the projection.
|
|
547
|
+
The `"error"` policy also applies to nested objects; keys modeled by an Effect
|
|
548
|
+
Record remain valid. Projections preserve referenced definitions. Each adapter
|
|
549
|
+
owns its validation policy even when the same native schema was previously
|
|
550
|
+
adapted with another policy. `source.native` remains the original Effect schema;
|
|
551
|
+
the option configures the adapter, not direct calls to that native schema.
|
|
552
|
+
|
|
553
|
+
### Dataset Providers
|
|
554
|
+
|
|
555
|
+
`ManagedDatasetProvider` and `ExternalDatasetProvider` are invocation-scoped
|
|
556
|
+
Effect tags over the portable dataset vocabulary. Managed operations are
|
|
557
|
+
readiness, datasetProvision, datasetIngest, datasetQuery, datasetInspect, and
|
|
558
|
+
datasetDelete. External operations are readiness, listSources,
|
|
559
|
+
discoverDefinition, datasetQuery, and datasetInspect.
|
|
560
|
+
|
|
561
|
+
Use `makeExternalDatasetProviderImplementation` or
|
|
562
|
+
`makeManagedDatasetProviderImplementation` to expose one of those services as
|
|
563
|
+
the no-argument constructor required by `declareExternalDatasetProvider` or
|
|
564
|
+
`declareManagedDatasetProvider`:
|
|
565
|
+
|
|
566
|
+
```ts
|
|
567
|
+
import {
|
|
568
|
+
ExternalDatasetProvider,
|
|
569
|
+
makeExternalDatasetProviderImplementation
|
|
570
|
+
} from "@collective-intelligence/extensions-sdk-backend/effect"
|
|
571
|
+
import type { PackageRuntimeContext } from "@collective-intelligence/extensions-sdk-backend"
|
|
572
|
+
import * as Context from "effect/Context"
|
|
573
|
+
import * as Effect from "effect/Effect"
|
|
574
|
+
import * as Layer from "effect/Layer"
|
|
575
|
+
|
|
576
|
+
import {
|
|
577
|
+
decodeProviderConfig,
|
|
578
|
+
providerLayer,
|
|
579
|
+
resolveProviderCredentials
|
|
580
|
+
} from "./provider"
|
|
581
|
+
|
|
582
|
+
const acquireService = (context: PackageRuntimeContext) =>
|
|
583
|
+
Effect.gen(function* acquireProvider() {
|
|
584
|
+
const config = yield* decodeProviderConfig(context.config)
|
|
585
|
+
const credentials = yield* resolveProviderCredentials(context, config)
|
|
586
|
+
const services = yield* Layer.build(providerLayer({ config, credentials }))
|
|
587
|
+
return Context.get(services, ExternalDatasetProvider)
|
|
588
|
+
})
|
|
589
|
+
|
|
590
|
+
export const ExampleExternalDatasetProvider =
|
|
591
|
+
makeExternalDatasetProviderImplementation(acquireService)
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
The acquisition callback is the provider-owned boundary for decoding package
|
|
595
|
+
configuration, resolving host-authorized credentials, and constructing its
|
|
596
|
+
Layer. The adapter owns the common runtime bridge: it opens and closes an
|
|
597
|
+
Effect scope for every operation, forwards the host `AbortSignal` to
|
|
598
|
+
`Effect.runPromise`, preserves `DatasetProviderError` in the portable
|
|
599
|
+
`DatasetProviderResult` envelope, and delegates every provider method to the
|
|
600
|
+
acquired service. It supplies no default Layer and holds no provider state
|
|
601
|
+
between invocations.
|
|
602
|
+
|
|
436
603
|
## Enum value spelling
|
|
437
604
|
|
|
438
605
|
Repository-owned enum values use lower `snake_case`. This includes component kinds, dataset statuses, schema consumer profiles, and hosted contribution identity. Notification enum values retain their existing spelling. External protocol values, including HTTP methods and JSON Schema keywords and formats, retain the protocol spelling.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DatasetInspectInput, DatasetInspectResult, DatasetProviderError, DatasetResultPage, DefinitionProposal, DiscoverDefinitionInput, ListSourcesInput, QueryInput, Readiness, ReadinessInput, SourcePage } from "@collective-intelligence/extensions-sdk";
|
|
2
|
+
import type * as Effect from "effect/Effect";
|
|
3
|
+
import * as Context from "effect/Context";
|
|
4
|
+
/** Invocation-scoped External Dataset Provider authority; consumers own Layers. */
|
|
5
|
+
export interface ExternalDatasetProviderService {
|
|
6
|
+
readonly readiness: (input: ReadinessInput) => Effect.Effect<Readiness, DatasetProviderError>;
|
|
7
|
+
readonly listSources: (input: ListSourcesInput) => Effect.Effect<SourcePage, DatasetProviderError>;
|
|
8
|
+
readonly discoverDefinition: (input: DiscoverDefinitionInput) => Effect.Effect<DefinitionProposal, DatasetProviderError>;
|
|
9
|
+
readonly datasetQuery: (input: QueryInput) => Effect.Effect<DatasetResultPage, DatasetProviderError>;
|
|
10
|
+
readonly datasetInspect: (input: DatasetInspectInput) => Effect.Effect<DatasetInspectResult, DatasetProviderError>;
|
|
11
|
+
}
|
|
12
|
+
declare const ExternalDatasetProvider_base: Context.ServiceClass<ExternalDatasetProvider, "@collective-intelligence/extensions-sdk-backend-effect/ExternalDatasetProvider", ExternalDatasetProviderService>;
|
|
13
|
+
export declare class ExternalDatasetProvider extends ExternalDatasetProvider_base {
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DatasetDeleteInput, DatasetDeleteResult, DatasetIngestInput, DatasetIngestResult, DatasetInspectInput, DatasetInspectResult, DatasetProviderError, DatasetProvisionInput, DatasetProvisionResult, DatasetResultPage, QueryInput, Readiness, ReadinessInput } from "@collective-intelligence/extensions-sdk";
|
|
2
|
+
import type * as Effect from "effect/Effect";
|
|
3
|
+
import * as Context from "effect/Context";
|
|
4
|
+
/** Invocation-scoped Managed Dataset Provider authority; consumers own Layers. */
|
|
5
|
+
export interface ManagedDatasetProviderService {
|
|
6
|
+
readonly readiness: (input: ReadinessInput) => Effect.Effect<Readiness, DatasetProviderError>;
|
|
7
|
+
readonly datasetProvision: (input: DatasetProvisionInput) => Effect.Effect<DatasetProvisionResult, DatasetProviderError>;
|
|
8
|
+
readonly datasetIngest: (input: DatasetIngestInput) => Effect.Effect<DatasetIngestResult, DatasetProviderError>;
|
|
9
|
+
readonly datasetQuery: (input: QueryInput) => Effect.Effect<DatasetResultPage, DatasetProviderError>;
|
|
10
|
+
readonly datasetInspect: (input: DatasetInspectInput) => Effect.Effect<DatasetInspectResult, DatasetProviderError>;
|
|
11
|
+
readonly datasetDelete: (input: DatasetDeleteInput) => Effect.Effect<DatasetDeleteResult, DatasetProviderError>;
|
|
12
|
+
}
|
|
13
|
+
declare const ManagedDatasetProvider_base: Context.ServiceClass<ManagedDatasetProvider, "@collective-intelligence/extensions-sdk-backend-effect/ManagedDatasetProvider", ManagedDatasetProviderService>;
|
|
14
|
+
export declare class ManagedDatasetProvider extends ManagedDatasetProvider_base {
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { DatasetDeleteInput, DatasetDeleteResult, DatasetIngestInput, DatasetIngestResult, DatasetInspectInput, DatasetInspectResult, DatasetProviderError, DatasetProviderResult, DatasetProvisionInput, DatasetProvisionResult, DatasetResultPage, DefinitionProposal, DiscoverDefinitionInput, ListSourcesInput, QueryInput, Readiness, ReadinessInput, SourcePage } from "@collective-intelligence/extensions-sdk";
|
|
2
|
+
import type { PackageRuntimeContext } from "@collective-intelligence/extensions-sdk-backend";
|
|
3
|
+
import type * as Scope from "effect/Scope";
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import type { ExternalDatasetProviderService } from "./external-dataset-provider.js";
|
|
6
|
+
import type { ManagedDatasetProviderService } from "./managed-dataset-provider.js";
|
|
7
|
+
type DatasetProviderServiceAcquirer<Service> = (context: PackageRuntimeContext) => Effect.Effect<Service, DatasetProviderError, Scope.Scope>;
|
|
8
|
+
export type ExternalDatasetProviderServiceAcquirer = DatasetProviderServiceAcquirer<ExternalDatasetProviderService>;
|
|
9
|
+
export type ManagedDatasetProviderServiceAcquirer = DatasetProviderServiceAcquirer<ManagedDatasetProviderService>;
|
|
10
|
+
/** Adapts an invocation-scoped Effect External Dataset Provider to the backend SDK. */
|
|
11
|
+
export declare const makeExternalDatasetProviderImplementation: (acquireService: ExternalDatasetProviderServiceAcquirer) => {
|
|
12
|
+
new (): {
|
|
13
|
+
readiness(input: ReadinessInput, context: PackageRuntimeContext): Promise<DatasetProviderResult<Readiness>>;
|
|
14
|
+
listSources(input: ListSourcesInput, context: PackageRuntimeContext): Promise<DatasetProviderResult<SourcePage>>;
|
|
15
|
+
discoverDefinition(input: DiscoverDefinitionInput, context: PackageRuntimeContext): Promise<DatasetProviderResult<DefinitionProposal>>;
|
|
16
|
+
datasetQuery(input: QueryInput, context: PackageRuntimeContext): Promise<DatasetProviderResult<DatasetResultPage>>;
|
|
17
|
+
datasetInspect(input: DatasetInspectInput, context: PackageRuntimeContext): Promise<DatasetProviderResult<DatasetInspectResult>>;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
/** Adapts an invocation-scoped Effect Managed Dataset Provider to the backend SDK. */
|
|
21
|
+
export declare const makeManagedDatasetProviderImplementation: (acquireService: ManagedDatasetProviderServiceAcquirer) => {
|
|
22
|
+
new (): {
|
|
23
|
+
readiness(input: ReadinessInput, context: PackageRuntimeContext): Promise<DatasetProviderResult<Readiness>>;
|
|
24
|
+
datasetProvision(input: DatasetProvisionInput, context: PackageRuntimeContext): Promise<DatasetProviderResult<DatasetProvisionResult>>;
|
|
25
|
+
datasetIngest(input: DatasetIngestInput, context: PackageRuntimeContext): Promise<DatasetProviderResult<DatasetIngestResult>>;
|
|
26
|
+
datasetQuery(input: QueryInput, context: PackageRuntimeContext): Promise<DatasetProviderResult<DatasetResultPage>>;
|
|
27
|
+
datasetInspect(input: DatasetInspectInput, context: PackageRuntimeContext): Promise<DatasetProviderResult<DatasetInspectResult>>;
|
|
28
|
+
datasetDelete(input: DatasetDeleteInput, context: PackageRuntimeContext): Promise<DatasetProviderResult<DatasetDeleteResult>>;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,862 @@
|
|
|
1
|
+
import type { DatasetFilter as PortableDatasetFilter } from "@collective-intelligence/extensions-sdk";
|
|
2
|
+
import * as Schema from "effect/Schema";
|
|
3
|
+
export declare const DatasetScalarType: Schema.Literals<readonly ["boolean", "string", "int64", "float64", "decimal", "date", "timestamp", "duration", "json"]>;
|
|
4
|
+
export declare const SafeDiagnostic: Schema.Struct<{
|
|
5
|
+
readonly code: Schema.String;
|
|
6
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
7
|
+
readonly message: Schema.String;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const DatasetValue: Schema.Union<readonly [Schema.Struct<{
|
|
10
|
+
readonly kind: Schema.Literal<"null">;
|
|
11
|
+
}>, Schema.Struct<{
|
|
12
|
+
readonly kind: Schema.Literal<"boolean">;
|
|
13
|
+
readonly value: Schema.Boolean;
|
|
14
|
+
}>, Schema.Struct<{
|
|
15
|
+
readonly kind: Schema.Literal<"string">;
|
|
16
|
+
readonly value: Schema.String;
|
|
17
|
+
}>, Schema.Struct<{
|
|
18
|
+
readonly kind: Schema.Literal<"int64">;
|
|
19
|
+
readonly value: Schema.String;
|
|
20
|
+
}>, Schema.Struct<{
|
|
21
|
+
readonly kind: Schema.Literal<"float64">;
|
|
22
|
+
readonly value: Schema.Finite;
|
|
23
|
+
}>, Schema.Struct<{
|
|
24
|
+
readonly kind: Schema.Literal<"decimal">;
|
|
25
|
+
readonly value: Schema.String;
|
|
26
|
+
}>, Schema.Struct<{
|
|
27
|
+
readonly kind: Schema.Literal<"date">;
|
|
28
|
+
readonly value: Schema.String;
|
|
29
|
+
}>, Schema.Struct<{
|
|
30
|
+
readonly kind: Schema.Literal<"timestamp">;
|
|
31
|
+
readonly value: Schema.String;
|
|
32
|
+
}>, Schema.Struct<{
|
|
33
|
+
readonly kind: Schema.Literal<"duration">;
|
|
34
|
+
readonly value: Schema.String;
|
|
35
|
+
}>, Schema.Struct<{
|
|
36
|
+
readonly kind: Schema.Literal<"json">;
|
|
37
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
38
|
+
}>]>;
|
|
39
|
+
export declare const DatasetPredicateOperator: Schema.Literals<readonly ["eq", "ne", "lt", "lte", "gt", "gte", "in", "not_in", "is_null", "is_not_null", "contains", "starts_with"]>;
|
|
40
|
+
export declare const DatasetAggregateOperation: Schema.Literals<readonly ["count", "count_distinct", "sum", "min", "max", "avg"]>;
|
|
41
|
+
export declare const DatasetBindingMode: Schema.Literals<readonly ["external", "managed"]>;
|
|
42
|
+
export declare const DatasetQueryIntent: Schema.Literals<readonly ["records", "aggregate", "time_series"]>;
|
|
43
|
+
export declare const DatasetTimeBucket: Schema.Literals<readonly ["hour", "day", "week", "month"]>;
|
|
44
|
+
export declare const DatasetIngestMode: Schema.Literals<readonly ["append", "upsert", "replace"]>;
|
|
45
|
+
export declare const DatasetPredicate: Schema.Struct<{
|
|
46
|
+
readonly fieldId: Schema.String;
|
|
47
|
+
readonly kind: Schema.Literal<"predicate">;
|
|
48
|
+
readonly operator: Schema.Literals<readonly ["eq", "ne", "lt", "lte", "gt", "gte", "in", "not_in", "is_null", "is_not_null", "contains", "starts_with"]>;
|
|
49
|
+
readonly values: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
50
|
+
readonly kind: Schema.Literal<"null">;
|
|
51
|
+
}>, Schema.Struct<{
|
|
52
|
+
readonly kind: Schema.Literal<"boolean">;
|
|
53
|
+
readonly value: Schema.Boolean;
|
|
54
|
+
}>, Schema.Struct<{
|
|
55
|
+
readonly kind: Schema.Literal<"string">;
|
|
56
|
+
readonly value: Schema.String;
|
|
57
|
+
}>, Schema.Struct<{
|
|
58
|
+
readonly kind: Schema.Literal<"int64">;
|
|
59
|
+
readonly value: Schema.String;
|
|
60
|
+
}>, Schema.Struct<{
|
|
61
|
+
readonly kind: Schema.Literal<"float64">;
|
|
62
|
+
readonly value: Schema.Finite;
|
|
63
|
+
}>, Schema.Struct<{
|
|
64
|
+
readonly kind: Schema.Literal<"decimal">;
|
|
65
|
+
readonly value: Schema.String;
|
|
66
|
+
}>, Schema.Struct<{
|
|
67
|
+
readonly kind: Schema.Literal<"date">;
|
|
68
|
+
readonly value: Schema.String;
|
|
69
|
+
}>, Schema.Struct<{
|
|
70
|
+
readonly kind: Schema.Literal<"timestamp">;
|
|
71
|
+
readonly value: Schema.String;
|
|
72
|
+
}>, Schema.Struct<{
|
|
73
|
+
readonly kind: Schema.Literal<"duration">;
|
|
74
|
+
readonly value: Schema.String;
|
|
75
|
+
}>, Schema.Struct<{
|
|
76
|
+
readonly kind: Schema.Literal<"json">;
|
|
77
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
78
|
+
}>]>>;
|
|
79
|
+
}>;
|
|
80
|
+
export declare const DatasetFilter: Schema.Codec<PortableDatasetFilter>;
|
|
81
|
+
export declare const DatasetOrder: Schema.Struct<{
|
|
82
|
+
readonly direction: Schema.Literals<readonly ["asc", "desc"]>;
|
|
83
|
+
readonly fieldOrAlias: Schema.String;
|
|
84
|
+
}>;
|
|
85
|
+
export declare const DatasetOperation: Schema.Union<readonly [Schema.Struct<{
|
|
86
|
+
readonly cursor: Schema.optionalKey<Schema.String>;
|
|
87
|
+
readonly filter: Schema.optionalKey<Schema.Codec<PortableDatasetFilter, PortableDatasetFilter, never, never>>;
|
|
88
|
+
readonly kind: Schema.Literal<"records">;
|
|
89
|
+
readonly orderBy: Schema.$Array<Schema.Struct<{
|
|
90
|
+
readonly direction: Schema.Literals<readonly ["asc", "desc"]>;
|
|
91
|
+
readonly fieldOrAlias: Schema.String;
|
|
92
|
+
}>>;
|
|
93
|
+
readonly projection: Schema.$Array<Schema.String>;
|
|
94
|
+
}>, Schema.Struct<{
|
|
95
|
+
readonly cursor: Schema.optionalKey<Schema.String>;
|
|
96
|
+
readonly filter: Schema.optionalKey<Schema.Codec<PortableDatasetFilter, PortableDatasetFilter, never, never>>;
|
|
97
|
+
readonly groupBy: Schema.$Array<Schema.String>;
|
|
98
|
+
readonly kind: Schema.Literal<"aggregate">;
|
|
99
|
+
readonly measures: Schema.$Array<Schema.Struct<{
|
|
100
|
+
readonly alias: Schema.String;
|
|
101
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
102
|
+
readonly operation: Schema.Literals<readonly ["count", "count_distinct", "sum", "min", "max", "avg"]>;
|
|
103
|
+
}>>;
|
|
104
|
+
readonly orderBy: Schema.$Array<Schema.Struct<{
|
|
105
|
+
readonly direction: Schema.Literals<readonly ["asc", "desc"]>;
|
|
106
|
+
readonly fieldOrAlias: Schema.String;
|
|
107
|
+
}>>;
|
|
108
|
+
}>, Schema.Struct<{
|
|
109
|
+
readonly bucket: Schema.Literals<readonly ["hour", "day", "week", "month"]>;
|
|
110
|
+
readonly cursor: Schema.optionalKey<Schema.String>;
|
|
111
|
+
readonly filter: Schema.optionalKey<Schema.Codec<PortableDatasetFilter, PortableDatasetFilter, never, never>>;
|
|
112
|
+
readonly kind: Schema.Literal<"time_series">;
|
|
113
|
+
readonly measure: Schema.Struct<{
|
|
114
|
+
readonly alias: Schema.String;
|
|
115
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
116
|
+
readonly operation: Schema.Literals<readonly ["count", "count_distinct", "sum", "min", "max", "avg"]>;
|
|
117
|
+
}>;
|
|
118
|
+
readonly order: Schema.Literals<readonly ["asc", "desc"]>;
|
|
119
|
+
readonly timeFieldId: Schema.String;
|
|
120
|
+
}>]>;
|
|
121
|
+
export declare const DatasetProviderCapabilities: Schema.Struct<{
|
|
122
|
+
readonly aggregates: Schema.$Array<Schema.Literals<readonly ["count", "count_distinct", "sum", "min", "max", "avg"]>>;
|
|
123
|
+
readonly definitionRefresh: Schema.Boolean;
|
|
124
|
+
readonly grouping: Schema.Boolean;
|
|
125
|
+
readonly intents: Schema.$Array<Schema.Literals<readonly ["records", "aggregate", "time_series"]>>;
|
|
126
|
+
readonly limits: Schema.Struct<{
|
|
127
|
+
readonly maxBytes: Schema.Int;
|
|
128
|
+
readonly maxPageRows: Schema.Int;
|
|
129
|
+
readonly maxRows: Schema.Int;
|
|
130
|
+
readonly timeoutMs: Schema.Int;
|
|
131
|
+
}>;
|
|
132
|
+
readonly ordering: Schema.Boolean;
|
|
133
|
+
readonly pagination: Schema.Boolean;
|
|
134
|
+
readonly predicates: Schema.$Array<Schema.Literals<readonly ["eq", "ne", "lt", "lte", "gt", "gte", "in", "not_in", "is_null", "is_not_null", "contains", "starts_with"]>>;
|
|
135
|
+
}>;
|
|
136
|
+
export declare const ConnectorContext: Schema.Struct<{
|
|
137
|
+
readonly correlationId: Schema.String;
|
|
138
|
+
readonly deadlineEpochMs: Schema.Finite;
|
|
139
|
+
}>;
|
|
140
|
+
export declare const Bounds: Schema.Struct<{
|
|
141
|
+
readonly maxBytes: Schema.Int;
|
|
142
|
+
readonly maxRows: Schema.Int;
|
|
143
|
+
readonly timeoutMs: Schema.Int;
|
|
144
|
+
}>;
|
|
145
|
+
export declare const DatasetSourceLocation: Schema.Struct<{
|
|
146
|
+
readonly segments: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
|
|
147
|
+
readonly kind: Schema.Literal<"container">;
|
|
148
|
+
readonly label: Schema.String;
|
|
149
|
+
readonly opaqueId: Schema.String;
|
|
150
|
+
}>]>, readonly [Schema.Struct<{
|
|
151
|
+
readonly kind: Schema.Literals<readonly ["container", "dataset"]>;
|
|
152
|
+
readonly label: Schema.String;
|
|
153
|
+
readonly opaqueId: Schema.String;
|
|
154
|
+
}>]>;
|
|
155
|
+
}>;
|
|
156
|
+
export declare const Compatibility: Schema.Union<readonly [Schema.Struct<{
|
|
157
|
+
readonly diagnostics: Schema.$Array<Schema.Struct<{
|
|
158
|
+
readonly code: Schema.String;
|
|
159
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
160
|
+
readonly message: Schema.String;
|
|
161
|
+
}>>;
|
|
162
|
+
readonly status: Schema.Literal<"compatible">;
|
|
163
|
+
}>, Schema.Struct<{
|
|
164
|
+
readonly diagnostics: Schema.NonEmptyArray<Schema.Struct<{
|
|
165
|
+
readonly code: Schema.String;
|
|
166
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
167
|
+
readonly message: Schema.String;
|
|
168
|
+
}>>;
|
|
169
|
+
readonly status: Schema.Literal<"incompatible">;
|
|
170
|
+
}>]>;
|
|
171
|
+
export declare const DatasetSourceItem: Schema.Struct<{
|
|
172
|
+
readonly compatibility: Schema.Union<readonly [Schema.Struct<{
|
|
173
|
+
readonly diagnostics: Schema.$Array<Schema.Struct<{
|
|
174
|
+
readonly code: Schema.String;
|
|
175
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
176
|
+
readonly message: Schema.String;
|
|
177
|
+
}>>;
|
|
178
|
+
readonly status: Schema.Literal<"compatible">;
|
|
179
|
+
}>, Schema.Struct<{
|
|
180
|
+
readonly diagnostics: Schema.NonEmptyArray<Schema.Struct<{
|
|
181
|
+
readonly code: Schema.String;
|
|
182
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
183
|
+
readonly message: Schema.String;
|
|
184
|
+
}>>;
|
|
185
|
+
readonly status: Schema.Literal<"incompatible">;
|
|
186
|
+
}>]>;
|
|
187
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
188
|
+
readonly kind: Schema.Literals<readonly ["container", "dataset"]>;
|
|
189
|
+
readonly label: Schema.String;
|
|
190
|
+
readonly location: Schema.Struct<{
|
|
191
|
+
readonly segments: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
|
|
192
|
+
readonly kind: Schema.Literal<"container">;
|
|
193
|
+
readonly label: Schema.String;
|
|
194
|
+
readonly opaqueId: Schema.String;
|
|
195
|
+
}>]>, readonly [Schema.Struct<{
|
|
196
|
+
readonly kind: Schema.Literals<readonly ["container", "dataset"]>;
|
|
197
|
+
readonly label: Schema.String;
|
|
198
|
+
readonly opaqueId: Schema.String;
|
|
199
|
+
}>]>;
|
|
200
|
+
}>;
|
|
201
|
+
readonly selectable: Schema.Boolean;
|
|
202
|
+
}>;
|
|
203
|
+
export declare const Readiness: Schema.Union<readonly [Schema.Struct<{
|
|
204
|
+
readonly capabilities: Schema.Struct<{
|
|
205
|
+
readonly aggregates: Schema.$Array<Schema.Literals<readonly ["count", "count_distinct", "sum", "min", "max", "avg"]>>;
|
|
206
|
+
readonly definitionRefresh: Schema.Boolean;
|
|
207
|
+
readonly grouping: Schema.Boolean;
|
|
208
|
+
readonly intents: Schema.$Array<Schema.Literals<readonly ["records", "aggregate", "time_series"]>>;
|
|
209
|
+
readonly limits: Schema.Struct<{
|
|
210
|
+
readonly maxBytes: Schema.Int;
|
|
211
|
+
readonly maxPageRows: Schema.Int;
|
|
212
|
+
readonly maxRows: Schema.Int;
|
|
213
|
+
readonly timeoutMs: Schema.Int;
|
|
214
|
+
}>;
|
|
215
|
+
readonly ordering: Schema.Boolean;
|
|
216
|
+
readonly pagination: Schema.Boolean;
|
|
217
|
+
readonly predicates: Schema.$Array<Schema.Literals<readonly ["eq", "ne", "lt", "lte", "gt", "gte", "in", "not_in", "is_null", "is_not_null", "contains", "starts_with"]>>;
|
|
218
|
+
}>;
|
|
219
|
+
readonly status: Schema.Literal<"ready">;
|
|
220
|
+
}>, Schema.Struct<{
|
|
221
|
+
readonly diagnostics: Schema.NonEmptyArray<Schema.Struct<{
|
|
222
|
+
readonly code: Schema.String;
|
|
223
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
224
|
+
readonly message: Schema.String;
|
|
225
|
+
}>>;
|
|
226
|
+
readonly status: Schema.Literal<"not_ready">;
|
|
227
|
+
}>]>;
|
|
228
|
+
export declare const SourcePage: Schema.Struct<{
|
|
229
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
230
|
+
readonly compatibility: Schema.Union<readonly [Schema.Struct<{
|
|
231
|
+
readonly diagnostics: Schema.$Array<Schema.Struct<{
|
|
232
|
+
readonly code: Schema.String;
|
|
233
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
234
|
+
readonly message: Schema.String;
|
|
235
|
+
}>>;
|
|
236
|
+
readonly status: Schema.Literal<"compatible">;
|
|
237
|
+
}>, Schema.Struct<{
|
|
238
|
+
readonly diagnostics: Schema.NonEmptyArray<Schema.Struct<{
|
|
239
|
+
readonly code: Schema.String;
|
|
240
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
241
|
+
readonly message: Schema.String;
|
|
242
|
+
}>>;
|
|
243
|
+
readonly status: Schema.Literal<"incompatible">;
|
|
244
|
+
}>]>;
|
|
245
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
246
|
+
readonly kind: Schema.Literals<readonly ["container", "dataset"]>;
|
|
247
|
+
readonly label: Schema.String;
|
|
248
|
+
readonly location: Schema.Struct<{
|
|
249
|
+
readonly segments: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
|
|
250
|
+
readonly kind: Schema.Literal<"container">;
|
|
251
|
+
readonly label: Schema.String;
|
|
252
|
+
readonly opaqueId: Schema.String;
|
|
253
|
+
}>]>, readonly [Schema.Struct<{
|
|
254
|
+
readonly kind: Schema.Literals<readonly ["container", "dataset"]>;
|
|
255
|
+
readonly label: Schema.String;
|
|
256
|
+
readonly opaqueId: Schema.String;
|
|
257
|
+
}>]>;
|
|
258
|
+
}>;
|
|
259
|
+
readonly selectable: Schema.Boolean;
|
|
260
|
+
}>>;
|
|
261
|
+
readonly nextCursor: Schema.optionalKey<Schema.String>;
|
|
262
|
+
readonly truncated: Schema.Boolean;
|
|
263
|
+
}>;
|
|
264
|
+
export declare const DatasetDefinition: Schema.Struct<{
|
|
265
|
+
readonly fields: Schema.$Array<Schema.Struct<{
|
|
266
|
+
readonly id: Schema.String;
|
|
267
|
+
readonly name: Schema.String;
|
|
268
|
+
readonly nullable: Schema.Boolean;
|
|
269
|
+
readonly semantic: Schema.optionalKey<Schema.String>;
|
|
270
|
+
readonly type: Schema.Literals<readonly ["boolean", "string", "int64", "float64", "decimal", "date", "timestamp", "duration", "json"]>;
|
|
271
|
+
}>>;
|
|
272
|
+
readonly measures: Schema.$Array<Schema.Struct<{
|
|
273
|
+
readonly id: Schema.String;
|
|
274
|
+
readonly name: Schema.String;
|
|
275
|
+
readonly resultType: Schema.Literals<readonly ["boolean", "string", "int64", "float64", "decimal", "date", "timestamp", "duration", "json"]>;
|
|
276
|
+
}>>;
|
|
277
|
+
readonly relationships: Schema.$Array<Schema.Struct<{
|
|
278
|
+
readonly cardinality: Schema.Literals<readonly ["one_to_one", "one_to_many", "many_to_one", "many_to_many"]>;
|
|
279
|
+
readonly fromFieldId: Schema.String;
|
|
280
|
+
readonly id: Schema.String;
|
|
281
|
+
readonly toFieldId: Schema.String;
|
|
282
|
+
}>>;
|
|
283
|
+
readonly version: Schema.Literal<1>;
|
|
284
|
+
}>;
|
|
285
|
+
export declare const DefinitionProposal: Schema.Struct<{
|
|
286
|
+
readonly compatibility: Schema.Union<readonly [Schema.Struct<{
|
|
287
|
+
readonly diagnostics: Schema.$Array<Schema.Struct<{
|
|
288
|
+
readonly code: Schema.String;
|
|
289
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
290
|
+
readonly message: Schema.String;
|
|
291
|
+
}>>;
|
|
292
|
+
readonly status: Schema.Literal<"compatible">;
|
|
293
|
+
}>, Schema.Struct<{
|
|
294
|
+
readonly diagnostics: Schema.NonEmptyArray<Schema.Struct<{
|
|
295
|
+
readonly code: Schema.String;
|
|
296
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
297
|
+
readonly message: Schema.String;
|
|
298
|
+
}>>;
|
|
299
|
+
readonly status: Schema.Literal<"incompatible">;
|
|
300
|
+
}>]>;
|
|
301
|
+
readonly definition: Schema.Struct<{
|
|
302
|
+
readonly fields: Schema.$Array<Schema.Struct<{
|
|
303
|
+
readonly id: Schema.String;
|
|
304
|
+
readonly name: Schema.String;
|
|
305
|
+
readonly nullable: Schema.Boolean;
|
|
306
|
+
readonly semantic: Schema.optionalKey<Schema.String>;
|
|
307
|
+
readonly type: Schema.Literals<readonly ["boolean", "string", "int64", "float64", "decimal", "date", "timestamp", "duration", "json"]>;
|
|
308
|
+
}>>;
|
|
309
|
+
readonly measures: Schema.$Array<Schema.Struct<{
|
|
310
|
+
readonly id: Schema.String;
|
|
311
|
+
readonly name: Schema.String;
|
|
312
|
+
readonly resultType: Schema.Literals<readonly ["boolean", "string", "int64", "float64", "decimal", "date", "timestamp", "duration", "json"]>;
|
|
313
|
+
}>>;
|
|
314
|
+
readonly relationships: Schema.$Array<Schema.Struct<{
|
|
315
|
+
readonly cardinality: Schema.Literals<readonly ["one_to_one", "one_to_many", "many_to_one", "many_to_many"]>;
|
|
316
|
+
readonly fromFieldId: Schema.String;
|
|
317
|
+
readonly id: Schema.String;
|
|
318
|
+
readonly toFieldId: Schema.String;
|
|
319
|
+
}>>;
|
|
320
|
+
readonly version: Schema.Literal<1>;
|
|
321
|
+
}>;
|
|
322
|
+
readonly diagnostics: Schema.$Array<Schema.Struct<{
|
|
323
|
+
readonly code: Schema.String;
|
|
324
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
325
|
+
readonly message: Schema.String;
|
|
326
|
+
}>>;
|
|
327
|
+
readonly label: Schema.String;
|
|
328
|
+
readonly location: Schema.Struct<{
|
|
329
|
+
readonly segments: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
|
|
330
|
+
readonly kind: Schema.Literal<"container">;
|
|
331
|
+
readonly label: Schema.String;
|
|
332
|
+
readonly opaqueId: Schema.String;
|
|
333
|
+
}>]>, readonly [Schema.Struct<{
|
|
334
|
+
readonly kind: Schema.Literals<readonly ["container", "dataset"]>;
|
|
335
|
+
readonly label: Schema.String;
|
|
336
|
+
readonly opaqueId: Schema.String;
|
|
337
|
+
}>]>;
|
|
338
|
+
}>;
|
|
339
|
+
readonly observedAt: Schema.String;
|
|
340
|
+
}>;
|
|
341
|
+
export declare const ReadinessInput: Schema.Struct<{
|
|
342
|
+
readonly correlationId: Schema.String;
|
|
343
|
+
readonly deadlineEpochMs: Schema.Finite;
|
|
344
|
+
}>;
|
|
345
|
+
export declare const ListSourcesInput: Schema.Struct<{
|
|
346
|
+
readonly correlationId: Schema.String;
|
|
347
|
+
readonly deadlineEpochMs: Schema.Finite;
|
|
348
|
+
readonly cursor: Schema.optionalKey<Schema.String>;
|
|
349
|
+
readonly limit: Schema.Int;
|
|
350
|
+
readonly parent: Schema.optionalKey<Schema.Struct<{
|
|
351
|
+
readonly segments: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
|
|
352
|
+
readonly kind: Schema.Literal<"container">;
|
|
353
|
+
readonly label: Schema.String;
|
|
354
|
+
readonly opaqueId: Schema.String;
|
|
355
|
+
}>]>, readonly [Schema.Struct<{
|
|
356
|
+
readonly kind: Schema.Literals<readonly ["container", "dataset"]>;
|
|
357
|
+
readonly label: Schema.String;
|
|
358
|
+
readonly opaqueId: Schema.String;
|
|
359
|
+
}>]>;
|
|
360
|
+
}>>;
|
|
361
|
+
}>;
|
|
362
|
+
export declare const DiscoverDefinitionInput: Schema.Struct<{
|
|
363
|
+
readonly correlationId: Schema.String;
|
|
364
|
+
readonly deadlineEpochMs: Schema.Finite;
|
|
365
|
+
readonly location: Schema.Struct<{
|
|
366
|
+
readonly segments: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
|
|
367
|
+
readonly kind: Schema.Literal<"container">;
|
|
368
|
+
readonly label: Schema.String;
|
|
369
|
+
readonly opaqueId: Schema.String;
|
|
370
|
+
}>]>, readonly [Schema.Struct<{
|
|
371
|
+
readonly kind: Schema.Literals<readonly ["container", "dataset"]>;
|
|
372
|
+
readonly label: Schema.String;
|
|
373
|
+
readonly opaqueId: Schema.String;
|
|
374
|
+
}>]>;
|
|
375
|
+
}>;
|
|
376
|
+
}>;
|
|
377
|
+
export declare const QueryInput: Schema.Struct<{
|
|
378
|
+
readonly correlationId: Schema.String;
|
|
379
|
+
readonly deadlineEpochMs: Schema.Finite;
|
|
380
|
+
readonly bounds: Schema.Struct<{
|
|
381
|
+
readonly maxBytes: Schema.Int;
|
|
382
|
+
readonly maxRows: Schema.Int;
|
|
383
|
+
readonly timeoutMs: Schema.Int;
|
|
384
|
+
}>;
|
|
385
|
+
readonly definition: Schema.Struct<{
|
|
386
|
+
readonly fields: Schema.$Array<Schema.Struct<{
|
|
387
|
+
readonly id: Schema.String;
|
|
388
|
+
readonly name: Schema.String;
|
|
389
|
+
readonly nullable: Schema.Boolean;
|
|
390
|
+
readonly semantic: Schema.optionalKey<Schema.String>;
|
|
391
|
+
readonly type: Schema.Literals<readonly ["boolean", "string", "int64", "float64", "decimal", "date", "timestamp", "duration", "json"]>;
|
|
392
|
+
}>>;
|
|
393
|
+
readonly measures: Schema.$Array<Schema.Struct<{
|
|
394
|
+
readonly id: Schema.String;
|
|
395
|
+
readonly name: Schema.String;
|
|
396
|
+
readonly resultType: Schema.Literals<readonly ["boolean", "string", "int64", "float64", "decimal", "date", "timestamp", "duration", "json"]>;
|
|
397
|
+
}>>;
|
|
398
|
+
readonly relationships: Schema.$Array<Schema.Struct<{
|
|
399
|
+
readonly cardinality: Schema.Literals<readonly ["one_to_one", "one_to_many", "many_to_one", "many_to_many"]>;
|
|
400
|
+
readonly fromFieldId: Schema.String;
|
|
401
|
+
readonly id: Schema.String;
|
|
402
|
+
readonly toFieldId: Schema.String;
|
|
403
|
+
}>>;
|
|
404
|
+
readonly version: Schema.Literal<1>;
|
|
405
|
+
}>;
|
|
406
|
+
readonly definitionRevisionId: Schema.String;
|
|
407
|
+
readonly location: Schema.Struct<{
|
|
408
|
+
readonly segments: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
|
|
409
|
+
readonly kind: Schema.Literal<"container">;
|
|
410
|
+
readonly label: Schema.String;
|
|
411
|
+
readonly opaqueId: Schema.String;
|
|
412
|
+
}>]>, readonly [Schema.Struct<{
|
|
413
|
+
readonly kind: Schema.Literals<readonly ["container", "dataset"]>;
|
|
414
|
+
readonly label: Schema.String;
|
|
415
|
+
readonly opaqueId: Schema.String;
|
|
416
|
+
}>]>;
|
|
417
|
+
}>;
|
|
418
|
+
readonly operation: Schema.Union<readonly [Schema.Struct<{
|
|
419
|
+
readonly cursor: Schema.optionalKey<Schema.String>;
|
|
420
|
+
readonly filter: Schema.optionalKey<Schema.Codec<PortableDatasetFilter, PortableDatasetFilter, never, never>>;
|
|
421
|
+
readonly kind: Schema.Literal<"records">;
|
|
422
|
+
readonly orderBy: Schema.$Array<Schema.Struct<{
|
|
423
|
+
readonly direction: Schema.Literals<readonly ["asc", "desc"]>;
|
|
424
|
+
readonly fieldOrAlias: Schema.String;
|
|
425
|
+
}>>;
|
|
426
|
+
readonly projection: Schema.$Array<Schema.String>;
|
|
427
|
+
}>, Schema.Struct<{
|
|
428
|
+
readonly cursor: Schema.optionalKey<Schema.String>;
|
|
429
|
+
readonly filter: Schema.optionalKey<Schema.Codec<PortableDatasetFilter, PortableDatasetFilter, never, never>>;
|
|
430
|
+
readonly groupBy: Schema.$Array<Schema.String>;
|
|
431
|
+
readonly kind: Schema.Literal<"aggregate">;
|
|
432
|
+
readonly measures: Schema.$Array<Schema.Struct<{
|
|
433
|
+
readonly alias: Schema.String;
|
|
434
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
435
|
+
readonly operation: Schema.Literals<readonly ["count", "count_distinct", "sum", "min", "max", "avg"]>;
|
|
436
|
+
}>>;
|
|
437
|
+
readonly orderBy: Schema.$Array<Schema.Struct<{
|
|
438
|
+
readonly direction: Schema.Literals<readonly ["asc", "desc"]>;
|
|
439
|
+
readonly fieldOrAlias: Schema.String;
|
|
440
|
+
}>>;
|
|
441
|
+
}>, Schema.Struct<{
|
|
442
|
+
readonly bucket: Schema.Literals<readonly ["hour", "day", "week", "month"]>;
|
|
443
|
+
readonly cursor: Schema.optionalKey<Schema.String>;
|
|
444
|
+
readonly filter: Schema.optionalKey<Schema.Codec<PortableDatasetFilter, PortableDatasetFilter, never, never>>;
|
|
445
|
+
readonly kind: Schema.Literal<"time_series">;
|
|
446
|
+
readonly measure: Schema.Struct<{
|
|
447
|
+
readonly alias: Schema.String;
|
|
448
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
449
|
+
readonly operation: Schema.Literals<readonly ["count", "count_distinct", "sum", "min", "max", "avg"]>;
|
|
450
|
+
}>;
|
|
451
|
+
readonly order: Schema.Literals<readonly ["asc", "desc"]>;
|
|
452
|
+
readonly timeFieldId: Schema.String;
|
|
453
|
+
}>]>;
|
|
454
|
+
}>;
|
|
455
|
+
export declare const DatasetHealth: Schema.Union<readonly [Schema.Struct<{
|
|
456
|
+
readonly status: Schema.Literal<"unknown">;
|
|
457
|
+
}>, Schema.Struct<{
|
|
458
|
+
readonly checkedAt: Schema.String;
|
|
459
|
+
readonly status: Schema.Literal<"healthy">;
|
|
460
|
+
}>, Schema.Struct<{
|
|
461
|
+
readonly checkedAt: Schema.String;
|
|
462
|
+
readonly diagnostics: Schema.NonEmptyArray<Schema.Struct<{
|
|
463
|
+
readonly code: Schema.String;
|
|
464
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
465
|
+
readonly message: Schema.String;
|
|
466
|
+
}>>;
|
|
467
|
+
readonly status: Schema.Literals<readonly ["degraded", "unavailable"]>;
|
|
468
|
+
}>]>;
|
|
469
|
+
export declare const DatasetProvisionInput: Schema.Struct<{
|
|
470
|
+
readonly correlationId: Schema.String;
|
|
471
|
+
readonly deadlineEpochMs: Schema.Finite;
|
|
472
|
+
readonly definition: Schema.Struct<{
|
|
473
|
+
readonly fields: Schema.$Array<Schema.Struct<{
|
|
474
|
+
readonly id: Schema.String;
|
|
475
|
+
readonly name: Schema.String;
|
|
476
|
+
readonly nullable: Schema.Boolean;
|
|
477
|
+
readonly semantic: Schema.optionalKey<Schema.String>;
|
|
478
|
+
readonly type: Schema.Literals<readonly ["boolean", "string", "int64", "float64", "decimal", "date", "timestamp", "duration", "json"]>;
|
|
479
|
+
}>>;
|
|
480
|
+
readonly measures: Schema.$Array<Schema.Struct<{
|
|
481
|
+
readonly id: Schema.String;
|
|
482
|
+
readonly name: Schema.String;
|
|
483
|
+
readonly resultType: Schema.Literals<readonly ["boolean", "string", "int64", "float64", "decimal", "date", "timestamp", "duration", "json"]>;
|
|
484
|
+
}>>;
|
|
485
|
+
readonly relationships: Schema.$Array<Schema.Struct<{
|
|
486
|
+
readonly cardinality: Schema.Literals<readonly ["one_to_one", "one_to_many", "many_to_one", "many_to_many"]>;
|
|
487
|
+
readonly fromFieldId: Schema.String;
|
|
488
|
+
readonly id: Schema.String;
|
|
489
|
+
readonly toFieldId: Schema.String;
|
|
490
|
+
}>>;
|
|
491
|
+
readonly version: Schema.Literal<1>;
|
|
492
|
+
}>;
|
|
493
|
+
readonly definitionRevisionId: Schema.String;
|
|
494
|
+
readonly templateFqn: Schema.String;
|
|
495
|
+
}>;
|
|
496
|
+
export declare const DatasetProvisionResult: Schema.Struct<{
|
|
497
|
+
readonly physicalLocator: Schema.String;
|
|
498
|
+
}>;
|
|
499
|
+
export declare const DatasetIngestResult: Schema.Struct<{
|
|
500
|
+
readonly byteCount: Schema.Int;
|
|
501
|
+
readonly rowCount: Schema.Int;
|
|
502
|
+
}>;
|
|
503
|
+
export declare const DatasetInspectInput: Schema.Struct<{
|
|
504
|
+
readonly correlationId: Schema.String;
|
|
505
|
+
readonly deadlineEpochMs: Schema.Finite;
|
|
506
|
+
readonly definitionRevisionId: Schema.String;
|
|
507
|
+
readonly location: Schema.optionalKey<Schema.Struct<{
|
|
508
|
+
readonly segments: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
|
|
509
|
+
readonly kind: Schema.Literal<"container">;
|
|
510
|
+
readonly label: Schema.String;
|
|
511
|
+
readonly opaqueId: Schema.String;
|
|
512
|
+
}>]>, readonly [Schema.Struct<{
|
|
513
|
+
readonly kind: Schema.Literals<readonly ["container", "dataset"]>;
|
|
514
|
+
readonly label: Schema.String;
|
|
515
|
+
readonly opaqueId: Schema.String;
|
|
516
|
+
}>]>;
|
|
517
|
+
}>>;
|
|
518
|
+
readonly physicalLocator: Schema.optionalKey<Schema.String>;
|
|
519
|
+
}>;
|
|
520
|
+
export declare const DatasetInspectResult: Schema.Struct<{
|
|
521
|
+
readonly health: Schema.Union<readonly [Schema.Struct<{
|
|
522
|
+
readonly status: Schema.Literal<"unknown">;
|
|
523
|
+
}>, Schema.Struct<{
|
|
524
|
+
readonly checkedAt: Schema.String;
|
|
525
|
+
readonly status: Schema.Literal<"healthy">;
|
|
526
|
+
}>, Schema.Struct<{
|
|
527
|
+
readonly checkedAt: Schema.String;
|
|
528
|
+
readonly diagnostics: Schema.NonEmptyArray<Schema.Struct<{
|
|
529
|
+
readonly code: Schema.String;
|
|
530
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
531
|
+
readonly message: Schema.String;
|
|
532
|
+
}>>;
|
|
533
|
+
readonly status: Schema.Literals<readonly ["degraded", "unavailable"]>;
|
|
534
|
+
}>]>;
|
|
535
|
+
}>;
|
|
536
|
+
export declare const DatasetDeleteInput: Schema.Struct<{
|
|
537
|
+
readonly correlationId: Schema.String;
|
|
538
|
+
readonly deadlineEpochMs: Schema.Finite;
|
|
539
|
+
readonly definitionRevisionId: Schema.String;
|
|
540
|
+
readonly physicalLocator: Schema.String;
|
|
541
|
+
}>;
|
|
542
|
+
export declare const DatasetDeleteResult: Schema.Struct<{
|
|
543
|
+
readonly status: Schema.Literal<"deleted">;
|
|
544
|
+
}>;
|
|
545
|
+
export declare const ExternalDatasetBinding: Schema.Struct<{
|
|
546
|
+
readonly admittedRevisionId: Schema.String;
|
|
547
|
+
readonly compatibility: Schema.Union<readonly [Schema.Struct<{
|
|
548
|
+
readonly diagnostics: Schema.$Array<Schema.Struct<{
|
|
549
|
+
readonly code: Schema.String;
|
|
550
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
551
|
+
readonly message: Schema.String;
|
|
552
|
+
}>>;
|
|
553
|
+
readonly status: Schema.Literal<"compatible">;
|
|
554
|
+
}>, Schema.Struct<{
|
|
555
|
+
readonly diagnostics: Schema.NonEmptyArray<Schema.Struct<{
|
|
556
|
+
readonly code: Schema.String;
|
|
557
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
558
|
+
readonly message: Schema.String;
|
|
559
|
+
}>>;
|
|
560
|
+
readonly status: Schema.Literal<"incompatible">;
|
|
561
|
+
}>]>;
|
|
562
|
+
readonly connectionId: Schema.String;
|
|
563
|
+
readonly connectorFqn: Schema.String;
|
|
564
|
+
readonly createdAt: Schema.String;
|
|
565
|
+
readonly datasetId: Schema.String;
|
|
566
|
+
readonly health: Schema.Union<readonly [Schema.Struct<{
|
|
567
|
+
readonly status: Schema.Literal<"unknown">;
|
|
568
|
+
}>, Schema.Struct<{
|
|
569
|
+
readonly checkedAt: Schema.String;
|
|
570
|
+
readonly status: Schema.Literal<"healthy">;
|
|
571
|
+
}>, Schema.Struct<{
|
|
572
|
+
readonly checkedAt: Schema.String;
|
|
573
|
+
readonly diagnostics: Schema.NonEmptyArray<Schema.Struct<{
|
|
574
|
+
readonly code: Schema.String;
|
|
575
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
576
|
+
readonly message: Schema.String;
|
|
577
|
+
}>>;
|
|
578
|
+
readonly status: Schema.Literals<readonly ["degraded", "unavailable"]>;
|
|
579
|
+
}>]>;
|
|
580
|
+
readonly location: Schema.Struct<{
|
|
581
|
+
readonly segments: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
|
|
582
|
+
readonly kind: Schema.Literal<"container">;
|
|
583
|
+
readonly label: Schema.String;
|
|
584
|
+
readonly opaqueId: Schema.String;
|
|
585
|
+
}>]>, readonly [Schema.Struct<{
|
|
586
|
+
readonly kind: Schema.Literals<readonly ["container", "dataset"]>;
|
|
587
|
+
readonly label: Schema.String;
|
|
588
|
+
readonly opaqueId: Schema.String;
|
|
589
|
+
}>]>;
|
|
590
|
+
}>;
|
|
591
|
+
readonly mode: Schema.Literal<"external">;
|
|
592
|
+
readonly refresh: Schema.Union<readonly [Schema.Struct<{
|
|
593
|
+
readonly status: Schema.Literal<"idle">;
|
|
594
|
+
}>, Schema.Struct<{
|
|
595
|
+
readonly operationId: Schema.String;
|
|
596
|
+
readonly status: Schema.Literal<"running">;
|
|
597
|
+
}>, Schema.Struct<{
|
|
598
|
+
readonly proposalId: Schema.String;
|
|
599
|
+
readonly status: Schema.Literal<"review_required">;
|
|
600
|
+
}>, Schema.Struct<{
|
|
601
|
+
readonly diagnostics: Schema.NonEmptyArray<Schema.Struct<{
|
|
602
|
+
readonly code: Schema.String;
|
|
603
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
604
|
+
readonly message: Schema.String;
|
|
605
|
+
}>>;
|
|
606
|
+
readonly status: Schema.Literal<"failed">;
|
|
607
|
+
}>]>;
|
|
608
|
+
readonly updatedAt: Schema.String;
|
|
609
|
+
}>;
|
|
610
|
+
export declare const DatasetRecordPage: Schema.Struct<{
|
|
611
|
+
readonly byteCount: Schema.Int;
|
|
612
|
+
readonly columns: Schema.$Array<Schema.Struct<{
|
|
613
|
+
readonly fieldId: Schema.String;
|
|
614
|
+
readonly type: Schema.Literals<readonly ["boolean", "string", "int64", "float64", "decimal", "date", "timestamp", "duration", "json"]>;
|
|
615
|
+
}>>;
|
|
616
|
+
readonly nextCursor: Schema.optionalKey<Schema.String>;
|
|
617
|
+
readonly observedAt: Schema.String;
|
|
618
|
+
readonly rowCount: Schema.Int;
|
|
619
|
+
readonly rows: Schema.$Array<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
620
|
+
readonly kind: Schema.Literal<"null">;
|
|
621
|
+
}>, Schema.Struct<{
|
|
622
|
+
readonly kind: Schema.Literal<"boolean">;
|
|
623
|
+
readonly value: Schema.Boolean;
|
|
624
|
+
}>, Schema.Struct<{
|
|
625
|
+
readonly kind: Schema.Literal<"string">;
|
|
626
|
+
readonly value: Schema.String;
|
|
627
|
+
}>, Schema.Struct<{
|
|
628
|
+
readonly kind: Schema.Literal<"int64">;
|
|
629
|
+
readonly value: Schema.String;
|
|
630
|
+
}>, Schema.Struct<{
|
|
631
|
+
readonly kind: Schema.Literal<"float64">;
|
|
632
|
+
readonly value: Schema.Finite;
|
|
633
|
+
}>, Schema.Struct<{
|
|
634
|
+
readonly kind: Schema.Literal<"decimal">;
|
|
635
|
+
readonly value: Schema.String;
|
|
636
|
+
}>, Schema.Struct<{
|
|
637
|
+
readonly kind: Schema.Literal<"date">;
|
|
638
|
+
readonly value: Schema.String;
|
|
639
|
+
}>, Schema.Struct<{
|
|
640
|
+
readonly kind: Schema.Literal<"timestamp">;
|
|
641
|
+
readonly value: Schema.String;
|
|
642
|
+
}>, Schema.Struct<{
|
|
643
|
+
readonly kind: Schema.Literal<"duration">;
|
|
644
|
+
readonly value: Schema.String;
|
|
645
|
+
}>, Schema.Struct<{
|
|
646
|
+
readonly kind: Schema.Literal<"json">;
|
|
647
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
648
|
+
}>]>>>;
|
|
649
|
+
}>;
|
|
650
|
+
export declare const DatasetIngestInput: Schema.Struct<{
|
|
651
|
+
readonly correlationId: Schema.String;
|
|
652
|
+
readonly deadlineEpochMs: Schema.Finite;
|
|
653
|
+
readonly definition: Schema.Struct<{
|
|
654
|
+
readonly fields: Schema.$Array<Schema.Struct<{
|
|
655
|
+
readonly id: Schema.String;
|
|
656
|
+
readonly name: Schema.String;
|
|
657
|
+
readonly nullable: Schema.Boolean;
|
|
658
|
+
readonly semantic: Schema.optionalKey<Schema.String>;
|
|
659
|
+
readonly type: Schema.Literals<readonly ["boolean", "string", "int64", "float64", "decimal", "date", "timestamp", "duration", "json"]>;
|
|
660
|
+
}>>;
|
|
661
|
+
readonly measures: Schema.$Array<Schema.Struct<{
|
|
662
|
+
readonly id: Schema.String;
|
|
663
|
+
readonly name: Schema.String;
|
|
664
|
+
readonly resultType: Schema.Literals<readonly ["boolean", "string", "int64", "float64", "decimal", "date", "timestamp", "duration", "json"]>;
|
|
665
|
+
}>>;
|
|
666
|
+
readonly relationships: Schema.$Array<Schema.Struct<{
|
|
667
|
+
readonly cardinality: Schema.Literals<readonly ["one_to_one", "one_to_many", "many_to_one", "many_to_many"]>;
|
|
668
|
+
readonly fromFieldId: Schema.String;
|
|
669
|
+
readonly id: Schema.String;
|
|
670
|
+
readonly toFieldId: Schema.String;
|
|
671
|
+
}>>;
|
|
672
|
+
readonly version: Schema.Literal<1>;
|
|
673
|
+
}>;
|
|
674
|
+
readonly definitionRevisionId: Schema.String;
|
|
675
|
+
readonly mode: Schema.Literals<readonly ["append", "upsert", "replace"]>;
|
|
676
|
+
readonly physicalLocator: Schema.String;
|
|
677
|
+
readonly records: Schema.Struct<{
|
|
678
|
+
readonly byteCount: Schema.Int;
|
|
679
|
+
readonly columns: Schema.$Array<Schema.Struct<{
|
|
680
|
+
readonly fieldId: Schema.String;
|
|
681
|
+
readonly type: Schema.Literals<readonly ["boolean", "string", "int64", "float64", "decimal", "date", "timestamp", "duration", "json"]>;
|
|
682
|
+
}>>;
|
|
683
|
+
readonly nextCursor: Schema.optionalKey<Schema.String>;
|
|
684
|
+
readonly observedAt: Schema.String;
|
|
685
|
+
readonly rowCount: Schema.Int;
|
|
686
|
+
readonly rows: Schema.$Array<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
687
|
+
readonly kind: Schema.Literal<"null">;
|
|
688
|
+
}>, Schema.Struct<{
|
|
689
|
+
readonly kind: Schema.Literal<"boolean">;
|
|
690
|
+
readonly value: Schema.Boolean;
|
|
691
|
+
}>, Schema.Struct<{
|
|
692
|
+
readonly kind: Schema.Literal<"string">;
|
|
693
|
+
readonly value: Schema.String;
|
|
694
|
+
}>, Schema.Struct<{
|
|
695
|
+
readonly kind: Schema.Literal<"int64">;
|
|
696
|
+
readonly value: Schema.String;
|
|
697
|
+
}>, Schema.Struct<{
|
|
698
|
+
readonly kind: Schema.Literal<"float64">;
|
|
699
|
+
readonly value: Schema.Finite;
|
|
700
|
+
}>, Schema.Struct<{
|
|
701
|
+
readonly kind: Schema.Literal<"decimal">;
|
|
702
|
+
readonly value: Schema.String;
|
|
703
|
+
}>, Schema.Struct<{
|
|
704
|
+
readonly kind: Schema.Literal<"date">;
|
|
705
|
+
readonly value: Schema.String;
|
|
706
|
+
}>, Schema.Struct<{
|
|
707
|
+
readonly kind: Schema.Literal<"timestamp">;
|
|
708
|
+
readonly value: Schema.String;
|
|
709
|
+
}>, Schema.Struct<{
|
|
710
|
+
readonly kind: Schema.Literal<"duration">;
|
|
711
|
+
readonly value: Schema.String;
|
|
712
|
+
}>, Schema.Struct<{
|
|
713
|
+
readonly kind: Schema.Literal<"json">;
|
|
714
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
715
|
+
}>]>>>;
|
|
716
|
+
}>;
|
|
717
|
+
}>;
|
|
718
|
+
export declare const DatasetResultPage: Schema.Union<readonly [Schema.Struct<{
|
|
719
|
+
readonly byteCount: Schema.Int;
|
|
720
|
+
readonly columns: Schema.$Array<Schema.Struct<{
|
|
721
|
+
readonly fieldId: Schema.String;
|
|
722
|
+
readonly type: Schema.Literals<readonly ["boolean", "string", "int64", "float64", "decimal", "date", "timestamp", "duration", "json"]>;
|
|
723
|
+
}>>;
|
|
724
|
+
readonly nextCursor: Schema.optionalKey<Schema.String>;
|
|
725
|
+
readonly observedAt: Schema.String;
|
|
726
|
+
readonly rowCount: Schema.Int;
|
|
727
|
+
readonly rows: Schema.$Array<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
728
|
+
readonly kind: Schema.Literal<"null">;
|
|
729
|
+
}>, Schema.Struct<{
|
|
730
|
+
readonly kind: Schema.Literal<"boolean">;
|
|
731
|
+
readonly value: Schema.Boolean;
|
|
732
|
+
}>, Schema.Struct<{
|
|
733
|
+
readonly kind: Schema.Literal<"string">;
|
|
734
|
+
readonly value: Schema.String;
|
|
735
|
+
}>, Schema.Struct<{
|
|
736
|
+
readonly kind: Schema.Literal<"int64">;
|
|
737
|
+
readonly value: Schema.String;
|
|
738
|
+
}>, Schema.Struct<{
|
|
739
|
+
readonly kind: Schema.Literal<"float64">;
|
|
740
|
+
readonly value: Schema.Finite;
|
|
741
|
+
}>, Schema.Struct<{
|
|
742
|
+
readonly kind: Schema.Literal<"decimal">;
|
|
743
|
+
readonly value: Schema.String;
|
|
744
|
+
}>, Schema.Struct<{
|
|
745
|
+
readonly kind: Schema.Literal<"date">;
|
|
746
|
+
readonly value: Schema.String;
|
|
747
|
+
}>, Schema.Struct<{
|
|
748
|
+
readonly kind: Schema.Literal<"timestamp">;
|
|
749
|
+
readonly value: Schema.String;
|
|
750
|
+
}>, Schema.Struct<{
|
|
751
|
+
readonly kind: Schema.Literal<"duration">;
|
|
752
|
+
readonly value: Schema.String;
|
|
753
|
+
}>, Schema.Struct<{
|
|
754
|
+
readonly kind: Schema.Literal<"json">;
|
|
755
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
756
|
+
}>]>>>;
|
|
757
|
+
readonly kind: Schema.Literal<"records">;
|
|
758
|
+
}>, Schema.Struct<{
|
|
759
|
+
readonly byteCount: Schema.Int;
|
|
760
|
+
readonly columns: Schema.$Array<Schema.Struct<{
|
|
761
|
+
readonly alias: Schema.String;
|
|
762
|
+
readonly type: Schema.Literals<readonly ["boolean", "string", "int64", "float64", "decimal", "date", "timestamp", "duration", "json"]>;
|
|
763
|
+
}>>;
|
|
764
|
+
readonly kind: Schema.Literal<"aggregate">;
|
|
765
|
+
readonly nextCursor: Schema.optionalKey<Schema.String>;
|
|
766
|
+
readonly observedAt: Schema.String;
|
|
767
|
+
readonly rowCount: Schema.Int;
|
|
768
|
+
readonly rows: Schema.$Array<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
769
|
+
readonly kind: Schema.Literal<"null">;
|
|
770
|
+
}>, Schema.Struct<{
|
|
771
|
+
readonly kind: Schema.Literal<"boolean">;
|
|
772
|
+
readonly value: Schema.Boolean;
|
|
773
|
+
}>, Schema.Struct<{
|
|
774
|
+
readonly kind: Schema.Literal<"string">;
|
|
775
|
+
readonly value: Schema.String;
|
|
776
|
+
}>, Schema.Struct<{
|
|
777
|
+
readonly kind: Schema.Literal<"int64">;
|
|
778
|
+
readonly value: Schema.String;
|
|
779
|
+
}>, Schema.Struct<{
|
|
780
|
+
readonly kind: Schema.Literal<"float64">;
|
|
781
|
+
readonly value: Schema.Finite;
|
|
782
|
+
}>, Schema.Struct<{
|
|
783
|
+
readonly kind: Schema.Literal<"decimal">;
|
|
784
|
+
readonly value: Schema.String;
|
|
785
|
+
}>, Schema.Struct<{
|
|
786
|
+
readonly kind: Schema.Literal<"date">;
|
|
787
|
+
readonly value: Schema.String;
|
|
788
|
+
}>, Schema.Struct<{
|
|
789
|
+
readonly kind: Schema.Literal<"timestamp">;
|
|
790
|
+
readonly value: Schema.String;
|
|
791
|
+
}>, Schema.Struct<{
|
|
792
|
+
readonly kind: Schema.Literal<"duration">;
|
|
793
|
+
readonly value: Schema.String;
|
|
794
|
+
}>, Schema.Struct<{
|
|
795
|
+
readonly kind: Schema.Literal<"json">;
|
|
796
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
797
|
+
}>]>>>;
|
|
798
|
+
}>, Schema.Struct<{
|
|
799
|
+
readonly byteCount: Schema.Int;
|
|
800
|
+
readonly kind: Schema.Literal<"time_series">;
|
|
801
|
+
readonly nextCursor: Schema.optionalKey<Schema.String>;
|
|
802
|
+
readonly observedAt: Schema.String;
|
|
803
|
+
readonly pointCount: Schema.Int;
|
|
804
|
+
readonly points: Schema.$Array<Schema.Struct<{
|
|
805
|
+
readonly time: Schema.String;
|
|
806
|
+
readonly value: Schema.Union<readonly [Schema.Struct<{
|
|
807
|
+
readonly kind: Schema.Literal<"null">;
|
|
808
|
+
}>, Schema.Struct<{
|
|
809
|
+
readonly kind: Schema.Literal<"boolean">;
|
|
810
|
+
readonly value: Schema.Boolean;
|
|
811
|
+
}>, Schema.Struct<{
|
|
812
|
+
readonly kind: Schema.Literal<"string">;
|
|
813
|
+
readonly value: Schema.String;
|
|
814
|
+
}>, Schema.Struct<{
|
|
815
|
+
readonly kind: Schema.Literal<"int64">;
|
|
816
|
+
readonly value: Schema.String;
|
|
817
|
+
}>, Schema.Struct<{
|
|
818
|
+
readonly kind: Schema.Literal<"float64">;
|
|
819
|
+
readonly value: Schema.Finite;
|
|
820
|
+
}>, Schema.Struct<{
|
|
821
|
+
readonly kind: Schema.Literal<"decimal">;
|
|
822
|
+
readonly value: Schema.String;
|
|
823
|
+
}>, Schema.Struct<{
|
|
824
|
+
readonly kind: Schema.Literal<"date">;
|
|
825
|
+
readonly value: Schema.String;
|
|
826
|
+
}>, Schema.Struct<{
|
|
827
|
+
readonly kind: Schema.Literal<"timestamp">;
|
|
828
|
+
readonly value: Schema.String;
|
|
829
|
+
}>, Schema.Struct<{
|
|
830
|
+
readonly kind: Schema.Literal<"duration">;
|
|
831
|
+
readonly value: Schema.String;
|
|
832
|
+
}>, Schema.Struct<{
|
|
833
|
+
readonly kind: Schema.Literal<"json">;
|
|
834
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
835
|
+
}>]>;
|
|
836
|
+
}>>;
|
|
837
|
+
readonly valueType: Schema.Literals<readonly ["boolean", "string", "int64", "float64", "decimal", "date", "timestamp", "duration", "json"]>;
|
|
838
|
+
}>]>;
|
|
839
|
+
export declare const DatasetProviderError: Schema.Union<readonly [Schema.Struct<{
|
|
840
|
+
readonly diagnostics: Schema.$Array<Schema.Struct<{
|
|
841
|
+
readonly code: Schema.String;
|
|
842
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
843
|
+
readonly message: Schema.String;
|
|
844
|
+
}>>;
|
|
845
|
+
readonly kind: Schema.Literals<readonly ["not_ready", "incompatible_source", "unsupported_operation", "policy_not_pushable", "invalid_cursor", "timeout", "permission_denied", "provider_unavailable", "provider_rejected", "invalid_provider_response"]>;
|
|
846
|
+
}>, Schema.Struct<{
|
|
847
|
+
readonly diagnostics: Schema.$Array<Schema.Struct<{
|
|
848
|
+
readonly code: Schema.String;
|
|
849
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
850
|
+
readonly message: Schema.String;
|
|
851
|
+
}>>;
|
|
852
|
+
readonly kind: Schema.Literal<"limit_exceeded">;
|
|
853
|
+
readonly limit: Schema.Literals<readonly ["rows", "bytes", "timeout"]>;
|
|
854
|
+
}>, Schema.Struct<{
|
|
855
|
+
readonly diagnostics: Schema.$Array<Schema.Struct<{
|
|
856
|
+
readonly code: Schema.String;
|
|
857
|
+
readonly fieldId: Schema.optionalKey<Schema.String>;
|
|
858
|
+
readonly message: Schema.String;
|
|
859
|
+
}>>;
|
|
860
|
+
readonly kind: Schema.Literal<"throttled">;
|
|
861
|
+
readonly retryAfterMs: Schema.optionalKey<Schema.Int>;
|
|
862
|
+
}>]>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
/**
|
|
3
|
+
* Makes a struct key optional with a default that decoding applies and the
|
|
4
|
+
* projected JSON Schema shows as `default`; the value is stated once for both.
|
|
5
|
+
* It behaves like `Schema.withDecodingDefaultKey(Effect.succeed(value))`.
|
|
6
|
+
*
|
|
7
|
+
* Projections describe the encoded side, so the default rides there on an
|
|
8
|
+
* always-passing filter with an empty JSON Schema fragment. An annotation
|
|
9
|
+
* would not survive: Effect attaches it to the schema's last check, drops the
|
|
10
|
+
* annotations of a custom filter without a JSON Schema fragment, and drops
|
|
11
|
+
* type-side checks from the encoded side of a transformed struct.
|
|
12
|
+
*/
|
|
13
|
+
export declare const withWorkflowDefault: <S extends Schema.Top>(value: S["Type"] & S["Encoded"]) => (self: S) => Schema.decodeTo<S, Schema.optionalKey<Schema.toEncoded<S>>, never, never>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Effect Schema adapter for the provider-neutral package schema protocol. */
|
|
2
|
+
import type { PackageCodec, PackageDecoder, PackageSchemaSource } from "@collective-intelligence/extensions-sdk";
|
|
3
|
+
import * as Schema from "effect/Schema";
|
|
4
|
+
type EffectCodecSource<S extends Schema.Codec<unknown, unknown>> = PackageSchemaSource<S["Encoded"], S["Type"], S> & PackageCodec<S["Encoded"], S["Type"]>;
|
|
5
|
+
type EffectDecoderSource<S extends Schema.Decoder<unknown>> = PackageSchemaSource<S["Encoded"], S["Type"], S> & PackageDecoder<S["Encoded"], S["Type"]>;
|
|
6
|
+
export interface EffectCodecOptions {
|
|
7
|
+
readonly codec: true;
|
|
8
|
+
readonly fidelity?: "exact" | "structural";
|
|
9
|
+
readonly onExcessProperty?: "ignore" | "error";
|
|
10
|
+
}
|
|
11
|
+
export interface EffectDecoderOptions {
|
|
12
|
+
readonly codec?: false;
|
|
13
|
+
readonly fidelity: "exact";
|
|
14
|
+
readonly onExcessProperty?: "ignore" | "error";
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Adapts a context-free Effect Schema to the provider-neutral package schema
|
|
18
|
+
* protocol. Effect remains the authority for decoding, encoding, transforms,
|
|
19
|
+
* defaults, refinements, and Standard Schema issue formatting.
|
|
20
|
+
*/
|
|
21
|
+
export declare function effectSchema<const S extends Schema.Codec<unknown, unknown>>(schema: S, options: EffectCodecOptions): EffectCodecSource<S>;
|
|
22
|
+
export declare function effectSchema<const S extends Schema.Decoder<unknown>>(schema: S, options?: EffectDecoderOptions): EffectDecoderSource<S>;
|
|
23
|
+
export {};
|
package/dist/effect.d.ts
CHANGED
|
@@ -1 +1,10 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { effectSchema } from "./effect/schemas/schema.js";
|
|
2
|
+
export type { EffectCodecOptions, EffectDecoderOptions } from "./effect/schemas/schema.js";
|
|
3
|
+
export { withWorkflowDefault } from "./effect/schemas/defaults.js";
|
|
4
|
+
export { ExternalDatasetProvider } from "./effect/datasets/external-dataset-provider.js";
|
|
5
|
+
export type { ExternalDatasetProviderService } from "./effect/datasets/external-dataset-provider.js";
|
|
6
|
+
export { ManagedDatasetProvider } from "./effect/datasets/managed-dataset-provider.js";
|
|
7
|
+
export type { ManagedDatasetProviderService } from "./effect/datasets/managed-dataset-provider.js";
|
|
8
|
+
export { makeExternalDatasetProviderImplementation, makeManagedDatasetProviderImplementation } from "./effect/datasets/provider-implementations.js";
|
|
9
|
+
export type { ExternalDatasetProviderServiceAcquirer, ManagedDatasetProviderServiceAcquirer } from "./effect/datasets/provider-implementations.js";
|
|
10
|
+
export { Bounds, Compatibility, ConnectorContext, DatasetAggregateOperation, DatasetBindingMode, DatasetDefinition, DatasetDeleteInput, DatasetDeleteResult, DatasetFilter, DatasetHealth, DatasetIngestInput, DatasetIngestMode, DatasetIngestResult, DatasetInspectInput, DatasetInspectResult, DatasetOperation, DatasetOrder, DatasetPredicate, DatasetPredicateOperator, DatasetProviderCapabilities, DatasetProviderError, DatasetProvisionInput, DatasetProvisionResult, DatasetQueryIntent, DatasetRecordPage, DatasetResultPage, DatasetScalarType, DatasetSourceItem, DatasetSourceLocation, DatasetTimeBucket, DatasetValue, DefinitionProposal, DiscoverDefinitionInput, ExternalDatasetBinding, ListSourcesInput, QueryInput, Readiness, ReadinessInput, SafeDiagnostic, SourcePage } from "./effect/schemas/dataset-schema.js";
|
package/dist/effect.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{canonicalJson,definePackageSchema,normalizeJsonSchemaProjection,parseJsonObject,UnrestrictedScopeKeyword}from"@collective-intelligence/extensions-sdk";import*as Schema from"effect/Schema";var isCodecSchema=(schema,options)=>schema!==undefined&&options?.codec===true;var asJsonSchemaDocument=(value)=>{if(value===null||value===true||value===false||Array.isArray(value)||Object(value)!==value){throw new TypeError("Effect projected an invalid root JSON Schema value")}return parseJsonObject(canonicalJson(value))};var projectEncoded=(schema,fidelity,onExcessProperty)=>{const document=Schema.toJsonSchemaDocument(schema,{includeAnnotationKey:(key)=>key===UnrestrictedScopeKeyword,onExcessProperty});const projection=Object.keys(document.definitions).length===0?document.schema:{...document.schema,$defs:document.definitions};const projectionJson=Schema.decodeUnknownSync(Schema.Json)(projection);if(!Schema.is(Schema.Record(Schema.String,Schema.Json))(projectionJson)){throw new TypeError("Effect projected a boolean JSON Schema, which is not supported by package manifests")}return normalizeJsonSchemaProjection(asJsonSchemaDocument(projectionJson),fidelity)};function effectSchema(schema,options){const fidelity=options?.fidelity??"structural";const onExcessProperty=options?.onExcessProperty??"ignore";const document=projectEncoded(schema,fidelity,options?.onExcessProperty??"error");const projection={dialect:"https://json-schema.org/draft/2020-12/schema",document,fidelity};const standard=Schema.toStandardSchemaV1(schema.annotate({}),{parseOptions:{onExcessProperty}})["~standard"];if(!isCodecSchema(schema,options)){return definePackageSchema({native:schema,projections:{input:projection},provider:"effect",validate:standard.validate})}const encoder=Schema.toStandardSchemaV1(Schema.flip(schema).annotate({}),{parseOptions:{onExcessProperty}})["~standard"];const source=definePackageSchema({encode:encoder.validate,native:schema,projections:{input:projection,output:projection},provider:"effect",validate:standard.validate});return source}import*as Effect from"effect/Effect";import*as Schema2 from"effect/Schema";import*as SchemaGetter from"effect/SchemaGetter";var withWorkflowDefault=(value)=>(self)=>Schema2.optionalKey(Schema2.toEncoded(self).check(Schema2.makeFilter(()=>true,{default:value,toJsonSchema:()=>({})}))).pipe(Schema2.decodeTo(self,{decode:SchemaGetter.withDefault(Effect.succeed(value)),encode:SchemaGetter.passthrough()}));import*as Context from"effect/Context";class ExternalDatasetProvider extends Context.Service()("@collective-intelligence/extensions-sdk-backend-effect/ExternalDatasetProvider"){}import*as Context2 from"effect/Context";class ManagedDatasetProvider extends Context2.Service()("@collective-intelligence/extensions-sdk-backend-effect/ManagedDatasetProvider"){}import{ExternalDatasetProvider as BackendExternalDatasetProvider,ManagedDatasetProvider as BackendManagedDatasetProvider}from"@collective-intelligence/extensions-sdk-backend";import*as Effect2 from"effect/Effect";var runProvider=(acquireService,context,operation)=>{const result=Effect2.scoped(Effect2.flatMap(acquireService(context),operation)).pipe(Effect2.match({onFailure:(error)=>({error,status:"failure"}),onSuccess:(value)=>({status:"success",value})}));const options=context.signal===undefined?undefined:{signal:context.signal};return Effect2.runPromise(result,options)};var makeExternalDatasetProviderImplementation=(acquireService)=>class ExternalDatasetProviderImplementation extends BackendExternalDatasetProvider{readiness(input,context){return runProvider(acquireService,context,(service)=>service.readiness(input))}listSources(input,context){return runProvider(acquireService,context,(service)=>service.listSources(input))}discoverDefinition(input,context){return runProvider(acquireService,context,(service)=>service.discoverDefinition(input))}datasetQuery(input,context){return runProvider(acquireService,context,(service)=>service.datasetQuery(input))}datasetInspect(input,context){return runProvider(acquireService,context,(service)=>service.datasetInspect(input))}};var makeManagedDatasetProviderImplementation=(acquireService)=>class ManagedDatasetProviderImplementation extends BackendManagedDatasetProvider{readiness(input,context){return runProvider(acquireService,context,(service)=>service.readiness(input))}datasetProvision(input,context){return runProvider(acquireService,context,(service)=>service.datasetProvision(input))}datasetIngest(input,context){return runProvider(acquireService,context,(service)=>service.datasetIngest(input))}datasetQuery(input,context){return runProvider(acquireService,context,(service)=>service.datasetQuery(input))}datasetInspect(input,context){return runProvider(acquireService,context,(service)=>service.datasetInspect(input))}datasetDelete(input,context){return runProvider(acquireService,context,(service)=>service.datasetDelete(input))}};import*as Schema3 from"effect/Schema";var DatasetScalarType=Schema3.Literals(["boolean","string","int64","float64","decimal","date","timestamp","duration","json"]);var SafeDiagnostic=Schema3.Struct({code:Schema3.String,fieldId:Schema3.optionalKey(Schema3.String),message:Schema3.String});var DatasetValue=Schema3.Union([Schema3.Struct({kind:Schema3.Literal("null")}),Schema3.Struct({kind:Schema3.Literal("boolean"),value:Schema3.Boolean}),Schema3.Struct({kind:Schema3.Literal("string"),value:Schema3.String}),Schema3.Struct({kind:Schema3.Literal("int64"),value:Schema3.String}),Schema3.Struct({kind:Schema3.Literal("float64"),value:Schema3.Finite}),Schema3.Struct({kind:Schema3.Literal("decimal"),value:Schema3.String}),Schema3.Struct({kind:Schema3.Literal("date"),value:Schema3.String}),Schema3.Struct({kind:Schema3.Literal("timestamp"),value:Schema3.String}),Schema3.Struct({kind:Schema3.Literal("duration"),value:Schema3.String}),Schema3.Struct({kind:Schema3.Literal("json"),value:Schema3.Json})]);var DatasetPredicateOperator=Schema3.Literals(["eq","ne","lt","lte","gt","gte","in","not_in","is_null","is_not_null","contains","starts_with"]);var DatasetAggregateOperation=Schema3.Literals(["count","count_distinct","sum","min","max","avg"]);var DatasetBindingMode=Schema3.Literals(["external","managed"]);var DatasetQueryIntent=Schema3.Literals(["records","aggregate","time_series"]);var DatasetTimeBucket=Schema3.Literals(["hour","day","week","month"]);var DatasetIngestMode=Schema3.Literals(["append","upsert","replace"]);var DatasetPredicate=Schema3.Struct({fieldId:Schema3.String,kind:Schema3.Literal("predicate"),operator:DatasetPredicateOperator,values:Schema3.Array(DatasetValue)});var DatasetFilter=Schema3.suspend(()=>Schema3.Union([DatasetPredicate,Schema3.Struct({filters:Schema3.Array(DatasetFilter),kind:Schema3.Literals(["and","or"])}),Schema3.Struct({filter:DatasetFilter,kind:Schema3.Literal("not")})]));var DatasetOrder=Schema3.Struct({direction:Schema3.Literals(["asc","desc"]),fieldOrAlias:Schema3.String});var DatasetOperation=Schema3.Union([Schema3.Struct({cursor:Schema3.optionalKey(Schema3.String),filter:Schema3.optionalKey(DatasetFilter),kind:Schema3.Literal("records"),orderBy:Schema3.Array(DatasetOrder),projection:Schema3.Array(Schema3.String)}),Schema3.Struct({cursor:Schema3.optionalKey(Schema3.String),filter:Schema3.optionalKey(DatasetFilter),groupBy:Schema3.Array(Schema3.String),kind:Schema3.Literal("aggregate"),measures:Schema3.Array(Schema3.Struct({alias:Schema3.String,fieldId:Schema3.optionalKey(Schema3.String),operation:DatasetAggregateOperation})),orderBy:Schema3.Array(DatasetOrder)}),Schema3.Struct({bucket:DatasetTimeBucket,cursor:Schema3.optionalKey(Schema3.String),filter:Schema3.optionalKey(DatasetFilter),kind:Schema3.Literal("time_series"),measure:Schema3.Struct({alias:Schema3.String,fieldId:Schema3.optionalKey(Schema3.String),operation:DatasetAggregateOperation}),order:Schema3.Literals(["asc","desc"]),timeFieldId:Schema3.String})]);var DatasetProviderCapabilities=Schema3.Struct({aggregates:Schema3.Array(DatasetAggregateOperation),definitionRefresh:Schema3.Boolean,grouping:Schema3.Boolean,intents:Schema3.Array(DatasetQueryIntent),limits:Schema3.Struct({maxBytes:Schema3.Int.pipe(Schema3.check(Schema3.isGreaterThan(0))),maxPageRows:Schema3.Int.pipe(Schema3.check(Schema3.isGreaterThan(0))),maxRows:Schema3.Int.pipe(Schema3.check(Schema3.isGreaterThan(0))),timeoutMs:Schema3.Int.pipe(Schema3.check(Schema3.isGreaterThan(0)))}),ordering:Schema3.Boolean,pagination:Schema3.Boolean,predicates:Schema3.Array(DatasetPredicateOperator)});var ConnectorContext=Schema3.Struct({correlationId:Schema3.String,deadlineEpochMs:Schema3.Finite});var Bounds=Schema3.Struct({maxBytes:Schema3.Int.pipe(Schema3.check(Schema3.isGreaterThan(0))),maxRows:Schema3.Int.pipe(Schema3.check(Schema3.isGreaterThan(0))),timeoutMs:Schema3.Int.pipe(Schema3.check(Schema3.isGreaterThan(0)))});var SourceSegment=Schema3.Struct({kind:Schema3.Literals(["container","dataset"]),label:Schema3.String,opaqueId:Schema3.String});var SourceRoot=Schema3.Struct({kind:Schema3.Literal("container"),label:Schema3.String,opaqueId:Schema3.String});var DatasetSourceLocation=Schema3.Struct({segments:Schema3.TupleWithRest(Schema3.Tuple([SourceRoot]),[SourceSegment])});var Compatibility=Schema3.Union([Schema3.Struct({diagnostics:Schema3.Array(SafeDiagnostic),status:Schema3.Literal("compatible")}),Schema3.Struct({diagnostics:Schema3.NonEmptyArray(SafeDiagnostic),status:Schema3.Literal("incompatible")})]);var DatasetSourceItem=Schema3.Struct({compatibility:Compatibility,description:Schema3.optionalKey(Schema3.String),kind:Schema3.Literals(["container","dataset"]),label:Schema3.String,location:DatasetSourceLocation,selectable:Schema3.Boolean});var Readiness=Schema3.Union([Schema3.Struct({capabilities:DatasetProviderCapabilities,status:Schema3.Literal("ready")}),Schema3.Struct({diagnostics:Schema3.NonEmptyArray(SafeDiagnostic),status:Schema3.Literal("not_ready")})]);var SourcePage=Schema3.Struct({items:Schema3.Array(DatasetSourceItem),nextCursor:Schema3.optionalKey(Schema3.String),truncated:Schema3.Boolean});var DatasetDefinition=Schema3.Struct({fields:Schema3.Array(Schema3.Struct({id:Schema3.String,name:Schema3.String,nullable:Schema3.Boolean,semantic:Schema3.optionalKey(Schema3.String),type:DatasetScalarType})),measures:Schema3.Array(Schema3.Struct({id:Schema3.String,name:Schema3.String,resultType:DatasetScalarType})),relationships:Schema3.Array(Schema3.Struct({cardinality:Schema3.Literals(["one_to_one","one_to_many","many_to_one","many_to_many"]),fromFieldId:Schema3.String,id:Schema3.String,toFieldId:Schema3.String})),version:Schema3.Literal(1)});var DefinitionProposal=Schema3.Struct({compatibility:Compatibility,definition:DatasetDefinition,diagnostics:Schema3.Array(SafeDiagnostic),label:Schema3.String,location:DatasetSourceLocation,observedAt:Schema3.String});var ReadinessInput=ConnectorContext;var ListSourcesInput=ConnectorContext.pipe(Schema3.fieldsAssign({cursor:Schema3.optionalKey(Schema3.String),limit:Schema3.Int.pipe(Schema3.check(Schema3.isGreaterThan(0))),parent:Schema3.optionalKey(DatasetSourceLocation)}));var DiscoverDefinitionInput=ConnectorContext.pipe(Schema3.fieldsAssign({location:DatasetSourceLocation}));var QueryInput=ConnectorContext.pipe(Schema3.fieldsAssign({bounds:Bounds,definition:DatasetDefinition,definitionRevisionId:Schema3.String,location:DatasetSourceLocation,operation:DatasetOperation}));var DatasetHealth=Schema3.Union([Schema3.Struct({status:Schema3.Literal("unknown")}),Schema3.Struct({checkedAt:Schema3.String,status:Schema3.Literal("healthy")}),Schema3.Struct({checkedAt:Schema3.String,diagnostics:Schema3.NonEmptyArray(SafeDiagnostic),status:Schema3.Literals(["degraded","unavailable"])})]);var DatasetProvisionInput=ConnectorContext.pipe(Schema3.fieldsAssign({definition:DatasetDefinition,definitionRevisionId:Schema3.String,templateFqn:Schema3.String}));var DatasetProvisionResult=Schema3.Struct({physicalLocator:Schema3.String});var DatasetIngestResult=Schema3.Struct({byteCount:Schema3.Int.pipe(Schema3.check(Schema3.isGreaterThanOrEqualTo(0))),rowCount:Schema3.Int.pipe(Schema3.check(Schema3.isGreaterThanOrEqualTo(0)))});var DatasetInspectInput=ConnectorContext.pipe(Schema3.fieldsAssign({definitionRevisionId:Schema3.String,location:Schema3.optionalKey(DatasetSourceLocation),physicalLocator:Schema3.optionalKey(Schema3.String)}));var DatasetInspectResult=Schema3.Struct({health:DatasetHealth});var DatasetDeleteInput=ConnectorContext.pipe(Schema3.fieldsAssign({definitionRevisionId:Schema3.String,physicalLocator:Schema3.String}));var DatasetDeleteResult=Schema3.Struct({status:Schema3.Literal("deleted")});var ExternalDatasetBinding=Schema3.Struct({admittedRevisionId:Schema3.String,compatibility:Compatibility,connectionId:Schema3.String,connectorFqn:Schema3.String,createdAt:Schema3.String,datasetId:Schema3.String,health:DatasetHealth,location:DatasetSourceLocation,mode:Schema3.Literal("external"),refresh:Schema3.Union([Schema3.Struct({status:Schema3.Literal("idle")}),Schema3.Struct({operationId:Schema3.String,status:Schema3.Literal("running")}),Schema3.Struct({proposalId:Schema3.String,status:Schema3.Literal("review_required")}),Schema3.Struct({diagnostics:Schema3.NonEmptyArray(SafeDiagnostic),status:Schema3.Literal("failed")})]),updatedAt:Schema3.String});var DatasetRecordPage=Schema3.Struct({byteCount:Schema3.Int.pipe(Schema3.check(Schema3.isGreaterThanOrEqualTo(0))),columns:Schema3.Array(Schema3.Struct({fieldId:Schema3.String,type:DatasetScalarType})),nextCursor:Schema3.optionalKey(Schema3.String),observedAt:Schema3.String,rowCount:Schema3.Int.pipe(Schema3.check(Schema3.isGreaterThanOrEqualTo(0))),rows:Schema3.Array(Schema3.Array(DatasetValue))});var DatasetIngestInput=ConnectorContext.pipe(Schema3.fieldsAssign({definition:DatasetDefinition,definitionRevisionId:Schema3.String,mode:DatasetIngestMode,physicalLocator:Schema3.String,records:DatasetRecordPage}));var DatasetResultPage=Schema3.Union([DatasetRecordPage.pipe(Schema3.fieldsAssign({kind:Schema3.Literal("records")})),Schema3.Struct({byteCount:Schema3.Int.pipe(Schema3.check(Schema3.isGreaterThanOrEqualTo(0))),columns:Schema3.Array(Schema3.Struct({alias:Schema3.String,type:DatasetScalarType})),kind:Schema3.Literal("aggregate"),nextCursor:Schema3.optionalKey(Schema3.String),observedAt:Schema3.String,rowCount:Schema3.Int.pipe(Schema3.check(Schema3.isGreaterThanOrEqualTo(0))),rows:Schema3.Array(Schema3.Array(DatasetValue))}),Schema3.Struct({byteCount:Schema3.Int.pipe(Schema3.check(Schema3.isGreaterThanOrEqualTo(0))),kind:Schema3.Literal("time_series"),nextCursor:Schema3.optionalKey(Schema3.String),observedAt:Schema3.String,pointCount:Schema3.Int.pipe(Schema3.check(Schema3.isGreaterThanOrEqualTo(0))),points:Schema3.Array(Schema3.Struct({time:Schema3.String,value:DatasetValue})),valueType:DatasetScalarType})]);var DatasetProviderError=Schema3.Union([Schema3.Struct({diagnostics:Schema3.Array(SafeDiagnostic),kind:Schema3.Literals(["not_ready","incompatible_source","unsupported_operation","policy_not_pushable","invalid_cursor","timeout","permission_denied","provider_unavailable","provider_rejected","invalid_provider_response"])}),Schema3.Struct({diagnostics:Schema3.Array(SafeDiagnostic),kind:Schema3.Literal("limit_exceeded"),limit:Schema3.Literals(["rows","bytes","timeout"])}),Schema3.Struct({diagnostics:Schema3.Array(SafeDiagnostic),kind:Schema3.Literal("throttled"),retryAfterMs:Schema3.optionalKey(Schema3.Int)})]);export{Bounds,Compatibility,ConnectorContext,DatasetAggregateOperation,DatasetBindingMode,DatasetDefinition,DatasetDeleteInput,DatasetDeleteResult,DatasetFilter,DatasetHealth,DatasetIngestInput,DatasetIngestMode,DatasetIngestResult,DatasetInspectInput,DatasetInspectResult,DatasetOperation,DatasetOrder,DatasetPredicate,DatasetPredicateOperator,DatasetProviderCapabilities,DatasetProviderError,DatasetProvisionInput,DatasetProvisionResult,DatasetQueryIntent,DatasetRecordPage,DatasetResultPage,DatasetScalarType,DatasetSourceItem,DatasetSourceLocation,DatasetTimeBucket,DatasetValue,DefinitionProposal,DiscoverDefinitionInput,ExternalDatasetBinding,ExternalDatasetProvider,ListSourcesInput,ManagedDatasetProvider,QueryInput,Readiness,ReadinessInput,SafeDiagnostic,SourcePage,effectSchema,makeExternalDatasetProviderImplementation,makeManagedDatasetProviderImplementation,withWorkflowDefault};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@collective-intelligence/extensions-sdk-backend",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Framework-neutral executable contracts for Collective Intelligence extension packages.",
|
|
3
|
+
"version": "0.1.31",
|
|
4
|
+
"description": "Framework-neutral executable contracts for Collective Intelligence extension packages, with an Effect adapter at ./effect.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"files": [
|
|
@@ -26,22 +26,22 @@
|
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"build": "bun tools/build.ts",
|
|
29
|
-
"test": "bun test src tools && bun run test:pack",
|
|
29
|
+
"test": "bun --conditions=ci-source test src tools && bun run test:pack",
|
|
30
30
|
"test:pack": "bun run build && bun tools/test-pack.ts",
|
|
31
|
-
"test:unit": "bun test src",
|
|
31
|
+
"test:unit": "bun --conditions=ci-source test src",
|
|
32
32
|
"format": "oxfmt --write .",
|
|
33
33
|
"format:check": "oxfmt --check .",
|
|
34
34
|
"format:check:staged": "oxfmt --check",
|
|
35
35
|
"lint": "node \"../../../.agents/scripts/managed-lint-runner.mjs\" --scope \"packages/public/extensions-sdk-backend\"",
|
|
36
36
|
"lint:staged": "oxlint --no-error-on-unmatched-pattern",
|
|
37
37
|
"prepack": "bun run build",
|
|
38
|
-
"type-check": "bun check"
|
|
38
|
+
"type-check": "bun check && bun check -p tsconfig.type-tests.json"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@collective-intelligence/extensions-sdk": "0.1.
|
|
44
|
+
"@collective-intelligence/extensions-sdk": "0.1.31"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"effect": "^4.1.0"
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"typescript": "7.0.2",
|
|
61
61
|
"ultracite": "7.10.7"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "b46c00d8ce76db49b810e7a3f25933ace4f2252f"
|
|
64
64
|
}
|