@osdk/maker 0.14.0-beta.2 → 0.14.0-beta.4

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.
Files changed (120) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/build/browser/api/defineAction.js +121 -413
  3. package/build/browser/api/defineAction.js.map +1 -1
  4. package/build/browser/api/defineCreateInterfaceObjectAction.js +69 -0
  5. package/build/browser/api/defineCreateInterfaceObjectAction.js.map +1 -0
  6. package/build/browser/api/defineCreateObjectAction.js +76 -0
  7. package/build/browser/api/defineCreateObjectAction.js.map +1 -0
  8. package/build/browser/api/defineCreateOrModifyObjectAction.js +92 -0
  9. package/build/browser/api/defineCreateOrModifyObjectAction.js.map +1 -0
  10. package/build/browser/api/defineDeleteObjectAction.js +56 -0
  11. package/build/browser/api/defineDeleteObjectAction.js.map +1 -0
  12. package/build/browser/api/defineModifyInterfaceObjectAction.js +68 -0
  13. package/build/browser/api/defineModifyInterfaceObjectAction.js.map +1 -0
  14. package/build/browser/api/defineModifyObjectAction.js +91 -0
  15. package/build/browser/api/defineModifyObjectAction.js.map +1 -0
  16. package/build/browser/api/test/actions.test.js +12014 -0
  17. package/build/browser/api/test/actions.test.js.map +1 -0
  18. package/build/browser/api/test/interfaces.test.js +924 -0
  19. package/build/browser/api/test/interfaces.test.js.map +1 -0
  20. package/build/browser/api/test/links.test.js +1974 -0
  21. package/build/browser/api/test/links.test.js.map +1 -0
  22. package/build/browser/api/{markingconstraint.test.js → test/markingconstraint.test.js} +28 -2
  23. package/build/browser/api/test/markingconstraint.test.js.map +1 -0
  24. package/build/browser/api/test/misc.test.js +1058 -0
  25. package/build/browser/api/test/misc.test.js.map +1 -0
  26. package/build/browser/api/{objectStatus.test.js → test/objectStatus.test.js} +2 -2
  27. package/build/browser/api/test/objectStatus.test.js.map +1 -0
  28. package/build/browser/api/test/objects.test.js +1494 -0
  29. package/build/browser/api/test/objects.test.js.map +1 -0
  30. package/build/browser/api/test/spt.test.js +387 -0
  31. package/build/browser/api/test/spt.test.js.map +1 -0
  32. package/build/browser/api/test/valueTypes.test.js +156 -0
  33. package/build/browser/api/test/valueTypes.test.js.map +1 -0
  34. package/build/browser/cli/main.js +1 -1
  35. package/build/browser/index.js +7 -1
  36. package/build/browser/index.js.map +1 -1
  37. package/build/cjs/index.cjs +561 -503
  38. package/build/cjs/index.cjs.map +1 -1
  39. package/build/cjs/index.d.cts +27 -13
  40. package/build/esm/api/defineAction.js +121 -413
  41. package/build/esm/api/defineAction.js.map +1 -1
  42. package/build/esm/api/defineCreateInterfaceObjectAction.js +69 -0
  43. package/build/esm/api/defineCreateInterfaceObjectAction.js.map +1 -0
  44. package/build/esm/api/defineCreateObjectAction.js +76 -0
  45. package/build/esm/api/defineCreateObjectAction.js.map +1 -0
  46. package/build/esm/api/defineCreateOrModifyObjectAction.js +92 -0
  47. package/build/esm/api/defineCreateOrModifyObjectAction.js.map +1 -0
  48. package/build/esm/api/defineDeleteObjectAction.js +56 -0
  49. package/build/esm/api/defineDeleteObjectAction.js.map +1 -0
  50. package/build/esm/api/defineModifyInterfaceObjectAction.js +68 -0
  51. package/build/esm/api/defineModifyInterfaceObjectAction.js.map +1 -0
  52. package/build/esm/api/defineModifyObjectAction.js +91 -0
  53. package/build/esm/api/defineModifyObjectAction.js.map +1 -0
  54. package/build/esm/api/test/actions.test.js +12014 -0
  55. package/build/esm/api/test/actions.test.js.map +1 -0
  56. package/build/esm/api/test/interfaces.test.js +924 -0
  57. package/build/esm/api/test/interfaces.test.js.map +1 -0
  58. package/build/esm/api/test/links.test.js +1974 -0
  59. package/build/esm/api/test/links.test.js.map +1 -0
  60. package/build/esm/api/{markingconstraint.test.js → test/markingconstraint.test.js} +28 -2
  61. package/build/esm/api/test/markingconstraint.test.js.map +1 -0
  62. package/build/esm/api/test/misc.test.js +1058 -0
  63. package/build/esm/api/test/misc.test.js.map +1 -0
  64. package/build/esm/api/{objectStatus.test.js → test/objectStatus.test.js} +2 -2
  65. package/build/esm/api/test/objectStatus.test.js.map +1 -0
  66. package/build/esm/api/test/objects.test.js +1494 -0
  67. package/build/esm/api/test/objects.test.js.map +1 -0
  68. package/build/esm/api/test/spt.test.js +387 -0
  69. package/build/esm/api/test/spt.test.js.map +1 -0
  70. package/build/esm/api/test/valueTypes.test.js +156 -0
  71. package/build/esm/api/test/valueTypes.test.js.map +1 -0
  72. package/build/esm/cli/main.js +1 -1
  73. package/build/esm/index.js +7 -1
  74. package/build/esm/index.js.map +1 -1
  75. package/build/types/api/defineAction.d.ts +22 -6
  76. package/build/types/api/defineAction.d.ts.map +1 -1
  77. package/build/types/api/defineCreateInterfaceObjectAction.d.ts +3 -0
  78. package/build/types/api/defineCreateInterfaceObjectAction.d.ts.map +1 -0
  79. package/build/types/api/defineCreateObjectAction.d.ts +3 -0
  80. package/build/types/api/defineCreateObjectAction.d.ts.map +1 -0
  81. package/build/types/api/defineCreateOrModifyObjectAction.d.ts +3 -0
  82. package/build/types/api/defineCreateOrModifyObjectAction.d.ts.map +1 -0
  83. package/build/types/api/defineDeleteObjectAction.d.ts +3 -0
  84. package/build/types/api/defineDeleteObjectAction.d.ts.map +1 -0
  85. package/build/types/api/defineModifyInterfaceObjectAction.d.ts +3 -0
  86. package/build/types/api/defineModifyInterfaceObjectAction.d.ts.map +1 -0
  87. package/build/types/api/defineModifyObjectAction.d.ts +3 -0
  88. package/build/types/api/defineModifyObjectAction.d.ts.map +1 -0
  89. package/build/types/api/test/actions.test.d.ts.map +1 -0
  90. package/build/types/api/test/interfaces.test.d.ts.map +1 -0
  91. package/build/types/api/test/links.test.d.ts.map +1 -0
  92. package/build/types/api/test/markingconstraint.test.d.ts +1 -0
  93. package/build/types/api/test/markingconstraint.test.d.ts.map +1 -0
  94. package/build/types/api/test/misc.test.d.ts +1 -0
  95. package/build/types/api/test/misc.test.d.ts.map +1 -0
  96. package/build/types/api/test/objectStatus.test.d.ts +1 -0
  97. package/build/types/api/test/objectStatus.test.d.ts.map +1 -0
  98. package/build/types/api/test/objects.test.d.ts +1 -0
  99. package/build/types/api/test/objects.test.d.ts.map +1 -0
  100. package/build/types/api/test/spt.test.d.ts +1 -0
  101. package/build/types/api/test/spt.test.d.ts.map +1 -0
  102. package/build/types/api/test/valueTypes.test.d.ts +1 -0
  103. package/build/types/api/test/valueTypes.test.d.ts.map +1 -0
  104. package/build/types/index.d.ts +7 -1
  105. package/build/types/index.d.ts.map +1 -1
  106. package/package.json +3 -3
  107. package/build/browser/api/markingconstraint.test.js.map +0 -1
  108. package/build/browser/api/objectStatus.test.js.map +0 -1
  109. package/build/browser/api/overall.test.js +0 -14002
  110. package/build/browser/api/overall.test.js.map +0 -1
  111. package/build/esm/api/markingconstraint.test.js.map +0 -1
  112. package/build/esm/api/objectStatus.test.js.map +0 -1
  113. package/build/esm/api/overall.test.js +0 -14002
  114. package/build/esm/api/overall.test.js.map +0 -1
  115. package/build/types/api/markingconstraint.test.d.ts.map +0 -1
  116. package/build/types/api/objectStatus.test.d.ts.map +0 -1
  117. package/build/types/api/overall.test.d.ts.map +0 -1
  118. /package/build/types/api/{markingconstraint.test.d.ts → test/actions.test.d.ts} +0 -0
  119. /package/build/types/api/{objectStatus.test.d.ts → test/interfaces.test.d.ts} +0 -0
  120. /package/build/types/api/{overall.test.d.ts → test/links.test.d.ts} +0 -0
