@osdk/functions 1.5.1 → 1.5.2
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 +6 -0
- package/build/browser/aliases/aliases.test.js +191 -0
- package/build/browser/aliases/aliases.test.js.map +1 -0
- package/build/browser/aliases/custom.js +26 -0
- package/build/browser/aliases/custom.js.map +1 -0
- package/build/browser/aliases/environment.js +48 -0
- package/build/browser/aliases/environment.js.map +1 -0
- package/build/browser/aliases/index.js +19 -0
- package/build/browser/aliases/index.js.map +1 -0
- package/build/browser/aliases/loaders.js +66 -0
- package/build/browser/aliases/loaders.js.map +1 -0
- package/build/browser/aliases/model.js +26 -0
- package/build/browser/aliases/model.js.map +1 -0
- package/build/browser/aliases/types.js +30 -0
- package/build/browser/aliases/types.js.map +1 -0
- package/build/browser/index.js +1 -0
- package/build/browser/index.js.map +1 -1
- package/build/cjs/index.cjs +133 -0
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +20 -1
- package/build/esm/aliases/aliases.test.js +191 -0
- package/build/esm/aliases/aliases.test.js.map +1 -0
- package/build/esm/aliases/custom.js +26 -0
- package/build/esm/aliases/custom.js.map +1 -0
- package/build/esm/aliases/environment.js +48 -0
- package/build/esm/aliases/environment.js.map +1 -0
- package/build/esm/aliases/index.js +19 -0
- package/build/esm/aliases/index.js.map +1 -0
- package/build/esm/aliases/loaders.js +66 -0
- package/build/esm/aliases/loaders.js.map +1 -0
- package/build/esm/aliases/model.js +26 -0
- package/build/esm/aliases/model.js.map +1 -0
- package/build/esm/aliases/types.js +30 -0
- package/build/esm/aliases/types.js.map +1 -0
- package/build/esm/index.js +1 -0
- package/build/esm/index.js.map +1 -1
- package/build/types/aliases/aliases.test.d.ts +1 -0
- package/build/types/aliases/aliases.test.d.ts.map +1 -0
- package/build/types/aliases/custom.d.ts +3 -0
- package/build/types/aliases/custom.d.ts.map +1 -0
- package/build/types/aliases/environment.d.ts +6 -0
- package/build/types/aliases/environment.d.ts.map +1 -0
- package/build/types/aliases/index.d.ts +2 -0
- package/build/types/aliases/index.d.ts.map +1 -0
- package/build/types/aliases/loaders.d.ts +3 -0
- package/build/types/aliases/loaders.d.ts.map +1 -0
- package/build/types/aliases/model.d.ts +3 -0
- package/build/types/aliases/model.d.ts.map +1 -0
- package/build/types/aliases/types.d.ts +40 -0
- package/build/types/aliases/types.d.ts.map +1 -0
- package/build/types/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2026 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 * from \"./custom.js\";\nexport * from \"./model.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,aAAa;AAC3B,cAAc,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 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 * as fs from "fs";
|
|
18
|
+
import { detectEnvironment, getAliasesFilePath, getResourcesFilePath } from "./environment.js";
|
|
19
|
+
import { AliasEnvironment } from "./types.js";
|
|
20
|
+
let cachedPublishedAliases;
|
|
21
|
+
function loadPublishedAliases() {
|
|
22
|
+
if (cachedPublishedAliases !== undefined) {
|
|
23
|
+
return cachedPublishedAliases;
|
|
24
|
+
}
|
|
25
|
+
const aliasesPath = getAliasesFilePath();
|
|
26
|
+
if (!fs.existsSync(aliasesPath)) {
|
|
27
|
+
throw new Error(`Aliases file not found at ${aliasesPath}`);
|
|
28
|
+
}
|
|
29
|
+
const data = fs.readFileSync(aliasesPath, "utf-8");
|
|
30
|
+
const aliasesFile = JSON.parse(data);
|
|
31
|
+
cachedPublishedAliases = {
|
|
32
|
+
custom: aliasesFile.defaults.custom,
|
|
33
|
+
models: Object.fromEntries(Object.entries(aliasesFile.defaults.models).map(([alias, {
|
|
34
|
+
id: identifier
|
|
35
|
+
}]) => [alias, identifier]))
|
|
36
|
+
};
|
|
37
|
+
return cachedPublishedAliases;
|
|
38
|
+
}
|
|
39
|
+
function loadPreviewAliases() {
|
|
40
|
+
const resourcesPath = getResourcesFilePath();
|
|
41
|
+
if (!fs.existsSync(resourcesPath)) {
|
|
42
|
+
throw new Error(`Resources file not found at ${resourcesPath}`);
|
|
43
|
+
}
|
|
44
|
+
const data = fs.readFileSync(resourcesPath, "utf-8");
|
|
45
|
+
const resourcesFile = JSON.parse(data);
|
|
46
|
+
return {
|
|
47
|
+
custom: resourcesFile.resources.custom,
|
|
48
|
+
models: Object.fromEntries(resourcesFile.resources.models.filter(model => model.alias != null).map(({
|
|
49
|
+
alias,
|
|
50
|
+
identifier
|
|
51
|
+
}) => [alias, identifier]))
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export function resetPublishedCache() {
|
|
55
|
+
cachedPublishedAliases = undefined;
|
|
56
|
+
}
|
|
57
|
+
export function loadResolvedAliases() {
|
|
58
|
+
const environment = detectEnvironment();
|
|
59
|
+
switch (environment) {
|
|
60
|
+
case AliasEnvironment.PUBLISHED:
|
|
61
|
+
return loadPublishedAliases();
|
|
62
|
+
case AliasEnvironment.LIVE_PREVIEW:
|
|
63
|
+
return loadPreviewAliases();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=loaders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loaders.js","names":["fs","detectEnvironment","getAliasesFilePath","getResourcesFilePath","AliasEnvironment","cachedPublishedAliases","loadPublishedAliases","undefined","aliasesPath","existsSync","Error","data","readFileSync","aliasesFile","JSON","parse","custom","defaults","models","Object","fromEntries","entries","map","alias","id","identifier","loadPreviewAliases","resourcesPath","resourcesFile","resources","filter","model","resetPublishedCache","loadResolvedAliases","environment","PUBLISHED","LIVE_PREVIEW"],"sources":["loaders.ts"],"sourcesContent":["/*\n * Copyright 2026 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 * as fs from \"fs\";\nimport {\n detectEnvironment,\n getAliasesFilePath,\n getResourcesFilePath,\n} from \"./environment.js\";\nimport { AliasEnvironment } from \"./types.js\";\nimport type {\n AliasesFile,\n Model,\n ModelResource,\n ResolvedAliases,\n ResourcesFile,\n} from \"./types.js\";\n\nlet cachedPublishedAliases: ResolvedAliases | undefined;\n\nfunction loadPublishedAliases(): ResolvedAliases {\n if (cachedPublishedAliases !== undefined) {\n return cachedPublishedAliases;\n }\n const aliasesPath = getAliasesFilePath();\n if (!fs.existsSync(aliasesPath)) {\n throw new Error(`Aliases file not found at ${aliasesPath}`);\n }\n\n const data = fs.readFileSync(aliasesPath, \"utf-8\");\n const aliasesFile = JSON.parse(data) as AliasesFile;\n\n cachedPublishedAliases = {\n custom: aliasesFile.defaults.custom,\n models: Object.fromEntries<Model>(\n Object.entries(aliasesFile.defaults.models).map((\n [alias, { id: identifier }],\n ) => [alias, identifier]),\n ),\n };\n return cachedPublishedAliases;\n}\n\nfunction loadPreviewAliases(): ResolvedAliases {\n const resourcesPath = getResourcesFilePath();\n if (!fs.existsSync(resourcesPath)) {\n throw new Error(`Resources file not found at ${resourcesPath}`);\n }\n\n const data = fs.readFileSync(resourcesPath, \"utf-8\");\n const resourcesFile = JSON.parse(data) as ResourcesFile;\n\n return {\n custom: resourcesFile.resources.custom,\n models: Object.fromEntries<Model>(\n resourcesFile.resources.models\n .filter((model): model is ModelResource & { alias: string } =>\n model.alias != null\n )\n .map(({ alias, identifier }) => [alias, identifier]),\n ),\n };\n}\n\nexport function resetPublishedCache(): void {\n cachedPublishedAliases = undefined;\n}\n\nexport function loadResolvedAliases(): ResolvedAliases {\n const environment = detectEnvironment();\n switch (environment) {\n case AliasEnvironment.PUBLISHED:\n return loadPublishedAliases();\n case AliasEnvironment.LIVE_PREVIEW:\n return loadPreviewAliases();\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,EAAE,MAAM,IAAI;AACxB,SACEC,iBAAiB,EACjBC,kBAAkB,EAClBC,oBAAoB,QACf,kBAAkB;AACzB,SAASC,gBAAgB,QAAQ,YAAY;AAS7C,IAAIC,sBAAmD;AAEvD,SAASC,oBAAoBA,CAAA,EAAoB;EAC/C,IAAID,sBAAsB,KAAKE,SAAS,EAAE;IACxC,OAAOF,sBAAsB;EAC/B;EACA,MAAMG,WAAW,GAAGN,kBAAkB,CAAC,CAAC;EACxC,IAAI,CAACF,EAAE,CAACS,UAAU,CAACD,WAAW,CAAC,EAAE;IAC/B,MAAM,IAAIE,KAAK,CAAC,6BAA6BF,WAAW,EAAE,CAAC;EAC7D;EAEA,MAAMG,IAAI,GAAGX,EAAE,CAACY,YAAY,CAACJ,WAAW,EAAE,OAAO,CAAC;EAClD,MAAMK,WAAW,GAAGC,IAAI,CAACC,KAAK,CAACJ,IAAI,CAAgB;EAEnDN,sBAAsB,GAAG;IACvBW,MAAM,EAAEH,WAAW,CAACI,QAAQ,CAACD,MAAM;IACnCE,MAAM,EAAEC,MAAM,CAACC,WAAW,CACxBD,MAAM,CAACE,OAAO,CAACR,WAAW,CAACI,QAAQ,CAACC,MAAM,CAAC,CAACI,GAAG,CAAC,CAC9C,CAACC,KAAK,EAAE;MAAEC,EAAE,EAAEC;IAAW,CAAC,CAAC,KACxB,CAACF,KAAK,EAAEE,UAAU,CAAC,CAC1B;EACF,CAAC;EACD,OAAOpB,sBAAsB;AAC/B;AAEA,SAASqB,kBAAkBA,CAAA,EAAoB;EAC7C,MAAMC,aAAa,GAAGxB,oBAAoB,CAAC,CAAC;EAC5C,IAAI,CAACH,EAAE,CAACS,UAAU,CAACkB,aAAa,CAAC,EAAE;IACjC,MAAM,IAAIjB,KAAK,CAAC,+BAA+BiB,aAAa,EAAE,CAAC;EACjE;EAEA,MAAMhB,IAAI,GAAGX,EAAE,CAACY,YAAY,CAACe,aAAa,EAAE,OAAO,CAAC;EACpD,MAAMC,aAAa,GAAGd,IAAI,CAACC,KAAK,CAACJ,IAAI,CAAkB;EAEvD,OAAO;IACLK,MAAM,EAAEY,aAAa,CAACC,SAAS,CAACb,MAAM;IACtCE,MAAM,EAAEC,MAAM,CAACC,WAAW,CACxBQ,aAAa,CAACC,SAAS,CAACX,MAAM,CAC3BY,MAAM,CAAEC,KAAK,IACZA,KAAK,CAACR,KAAK,IAAI,IACjB,CAAC,CACAD,GAAG,CAAC,CAAC;MAAEC,KAAK;MAAEE;IAAW,CAAC,KAAK,CAACF,KAAK,EAAEE,UAAU,CAAC,CACvD;EACF,CAAC;AACH;AAEA,OAAO,SAASO,mBAAmBA,CAAA,EAAS;EAC1C3B,sBAAsB,GAAGE,SAAS;AACpC;AAEA,OAAO,SAAS0B,mBAAmBA,CAAA,EAAoB;EACrD,MAAMC,WAAW,GAAGjC,iBAAiB,CAAC,CAAC;EACvC,QAAQiC,WAAW;IACjB,KAAK9B,gBAAgB,CAAC+B,SAAS;MAC7B,OAAO7B,oBAAoB,CAAC,CAAC;IAC/B,KAAKF,gBAAgB,CAACgC,YAAY;MAChC,OAAOV,kBAAkB,CAAC,CAAC;EAC/B;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 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 { loadResolvedAliases } from "./loaders.js";
|
|
18
|
+
export function model(alias) {
|
|
19
|
+
const resolvedAliases = loadResolvedAliases();
|
|
20
|
+
if (!(alias in resolvedAliases.models)) {
|
|
21
|
+
const available = Object.keys(resolvedAliases.models);
|
|
22
|
+
throw new Error(`Model alias '${alias}' not found. Available aliases: [${available.join(", ")}]`);
|
|
23
|
+
}
|
|
24
|
+
return resolvedAliases.models[alias];
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.js","names":["loadResolvedAliases","model","alias","resolvedAliases","models","available","Object","keys","Error","join"],"sources":["model.ts"],"sourcesContent":["/*\n * Copyright 2026 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 { loadResolvedAliases } from \"./loaders.js\";\nimport type { Model } from \"./types.js\";\nexport type { Model } from \"./types.js\";\n\nexport function model(alias: string): Model {\n const resolvedAliases = loadResolvedAliases();\n\n if (!(alias in resolvedAliases.models)) {\n const available = Object.keys(resolvedAliases.models);\n throw new Error(\n `Model alias '${alias}' not found. Available aliases: [${\n available.join(\", \")\n }]`,\n );\n }\n\n return resolvedAliases.models[alias];\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,mBAAmB,QAAQ,cAAc;AAIlD,OAAO,SAASC,KAAKA,CAACC,KAAa,EAAS;EAC1C,MAAMC,eAAe,GAAGH,mBAAmB,CAAC,CAAC;EAE7C,IAAI,EAAEE,KAAK,IAAIC,eAAe,CAACC,MAAM,CAAC,EAAE;IACtC,MAAMC,SAAS,GAAGC,MAAM,CAACC,IAAI,CAACJ,eAAe,CAACC,MAAM,CAAC;IACrD,MAAM,IAAII,KAAK,CACb,gBAAgBN,KAAK,oCACnBG,SAAS,CAACI,IAAI,CAAC,IAAI,CAAC,GAExB,CAAC;EACH;EAEA,OAAON,eAAe,CAACC,MAAM,CAACF,KAAK,CAAC;AACtC","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 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
|
+
// Types relevant to OSDK APIs
|
|
18
|
+
|
|
19
|
+
// Environment
|
|
20
|
+
|
|
21
|
+
export let AliasEnvironment = /*#__PURE__*/function (AliasEnvironment) {
|
|
22
|
+
AliasEnvironment["PUBLISHED"] = "PUBLISHED";
|
|
23
|
+
AliasEnvironment["LIVE_PREVIEW"] = "LIVE_PREVIEW";
|
|
24
|
+
return AliasEnvironment;
|
|
25
|
+
}({});
|
|
26
|
+
|
|
27
|
+
// Live preview mode types (resources.json)
|
|
28
|
+
|
|
29
|
+
// Published mode types (aliases.json)
|
|
30
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","names":["AliasEnvironment"],"sources":["types.ts"],"sourcesContent":["/*\n * Copyright 2026 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\n// Types relevant to OSDK APIs\n\nexport type Custom = string & { readonly __brand: \"Custom\" };\n\nexport interface Model {\n rid: string;\n}\n\nexport interface ResolvedAliases {\n custom: Record<string, string>;\n models: Record<string, Model>;\n}\n\n// Environment\n\nexport enum AliasEnvironment {\n PUBLISHED = \"PUBLISHED\",\n LIVE_PREVIEW = \"LIVE_PREVIEW\",\n}\n\n// Live preview mode types (resources.json)\n\nexport interface ModelResource {\n identifier: ModelIdentifier;\n verbs: string[];\n alias?: string | null;\n}\n\nexport interface ResourceScopes {\n custom: Record<string, string>;\n models: ModelResource[];\n}\n\nexport interface ResourcesFile {\n resources: ResourceScopes;\n}\n\n// Published mode types (aliases.json)\n\nexport interface ModelIdentifier {\n rid: string;\n}\n\nexport interface ModelValue {\n id: ModelIdentifier;\n}\n\nexport interface DefaultAliases {\n custom: Record<string, string>;\n models: Record<string, ModelValue>;\n}\n\nexport interface AliasesFile {\n defaults: DefaultAliases;\n version: number;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAaA;;AAEA,WAAYA,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;;AAK5B;;AAiBA","ignoreList":[]}
|
package/build/esm/index.js
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
export * as Aliases from "./aliases/index.js";
|
|
17
18
|
export { createEditBatch } from "./edits/createEditBatch.js";
|
|
18
19
|
export { UserFacingError } from "./errors/UserFacingError.js";
|
|
19
20
|
export { uploadMedia } from "./helpers/uploadMedia.js";
|
package/build/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["createEditBatch","UserFacingError","uploadMedia"],"sources":["index.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\nexport type {\n DateISOString,\n Double,\n Float,\n Integer,\n Long,\n TimestampISOString,\n} from \"./PrimitiveTypes.js\";\n\nexport type {\n Attachment,\n MediaReference,\n MediaUpload,\n Range,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n} from \"@osdk/client\";\n\nexport { createEditBatch } from \"./edits/createEditBatch.js\";\nexport type { EditBatch } from \"./edits/EditBatch.js\";\nexport type { Edits } from \"./edits/types.js\";\nexport { UserFacingError } from \"./errors/UserFacingError.js\";\nexport { uploadMedia } from \"./helpers/uploadMedia.js\";\n\nexport type {\n EmailNotification,\n Notification,\n NotificationLink,\n NotificationLinkTarget,\n ObjectLinkTarget,\n PlatformNotification,\n RidLinkTarget,\n UrlLinkTarget,\n} from \"./Notification.js\";\n\nexport type { ClassificationMarking, MandatoryMarking } from \"./Markings.js\";\nexport type { GroupId, Principal, UserId } from \"./UserGroup.js\";\n\nexport type { Geometry, Point } from \"geojson\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoBA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["Aliases","createEditBatch","UserFacingError","uploadMedia"],"sources":["index.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\nexport type {\n DateISOString,\n Double,\n Float,\n Integer,\n Long,\n TimestampISOString,\n} from \"./PrimitiveTypes.js\";\n\nexport type {\n Attachment,\n MediaReference,\n MediaUpload,\n Range,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n} from \"@osdk/client\";\n\nexport * as Aliases from \"./aliases/index.js\";\nexport { createEditBatch } from \"./edits/createEditBatch.js\";\nexport type { EditBatch } from \"./edits/EditBatch.js\";\nexport type { Edits } from \"./edits/types.js\";\nexport { UserFacingError } from \"./errors/UserFacingError.js\";\nexport { uploadMedia } from \"./helpers/uploadMedia.js\";\n\nexport type {\n EmailNotification,\n Notification,\n NotificationLink,\n NotificationLinkTarget,\n ObjectLinkTarget,\n PlatformNotification,\n RidLinkTarget,\n UrlLinkTarget,\n} from \"./Notification.js\";\n\nexport type { ClassificationMarking, MandatoryMarking } from \"./Markings.js\";\nexport type { GroupId, Principal, UserId } from \"./UserGroup.js\";\n\nexport type { Geometry, Point } from \"geojson\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoBA,OAAO,KAAKA,OAAO,MAAM,oBAAoB;AAC7C,SAASC,eAAe,QAAQ,4BAA4B;AAG5D,SAASC,eAAe,QAAQ,6BAA6B;AAC7D,SAASC,WAAW,QAAQ,0BAA0B","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"","names":[],"sources":["../../../src/aliases/aliases.test.ts"],"version":3,"file":"aliases.test.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAiBA,cAAc,cAAc,YAAa;AACzC,cAAc,cAAc;AAE5B,OAAO,iBAAS,OAAOA,gBAAgB","names":["alias: string"],"sources":["../../../src/aliases/custom.ts"],"version":3,"file":"custom.d.ts"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AliasEnvironment } from "./types.js";
|
|
2
|
+
export declare const ALIASES_JSON_FILE_ENV_VAR = "ALIASES_JSON_FILE";
|
|
3
|
+
export declare const RESOURCES_JSON_FILE_ENV_VAR = "RESOURCES_JSON_FILE";
|
|
4
|
+
export declare function detectEnvironment(): AliasEnvironment;
|
|
5
|
+
export declare function getAliasesFilePath(): string;
|
|
6
|
+
export declare function getResourcesFilePath(): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,SAAS,wBAAwB,YAAa;AAE9C,OAAO,cAAM,4BAA4B;AACzC,OAAO,cAAM,8BAA8B;AAE3C,OAAO,iBAAS,qBAAqB;AAuBrC,OAAO,iBAAS;AAUhB,OAAO,iBAAS","names":[],"sources":["../../../src/aliases/environment.ts"],"version":3,"file":"environment.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cAAc;AACd,cAAc","names":[],"sources":["../../../src/aliases/index.ts"],"version":3,"file":"index.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAuBA,cAIE,uBAEK,YAAa;AAgDpB,OAAO,iBAAS;AAIhB,OAAO,iBAAS,uBAAuB","names":[],"sources":["../../../src/aliases/loaders.ts"],"version":3,"file":"loaders.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAiBA,cAAc,aAAa,YAAa;AACxC,cAAc,aAAa;AAE3B,OAAO,iBAAS,MAAMA,gBAAgB","names":["alias: string"],"sources":["../../../src/aliases/model.ts"],"version":3,"file":"model.d.ts"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export type Custom = string & {
|
|
2
|
+
readonly __brand: "Custom"
|
|
3
|
+
};
|
|
4
|
+
export interface Model {
|
|
5
|
+
rid: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ResolvedAliases {
|
|
8
|
+
custom: Record<string, string>;
|
|
9
|
+
models: Record<string, Model>;
|
|
10
|
+
}
|
|
11
|
+
export declare enum AliasEnvironment {
|
|
12
|
+
PUBLISHED = "PUBLISHED",
|
|
13
|
+
LIVE_PREVIEW = "LIVE_PREVIEW"
|
|
14
|
+
}
|
|
15
|
+
export interface ModelResource {
|
|
16
|
+
identifier: ModelIdentifier;
|
|
17
|
+
verbs: string[];
|
|
18
|
+
alias?: string | null;
|
|
19
|
+
}
|
|
20
|
+
export interface ResourceScopes {
|
|
21
|
+
custom: Record<string, string>;
|
|
22
|
+
models: ModelResource[];
|
|
23
|
+
}
|
|
24
|
+
export interface ResourcesFile {
|
|
25
|
+
resources: ResourceScopes;
|
|
26
|
+
}
|
|
27
|
+
export interface ModelIdentifier {
|
|
28
|
+
rid: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ModelValue {
|
|
31
|
+
id: ModelIdentifier;
|
|
32
|
+
}
|
|
33
|
+
export interface DefaultAliases {
|
|
34
|
+
custom: Record<string, string>;
|
|
35
|
+
models: Record<string, ModelValue>;
|
|
36
|
+
}
|
|
37
|
+
export interface AliasesFile {
|
|
38
|
+
defaults: DefaultAliases;
|
|
39
|
+
version: number;
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAkBA,YAAY,kBAAkB;UAAW,SAAS;AAAU;AAE5D,iBAAiB,MAAM;CACrB;AACD;AAED,iBAAiB,gBAAgB;CAC/B,QAAQ;CACR,QAAQ,eAAe;AACxB;AAID,oBAAY,iBAAiB;CAC3B;CACA;AACD;AAID,iBAAiB,cAAc;CAC7B,YAAY;CACZ;CACA;AACD;AAED,iBAAiB,eAAe;CAC9B,QAAQ;CACR,QAAQ;AACT;AAED,iBAAiB,cAAc;CAC7B,WAAW;AACZ;AAID,iBAAiB,gBAAgB;CAC/B;AACD;AAED,iBAAiB,WAAW;CAC1B,IAAI;AACL;AAED,iBAAiB,eAAe;CAC9B,QAAQ;CACR,QAAQ,eAAe;AACxB;AAED,iBAAiB,YAAY;CAC3B,UAAU;CACV;AACD","names":[],"sources":["../../../src/aliases/types.ts"],"version":3,"file":"types.d.ts"}
|
package/build/types/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type { DateISOString, Double, Float, Integer, Long, TimestampISOString } from "./PrimitiveTypes.js";
|
|
2
2
|
export type { Attachment, MediaReference, MediaUpload, Range, ThreeDimensionalAggregation, TwoDimensionalAggregation } from "@osdk/client";
|
|
3
|
+
export * as Aliases from "./aliases/index.js";
|
|
3
4
|
export { createEditBatch } from "./edits/createEditBatch.js";
|
|
4
5
|
export type { EditBatch } from "./edits/EditBatch.js";
|
|
5
6
|
export type { Edits } from "./edits/types.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cACE,eACA,QACA,OACA,SACA,MACA,0BACK;AAEP,cACE,YACA,gBACA,aACA,OACA,6BACA,iCACK;AAEP,SAAS,uBAAuB;AAChC,cAAc,iBAAiB;AAC/B,cAAc,aAAa;AAC3B,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAE5B,cACE,mBACA,cACA,kBACA,wBACA,kBACA,sBACA,eACA,qBACK;AAEP,cAAc,uBAAuB,wBAAwB;AAC7D,cAAc,SAAS,WAAW,cAAc;AAEhD,cAAc,UAAU,aAAa","names":[],"sources":["../../src/index.ts"],"version":3,"file":"index.d.ts"}
|
|
1
|
+
{"mappings":"AAgBA,cACE,eACA,QACA,OACA,SACA,MACA,0BACK;AAEP,cACE,YACA,gBACA,aACA,OACA,6BACA,iCACK;AAEP,YAAY,aAAa;AACzB,SAAS,uBAAuB;AAChC,cAAc,iBAAiB;AAC/B,cAAc,aAAa;AAC3B,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAE5B,cACE,mBACA,cACA,kBACA,wBACA,kBACA,sBACA,eACA,qBACK;AAEP,cAAc,uBAAuB,wBAAwB;AAC7D,cAAc,SAAS,WAAW,cAAc;AAEhD,cAAc,UAAU,aAAa","names":[],"sources":["../../src/index.ts"],"version":3,"file":"index.d.ts"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/functions",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"yaml": "^2.8.1"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"@osdk/client": "^2.7.
|
|
66
|
+
"@osdk/client": "^2.7.5"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@microsoft/api-documenter": "^7.26.32",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"p-defer": "^4.0.1",
|
|
74
74
|
"ts-expect": "^1.3.0",
|
|
75
75
|
"typescript": "~5.5.4",
|
|
76
|
+
"@osdk/client.test.ontology": "~2.7.5",
|
|
76
77
|
"@osdk/monorepo.api-extractor": "~0.6.0",
|
|
77
|
-
"@osdk/client.test.ontology": "~2.7.1",
|
|
78
78
|
"@osdk/monorepo.tsconfig": "~0.6.0",
|
|
79
79
|
"@osdk/shared.test": "~2.7.0"
|
|
80
80
|
},
|