@contember/schema 2.1.0-alpha.3 → 2.1.0-alpha.35
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/package.json +7 -2
- package/src/index.ts +1 -1
- package/src/schema/acl.ts +10 -12
- package/src/schema/actions.ts +2 -2
- package/src/schema/actionsPayload.ts +14 -1
- package/src/schema/input.ts +20 -18
- package/src/schema/model.ts +93 -10
- package/src/schema/validation.ts +2 -2
- package/dist/development/index.cjs +0 -30
- package/dist/development/index.cjs.map +0 -1
- package/dist/development/index.js +0 -15
- package/dist/development/index.js.map +0 -1
- package/dist/development/src/ProjectRole.cjs +0 -10
- package/dist/development/src/ProjectRole.cjs.map +0 -1
- package/dist/development/src/ProjectRole.js +0 -10
- package/dist/development/src/ProjectRole.js.map +0 -1
- package/dist/development/src/schema/acl.cjs +0 -22
- package/dist/development/src/schema/acl.cjs.map +0 -1
- package/dist/development/src/schema/acl.js +0 -23
- package/dist/development/src/schema/acl.js.map +0 -1
- package/dist/development/src/schema/input.cjs +0 -31
- package/dist/development/src/schema/input.cjs.map +0 -1
- package/dist/development/src/schema/input.js +0 -32
- package/dist/development/src/schema/input.js.map +0 -1
- package/dist/development/src/schema/model.cjs +0 -31
- package/dist/development/src/schema/model.cjs.map +0 -1
- package/dist/development/src/schema/model.js +0 -32
- package/dist/development/src/schema/model.js.map +0 -1
- package/dist/development/src/schema/result.cjs +0 -15
- package/dist/development/src/schema/result.cjs.map +0 -1
- package/dist/development/src/schema/result.js +0 -16
- package/dist/development/src/schema/result.js.map +0 -1
- package/dist/development/src/schema/validation.cjs +0 -11
- package/dist/development/src/schema/validation.cjs.map +0 -1
- package/dist/development/src/schema/validation.js +0 -12
- package/dist/development/src/schema/validation.js.map +0 -1
- package/dist/production/index.cjs +0 -30
- package/dist/production/index.cjs.map +0 -1
- package/dist/production/index.js +0 -15
- package/dist/production/index.js.map +0 -1
- package/dist/production/src/ProjectRole.cjs +0 -10
- package/dist/production/src/ProjectRole.cjs.map +0 -1
- package/dist/production/src/ProjectRole.js +0 -10
- package/dist/production/src/ProjectRole.js.map +0 -1
- package/dist/production/src/schema/acl.cjs +0 -22
- package/dist/production/src/schema/acl.cjs.map +0 -1
- package/dist/production/src/schema/acl.js +0 -23
- package/dist/production/src/schema/acl.js.map +0 -1
- package/dist/production/src/schema/input.cjs +0 -31
- package/dist/production/src/schema/input.cjs.map +0 -1
- package/dist/production/src/schema/input.js +0 -32
- package/dist/production/src/schema/input.js.map +0 -1
- package/dist/production/src/schema/model.cjs +0 -31
- package/dist/production/src/schema/model.cjs.map +0 -1
- package/dist/production/src/schema/model.js +0 -32
- package/dist/production/src/schema/model.js.map +0 -1
- package/dist/production/src/schema/result.cjs +0 -15
- package/dist/production/src/schema/result.cjs.map +0 -1
- package/dist/production/src/schema/result.js +0 -16
- package/dist/production/src/schema/result.js.map +0 -1
- package/dist/production/src/schema/validation.cjs +0 -11
- package/dist/production/src/schema/validation.cjs.map +0 -1
- package/dist/production/src/schema/validation.js +0 -12
- package/dist/production/src/schema/validation.js.map +0 -1
- package/dist/types/ProjectRole.d.ts +0 -6
- package/dist/types/ProjectRole.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -14
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/schema/acl.d.ts +0 -132
- package/dist/types/schema/acl.d.ts.map +0 -1
- package/dist/types/schema/actions.d.ts +0 -48
- package/dist/types/schema/actions.d.ts.map +0 -1
- package/dist/types/schema/actionsPayload.d.ts +0 -82
- package/dist/types/schema/actionsPayload.d.ts.map +0 -1
- package/dist/types/schema/index.d.ts +0 -11
- package/dist/types/schema/index.d.ts.map +0 -1
- package/dist/types/schema/input.d.ts +0 -178
- package/dist/types/schema/input.d.ts.map +0 -1
- package/dist/types/schema/json.d.ts +0 -7
- package/dist/types/schema/json.d.ts.map +0 -1
- package/dist/types/schema/model.d.ts +0 -234
- package/dist/types/schema/model.d.ts.map +0 -1
- package/dist/types/schema/result.d.ts +0 -71
- package/dist/types/schema/result.d.ts.map +0 -1
- package/dist/types/schema/settings.d.ts +0 -20
- package/dist/types/schema/settings.d.ts.map +0 -1
- package/dist/types/schema/validation.d.ts +0 -59
- package/dist/types/schema/validation.d.ts.map +0 -1
- package/dist/types/schema/value.d.ts +0 -10
- package/dist/types/schema/value.d.ts.map +0 -1
- package/dist/types/tsconfig.tsbuildinfo +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model.cjs","sources":["../../../../../packages/schema/src/schema/model.ts"],"sourcesContent":["import { Input } from './input'\nimport { JSONValue } from './json'\n\nexport namespace Model {\n\n\texport type Entity = {\n\t\treadonly name: string\n\t\treadonly primary: string\n\t\treadonly primaryColumn: string\n\t\treadonly tableName: string\n\t\treadonly fields: { readonly [name: string]: AnyField }\n\t\treadonly unique: Uniques\n\t\treadonly indexes: Indexes\n\t\treadonly view?: View\n\t\treadonly eventLog: EventLogConfig\n\t\treadonly orderBy?: readonly OrderBy[]\n\t}\n\n\texport type View = {\n\t\treadonly sql: string\n\t\treadonly dependencies?: readonly string[]\n\t\treadonly idSource?: readonly string[]\n\t\treadonly materialized?: boolean\n\t}\n\n\texport type EventLogConfig = {\n\t\treadonly enabled: boolean\n\t}\n\n\texport type FieldType = RelationType | ColumnType\n\texport type Field<T extends FieldType> = {\n\t\treadonly type: T\n\t}\n\n\texport type AnyField = AnyColumn | AnyRelation\n\texport type AnyColumn<T extends ColumnType = ColumnType> = Column<T>\n\n\texport enum ColumnType {\n\t\tUuid = 'Uuid',\n\t\tString = 'String',\n\t\tInt = 'Integer',\n\t\tDouble = 'Double',\n\t\tBool = 'Bool',\n\t\tEnum = 'Enum',\n\t\tDateTime = 'DateTime',\n\t\tDate = 'Date',\n\t\tTime = 'Time',\n\t\tJson = 'Json',\n\t}\n\n\texport type Column<T extends ColumnType> = ColumnTypeDefinition<T> & {\n\t\treadonly name: string\n\t\treadonly columnName: string\n\t}\n\n\texport type ColumnTypeDefinition<T extends ColumnType = ColumnType> =\n\t\t& Field<T>\n\t\t& {\n\t\t\treadonly columnType: string\n\t\t\treadonly list?: boolean\n\t\t\treadonly typeAlias?: string\n\t\t\treadonly nullable: boolean\n\t\t\treadonly default?: JSONValue\n\t\t\treadonly sequence?: {\n\t\t\t\treadonly precedence: 'ALWAYS' | 'BY DEFAULT'\n\t\t\t\treadonly start?: number\n\t\t\t}\n\t\t\treadonly collation?: Collation\n\t\t}\n\n\texport type Collation =\n\t\t// generic\n\t\t| 'und-x-icu' | 'C' | 'ucs_basic' | 'unicode' | 'POSIX' | 'default'\n\t\t// some languages\n\t\t| 'cs-x-icu' | 'sk-x-icu' | 'da-x-icu' | 'de-x-icu' | 'en-x-icu' | 'es-x-icu' | 'fr-x-icu' | 'it-x-icu' | 'ja-x-icu' | 'ko-x-icu' | 'nl-x-icu' | 'pl-x-icu' | 'pt-x-icu' | 'ru-x-icu' | 'sv-x-icu' | 'tr-x-icu' | 'zh-x-icu' | 'hu-x-icu' | 'fi-x-icu' | 'el-x-icu' | 'bg-x-icu' | 'hr-x-icu' | 'ro-x-icu' | 'sl-x-icu' | 'sr-x-icu' | 'uk-x-icu' | 'vi-x-icu' | 'th-x-icu' | 'ar-x-icu' | 'he-x-icu' | 'hi-x-icu' | 'id-x-icu' | 'ms-x-icu' | 'fil-x-icu' | 'sw-x-icu' | 'ta-x-icu' | 'te-x-icu' | 'ml-x-icu' | 'bn-x-icu' | 'gu-x-icu' | 'kn-x-icu' | 'mr-x-icu' | 'pa-x-icu' | 'ur-x-icu' | 'or-x-icu' | 'si-x-icu' | 'th-x-icu' | 'lo-x-icu' | 'my-x-icu' | 'ka-x-icu' | 'am-x-icu' | 'ti-x-icu' | 'ne-x-icu' | 'dz-x-icu' | 'kok-x-icu' | 'syr-x-icu' | 'sd-x-icu' | 'bo-x-icu' | 'km-x-icu' | 'mn-x-icu' | 'lo-x-icu' | 'gl-x-icu' | 'eu-x-icu' | 'ca-x-icu' | 'af-x-icu' | 'is-x-icu' | 'mk-x-icu' | 'sq-x-icu' | 'hy-x-icu' | 'mt-x-icu' | 'cy-x-icu' | 'et-x-icu' | 'lv-x-icu' | 'lt-x-icu' | 'tg-x-icu' | 'fa-x-icu' | 'ps-x-icu' | 'ks-x-icu' | 'sd-x'\n\t\t// fallback\n\t\t| string & {}\n\n\n\texport enum RelationType {\n\t\tOneHasOne = 'OneHasOne',\n\t\tOneHasMany = 'OneHasMany',\n\t\tManyHasOne = 'ManyHasOne',\n\t\tManyHasMany = 'ManyHasMany',\n\t}\n\n\texport type AnyInverseRelation =\n\t\t| OneHasManyRelation\n\t\t| OneHasOneInverseRelation\n\t\t| ManyHasManyInverseRelation\n\n\t/** @deprecated */\n\texport type AnyInversedRelation = AnyInverseRelation\n\n\texport type AnyOwningRelation =\n\t\t| ManyHasOneRelation\n\t\t| OneHasOneOwningRelation\n\t\t| ManyHasManyOwningRelation\n\n\texport type AnyRelation = AnyInverseRelation | AnyOwningRelation\n\n\texport type Relation<T extends RelationType = RelationType>=\n\t\t& Field<T>\n\t\t& {\n\t\t\treadonly name: string\n\t\t\treadonly type: T\n\t\t\treadonly target: string\n\t\t}\n\n\texport type InverseRelation =\n\t\t& Relation\n\t\t& {\n\t\t\treadonly ownedBy: string\n\t\t}\n\n\t/** @deprecated */\n\texport type InversedRelation = InverseRelation\n\n\texport type OwningRelation =\n\t\t& Relation\n\t\t& {\n\t\t\treadonly inversedBy?: string\n\t\t}\n\n\t/** @deprecated */\n\texport type OwnerRelation = OwningRelation\n\n\texport enum OnDelete {\n\t\tcascade = 'cascade',\n\t\trestrict = 'restrict',\n\t\tsetNull = 'set null',\n\t}\n\n\texport type JoiningColumn = {\n\t\treadonly columnName: string\n\t\treadonly onDelete: OnDelete\n\t}\n\n\texport type JoiningColumnRelation = {\n\t\treadonly joiningColumn: JoiningColumn\n\t}\n\n\texport type NullableRelation = {\n\t\treadonly nullable: boolean\n\t}\n\n\texport type JoiningTable = {\n\t\treadonly tableName: string\n\t\treadonly joiningColumn: JoiningColumn\n\t\treadonly inverseJoiningColumn: JoiningColumn\n\t\treadonly eventLog: EventLogConfig\n\t}\n\n\texport type JoiningTableRelation = {\n\t\treadonly joiningTable: JoiningTable\n\t}\n\n\texport import OrderDirection = Input.OrderDirection\n\texport type OrderBy = {\n\t\treadonly path: readonly string[]\n\t\treadonly direction: OrderDirection\n\t}\n\n\texport type OrderableRelation = {\n\t\treadonly orderBy?: readonly OrderBy[]\n\t}\n\n\texport type OneHasManyRelation =\n\t\t& Relation<RelationType.OneHasMany>\n\t\t& InverseRelation\n\t\t& OrderableRelation\n\n\texport type ManyHasOneRelation =\n\t\t& Relation<RelationType.ManyHasOne>\n\t\t& OwningRelation\n\t\t& JoiningColumnRelation\n\t\t& NullableRelation\n\n\texport type OneHasOneInverseRelation =\n\t\t& Relation<RelationType.OneHasOne>\n\t\t& InverseRelation\n\t\t& NullableRelation\n\t/** @deprecated */\n\texport type OneHasOneInversedRelation = OneHasOneInverseRelation\n\n\texport type OneHasOneOwningRelation =\n\t\t& Relation<RelationType.OneHasOne>\n\t\t& OwningRelation\n\t\t& JoiningColumnRelation\n\t\t& NullableRelation\n\t\t& {\n\t\t\treadonly orphanRemoval?: true\n\t\t}\n\t/** @deprecated */\n\texport type OneHasOneOwnerRelation = OneHasOneOwningRelation\n\n\texport type ManyHasManyInverseRelation =\n\t\t& Relation<RelationType.ManyHasMany>\n\t\t& InverseRelation\n\t\t& OrderableRelation\n\t/** @deprecated */\n\texport type ManyHasManyInversedRelation = ManyHasManyInverseRelation\n\n\texport type ManyHasManyOwningRelation =\n\t\t& Relation<RelationType.ManyHasMany>\n\t\t& OwningRelation\n\t\t& JoiningTableRelation\n\t\t& OrderableRelation\n\t/** @deprecated */\n\texport type ManyHasManyOwnerRelation = ManyHasManyOwningRelation\n\n\texport type Schema = {\n\t\treadonly enums: { readonly [name: string]: readonly string[] }\n\t\treadonly entities: { readonly [name: string]: Entity }\n\t}\n\n\texport type Unique = UniqueIndex | UniqueConstraint\n\texport type Uniques = readonly (Unique)[]\n\n\texport type ConstraintTiming = 'deferrable' | 'deferred'\n\n\texport type UniqueConstraint = {\n\t\treadonly fields: readonly string[]\n\t\treadonly timing?: ConstraintTiming // empty means not deferrable\n\t\treadonly name?: string\n\t\treadonly index?: false\n\t}\n\texport type NullsDistinctBehaviour = 'distinct' | 'not distinct'\n\texport type UniqueIndex = {\n\t\treadonly fields: readonly string[]\n\t\treadonly index: true\n\t\treadonly nulls?: NullsDistinctBehaviour // empty means distinct\n\t}\n\n\texport type Indexes = readonly Index[]\n\n\texport type Index = {\n\t\treadonly fields: readonly string[]\n\t\treadonly name?: string\n\t}\n\n\n\texport interface ColumnContext {\n\t\tentity: Model.Entity\n\t\tcolumn: Model.AnyColumn\n\t}\n\n\texport type AnyHasManyRelationContext =\n\t\t| ManyHasManyInverseContext\n\t\t| ManyHasManyOwningContext\n\t\t| OneHasManyContext\n\n\texport type AnyHasOneRelationContext =\n\t\t| ManyHasOneContext\n\t\t| OneHasOneOwningContext\n\t\t| OneHasOneInverseContext\n\n\texport type AnyRelationContext =\n\t\t| AnyHasManyRelationContext\n\t\t| AnyHasOneRelationContext\n\n\texport type AnyFieldContext =\n\t\t| ColumnContext\n\t\t| AnyRelationContext\n\n\texport interface ManyHasManyInverseContext {\n\t\ttype: 'manyHasManyInverse'\n\t\tentity: Model.Entity\n\t\trelation: Model.ManyHasManyInverseRelation\n\t\ttargetEntity: Model.Entity\n\t\ttargetRelation: Model.ManyHasManyOwningRelation\n\t}\n\n\texport interface ManyHasManyOwningContext {\n\t\ttype: 'manyHasManyOwning'\n\t\tentity: Model.Entity\n\t\trelation: Model.ManyHasManyOwningRelation\n\t\ttargetEntity: Model.Entity\n\t\ttargetRelation: Model.ManyHasManyInverseRelation | null\n\t}\n\n\texport interface ManyHasOneContext {\n\t\ttype: 'manyHasOne'\n\t\tentity: Model.Entity\n\t\trelation: Model.ManyHasOneRelation\n\t\ttargetEntity: Model.Entity\n\t\ttargetRelation: Model.OneHasManyRelation | null\n\t}\n\n\texport interface OneHasManyContext {\n\t\ttype: 'oneHasMany'\n\t\tentity: Model.Entity\n\t\trelation: Model.OneHasManyRelation\n\t\ttargetEntity: Model.Entity\n\t\ttargetRelation: Model.ManyHasOneRelation\n\t}\n\n\texport interface OneHasOneInverseContext {\n\t\ttype: 'oneHasOneInverse'\n\t\tentity: Model.Entity\n\t\trelation: Model.OneHasOneInverseRelation\n\t\ttargetEntity: Model.Entity\n\t\ttargetRelation: Model.OneHasOneOwningRelation\n\t}\n\n\texport interface OneHasOneOwningContext {\n\t\ttype: 'oneHasOneOwning'\n\t\tentity: Model.Entity\n\t\trelation: Model.OneHasOneOwningRelation\n\t\ttargetEntity: Model.Entity\n\t\ttargetRelation: Model.OneHasOneInverseRelation | null\n\t}\n\n\n\texport interface ColumnVisitor<T> {\n\t\tvisitColumn(context: ColumnContext): T\n\t}\n\n\texport interface RelationVisitor<T> {\n\t\tvisitRelation(context: AnyRelationContext): T\n\t}\n\n\texport type FieldVisitor<T> =\n\t\t& ColumnVisitor<T>\n\t\t& (\n\t\t\t| RelationVisitor<T>\n\t\t\t| RelationByTypeVisitor<T>\n\t\t\t| RelationByGenericTypeVisitor<T>\n\t\t)\n\n\texport interface RelationByTypeVisitor<T> {\n\t\tvisitManyHasOne(context: ManyHasOneContext): T\n\n\t\tvisitOneHasMany(context: OneHasManyContext): T\n\n\t\tvisitOneHasOneOwning(context: OneHasOneOwningContext): T\n\n\t\tvisitOneHasOneInverse(context: OneHasOneInverseContext): T\n\n\t\tvisitManyHasManyOwning(context: ManyHasManyOwningContext): T\n\n\t\tvisitManyHasManyInverse(context: ManyHasManyInverseContext): T\n\t}\n\n\texport interface RelationByGenericTypeVisitor<T> {\n\t\tvisitHasMany(context: AnyHasManyRelationContext): T\n\n\t\tvisitHasOne(context: AnyHasOneRelationContext): T\n\t}\n}\n"],"names":["Model","ColumnType","RelationType","OnDelete","Input"],"mappings":";;;AAGiBA,QAAAA,QAAAA;AAAAA,CAAV,CAAUA,WAAV;AAkCC,GAAA,CAAKC,gBAAL;AACNA,gBAAA,MAAO,IAAA;AACPA,gBAAA,QAAS,IAAA;AACTA,gBAAA,KAAM,IAAA;AACNA,gBAAA,QAAS,IAAA;AACTA,gBAAA,MAAO,IAAA;AACPA,gBAAA,MAAO,IAAA;AACPA,gBAAA,UAAW,IAAA;AACXA,gBAAA,MAAO,IAAA;AACPA,gBAAA,MAAO,IAAA;AACPA,gBAAA,MAAO,IAAA;AAAA,EAVI,GAAAD,OAAA,eAAAA,OAAA,aAAA,CAAA,EAAA;AA0CL,GAAA,CAAKE,kBAAL;AACNA,kBAAA,WAAY,IAAA;AACZA,kBAAA,YAAa,IAAA;AACbA,kBAAA,YAAa,IAAA;AACbA,kBAAA,aAAc,IAAA;AAAA,EAJH,GAAAF,OAAA,iBAAAA,OAAA,eAAA,CAAA,EAAA;AAgDL,GAAA,CAAKG,cAAL;AACNA,cAAA,SAAU,IAAA;AACVA,cAAA,UAAW,IAAA;AACXA,cAAA,SAAU,IAAA;AAAA,EAHC,GAAAH,OAAA,aAAAA,OAAA,WAAA,CAAA,EAAA;AA8BEA,SAAA,iBAAiBI,MAAAA,MAAM;AAAA,GA1JrBJ,QAAA,UAAAA,gBAAA,CAAA,EAAA;"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Input } from "./input.js";
|
|
2
|
-
var Model;
|
|
3
|
-
((Model2) => {
|
|
4
|
-
((ColumnType2) => {
|
|
5
|
-
ColumnType2["Uuid"] = "Uuid";
|
|
6
|
-
ColumnType2["String"] = "String";
|
|
7
|
-
ColumnType2["Int"] = "Integer";
|
|
8
|
-
ColumnType2["Double"] = "Double";
|
|
9
|
-
ColumnType2["Bool"] = "Bool";
|
|
10
|
-
ColumnType2["Enum"] = "Enum";
|
|
11
|
-
ColumnType2["DateTime"] = "DateTime";
|
|
12
|
-
ColumnType2["Date"] = "Date";
|
|
13
|
-
ColumnType2["Time"] = "Time";
|
|
14
|
-
ColumnType2["Json"] = "Json";
|
|
15
|
-
})(Model2.ColumnType || (Model2.ColumnType = {}));
|
|
16
|
-
((RelationType2) => {
|
|
17
|
-
RelationType2["OneHasOne"] = "OneHasOne";
|
|
18
|
-
RelationType2["OneHasMany"] = "OneHasMany";
|
|
19
|
-
RelationType2["ManyHasOne"] = "ManyHasOne";
|
|
20
|
-
RelationType2["ManyHasMany"] = "ManyHasMany";
|
|
21
|
-
})(Model2.RelationType || (Model2.RelationType = {}));
|
|
22
|
-
((OnDelete2) => {
|
|
23
|
-
OnDelete2["cascade"] = "cascade";
|
|
24
|
-
OnDelete2["restrict"] = "restrict";
|
|
25
|
-
OnDelete2["setNull"] = "set null";
|
|
26
|
-
})(Model2.OnDelete || (Model2.OnDelete = {}));
|
|
27
|
-
Model2.OrderDirection = Input.OrderDirection;
|
|
28
|
-
})(Model || (Model = {}));
|
|
29
|
-
export {
|
|
30
|
-
Model
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=model.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sources":["../../../../../packages/schema/src/schema/model.ts"],"sourcesContent":["import { Input } from './input'\nimport { JSONValue } from './json'\n\nexport namespace Model {\n\n\texport type Entity = {\n\t\treadonly name: string\n\t\treadonly primary: string\n\t\treadonly primaryColumn: string\n\t\treadonly tableName: string\n\t\treadonly fields: { readonly [name: string]: AnyField }\n\t\treadonly unique: Uniques\n\t\treadonly indexes: Indexes\n\t\treadonly view?: View\n\t\treadonly eventLog: EventLogConfig\n\t\treadonly orderBy?: readonly OrderBy[]\n\t}\n\n\texport type View = {\n\t\treadonly sql: string\n\t\treadonly dependencies?: readonly string[]\n\t\treadonly idSource?: readonly string[]\n\t\treadonly materialized?: boolean\n\t}\n\n\texport type EventLogConfig = {\n\t\treadonly enabled: boolean\n\t}\n\n\texport type FieldType = RelationType | ColumnType\n\texport type Field<T extends FieldType> = {\n\t\treadonly type: T\n\t}\n\n\texport type AnyField = AnyColumn | AnyRelation\n\texport type AnyColumn<T extends ColumnType = ColumnType> = Column<T>\n\n\texport enum ColumnType {\n\t\tUuid = 'Uuid',\n\t\tString = 'String',\n\t\tInt = 'Integer',\n\t\tDouble = 'Double',\n\t\tBool = 'Bool',\n\t\tEnum = 'Enum',\n\t\tDateTime = 'DateTime',\n\t\tDate = 'Date',\n\t\tTime = 'Time',\n\t\tJson = 'Json',\n\t}\n\n\texport type Column<T extends ColumnType> = ColumnTypeDefinition<T> & {\n\t\treadonly name: string\n\t\treadonly columnName: string\n\t}\n\n\texport type ColumnTypeDefinition<T extends ColumnType = ColumnType> =\n\t\t& Field<T>\n\t\t& {\n\t\t\treadonly columnType: string\n\t\t\treadonly list?: boolean\n\t\t\treadonly typeAlias?: string\n\t\t\treadonly nullable: boolean\n\t\t\treadonly default?: JSONValue\n\t\t\treadonly sequence?: {\n\t\t\t\treadonly precedence: 'ALWAYS' | 'BY DEFAULT'\n\t\t\t\treadonly start?: number\n\t\t\t}\n\t\t\treadonly collation?: Collation\n\t\t}\n\n\texport type Collation =\n\t\t// generic\n\t\t| 'und-x-icu' | 'C' | 'ucs_basic' | 'unicode' | 'POSIX' | 'default'\n\t\t// some languages\n\t\t| 'cs-x-icu' | 'sk-x-icu' | 'da-x-icu' | 'de-x-icu' | 'en-x-icu' | 'es-x-icu' | 'fr-x-icu' | 'it-x-icu' | 'ja-x-icu' | 'ko-x-icu' | 'nl-x-icu' | 'pl-x-icu' | 'pt-x-icu' | 'ru-x-icu' | 'sv-x-icu' | 'tr-x-icu' | 'zh-x-icu' | 'hu-x-icu' | 'fi-x-icu' | 'el-x-icu' | 'bg-x-icu' | 'hr-x-icu' | 'ro-x-icu' | 'sl-x-icu' | 'sr-x-icu' | 'uk-x-icu' | 'vi-x-icu' | 'th-x-icu' | 'ar-x-icu' | 'he-x-icu' | 'hi-x-icu' | 'id-x-icu' | 'ms-x-icu' | 'fil-x-icu' | 'sw-x-icu' | 'ta-x-icu' | 'te-x-icu' | 'ml-x-icu' | 'bn-x-icu' | 'gu-x-icu' | 'kn-x-icu' | 'mr-x-icu' | 'pa-x-icu' | 'ur-x-icu' | 'or-x-icu' | 'si-x-icu' | 'th-x-icu' | 'lo-x-icu' | 'my-x-icu' | 'ka-x-icu' | 'am-x-icu' | 'ti-x-icu' | 'ne-x-icu' | 'dz-x-icu' | 'kok-x-icu' | 'syr-x-icu' | 'sd-x-icu' | 'bo-x-icu' | 'km-x-icu' | 'mn-x-icu' | 'lo-x-icu' | 'gl-x-icu' | 'eu-x-icu' | 'ca-x-icu' | 'af-x-icu' | 'is-x-icu' | 'mk-x-icu' | 'sq-x-icu' | 'hy-x-icu' | 'mt-x-icu' | 'cy-x-icu' | 'et-x-icu' | 'lv-x-icu' | 'lt-x-icu' | 'tg-x-icu' | 'fa-x-icu' | 'ps-x-icu' | 'ks-x-icu' | 'sd-x'\n\t\t// fallback\n\t\t| string & {}\n\n\n\texport enum RelationType {\n\t\tOneHasOne = 'OneHasOne',\n\t\tOneHasMany = 'OneHasMany',\n\t\tManyHasOne = 'ManyHasOne',\n\t\tManyHasMany = 'ManyHasMany',\n\t}\n\n\texport type AnyInverseRelation =\n\t\t| OneHasManyRelation\n\t\t| OneHasOneInverseRelation\n\t\t| ManyHasManyInverseRelation\n\n\t/** @deprecated */\n\texport type AnyInversedRelation = AnyInverseRelation\n\n\texport type AnyOwningRelation =\n\t\t| ManyHasOneRelation\n\t\t| OneHasOneOwningRelation\n\t\t| ManyHasManyOwningRelation\n\n\texport type AnyRelation = AnyInverseRelation | AnyOwningRelation\n\n\texport type Relation<T extends RelationType = RelationType>=\n\t\t& Field<T>\n\t\t& {\n\t\t\treadonly name: string\n\t\t\treadonly type: T\n\t\t\treadonly target: string\n\t\t}\n\n\texport type InverseRelation =\n\t\t& Relation\n\t\t& {\n\t\t\treadonly ownedBy: string\n\t\t}\n\n\t/** @deprecated */\n\texport type InversedRelation = InverseRelation\n\n\texport type OwningRelation =\n\t\t& Relation\n\t\t& {\n\t\t\treadonly inversedBy?: string\n\t\t}\n\n\t/** @deprecated */\n\texport type OwnerRelation = OwningRelation\n\n\texport enum OnDelete {\n\t\tcascade = 'cascade',\n\t\trestrict = 'restrict',\n\t\tsetNull = 'set null',\n\t}\n\n\texport type JoiningColumn = {\n\t\treadonly columnName: string\n\t\treadonly onDelete: OnDelete\n\t}\n\n\texport type JoiningColumnRelation = {\n\t\treadonly joiningColumn: JoiningColumn\n\t}\n\n\texport type NullableRelation = {\n\t\treadonly nullable: boolean\n\t}\n\n\texport type JoiningTable = {\n\t\treadonly tableName: string\n\t\treadonly joiningColumn: JoiningColumn\n\t\treadonly inverseJoiningColumn: JoiningColumn\n\t\treadonly eventLog: EventLogConfig\n\t}\n\n\texport type JoiningTableRelation = {\n\t\treadonly joiningTable: JoiningTable\n\t}\n\n\texport import OrderDirection = Input.OrderDirection\n\texport type OrderBy = {\n\t\treadonly path: readonly string[]\n\t\treadonly direction: OrderDirection\n\t}\n\n\texport type OrderableRelation = {\n\t\treadonly orderBy?: readonly OrderBy[]\n\t}\n\n\texport type OneHasManyRelation =\n\t\t& Relation<RelationType.OneHasMany>\n\t\t& InverseRelation\n\t\t& OrderableRelation\n\n\texport type ManyHasOneRelation =\n\t\t& Relation<RelationType.ManyHasOne>\n\t\t& OwningRelation\n\t\t& JoiningColumnRelation\n\t\t& NullableRelation\n\n\texport type OneHasOneInverseRelation =\n\t\t& Relation<RelationType.OneHasOne>\n\t\t& InverseRelation\n\t\t& NullableRelation\n\t/** @deprecated */\n\texport type OneHasOneInversedRelation = OneHasOneInverseRelation\n\n\texport type OneHasOneOwningRelation =\n\t\t& Relation<RelationType.OneHasOne>\n\t\t& OwningRelation\n\t\t& JoiningColumnRelation\n\t\t& NullableRelation\n\t\t& {\n\t\t\treadonly orphanRemoval?: true\n\t\t}\n\t/** @deprecated */\n\texport type OneHasOneOwnerRelation = OneHasOneOwningRelation\n\n\texport type ManyHasManyInverseRelation =\n\t\t& Relation<RelationType.ManyHasMany>\n\t\t& InverseRelation\n\t\t& OrderableRelation\n\t/** @deprecated */\n\texport type ManyHasManyInversedRelation = ManyHasManyInverseRelation\n\n\texport type ManyHasManyOwningRelation =\n\t\t& Relation<RelationType.ManyHasMany>\n\t\t& OwningRelation\n\t\t& JoiningTableRelation\n\t\t& OrderableRelation\n\t/** @deprecated */\n\texport type ManyHasManyOwnerRelation = ManyHasManyOwningRelation\n\n\texport type Schema = {\n\t\treadonly enums: { readonly [name: string]: readonly string[] }\n\t\treadonly entities: { readonly [name: string]: Entity }\n\t}\n\n\texport type Unique = UniqueIndex | UniqueConstraint\n\texport type Uniques = readonly (Unique)[]\n\n\texport type ConstraintTiming = 'deferrable' | 'deferred'\n\n\texport type UniqueConstraint = {\n\t\treadonly fields: readonly string[]\n\t\treadonly timing?: ConstraintTiming // empty means not deferrable\n\t\treadonly name?: string\n\t\treadonly index?: false\n\t}\n\texport type NullsDistinctBehaviour = 'distinct' | 'not distinct'\n\texport type UniqueIndex = {\n\t\treadonly fields: readonly string[]\n\t\treadonly index: true\n\t\treadonly nulls?: NullsDistinctBehaviour // empty means distinct\n\t}\n\n\texport type Indexes = readonly Index[]\n\n\texport type Index = {\n\t\treadonly fields: readonly string[]\n\t\treadonly name?: string\n\t}\n\n\n\texport interface ColumnContext {\n\t\tentity: Model.Entity\n\t\tcolumn: Model.AnyColumn\n\t}\n\n\texport type AnyHasManyRelationContext =\n\t\t| ManyHasManyInverseContext\n\t\t| ManyHasManyOwningContext\n\t\t| OneHasManyContext\n\n\texport type AnyHasOneRelationContext =\n\t\t| ManyHasOneContext\n\t\t| OneHasOneOwningContext\n\t\t| OneHasOneInverseContext\n\n\texport type AnyRelationContext =\n\t\t| AnyHasManyRelationContext\n\t\t| AnyHasOneRelationContext\n\n\texport type AnyFieldContext =\n\t\t| ColumnContext\n\t\t| AnyRelationContext\n\n\texport interface ManyHasManyInverseContext {\n\t\ttype: 'manyHasManyInverse'\n\t\tentity: Model.Entity\n\t\trelation: Model.ManyHasManyInverseRelation\n\t\ttargetEntity: Model.Entity\n\t\ttargetRelation: Model.ManyHasManyOwningRelation\n\t}\n\n\texport interface ManyHasManyOwningContext {\n\t\ttype: 'manyHasManyOwning'\n\t\tentity: Model.Entity\n\t\trelation: Model.ManyHasManyOwningRelation\n\t\ttargetEntity: Model.Entity\n\t\ttargetRelation: Model.ManyHasManyInverseRelation | null\n\t}\n\n\texport interface ManyHasOneContext {\n\t\ttype: 'manyHasOne'\n\t\tentity: Model.Entity\n\t\trelation: Model.ManyHasOneRelation\n\t\ttargetEntity: Model.Entity\n\t\ttargetRelation: Model.OneHasManyRelation | null\n\t}\n\n\texport interface OneHasManyContext {\n\t\ttype: 'oneHasMany'\n\t\tentity: Model.Entity\n\t\trelation: Model.OneHasManyRelation\n\t\ttargetEntity: Model.Entity\n\t\ttargetRelation: Model.ManyHasOneRelation\n\t}\n\n\texport interface OneHasOneInverseContext {\n\t\ttype: 'oneHasOneInverse'\n\t\tentity: Model.Entity\n\t\trelation: Model.OneHasOneInverseRelation\n\t\ttargetEntity: Model.Entity\n\t\ttargetRelation: Model.OneHasOneOwningRelation\n\t}\n\n\texport interface OneHasOneOwningContext {\n\t\ttype: 'oneHasOneOwning'\n\t\tentity: Model.Entity\n\t\trelation: Model.OneHasOneOwningRelation\n\t\ttargetEntity: Model.Entity\n\t\ttargetRelation: Model.OneHasOneInverseRelation | null\n\t}\n\n\n\texport interface ColumnVisitor<T> {\n\t\tvisitColumn(context: ColumnContext): T\n\t}\n\n\texport interface RelationVisitor<T> {\n\t\tvisitRelation(context: AnyRelationContext): T\n\t}\n\n\texport type FieldVisitor<T> =\n\t\t& ColumnVisitor<T>\n\t\t& (\n\t\t\t| RelationVisitor<T>\n\t\t\t| RelationByTypeVisitor<T>\n\t\t\t| RelationByGenericTypeVisitor<T>\n\t\t)\n\n\texport interface RelationByTypeVisitor<T> {\n\t\tvisitManyHasOne(context: ManyHasOneContext): T\n\n\t\tvisitOneHasMany(context: OneHasManyContext): T\n\n\t\tvisitOneHasOneOwning(context: OneHasOneOwningContext): T\n\n\t\tvisitOneHasOneInverse(context: OneHasOneInverseContext): T\n\n\t\tvisitManyHasManyOwning(context: ManyHasManyOwningContext): T\n\n\t\tvisitManyHasManyInverse(context: ManyHasManyInverseContext): T\n\t}\n\n\texport interface RelationByGenericTypeVisitor<T> {\n\t\tvisitHasMany(context: AnyHasManyRelationContext): T\n\n\t\tvisitHasOne(context: AnyHasOneRelationContext): T\n\t}\n}\n"],"names":["Model","ColumnType","RelationType","OnDelete"],"mappings":";AAGiB,IAAA;AAAA,CAAV,CAAUA,WAAV;AAkCC,GAAA,CAAKC,gBAAL;AACNA,gBAAA,MAAO,IAAA;AACPA,gBAAA,QAAS,IAAA;AACTA,gBAAA,KAAM,IAAA;AACNA,gBAAA,QAAS,IAAA;AACTA,gBAAA,MAAO,IAAA;AACPA,gBAAA,MAAO,IAAA;AACPA,gBAAA,UAAW,IAAA;AACXA,gBAAA,MAAO,IAAA;AACPA,gBAAA,MAAO,IAAA;AACPA,gBAAA,MAAO,IAAA;AAAA,EAVI,GAAAD,OAAA,eAAAA,OAAA,aAAA,CAAA,EAAA;AA0CL,GAAA,CAAKE,kBAAL;AACNA,kBAAA,WAAY,IAAA;AACZA,kBAAA,YAAa,IAAA;AACbA,kBAAA,YAAa,IAAA;AACbA,kBAAA,aAAc,IAAA;AAAA,EAJH,GAAAF,OAAA,iBAAAA,OAAA,eAAA,CAAA,EAAA;AAgDL,GAAA,CAAKG,cAAL;AACNA,cAAA,SAAU,IAAA;AACVA,cAAA,UAAW,IAAA;AACXA,cAAA,SAAU,IAAA;AAAA,EAHC,GAAAH,OAAA,aAAAA,OAAA,WAAA,CAAA,EAAA;AA8BEA,SAAA,iBAAiB,MAAM;AAAA,GA1JrB,UAAA,QAAA,CAAA,EAAA;"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
exports.Result = void 0;
|
|
4
|
-
((Result2) => {
|
|
5
|
-
((ExecutionErrorType2) => {
|
|
6
|
-
ExecutionErrorType2["NotNullConstraintViolation"] = "NotNullConstraintViolation";
|
|
7
|
-
ExecutionErrorType2["UniqueConstraintViolation"] = "UniqueConstraintViolation";
|
|
8
|
-
ExecutionErrorType2["ForeignKeyConstraintViolation"] = "ForeignKeyConstraintViolation";
|
|
9
|
-
ExecutionErrorType2["NotFoundOrDenied"] = "NotFoundOrDenied";
|
|
10
|
-
ExecutionErrorType2["NonUniqueWhereInput"] = "NonUniqueWhereInput";
|
|
11
|
-
ExecutionErrorType2["InvalidDataInput"] = "InvalidDataInput";
|
|
12
|
-
ExecutionErrorType2["SqlError"] = "SqlError";
|
|
13
|
-
})(Result2.ExecutionErrorType || (Result2.ExecutionErrorType = {}));
|
|
14
|
-
})(exports.Result || (exports.Result = {}));
|
|
15
|
-
//# sourceMappingURL=result.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"result.cjs","sources":["../../../../../packages/schema/src/schema/result.ts"],"sourcesContent":["import { Value } from './value'\n\nexport namespace Result {\n\texport type MutationFieldResult = CreateResult | UpdateResult | DeleteResult | UpsertResult\n\n\texport interface CreateResult {\n\t\tok: boolean\n\t\terrorMessage?: string\n\t\terrors: ExecutionError[]\n\t\tvalidation: ValidationResult\n\t\tnode: Value.Object | null\n\t}\n\n\texport interface UpsertResult {\n\t\tok: boolean\n\t\terrorMessage?: string\n\t\terrors: ExecutionError[]\n\t\tvalidation: ValidationResult\n\t\tnode: Value.Object | null\n\t}\n\n\texport interface UpdateResult {\n\t\tok: boolean\n\t\terrorMessage?: string\n\t\terrors: ExecutionError[]\n\t\tvalidation: ValidationResult\n\t\tnode: Value.Object | null\n\t}\n\n\texport interface DeleteResult {\n\t\tok: boolean\n\t\terrorMessage?: string\n\t\terrors: ExecutionError[]\n\t\tnode: Value.Object | null\n\t}\n\n\texport interface TransactionResult {\n\t\tok: boolean\n\t\terrorMessage?: string\n\t\terrors: ExecutionError[]\n\t\tvalidation: ValidationResult\n\t}\n\n\texport interface ValidationResult {\n\t\tvalid: boolean\n\t\terrors: ValidationError[]\n\t}\n\n\texport interface ValidationError {\n\t\tpath: PathFragment[]\n\t\tmessage: ValidationMessage\n\t}\n\n\texport enum ExecutionErrorType {\n\t\tNotNullConstraintViolation = 'NotNullConstraintViolation',\n\t\tUniqueConstraintViolation = 'UniqueConstraintViolation',\n\t\tForeignKeyConstraintViolation = 'ForeignKeyConstraintViolation',\n\t\tNotFoundOrDenied = 'NotFoundOrDenied',\n\t\tNonUniqueWhereInput = 'NonUniqueWhereInput',\n\t\tInvalidDataInput = 'InvalidDataInput',\n\t\tSqlError = 'SqlError',\n\t}\n\n\texport interface ExecutionError {\n\t\t/** @deprecated */\n\t\tpath: PathFragment[]\n\t\tpaths: PathFragment[][]\n\t\ttype: ExecutionErrorType\n\t\tmessage?: string\n\t}\n\n\texport type PathFragment = { field: string } | { index: number; alias?: string }\n\n\texport interface ValidationMessage {\n\t\ttext: string\n\t}\n}\n"],"names":["Result","ExecutionErrorType"],"mappings":";;AAEiBA,QAAAA,SAAAA;AAAAA,CAAV,CAAUA,YAAV;AAmDC,GAAA,CAAKC,wBAAL;AACNA,wBAAA,4BAA6B,IAAA;AAC7BA,wBAAA,2BAA4B,IAAA;AAC5BA,wBAAA,+BAAgC,IAAA;AAChCA,wBAAA,kBAAmB,IAAA;AACnBA,wBAAA,qBAAsB,IAAA;AACtBA,wBAAA,kBAAmB,IAAA;AACnBA,wBAAA,UAAW,IAAA;AAAA,EAPA,GAAAD,QAAA,uBAAAA,QAAA,qBAAA,CAAA,EAAA;AAAA,GAnDIA,QAAA,WAAAA,iBAAA,CAAA,EAAA;"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
var Result;
|
|
2
|
-
((Result2) => {
|
|
3
|
-
((ExecutionErrorType2) => {
|
|
4
|
-
ExecutionErrorType2["NotNullConstraintViolation"] = "NotNullConstraintViolation";
|
|
5
|
-
ExecutionErrorType2["UniqueConstraintViolation"] = "UniqueConstraintViolation";
|
|
6
|
-
ExecutionErrorType2["ForeignKeyConstraintViolation"] = "ForeignKeyConstraintViolation";
|
|
7
|
-
ExecutionErrorType2["NotFoundOrDenied"] = "NotFoundOrDenied";
|
|
8
|
-
ExecutionErrorType2["NonUniqueWhereInput"] = "NonUniqueWhereInput";
|
|
9
|
-
ExecutionErrorType2["InvalidDataInput"] = "InvalidDataInput";
|
|
10
|
-
ExecutionErrorType2["SqlError"] = "SqlError";
|
|
11
|
-
})(Result2.ExecutionErrorType || (Result2.ExecutionErrorType = {}));
|
|
12
|
-
})(Result || (Result = {}));
|
|
13
|
-
export {
|
|
14
|
-
Result
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=result.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"result.js","sources":["../../../../../packages/schema/src/schema/result.ts"],"sourcesContent":["import { Value } from './value'\n\nexport namespace Result {\n\texport type MutationFieldResult = CreateResult | UpdateResult | DeleteResult | UpsertResult\n\n\texport interface CreateResult {\n\t\tok: boolean\n\t\terrorMessage?: string\n\t\terrors: ExecutionError[]\n\t\tvalidation: ValidationResult\n\t\tnode: Value.Object | null\n\t}\n\n\texport interface UpsertResult {\n\t\tok: boolean\n\t\terrorMessage?: string\n\t\terrors: ExecutionError[]\n\t\tvalidation: ValidationResult\n\t\tnode: Value.Object | null\n\t}\n\n\texport interface UpdateResult {\n\t\tok: boolean\n\t\terrorMessage?: string\n\t\terrors: ExecutionError[]\n\t\tvalidation: ValidationResult\n\t\tnode: Value.Object | null\n\t}\n\n\texport interface DeleteResult {\n\t\tok: boolean\n\t\terrorMessage?: string\n\t\terrors: ExecutionError[]\n\t\tnode: Value.Object | null\n\t}\n\n\texport interface TransactionResult {\n\t\tok: boolean\n\t\terrorMessage?: string\n\t\terrors: ExecutionError[]\n\t\tvalidation: ValidationResult\n\t}\n\n\texport interface ValidationResult {\n\t\tvalid: boolean\n\t\terrors: ValidationError[]\n\t}\n\n\texport interface ValidationError {\n\t\tpath: PathFragment[]\n\t\tmessage: ValidationMessage\n\t}\n\n\texport enum ExecutionErrorType {\n\t\tNotNullConstraintViolation = 'NotNullConstraintViolation',\n\t\tUniqueConstraintViolation = 'UniqueConstraintViolation',\n\t\tForeignKeyConstraintViolation = 'ForeignKeyConstraintViolation',\n\t\tNotFoundOrDenied = 'NotFoundOrDenied',\n\t\tNonUniqueWhereInput = 'NonUniqueWhereInput',\n\t\tInvalidDataInput = 'InvalidDataInput',\n\t\tSqlError = 'SqlError',\n\t}\n\n\texport interface ExecutionError {\n\t\t/** @deprecated */\n\t\tpath: PathFragment[]\n\t\tpaths: PathFragment[][]\n\t\ttype: ExecutionErrorType\n\t\tmessage?: string\n\t}\n\n\texport type PathFragment = { field: string } | { index: number; alias?: string }\n\n\texport interface ValidationMessage {\n\t\ttext: string\n\t}\n}\n"],"names":["Result","ExecutionErrorType"],"mappings":"AAEiB,IAAA;AAAA,CAAV,CAAUA,YAAV;AAmDC,GAAA,CAAKC,wBAAL;AACNA,wBAAA,4BAA6B,IAAA;AAC7BA,wBAAA,2BAA4B,IAAA;AAC5BA,wBAAA,+BAAgC,IAAA;AAChCA,wBAAA,kBAAmB,IAAA;AACnBA,wBAAA,qBAAsB,IAAA;AACtBA,wBAAA,kBAAmB,IAAA;AACnBA,wBAAA,UAAW,IAAA;AAAA,EAPA,GAAAD,QAAA,uBAAAA,QAAA,qBAAA,CAAA,EAAA;AAAA,GAnDI,WAAA,SAAA,CAAA,EAAA;"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
exports.Validation = void 0;
|
|
4
|
-
((Validation2) => {
|
|
5
|
-
((ArgumentType2) => {
|
|
6
|
-
ArgumentType2["validator"] = "validator";
|
|
7
|
-
ArgumentType2["path"] = "path";
|
|
8
|
-
ArgumentType2["literal"] = "literal";
|
|
9
|
-
})(Validation2.ArgumentType || (Validation2.ArgumentType = {}));
|
|
10
|
-
})(exports.Validation || (exports.Validation = {}));
|
|
11
|
-
//# sourceMappingURL=validation.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validation.cjs","sources":["../../../../../packages/schema/src/schema/validation.ts"],"sourcesContent":["import { JSONValue } from './json'\n\nexport namespace Validation {\n\texport type ContextPath = readonly string[]\n\n\texport enum ArgumentType {\n\t\tvalidator = 'validator',\n\t\tpath = 'path',\n\t\tliteral = 'literal',\n\t}\n\n\texport type ValidatorArgument = {\n\t\treadonly type: ArgumentType.validator\n\t\treadonly validator: Validator\n\t}\n\texport type PathArgument = {\n\t\treadonly type: ArgumentType.path\n\t\treadonly path: ContextPath\n\t}\n\texport type LiteralArgument<V = JSONValue> = {\n\t\treadonly type: ArgumentType.literal\n\t\treadonly value: V\n\t}\n\n\texport type ValidatorArguments = {\n\t\treadonly and: readonly ValidatorArgument[]\n\t\treadonly or: readonly ValidatorArgument[]\n\t\treadonly conditional: readonly [ValidatorArgument, ValidatorArgument]\n\t\treadonly pattern: readonly [LiteralArgument<readonly [string, string]>]\n\t\treadonly lengthRange: readonly [LiteralArgument<number | null>, LiteralArgument<number | null>]\n\t\treadonly range: readonly [LiteralArgument<number | null>, LiteralArgument<number | null>]\n\t\treadonly equals: readonly [LiteralArgument<JSONValue>]\n\t\treadonly not: readonly [ValidatorArgument]\n\t\treadonly empty: readonly[]\n\t\treadonly defined: readonly[]\n\t\treadonly inContext: readonly [PathArgument, ValidatorArgument]\n\t\treadonly every: readonly [ValidatorArgument]\n\t\treadonly any: readonly [ValidatorArgument]\n\t\treadonly filter: readonly [ValidatorArgument, ValidatorArgument]\n\t}\n\n\texport type SpecificValidator<N extends keyof ValidatorArguments> = {\n\t\treadonly operation: N\n\t\treadonly args: ValidatorArguments[N]\n\t}\n\n\texport type Validator = {\n\t\treadonly [N in keyof ValidatorArguments]: SpecificValidator<N>\n\t}[keyof ValidatorArguments]\n\n\texport type Message = {\n\t\treadonly text: string\n\t\treadonly parameters?: readonly (string | number)[]\n\t}\n\n\texport type ValidationRule = {\n\t\treadonly validator: Validator\n\t\treadonly message: Message\n\t}\n\n\texport type EntityRules = {\n\t\treadonly [field: string]: readonly ValidationRule[]\n\t}\n\n\texport type Schema = {\n\t\treadonly [entity: string]: EntityRules\n\t}\n}\n"],"names":["Validation","ArgumentType"],"mappings":";;AAEiBA,QAAAA,aAAAA;AAAAA,CAAV,CAAUA,gBAAV;AAGC,GAAA,CAAKC,kBAAL;AACNA,kBAAA,WAAY,IAAA;AACZA,kBAAA,MAAO,IAAA;AACPA,kBAAA,SAAU,IAAA;AAAA,EAHC,GAAAD,YAAA,iBAAAA,YAAA,eAAA,CAAA,EAAA;AAAA,GAHIA,QAAA,eAAAA,qBAAA,CAAA,EAAA;"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var Validation;
|
|
2
|
-
((Validation2) => {
|
|
3
|
-
((ArgumentType2) => {
|
|
4
|
-
ArgumentType2["validator"] = "validator";
|
|
5
|
-
ArgumentType2["path"] = "path";
|
|
6
|
-
ArgumentType2["literal"] = "literal";
|
|
7
|
-
})(Validation2.ArgumentType || (Validation2.ArgumentType = {}));
|
|
8
|
-
})(Validation || (Validation = {}));
|
|
9
|
-
export {
|
|
10
|
-
Validation
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=validation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","sources":["../../../../../packages/schema/src/schema/validation.ts"],"sourcesContent":["import { JSONValue } from './json'\n\nexport namespace Validation {\n\texport type ContextPath = readonly string[]\n\n\texport enum ArgumentType {\n\t\tvalidator = 'validator',\n\t\tpath = 'path',\n\t\tliteral = 'literal',\n\t}\n\n\texport type ValidatorArgument = {\n\t\treadonly type: ArgumentType.validator\n\t\treadonly validator: Validator\n\t}\n\texport type PathArgument = {\n\t\treadonly type: ArgumentType.path\n\t\treadonly path: ContextPath\n\t}\n\texport type LiteralArgument<V = JSONValue> = {\n\t\treadonly type: ArgumentType.literal\n\t\treadonly value: V\n\t}\n\n\texport type ValidatorArguments = {\n\t\treadonly and: readonly ValidatorArgument[]\n\t\treadonly or: readonly ValidatorArgument[]\n\t\treadonly conditional: readonly [ValidatorArgument, ValidatorArgument]\n\t\treadonly pattern: readonly [LiteralArgument<readonly [string, string]>]\n\t\treadonly lengthRange: readonly [LiteralArgument<number | null>, LiteralArgument<number | null>]\n\t\treadonly range: readonly [LiteralArgument<number | null>, LiteralArgument<number | null>]\n\t\treadonly equals: readonly [LiteralArgument<JSONValue>]\n\t\treadonly not: readonly [ValidatorArgument]\n\t\treadonly empty: readonly[]\n\t\treadonly defined: readonly[]\n\t\treadonly inContext: readonly [PathArgument, ValidatorArgument]\n\t\treadonly every: readonly [ValidatorArgument]\n\t\treadonly any: readonly [ValidatorArgument]\n\t\treadonly filter: readonly [ValidatorArgument, ValidatorArgument]\n\t}\n\n\texport type SpecificValidator<N extends keyof ValidatorArguments> = {\n\t\treadonly operation: N\n\t\treadonly args: ValidatorArguments[N]\n\t}\n\n\texport type Validator = {\n\t\treadonly [N in keyof ValidatorArguments]: SpecificValidator<N>\n\t}[keyof ValidatorArguments]\n\n\texport type Message = {\n\t\treadonly text: string\n\t\treadonly parameters?: readonly (string | number)[]\n\t}\n\n\texport type ValidationRule = {\n\t\treadonly validator: Validator\n\t\treadonly message: Message\n\t}\n\n\texport type EntityRules = {\n\t\treadonly [field: string]: readonly ValidationRule[]\n\t}\n\n\texport type Schema = {\n\t\treadonly [entity: string]: EntityRules\n\t}\n}\n"],"names":["Validation","ArgumentType"],"mappings":"AAEiB,IAAA;AAAA,CAAV,CAAUA,gBAAV;AAGC,GAAA,CAAKC,kBAAL;AACNA,kBAAA,WAAY,IAAA;AACZA,kBAAA,MAAO,IAAA;AACPA,kBAAA,SAAU,IAAA;AAAA,EAHC,GAAAD,YAAA,iBAAAA,YAAA,eAAA,CAAA,EAAA;AAAA,GAHI,eAAA,aAAA,CAAA,EAAA;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectRole.d.ts","sourceRoot":"","sources":["../../src/ProjectRole.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACtB,KAAK,UAAU;IACf,aAAa,kBAAkB;IAC/B,QAAQ,aAAa;CACrB"}
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Acl, Actions, Model, Settings, Validation } from './schema';
|
|
2
|
-
export * from './ProjectRole';
|
|
3
|
-
export type Schema = {
|
|
4
|
-
readonly model: Model.Schema;
|
|
5
|
-
readonly acl: Acl.Schema;
|
|
6
|
-
readonly validation: Validation.Schema;
|
|
7
|
-
readonly actions: Actions.Schema;
|
|
8
|
-
readonly settings: Settings.Schema;
|
|
9
|
-
};
|
|
10
|
-
export type Writable<V> = {
|
|
11
|
-
-readonly [K in keyof V]: V[K];
|
|
12
|
-
};
|
|
13
|
-
export * from './schema';
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAEpE,cAAc,eAAe,CAAA;AAE7B,MAAM,MAAM,MAAM,GAAG;IACpB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAA;IAC5B,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAA;IACxB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAA;IACtC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAA;IAChC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;IAAC,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAC,CAAA;AAE1D,cAAc,UAAU,CAAA"}
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { Input } from './input';
|
|
2
|
-
import { JSONValue } from './json';
|
|
3
|
-
export declare namespace Acl {
|
|
4
|
-
enum VariableType {
|
|
5
|
-
entity = "entity",
|
|
6
|
-
predefined = "predefined",
|
|
7
|
-
condition = "condition"
|
|
8
|
-
}
|
|
9
|
-
type Variable = EntityVariable | PredefinedVariable | ConditionVariable;
|
|
10
|
-
type EntityVariable = {
|
|
11
|
-
readonly type: VariableType.entity;
|
|
12
|
-
readonly entityName: string;
|
|
13
|
-
readonly fallback?: Input.Condition;
|
|
14
|
-
};
|
|
15
|
-
type PredefinedVariableValue = 'identityID' | 'personID';
|
|
16
|
-
type PredefinedVariable = {
|
|
17
|
-
readonly type: VariableType.predefined;
|
|
18
|
-
readonly value: PredefinedVariableValue;
|
|
19
|
-
};
|
|
20
|
-
type ConditionVariable = {
|
|
21
|
-
readonly type: VariableType.condition;
|
|
22
|
-
readonly fallback?: Input.Condition;
|
|
23
|
-
};
|
|
24
|
-
type PredicateVariable = string;
|
|
25
|
-
type PredicateDefinition<E = never> = Input.Where<PredicateVariable | Input.Condition | E>;
|
|
26
|
-
type PredicateMap = {
|
|
27
|
-
readonly [name: string]: PredicateDefinition;
|
|
28
|
-
};
|
|
29
|
-
type EntityPermissions = {
|
|
30
|
-
readonly predicates: PredicateMap;
|
|
31
|
-
readonly operations: EntityOperations;
|
|
32
|
-
};
|
|
33
|
-
enum Operation {
|
|
34
|
-
read = "read",
|
|
35
|
-
create = "create",
|
|
36
|
-
update = "update",
|
|
37
|
-
delete = "delete"
|
|
38
|
-
}
|
|
39
|
-
type EntityOperations = {
|
|
40
|
-
readonly read?: FieldPermissions;
|
|
41
|
-
readonly create?: FieldPermissions;
|
|
42
|
-
readonly update?: FieldPermissions;
|
|
43
|
-
readonly delete?: Predicate;
|
|
44
|
-
readonly noRoot?: readonly `${Operation}`[];
|
|
45
|
-
readonly customPrimary?: boolean;
|
|
46
|
-
readonly refreshMaterializedView?: boolean;
|
|
47
|
-
};
|
|
48
|
-
type FieldPermissions = {
|
|
49
|
-
readonly [field: string]: Predicate;
|
|
50
|
-
};
|
|
51
|
-
type PredicateReference = string;
|
|
52
|
-
type Predicate = PredicateReference | boolean;
|
|
53
|
-
type AnyStage = '*';
|
|
54
|
-
type StagesDefinition = AnyStage | readonly string[];
|
|
55
|
-
type MembershipVariableMatchRule = true | string;
|
|
56
|
-
type MembershipVariablesMatchRule = true | {
|
|
57
|
-
readonly [targetVariable: string]: MembershipVariableMatchRule;
|
|
58
|
-
};
|
|
59
|
-
type MembershipRoleMatchRule = true | {
|
|
60
|
-
readonly variables?: MembershipVariablesMatchRule;
|
|
61
|
-
};
|
|
62
|
-
type MembershipMatchRule = {
|
|
63
|
-
readonly [role: string]: MembershipRoleMatchRule;
|
|
64
|
-
};
|
|
65
|
-
type TenantPermissions = {
|
|
66
|
-
readonly invite?: boolean | MembershipMatchRule;
|
|
67
|
-
readonly unmanagedInvite?: boolean | MembershipMatchRule;
|
|
68
|
-
readonly view?: MembershipMatchRule;
|
|
69
|
-
readonly manage?: MembershipMatchRule;
|
|
70
|
-
};
|
|
71
|
-
enum SystemPermissionsLevel {
|
|
72
|
-
none = "none",
|
|
73
|
-
any = "any",
|
|
74
|
-
some = "some"
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* @deprecated
|
|
78
|
-
*/
|
|
79
|
-
type LimitedSystemPermissionsLevel = 'any' | 'none';
|
|
80
|
-
type SystemPermissions = {
|
|
81
|
-
readonly history?: boolean | LimitedSystemPermissionsLevel;
|
|
82
|
-
readonly migrate?: boolean;
|
|
83
|
-
readonly assumeIdentity?: boolean;
|
|
84
|
-
readonly export?: boolean;
|
|
85
|
-
readonly import?: boolean;
|
|
86
|
-
};
|
|
87
|
-
type ContentPermissions = {
|
|
88
|
-
readonly assumeMembership?: MembershipMatchRule;
|
|
89
|
-
readonly export?: boolean;
|
|
90
|
-
readonly import?: boolean;
|
|
91
|
-
readonly refreshMaterializedView?: boolean;
|
|
92
|
-
};
|
|
93
|
-
interface BaseRolePermissions {
|
|
94
|
-
readonly inherits?: readonly string[];
|
|
95
|
-
readonly implicit?: boolean;
|
|
96
|
-
readonly tenant?: TenantPermissions;
|
|
97
|
-
readonly system?: SystemPermissions;
|
|
98
|
-
readonly content?: ContentPermissions;
|
|
99
|
-
readonly variables: Acl.Variables;
|
|
100
|
-
readonly stages?: StagesDefinition;
|
|
101
|
-
readonly entities: Permissions;
|
|
102
|
-
readonly debug?: boolean;
|
|
103
|
-
}
|
|
104
|
-
type RolePermissions = BaseRolePermissions & {
|
|
105
|
-
readonly [key: string]: JSONValue;
|
|
106
|
-
};
|
|
107
|
-
type Permissions = {
|
|
108
|
-
readonly [entity: string]: EntityPermissions;
|
|
109
|
-
};
|
|
110
|
-
type Roles = {
|
|
111
|
-
readonly [role: string]: RolePermissions;
|
|
112
|
-
};
|
|
113
|
-
type Variables = {
|
|
114
|
-
readonly [name: string]: Variable;
|
|
115
|
-
};
|
|
116
|
-
type Schema = {
|
|
117
|
-
readonly customPrimary?: boolean;
|
|
118
|
-
readonly roles: Acl.Roles;
|
|
119
|
-
};
|
|
120
|
-
type VariablesMap = {
|
|
121
|
-
readonly [name: string]: Input.Condition;
|
|
122
|
-
};
|
|
123
|
-
interface MembershipVariable {
|
|
124
|
-
readonly name: string;
|
|
125
|
-
readonly values: readonly string[];
|
|
126
|
-
}
|
|
127
|
-
interface Membership {
|
|
128
|
-
readonly role: string;
|
|
129
|
-
readonly variables: readonly MembershipVariable[];
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
//# sourceMappingURL=acl.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acl.d.ts","sourceRoot":"","sources":["../../../src/schema/acl.ts"],"names":[],"mappings":"AAAA,OAAO,EA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,gBAAgB,CAAA;QAClC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAA;QAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KACxB;IAED,KAAY,eAAe,GACxB,mBAAmB,GACnB;QACD,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAI,SAAS,CAAA;KAClC,CAAA;IACF,KAAY,WAAW,GAAG;QACzB,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,iBAAiB,CAAA;KAC5C,CAAA;IAED,KAAY,KAAK,GAAG;QAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,eAAe,CAAA;KAAE,CAAA;IAChE,KAAY,SAAS,GAAG;QAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAA;KAAE,CAAA;IAE7D,KAAY,MAAM,GAAG;QACpB,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAA;QAChC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAA;KACzB,CAAA;IAED,KAAY,YAAY,GAAG;QAC1B,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAA;KACxC,CAAA;IAED,UAAiB,kBAAkB;QAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;QACrB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;KAClC;IAED,UAAiB,UAAU;QAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;QACrB,QAAQ,CAAC,SAAS,EAAE,SAAS,kBAAkB,EAAE,CAAA;KACjD;CACD"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { JSONObject } from './json';
|
|
2
|
-
export declare namespace Actions {
|
|
3
|
-
type SelectionNodeSub = readonly [name: string, args: JSONObject, fields: SelectionNode];
|
|
4
|
-
type SelectionNode = readonly (string | SelectionNodeSub)[];
|
|
5
|
-
type AnyTarget = WebhookTarget;
|
|
6
|
-
type WebhookTarget = {
|
|
7
|
-
readonly type: 'webhook';
|
|
8
|
-
readonly name: string;
|
|
9
|
-
readonly url: string;
|
|
10
|
-
readonly headers?: {
|
|
11
|
-
readonly [key: string]: string;
|
|
12
|
-
};
|
|
13
|
-
readonly body?: JSONObject;
|
|
14
|
-
readonly payloadPath?: readonly string[];
|
|
15
|
-
readonly timeoutMs?: number;
|
|
16
|
-
readonly maxAttempts?: number;
|
|
17
|
-
readonly initialRepeatIntervalMs?: number;
|
|
18
|
-
readonly batchSize?: number;
|
|
19
|
-
};
|
|
20
|
-
type AnyTrigger = BasicTrigger | WatchTrigger;
|
|
21
|
-
type TriggerCommon = {
|
|
22
|
-
readonly name: string;
|
|
23
|
-
readonly selection?: SelectionNode;
|
|
24
|
-
readonly target: string;
|
|
25
|
-
readonly priority?: number;
|
|
26
|
-
};
|
|
27
|
-
type BasicTrigger = TriggerCommon & {
|
|
28
|
-
readonly type: 'basic';
|
|
29
|
-
readonly entity: string;
|
|
30
|
-
readonly create: boolean;
|
|
31
|
-
readonly delete: boolean;
|
|
32
|
-
readonly update: boolean | readonly string[];
|
|
33
|
-
};
|
|
34
|
-
type WatchTrigger = TriggerCommon & {
|
|
35
|
-
readonly type: 'watch';
|
|
36
|
-
readonly entity: string;
|
|
37
|
-
readonly watch: SelectionNode;
|
|
38
|
-
};
|
|
39
|
-
type Schema = {
|
|
40
|
-
readonly triggers: {
|
|
41
|
-
readonly [name: string]: AnyTrigger;
|
|
42
|
-
};
|
|
43
|
-
readonly targets: {
|
|
44
|
-
readonly [name: string]: AnyTarget;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/schema/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAEnC,yBAAiB,OAAO,CAAC;IAC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AAE,OAAO,CAAA;QACxB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;QACxB,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,CAAA;KAC5C,CAAA;IAEF,KAAY,YAAY,GACrB,aAAa,GACb;QACD,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;QACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;QACvB,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAA;KAC7B,CAAA;IAEF,KAAY,MAAM,GAAG;QACpB,QAAQ,CAAC,QAAQ,EAAE;YAClB,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAAA;SACnC,CAAA;QACD,QAAQ,CAAC,OAAO,EAAE;YACjB,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;SAClC,CAAA;KACD,CAAA;CACD"}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { Input } from './input';
|
|
2
|
-
import { JSONObject } from './json';
|
|
3
|
-
export declare namespace ActionsPayload {
|
|
4
|
-
type UpdateEvent = {
|
|
5
|
-
readonly operation: 'update';
|
|
6
|
-
readonly entity: string;
|
|
7
|
-
readonly id: Input.PrimaryValue;
|
|
8
|
-
readonly values: JSONObject;
|
|
9
|
-
readonly old?: JSONObject;
|
|
10
|
-
readonly selection?: JSONObject;
|
|
11
|
-
readonly path?: readonly string[];
|
|
12
|
-
};
|
|
13
|
-
type CreateEvent = {
|
|
14
|
-
readonly operation: 'create';
|
|
15
|
-
readonly entity: string;
|
|
16
|
-
readonly id: Input.PrimaryValue;
|
|
17
|
-
readonly values: JSONObject;
|
|
18
|
-
readonly selection?: JSONObject;
|
|
19
|
-
readonly path?: readonly string[];
|
|
20
|
-
};
|
|
21
|
-
type DeleteEvent = {
|
|
22
|
-
readonly operation: 'delete';
|
|
23
|
-
readonly entity: string;
|
|
24
|
-
readonly id: Input.PrimaryValue;
|
|
25
|
-
readonly selection?: JSONObject;
|
|
26
|
-
readonly path?: readonly string[];
|
|
27
|
-
};
|
|
28
|
-
type JunctionConnectEvent = {
|
|
29
|
-
readonly operation: 'junction_connect';
|
|
30
|
-
readonly entity: string;
|
|
31
|
-
readonly id: Input.PrimaryValue;
|
|
32
|
-
readonly relation: string;
|
|
33
|
-
readonly inverseId: Input.PrimaryValue;
|
|
34
|
-
readonly selection?: JSONObject;
|
|
35
|
-
readonly path?: readonly string[];
|
|
36
|
-
};
|
|
37
|
-
type JunctionDisconnectEvent = {
|
|
38
|
-
readonly operation: 'junction_disconnect';
|
|
39
|
-
readonly entity: string;
|
|
40
|
-
readonly id: Input.PrimaryValue;
|
|
41
|
-
readonly relation: string;
|
|
42
|
-
readonly inverseId: Input.PrimaryValue;
|
|
43
|
-
readonly selection?: JSONObject;
|
|
44
|
-
readonly path?: readonly string[];
|
|
45
|
-
};
|
|
46
|
-
type WatchEventPayload = {
|
|
47
|
-
readonly operation: 'watch';
|
|
48
|
-
readonly trigger: string;
|
|
49
|
-
readonly entity: string;
|
|
50
|
-
readonly id: Input.PrimaryValue;
|
|
51
|
-
readonly events: readonly BaseEventPayload[];
|
|
52
|
-
readonly selection?: JSONObject;
|
|
53
|
-
};
|
|
54
|
-
type BaseEventPayload = CreateEvent | UpdateEvent | DeleteEvent | JunctionConnectEvent | JunctionDisconnectEvent;
|
|
55
|
-
type BasicEventPayload = BaseEventPayload & {
|
|
56
|
-
readonly trigger: string;
|
|
57
|
-
};
|
|
58
|
-
type AnyEventPayload = BasicEventPayload | WatchEventPayload;
|
|
59
|
-
type WebhookMeta = {
|
|
60
|
-
readonly eventId: string;
|
|
61
|
-
readonly transactionId: string;
|
|
62
|
-
readonly createdAt: string;
|
|
63
|
-
readonly lastStateChange: string;
|
|
64
|
-
readonly numRetries: number;
|
|
65
|
-
readonly trigger: string;
|
|
66
|
-
readonly target: string;
|
|
67
|
-
};
|
|
68
|
-
type WebhookEvent = AnyEventPayload & {
|
|
69
|
-
readonly meta: WebhookMeta;
|
|
70
|
-
};
|
|
71
|
-
type WebhookRequestPayload = {
|
|
72
|
-
readonly events: readonly WebhookEvent[];
|
|
73
|
-
};
|
|
74
|
-
type WebhookResponseFailure = {
|
|
75
|
-
readonly eventId: string;
|
|
76
|
-
readonly error?: string;
|
|
77
|
-
};
|
|
78
|
-
type WebhookResponsePayload = {
|
|
79
|
-
readonly failures: readonly WebhookResponseFailure[];
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
//# sourceMappingURL=actionsPayload.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"actionsPayload.d.ts","sourceRoot":"","sources":["../../../src/schema/actionsPayload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAEnC,yBAAiB,cAAc,CAAC;IAC/B,KAAY,WAAW,GAAG;QACzB,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAA;QAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;QACvB,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC,YAAY,CAAA;QAC/B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;QAC3B,QAAQ,CAAC,GAAG,CAAC,EAAE,UAAU,CAAA;QACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,UAAU,CAAA;QAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;KACjC,CAAA;IAED,KAAY,WAAW,GAAG;QACzB,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAA;QAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;QACvB,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC,YAAY,CAAA;QAC/B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;QAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,UAAU,CAAA;QAC/B,QAAQ,CAAC,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D"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from './acl';
|
|
2
|
-
export * from './actions';
|
|
3
|
-
export * from './actionsPayload';
|
|
4
|
-
export * from './input';
|
|
5
|
-
export * from './json';
|
|
6
|
-
export * from './model';
|
|
7
|
-
export * from './result';
|
|
8
|
-
export * from './settings';
|
|
9
|
-
export * from './validation';
|
|
10
|
-
export * from './value';
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schema/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,cAAc,WAAW,CAAA;AACzB,cAAc,kBAAkB,CAAA;AAChC,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA"}
|