@osdk/faux 0.13.0 → 0.14.0
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 +12 -0
- package/build/browser/FauxFoundry/typeHelpers/TH_ActionDefinition.js.map +1 -1
- package/build/browser/FauxFoundry/typeHelpers/TH_ActionTypeV2.js +6 -2
- package/build/browser/FauxFoundry/typeHelpers/TH_ActionTypeV2.js.map +1 -1
- package/build/cjs/index.cjs +6 -2
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +2 -2
- package/build/esm/FauxFoundry/typeHelpers/TH_ActionDefinition.js.map +1 -1
- package/build/esm/FauxFoundry/typeHelpers/TH_ActionTypeV2.js +6 -2
- package/build/esm/FauxFoundry/typeHelpers/TH_ActionTypeV2.js.map +1 -1
- package/build/types/FauxFoundry/typeHelpers/TH_ActionDefinition.d.ts +2 -2
- package/build/types/FauxFoundry/typeHelpers/TH_ActionDefinition.d.ts.map +1 -1
- package/build/types/FauxFoundry/typeHelpers/TH_ActionTypeV2.d.ts +1 -1
- package/build/types/FauxFoundry/typeHelpers/TH_ActionTypeV2.d.ts.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @osdk/shared.test
|
|
2
2
|
|
|
3
|
+
## 0.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 9be8339: Polish ActionForm date/time controls, boolean switch fields, form submission, popup positioning, component tokens, and FauxFoundry action typings.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [147166c]
|
|
12
|
+
- @osdk/api@2.17.0
|
|
13
|
+
- @osdk/generator-converters@2.17.0
|
|
14
|
+
|
|
3
15
|
## 0.13.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TH_ActionDefinition.js","names":[],"sources":["TH_ActionDefinition.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 {\n ActionDefinition,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n DataValueClientToWire,\n} from \"@osdk/api\";\nimport type { ActionParameterV2, ParameterId } from \"@osdk/foundry.ontologies\";\nimport type {
|
|
1
|
+
{"version":3,"file":"TH_ActionDefinition.js","names":[],"sources":["TH_ActionDefinition.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 {\n ActionDefinition,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n DataValueClientToWire,\n} from \"@osdk/api\";\nimport type { ActionParameterV2, ParameterId } from \"@osdk/foundry.ontologies\";\nimport type {\n SimpleActionParamTypes,\n TH_ActionParameterV2,\n} from \"./TH_ActionParameterV2.js\";\nimport type { TH_ActionTypeV2 } from \"./TH_ActionTypeV2.js\";\n\n/**\n * Helper type for converting a \"const\" `ActionTypeV2` into a \"const\"\n * `ActionDefinition` for compile time checks\n */\nexport interface TH_ActionDefinition<\n X extends TH_ActionTypeV2<Record<ParameterId, ActionParameterV2>>,\n> extends ActionDefinition<any> {\n __DefinitionMetadata: TH_ActionMetadata<X>;\n}\n\nexport interface TH_ActionMetadata<\n X extends TH_ActionTypeV2<Record<ParameterId, ActionParameterV2>>,\n> extends ActionMetadata {\n parameters: X extends TH_ActionTypeV2<infer P> ? {\n [K in keyof P]: P[K] extends TH_ActionParameterV2<infer APT, infer R>\n ? (APT extends SimpleActionParamTypes ? {\n multiplicity: false;\n nullable: R extends true ? false : true;\n type: APT;\n }\n : never)\n : never;\n }\n : never;\n\n // not part of ActionMetadata but used for types in @osdk/client\n signatures: Signatures<TH_ActionMetadata<X>[\"parameters\"]>;\n}\ninterface Signatures<X extends Record<any, ActionMetadata.Parameter<any>>> {\n applyAction: ActionSignature<X>;\n\n batchApplyAction: <\n A extends OsdkActionParameters<X>[],\n OP extends ApplyBatchActionOptions,\n >(args: A, options?: OP) => Promise<ActionReturnTypeForOptions<OP>>;\n}\ntype BaseType<APD extends Pick<ActionMetadata.Parameter<any>, \"type\">> =\n APD[\"type\"] extends ActionMetadata.DataType.Object<infer TTargetType>\n ? ActionParam.ObjectType<TTargetType>\n : APD[\"type\"] extends ActionMetadata.DataType.ObjectSet<infer TTargetType>\n ? ActionParam.ObjectSetType<TTargetType>\n : APD[\"type\"] extends ActionMetadata.DataType.Struct<infer TStructType>\n ? ActionParam.StructType<TStructType>\n : APD[\"type\"] extends keyof DataValueClientToWire\n ? ActionParam.PrimitiveType<APD[\"type\"]>\n : never;\ntype ActionSignature<\n X extends Record<any, ActionMetadata.Parameter<any>>,\n> = <\n A extends OsdkActionParameters<X>,\n OP extends ApplyActionOptions,\n>(\n args: A,\n options?: OP,\n) => Promise<\n ActionReturnTypeForOptions<OP>\n>;\ntype ActionParametersDefinition = Record<\n any,\n ActionMetadata.Parameter<any>\n>;\ntype OsdkActionParameters<\n X extends ActionParametersDefinition,\n> = PartialBy<FullParams<X>, NullableParamKeys<X>>;\ntype NullableParamKeys<T extends Record<string, { nullable?: boolean }>> =\n keyof {\n [K in keyof T as T[K][\"nullable\"] extends true ? K : never]: \"\";\n };\ntype FullParams<X extends ActionParametersDefinition> = {\n [P in keyof X]: MaybeArrayType<X[P]>;\n};\ntype PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\ntype MaybeArrayType<APD extends ActionMetadata.Parameter<any>> =\n APD[\"multiplicity\"] extends true ? Array<BaseType<APD>> : BaseType<APD>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -21,7 +21,8 @@ export function createAction({
|
|
|
21
21
|
rid = createActionRid(),
|
|
22
22
|
operations = [],
|
|
23
23
|
status = "ACTIVE",
|
|
24
|
-
description
|
|
24
|
+
description,
|
|
25
|
+
displayName
|
|
25
26
|
}) {
|
|
26
27
|
return {
|
|
27
28
|
apiName,
|
|
@@ -29,7 +30,10 @@ export function createAction({
|
|
|
29
30
|
rid,
|
|
30
31
|
operations,
|
|
31
32
|
status,
|
|
32
|
-
description: description ?? `Action ${apiName}
|
|
33
|
+
description: description ?? `Action ${apiName}`,
|
|
34
|
+
...(displayName === undefined ? {} : {
|
|
35
|
+
displayName
|
|
36
|
+
})
|
|
33
37
|
};
|
|
34
38
|
}
|
|
35
39
|
//# sourceMappingURL=TH_ActionTypeV2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TH_ActionTypeV2.js","names":["createActionRid","createAction","apiName","parameters","rid","operations","status","description"],"sources":["TH_ActionTypeV2.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 {\n ActionParameterV2,\n ActionTypeApiName,\n ActionTypeV2,\n ParameterId,\n} from \"@osdk/foundry.ontologies\";\nimport { createActionRid } from \"./ActionTypeBuilder.js\";\n\nexport interface TH_ActionTypeV2<\n P extends Record<ParameterId, ActionParameterV2>,\n> extends ActionTypeV2 {\n parameters: P;\n}\nexport function createAction<P extends Record<ParameterId, ActionParameterV2>>(\n {\n apiName,\n parameters,\n rid = createActionRid(),\n operations = [],\n status = \"ACTIVE\",\n description,\n }: Partial<Omit<ActionTypeV2, \"apiName\" | \"parameters\">> & {\n apiName: ActionTypeApiName;\n parameters: P;\n },\n): TH_ActionTypeV2<P> {\n return {\n apiName,\n parameters,\n rid,\n operations,\n status,\n description: description ?? `Action ${apiName}`,\n } as const;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SAASA,eAAe,QAAQ,wBAAwB;AAOxD,OAAO,SAASC,YAAYA,CAC1B;EACEC,OAAO;EACPC,UAAU;EACVC,GAAG,GAAGJ,eAAe,CAAC,CAAC;EACvBK,UAAU,GAAG,EAAE;EACfC,MAAM,GAAG,QAAQ;EACjBC;AAIF,CAAC,EACmB;EACpB,OAAO;
|
|
1
|
+
{"version":3,"file":"TH_ActionTypeV2.js","names":["createActionRid","createAction","apiName","parameters","rid","operations","status","description","displayName","undefined"],"sources":["TH_ActionTypeV2.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 {\n ActionParameterV2,\n ActionTypeApiName,\n ActionTypeV2,\n ParameterId,\n} from \"@osdk/foundry.ontologies\";\nimport { createActionRid } from \"./ActionTypeBuilder.js\";\n\nexport interface TH_ActionTypeV2<\n P extends Record<ParameterId, ActionParameterV2>,\n> extends ActionTypeV2 {\n parameters: P;\n}\nexport function createAction<P extends Record<ParameterId, ActionParameterV2>>(\n {\n apiName,\n parameters,\n rid = createActionRid(),\n operations = [],\n status = \"ACTIVE\",\n description,\n displayName,\n }: Partial<Omit<ActionTypeV2, \"apiName\" | \"parameters\">> & {\n apiName: ActionTypeApiName;\n parameters: P;\n },\n): TH_ActionTypeV2<P> {\n return {\n apiName,\n parameters,\n rid,\n operations,\n status,\n description: description ?? `Action ${apiName}`,\n ...(displayName === undefined ? {} : { displayName }),\n } as const;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SAASA,eAAe,QAAQ,wBAAwB;AAOxD,OAAO,SAASC,YAAYA,CAC1B;EACEC,OAAO;EACPC,UAAU;EACVC,GAAG,GAAGJ,eAAe,CAAC,CAAC;EACvBK,UAAU,GAAG,EAAE;EACfC,MAAM,GAAG,QAAQ;EACjBC,WAAW;EACXC;AAIF,CAAC,EACmB;EACpB,OAAO;IACLN,OAAO;IACPC,UAAU;IACVC,GAAG;IACHC,UAAU;IACVC,MAAM;IACNC,WAAW,EAAEA,WAAW,IAAI,UAAUL,OAAO,EAAE;IAC/C,IAAIM,WAAW,KAAKC,SAAS,GAAG,CAAC,CAAC,GAAG;MAAED;IAAY,CAAC;EACtD,CAAC;AACH","ignoreList":[]}
|
package/build/cjs/index.cjs
CHANGED
|
@@ -68,7 +68,8 @@ function createAction({
|
|
|
68
68
|
rid = createActionRid(),
|
|
69
69
|
operations = [],
|
|
70
70
|
status = "ACTIVE",
|
|
71
|
-
description
|
|
71
|
+
description,
|
|
72
|
+
displayName
|
|
72
73
|
}) {
|
|
73
74
|
return {
|
|
74
75
|
apiName,
|
|
@@ -76,7 +77,10 @@ function createAction({
|
|
|
76
77
|
rid,
|
|
77
78
|
operations,
|
|
78
79
|
status,
|
|
79
|
-
description: description ?? `Action ${apiName}
|
|
80
|
+
description: description ?? `Action ${apiName}`,
|
|
81
|
+
...displayName === void 0 ? {} : {
|
|
82
|
+
displayName
|
|
83
|
+
}
|
|
80
84
|
};
|
|
81
85
|
}
|
|
82
86
|
|