@osdk/maker 0.14.0-beta.3 → 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.
- package/CHANGELOG.md +14 -0
- package/build/browser/api/defineAction.js +121 -413
- package/build/browser/api/defineAction.js.map +1 -1
- package/build/browser/api/defineCreateInterfaceObjectAction.js +69 -0
- package/build/browser/api/defineCreateInterfaceObjectAction.js.map +1 -0
- package/build/browser/api/defineCreateObjectAction.js +76 -0
- package/build/browser/api/defineCreateObjectAction.js.map +1 -0
- package/build/browser/api/defineCreateOrModifyObjectAction.js +92 -0
- package/build/browser/api/defineCreateOrModifyObjectAction.js.map +1 -0
- package/build/browser/api/defineDeleteObjectAction.js +56 -0
- package/build/browser/api/defineDeleteObjectAction.js.map +1 -0
- package/build/browser/api/defineModifyInterfaceObjectAction.js +68 -0
- package/build/browser/api/defineModifyInterfaceObjectAction.js.map +1 -0
- package/build/browser/api/defineModifyObjectAction.js +91 -0
- package/build/browser/api/defineModifyObjectAction.js.map +1 -0
- package/build/browser/api/test/actions.test.js +12014 -0
- package/build/browser/api/test/actions.test.js.map +1 -0
- package/build/browser/api/test/interfaces.test.js +924 -0
- package/build/browser/api/test/interfaces.test.js.map +1 -0
- package/build/browser/api/test/links.test.js +1974 -0
- package/build/browser/api/test/links.test.js.map +1 -0
- package/build/browser/api/{markingconstraint.test.js → test/markingconstraint.test.js} +28 -2
- package/build/browser/api/test/markingconstraint.test.js.map +1 -0
- package/build/browser/api/test/misc.test.js +1058 -0
- package/build/browser/api/test/misc.test.js.map +1 -0
- package/build/browser/api/{objectStatus.test.js → test/objectStatus.test.js} +2 -2
- package/build/browser/api/test/objectStatus.test.js.map +1 -0
- package/build/browser/api/test/objects.test.js +1494 -0
- package/build/browser/api/test/objects.test.js.map +1 -0
- package/build/browser/api/test/spt.test.js +387 -0
- package/build/browser/api/test/spt.test.js.map +1 -0
- package/build/browser/api/test/valueTypes.test.js +156 -0
- package/build/browser/api/test/valueTypes.test.js.map +1 -0
- package/build/browser/cli/main.js +1 -1
- package/build/browser/index.js +7 -1
- package/build/browser/index.js.map +1 -1
- package/build/cjs/index.cjs +561 -503
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +27 -13
- package/build/esm/api/defineAction.js +121 -413
- package/build/esm/api/defineAction.js.map +1 -1
- package/build/esm/api/defineCreateInterfaceObjectAction.js +69 -0
- package/build/esm/api/defineCreateInterfaceObjectAction.js.map +1 -0
- package/build/esm/api/defineCreateObjectAction.js +76 -0
- package/build/esm/api/defineCreateObjectAction.js.map +1 -0
- package/build/esm/api/defineCreateOrModifyObjectAction.js +92 -0
- package/build/esm/api/defineCreateOrModifyObjectAction.js.map +1 -0
- package/build/esm/api/defineDeleteObjectAction.js +56 -0
- package/build/esm/api/defineDeleteObjectAction.js.map +1 -0
- package/build/esm/api/defineModifyInterfaceObjectAction.js +68 -0
- package/build/esm/api/defineModifyInterfaceObjectAction.js.map +1 -0
- package/build/esm/api/defineModifyObjectAction.js +91 -0
- package/build/esm/api/defineModifyObjectAction.js.map +1 -0
- package/build/esm/api/test/actions.test.js +12014 -0
- package/build/esm/api/test/actions.test.js.map +1 -0
- package/build/esm/api/test/interfaces.test.js +924 -0
- package/build/esm/api/test/interfaces.test.js.map +1 -0
- package/build/esm/api/test/links.test.js +1974 -0
- package/build/esm/api/test/links.test.js.map +1 -0
- package/build/esm/api/{markingconstraint.test.js → test/markingconstraint.test.js} +28 -2
- package/build/esm/api/test/markingconstraint.test.js.map +1 -0
- package/build/esm/api/test/misc.test.js +1058 -0
- package/build/esm/api/test/misc.test.js.map +1 -0
- package/build/esm/api/{objectStatus.test.js → test/objectStatus.test.js} +2 -2
- package/build/esm/api/test/objectStatus.test.js.map +1 -0
- package/build/esm/api/test/objects.test.js +1494 -0
- package/build/esm/api/test/objects.test.js.map +1 -0
- package/build/esm/api/test/spt.test.js +387 -0
- package/build/esm/api/test/spt.test.js.map +1 -0
- package/build/esm/api/test/valueTypes.test.js +156 -0
- package/build/esm/api/test/valueTypes.test.js.map +1 -0
- package/build/esm/cli/main.js +1 -1
- package/build/esm/index.js +7 -1
- package/build/esm/index.js.map +1 -1
- package/build/types/api/defineAction.d.ts +22 -6
- package/build/types/api/defineAction.d.ts.map +1 -1
- package/build/types/api/defineCreateInterfaceObjectAction.d.ts +3 -0
- package/build/types/api/defineCreateInterfaceObjectAction.d.ts.map +1 -0
- package/build/types/api/defineCreateObjectAction.d.ts +3 -0
- package/build/types/api/defineCreateObjectAction.d.ts.map +1 -0
- package/build/types/api/defineCreateOrModifyObjectAction.d.ts +3 -0
- package/build/types/api/defineCreateOrModifyObjectAction.d.ts.map +1 -0
- package/build/types/api/defineDeleteObjectAction.d.ts +3 -0
- package/build/types/api/defineDeleteObjectAction.d.ts.map +1 -0
- package/build/types/api/defineModifyInterfaceObjectAction.d.ts +3 -0
- package/build/types/api/defineModifyInterfaceObjectAction.d.ts.map +1 -0
- package/build/types/api/defineModifyObjectAction.d.ts +3 -0
- package/build/types/api/defineModifyObjectAction.d.ts.map +1 -0
- package/build/types/api/test/actions.test.d.ts.map +1 -0
- package/build/types/api/test/interfaces.test.d.ts.map +1 -0
- package/build/types/api/test/links.test.d.ts.map +1 -0
- package/build/types/api/test/markingconstraint.test.d.ts +1 -0
- package/build/types/api/test/markingconstraint.test.d.ts.map +1 -0
- package/build/types/api/test/misc.test.d.ts +1 -0
- package/build/types/api/test/misc.test.d.ts.map +1 -0
- package/build/types/api/test/objectStatus.test.d.ts +1 -0
- package/build/types/api/test/objectStatus.test.d.ts.map +1 -0
- package/build/types/api/test/objects.test.d.ts +1 -0
- package/build/types/api/test/objects.test.d.ts.map +1 -0
- package/build/types/api/test/spt.test.d.ts +1 -0
- package/build/types/api/test/spt.test.d.ts.map +1 -0
- package/build/types/api/test/valueTypes.test.d.ts +1 -0
- package/build/types/api/test/valueTypes.test.d.ts.map +1 -0
- package/build/types/index.d.ts +7 -1
- package/build/types/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/build/browser/api/markingconstraint.test.js.map +0 -1
- package/build/browser/api/objectStatus.test.js.map +0 -1
- package/build/browser/api/overall.test.js +0 -14002
- package/build/browser/api/overall.test.js.map +0 -1
- package/build/esm/api/markingconstraint.test.js.map +0 -1
- package/build/esm/api/objectStatus.test.js.map +0 -1
- package/build/esm/api/overall.test.js +0 -14002
- package/build/esm/api/overall.test.js.map +0 -1
- package/build/types/api/markingconstraint.test.d.ts.map +0 -1
- package/build/types/api/objectStatus.test.d.ts.map +0 -1
- package/build/types/api/overall.test.d.ts.map +0 -1
- /package/build/types/api/{markingconstraint.test.d.ts → test/actions.test.d.ts} +0 -0
- /package/build/types/api/{objectStatus.test.d.ts → test/interfaces.test.d.ts} +0 -0
- /package/build/types/api/{overall.test.d.ts → test/links.test.d.ts} +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
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 { convertMappingValue } from "../conversion/toMarketplace/convertMappingValue.js";
|
|
18
|
+
import { convertValidationRule, CREATE_OR_MODIFY_OBJECT_PARAMETER, createDefaultParameterOrdering, createParameters, defineAction, kebab, validateActionParameters, validateParameterOrdering } from "./defineAction.js";
|
|
19
|
+
import { isStruct } from "./properties/PropertyTypeType.js";
|
|
20
|
+
export function defineCreateOrModifyObjectAction(def) {
|
|
21
|
+
validateActionParameters(def, Object.keys(def.objectType.properties ?? {}), def.objectType.apiName);
|
|
22
|
+
const propertyParameters = Object.keys(def.objectType.properties ?? {}).filter(id => !Object.keys(def.nonParameterMappings ?? {}).includes(id) && !def.excludedProperties?.includes(id) && !isStruct(def.objectType.properties?.[id].type) && id !== def.objectType.primaryKeyPropertyApiName);
|
|
23
|
+
const parameterNames = new Set(propertyParameters);
|
|
24
|
+
Object.keys(def.parameterConfiguration ?? {}).forEach(param => parameterNames.add(param));
|
|
25
|
+
parameterNames.add(CREATE_OR_MODIFY_OBJECT_PARAMETER);
|
|
26
|
+
const actionApiName = def.apiName ?? `create-or-modify-${kebab(def.objectType.apiName.split(".").pop() ?? def.objectType.apiName)}`;
|
|
27
|
+
if (def.parameterOrdering) {
|
|
28
|
+
if (!def.parameterOrdering.includes(CREATE_OR_MODIFY_OBJECT_PARAMETER)) {
|
|
29
|
+
def.parameterOrdering.unshift(CREATE_OR_MODIFY_OBJECT_PARAMETER);
|
|
30
|
+
}
|
|
31
|
+
validateParameterOrdering(def.parameterOrdering, parameterNames, actionApiName);
|
|
32
|
+
}
|
|
33
|
+
const parameters = createParameters(def, def.objectType.properties ?? {}, parameterNames);
|
|
34
|
+
parameters.forEach(p => {
|
|
35
|
+
if (p.id !== CREATE_OR_MODIFY_OBJECT_PARAMETER && p.defaultValue === undefined) {
|
|
36
|
+
p.defaultValue = {
|
|
37
|
+
type: "objectParameterPropertyValue",
|
|
38
|
+
objectParameterPropertyValue: {
|
|
39
|
+
parameterId: CREATE_OR_MODIFY_OBJECT_PARAMETER,
|
|
40
|
+
propertyTypeId: p.id
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
const mappings = Object.fromEntries(Object.entries(def.nonParameterMappings ?? {}).map(([id, value]) => [id, convertMappingValue(value)]));
|
|
46
|
+
return defineAction({
|
|
47
|
+
apiName: actionApiName,
|
|
48
|
+
displayName: def.displayName ?? `Create or Modify ${def.objectType.displayName}`,
|
|
49
|
+
parameters: parameters,
|
|
50
|
+
status: def.status ?? "active",
|
|
51
|
+
rules: [{
|
|
52
|
+
type: "addOrModifyObjectRuleV2",
|
|
53
|
+
addOrModifyObjectRuleV2: {
|
|
54
|
+
objectToModify: CREATE_OR_MODIFY_OBJECT_PARAMETER,
|
|
55
|
+
propertyValues: {
|
|
56
|
+
...Object.fromEntries(propertyParameters.map(p => [p, {
|
|
57
|
+
type: "parameterId",
|
|
58
|
+
parameterId: p
|
|
59
|
+
}])),
|
|
60
|
+
...mappings
|
|
61
|
+
},
|
|
62
|
+
structFieldValues: {}
|
|
63
|
+
}
|
|
64
|
+
}],
|
|
65
|
+
entities: {
|
|
66
|
+
affectedInterfaceTypes: [],
|
|
67
|
+
affectedObjectTypes: [def.objectType.apiName],
|
|
68
|
+
affectedLinkTypes: [],
|
|
69
|
+
typeGroups: []
|
|
70
|
+
},
|
|
71
|
+
parameterOrdering: def.parameterOrdering ?? createDefaultParameterOrdering(def, Object.keys(def.objectType.properties ?? {}), parameters, CREATE_OR_MODIFY_OBJECT_PARAMETER),
|
|
72
|
+
...(def.actionLevelValidation ? {
|
|
73
|
+
validation: convertValidationRule(def.actionLevelValidation, parameters)
|
|
74
|
+
} : {}),
|
|
75
|
+
...(def.defaultFormat && {
|
|
76
|
+
defaultFormat: def.defaultFormat
|
|
77
|
+
}),
|
|
78
|
+
...(def.enableLayoutSwitch && {
|
|
79
|
+
enableLayoutSwitch: def.enableLayoutSwitch
|
|
80
|
+
}),
|
|
81
|
+
...(def.displayAndFormat && {
|
|
82
|
+
displayAndFormat: def.displayAndFormat
|
|
83
|
+
}),
|
|
84
|
+
...(def.sections && {
|
|
85
|
+
sections: Object.fromEntries(def.sections.map(section => [section.id, section]))
|
|
86
|
+
}),
|
|
87
|
+
...(def.submissionMetadata && {
|
|
88
|
+
submissionMetadata: def.submissionMetadata
|
|
89
|
+
})
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=defineCreateOrModifyObjectAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defineCreateOrModifyObjectAction.js","names":["convertMappingValue","convertValidationRule","CREATE_OR_MODIFY_OBJECT_PARAMETER","createDefaultParameterOrdering","createParameters","defineAction","kebab","validateActionParameters","validateParameterOrdering","isStruct","defineCreateOrModifyObjectAction","def","Object","keys","objectType","properties","apiName","propertyParameters","filter","id","nonParameterMappings","includes","excludedProperties","type","primaryKeyPropertyApiName","parameterNames","Set","parameterConfiguration","forEach","param","add","actionApiName","split","pop","parameterOrdering","unshift","parameters","p","defaultValue","undefined","objectParameterPropertyValue","parameterId","propertyTypeId","mappings","fromEntries","entries","map","value","displayName","status","rules","addOrModifyObjectRuleV2","objectToModify","propertyValues","structFieldValues","entities","affectedInterfaceTypes","affectedObjectTypes","affectedLinkTypes","typeGroups","actionLevelValidation","validation","defaultFormat","enableLayoutSwitch","displayAndFormat","sections","section","submissionMetadata"],"sources":["defineCreateOrModifyObjectAction.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 { convertMappingValue } from \"../conversion/toMarketplace/convertMappingValue.js\";\nimport { type ActionType } from \"./action/ActionType.js\";\nimport type { ActionTypeUserDefinition } from \"./defineAction.js\";\nimport {\n convertValidationRule,\n CREATE_OR_MODIFY_OBJECT_PARAMETER,\n createDefaultParameterOrdering,\n createParameters,\n defineAction,\n kebab,\n validateActionParameters,\n validateParameterOrdering,\n} from \"./defineAction.js\";\nimport { isStruct } from \"./properties/PropertyTypeType.js\";\n\nexport function defineCreateOrModifyObjectAction(\n def: ActionTypeUserDefinition,\n): ActionType {\n validateActionParameters(\n def,\n Object.keys(def.objectType.properties ?? {}),\n def.objectType.apiName,\n );\n const propertyParameters = Object.keys(def.objectType.properties ?? {})\n .filter(\n id =>\n !Object.keys(def.nonParameterMappings ?? {}).includes(id)\n && !def.excludedProperties?.includes(id)\n && !isStruct(def.objectType.properties?.[id].type!)\n && id !== def.objectType.primaryKeyPropertyApiName,\n );\n const parameterNames = new Set(propertyParameters);\n Object.keys(def.parameterConfiguration ?? {}).forEach(param =>\n parameterNames.add(param)\n );\n parameterNames.add(CREATE_OR_MODIFY_OBJECT_PARAMETER);\n const actionApiName = def.apiName\n ?? `create-or-modify-${\n kebab(def.objectType.apiName.split(\".\").pop() ?? def.objectType.apiName)\n }`;\n if (def.parameterOrdering) {\n if (!def.parameterOrdering.includes(CREATE_OR_MODIFY_OBJECT_PARAMETER)) {\n def.parameterOrdering.unshift(CREATE_OR_MODIFY_OBJECT_PARAMETER);\n }\n validateParameterOrdering(\n def.parameterOrdering,\n parameterNames,\n actionApiName,\n );\n }\n const parameters = createParameters(\n def,\n def.objectType.properties ?? {},\n parameterNames,\n );\n parameters.forEach(\n p => {\n if (\n p.id !== CREATE_OR_MODIFY_OBJECT_PARAMETER\n && p.defaultValue === undefined\n ) {\n p.defaultValue = {\n type: \"objectParameterPropertyValue\",\n objectParameterPropertyValue: {\n parameterId: CREATE_OR_MODIFY_OBJECT_PARAMETER,\n propertyTypeId: p.id,\n },\n };\n }\n },\n );\n const mappings = Object.fromEntries(\n Object.entries(def.nonParameterMappings ?? {}).map((\n [id, value],\n ) => [id, convertMappingValue(value)]),\n );\n\n return defineAction({\n apiName: actionApiName,\n displayName: def.displayName\n ?? `Create or Modify ${def.objectType.displayName}`,\n parameters: parameters,\n status: def.status ?? \"active\",\n rules: [{\n type: \"addOrModifyObjectRuleV2\",\n addOrModifyObjectRuleV2: {\n objectToModify: CREATE_OR_MODIFY_OBJECT_PARAMETER,\n propertyValues: {\n ...Object.fromEntries(\n propertyParameters.map(\n p => [p, { type: \"parameterId\", parameterId: p }],\n ),\n ),\n ...mappings,\n },\n structFieldValues: {},\n },\n }],\n entities: {\n affectedInterfaceTypes: [],\n affectedObjectTypes: [def.objectType.apiName],\n affectedLinkTypes: [],\n typeGroups: [],\n },\n parameterOrdering: def.parameterOrdering\n ?? createDefaultParameterOrdering(\n def,\n Object.keys(def.objectType.properties ?? {}),\n parameters,\n CREATE_OR_MODIFY_OBJECT_PARAMETER,\n ),\n ...(def.actionLevelValidation\n ? {\n validation: convertValidationRule(\n def.actionLevelValidation,\n parameters,\n ),\n }\n : {}),\n ...(def.defaultFormat && { defaultFormat: def.defaultFormat }),\n ...(def.enableLayoutSwitch\n && { enableLayoutSwitch: def.enableLayoutSwitch }),\n ...(def.displayAndFormat && { displayAndFormat: def.displayAndFormat }),\n ...(def.sections\n && {\n sections: Object.fromEntries(\n def.sections.map(section => [section.id, section]),\n ),\n }),\n ...(def.submissionMetadata\n && { submissionMetadata: def.submissionMetadata }),\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,mBAAmB,QAAQ,oDAAoD;AAGxF,SACEC,qBAAqB,EACrBC,iCAAiC,EACjCC,8BAA8B,EAC9BC,gBAAgB,EAChBC,YAAY,EACZC,KAAK,EACLC,wBAAwB,EACxBC,yBAAyB,QACpB,mBAAmB;AAC1B,SAASC,QAAQ,QAAQ,kCAAkC;AAE3D,OAAO,SAASC,gCAAgCA,CAC9CC,GAA6B,EACjB;EACZJ,wBAAwB,CACtBI,GAAG,EACHC,MAAM,CAACC,IAAI,CAACF,GAAG,CAACG,UAAU,CAACC,UAAU,IAAI,CAAC,CAAC,CAAC,EAC5CJ,GAAG,CAACG,UAAU,CAACE,OACjB,CAAC;EACD,MAAMC,kBAAkB,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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 { convertValidationRule, defineAction, kebab } from "./defineAction.js";
|
|
18
|
+
export function defineDeleteObjectAction(def) {
|
|
19
|
+
return defineAction({
|
|
20
|
+
apiName: def.apiName ?? `delete-object-${kebab(def.objectType.apiName.split(".").pop() ?? def.objectType.apiName)}`,
|
|
21
|
+
displayName: def.displayName ?? `Delete ${def.objectType.displayName}`,
|
|
22
|
+
parameters: [{
|
|
23
|
+
id: "objectToDeleteParameter",
|
|
24
|
+
displayName: "Delete object",
|
|
25
|
+
type: {
|
|
26
|
+
type: "objectReference",
|
|
27
|
+
objectReference: {
|
|
28
|
+
objectTypeId: def.objectType.apiName
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
validation: {
|
|
32
|
+
required: true,
|
|
33
|
+
allowedValues: {
|
|
34
|
+
type: "objectQuery"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}],
|
|
38
|
+
status: def.status ?? "active",
|
|
39
|
+
rules: [{
|
|
40
|
+
type: "deleteObjectRule",
|
|
41
|
+
deleteObjectRule: {
|
|
42
|
+
objectToDelete: "objectToDeleteParameter"
|
|
43
|
+
}
|
|
44
|
+
}],
|
|
45
|
+
entities: {
|
|
46
|
+
affectedInterfaceTypes: [],
|
|
47
|
+
affectedObjectTypes: [def.objectType.apiName],
|
|
48
|
+
affectedLinkTypes: [],
|
|
49
|
+
typeGroups: []
|
|
50
|
+
},
|
|
51
|
+
...(def.actionLevelValidation ? {
|
|
52
|
+
validation: convertValidationRule(def.actionLevelValidation)
|
|
53
|
+
} : {})
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=defineDeleteObjectAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defineDeleteObjectAction.js","names":["convertValidationRule","defineAction","kebab","defineDeleteObjectAction","def","apiName","objectType","split","pop","displayName","parameters","id","type","objectReference","objectTypeId","validation","required","allowedValues","status","rules","deleteObjectRule","objectToDelete","entities","affectedInterfaceTypes","affectedObjectTypes","affectedLinkTypes","typeGroups","actionLevelValidation"],"sources":["defineDeleteObjectAction.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 { type ActionType } from \"./action/ActionType.js\";\nimport type { ActionTypeUserDefinition } from \"./defineAction.js\";\nimport { convertValidationRule, defineAction, kebab } from \"./defineAction.js\";\n\nexport function defineDeleteObjectAction(\n def: ActionTypeUserDefinition,\n): ActionType {\n return defineAction({\n apiName: def.apiName\n ?? `delete-object-${\n kebab(def.objectType.apiName.split(\".\").pop() ?? def.objectType.apiName)\n }`,\n displayName: def.displayName ?? `Delete ${def.objectType.displayName}`,\n parameters: [\n {\n id: \"objectToDeleteParameter\",\n displayName: \"Delete object\",\n type: {\n type: \"objectReference\",\n objectReference: { objectTypeId: def.objectType.apiName },\n },\n validation: {\n required: true,\n allowedValues: { type: \"objectQuery\" },\n },\n },\n ],\n status: def.status ?? \"active\",\n rules: [{\n type: \"deleteObjectRule\",\n deleteObjectRule: {\n objectToDelete: \"objectToDeleteParameter\",\n },\n }],\n entities: {\n affectedInterfaceTypes: [],\n affectedObjectTypes: [def.objectType.apiName],\n affectedLinkTypes: [],\n typeGroups: [],\n },\n ...(def.actionLevelValidation\n ? {\n validation: convertValidationRule(\n def.actionLevelValidation,\n ),\n }\n : {}),\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,qBAAqB,EAAEC,YAAY,EAAEC,KAAK,QAAQ,mBAAmB;AAE9E,OAAO,SAASC,wBAAwBA,CACtCC,GAA6B,EACjB;EACZ,OAAOH,YAAY,CAAC;IAClBI,OAAO,EAAED,GAAG,CAACC,OAAO,IACf,iBACDH,KAAK,CAACE,GAAG,CAACE,UAAU,CAACD,OAAO,CAACE,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAAC,CAAC,IAAIJ,GAAG,CAACE,UAAU,CAACD,OAAO,CAAC,EACxE;IACJI,WAAW,EAAEL,GAAG,CAACK,WAAW,IAAI,UAAUL,GAAG,CAACE,UAAU,CAACG,WAAW,EAAE;IACtEC,UAAU,EAAE,CACV;MACEC,EAAE,EAAE,yBAAyB;MAC7BF,WAAW,EAAE,eAAe;MAC5BG,IAAI,EAAE;QACJA,IAAI,EAAE,iBAAiB;QACvBC,eAAe,EAAE;UAAEC,YAAY,EAAEV,GAAG,CAACE,UAAU,CAACD;QAAQ;MAC1D,CAAC;MACDU,UAAU,EAAE;QACVC,QAAQ,EAAE,IAAI;QACdC,aAAa,EAAE;UAAEL,IAAI,EAAE;QAAc;MACvC;IACF,CAAC,CACF;IACDM,MAAM,EAAEd,GAAG,CAACc,MAAM,IAAI,QAAQ;IAC9BC,KAAK,EAAE,CAAC;MACNP,IAAI,EAAE,kBAAkB;MACxBQ,gBAAgB,EAAE;QAChBC,cAAc,EAAE;MAClB;IACF,CAAC,CAAC;IACFC,QAAQ,EAAE;MACRC,sBAAsB,EAAE,EAAE;MAC1BC,mBAAmB,EAAE,CAACpB,GAAG,CAACE,UAAU,CAACD,OAAO,CAAC;MAC7CoB,iBAAiB,EAAE,EAAE;MACrBC,UAAU,EAAE;IACd,CAAC;IACD,IAAItB,GAAG,CAACuB,qBAAqB,GACzB;MACAZ,UAAU,EAAEf,qBAAqB,CAC/BI,GAAG,CAACuB,qBACN;IACF,CAAC,GACC,CAAC,CAAC;EACR,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,68 @@
|
|
|
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 { convertMappingValue } from "../conversion/toMarketplace/convertMappingValue.js";
|
|
18
|
+
import { addNamespaceToActionDefinition, convertValidationRule, createDefaultParameterOrdering, createParameters, defineAction, isPropertyParameter, isTargetParameter, kebab, MODIFY_INTERFACE_OBJECT_PARAMETER, validateActionParameters, validateParameterOrdering } from "./defineAction.js";
|
|
19
|
+
import { addNamespaceIfNone } from "./defineOntology.js";
|
|
20
|
+
import { getFlattenedInterfaceProperties } from "./interface/getFlattenedInterfaceProperties.js";
|
|
21
|
+
export function defineModifyInterfaceObjectAction(def) {
|
|
22
|
+
addNamespaceToActionDefinition(def);
|
|
23
|
+
const allProperties = getFlattenedInterfaceProperties(def.interfaceType);
|
|
24
|
+
validateActionParameters(def, Object.keys(allProperties), def.interfaceType.apiName);
|
|
25
|
+
const propertyParameters = Object.keys(allProperties).filter(apiName => isPropertyParameter(def, apiName, allProperties[apiName].sharedPropertyType.type));
|
|
26
|
+
const parameterNames = new Set(propertyParameters);
|
|
27
|
+
Object.keys(def.parameterConfiguration ?? {}).forEach(param => parameterNames.add(isTargetParameter(param) ? param : addNamespaceIfNone(param)));
|
|
28
|
+
parameterNames.add(MODIFY_INTERFACE_OBJECT_PARAMETER);
|
|
29
|
+
const actionApiName = def.apiName ?? `modify-${kebab(def.interfaceType.apiName.split(".").pop() ?? def.interfaceType.apiName)}${def.objectType === undefined ? "" : `-${kebab(def.objectType.apiName.split(".").pop() ?? def.objectType.apiName)}`}`;
|
|
30
|
+
if (def.parameterOrdering) {
|
|
31
|
+
if (!def.parameterOrdering.includes(MODIFY_INTERFACE_OBJECT_PARAMETER)) {
|
|
32
|
+
def.parameterOrdering.unshift(MODIFY_INTERFACE_OBJECT_PARAMETER);
|
|
33
|
+
}
|
|
34
|
+
validateParameterOrdering(def.parameterOrdering, parameterNames, actionApiName);
|
|
35
|
+
}
|
|
36
|
+
const parameters = createParameters(def, Object.fromEntries(Object.entries(allProperties).map(([id, prop]) => [id, prop.sharedPropertyType])), parameterNames, Object.fromEntries(Object.entries(allProperties).map(([id, prop]) => [id, prop.required])));
|
|
37
|
+
const mappings = Object.fromEntries(Object.entries(def.nonParameterMappings ?? {}).map(([id, value]) => [id, convertMappingValue(value)]));
|
|
38
|
+
return defineAction({
|
|
39
|
+
apiName: actionApiName,
|
|
40
|
+
displayName: def.displayName ?? `Modify ${def.interfaceType.displayMetadata.displayName}`,
|
|
41
|
+
parameters: parameters,
|
|
42
|
+
status: def.status ?? (def.interfaceType.status.type !== "deprecated" ? def.interfaceType.status.type : def.interfaceType.status),
|
|
43
|
+
entities: {
|
|
44
|
+
affectedInterfaceTypes: [def.interfaceType.apiName],
|
|
45
|
+
affectedObjectTypes: [],
|
|
46
|
+
affectedLinkTypes: [],
|
|
47
|
+
typeGroups: []
|
|
48
|
+
},
|
|
49
|
+
rules: [{
|
|
50
|
+
type: "modifyInterfaceRule",
|
|
51
|
+
modifyInterfaceRule: {
|
|
52
|
+
interfaceObjectToModifyParameter: "interfaceObjectToModifyParameter",
|
|
53
|
+
sharedPropertyValues: {
|
|
54
|
+
...Object.fromEntries(propertyParameters.map(id => [id, {
|
|
55
|
+
type: "parameterId",
|
|
56
|
+
parameterId: id
|
|
57
|
+
}])),
|
|
58
|
+
...mappings
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}],
|
|
62
|
+
parameterOrdering: def.parameterOrdering ?? createDefaultParameterOrdering(def, Object.keys(allProperties), parameters, MODIFY_INTERFACE_OBJECT_PARAMETER),
|
|
63
|
+
...(def.validation ? {
|
|
64
|
+
validation: convertValidationRule(def.validation)
|
|
65
|
+
} : {})
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=defineModifyInterfaceObjectAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defineModifyInterfaceObjectAction.js","names":["convertMappingValue","addNamespaceToActionDefinition","convertValidationRule","createDefaultParameterOrdering","createParameters","defineAction","isPropertyParameter","isTargetParameter","kebab","MODIFY_INTERFACE_OBJECT_PARAMETER","validateActionParameters","validateParameterOrdering","addNamespaceIfNone","getFlattenedInterfaceProperties","defineModifyInterfaceObjectAction","def","allProperties","interfaceType","Object","keys","apiName","propertyParameters","filter","sharedPropertyType","type","parameterNames","Set","parameterConfiguration","forEach","param","add","actionApiName","split","pop","objectType","undefined","parameterOrdering","includes","unshift","parameters","fromEntries","entries","map","id","prop","required","mappings","nonParameterMappings","value","displayName","displayMetadata","status","entities","affectedInterfaceTypes","affectedObjectTypes","affectedLinkTypes","typeGroups","rules","modifyInterfaceRule","interfaceObjectToModifyParameter","sharedPropertyValues","parameterId","validation"],"sources":["defineModifyInterfaceObjectAction.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 { convertMappingValue } from \"../conversion/toMarketplace/convertMappingValue.js\";\nimport { type ActionType } from \"./action/ActionType.js\";\nimport type { InterfaceActionTypeUserDefinition } from \"./defineAction.js\";\nimport {\n addNamespaceToActionDefinition,\n convertValidationRule,\n createDefaultParameterOrdering,\n createParameters,\n defineAction,\n isPropertyParameter,\n isTargetParameter,\n kebab,\n MODIFY_INTERFACE_OBJECT_PARAMETER,\n validateActionParameters,\n validateParameterOrdering,\n} from \"./defineAction.js\";\nimport { addNamespaceIfNone } from \"./defineOntology.js\";\nimport { getFlattenedInterfaceProperties } from \"./interface/getFlattenedInterfaceProperties.js\";\n\nexport function defineModifyInterfaceObjectAction(\n def: InterfaceActionTypeUserDefinition,\n): ActionType {\n addNamespaceToActionDefinition(def);\n const allProperties = getFlattenedInterfaceProperties(def.interfaceType);\n validateActionParameters(\n def,\n Object.keys(allProperties),\n def.interfaceType.apiName,\n );\n const propertyParameters = Object.keys(allProperties).filter(apiName =>\n isPropertyParameter(\n def,\n apiName,\n allProperties[apiName].sharedPropertyType.type,\n )\n );\n const parameterNames = new Set(propertyParameters);\n Object.keys(def.parameterConfiguration ?? {}).forEach(param =>\n parameterNames.add(\n isTargetParameter(param) ? param : addNamespaceIfNone(param),\n )\n );\n parameterNames.add(MODIFY_INTERFACE_OBJECT_PARAMETER);\n const actionApiName = def.apiName ?? `modify-${\n kebab(\n def.interfaceType.apiName.split(\".\").pop() ?? def.interfaceType.apiName,\n )\n }${\n def.objectType === undefined\n ? \"\"\n : `-${\n kebab(\n def.objectType.apiName.split(\".\").pop() ?? def.objectType.apiName,\n )\n }`\n }`;\n if (def.parameterOrdering) {\n if (!def.parameterOrdering.includes(MODIFY_INTERFACE_OBJECT_PARAMETER)) {\n def.parameterOrdering.unshift(MODIFY_INTERFACE_OBJECT_PARAMETER);\n }\n validateParameterOrdering(\n def.parameterOrdering,\n parameterNames,\n actionApiName,\n );\n }\n const parameters = createParameters(\n def,\n Object.fromEntries(\n Object.entries(allProperties).map((\n [id, prop],\n ) => [id, prop.sharedPropertyType]),\n ),\n parameterNames,\n Object.fromEntries(\n Object.entries(allProperties).map(([id, prop]) => [id, prop.required]),\n ),\n );\n const mappings = Object.fromEntries(\n Object.entries(def.nonParameterMappings ?? {}).map((\n [id, value],\n ) => [id, convertMappingValue(value)]),\n );\n\n return defineAction({\n apiName: actionApiName,\n displayName: def.displayName\n ?? `Modify ${def.interfaceType.displayMetadata.displayName}`,\n parameters: parameters,\n status: def.status ?? (def.interfaceType.status.type !== \"deprecated\"\n ? def.interfaceType.status.type\n : def.interfaceType.status),\n entities: {\n affectedInterfaceTypes: [def.interfaceType.apiName],\n affectedObjectTypes: [],\n affectedLinkTypes: [],\n typeGroups: [],\n },\n rules: [\n {\n type: \"modifyInterfaceRule\",\n modifyInterfaceRule: {\n interfaceObjectToModifyParameter: \"interfaceObjectToModifyParameter\",\n sharedPropertyValues: {\n ...Object.fromEntries(\n propertyParameters.map(\n id => [id, { type: \"parameterId\", parameterId: id }],\n ),\n ),\n ...mappings,\n },\n },\n },\n ],\n parameterOrdering: def.parameterOrdering\n ?? createDefaultParameterOrdering(\n def,\n Object.keys(allProperties),\n parameters,\n MODIFY_INTERFACE_OBJECT_PARAMETER,\n ),\n ...(def.validation\n ? {\n validation: convertValidationRule(def.validation),\n }\n : {}),\n });\n}\n"],"mappings":"AAAA;AACA;AACA;A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ClD,CAAC,GACC,CAAC,CAAC;EACR,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,91 @@
|
|
|
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 { convertMappingValue } from "../conversion/toMarketplace/convertMappingValue.js";
|
|
18
|
+
import { convertValidationRule, createDefaultParameterOrdering, createParameters, defineAction, isPropertyParameter, kebab, MODIFY_OBJECT_PARAMETER, validateActionParameters, validateParameterOrdering } from "./defineAction.js";
|
|
19
|
+
export function defineModifyObjectAction(def) {
|
|
20
|
+
validateActionParameters(def, Object.keys(def.objectType.properties ?? {}), def.objectType.apiName);
|
|
21
|
+
const propertyParameters = Object.keys(def.objectType.properties ?? {}).filter(id => isPropertyParameter(def, id, def.objectType.properties?.[id].type) && id !== def.objectType.primaryKeyPropertyApiName);
|
|
22
|
+
const parameterNames = new Set(propertyParameters);
|
|
23
|
+
Object.keys(def.parameterConfiguration ?? {}).forEach(param => parameterNames.add(param));
|
|
24
|
+
parameterNames.add(MODIFY_OBJECT_PARAMETER);
|
|
25
|
+
const actionApiName = def.apiName ?? `modify-object-${kebab(def.objectType.apiName.split(".").pop() ?? def.objectType.apiName)}`;
|
|
26
|
+
if (def.parameterOrdering) {
|
|
27
|
+
if (!def.parameterOrdering.includes(MODIFY_OBJECT_PARAMETER)) {
|
|
28
|
+
def.parameterOrdering.unshift(MODIFY_OBJECT_PARAMETER);
|
|
29
|
+
}
|
|
30
|
+
validateParameterOrdering(def.parameterOrdering, parameterNames, actionApiName);
|
|
31
|
+
}
|
|
32
|
+
const parameters = createParameters(def, def.objectType.properties ?? {}, parameterNames);
|
|
33
|
+
parameters.forEach(p => {
|
|
34
|
+
if (p.id !== MODIFY_OBJECT_PARAMETER && p.defaultValue === undefined) {
|
|
35
|
+
p.defaultValue = {
|
|
36
|
+
type: "objectParameterPropertyValue",
|
|
37
|
+
objectParameterPropertyValue: {
|
|
38
|
+
parameterId: MODIFY_OBJECT_PARAMETER,
|
|
39
|
+
propertyTypeId: p.id
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
const mappings = Object.fromEntries(Object.entries(def.nonParameterMappings ?? {}).map(([id, value]) => [id, convertMappingValue(value)]));
|
|
45
|
+
return defineAction({
|
|
46
|
+
apiName: actionApiName,
|
|
47
|
+
displayName: def.displayName ?? `Modify ${def.objectType.displayName}`,
|
|
48
|
+
parameters: parameters,
|
|
49
|
+
status: def.status ?? "active",
|
|
50
|
+
rules: [{
|
|
51
|
+
type: "modifyObjectRule",
|
|
52
|
+
modifyObjectRule: {
|
|
53
|
+
objectToModify: MODIFY_OBJECT_PARAMETER,
|
|
54
|
+
propertyValues: {
|
|
55
|
+
...Object.fromEntries(propertyParameters.map(p => [p, {
|
|
56
|
+
type: "parameterId",
|
|
57
|
+
parameterId: p
|
|
58
|
+
}])),
|
|
59
|
+
...mappings
|
|
60
|
+
},
|
|
61
|
+
structFieldValues: {}
|
|
62
|
+
}
|
|
63
|
+
}],
|
|
64
|
+
entities: {
|
|
65
|
+
affectedInterfaceTypes: [],
|
|
66
|
+
affectedObjectTypes: [def.objectType.apiName],
|
|
67
|
+
affectedLinkTypes: [],
|
|
68
|
+
typeGroups: []
|
|
69
|
+
},
|
|
70
|
+
parameterOrdering: def.parameterOrdering ?? createDefaultParameterOrdering(def, Object.keys(def.objectType.properties ?? {}), parameters, MODIFY_OBJECT_PARAMETER),
|
|
71
|
+
...(def.actionLevelValidation ? {
|
|
72
|
+
validation: convertValidationRule(def.actionLevelValidation, parameters)
|
|
73
|
+
} : {}),
|
|
74
|
+
...(def.defaultFormat && {
|
|
75
|
+
defaultFormat: def.defaultFormat
|
|
76
|
+
}),
|
|
77
|
+
...(def.enableLayoutSwitch && {
|
|
78
|
+
enableLayoutSwitch: def.enableLayoutSwitch
|
|
79
|
+
}),
|
|
80
|
+
...(def.displayAndFormat && {
|
|
81
|
+
displayAndFormat: def.displayAndFormat
|
|
82
|
+
}),
|
|
83
|
+
...(def.sections && {
|
|
84
|
+
sections: Object.fromEntries(def.sections.map(section => [section.id, section]))
|
|
85
|
+
}),
|
|
86
|
+
...(def.submissionMetadata && {
|
|
87
|
+
submissionMetadata: def.submissionMetadata
|
|
88
|
+
})
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=defineModifyObjectAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defineModifyObjectAction.js","names":["convertMappingValue","convertValidationRule","createDefaultParameterOrdering","createParameters","defineAction","isPropertyParameter","kebab","MODIFY_OBJECT_PARAMETER","validateActionParameters","validateParameterOrdering","defineModifyObjectAction","def","Object","keys","objectType","properties","apiName","propertyParameters","filter","id","type","primaryKeyPropertyApiName","parameterNames","Set","parameterConfiguration","forEach","param","add","actionApiName","split","pop","parameterOrdering","includes","unshift","parameters","p","defaultValue","undefined","objectParameterPropertyValue","parameterId","propertyTypeId","mappings","fromEntries","entries","nonParameterMappings","map","value","displayName","status","rules","modifyObjectRule","objectToModify","propertyValues","structFieldValues","entities","affectedInterfaceTypes","affectedObjectTypes","affectedLinkTypes","typeGroups","actionLevelValidation","validation","defaultFormat","enableLayoutSwitch","displayAndFormat","sections","section","submissionMetadata"],"sources":["defineModifyObjectAction.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 { convertMappingValue } from \"../conversion/toMarketplace/convertMappingValue.js\";\nimport { type ActionType } from \"./action/ActionType.js\";\nimport type { ActionTypeUserDefinition } from \"./defineAction.js\";\nimport {\n convertValidationRule,\n createDefaultParameterOrdering,\n createParameters,\n defineAction,\n isPropertyParameter,\n kebab,\n MODIFY_OBJECT_PARAMETER,\n validateActionParameters,\n validateParameterOrdering,\n} from \"./defineAction.js\";\n\nexport function defineModifyObjectAction(\n def: ActionTypeUserDefinition,\n): ActionType {\n validateActionParameters(\n def,\n Object.keys(def.objectType.properties ?? {}),\n def.objectType.apiName,\n );\n const propertyParameters = Object.keys(def.objectType.properties ?? {})\n .filter(\n id =>\n isPropertyParameter(def, id, def.objectType.properties?.[id].type!)\n && id !== def.objectType.primaryKeyPropertyApiName,\n );\n const parameterNames = new Set(propertyParameters);\n Object.keys(def.parameterConfiguration ?? {}).forEach(param =>\n parameterNames.add(param)\n );\n parameterNames.add(MODIFY_OBJECT_PARAMETER);\n const actionApiName = def.apiName\n ?? `modify-object-${\n kebab(def.objectType.apiName.split(\".\").pop() ?? def.objectType.apiName)\n }`;\n if (def.parameterOrdering) {\n if (!def.parameterOrdering.includes(MODIFY_OBJECT_PARAMETER)) {\n def.parameterOrdering.unshift(MODIFY_OBJECT_PARAMETER);\n }\n validateParameterOrdering(\n def.parameterOrdering,\n parameterNames,\n actionApiName,\n );\n }\n const parameters = createParameters(\n def,\n def.objectType.properties ?? {},\n parameterNames,\n );\n parameters.forEach(\n p => {\n if (p.id !== MODIFY_OBJECT_PARAMETER && p.defaultValue === undefined) {\n p.defaultValue = {\n type: \"objectParameterPropertyValue\",\n objectParameterPropertyValue: {\n parameterId: MODIFY_OBJECT_PARAMETER,\n propertyTypeId: p.id,\n },\n };\n }\n },\n );\n\n const mappings = Object.fromEntries(\n Object.entries(def.nonParameterMappings ?? {}).map((\n [id, value],\n ) => [id, convertMappingValue(value)]),\n );\n\n return defineAction({\n apiName: actionApiName,\n displayName: def.displayName ?? `Modify ${def.objectType.displayName}`,\n parameters: parameters,\n status: def.status ?? \"active\",\n rules: [{\n type: \"modifyObjectRule\",\n modifyObjectRule: {\n objectToModify: MODIFY_OBJECT_PARAMETER,\n propertyValues: {\n ...Object.fromEntries(\n propertyParameters.map(\n p => [p, { type: \"parameterId\", parameterId: p }],\n ),\n ),\n ...mappings,\n },\n structFieldValues: {},\n },\n }],\n entities: {\n affectedInterfaceTypes: [],\n affectedObjectTypes: [def.objectType.apiName],\n affectedLinkTypes: [],\n typeGroups: [],\n },\n parameterOrdering: def.parameterOrdering\n ?? createDefaultParameterOrdering(\n def,\n Object.keys(def.objectType.properties ?? {}),\n parameters,\n MODIFY_OBJECT_PARAMETER,\n ),\n ...(def.actionLevelValidation\n ? {\n validation: convertValidationRule(\n def.actionLevelValidation,\n parameters,\n ),\n }\n : {}),\n ...(def.defaultFormat && { defaultFormat: def.defaultFormat }),\n ...(def.enableLayoutSwitch\n && { enableLayoutSwitch: def.enableLayoutSwitch }),\n ...(def.displayAndFormat && { displayAndFormat: def.displayAndFormat }),\n ...(def.sections\n && {\n sections: Object.fromEntries(\n def.sections.map(section => [section.id, section]),\n ),\n }),\n ...(def.submissionMetadata\n && { submissionMetadata: def.submissionMetadata }),\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,mBAAmB,QAAQ,oDAAoD;AAGxF,SACEC,qBAAqB,EACrBC,8BA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