@@ -0,0 +1,156 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { beforeEach, describe, expect, it } from "vitest";
18
+ import { defineObject } from "../defineObject.js";
19
+ import { defineOntology, dumpOntologyFullMetadata, dumpValueTypeWireType } from "../defineOntology.js";
20
+ import { defineValueType } from "../defineValueType.js";
21
+ describe("Value Types", () => {
22
+ beforeEach(async () => {
23
+ await defineOntology("com.palantir.", () => {}, "/tmp/");
24
+ });
25
+ it("Fails to define value type with incorrect semver", () => {
26
+ expect(() => defineValueType({
27
+ apiName: "apiName",
28
+ displayName: "displayName",
29
+ type: {
30
+ "type": "boolean",
31
+ constraints: [{
32
+ constraint: {
33
+ "allowedValues": ["TRUE_VALUE"]
34
+ }
35
+ }]
36
+ },
37
+ version: "not a version"
38
+ })).toThrowErrorMatchingInlineSnapshot("[Error: Invariant failed: Version is not a valid semver]");
39
+ });
40
+ it("Tests convertProperty function with valueType constraints for string", () => {
41
+ const testStringValueType = defineValueType({
42
+ apiName: "stringWithConstraints",
43
+ displayName: "String With Constraints",
44
+ description: "A string type with additional constraints",
45
+ type: {
46
+ "type": "string",
47
+ constraints: [{
48
+ constraint: {
49
+ type: "length",
50
+ length: {
51
+ minSize: 5,
52
+ maxSize: 20
53
+ }
54
+ },
55
+ failureMessage: {
56
+ message: "String must be between 5 and 20 characters"
57
+ }
58
+ }]
59
+ },
60
+ version: "1.0.0"
61
+ });
62
+ defineObject({
63
+ titlePropertyApiName: "constrainedString",
64
+ displayName: "Test Object",
65
+ pluralDisplayName: "Test Objects",
66
+ apiName: "testObject",
67
+ primaryKeyPropertyApiName: "constrainedString",
68
+ properties: {
69
+ "constrainedString": {
70
+ type: "string",
71
+ displayName: "Constrained String",
72
+ valueType: testStringValueType
73
+ }
74
+ }
75
+ });
76
+ const ontology = dumpOntologyFullMetadata();
77
+ const objectPropertyType = ontology.ontology.objectTypes["com.palantir.testObject"].objectType.propertyTypes["constrainedString"];
78
+ expect(objectPropertyType.valueType).toEqual({
79
+ apiName: "stringWithConstraints",
80
+ version: "1.0.0",
81
+ packageNamespace: "com.palantir",
82
+ displayMetadata: {
83
+ displayName: "String With Constraints",
84
+ description: "A string type with additional constraints"
85
+ }
86
+ });
87
+ expect(objectPropertyType.dataConstraints).toBeDefined();
88
+ expect(objectPropertyType.dataConstraints?.propertyTypeConstraints).toHaveLength(1);
89
+ const constraintWrapper = objectPropertyType.dataConstraints?.propertyTypeConstraints[0];
90
+ expect(constraintWrapper?.constraints?.type).toBe("string");
91
+ expect((constraintWrapper?.constraints).string.length.minSize).toBe(5);
92
+ expect((constraintWrapper?.constraints).string.length.maxSize).toBe(20);
93
+ expect(constraintWrapper?.failureMessage?.message).toBe("String must be between 5 and 20 characters");
94
+ });
95
+ it("Correctly serializes a value type", () => {
96
+ defineValueType({
97
+ apiName: "apiName",
98
+ displayName: "displayName",
99
+ type: {
100
+ "type": "boolean",
101
+ constraints: [{
102
+ constraint: {
103
+ "allowedValues": ["TRUE_VALUE"]
104
+ }
105
+ }]
106
+ },
107
+ version: "0.1.0"
108
+ });
109
+ expect(dumpValueTypeWireType()).toMatchInlineSnapshot(`
110
+ {
111
+ "valueTypes": [
112
+ {
113
+ "metadata": {
114
+ "apiName": "apiName",
115
+ "displayMetadata": {
116
+ "description": "",
117
+ "displayName": "displayName",
118
+ },
119
+ "packageNamespace": "com.palantir",
120
+ "status": {
121
+ "active": {},
122
+ "type": "active",
123
+ },
124
+ },
125
+ "versions": [
126
+ {
127
+ "baseType": {
128
+ "boolean": {},
129
+ "type": "boolean",
130
+ },
131
+ "constraints": [
132
+ {
133
+ "constraint": {
134
+ "constraint": {
135
+ "boolean": {
136
+ "allowedValues": [
137
+ "TRUE_VALUE",
138
+ ],
139
+ },
140
+ "type": "boolean",
141
+ },
142
+ "failureMessage": undefined,
143
+ },
144
+ },
145
+ ],
146
+ "exampleValues": [],
147
+ "version": "0.1.0",
148
+ },
149
+ ],
150
+ },
151
+ ],
152
+ }
153
+ `);
154
+ });
155
+ });
156
+ //# sourceMappingURL=valueTypes.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valueTypes.test.js","names":["beforeEach","describe","expect","it","defineObject","defineOntology","dumpOntologyFullMetadata","dumpValueTypeWireType","defineValueType","apiName","displayName","type","constraints","constraint","version","toThrowErrorMatchingInlineSnapshot","testStringValueType","description","length","minSize","maxSize","failureMessage","message","titlePropertyApiName","pluralDisplayName","primaryKeyPropertyApiName","properties","valueType","ontology","objectPropertyType","objectTypes","objectType","propertyTypes","toEqual","packageNamespace","displayMetadata","dataConstraints","toBeDefined","propertyTypeConstraints","toHaveLength","constraintWrapper","toBe","string","toMatchInlineSnapshot"],"sources":["valueTypes.test.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { beforeEach, describe, expect, it } from \"vitest\";\nimport { defineObject } from \"../defineObject.js\";\nimport {\n defineOntology,\n dumpOntologyFullMetadata,\n dumpValueTypeWireType,\n} from \"../defineOntology.js\";\nimport { defineValueType } from \"../defineValueType.js\";\n\ndescribe(\"Value Types\", () => {\n beforeEach(async () => {\n await defineOntology(\"com.palantir.\", () => {}, \"/tmp/\");\n });\n\n it(\"Fails to define value type with incorrect semver\", () => {\n expect(() =>\n defineValueType({\n apiName: \"apiName\",\n displayName: \"displayName\",\n type: {\n \"type\": \"boolean\",\n constraints: [{ constraint: { \"allowedValues\": [\"TRUE_VALUE\"] } }],\n },\n version: \"not a version\",\n })\n ).toThrowErrorMatchingInlineSnapshot(\n \"[Error: Invariant failed: Version is not a valid semver]\",\n );\n });\n\n it(\"Tests convertProperty function with valueType constraints for string\", () => {\n const testStringValueType = defineValueType({\n apiName: \"stringWithConstraints\",\n displayName: \"String With Constraints\",\n description: \"A string type with additional constraints\",\n type: {\n \"type\": \"string\",\n constraints: [\n {\n constraint: {\n type: \"length\",\n length: {\n minSize: 5,\n maxSize: 20,\n },\n },\n failureMessage: {\n message: \"String must be between 5 and 20 characters\",\n },\n },\n ],\n },\n version: \"1.0.0\",\n });\n\n const object = defineObject({\n titlePropertyApiName: \"constrainedString\",\n displayName: \"Test Object\",\n pluralDisplayName: \"Test Objects\",\n apiName: \"testObject\",\n primaryKeyPropertyApiName: \"constrainedString\",\n properties: {\n \"constrainedString\": {\n type: \"string\",\n displayName: \"Constrained String\",\n valueType: testStringValueType,\n },\n },\n });\n\n const ontology = dumpOntologyFullMetadata();\n const objectPropertyType =\n ontology.ontology.objectTypes[\"com.palantir.testObject\"]\n .objectType.propertyTypes[\"constrainedString\"];\n\n expect(objectPropertyType.valueType).toEqual({\n apiName: \"stringWithConstraints\",\n version: \"1.0.0\",\n packageNamespace: \"com.palantir\",\n displayMetadata: {\n displayName: \"String With Constraints\",\n description: \"A string type with additional constraints\",\n },\n });\n\n expect(objectPropertyType.dataConstraints).toBeDefined();\n expect(objectPropertyType.dataConstraints?.propertyTypeConstraints)\n .toHaveLength(1);\n\n const constraintWrapper = objectPropertyType.dataConstraints\n ?.propertyTypeConstraints[0];\n expect(constraintWrapper?.constraints?.type).toBe(\"string\");\n expect(\n (constraintWrapper?.constraints as {\n type: \"string\";\n string: { length: { minSize: number; maxSize: number } };\n }).string.length.minSize,\n ).toBe(5);\n expect(\n (constraintWrapper?.constraints as {\n type: \"string\";\n string: { length: { minSize: number; maxSize: number } };\n }).string.length.maxSize,\n ).toBe(20);\n expect(constraintWrapper?.failureMessage?.message).toBe(\n \"String must be between 5 and 20 characters\",\n );\n });\n\n it(\"Correctly serializes a value type\", () => {\n defineValueType({\n apiName: \"apiName\",\n displayName: \"displayName\",\n type: {\n \"type\": \"boolean\",\n constraints: [{ constraint: { \"allowedValues\": [\"TRUE_VALUE\"] } }],\n },\n version: \"0.1.0\",\n });\n expect(dumpValueTypeWireType()).toMatchInlineSnapshot(`\n {\n \"valueTypes\": [\n {\n \"metadata\": {\n \"apiName\": \"apiName\",\n \"displayMetadata\": {\n \"description\": \"\",\n \"displayName\": \"displayName\",\n },\n \"packageNamespace\": \"com.palantir\",\n \"status\": {\n \"active\": {},\n \"type\": \"active\",\n },\n },\n \"versions\": [\n {\n \"baseType\": {\n \"boolean\": {},\n \"type\": \"boolean\",\n },\n \"constraints\": [\n {\n \"constraint\": {\n \"constraint\": {\n \"boolean\": {\n \"allowedValues\": [\n \"TRUE_VALUE\",\n ],\n },\n \"type\": \"boolean\",\n },\n \"failureMessage\": undefined,\n },\n },\n ],\n \"exampleValues\": [],\n \"version\": \"0.1.0\",\n },\n ],\n },\n ],\n }\n `);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AACzD,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SACEC,cAAc,EACdC,wBAAwB,EACxBC,qBAAqB,QAChB,sBAAsB;AAC7B,SAASC,eAAe,QAAQ,uBAAuB;AAEvDP,QAAQ,CAAC,aAAa,EAAE,MAAM;EAC5BD,UAAU,CAAC,YAAY;IACrB,MAAMK,cAAc,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC;EAC1D,CAAC,CAAC;EAEFF,EAAE,CAAC,kDAAkD,EAAE,MAAM;IAC3DD,MAAM,CAAC,MACLM,eAAe,CAAC;MACdC,OAAO,EAAE,SAAS;MAClBC,WAAW,EAAE,aAAa;MAC1BC,IAAI,EAAE;QACJ,MAAM,EAAE,SAAS;QACjBC,WAAW,EAAE,CAAC;UAAEC,UAAU,EAAE;YAAE,eAAe,EAAE,CAAC,YAAY;UAAE;QAAE,CAAC;MACnE,CAAC;MACDC,OAAO,EAAE;IACX,CAAC,CACH,CAAC,CAACC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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,CAAC;EACN,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -24,7 +24,7 @@ import { defineOntology } from "../api/defineOntology.js";
24
24
  const apiNamespaceRegex = /^[a-z0-9-]+(\.[a-z0-9-]+)*\.$/;
