@osdk/maker 0.10.0-beta.13 → 0.10.0-beta.14
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/CHANGELOG.md +11 -0
- package/build/browser/api/defineObject.js +4 -0
- package/build/browser/api/defineObject.js.map +1 -1
- package/build/browser/api/defineOntology.js +38 -14
- package/build/browser/api/defineOntology.js.map +1 -1
- package/build/browser/api/overall.test.js +383 -0
- package/build/browser/api/overall.test.js.map +1 -1
- package/build/browser/api/types.js.map +1 -1
- package/build/browser/cli/main.js +1 -1
- package/build/cjs/index.cjs +62 -35
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +11 -1
- package/build/esm/api/defineObject.js +4 -0
- package/build/esm/api/defineObject.js.map +1 -1
- package/build/esm/api/defineOntology.js +38 -14
- package/build/esm/api/defineOntology.js.map +1 -1
- package/build/esm/api/overall.test.js +383 -0
- package/build/esm/api/overall.test.js.map +1 -1
- package/build/esm/api/types.js.map +1 -1
- package/build/esm/cli/main.js +1 -1
- package/build/types/api/defineObject.d.ts.map +1 -1
- package/build/types/api/defineOntology.d.ts.map +1 -1
- package/build/types/api/types.d.ts +11 -1
- package/build/types/api/types.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["types.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ApiNameValueTypeReference,\n BaseType,\n DataConstraint,\n ExampleValue,\n FailureMessage,\n ImportedTypes,\n InterfaceTypeStatus,\n InterfaceTypeStatus_active,\n InterfaceTypeStatus_deprecated,\n InterfaceTypeStatus_experimental,\n LinkTypeDisplayMetadata,\n LinkTypeMetadata,\n OntologyIrInterfaceType,\n OntologyIrLinkTypeStatus,\n OntologyIrObjectType,\n OntologyIrPropertyType,\n SharedPropertyTypeGothamMapping,\n StructFieldType,\n ValueTypeApiName,\n ValueTypeDataConstraint,\n ValueTypeDisplayMetadata,\n ValueTypeStatus,\n ValueTypeVersion,\n Visibility,\n} from \"@osdk/client.unstable\";\n\nimport type { OntologyFullMetadata } from \"@osdk/foundry.ontologies\";\nimport type { BlueprintIcon } from \"./iconNames.js\";\n\nexport interface Ontology extends\n Omit<\n OntologyFullMetadata,\n \"ontology\" | \"sharedPropertyTypes\" | \"interfaceTypes\" | \"objectTypes\"\n >\n{\n interfaceTypes: Record<string, InterfaceType>;\n sharedPropertyTypes: Record<string, SharedPropertyType>;\n objectTypes: Record<string, ObjectType>;\n valueTypes: Record<string, ValueTypeDefinitionVersion[]>;\n linkTypes: Record<string, LinkTypeDefinition>;\n importedTypes: ImportedTypes;\n}\nexport type {\n InterfaceTypeStatus,\n InterfaceTypeStatus_active,\n InterfaceTypeStatus_deprecated,\n InterfaceTypeStatus_experimental,\n};\n\nexport type RequiredFields<T, K extends keyof T> = T & Required<Pick<T, K>>;\nexport type OptionalFields<T, K extends keyof T> =\n & Pick<Partial<T>, K>\n & Omit<T, K>;\n\nexport interface ObjectTypeInner extends\n Omit<\n OntologyIrObjectType,\n | \"titlePropertyTypeRid\"\n | \"propertyTypes\"\n | \"allImplementsInterfaces\"\n | \"implementsInterfaces2\"\n | \"displayMetadata\"\n >\n{\n properties: Array<ObjectPropertyType>;\n titlePropertyApiName: string;\n implementsInterfaces: Array<InterfaceImplementation>;\n description: string | undefined;\n icon: { locator: BlueprintIcon; color: string } | undefined;\n displayName: string;\n pluralDisplayName: string;\n visibility: Visibility;\n editsEnabled: boolean;\n}\n\nexport type InterfaceImplementation = {\n implements: InterfaceType;\n propertyMapping: { interfaceProperty: string; mapsTo: string }[];\n};\n\nexport type ObjectType = RequiredFields<\n Partial<ObjectTypeInner>,\n | \"apiName\"\n | \"primaryKeys\"\n | \"displayName\"\n | \"pluralDisplayName\"\n | \"titlePropertyApiName\"\n>;\n\nexport interface ObjectPropertyTypeInner extends\n Omit<\n OntologyIrPropertyType,\n | \"sharedPropertyTypeApiName\"\n | \"type\"\n | \"inlineAction\"\n | \"sharedPropertyTypeRid\"\n | \"valueType\"\n | \"ruleSetBinding\"\n | \"displayMetadata\"\n >\n{\n type: PropertyTypeType;\n array?: boolean;\n valueType: string | ValueTypeDefinitionVersion;\n sharedPropertyType: SharedPropertyType;\n description: string | undefined;\n displayName: string;\n visibility: Visibility;\n}\n\nexport type ObjectPropertyType = RequiredFields<\n Partial<ObjectPropertyTypeInner>,\n \"apiName\" | \"type\" | \"displayName\"\n>;\n\nexport interface InterfacePropertyType {\n sharedPropertyType: SharedPropertyType;\n required: boolean;\n}\nexport interface InterfaceType extends\n Omit<\n OntologyIrInterfaceType,\n // we want our simplified representation\n | \"properties\"\n // these things don't need to exist as the system works fine without them (I'm told)\n | \"allProperties\"\n | \"allLinks\"\n | \"allExtendsInterfaces\"\n | \"propertiesV2\"\n | \"allPropertiesV2\"\n >\n{\n propertiesV2: Record<string, InterfacePropertyType>;\n status: InterfaceTypeStatus;\n}\n\nexport interface PropertyType {\n type: PropertyTypeType;\n array?: boolean;\n description?: string;\n displayName?: string;\n valueType?: ApiNameValueTypeReference;\n typeClasses?: TypeClass[];\n}\n\ntype TypeClass = { kind: string; name: string };\n\nexport interface SharedPropertyType extends PropertyType {\n apiName: string;\n nonNameSpacedApiName: string;\n gothamMapping?: SharedPropertyTypeGothamMapping;\n}\n\nexport type PropertyTypeType =\n | PropertyTypeTypesWithoutStruct\n | {\n type: \"struct\";\n structDefinition: {\n [api_name: string]:\n | StructPropertyType\n | Exclude<PropertyTypeTypesWithoutStruct, MarkingPropertyType>;\n };\n };\n\nexport type PropertyTypeTypesWithoutStruct =\n | \"boolean\"\n | \"byte\"\n | \"date\"\n | \"decimal\"\n | \"double\"\n | \"float\"\n | \"geopoint\"\n | \"geoshape\"\n | \"integer\"\n | \"long\"\n | MarkingPropertyType\n | \"short\"\n | \"string\"\n | \"timestamp\"\n | \"mediaReference\";\n\ntype MarkingPropertyType = {\n type: \"marking\";\n markingType: \"MANDATORY\" | \"CBAC\";\n};\n\ntype Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;\n\nexport interface StructPropertyType extends\n Optional<\n Omit<\n StructFieldType,\n \"fieldType\" | \"structFieldRid\" | \"apiName\"\n >,\n \"typeClasses\" | \"aliases\"\n >\n{\n fieldType: PropertyTypeTypesWithoutStruct;\n}\n\nexport type ObjectTypePropertyApiName = string;\nexport type LinkTypeId = string;\n\nexport type LinkTypeDefinition =\n | OneToManyLinkTypeDefinition\n | ManyToManyLinkTypeDefinition;\n\nexport interface OneToManyLinkTypeDefinition {\n id: LinkTypeId;\n one: OneToManyObjectLinkReference;\n toMany: OneToManyObjectLinkReference;\n manyForeignKeyProperty: ObjectTypePropertyApiName;\n cardinality: \"OneToMany\" | \"OneToOne\" | undefined;\n editsEnabled?: boolean;\n status?: OntologyIrLinkTypeStatus;\n redacted?: boolean;\n}\n\nexport interface OneToManyObjectLinkReference {\n object: ObjectType;\n metadata: LinkTypeMetadata;\n}\n\nexport interface ManyToManyLinkTypeDefinition {\n id: LinkTypeId;\n many: ManyToManyObjectLinkReference;\n toMany: ManyToManyObjectLinkReference;\n editsEnabled?: boolean;\n status?: OntologyIrLinkTypeStatus;\n redacted?: boolean;\n}\n\nexport interface ManyToManyObjectLinkReference {\n object: ObjectType;\n metadata: LinkTypeMetadata;\n}\n\nexport type LinkSideMetadata = OptionalFields<\n RequiredFields<\n Omit<LinkTypeMetadata, \"displayMetadata\"> & LinkTypeDisplayMetadata,\n \"apiName\"\n >,\n \"visibility\" | \"typeClasses\"\n>;\nexport interface ValueTypeType_array {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"array\" }>[\"array\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"array\";\n value: {\n type: \"array\";\n elementType: ValueTypeType[\"value\"];\n };\n}\n\nexport interface ValueTypeType_boolean {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"boolean\" }>[\"boolean\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"boolean\";\n value: \"boolean\";\n}\n\nexport interface ValueTypeType_binary {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"binary\" }>[\"binary\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"binary\";\n value: \"binary\";\n}\n\nexport interface ValueTypeType_byte {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"byte\" }>[\"byte\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"byte\";\n value: \"byte\";\n}\n\nexport interface ValueTypeType_date {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"date\" }>[\"date\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"date\";\n value: \"date\";\n}\n\nexport interface ValueTypeType_decimal {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"decimal\" }>[\"decimal\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"decimal\";\n value: \"decimal\";\n}\n\nexport interface ValueTypeType_double {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"double\" }>[\"double\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"double\";\n value: \"double\";\n}\n\nexport interface ValueTypeType_float {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"float\" }>[\"float\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"float\";\n value: \"float\";\n}\n\nexport interface ValueTypeType_integer {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"integer\" }>[\"integer\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"integer\";\n value: \"integer\";\n}\n\nexport interface ValueTypeType_long {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"long\" }>[\"long\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"long\";\n value: \"long\";\n}\n\nexport interface ValueTypeType_map {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"map\" }>[\"map\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"map\";\n value: {\n type: \"map\";\n keyType: ValueTypeType[\"value\"];\n valueType: ValueTypeType[\"value\"];\n };\n}\n\nexport interface ValueTypeType_optional {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"optional\" }>[\"optional\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"optional\";\n value: {\n type: \"optional\";\n wrappedType: ValueTypeType[\"value\"];\n };\n}\n\nexport interface ValueTypeType_short {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"short\" }>[\"short\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"short\";\n value: \"short\";\n}\n\nexport interface ValueTypeType_string {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"string\" }>[\"string\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"string\";\n value: \"string\";\n}\n\nexport interface ValueTypeType_structV2 {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"structV2\" }>[\"structV2\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"structV2\";\n value: {\n type: \"struct\";\n fields: Array<{\n identifier: string;\n baseType: ValueTypeType[\"value\"];\n }>;\n };\n}\nexport interface ValueTypeType_timestamp {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"timestamp\" }>[\"timestamp\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"timestamp\";\n value: \"timestamp\";\n}\n\nexport type ValueTypeType =\n | ValueTypeType_array\n | ValueTypeType_boolean\n | ValueTypeType_binary\n | ValueTypeType_byte\n | ValueTypeType_date\n | ValueTypeType_decimal\n | ValueTypeType_double\n | ValueTypeType_float\n | ValueTypeType_integer\n | ValueTypeType_long\n | ValueTypeType_map\n | ValueTypeType_optional\n | ValueTypeType_short\n | ValueTypeType_string\n | ValueTypeType_structV2\n | ValueTypeType_timestamp;\n\nexport type ValueTypeDefinitionVersion = {\n apiName: ValueTypeApiName;\n displayMetadata: ValueTypeDisplayMetadata;\n status: ValueTypeStatus;\n version: ValueTypeVersion;\n baseType: BaseType;\n constraints: ValueTypeDataConstraint[];\n exampleValues: ExampleValue[];\n};\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["types.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ApiNameValueTypeReference,\n BaseType,\n DataConstraint,\n ExampleValue,\n FailureMessage,\n ImportedTypes,\n InterfaceTypeStatus,\n InterfaceTypeStatus_active,\n InterfaceTypeStatus_deprecated,\n InterfaceTypeStatus_experimental,\n LinkTypeDisplayMetadata,\n LinkTypeMetadata,\n OntologyIrInterfaceType,\n OntologyIrLinkTypeStatus,\n OntologyIrObjectType,\n OntologyIrPropertyType,\n SharedPropertyTypeGothamMapping,\n StructFieldType,\n ValueTypeApiName,\n ValueTypeDataConstraint,\n ValueTypeDisplayMetadata,\n ValueTypeStatus,\n ValueTypeVersion,\n Visibility,\n} from \"@osdk/client.unstable\";\n\nimport type { OntologyFullMetadata } from \"@osdk/foundry.ontologies\";\nimport type { BlueprintIcon } from \"./iconNames.js\";\n\nexport interface Ontology extends\n Omit<\n OntologyFullMetadata,\n \"ontology\" | \"sharedPropertyTypes\" | \"interfaceTypes\" | \"objectTypes\"\n >\n{\n interfaceTypes: Record<string, InterfaceType>;\n sharedPropertyTypes: Record<string, SharedPropertyType>;\n objectTypes: Record<string, ObjectType>;\n valueTypes: Record<string, ValueTypeDefinitionVersion[]>;\n linkTypes: Record<string, LinkTypeDefinition>;\n importedTypes: ImportedTypes;\n}\nexport type {\n InterfaceTypeStatus,\n InterfaceTypeStatus_active,\n InterfaceTypeStatus_deprecated,\n InterfaceTypeStatus_experimental,\n};\n\nexport type RequiredFields<T, K extends keyof T> = T & Required<Pick<T, K>>;\nexport type OptionalFields<T, K extends keyof T> =\n & Pick<Partial<T>, K>\n & Omit<T, K>;\n\nexport interface ObjectTypeInner extends\n Omit<\n OntologyIrObjectType,\n | \"titlePropertyTypeRid\"\n | \"propertyTypes\"\n | \"allImplementsInterfaces\"\n | \"implementsInterfaces2\"\n | \"displayMetadata\"\n >\n{\n properties: Array<ObjectPropertyType>;\n titlePropertyApiName: string;\n implementsInterfaces: Array<InterfaceImplementation>;\n description: string | undefined;\n icon: { locator: BlueprintIcon; color: string } | undefined;\n displayName: string;\n pluralDisplayName: string;\n visibility: Visibility;\n editsEnabled: boolean;\n}\n\nexport type InterfaceImplementation = {\n implements: InterfaceType;\n propertyMapping: { interfaceProperty: string; mapsTo: string }[];\n};\n\nexport type ObjectType =\n & RequiredFields<\n Partial<ObjectTypeInner>,\n | \"apiName\"\n | \"primaryKeys\"\n | \"displayName\"\n | \"pluralDisplayName\"\n | \"titlePropertyApiName\"\n >\n & {\n datasource?: ObjectTypeDatasourceDefinition;\n };\n\nexport interface ObjectPropertyTypeInner extends\n Omit<\n OntologyIrPropertyType,\n | \"sharedPropertyTypeApiName\"\n | \"type\"\n | \"inlineAction\"\n | \"sharedPropertyTypeRid\"\n | \"valueType\"\n | \"ruleSetBinding\"\n | \"displayMetadata\"\n >\n{\n type: PropertyTypeType;\n array?: boolean;\n valueType: string | ValueTypeDefinitionVersion;\n sharedPropertyType: SharedPropertyType;\n description: string | undefined;\n displayName: string;\n visibility: Visibility;\n}\n\nexport type ObjectPropertyType = RequiredFields<\n Partial<ObjectPropertyTypeInner>,\n \"apiName\" | \"type\" | \"displayName\"\n>;\n\nexport interface InterfacePropertyType {\n sharedPropertyType: SharedPropertyType;\n required: boolean;\n}\nexport interface InterfaceType extends\n Omit<\n OntologyIrInterfaceType,\n // we want our simplified representation\n | \"properties\"\n // these things don't need to exist as the system works fine without them (I'm told)\n | \"allProperties\"\n | \"allLinks\"\n | \"allExtendsInterfaces\"\n | \"propertiesV2\"\n | \"allPropertiesV2\"\n >\n{\n propertiesV2: Record<string, InterfacePropertyType>;\n status: InterfaceTypeStatus;\n}\n\nexport interface PropertyType {\n type: PropertyTypeType;\n array?: boolean;\n description?: string;\n displayName?: string;\n valueType?: ApiNameValueTypeReference;\n typeClasses?: TypeClass[];\n}\n\ntype TypeClass = { kind: string; name: string };\n\nexport interface SharedPropertyType extends PropertyType {\n apiName: string;\n nonNameSpacedApiName: string;\n gothamMapping?: SharedPropertyTypeGothamMapping;\n}\n\nexport type PropertyTypeType =\n | PropertyTypeTypesWithoutStruct\n | {\n type: \"struct\";\n structDefinition: {\n [api_name: string]:\n | StructPropertyType\n | Exclude<PropertyTypeTypesWithoutStruct, MarkingPropertyType>;\n };\n };\n\nexport type PropertyTypeTypesWithoutStruct =\n | \"boolean\"\n | \"byte\"\n | \"date\"\n | \"decimal\"\n | \"double\"\n | \"float\"\n | \"geopoint\"\n | \"geoshape\"\n | \"integer\"\n | \"long\"\n | MarkingPropertyType\n | \"short\"\n | \"string\"\n | \"timestamp\"\n | \"mediaReference\";\n\ntype MarkingPropertyType = {\n type: \"marking\";\n markingType: \"MANDATORY\" | \"CBAC\";\n};\n\ntype Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;\n\nexport interface StructPropertyType extends\n Optional<\n Omit<\n StructFieldType,\n \"fieldType\" | \"structFieldRid\" | \"apiName\"\n >,\n \"typeClasses\" | \"aliases\"\n >\n{\n fieldType: PropertyTypeTypesWithoutStruct;\n}\n\nexport type ObjectTypePropertyApiName = string;\nexport type LinkTypeId = string;\n\nexport type LinkTypeDefinition =\n | OneToManyLinkTypeDefinition\n | ManyToManyLinkTypeDefinition;\n\nexport interface OneToManyLinkTypeDefinition {\n id: LinkTypeId;\n one: OneToManyObjectLinkReference;\n toMany: OneToManyObjectLinkReference;\n manyForeignKeyProperty: ObjectTypePropertyApiName;\n cardinality: \"OneToMany\" | \"OneToOne\" | undefined;\n editsEnabled?: boolean;\n status?: OntologyIrLinkTypeStatus;\n redacted?: boolean;\n}\n\nexport interface OneToManyObjectLinkReference {\n object: ObjectType;\n metadata: LinkTypeMetadata;\n}\n\nexport interface ManyToManyLinkTypeDefinition {\n id: LinkTypeId;\n many: ManyToManyObjectLinkReference;\n toMany: ManyToManyObjectLinkReference;\n editsEnabled?: boolean;\n status?: OntologyIrLinkTypeStatus;\n redacted?: boolean;\n}\n\nexport interface ManyToManyObjectLinkReference {\n object: ObjectType;\n metadata: LinkTypeMetadata;\n}\n\nexport type LinkSideMetadata = OptionalFields<\n RequiredFields<\n Omit<LinkTypeMetadata, \"displayMetadata\"> & LinkTypeDisplayMetadata,\n \"apiName\"\n >,\n \"visibility\" | \"typeClasses\"\n>;\nexport interface ValueTypeType_array {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"array\" }>[\"array\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"array\";\n value: {\n type: \"array\";\n elementType: ValueTypeType[\"value\"];\n };\n}\n\nexport interface ValueTypeType_boolean {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"boolean\" }>[\"boolean\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"boolean\";\n value: \"boolean\";\n}\n\nexport interface ValueTypeType_binary {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"binary\" }>[\"binary\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"binary\";\n value: \"binary\";\n}\n\nexport interface ValueTypeType_byte {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"byte\" }>[\"byte\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"byte\";\n value: \"byte\";\n}\n\nexport interface ValueTypeType_date {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"date\" }>[\"date\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"date\";\n value: \"date\";\n}\n\nexport interface ValueTypeType_decimal {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"decimal\" }>[\"decimal\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"decimal\";\n value: \"decimal\";\n}\n\nexport interface ValueTypeType_double {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"double\" }>[\"double\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"double\";\n value: \"double\";\n}\n\nexport interface ValueTypeType_float {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"float\" }>[\"float\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"float\";\n value: \"float\";\n}\n\nexport interface ValueTypeType_integer {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"integer\" }>[\"integer\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"integer\";\n value: \"integer\";\n}\n\nexport interface ValueTypeType_long {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"long\" }>[\"long\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"long\";\n value: \"long\";\n}\n\nexport interface ValueTypeType_map {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"map\" }>[\"map\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"map\";\n value: {\n type: \"map\";\n keyType: ValueTypeType[\"value\"];\n valueType: ValueTypeType[\"value\"];\n };\n}\n\nexport interface ValueTypeType_optional {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"optional\" }>[\"optional\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"optional\";\n value: {\n type: \"optional\";\n wrappedType: ValueTypeType[\"value\"];\n };\n}\n\nexport interface ValueTypeType_short {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"short\" }>[\"short\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"short\";\n value: \"short\";\n}\n\nexport interface ValueTypeType_string {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"string\" }>[\"string\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"string\";\n value: \"string\";\n}\n\nexport interface ValueTypeType_structV2 {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"structV2\" }>[\"structV2\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"structV2\";\n value: {\n type: \"struct\";\n fields: Array<{\n identifier: string;\n baseType: ValueTypeType[\"value\"];\n }>;\n };\n}\nexport interface ValueTypeType_timestamp {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"timestamp\" }>[\"timestamp\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"timestamp\";\n value: \"timestamp\";\n}\n\nexport type ValueTypeType =\n | ValueTypeType_array\n | ValueTypeType_boolean\n | ValueTypeType_binary\n | ValueTypeType_byte\n | ValueTypeType_date\n | ValueTypeType_decimal\n | ValueTypeType_double\n | ValueTypeType_float\n | ValueTypeType_integer\n | ValueTypeType_long\n | ValueTypeType_map\n | ValueTypeType_optional\n | ValueTypeType_short\n | ValueTypeType_string\n | ValueTypeType_structV2\n | ValueTypeType_timestamp;\n\nexport type ValueTypeDefinitionVersion = {\n apiName: ValueTypeApiName;\n displayMetadata: ValueTypeDisplayMetadata;\n status: ValueTypeStatus;\n version: ValueTypeVersion;\n baseType: BaseType;\n constraints: ValueTypeDataConstraint[];\n exampleValues: ExampleValue[];\n};\n\nexport interface ObjectTypeDatasourceDefinition_dataset {\n type: \"dataset\";\n}\n\nexport interface ObjectTypeDatasourceDefinition_stream {\n type: \"stream\";\n // Retention period must be in ISO 8601 duration format\n retentionPeriod?: string;\n}\n\nexport type ObjectTypeDatasourceDefinition =\n | ObjectTypeDatasourceDefinition_stream\n | ObjectTypeDatasourceDefinition_dataset;\n"],"mappings":"","ignoreList":[]}
|
package/build/esm/cli/main.js
CHANGED
|
@@ -26,7 +26,7 @@ import { defineOntology } from "../api/defineOntology.js";
|
|
|
26
26
|
import { defineSharedPropertyType } from "../api/defineSpt.js";
|
|
27
27
|
const apiNamespaceRegex = /^[a-z0-9-]+(\.[a-z0-9-]+)*\.$/;
|
|
28
28
|
export default async function main(args = process.argv) {
|
|
29
|
-
const commandLineOpts = await yargs(hideBin(args)).version("0.10.0-beta.
|
|
29
|
+
const commandLineOpts = await yargs(hideBin(args)).version("0.10.0-beta.14" ?? "").wrap(Math.min(150, yargs().terminalWidth())).strict().help().options({
|
|
30
30
|
input: {
|
|
31
31
|
alias: "i",
|
|
32
32
|
describe: "Input file",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAkBA,cAEE,kBAEK,YAAa;
|
|
1
|
+
{"mappings":"AAkBA,cAEE,kBAEK,YAAa;AAMpB,OAAO,iBAAS,aAAaA,WAAW,aAAa","names":["objectDef: ObjectType"],"sources":["../../../src/api/defineObject.ts"],"version":3,"file":"defineObject.d.ts"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgCA,cACE,
|
|
1
|
+
{"mappings":"AAgCA,cACE,YAcA,oCAGK,uBAAwB;KAiB1B,0BAA0B;CAC7B,UAAU;CACV,WAAW;AACZ;AAED,OAAO,iBAAe,eACpBA,YACAC,mBAAmB,gBAClB,QAAQ;AA6VX,OAAO,iBAAS,4BAA4B;AAI5C,OAAO,iBAAS,yBAAyB","names":["ns: string","body: () => void | Promise<void>"],"sources":["../../../src/api/defineOntology.ts"],"version":3,"file":"defineOntology.d.ts"}
|
|
@@ -39,7 +39,9 @@ export type InterfaceImplementation = {
|
|
|
39
39
|
mapsTo: string
|
|
40
40
|
}[]
|
|
41
41
|
};
|
|
42
|
-
export type ObjectType = RequiredFields<Partial<ObjectTypeInner>, "apiName" | "primaryKeys" | "displayName" | "pluralDisplayName" | "titlePropertyApiName"
|
|
42
|
+
export type ObjectType = RequiredFields<Partial<ObjectTypeInner>, "apiName" | "primaryKeys" | "displayName" | "pluralDisplayName" | "titlePropertyApiName"> & {
|
|
43
|
+
datasource?: ObjectTypeDatasourceDefinition
|
|
44
|
+
};
|
|
43
45
|
export interface ObjectPropertyTypeInner extends Omit<OntologyIrPropertyType, "sharedPropertyTypeApiName" | "type" | "inlineAction" | "sharedPropertyTypeRid" | "valueType" | "ruleSetBinding" | "displayMetadata"> {
|
|
44
46
|
type: PropertyTypeType;
|
|
45
47
|
array?: boolean;
|
|
@@ -309,3 +311,11 @@ export type ValueTypeDefinitionVersion = {
|
|
|
309
311
|
constraints: ValueTypeDataConstraint[]
|
|
310
312
|
exampleValues: ExampleValue[]
|
|
311
313
|
};
|
|
314
|
+
export interface ObjectTypeDatasourceDefinition_dataset {
|
|
315
|
+
type: "dataset";
|
|
316
|
+
}
|
|
317
|
+
export interface ObjectTypeDatasourceDefinition_stream {
|
|
318
|
+
type: "stream";
|
|
319
|
+
retentionPeriod?: string;
|
|
320
|
+
}
|
|
321
|
+
export type ObjectTypeDatasourceDefinition = ObjectTypeDatasourceDefinition_stream | ObjectTypeDatasourceDefinition_dataset;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cACE,2BACA,UACA,gBACA,cACA,gBACA,eACA,qBACA,4BACA,gCACA,kCACA,yBACA,kBACA,yBACA,0BACA,sBACA,wBACA,iCACA,iBACA,kBACA,yBACA,0BACA,iBACA,kBACA,kBACK,uBAAwB;AAE/B,cAAc,4BAA4B,0BAA2B;AACrE,cAAc,qBAAqB,gBAAiB;AAEpD,iBAAiB,iBACf,KACE,sBACA,aAAa,wBAAwB,mBAAmB,eAE5D;CACE,gBAAgB,eAAe;CAC/B,qBAAqB,eAAe;CACpC,aAAa,eAAe;CAC5B,YAAY,eAAe;CAC3B,WAAW,eAAe;CAC1B,eAAe;AAChB;AACD,eACE,qBACA,4BACA,gCACA;AAGF,YAAY;CAAe;CAAG,gBAAgB;IAAK,IAAI,SAAS,KAAK,GAAG;AACxE,YAAY;CAAe;CAAG,gBAAgB;IAC1C,KAAK,QAAQ,IAAI,KACjB,KAAK,GAAG;AAEZ,iBAAiB,wBACf,KACE,sBACE,yBACA,kBACA,4BACA,0BACA,mBAEN;CACE,YA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;CACV,aAAa;CACb,eAAe;AAChB;AAED,iBAAiB,uCAAuC;CACtD,MAAM;AACP;AAED,iBAAiB,sCAAsC;CACrD,MAAM;CAEN;AACD;AAED,YAAY,iCACR,wCACA","names":[],"sources":["../../../src/api/types.ts"],"version":3,"file":"types.d.ts"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/maker",
|
|
3
|
-
"version": "0.10.0-beta.
|
|
3
|
+
"version": "0.10.0-beta.14",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"tiny-invariant": "^1.3.3",
|
|
33
33
|
"ts-node": "^10.9.2",
|
|
34
34
|
"yargs": "^17.7.2",
|
|
35
|
-
"@osdk/api": "~2.2.0-beta.
|
|
35
|
+
"@osdk/api": "~2.2.0-beta.14"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@osdk/foundry.ontologies": "2.16.0",
|
|
39
39
|
"@types/yargs": "^17.0.32",
|
|
40
40
|
"typescript": "~5.5.4",
|
|
41
41
|
"vitest": "^3.0.5",
|
|
42
|
-
"@osdk/client.unstable": "~2.2.0-beta.
|
|
42
|
+
"@osdk/client.unstable": "~2.2.0-beta.14",
|
|
43
43
|
"@osdk/monorepo.tsconfig": "~0.1.0-beta.1",
|
|
44
44
|
"@osdk/monorepo.api-extractor": "~0.1.0-beta.1"
|
|
45
45
|
},
|