@standards/schema 1.0.0-alpha.418 → 1.0.0-alpha.419
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/{all-1pGx58g6.mjs → all-BFZvSwku.mjs} +1 -1
- package/dist/{all-C-tG86Pt.d.mts → all-CcI67hiC.d.mts} +1 -1
- package/dist/{all-DxVkjo74.d.ts → all-cpt9cxka.d.ts} +1 -1
- package/dist/{all-B1SMbpC9.js → all-kYfkyIit.js} +1 -1
- package/dist/api/index.d.mts +793 -46
- package/dist/api/index.d.ts +793 -46
- package/dist/api/index.js +1 -1
- package/dist/api/index.mjs +1 -1
- package/dist/{exceptions-BQiNZXm5.d.mts → exceptions-C3d0YoMy.d.mts} +8 -0
- package/dist/{exceptions-g7YWWqxM.d.ts → exceptions-DzEpWPJ7.d.ts} +8 -0
- package/dist/exceptions.d.mts +1 -1
- package/dist/exceptions.d.ts +1 -1
- package/dist/exceptions.js +1 -1
- package/dist/exceptions.mjs +1 -1
- package/dist/{index-B_nj48YC.d.mts → index-D59FeAd4.d.mts} +358 -71
- package/dist/{index-DsmLdvid.d.ts → index-DhzoMOYA.d.ts} +358 -71
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{primitives-CXio5R1q.mjs → primitives-B-h9MEQ4.mjs} +1 -1
- package/dist/{primitives-B4ZEOP32.js → primitives-CvuPz5hX.js} +1 -1
- package/dist/record-operation-BYjGrZ1R.js +2 -0
- package/dist/record-operation-q6w-3EDJ.mjs +2 -0
- package/dist/{utils-Cb1wqWLJ.d.mts → utils-Bl7NhRVP.d.mts} +1 -1
- package/dist/{utils-zJGDp1O7.d.ts → utils-YUFgn36U.d.ts} +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/validation/all.d.mts +1 -1
- package/dist/validation/all.d.ts +1 -1
- package/dist/validation/all.js +1 -1
- package/dist/validation/all.mjs +1 -1
- package/openapi.json +24996 -0
- package/package.json +4 -2
- package/dist/record-operation-Ce5oJe9K.js +0 -2
- package/dist/record-operation-DszVqr_i.mjs +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import { SchemaError, SchemaErrorCode, ValidationError } from "./exceptions-
|
|
3
|
-
import { TenantId, Uuid } from "./utils-
|
|
4
|
-
import { ActivityContentDefinition, Attribute, AttributeType, BLOCK_PERIODS, BilateralConfig, BlockContext, BlockDefinition, BlockInput, BlockWidth, CheckboxAttribute, CollectionAction, CollectionContentDefinition, CollectionContentSource, ColumnReference, ContentConfiguration, ContentCreateMode, ContentField, ContentFieldGroup, ContentOpenMode, ContentViewContext, ContentViewDefinition, Currency, CurrencyAttribute, CustomContentDefinition, DateAttribute, DatePrecision, DateRangeValue, DocumentAttribute, DocumentLayout, DocumentsContentDefinition, DynamicValue, Eager, EmailsContentDefinition, FilterOperator, FilterRule, FilterState, FilterValue, FormContentDefinition, FormDensity, FormsContentDefinition, FormulaAttribute, FormulaReturnType, GridPosition, GridViolation, HeightMode, ImageShape, InferAttributeValue, InferQualifiedProps, InputShape, LayoutTraits, ListViewTabVisibility, ListableBlockInput, Location, LocationAttribute, LocationGranularity, MeetingsContentDefinition, MultiRelationAttribute, MultiselectAttribute, NumberAttribute, ObjectBuilderLike, ObjectDefinition, ObjectImage, ObjectRecord, ObjectViewContext, ObjectViewDefinition, Option, PageContentDefinition, PageViewDefinition, Phone, PhoneAttribute, PropertyAttribute, PropertySchema, QualifiedDocumentAttributeBuilder, QualifiedDocumentBrand, QueryState, RecordAppearance, RecordListScope, RecordMetadata, RecordQuery, RecordQueryDefinition, RelationAttribute, RelationTarget, RelativeDateValue, ResourceVisibility, RichtextAttribute, RichtextContentDefinition, RollupAttribute, RollupFunction, SelectAttribute, SingleRelationAttribute, SortRule, StatusAttribute, TextAttribute, TimeFormat, Timestamps, UpdateObjectInput, UserAttribute, UserReferenceType, ViewContentDefinition, ViewRead, ViewerAccess, WithCustomAttributes, WithCustomRecordAttributes, WithoutSystemFields } from "./all-
|
|
2
|
+
import { SchemaError, SchemaErrorCode, ValidationError } from "./exceptions-C3d0YoMy.mjs";
|
|
3
|
+
import { TenantId, Uuid } from "./utils-Bl7NhRVP.mjs";
|
|
4
|
+
import { ActivityContentDefinition, Attribute, AttributeType, BLOCK_PERIODS, BilateralConfig, BlockContext, BlockDefinition, BlockInput, BlockWidth, CheckboxAttribute, CollectionAction, CollectionContentDefinition, CollectionContentSource, ColumnReference, ContentConfiguration, ContentCreateMode, ContentField, ContentFieldGroup, ContentOpenMode, ContentViewContext, ContentViewDefinition, Currency, CurrencyAttribute, CustomContentDefinition, DateAttribute, DatePrecision, DateRangeValue, DocumentAttribute, DocumentLayout, DocumentsContentDefinition, DynamicValue, Eager, EmailsContentDefinition, FilterOperator, FilterRule, FilterState, FilterValue, FormContentDefinition, FormDensity, FormsContentDefinition, FormulaAttribute, FormulaReturnType, GridPosition, GridViolation, HeightMode, ImageShape, InferAttributeValue, InferQualifiedProps, InputShape, LayoutTraits, ListViewTabVisibility, ListableBlockInput, Location, LocationAttribute, LocationGranularity, MeetingsContentDefinition, MultiRelationAttribute, MultiselectAttribute, NumberAttribute, ObjectBuilderLike, ObjectDefinition, ObjectImage, ObjectRecord, ObjectViewContext, ObjectViewDefinition, Option, PageContentDefinition, PageViewDefinition, Phone, PhoneAttribute, PropertyAttribute, PropertySchema, QualifiedDocumentAttributeBuilder, QualifiedDocumentBrand, QueryState, RecordAppearance, RecordListScope, RecordMetadata, RecordQuery, RecordQueryDefinition, RelationAttribute, RelationTarget, RelativeDateValue, ResourceVisibility, RichtextAttribute, RichtextContentDefinition, RollupAttribute, RollupFunction, SelectAttribute, SingleRelationAttribute, SortRule, StatusAttribute, TextAttribute, TimeFormat, Timestamps, UpdateObjectInput, UserAttribute, UserReferenceType, ViewContentDefinition, ViewRead, ViewerAccess, WithCustomAttributes, WithCustomRecordAttributes, WithoutSystemFields } from "./all-CcI67hiC.mjs";
|
|
5
5
|
import * as z$2 from "zod";
|
|
6
6
|
import z, { z as z$1 } from "zod";
|
|
7
7
|
import { ColorId, CountryIso3, CurrencyCode, IconName } from "@standards/constants";
|
|
@@ -562,7 +562,13 @@ export interface OperationDefinition {
|
|
|
562
562
|
method: HttpMethod;
|
|
563
563
|
path: `/${string}`;
|
|
564
564
|
input: z$1.ZodType;
|
|
565
|
-
|
|
565
|
+
/**
|
|
566
|
+
* The answer: a zod schema (preferred) validated by the server and decoded
|
|
567
|
+
* by the client, or a type-only `type<T>()` nothing checks. A schema's
|
|
568
|
+
* input side is the JSON on the wire, its output side the value both the
|
|
569
|
+
* handler and the client hold (`isoDateTime`: an ISO string, a `Date`).
|
|
570
|
+
*/
|
|
571
|
+
output: z$1.ZodType | OutputType<unknown>;
|
|
566
572
|
permission?: OperationPermission;
|
|
567
573
|
status?: OperationStatus;
|
|
568
574
|
throttle?: OperationThrottle;
|
|
@@ -643,16 +649,22 @@ export type OperationInput<O extends {
|
|
|
643
649
|
export type OperationParsedInput<O extends {
|
|
644
650
|
input: z$1.ZodType;
|
|
645
651
|
}> = WithUpload<O, z$1.output<O["input"]>, UploadedPart, UploadedPart>;
|
|
646
|
-
/** What a handler answers. */
|
|
652
|
+
/** What a handler answers, and what a client holds once the body is decoded. */
|
|
647
653
|
export type OperationOutput<O extends {
|
|
648
|
-
output: OutputType<unknown>;
|
|
649
|
-
}> = O["output"]
|
|
654
|
+
output: z$1.ZodType | OutputType<unknown>;
|
|
655
|
+
}> = OutputOf<O["output"]>;
|
|
656
|
+
/** The JSON on the wire: an output schema's input side; a type-only output's own type. */
|
|
657
|
+
export type OperationWireOutput<O extends {
|
|
658
|
+
output: z$1.ZodType | OutputType<unknown>;
|
|
659
|
+
}> = WireOf<O["output"]>;
|
|
660
|
+
type OutputOf<X> = X extends z$1.ZodType ? z$1.output<X> : X extends OutputType<infer T> ? T : never;
|
|
661
|
+
type WireOf<X> = X extends z$1.ZodType ? z$1.input<X> : OutputOf<X>;
|
|
650
662
|
/**
|
|
651
663
|
* What a client receives: the handler's output, a `DownloadedFile` for bytes,
|
|
652
664
|
* the open `Response` for events.
|
|
653
665
|
*/
|
|
654
666
|
export type OperationResult<O extends {
|
|
655
|
-
output: OutputType<unknown>;
|
|
667
|
+
output: z$1.ZodType | OutputType<unknown>;
|
|
656
668
|
}> = O extends {
|
|
657
669
|
readonly response: "bytes";
|
|
658
670
|
} ? DownloadedFile : O extends {
|
|
@@ -679,34 +691,160 @@ export declare function operation<const D extends OperationDefinition>(def: D &
|
|
|
679
691
|
}): Operation<D>;
|
|
680
692
|
export type ActorType = "user" | "agent" | "api_key" | "system";
|
|
681
693
|
export type ActorStatus = "active" | "suspended" | "deleted";
|
|
682
|
-
interface ActorBase {
|
|
683
|
-
id: Uuid;
|
|
684
|
-
tenantId: TenantId;
|
|
685
|
-
displayName: string;
|
|
686
|
-
avatarUrl?: string | null;
|
|
687
|
-
metadata: Record<string, unknown>;
|
|
688
|
-
deletedAt?: Date | null;
|
|
689
|
-
anonymizedAt?: Date | null;
|
|
690
|
-
createdAt: Date;
|
|
691
|
-
updatedAt: Date;
|
|
692
|
-
}
|
|
693
694
|
type SubjectActorType = Exclude<ActorType, "system">;
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
695
|
+
/**
|
|
696
|
+
* An actor as every answer carries it, one branch per type and status so the
|
|
697
|
+
* type narrows on both (a discriminated union on `type`, then on `status`, so
|
|
698
|
+
* a check reads two keys rather than trying every branch): a subject actor
|
|
699
|
+
* names its subject until it is deleted (then the subject may be gone); the
|
|
700
|
+
* system actor has none. Timestamps travel as ISO strings and read as `Date`
|
|
701
|
+
* (`isoDateTime`).
|
|
702
|
+
*/
|
|
703
|
+
export declare const actorSchema: z$2.ZodDiscriminatedUnion<[z$2.ZodDiscriminatedUnion<[z$2.ZodObject<{
|
|
704
|
+
id: z$2.ZodString;
|
|
705
|
+
tenantId: z$2.ZodType<TenantId, string, z$2.core.$ZodTypeInternals<TenantId, string>>;
|
|
706
|
+
displayName: z$2.ZodString;
|
|
707
|
+
avatarUrl: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodString>>;
|
|
708
|
+
metadata: z$2.ZodRecord<z$2.ZodString, z$2.ZodUnknown>;
|
|
709
|
+
deletedAt: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>>>;
|
|
710
|
+
anonymizedAt: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>>>;
|
|
711
|
+
createdAt: z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>;
|
|
712
|
+
updatedAt: z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>;
|
|
713
|
+
} & {
|
|
714
|
+
type: z$2.ZodLiteral<"user">;
|
|
715
|
+
status: z$2.ZodLiteral<"active">;
|
|
716
|
+
subjectId: z$2.ZodString;
|
|
717
|
+
}, z$2.core.$strip>, z$2.ZodObject<{
|
|
718
|
+
id: z$2.ZodString;
|
|
719
|
+
tenantId: z$2.ZodType<TenantId, string, z$2.core.$ZodTypeInternals<TenantId, string>>;
|
|
720
|
+
displayName: z$2.ZodString;
|
|
721
|
+
avatarUrl: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodString>>;
|
|
722
|
+
metadata: z$2.ZodRecord<z$2.ZodString, z$2.ZodUnknown>;
|
|
723
|
+
deletedAt: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>>>;
|
|
724
|
+
anonymizedAt: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>>>;
|
|
725
|
+
createdAt: z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>;
|
|
726
|
+
updatedAt: z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>;
|
|
727
|
+
} & {
|
|
728
|
+
type: z$2.ZodLiteral<"user">;
|
|
729
|
+
status: z$2.ZodLiteral<"suspended">;
|
|
730
|
+
subjectId: z$2.ZodString;
|
|
731
|
+
}, z$2.core.$strip>, z$2.ZodObject<{
|
|
732
|
+
id: z$2.ZodString;
|
|
733
|
+
tenantId: z$2.ZodType<TenantId, string, z$2.core.$ZodTypeInternals<TenantId, string>>;
|
|
734
|
+
displayName: z$2.ZodString;
|
|
735
|
+
avatarUrl: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodString>>;
|
|
736
|
+
metadata: z$2.ZodRecord<z$2.ZodString, z$2.ZodUnknown>;
|
|
737
|
+
deletedAt: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>>>;
|
|
738
|
+
anonymizedAt: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>>>;
|
|
739
|
+
createdAt: z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>;
|
|
740
|
+
updatedAt: z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>;
|
|
741
|
+
} & {
|
|
742
|
+
type: z$2.ZodLiteral<"user">;
|
|
743
|
+
status: z$2.ZodLiteral<"deleted">;
|
|
744
|
+
subjectId: z$2.ZodNullable<z$2.ZodString>;
|
|
745
|
+
}, z$2.core.$strip>], "status">, z$2.ZodDiscriminatedUnion<[z$2.ZodObject<{
|
|
746
|
+
id: z$2.ZodString;
|
|
747
|
+
tenantId: z$2.ZodType<TenantId, string, z$2.core.$ZodTypeInternals<TenantId, string>>;
|
|
748
|
+
displayName: z$2.ZodString;
|
|
749
|
+
avatarUrl: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodString>>;
|
|
750
|
+
metadata: z$2.ZodRecord<z$2.ZodString, z$2.ZodUnknown>;
|
|
751
|
+
deletedAt: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>>>;
|
|
752
|
+
anonymizedAt: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>>>;
|
|
753
|
+
createdAt: z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>;
|
|
754
|
+
updatedAt: z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>;
|
|
755
|
+
} & {
|
|
756
|
+
type: z$2.ZodLiteral<"agent">;
|
|
757
|
+
status: z$2.ZodLiteral<"active">;
|
|
758
|
+
subjectId: z$2.ZodString;
|
|
759
|
+
}, z$2.core.$strip>, z$2.ZodObject<{
|
|
760
|
+
id: z$2.ZodString;
|
|
761
|
+
tenantId: z$2.ZodType<TenantId, string, z$2.core.$ZodTypeInternals<TenantId, string>>;
|
|
762
|
+
displayName: z$2.ZodString;
|
|
763
|
+
avatarUrl: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodString>>;
|
|
764
|
+
metadata: z$2.ZodRecord<z$2.ZodString, z$2.ZodUnknown>;
|
|
765
|
+
deletedAt: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>>>;
|
|
766
|
+
anonymizedAt: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>>>;
|
|
767
|
+
createdAt: z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>;
|
|
768
|
+
updatedAt: z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>;
|
|
769
|
+
} & {
|
|
770
|
+
type: z$2.ZodLiteral<"agent">;
|
|
771
|
+
status: z$2.ZodLiteral<"suspended">;
|
|
772
|
+
subjectId: z$2.ZodString;
|
|
773
|
+
}, z$2.core.$strip>, z$2.ZodObject<{
|
|
774
|
+
id: z$2.ZodString;
|
|
775
|
+
tenantId: z$2.ZodType<TenantId, string, z$2.core.$ZodTypeInternals<TenantId, string>>;
|
|
776
|
+
displayName: z$2.ZodString;
|
|
777
|
+
avatarUrl: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodString>>;
|
|
778
|
+
metadata: z$2.ZodRecord<z$2.ZodString, z$2.ZodUnknown>;
|
|
779
|
+
deletedAt: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>>>;
|
|
780
|
+
anonymizedAt: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>>>;
|
|
781
|
+
createdAt: z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>;
|
|
782
|
+
updatedAt: z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>;
|
|
783
|
+
} & {
|
|
784
|
+
type: z$2.ZodLiteral<"agent">;
|
|
785
|
+
status: z$2.ZodLiteral<"deleted">;
|
|
786
|
+
subjectId: z$2.ZodNullable<z$2.ZodString>;
|
|
787
|
+
}, z$2.core.$strip>], "status">, z$2.ZodDiscriminatedUnion<[z$2.ZodObject<{
|
|
788
|
+
id: z$2.ZodString;
|
|
789
|
+
tenantId: z$2.ZodType<TenantId, string, z$2.core.$ZodTypeInternals<TenantId, string>>;
|
|
790
|
+
displayName: z$2.ZodString;
|
|
791
|
+
avatarUrl: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodString>>;
|
|
792
|
+
metadata: z$2.ZodRecord<z$2.ZodString, z$2.ZodUnknown>;
|
|
793
|
+
deletedAt: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>>>;
|
|
794
|
+
anonymizedAt: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>>>;
|
|
795
|
+
createdAt: z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>;
|
|
796
|
+
updatedAt: z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>;
|
|
797
|
+
} & {
|
|
798
|
+
type: z$2.ZodLiteral<"api_key">;
|
|
799
|
+
status: z$2.ZodLiteral<"active">;
|
|
800
|
+
subjectId: z$2.ZodString;
|
|
801
|
+
}, z$2.core.$strip>, z$2.ZodObject<{
|
|
802
|
+
id: z$2.ZodString;
|
|
803
|
+
tenantId: z$2.ZodType<TenantId, string, z$2.core.$ZodTypeInternals<TenantId, string>>;
|
|
804
|
+
displayName: z$2.ZodString;
|
|
805
|
+
avatarUrl: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodString>>;
|
|
806
|
+
metadata: z$2.ZodRecord<z$2.ZodString, z$2.ZodUnknown>;
|
|
807
|
+
deletedAt: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>>>;
|
|
808
|
+
anonymizedAt: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>>>;
|
|
809
|
+
createdAt: z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>;
|
|
810
|
+
updatedAt: z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>;
|
|
811
|
+
} & {
|
|
812
|
+
type: z$2.ZodLiteral<"api_key">;
|
|
813
|
+
status: z$2.ZodLiteral<"suspended">;
|
|
814
|
+
subjectId: z$2.ZodString;
|
|
815
|
+
}, z$2.core.$strip>, z$2.ZodObject<{
|
|
816
|
+
id: z$2.ZodString;
|
|
817
|
+
tenantId: z$2.ZodType<TenantId, string, z$2.core.$ZodTypeInternals<TenantId, string>>;
|
|
818
|
+
displayName: z$2.ZodString;
|
|
819
|
+
avatarUrl: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodString>>;
|
|
820
|
+
metadata: z$2.ZodRecord<z$2.ZodString, z$2.ZodUnknown>;
|
|
821
|
+
deletedAt: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>>>;
|
|
822
|
+
anonymizedAt: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>>>;
|
|
823
|
+
createdAt: z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>;
|
|
824
|
+
updatedAt: z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>;
|
|
825
|
+
} & {
|
|
826
|
+
type: z$2.ZodLiteral<"api_key">;
|
|
827
|
+
status: z$2.ZodLiteral<"deleted">;
|
|
828
|
+
subjectId: z$2.ZodNullable<z$2.ZodString>;
|
|
829
|
+
}, z$2.core.$strip>], "status">, z$2.ZodObject<{
|
|
830
|
+
id: z$2.ZodString;
|
|
831
|
+
tenantId: z$2.ZodType<TenantId, string, z$2.core.$ZodTypeInternals<TenantId, string>>;
|
|
832
|
+
displayName: z$2.ZodString;
|
|
833
|
+
avatarUrl: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodString>>;
|
|
834
|
+
metadata: z$2.ZodRecord<z$2.ZodString, z$2.ZodUnknown>;
|
|
835
|
+
deletedAt: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>>>;
|
|
836
|
+
anonymizedAt: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>>>;
|
|
837
|
+
createdAt: z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>;
|
|
838
|
+
updatedAt: z$2.ZodCodec<z$2.ZodISODateTime, z$2.ZodDate>;
|
|
839
|
+
type: z$2.ZodLiteral<"system">;
|
|
840
|
+
status: z$2.ZodEnum<{
|
|
841
|
+
active: "active";
|
|
842
|
+
deleted: "deleted";
|
|
843
|
+
suspended: "suspended";
|
|
844
|
+
}>;
|
|
845
|
+
subjectId: z$2.ZodOptional<z$2.ZodNull>;
|
|
846
|
+
}, z$2.core.$strip>], "type">;
|
|
847
|
+
export type Actor = z$2.output<typeof actorSchema>;
|
|
710
848
|
interface CreateActorInputBase {
|
|
711
849
|
displayName: string;
|
|
712
850
|
avatarUrl?: string | null;
|
|
@@ -2096,15 +2234,32 @@ export interface InstalledBundleSummary {
|
|
|
2096
2234
|
mode: BundleMode;
|
|
2097
2235
|
/** `null` for an added bundle. */
|
|
2098
2236
|
origin: BundleOrigin | null;
|
|
2099
|
-
/**
|
|
2237
|
+
/**
|
|
2238
|
+
* The version the workspace holds: the applied one for a synced bundle, the
|
|
2239
|
+
* offered one it was added or last updated from for an added bundle; `null`
|
|
2240
|
+
* for an added bundle recorded before its baseline.
|
|
2241
|
+
*/
|
|
2100
2242
|
hash: string | null;
|
|
2101
|
-
/** Names of the bundles
|
|
2243
|
+
/** Names of the bundles it uses, as recorded when it was synced, added or updated. */
|
|
2102
2244
|
uses: string[];
|
|
2103
2245
|
installedAt: string;
|
|
2104
2246
|
updatedAt: string;
|
|
2105
2247
|
/** The actor who installed it; `null` when the system did. */
|
|
2106
2248
|
installedBy: string | null;
|
|
2107
2249
|
}
|
|
2250
|
+
/**
|
|
2251
|
+
* Where an installed bundle stands: `repair` while a piece it installed no
|
|
2252
|
+
* longer exists, `update` when the host offers another version than the one
|
|
2253
|
+
* it holds, `current` otherwise (and always for a synced bundle or one the
|
|
2254
|
+
* host no longer offers).
|
|
2255
|
+
*/
|
|
2256
|
+
export type BundleStatus = "current" | "update" | "repair";
|
|
2257
|
+
/** One installed bundle as `bundles.status` answers it: its status and the bundles that depend on it. */
|
|
2258
|
+
export interface BundleStatusEntry {
|
|
2259
|
+
name: string;
|
|
2260
|
+
status: BundleStatus;
|
|
2261
|
+
usedBy: string[];
|
|
2262
|
+
}
|
|
2108
2263
|
/** What a bundle card shows of its pieces, projected from the bundle and the closure it uses. */
|
|
2109
2264
|
export interface BundleContents {
|
|
2110
2265
|
/** The objects the bundle declares; `inWorkspace` when the caller already sees one by that name. */
|
|
@@ -2224,6 +2379,105 @@ export interface BundleAddPlan {
|
|
|
2224
2379
|
/** Ties `bundles.add` to the workspace this preview saw. */
|
|
2225
2380
|
fingerprint: string;
|
|
2226
2381
|
}
|
|
2382
|
+
/** What an update piece names: a piece, or one part of an installed object (an attribute, an option). */
|
|
2383
|
+
export type BundleUpdatePieceKind = "object" | "view" | "page" | "tab" | "agent" | "attribute" | "option";
|
|
2384
|
+
/**
|
|
2385
|
+
* How an update treats a piece: `added` (new), `updated` (untouched since the
|
|
2386
|
+
* bundle wrote it), `conflict` (the admin changed it, the bundle too: kept
|
|
2387
|
+
* unless taken), `missing` (gone: reinstalled unless skipped), `notApplied`
|
|
2388
|
+
* (it would lose stored values, or its name is taken).
|
|
2389
|
+
*/
|
|
2390
|
+
export type BundleUpdateGroup = "added" | "updated" | "conflict" | "missing" | "notApplied";
|
|
2391
|
+
/**
|
|
2392
|
+
* Why a piece is `notApplied`, as a code the screen words: `lossy` (the new
|
|
2393
|
+
* type would lose stored values), `required` (it would become required while
|
|
2394
|
+
* records may be empty), `retype` (no update changes a type), `move` (no
|
|
2395
|
+
* update moves a content between placements), `nameTaken` (its name is held,
|
|
2396
|
+
* `reasonName`), `refused` (adding it is refused here).
|
|
2397
|
+
*/
|
|
2398
|
+
export type BundleUpdateReasonCode = "lossy" | "required" | "retype" | "move" | "nameTaken" | "refused";
|
|
2399
|
+
export interface BundleUpdatePiece {
|
|
2400
|
+
pieceId: string;
|
|
2401
|
+
kind: BundleUpdatePieceKind;
|
|
2402
|
+
group: BundleUpdateGroup;
|
|
2403
|
+
label: string;
|
|
2404
|
+
/** Set on a `notApplied` piece. */
|
|
2405
|
+
reasonCode?: BundleUpdateReasonCode;
|
|
2406
|
+
/** The name that is taken, with `reasonCode: "nameTaken"`. */
|
|
2407
|
+
reasonName?: string;
|
|
2408
|
+
}
|
|
2409
|
+
/** What updating an added bundle would do, and the fingerprint `bundles.update` must carry. */
|
|
2410
|
+
export interface BundleUpdatePlan {
|
|
2411
|
+
pieces: BundleUpdatePiece[];
|
|
2412
|
+
/** Ties `bundles.update` to the workspace this preview saw. */
|
|
2413
|
+
fingerprint: string;
|
|
2414
|
+
}
|
|
2415
|
+
/**
|
|
2416
|
+
* What uninstalling an added bundle would delete, counted as the system (a
|
|
2417
|
+
* piece another member made private shows in the totals, never by name), and
|
|
2418
|
+
* the fingerprint `bundles.remove` must carry. `blockedBy` names the bundles
|
|
2419
|
+
* that use it: while one does, the uninstall is refused.
|
|
2420
|
+
*/
|
|
2421
|
+
export interface BundleRemovalPreview {
|
|
2422
|
+
blockedBy: string[];
|
|
2423
|
+
/** Each object that goes, with every one of its records: private and trashed ones included. */
|
|
2424
|
+
objects: {
|
|
2425
|
+
name: string;
|
|
2426
|
+
label: string;
|
|
2427
|
+
records: number;
|
|
2428
|
+
}[];
|
|
2429
|
+
/** The views on those objects the bundle did not write, any owner's, which go with them. */
|
|
2430
|
+
views: number;
|
|
2431
|
+
/**
|
|
2432
|
+
* The contents on views that stay that go too, on views the caller sees: a
|
|
2433
|
+
* tab opening one of its pages, or one reading what goes, the admin's own
|
|
2434
|
+
* included. The view stays, unless it is in `emptiedViews`.
|
|
2435
|
+
*/
|
|
2436
|
+
viewContents: {
|
|
2437
|
+
viewLabel: string;
|
|
2438
|
+
contentLabel: string;
|
|
2439
|
+
}[];
|
|
2440
|
+
/** The same contents on views the caller cannot see: counted, never named. */
|
|
2441
|
+
hiddenViewContents: number;
|
|
2442
|
+
pages: number;
|
|
2443
|
+
routines: number;
|
|
2444
|
+
agents: number;
|
|
2445
|
+
/** The skills that will be purged: never one the workspace held before, nor one another bundle installed. */
|
|
2446
|
+
skills: number;
|
|
2447
|
+
/** The relations of objects outside the bundle that point at its objects: removed, their records kept. */
|
|
2448
|
+
inboundRelations: {
|
|
2449
|
+
objectLabel: string;
|
|
2450
|
+
attributeLabel: string;
|
|
2451
|
+
}[];
|
|
2452
|
+
/** The computed fields of objects outside the bundle that read what goes: removed, their records kept. */
|
|
2453
|
+
computedAttributes: {
|
|
2454
|
+
objectLabel: string;
|
|
2455
|
+
attributeLabel: string;
|
|
2456
|
+
}[];
|
|
2457
|
+
/** The relations outside the bundle that also target another object: they keep it and lose its objects. */
|
|
2458
|
+
prunedRelations: {
|
|
2459
|
+
objectLabel: string;
|
|
2460
|
+
attributeLabel: string;
|
|
2461
|
+
}[];
|
|
2462
|
+
/** The views that stay no longer: every main content they held goes, the rest with them. */
|
|
2463
|
+
emptiedViews: {
|
|
2464
|
+
viewLabel: string;
|
|
2465
|
+
}[];
|
|
2466
|
+
/**
|
|
2467
|
+
* What an uninstall does not rewrite and would leave broken: an object's
|
|
2468
|
+
* label or embedding naming a field that goes (`objectLabel` alone), a kept
|
|
2469
|
+
* relation's display or filter naming one (`attributeLabel`),
|
|
2470
|
+
* or a default view left with no main content (`viewLabel`). While one
|
|
2471
|
+
* stands, the uninstall is refused, as under `blockedBy`.
|
|
2472
|
+
*/
|
|
2473
|
+
citedBy: {
|
|
2474
|
+
objectLabel: string;
|
|
2475
|
+
attributeLabel?: string;
|
|
2476
|
+
viewLabel?: string;
|
|
2477
|
+
}[];
|
|
2478
|
+
/** Ties `bundles.remove` to the pieces, relations and views this preview saw (not the record counts). */
|
|
2479
|
+
fingerprint: string;
|
|
2480
|
+
}
|
|
2227
2481
|
/** What adding wrote: one entry per object, view or agent created, under the bundle that declares it. */
|
|
2228
2482
|
export interface BundleAddResult {
|
|
2229
2483
|
added: {
|
|
@@ -4258,6 +4512,11 @@ export interface EnvironmentHarness {
|
|
|
4258
4512
|
readonly provider: ProviderName;
|
|
4259
4513
|
/** The variable that carries the harness's API key (read from the Variables, spec §3.2). */
|
|
4260
4514
|
readonly apiKeyEnv: string;
|
|
4515
|
+
/**
|
|
4516
|
+
* The variable that carries a subscription sign-in token, when the harness
|
|
4517
|
+
* accepts one (Claude Code `claude setup-token`). The API key wins when both are set.
|
|
4518
|
+
*/
|
|
4519
|
+
readonly oauthTokenEnv?: string;
|
|
4261
4520
|
readonly models: readonly EnvironmentHarnessModel[];
|
|
4262
4521
|
readonly defaultModel: string;
|
|
4263
4522
|
}
|
|
@@ -4266,6 +4525,7 @@ export declare const ENVIRONMENT_HARNESSES: readonly [{
|
|
|
4266
4525
|
readonly label: "Claude Code";
|
|
4267
4526
|
readonly provider: "anthropic";
|
|
4268
4527
|
readonly apiKeyEnv: "ANTHROPIC_API_KEY";
|
|
4528
|
+
readonly oauthTokenEnv: "CLAUDE_CODE_OAUTH_TOKEN";
|
|
4269
4529
|
readonly models: readonly [{
|
|
4270
4530
|
readonly id: "sonnet";
|
|
4271
4531
|
readonly label: "Claude Sonnet";
|
|
@@ -4496,8 +4756,9 @@ export type ConnectorScope = "actor" | "tenant";
|
|
|
4496
4756
|
export interface StartConnectorAuthInput {
|
|
4497
4757
|
provider: ConnectorProviderId;
|
|
4498
4758
|
scope: ConnectorScope;
|
|
4499
|
-
/** Page the callback 302s back to
|
|
4759
|
+
/** Page the callback 302s back to, on a configured allowed origin. Exactly one of this or `mode`. */
|
|
4500
4760
|
returnUrl?: string;
|
|
4761
|
+
mode?: "desktop";
|
|
4501
4762
|
/** Beyond `read`, which is always requested. */
|
|
4502
4763
|
capabilities?: Exclude<ConnectorCapability, "read">[];
|
|
4503
4764
|
/**
|
|
@@ -4506,10 +4767,6 @@ export interface StartConnectorAuthInput {
|
|
|
4506
4767
|
*/
|
|
4507
4768
|
loginHint?: string;
|
|
4508
4769
|
}
|
|
4509
|
-
/** Result of starting an OAuth flow — the URL the browser must visit. */
|
|
4510
|
-
export interface StartConnectorAuthResult {
|
|
4511
|
-
authorizeUrl: string;
|
|
4512
|
-
}
|
|
4513
4770
|
/**
|
|
4514
4771
|
* Providers this deployment holds OAuth credentials for. A provider absent from
|
|
4515
4772
|
* the list cannot start an authorization flow, so its card is not offered.
|
|
@@ -4530,15 +4787,7 @@ export interface AddSharedMailboxInput {
|
|
|
4530
4787
|
/** Visibility of the synced emails: tenant (default UX) or only the adding actor. */
|
|
4531
4788
|
scope: ConnectorScope;
|
|
4532
4789
|
}
|
|
4533
|
-
/**
|
|
4534
|
-
export declare const CONNECTOR_CALLBACK_PARAM: {
|
|
4535
|
-
readonly status: "connector_status";
|
|
4536
|
-
readonly error: "connector_error";
|
|
4537
|
-
readonly provider: "connector_provider";
|
|
4538
|
-
/** The `QuotaKey` that refused the connection, with `error` at `QUOTA_EXCEEDED`. */
|
|
4539
|
-
readonly quota: "connector_quota";
|
|
4540
|
-
};
|
|
4541
|
-
/** Values `CONNECTOR_CALLBACK_PARAM.status` can take on the redirect. */
|
|
4790
|
+
/** How a connector's consent ended, as the app's surfaces read it. */
|
|
4542
4791
|
export type ConnectorCallbackStatusValue = "connected" | "error";
|
|
4543
4792
|
/** The unified verbs an agent calls on typed references. */
|
|
4544
4793
|
export declare const VERB_NAMES: readonly ["search", "query", "read", "write", "delete", "organize", "copy", "send"];
|
|
@@ -8591,7 +8840,7 @@ export type AuditResourceType = (typeof AUDIT_RESOURCE_TYPES)[number];
|
|
|
8591
8840
|
/**
|
|
8592
8841
|
* Actions that can be audited
|
|
8593
8842
|
*/
|
|
8594
|
-
export declare const AUDIT_ACTIONS: readonly ["record.created", "record.updated", "record.deleted", "record.restored", "record.purged", "record.access_changed", "agent.access_changed", "agent_session.supervised_read", "object.created", "object.updated", "object.deleted", "attribute.created", "attribute.updated", "attribute.deleted", "view.created", "view.updated", "view.deleted", "bundle.synced", "bundle.removed", "bundle.added", "user.created", "user.invited", "user.updated", "user.deleted", "user.login", "user.logout", "tenant_invitation.created", "tenant_invitation.delivery_failed", "tenant_invitation.resent", "tenant_invitation.revoked", "tenant_invitation.accepted", "role.created", "role.updated", "role.deleted", "role.assigned", "role.revoked", "api_key.detached", "settings.updated", "file.uploaded", "file.updated", "file.deleted"];
|
|
8843
|
+
export declare const AUDIT_ACTIONS: readonly ["record.created", "record.updated", "record.deleted", "record.restored", "record.purged", "record.access_changed", "agent.access_changed", "agent_session.supervised_read", "object.created", "object.updated", "object.deleted", "attribute.created", "attribute.updated", "attribute.deleted", "view.created", "view.updated", "view.deleted", "bundle.synced", "bundle.removed", "bundle.added", "bundle.updated", "user.created", "user.invited", "user.updated", "user.deleted", "user.login", "user.logout", "tenant_invitation.created", "tenant_invitation.delivery_failed", "tenant_invitation.resent", "tenant_invitation.revoked", "tenant_invitation.accepted", "role.created", "role.updated", "role.deleted", "role.assigned", "role.revoked", "api_key.detached", "settings.updated", "file.uploaded", "file.updated", "file.deleted"];
|
|
8595
8844
|
export type AuditAction = (typeof AUDIT_ACTIONS)[number];
|
|
8596
8845
|
/**
|
|
8597
8846
|
* Actor type - who performed the action
|
|
@@ -13740,6 +13989,61 @@ export declare function normalizePhoneNumber(phoneNumber: string, countryIso3: C
|
|
|
13740
13989
|
* // → "+1 555 123 4567"
|
|
13741
13990
|
*/
|
|
13742
13991
|
export declare function formatPhoneForDisplay(phone: Phone): string;
|
|
13992
|
+
/** How long a ticket can be redeemed. The app counts from receiving it, which errs short by a redirect. */
|
|
13993
|
+
export declare const OAUTH_TICKET_TTL_MS = 300000;
|
|
13994
|
+
/** Which flow an outbound OAuth attempt serves. */
|
|
13995
|
+
export type OAuthKind = "connector" | "mcp";
|
|
13996
|
+
export type OAuthAttemptStatus = "preparing" | "pending" | "returned" | "exchanging" | "choosing" | "completed" | "failed" | "expired";
|
|
13997
|
+
/** Where the browser lands after consent: a web return URL, or the desktop shell. */
|
|
13998
|
+
export interface OAuthCompletionInput {
|
|
13999
|
+
returnUrl?: string;
|
|
14000
|
+
mode?: "desktop";
|
|
14001
|
+
}
|
|
14002
|
+
/** Answer of every start operation: the page to open and when the attempt lapses. */
|
|
14003
|
+
export interface OAuthAttemptStarted {
|
|
14004
|
+
attemptId: string;
|
|
14005
|
+
authorizeUrl: string;
|
|
14006
|
+
expiresAt: string;
|
|
14007
|
+
}
|
|
14008
|
+
/** The GitHub App installations the person can bind, and where to install another. */
|
|
14009
|
+
export interface GitHubInstallationChoice {
|
|
14010
|
+
installations: {
|
|
14011
|
+
id: string;
|
|
14012
|
+
login?: string;
|
|
14013
|
+
}[];
|
|
14014
|
+
installUrl: string;
|
|
14015
|
+
}
|
|
14016
|
+
/** Authenticated projection of an attempt; `errorCode` is a stable reason, never provider text. */
|
|
14017
|
+
export interface OAuthAttemptView {
|
|
14018
|
+
attemptId: string;
|
|
14019
|
+
status: OAuthAttemptStatus;
|
|
14020
|
+
kind: OAuthKind;
|
|
14021
|
+
expiresAt: string;
|
|
14022
|
+
result?: Record<string, unknown>;
|
|
14023
|
+
choice?: GitHubInstallationChoice;
|
|
14024
|
+
errorCode?: string;
|
|
14025
|
+
}
|
|
14026
|
+
/** What completing a ticket or reading an attempt settles on. */
|
|
14027
|
+
export type OAuthCompleteOutcome = {
|
|
14028
|
+
status: "completed";
|
|
14029
|
+
attemptId: string;
|
|
14030
|
+
kind: OAuthKind;
|
|
14031
|
+
result: Record<string, unknown>;
|
|
14032
|
+
} | {
|
|
14033
|
+
status: "failed";
|
|
14034
|
+
attemptId: string;
|
|
14035
|
+
kind: OAuthKind;
|
|
14036
|
+
errorCode: string;
|
|
14037
|
+
result?: Record<string, unknown>;
|
|
14038
|
+
} | ({
|
|
14039
|
+
status: "choose";
|
|
14040
|
+
attemptId: string;
|
|
14041
|
+
kind: "connector";
|
|
14042
|
+
} & GitHubInstallationChoice) | {
|
|
14043
|
+
status: "pending";
|
|
14044
|
+
attemptId: string;
|
|
14045
|
+
kind: OAuthKind;
|
|
14046
|
+
};
|
|
13743
14047
|
/** How an MCP server authenticates outbound calls. `oauth` carries no secret
|
|
13744
14048
|
* on the wire — the tokens stay server-side. */
|
|
13745
14049
|
export type McpServerAuthType = "none" | "header" | "oauth";
|
|
@@ -13811,32 +14115,15 @@ export interface ConnectMcpServerInput {
|
|
|
13811
14115
|
auth: McpServerAuthInput;
|
|
13812
14116
|
}
|
|
13813
14117
|
/** Starts consent without exposing provider credentials to the browser. */
|
|
13814
|
-
export
|
|
13815
|
-
|
|
13816
|
-
}
|
|
13817
|
-
export type StartMcpOAuthAttemptInput = Omit<ConnectMcpServerInput, "auth"> & {
|
|
13818
|
-
completionMode?: McpOAuthCompletionMode;
|
|
13819
|
-
returnUrl?: string;
|
|
13820
|
-
};
|
|
13821
|
-
export interface ReconnectMcpOAuthAttemptInput {
|
|
14118
|
+
export type StartMcpOAuthAttemptInput = Omit<ConnectMcpServerInput, "auth"> & OAuthCompletionInput;
|
|
14119
|
+
export interface ReconnectMcpOAuthAttemptInput extends OAuthCompletionInput {
|
|
13822
14120
|
scope?: string;
|
|
13823
|
-
completionMode?: McpOAuthCompletionMode;
|
|
13824
|
-
returnUrl?: string;
|
|
13825
14121
|
}
|
|
13826
|
-
export type McpOAuthAttemptStatus = "preparing" | "pending" | "exchanging" | "completed" | "failed" | "expired";
|
|
13827
14122
|
export interface McpOAuthAttemptStarted {
|
|
13828
14123
|
attemptId: string;
|
|
13829
14124
|
authorizeUrl: string;
|
|
13830
14125
|
expiresAt: string;
|
|
13831
14126
|
}
|
|
13832
|
-
/** Authenticated projection; errorCode is a stable reason, never provider text. */
|
|
13833
|
-
export interface McpOAuthAttemptView {
|
|
13834
|
-
attemptId: string;
|
|
13835
|
-
status: McpOAuthAttemptStatus;
|
|
13836
|
-
serverId?: string;
|
|
13837
|
-
errorCode?: string;
|
|
13838
|
-
expiresAt: string;
|
|
13839
|
-
}
|
|
13840
14127
|
export type EmailCategoryScope = "personal" | "workspace";
|
|
13841
14128
|
export type EmailClassifiedBy = "model" | "rule" | "manual";
|
|
13842
14129
|
export type EmailRuleScope = "address" | "domain";
|