25
25
  const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
26
26
  export default async function main(args = process.argv) {
27
- const commandLineOpts = await yargs(hideBin(args)).version("0.14.0-beta.2" ?? "").wrap(Math.min(150, yargs().terminalWidth())).strict().help().options({
27
+ const commandLineOpts = await yargs(hideBin(args)).version("0.14.0-beta.4" ?? "").wrap(Math.min(150, yargs().terminalWidth())).strict().help().options({
28
28
  input: {
29
29
  alias: "i",
30
30
  describe: "Input file",
@@ -17,10 +17,16 @@
17
17
  export { default } from "./cli/main.js";
18
18
  export { addDependency } from "./api/addDependency.js";
19
19
  export { OntologyEntityTypeEnum } from "./api/common/OntologyEntityTypeEnum.js";
20
- export { CREATE_OR_MODIFY_OBJECT_PARAMETER, defineAction, defineCreateInterfaceObjectAction, defineCreateObjectAction, defineCreateOrModifyObjectAction, defineDeleteObjectAction, defineModifyInterfaceObjectAction, defineModifyObjectAction, MODIFY_OBJECT_PARAMETER } from "./api/defineAction.js";
20
+ export { CREATE_INTERFACE_OBJECT_PARAMETER, CREATE_OR_MODIFY_OBJECT_PARAMETER, defineAction, MODIFY_INTERFACE_OBJECT_PARAMETER, MODIFY_OBJECT_PARAMETER } from "./api/defineAction.js";
21
+ export { defineCreateInterfaceObjectAction } from "./api/defineCreateInterfaceObjectAction.js";
22
+ export { defineCreateObjectAction } from "./api/defineCreateObjectAction.js";
23
+ export { defineCreateOrModifyObjectAction } from "./api/defineCreateOrModifyObjectAction.js";
24
+ export { defineDeleteObjectAction } from "./api/defineDeleteObjectAction.js";
21
25
  export { defineInterface } from "./api/defineInterface.js";
22
26
  export { defineInterfaceLinkConstraint } from "./api/defineInterfaceLinkConstraint.js";
23
27
  export { defineLink } from "./api/defineLink.js";
28
+ export { defineModifyInterfaceObjectAction } from "./api/defineModifyInterfaceObjectAction.js";
29
+ export { defineModifyObjectAction } from "./api/defineModifyObjectAction.js";
24
30
  export { convertToPluralDisplayName, defineObject, uppercaseFirstLetter as convertToDisplayName } from "./api/defineObject.js";
25
31
  export { addNamespaceIfNone, defineOntology, dumpOntologyFullMetadata } from "./api/defineOntology.js";
26
32
  export { defineSharedPropertyType } from "./api/defineSpt.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","addDependency","OntologyEntityTypeEnum","CREATE_OR_MODIFY_OBJECT_PARAMETER","defineAction","defineCreateInterfaceObjectAction","defineCreateObjectAction","defineCreateOrModifyObjectAction","defineDeleteObjectAction","defineModifyInterfaceObjectAction","defineModifyObjectAction","MODIFY_OBJECT_PARAMETER","defineInterface","defineInterfaceLinkConstraint","defineLink","convertToPluralDisplayName","defineObject","uppercaseFirstLetter","convertToDisplayName","addNamespaceIfNone","defineOntology","dumpOntologyFullMetadata","defineSharedPropertyType","defineValueType","importOntologyEntity","importSharedPropertyType","wrapWithProxy","propertyTypeTypeToOntologyIrType","convertType"],"sources":["index.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\nexport { default as default } from \"./cli/main.js\";\n\nexport type { ActionParameterValidation } from \"./api/action/ActionParameter.js\";\nexport type {\n ActionParameterAllowedValues,\n} from \"./api/action/ActionParameterAllowedValues.js\";\nexport type { ActionParameterConditionalOverride } from \"./api/action/ActionParameterConditionalOverride.js\";\nexport type { ActionParameterConfiguration } from \"./api/action/ActionParameterConfiguration.js\";\nexport type { ActionSection } from \"./api/action/ActionSection.js\";\nexport type { ActionType } from \"./api/action/ActionType.js\";\nexport type { ConditionDefinition } from \"./api/action/ConditionDefinition.js\";\nexport type {\n CurrentTimeMappingValue,\n CurrentUserMappingValue,\n CustomMapping,\n MappingValue,\n UuidMappingValue,\n} from \"./api/action/MappingValue.js\";\nexport type { SectionConditionalOverride } from \"./api/action/SectionConditionalOverride.js\";\nexport type { SubmissionMetadata } from \"./api/action/SubmissionMetadata.js\";\nexport { addDependency } from \"./api/addDependency.js\";\nexport { OntologyEntityTypeEnum } from \"./api/common/OntologyEntityTypeEnum.js\";\nexport {\n CREATE_OR_MODIFY_OBJECT_PARAMETER,\n defineAction,\n defineCreateInterfaceObjectAction,\n defineCreateObjectAction,\n defineCreateOrModifyObjectAction,\n defineDeleteObjectAction,\n defineModifyInterfaceObjectAction,\n defineModifyObjectAction,\n MODIFY_OBJECT_PARAMETER,\n} from \"./api/defineAction.js\";\nexport { defineInterface } from \"./api/defineInterface.js\";\nexport { defineInterfaceLinkConstraint } from \"./api/defineInterfaceLinkConstraint.js\";\nexport { defineLink } from \"./api/defineLink.js\";\nexport {\n convertToPluralDisplayName,\n defineObject,\n uppercaseFirstLetter as convertToDisplayName,\n} from \"./api/defineObject.js\";\nexport {\n addNamespaceIfNone,\n defineOntology,\n dumpOntologyFullMetadata,\n} from \"./api/defineOntology.js\";\nexport { defineSharedPropertyType } from \"./api/defineSpt.js\";\nexport { defineValueType } from \"./api/defineValueType.js\";\nexport { importOntologyEntity } from \"./api/importOntologyEntity.js\";\nexport { importSharedPropertyType } from \"./api/importSharedPropertyType.js\";\nexport type { InterfaceType } from \"./api/interface/InterfaceType.js\";\nexport type { LinkType } from \"./api/links/LinkType.js\";\nexport type { ObjectPropertyType } from \"./api/object/ObjectPropertyType.js\";\nexport type { ObjectType } from \"./api/object/ObjectType.js\";\nexport type { PropertyTypeType } from \"./api/properties/PropertyTypeType.js\";\nexport type { SharedPropertyType } from \"./api/properties/SharedPropertyType.js\";\nexport type { ValueTypeDefinitionVersion } from \"./api/values/ValueTypeDefinitionVersion.js\";\nexport { wrapWithProxy } from \"./api/wrapWithProxy.js\";\nexport { propertyTypeTypeToOntologyIrType as convertType } from \"./conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAkB,QAAQ,eAAe;AAoBlD,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,sBAAsB,QAAQ,wCAAwC;AAC/E,SACEC,iCAAiC,EACjCC,YAAY,EACZC,iCAAiC,EACjCC,wBAAwB,EACxBC,gCAAgC,EAChCC,wBAAwB,EACxBC,iCAAiC,EACjCC,wBAAwB,EACxBC,uBAAuB,QAClB,uBAAuB;AAC9B,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,6BAA6B,QAAQ,wCAAwC;AACtF,SAASC,UAAU,QAAQ,qBAAqB;AAChD,SACEC,0BAA0B,EAC1BC,YAAY,EACZC,oBAAoB,IAAIC,oBAAoB,QACvC,uBAAuB;AAC9B,SACEC,kBAAkB,EAClBC,cAAc,EACdC,wBAAwB,QACnB,yBAAyB;AAChC,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,oBAAoB,QAAQ,+BAA+B;AACpE,SAASC,wBAAwB,QAAQ,mCAAmC;AAQ5E,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,gCAAgC,IAAIC,WAAW,QAAQ,gEAAgE","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["default","addDependency","OntologyEntityTypeEnum","CREATE_INTERFACE_OBJECT_PARAMETER","CREATE_OR_MODIFY_OBJECT_PARAMETER","defineAction","MODIFY_INTERFACE_OBJECT_PARAMETER","MODIFY_OBJECT_PARAMETER","defineCreateInterfaceObjectAction","defineCreateObjectAction","defineCreateOrModifyObjectAction","defineDeleteObjectAction","defineInterface","defineInterfaceLinkConstraint","defineLink","defineModifyInterfaceObjectAction","defineModifyObjectAction","convertToPluralDisplayName","defineObject","uppercaseFirstLetter","convertToDisplayName","addNamespaceIfNone","defineOntology","dumpOntologyFullMetadata","defineSharedPropertyType","defineValueType","importOntologyEntity","importSharedPropertyType","wrapWithProxy","propertyTypeTypeToOntologyIrType","convertType"],"sources":["index.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\nexport { default as default } from \"./cli/main.js\";\n\nexport type { ActionParameterValidation } from \"./api/action/ActionParameter.js\";\nexport type {\n ActionParameterAllowedValues,\n} from \"./api/action/ActionParameterAllowedValues.js\";\nexport type { ActionParameterConditionalOverride } from \"./api/action/ActionParameterConditionalOverride.js\";\nexport type { ActionParameterConfiguration } from \"./api/action/ActionParameterConfiguration.js\";\nexport type { ActionSection } from \"./api/action/ActionSection.js\";\nexport type { ActionType } from \"./api/action/ActionType.js\";\nexport type { ConditionDefinition } from \"./api/action/ConditionDefinition.js\";\nexport type {\n CurrentTimeMappingValue,\n CurrentUserMappingValue,\n CustomMapping,\n MappingValue,\n UuidMappingValue,\n} from \"./api/action/MappingValue.js\";\nexport type { SectionConditionalOverride } from \"./api/action/SectionConditionalOverride.js\";\nexport type { SubmissionMetadata } from \"./api/action/SubmissionMetadata.js\";\nexport { addDependency } from \"./api/addDependency.js\";\nexport { OntologyEntityTypeEnum } from \"./api/common/OntologyEntityTypeEnum.js\";\nexport {\n CREATE_INTERFACE_OBJECT_PARAMETER,\n CREATE_OR_MODIFY_OBJECT_PARAMETER,\n defineAction,\n MODIFY_INTERFACE_OBJECT_PARAMETER,\n MODIFY_OBJECT_PARAMETER,\n} from \"./api/defineAction.js\";\nexport { defineCreateInterfaceObjectAction } from \"./api/defineCreateInterfaceObjectAction.js\";\nexport { defineCreateObjectAction } from \"./api/defineCreateObjectAction.js\";\nexport { defineCreateOrModifyObjectAction } from \"./api/defineCreateOrModifyObjectAction.js\";\nexport { defineDeleteObjectAction } from \"./api/defineDeleteObjectAction.js\";\nexport { defineInterface } from \"./api/defineInterface.js\";\nexport { defineInterfaceLinkConstraint } from \"./api/defineInterfaceLinkConstraint.js\";\nexport { defineLink } from \"./api/defineLink.js\";\nexport { defineModifyInterfaceObjectAction } from \"./api/defineModifyInterfaceObjectAction.js\";\nexport { defineModifyObjectAction } from \"./api/defineModifyObjectAction.js\";\nexport {\n convertToPluralDisplayName,\n defineObject,\n uppercaseFirstLetter as convertToDisplayName,\n} from \"./api/defineObject.js\";\nexport {\n addNamespaceIfNone,\n defineOntology,\n dumpOntologyFullMetadata,\n} from \"./api/defineOntology.js\";\nexport { defineSharedPropertyType } from \"./api/defineSpt.js\";\nexport { defineValueType } from \"./api/defineValueType.js\";\nexport { importOntologyEntity } from \"./api/importOntologyEntity.js\";\nexport { importSharedPropertyType } from \"./api/importSharedPropertyType.js\";\nexport type { InterfaceType } from \"./api/interface/InterfaceType.js\";\nexport type { LinkType } from \"./api/links/LinkType.js\";\nexport type { ObjectPropertyType } from \"./api/object/ObjectPropertyType.js\";\nexport type { ObjectType } from \"./api/object/ObjectType.js\";\nexport type { PropertyTypeType } from \"./api/properties/PropertyTypeType.js\";\nexport type { SharedPropertyType } from \"./api/properties/SharedPropertyType.js\";\nexport type { ValueTypeDefinitionVersion } from \"./api/values/ValueTypeDefinitionVersion.js\";\nexport { wrapWithProxy } from \"./api/wrapWithProxy.js\";\nexport { propertyTypeTypeToOntologyIrType as convertType } from \"./conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAkB,QAAQ,eAAe;AAoBlD,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,sBAAsB,QAAQ,wCAAwC;AAC/E,SACEC,iCAAiC,EACjCC,iCAAiC,EACjCC,YAAY,EACZC,iCAAiC,EACjCC,uBAAuB,QAClB,uBAAuB;AAC9B,SAASC,iCAAiC,QAAQ,4CAA4C;AAC9F,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SAASC,gCAAgC,QAAQ,2CAA2C;AAC5F,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,6BAA6B,QAAQ,wCAAwC;AACtF,SAASC,UAAU,QAAQ,qBAAqB;AAChD,SAASC,iCAAiC,QAAQ,4CAA4C;AAC9F,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SACEC,0BAA0B,EAC1BC,YAAY,EACZC,oBAAoB,IAAIC,oBAAoB,QACvC,uBAAuB;AAC9B,SACEC,kBAAkB,EAClBC,cAAc,EACdC,wBAAwB,QACnB,yBAAyB;AAChC,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,oBAAoB,QAAQ,+BAA+B;AACpE,SAASC,wBAAwB,QAAQ,mCAAmC;AAQ5E,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,gCAAgC,IAAIC,WAAW,QAAQ,gEAAgE","ignoreList":[]}