@osdk/functions 1.4.0-beta.2 → 1.4.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 (36) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/build/browser/helpers/uploadMedia.js +24 -0
  3. package/build/browser/helpers/uploadMedia.js.map +1 -0
  4. package/build/browser/index.js +1 -0
  5. package/build/browser/index.js.map +1 -1
  6. package/build/browser/public/unstable-do-not-use.js +1 -0
  7. package/build/browser/public/unstable-do-not-use.js.map +1 -1
  8. package/build/browser/utils/getApiGatewayBaseUrl.js +79 -0
  9. package/build/browser/utils/getApiGatewayBaseUrl.js.map +1 -0
  10. package/build/cjs/chunk-4DCWE2WY.cjs +105 -0
  11. package/build/cjs/chunk-4DCWE2WY.cjs.map +1 -0
  12. package/build/cjs/index.cjs +75 -1
  13. package/build/cjs/index.cjs.map +1 -1
  14. package/build/cjs/index.d.cts +5 -3
  15. package/build/cjs/public/unstable-do-not-use.cjs +44 -97
  16. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
  17. package/build/cjs/public/unstable-do-not-use.d.cts +18 -1
  18. package/build/esm/helpers/uploadMedia.js +24 -0
  19. package/build/esm/helpers/uploadMedia.js.map +1 -0
  20. package/build/esm/index.js +1 -0
  21. package/build/esm/index.js.map +1 -1
  22. package/build/esm/public/unstable-do-not-use.js +1 -0
  23. package/build/esm/public/unstable-do-not-use.js.map +1 -1
  24. package/build/esm/utils/getApiGatewayBaseUrl.js +79 -0
  25. package/build/esm/utils/getApiGatewayBaseUrl.js.map +1 -0
  26. package/build/types/helpers/uploadMedia.d.ts +2 -0
  27. package/build/types/helpers/uploadMedia.d.ts.map +1 -0
  28. package/build/types/index.d.ts +2 -1
  29. package/build/types/index.d.ts.map +1 -1
  30. package/build/types/public/unstable-do-not-use.d.ts +1 -0
  31. package/build/types/public/unstable-do-not-use.d.ts.map +1 -1
  32. package/build/types/utils/getApiGatewayBaseUrl.d.ts +16 -0
  33. package/build/types/utils/getApiGatewayBaseUrl.d.ts.map +1 -0
  34. package/package.json +11 -8
  35. package/build/cjs/chunk-Q7SFCCGT.cjs +0 -11
  36. package/build/cjs/chunk-Q7SFCCGT.cjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @osdk/functions
2
2
 
3
+ ## 1.4.0-beta.4
4
+
5
+ ### Minor Changes
6
+
7
+ - 7f9f123: Add foundry hostname util
8
+
9
+ ## 1.4.0-beta.3
10
+
11
+ ### Minor Changes
12
+
13
+ - a1ffb20: Use new ephemeral media upload endpoint.
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [a1ffb20]
18
+ - Updated dependencies [e62c692]
19
+ - @osdk/client@2.6.0-beta.8
20
+
3
21
  ## 1.4.0-beta.2
4
22
 
5
23
  ### Minor Changes
@@ -0,0 +1,24 @@
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 { MediaSets } from "@osdk/foundry.mediasets";
18
+ export function uploadMedia(client, mediaUpload) {
19
+ return MediaSets.uploadMedia(client, mediaUpload.data, {
20
+ filename: mediaUpload.fileName,
21
+ preview: true
22
+ });
23
+ }
24
+ //# sourceMappingURL=uploadMedia.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uploadMedia.js","names":["MediaSets","uploadMedia","client","mediaUpload","data","filename","fileName","preview"],"sources":["uploadMedia.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 { Client, MediaReference, MediaUpload } from \"@osdk/client\";\nimport { MediaSets } from \"@osdk/foundry.mediasets\";\n\nexport function uploadMedia(\n client: Client,\n mediaUpload: MediaUpload,\n): Promise<MediaReference> {\n return MediaSets.uploadMedia(client, mediaUpload.data, {\n filename: mediaUpload.fileName,\n preview: true,\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,SAAS,QAAQ,yBAAyB;AAEnD,OAAO,SAASC,WAAWA,CACzBC,MAAc,EACdC,WAAwB,EACC;EACzB,OAAOH,SAAS,CAACC,WAAW,CAACC,MAAM,EAAEC,WAAW,CAACC,IAAI,EAAE;IACrDC,QAAQ,EAAEF,WAAW,CAACG,QAAQ;IAC9BC,OAAO,EAAE;EACX,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -16,4 +16,5 @@
16
16
 
17
17
  export { createEditBatch } from "./edits/createEditBatch.js";
18
18
  export { UserFacingError } from "./errors/UserFacingError.js";
19
+ export { uploadMedia } from "./helpers/uploadMedia.js";
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["createEditBatch","UserFacingError"],"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 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\";\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;;AAkBA,SAASA,eAAe,QAAQ,4BAA4B;AAG5D,SAASC,eAAe,QAAQ,6BAA6B","ignoreList":[]}
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,SAASA,eAAe,QAAQ,4BAA4B;AAG5D,SAASC,eAAe,QAAQ,6BAA6B;AAC7D,SAASC,WAAW,QAAQ,0BAA0B","ignoreList":[]}
@@ -15,4 +15,5 @@
15
15
  */
16
16
 
17
17
  export { createWriteableClient } from "../transactions/createWriteableClient.js";
18
+ export { getApiGatewayBaseUrl } from "../utils/getApiGatewayBaseUrl.js";
18
19
  //# sourceMappingURL=unstable-do-not-use.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"unstable-do-not-use.js","names":["createWriteableClient"],"sources":["unstable-do-not-use.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 { createWriteableClient } from \"../transactions/createWriteableClient.js\";\nexport type { WriteableClient } from \"../transactions/WriteableClient.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,qBAAqB,QAAQ,0CAA0C","ignoreList":[]}
1
+ {"version":3,"file":"unstable-do-not-use.js","names":["createWriteableClient","getApiGatewayBaseUrl"],"sources":["unstable-do-not-use.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 { createWriteableClient } from \"../transactions/createWriteableClient.js\";\nexport type { WriteableClient } from \"../transactions/WriteableClient.js\";\nexport { getApiGatewayBaseUrl } from \"../utils/getApiGatewayBaseUrl.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,qBAAqB,QAAQ,0CAA0C;AAEhF,SAASC,oBAAoB,QAAQ,kCAAkC","ignoreList":[]}
@@ -0,0 +1,79 @@
1
+ /*
2
+ * Copyright 2024 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 { readFileSync } from "fs";
18
+ import { parse as parseYaml } from "yaml";
19
+ const FOUNDRY_SERVICE_DISCOVERY_V2_ENV_VAR = "FOUNDRY_SERVICE_DISCOVERY_V2";
20
+ const API_GATEWAY_SERVICE = "api-gateway";
21
+ /**
22
+ * Type guard to check if config is an object with uris property
23
+ */
24
+ function hasUrisProperty(config) {
25
+ return !Array.isArray(config) && "uris" in config && Array.isArray(config.uris) && config.uris.every(uri => typeof uri === "string");
26
+ }
27
+
28
+ /**
29
+ * Extracts URIs from either array or object format
30
+ */
31
+ function extractUris(config) {
32
+ return hasUrisProperty(config) ? config.uris : config;
33
+ }
34
+
35
+ /**
36
+ * Retrieves the API Gateway base URL from the Function's environment.
37
+ *
38
+ * This function is intended to be used only from within a function. Usage of this utility elsewhere may result
39
+ * in errors since the environment may not be properly configured.
40
+ *
41
+ * @returns The API Gateway base URL (e.g., "https://example.palantirfoundry.com")
42
+ * @throws Error if the API Gateway base URL has not been properly configured in the function's environment.
43
+ *
44
+ * @example
45
+ * ```typescript
46
+ * const baseUrl = getApiGatewayBaseUrl();
47
+ * // Returns: "https://example.palantirfoundry.com"
48
+ * ```
49
+ */
50
+ export function getApiGatewayBaseUrl() {
51
+ const filePath = process.env[FOUNDRY_SERVICE_DISCOVERY_V2_ENV_VAR];
52
+ if (!filePath) {
53
+ throw new Error(`${FOUNDRY_SERVICE_DISCOVERY_V2_ENV_VAR} environment variable is not set`);
54
+ }
55
+ let fileContent;
56
+ try {
57
+ fileContent = readFileSync(filePath, "utf-8");
58
+ } catch (error) {
59
+ const errorMessage = error instanceof Error ? error.message : String(error);
60
+ throw new Error(`Failed to read service discovery file at ${filePath}: ${errorMessage}`);
61
+ }
62
+ let discovery;
63
+ try {
64
+ discovery = parseYaml(fileContent);
65
+ } catch (error) {
66
+ const errorMessage = error instanceof Error ? error.message : String(error);
67
+ throw new Error(`Failed to parse service discovery YAML file at ${filePath}: ${errorMessage}`);
68
+ }
69
+ const apiGatewayConfig = discovery[API_GATEWAY_SERVICE];
70
+ if (!apiGatewayConfig) {
71
+ throw new Error(`${API_GATEWAY_SERVICE} service not found in service discovery file`);
72
+ }
73
+ const uris = extractUris(apiGatewayConfig);
74
+ if (uris.length === 0) {
75
+ throw new Error(`No URIs found for ${API_GATEWAY_SERVICE} service in service discovery file`);
76
+ }
77
+ return uris[0];
78
+ }
79
+ //# sourceMappingURL=getApiGatewayBaseUrl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getApiGatewayBaseUrl.js","names":["readFileSync","parse","parseYaml","FOUNDRY_SERVICE_DISCOVERY_V2_ENV_VAR","API_GATEWAY_SERVICE","hasUrisProperty","config","Array","isArray","uris","every","uri","extractUris","getApiGatewayBaseUrl","filePath","process","env","Error","fileContent","error","errorMessage","message","String","discovery","apiGatewayConfig","length"],"sources":["getApiGatewayBaseUrl.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { readFileSync } from \"fs\";\nimport { parse as parseYaml } from \"yaml\";\n\nconst FOUNDRY_SERVICE_DISCOVERY_V2_ENV_VAR =\n \"FOUNDRY_SERVICE_DISCOVERY_V2\" as const;\nconst API_GATEWAY_SERVICE = \"api-gateway\" as const;\n\ntype ServiceConfig = string[] | { uris: string[] };\n\ninterface ServiceDiscoveryConfig {\n [serviceName: string]: ServiceConfig;\n}\n\n/**\n * Type guard to check if config is an object with uris property\n */\nfunction hasUrisProperty(config: ServiceConfig): config is { uris: string[] } {\n return !Array.isArray(config)\n && \"uris\" in config\n && Array.isArray(config.uris)\n && config.uris.every((uri) => typeof uri === \"string\");\n}\n\n/**\n * Extracts URIs from either array or object format\n */\nfunction extractUris(config: ServiceConfig): string[] {\n return hasUrisProperty(config) ? config.uris : config;\n}\n\n/**\n * Retrieves the API Gateway base URL from the Function's environment.\n *\n * This function is intended to be used only from within a function. Usage of this utility elsewhere may result\n * in errors since the environment may not be properly configured.\n *\n * @returns The API Gateway base URL (e.g., \"https://example.palantirfoundry.com\")\n * @throws Error if the API Gateway base URL has not been properly configured in the function's environment.\n *\n * @example\n * ```typescript\n * const baseUrl = getApiGatewayBaseUrl();\n * // Returns: \"https://example.palantirfoundry.com\"\n * ```\n */\nexport function getApiGatewayBaseUrl(): string {\n const filePath = process.env[FOUNDRY_SERVICE_DISCOVERY_V2_ENV_VAR];\n\n if (!filePath) {\n throw new Error(\n `${FOUNDRY_SERVICE_DISCOVERY_V2_ENV_VAR} environment variable is not set`,\n );\n }\n\n let fileContent: string;\n try {\n fileContent = readFileSync(filePath, \"utf-8\");\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n throw new Error(\n `Failed to read service discovery file at ${filePath}: ${errorMessage}`,\n );\n }\n\n let discovery: ServiceDiscoveryConfig;\n try {\n discovery = parseYaml(fileContent) as ServiceDiscoveryConfig;\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n throw new Error(\n `Failed to parse service discovery YAML file at ${filePath}: ${errorMessage}`,\n );\n }\n\n const apiGatewayConfig = discovery[API_GATEWAY_SERVICE];\n\n if (!apiGatewayConfig) {\n throw new Error(\n `${API_GATEWAY_SERVICE} service not found in service discovery file`,\n );\n }\n\n const uris = extractUris(apiGatewayConfig);\n\n if (uris.length === 0) {\n throw new Error(\n `No URIs found for ${API_GATEWAY_SERVICE} service in service discovery file`,\n );\n }\n\n return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Y,EACvE,CAAC;EACH;EAEA,IAAIG,SAAiC;EACrC,IAAI;IACFA,SAAS,GAAGrB,SAAS,CAACgB,WAAW,CAA2B;EAC9D,CAAC,CAAC,OAAOC,KAAK,EAAE;IACd,MAAMC,YAAY,GAAGD,KAAK,YAAYF,KAAK,GAAGE,KAAK,CAACE,OAAO,GAAGC,MAAM,CAACH,KAAK,CAAC;IAC3E,MAAM,IAAIF,KAAK,CACb,kDAAkDH,QAAQ,KAAKM,YAAY,EAC7E,CAAC;EACH;EAEA,MAAMI,gBAAgB,GAAGD,SAAS,CAACnB,mBAAmB,CAAC;EAEvD,IAAI,CAACoB,gBAAgB,EAAE;IACrB,MAAM,IAAIP,KAAK,CACb,GAAGb,mBAAmB,8CACxB,CAAC;EACH;EAEA,MAAMK,IAAI,GAAGG,WAAW,CAACY,gBAAgB,CAAC;EAE1C,IAAIf,IAAI,CAACgB,MAAM,KAAK,CAAC,EAAE;IACrB,MAAM,IAAIR,KAAK,CACb,qBAAqBb,mBAAmB,oCAC1C,CAAC;EACH;EAEA,OAAOK,IAAI,CAAC,CAAC,CAAC;AAChB","ignoreList":[]}
@@ -0,0 +1,105 @@
1
+ 'use strict';
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __export = (target, all) => {
5
+ for (var name in all)
6
+ __defProp(target, name, { get: all[name], enumerable: true });
7
+ };
8
+
9
+ // ../../node_modules/.pnpm/@osdk+shared.client@1.0.1/node_modules/@osdk/shared.client/index.js
10
+ var symbolClientContext = Symbol("ClientContext");
11
+
12
+ // ../../node_modules/.pnpm/@osdk+shared.client2@1.0.0/node_modules/@osdk/shared.client2/index.js
13
+ var symbolClientContext2 = "__osdkClientContext";
14
+
15
+ // ../../node_modules/.pnpm/@osdk+shared.net.errors@2.5.0-beta.2/node_modules/@osdk/shared.net.errors/build/esm/PalantirApiError.js
16
+ var PalantirApiError = class extends Error {
17
+ constructor(message, errorName, errorCode, errorDescription, statusCode, errorInstanceId, parameters) {
18
+ super(message);
19
+ this.message = message;
20
+ this.errorName = errorName;
21
+ this.errorCode = errorCode;
22
+ this.errorDescription = errorDescription;
23
+ this.statusCode = statusCode;
24
+ this.errorInstanceId = errorInstanceId;
25
+ this.parameters = parameters;
26
+ }
27
+ };
28
+
29
+ // ../../node_modules/.pnpm/@osdk+shared.net.errors@2.5.0-beta.2/node_modules/@osdk/shared.net.errors/build/esm/UnknownError.js
30
+ var UnknownError = class extends PalantirApiError {
31
+ constructor(message, errorName, originalError, statusCode) {
32
+ super(message, errorName, void 0, void 0, statusCode);
33
+ this.originalError = originalError;
34
+ }
35
+ };
36
+
37
+ // ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.5.0/node_modules/@osdk/shared.net.platformapi/build/esm/foundryPlatformFetch.js
38
+ async function foundryPlatformFetch(client, [httpMethodNum, origPath, flags, contentType, responseContentType], ...args) {
39
+ const path = origPath.replace(/\{([^}]+)\}/g, () => encodeURIComponent(args.shift()));
40
+ const body = flags & 1 ? args.shift() : void 0;
41
+ const queryArgs = flags & 2 ? args.shift() : void 0;
42
+ const headerArgs = flags & 4 ? args.shift() : void 0;
43
+ const method = ["GET", "POST", "PUT", "DELETE", "PATCH"][httpMethodNum];
44
+ return await apiFetch(client[symbolClientContext2] ?? client[symbolClientContext] ?? client, method, path, body, queryArgs, headerArgs, contentType, responseContentType);
45
+ }
46
+ async function apiFetch(clientCtx, method, endpointPath, data, queryArguments, headers, requestMediaType, responseMediaType) {
47
+ const url = parseUrl(clientCtx.baseUrl, endpointPath);
48
+ for (const [key, value] of Object.entries(queryArguments || {})) {
49
+ if (value == null) {
50
+ continue;
51
+ }
52
+ if (Array.isArray(value)) {
53
+ for (const item of value) {
54
+ url.searchParams.append(key, item);
55
+ }
56
+ } else {
57
+ url.searchParams.append(key, value);
58
+ }
59
+ }
60
+ const headersInit = new Headers();
61
+ headersInit.set("Content-Type", requestMediaType ?? "application/json");
62
+ headersInit.set("Accept", responseMediaType ?? "application/json");
63
+ Object.entries(headers || {}).forEach(([key, value]) => {
64
+ if (key === "Content-Type" && typeof value === "string") {
65
+ headersInit.set("Content-Type", value);
66
+ } else if (key === "Accept" && typeof value === "string") {
67
+ headersInit.set("Accept", value);
68
+ } else if (value != null) {
69
+ headersInit.append(key, value.toString());
70
+ }
71
+ });
72
+ const body = data == null || data instanceof globalThis.Blob ? data : JSON.stringify(data);
73
+ const response = await clientCtx.fetch(url.toString(), {
74
+ body,
75
+ method,
76
+ headers: headersInit
77
+ });
78
+ if (!response.ok) {
79
+ try {
80
+ const convertedError = await response.json();
81
+ return new PalantirApiError(convertedError.message, convertedError.errorName, convertedError.errorCode, convertedError.errorDescription, response.status, convertedError.errorInstanceId, convertedError.parameters);
82
+ } catch (e) {
83
+ if (e instanceof Error) {
84
+ return new UnknownError(e.message, "UNKNOWN");
85
+ }
86
+ return new UnknownError("Unable to parse error response", "UNKNOWN");
87
+ }
88
+ }
89
+ if (response.status === 204) {
90
+ return;
91
+ }
92
+ if (responseMediaType == null || responseMediaType === "application/json") {
93
+ return await response.json();
94
+ }
95
+ return response;
96
+ }
97
+ function parseUrl(baseUrl, endpointPath) {
98
+ baseUrl += baseUrl.endsWith("/") ? "" : "/";
99
+ return new URL(`api${endpointPath}`, baseUrl);
100
+ }
101
+
102
+ exports.__export = __export;
103
+ exports.foundryPlatformFetch = foundryPlatformFetch;
104
+ //# sourceMappingURL=chunk-4DCWE2WY.cjs.map
105
+ //# sourceMappingURL=chunk-4DCWE2WY.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../node_modules/.pnpm/@osdk+shared.client@1.0.1/node_modules/@osdk/shared.client/index.js","../../../../node_modules/.pnpm/@osdk+shared.client2@1.0.0/node_modules/@osdk/shared.client2/index.js","../../../../node_modules/.pnpm/@osdk+shared.net.errors@2.5.0-beta.2/node_modules/@osdk/shared.net.errors/build/esm/PalantirApiError.js","../../../../node_modules/.pnpm/@osdk+shared.net.errors@2.5.0-beta.2/node_modules/@osdk/shared.net.errors/build/esm/UnknownError.js","../../../../node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AiB,eAAe,UAAU,CAAA;AAAA,aAC5M,CAAG,EAAA;AACV,MAAA,IAAI,aAAa,KAAO,EAAA;AACtB,QAAA,OAAO,IAAI,YAAA,CAAa,CAAE,CAAA,OAAA,EAAS,SAAS,CAAA;AAAA;AAE9C,MAAO,OAAA,IAAI,YAAa,CAAA,gCAAA,EAAkC,SAAS,CAAA;AAAA;AACrE;AAGF,EAAI,IAAA,QAAA,CAAS,WAAW,GAAK,EAAA;AAC3B,IAAA;AAAA;AAEF,EAAI,IAAA,iBAAA,IAAqB,IAAQ,IAAA,iBAAA,KAAsB,kBAAoB,EAAA;AACzE,IAAO,OAAA,MAAM,SAAS,IAAK,EAAA;AAAA;AAE7B,EAAO,OAAA,QAAA;AACT;AACO,SAAS,QAAA,CAAS,SAAS,YAAc,EAAA;AAC9C,EAAA,OAAA,IAAW,OAAQ,CAAA,QAAA,CAAS,GAAG,CAAA,GAAI,EAAK,GAAA,GAAA;AACxC,EAAA,OAAO,IAAI,GAAA,CAAI,CAAM,GAAA,EAAA,YAAY,IAAI,OAAO,CAAA;AAC9C","file":"chunk-4DCWE2WY.cjs","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 const symbolClientContext = Symbol(\"ClientContext\");","/*\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 const symbolClientContext = \"__osdkClientContext\";","/*\n * Copyright 2023 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 class PalantirApiError extends Error {\n constructor(message, errorName, errorCode, errorDescription, statusCode, errorInstanceId, parameters) {\n super(message);\n this.message = message;\n this.errorName = errorName;\n this.errorCode = errorCode;\n this.errorDescription = errorDescription;\n this.statusCode = statusCode;\n this.errorInstanceId = errorInstanceId;\n this.parameters = parameters;\n }\n}","/*\n * Copyright 2023 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 { PalantirApiError } from \"./PalantirApiError.js\";\nexport class UnknownError extends PalantirApiError {\n constructor(message, errorName, originalError, statusCode) {\n super(message, errorName, undefined, undefined, statusCode);\n this.originalError = originalError;\n }\n}","/*\n * Copyright 2023 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 */\nimport { symbolClientContext as oldSymbolClientContext } from \"@osdk/shared.client\";\nimport { symbolClientContext } from \"@osdk/shared.client2\";\nimport { PalantirApiError, UnknownError } from \"@osdk/shared.net.errors\";\nexport async function foundryPlatformFetch(client, [httpMethodNum, origPath, flags, contentType, responseContentType], ...args) {\n const path = origPath.replace(/\\{([^}]+)\\}/g, () => encodeURIComponent(args.shift()));\n const body = flags & 1 ? args.shift() : undefined;\n const queryArgs = flags & 2 ? args.shift() : undefined;\n const headerArgs = flags & 4 ? args.shift() : undefined;\n const method = [\"GET\", \"POST\", \"PUT\", \"DELETE\", \"PATCH\"][httpMethodNum];\n return await apiFetch(client[symbolClientContext] ?? client[oldSymbolClientContext] ?? client, method, path, body, queryArgs, headerArgs, contentType, responseContentType);\n}\nasync function apiFetch(clientCtx, method, endpointPath, data, queryArguments, headers, requestMediaType, responseMediaType) {\n const url = parseUrl(clientCtx.baseUrl, endpointPath);\n for (const [key, value] of Object.entries(queryArguments || {})) {\n if (value == null) {\n continue;\n }\n if (Array.isArray(value)) {\n for (const item of value) {\n url.searchParams.append(key, item);\n }\n } else {\n url.searchParams.append(key, value);\n }\n }\n const headersInit = new Headers();\n headersInit.set(\"Content-Type\", requestMediaType ?? \"application/json\");\n headersInit.set(\"Accept\", responseMediaType ?? \"application/json\");\n Object.entries(headers || {}).forEach(([key, value]) => {\n if (key === \"Content-Type\" && typeof value === \"string\") {\n headersInit.set(\"Content-Type\", value);\n } else if (key === \"Accept\" && typeof value === \"string\") {\n headersInit.set(\"Accept\", value);\n } else if (value != null) {\n headersInit.append(key, value.toString());\n }\n });\n const body = data == null || data instanceof globalThis.Blob ? data : JSON.stringify(data);\n // Because this uses the client's fetch, there is a 99.99% chance that it is already going\n // to handle the error case and throw a PalantirApiError since its wrapped in a\n // createFetchOrThrow.\n const response = await clientCtx.fetch(url.toString(), {\n body,\n method: method,\n headers: headersInit\n });\n // However, if we ended up using a \"regular\" fetch, the\n // error status codes are not thrown by fetch automatically,\n // we have to look at the ok property and behave accordingly\n if (!response.ok) {\n try {\n const convertedError = await response.json();\n return new PalantirApiError(convertedError.message, convertedError.errorName, convertedError.errorCode, convertedError.errorDescription, response.status, convertedError.errorInstanceId, convertedError.parameters);\n } catch (e) {\n if (e instanceof Error) {\n return new UnknownError(e.message, \"UNKNOWN\");\n }\n return new UnknownError(\"Unable to parse error response\", \"UNKNOWN\");\n }\n }\n // Do not return anything if its a 204. Do not parse either!\n if (response.status === 204) {\n return;\n }\n if (responseMediaType == null || responseMediaType === \"application/json\") {\n return await response.json();\n }\n return response;\n}\nexport function parseUrl(baseUrl, endpointPath) {\n baseUrl += baseUrl.endsWith(\"/\") ? \"\" : \"/\";\n return new URL(`api${endpointPath}`, baseUrl);\n}"]}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('./chunk-Q7SFCCGT.cjs');
3
+ var chunk4DCWE2WY_cjs = require('./chunk-4DCWE2WY.cjs');
4
4
 
5
5
  // src/edits/types.ts
6
6
  function isInterfaceLocator(obj) {
@@ -106,7 +106,81 @@ var UserFacingError = class extends Error {
106
106
  }
107
107
  };
108
108
 
109
+ // ../../node_modules/.pnpm/@osdk+foundry.mediasets@2.38.0/node_modules/@osdk/foundry.mediasets/build/esm/public/MediaSet.js
110
+ var MediaSet_exports = {};
111
+ chunk4DCWE2WY_cjs.__export(MediaSet_exports, {
112
+ abort: () => abort,
113
+ calculate: () => calculate,
114
+ commit: () => commit,
115
+ create: () => create,
116
+ getRidByPath: () => getRidByPath,
117
+ info: () => info,
118
+ read: () => read,
119
+ readOriginal: () => readOriginal,
120
+ reference: () => reference,
121
+ retrieve: () => retrieve,
122
+ upload: () => upload,
123
+ uploadMedia: () => uploadMedia
124
+ });
125
+ var _abort = [1, "/v2/mediasets/{0}/transactions/{1}/abort", 2];
126
+ function abort($ctx, ...args) {
127
+ return chunk4DCWE2WY_cjs.foundryPlatformFetch($ctx, _abort, ...args);
128
+ }
129
+ var _calculate = [0, "/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/calculate", 6];
130
+ function calculate($ctx, ...args) {
131
+ return chunk4DCWE2WY_cjs.foundryPlatformFetch($ctx, _calculate, ...args);
132
+ }
133
+ var _commit = [1, "/v2/mediasets/{0}/transactions/{1}/commit", 2];
134
+ function commit($ctx, ...args) {
135
+ return chunk4DCWE2WY_cjs.foundryPlatformFetch($ctx, _commit, ...args);
136
+ }
137
+ var _create = [1, "/v2/mediasets/{0}/transactions", 2];
138
+ function create($ctx, ...args) {
139
+ return chunk4DCWE2WY_cjs.foundryPlatformFetch($ctx, _create, ...args);
140
+ }
141
+ var _info = [0, "/v2/mediasets/{0}/items/{1}", 6];
142
+ function info($ctx, ...args) {
143
+ return chunk4DCWE2WY_cjs.foundryPlatformFetch($ctx, _info, ...args);
144
+ }
145
+ var _reference = [0, "/v2/mediasets/{0}/items/{1}/reference", 6];
146
+ function reference($ctx, ...args) {
147
+ return chunk4DCWE2WY_cjs.foundryPlatformFetch($ctx, _reference, ...args);
148
+ }
149
+ var _getRidByPath = [0, "/v2/mediasets/{0}/items/getRidByPath", 2];
150
+ function getRidByPath($ctx, ...args) {
151
+ return chunk4DCWE2WY_cjs.foundryPlatformFetch($ctx, _getRidByPath, ...args);
152
+ }
153
+ var _upload = [1, "/v2/mediasets/{0}/items", 3, "*/*"];
154
+ function upload($ctx, ...args) {
155
+ return chunk4DCWE2WY_cjs.foundryPlatformFetch($ctx, _upload, ...args);
156
+ }
157
+ var _read = [0, "/v2/mediasets/{0}/items/{1}/content", 6, , "*/*"];
158
+ function read($ctx, ...args) {
159
+ return chunk4DCWE2WY_cjs.foundryPlatformFetch($ctx, _read, ...args);
160
+ }
161
+ var _readOriginal = [0, "/v2/mediasets/{0}/items/{1}/original", 6, , "*/*"];
162
+ function readOriginal($ctx, ...args) {
163
+ return chunk4DCWE2WY_cjs.foundryPlatformFetch($ctx, _readOriginal, ...args);
164
+ }
165
+ var _retrieve = [0, "/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/retrieve", 6, , "*/*"];
166
+ function retrieve($ctx, ...args) {
167
+ return chunk4DCWE2WY_cjs.foundryPlatformFetch($ctx, _retrieve, ...args);
168
+ }
169
+ var _uploadMedia = [2, "/v2/mediasets/media/upload", 7, "*/*"];
170
+ function uploadMedia($ctx, ...args) {
171
+ return chunk4DCWE2WY_cjs.foundryPlatformFetch($ctx, _uploadMedia, ...args);
172
+ }
173
+
174
+ // src/helpers/uploadMedia.ts
175
+ function uploadMedia2(client, mediaUpload) {
176
+ return MediaSet_exports.uploadMedia(client, mediaUpload.data, {
177
+ filename: mediaUpload.fileName,
178
+ preview: true
179
+ });
180
+ }
181
+
109
182
  exports.UserFacingError = UserFacingError;
110
183
  exports.createEditBatch = createEditBatch;
184
+ exports.uploadMedia = uploadMedia2;
111
185
  //# sourceMappingURL=index.cjs.map
112
186
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/edits/types.ts","../../src/edits/createEditBatch.ts","../../src/errors/UserFacingError.ts"],"names":[],"mappings":";;;;;AAmBO,SAAS,mBAAmB,GAAK,EAAA;AACtC,EAAA,OAAO,GAAO,IAAA,IAAA,IAAQ,OAAO,GAAA,KAAQ,YAAY,OAAO,GAAA,CAAI,WAAgB,KAAA,QAAA,IAAY,OAAO,GAAI,CAAA,QAAA,KAAa,QAAY,IAAA,GAAA,CAAI,aAAa,GAAI,CAAA,WAAA;AACnJ;;;ACJA,IAAM,oBAAN,MAAwB;AAAA,EACtB,QAAQ,EAAC;AAAA,EACT,IAAA,CAAK,MAAQ,EAAA,OAAA,EAAS,MAAQ,EAAA;AAC5B,IAAA,IAAI,CAAC,KAAA,CAAM,OAAQ,CAAA,MAAM,CAAG,EAAA;AAC1B,MAAA,IAAA,CAAK,MAAM,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B,GAAG,CAAG,EAAA;AAC3B,MAAA,IAAA,CAAK,MAAM,IAAK,CAAA;AAAA,QACd,IAAM,EAAA,0BAAA;AAAA,QACN;AAAA,OACD,CAAA;AACD,MAAA;AAAA;AAEF,IAAA,IAAA,CAAK,MAAM,IAAK,CAAA;AAAA,MACd,IAAM,EAAA,cAAA;AAAA,MACN;AAAA,KACD,CAAA;AAAA;AACH,EACA,MAAA,CAAO,KAAK,UAAY,EAAA;AACtB,IAAI,IAAA,kBAAA,CAAmB,GAAG,CAAG,EAAA;AAC3B,MAAA,IAAA,CAAK,MAAM,IAAK,CAAA;AAAA,QACd,IAAM,EAAA,0BAAA;AAAA,QACN,GAAA;AAAA,QACA;AAAA,OACD,CAAA;AACD,MAAA;AAAA;AAEF,IAAA,IAAA,CAAK,MAAM,IAAK,CAAA;AAAA,MACd,IAAM,EAAA,cAAA;AAAA,MACN,GAAA;AAAA,MACA;AAAA,KACD,CAAA;AAAA;AACH,EACA,QAAW,GAAA;AACT,IAAO,OAAA,CAAC,GAAG,IAAA,CAAK,KAAK,CAAA;AAAA;AAEzB,CAAA;AACO,SAAS,gBAAgB,OAAS,EAAA;AACvC,EAAA,OAAO,IAAI,iBAAkB,EAAA;AAC/B;;;AC1Fa,IAAA,eAAA,GAAN,cAA8B,KAAM,CAAA;AAAA,EACzC,YAAY,OAAS,EAAA;AACnB,IAAA,KAAA,CAAM,OAAO,CAAA;AAAA;AAEjB","file":"index.cjs","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 */\nexport let Edits;\n// Check if locator is for an interface by comparing $apiName and $objectType.\n// Both object types and interfaces store the object type API name in $objectType,\n// but interfaces store the interface API name in $apiName.\nexport function isInterfaceLocator(obj) {\n return obj != null && typeof obj === \"object\" && typeof obj.$objectType === \"string\" && typeof obj.$apiName === \"string\" && obj.$apiName !== obj.$objectType;\n}","/*\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 { isInterfaceLocator } from \"./types.js\";\nclass InMemoryEditBatch {\n edits = [];\n link(source, apiName, target) {\n if (!Array.isArray(target)) {\n this.edits.push({\n type: \"addLink\",\n source,\n apiName,\n target\n });\n return;\n }\n for (const elem of target) {\n this.edits.push({\n type: \"addLink\",\n source,\n apiName,\n target: elem\n });\n }\n }\n unlink(source, apiName, target) {\n if (!Array.isArray(target)) {\n this.edits.push({\n type: \"removeLink\",\n source,\n apiName,\n target\n });\n return;\n }\n for (const elem of target) {\n this.edits.push({\n type: \"removeLink\",\n source,\n apiName,\n target: elem\n });\n }\n }\n create(objectOrInterfaceType, properties) {\n if (objectOrInterfaceType.type === \"interface\") {\n this.edits.push({\n type: \"createObjectForInterface\",\n int: objectOrInterfaceType,\n properties\n });\n return;\n }\n this.edits.push({\n type: \"createObject\",\n obj: objectOrInterfaceType,\n properties\n });\n }\n delete(obj) {\n if (isInterfaceLocator(obj)) {\n this.edits.push({\n type: \"deleteObjectForInterface\",\n obj\n });\n return;\n }\n this.edits.push({\n type: \"deleteObject\",\n obj\n });\n }\n update(obj, properties) {\n if (isInterfaceLocator(obj)) {\n this.edits.push({\n type: \"updateObjectForInterface\",\n obj,\n properties\n });\n return;\n }\n this.edits.push({\n type: \"updateObject\",\n obj,\n properties\n });\n }\n getEdits() {\n return [...this.edits];\n }\n}\nexport function createEditBatch(_client) {\n return new InMemoryEditBatch();\n}","/*\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 class UserFacingError extends Error {\n constructor(message) {\n super(message);\n }\n}"]}
1
+ {"version":3,"sources":["../../src/edits/types.ts","../../src/edits/createEditBatch.ts","../../src/errors/UserFacingError.ts","../../../../node_modules/.pnpm/@osdk+foundry.mediasets@2.38.0/node_modules/@osdk/foundry.mediasets/build/esm/public/MediaSet.js","../../src/helpers/uploadMedia.ts"],"names":["__export","foundryPlatformFetch","uploadMedia"],"mappings":";;;;;AAmBO,SAAS,mBAAmB,GAAK,EAAA;AACtC,EAAA,OAAO,GAAO,IAAA,IAAA,IAAQ,OAAO,GAAA,KAAQ,YAAY,OAAO,GAAA,CAAI,WAAgB,KAAA,QAAA,IAAY,OAAO,GAAI,CAAA,QAAA,KAAa,QAAY,IAAA,GAAA,CAAI,aAAa,GAAI,CAAA,WAAA;AACnJ;;;ACJA,IAAM,oBAAN,MAAwB;AAAA,EACtB,QAAQ,EAAC;AAAA,EACT,IAAA,CAAK,MAAQ,EAAA,OAAA,EAAS,MAAQ,EAAA;AAC5B,IAAA,IAAI,CAAC,KAAA,CAAM,OAAQ,CAAA,MAAM,CAAG,EAAA;AAC1B,MAAA,IAAA,CAAK,MAAM,IAAK,CAAA;AAAA,QACd,IAAM,EAAA,SAAA;AAAA,QACN,MAAA;AAAA,QACA,OAAA;AAAA,QACA;AAAA,OAC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AAa,EAAA;AAC/C,EAAA,OAAO,gBAAU,CAAA,WAAA,CAAY,MAAQ,EAAA,WAAA,CAAY,IAAM,EAAA;AAAA,IACrD,UAAU,WAAY,CAAA,QAAA;AAAA,IACtB,OAAS,EAAA;AAAA,GACV,CAAA;AACH","file":"index.cjs","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 */\nexport let Edits;\n// Check if locator is for an interface by comparing $apiName and $objectType.\n// Both object types and interfaces store the object type API name in $objectType,\n// but interfaces store the interface API name in $apiName.\nexport function isInterfaceLocator(obj) {\n return obj != null && typeof obj === \"object\" && typeof obj.$objectType === \"string\" && typeof obj.$apiName === \"string\" && obj.$apiName !== obj.$objectType;\n}","/*\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 { isInterfaceLocator } from \"./types.js\";\nclass InMemoryEditBatch {\n edits = [];\n link(source, apiName, target) {\n if (!Array.isArray(target)) {\n this.edits.push({\n type: \"addLink\",\n source,\n apiName,\n target\n });\n return;\n }\n for (const elem of target) {\n this.edits.push({\n type: \"addLink\",\n source,\n apiName,\n target: elem\n });\n }\n }\n unlink(source, apiName, target) {\n if (!Array.isArray(target)) {\n this.edits.push({\n type: \"removeLink\",\n source,\n apiName,\n target\n });\n return;\n }\n for (const elem of target) {\n this.edits.push({\n type: \"removeLink\",\n source,\n apiName,\n target: elem\n });\n }\n }\n create(objectOrInterfaceType, properties) {\n if (objectOrInterfaceType.type === \"interface\") {\n this.edits.push({\n type: \"createObjectForInterface\",\n int: objectOrInterfaceType,\n properties\n });\n return;\n }\n this.edits.push({\n type: \"createObject\",\n obj: objectOrInterfaceType,\n properties\n });\n }\n delete(obj) {\n if (isInterfaceLocator(obj)) {\n this.edits.push({\n type: \"deleteObjectForInterface\",\n obj\n });\n return;\n }\n this.edits.push({\n type: \"deleteObject\",\n obj\n });\n }\n update(obj, properties) {\n if (isInterfaceLocator(obj)) {\n this.edits.push({\n type: \"updateObjectForInterface\",\n obj,\n properties\n });\n return;\n }\n this.edits.push({\n type: \"updateObject\",\n obj,\n properties\n });\n }\n getEdits() {\n return [...this.edits];\n }\n}\nexport function createEditBatch(_client) {\n return new InMemoryEditBatch();\n}","/*\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 class UserFacingError extends Error {\n constructor(message) {\n super(message);\n }\n}","/*\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _abort = [1, \"/v2/mediasets/{0}/transactions/{1}/abort\", 2];\n/**\n * Aborts an open transaction. Items uploaded to the media set during this transaction will be deleted.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/abort\n */\nexport function abort($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _abort, ...args);\n}\nconst _calculate = [0, \"/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/calculate\", 6];\n/**\n * Starts calculation of a thumbnail for a given image.\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform/imagery/thumbnail/calculate\n */\nexport function calculate($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _calculate, ...args);\n}\nconst _commit = [1, \"/v2/mediasets/{0}/transactions/{1}/commit\", 2];\n/**\n * Commits an open transaction. On success, items uploaded to the media set during this transaction will become available.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/commit\n */\nexport function commit($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _commit, ...args);\n}\nconst _create = [1, \"/v2/mediasets/{0}/transactions\", 2];\n/**\n * Creates a new transaction. Items uploaded to the media set while this transaction is open will not be reflected until the transaction is committed.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/transactions\n */\nexport function create($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _create, ...args);\n}\nconst _info = [0, \"/v2/mediasets/{0}/items/{1}\", 6];\n/**\n * Gets information about the media item.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}\n */\nexport function info($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _info, ...args);\n}\nconst _reference = [0, \"/v2/mediasets/{0}/items/{1}/reference\", 6];\n/**\n * Gets the [media reference](https://www.palantir.com/docs/foundry/data-integration/media-sets/#media-references) for this media item.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/reference\n */\nexport function reference($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _reference, ...args);\n}\nconst _getRidByPath = [0, \"/v2/mediasets/{0}/items/getRidByPath\", 2];\n/**\n * Returns the media item RID for the media item with the specified path.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/getRidByPath\n */\nexport function getRidByPath($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getRidByPath, ...args);\n}\nconst _upload = [1, \"/v2/mediasets/{0}/items\", 3, \"*/*\"];\n/**\n * Uploads a media item to an existing media set.\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n * A branch name, or branch rid, or view rid may optionally be specified. If none is specified, the item will be uploaded to the default branch. If more than one is specified, an error is thrown.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/items\n */\nexport function upload($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _upload, ...args);\n}\nconst _read = [0, \"/v2/mediasets/{0}/items/{1}/content\", 6,, \"*/*\"];\n/**\n * Gets the content of a media item.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/content\n */\nexport function read($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _read, ...args);\n}\nconst _readOriginal = [0, \"/v2/mediasets/{0}/items/{1}/original\", 6,, \"*/*\"];\n/**\n * Gets the content of an original file uploaded to the media item, even if it was transformed on upload due to being an additional input format.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/original\n */\nexport function readOriginal($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _readOriginal, ...args);\n}\nconst _retrieve = [0, \"/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/retrieve\", 6,, \"*/*\"];\n/**\n * Retrieves a successfully calculated thumbnail for a given image.\n *\n * Thumbnails are 200px wide in the format of `image/webp`\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform/imagery/thumbnail/retrieve\n */\nexport function retrieve($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _retrieve, ...args);\n}\nconst _uploadMedia = [2, \"/v2/mediasets/media/upload\", 7, \"*/*\"];\n/**\n * \"Uploads a temporary media item. If the media item isn't persisted within 1 hour, the item will be deleted.\n *\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n * Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read api:ontologies-write`.\"\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/mediasets/media/upload\n */\nexport function uploadMedia($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _uploadMedia, ...args);\n}","/*\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 { MediaSets } from \"@osdk/foundry.mediasets\";\nexport function uploadMedia(client, mediaUpload) {\n return MediaSets.uploadMedia(client, mediaUpload.data, {\n filename: mediaUpload.fileName,\n preview: true\n });\n}"]}
@@ -1,5 +1,5 @@
1
- import { Client, ObjectTypeDefinition, InterfaceDefinition, Osdk } from '@osdk/client';
2
- export { Attachment, Range, ThreeDimensionalAggregation, TwoDimensionalAggregation } from '@osdk/client';
1
+ import { Client, MediaUpload, MediaReference, ObjectTypeDefinition, InterfaceDefinition, Osdk } from '@osdk/client';
2
+ export { Attachment, MediaReference, MediaUpload, Range, ThreeDimensionalAggregation, TwoDimensionalAggregation } from '@osdk/client';
3
3
  import { E as EditBatch } from './EditBatch-CwPxevhT.cjs';
4
4
  import { A as AnyEdit } from './internal-CmSoe_xi.cjs';
5
5
  export { E as Edits } from './internal-CmSoe_xi.cjs';
@@ -31,6 +31,8 @@ declare class UserFacingError extends Error {
31
31
  constructor(message: string);
32
32
  }
33
33
 
34
+ declare function uploadMedia(client: Client, mediaUpload: MediaUpload): Promise<MediaReference>;
35
+
34
36
  interface Notification {
35
37
  platformNotification: PlatformNotification;
36
38
  emailNotification: EmailNotification;
@@ -84,4 +86,4 @@ type Principal = {
84
86
  id: string;
85
87
  };
86
88
 
87
- export { type ClassificationMarking, type DateISOString, type Double, EditBatch, type EmailNotification, type Float, type GroupId, type Integer, type Long, type MandatoryMarking, type Notification, type NotificationLink, type NotificationLinkTarget, type ObjectLinkTarget, type PlatformNotification, type Principal, type RidLinkTarget, type TimestampISOString, type UrlLinkTarget, UserFacingError, type UserId, createEditBatch };
89
+ export { type ClassificationMarking, type DateISOString, type Double, EditBatch, type EmailNotification, type Float, type GroupId, type Integer, type Long, type MandatoryMarking, type Notification, type NotificationLink, type NotificationLinkTarget, type ObjectLinkTarget, type PlatformNotification, type Principal, type RidLinkTarget, type TimestampISOString, type UrlLinkTarget, UserFacingError, type UserId, createEditBatch, uploadMedia };
@@ -1,109 +1,18 @@
1
1
  'use strict';
2
2
 
3
- var chunkQ7SFCCGT_cjs = require('../chunk-Q7SFCCGT.cjs');
3
+ var chunk4DCWE2WY_cjs = require('../chunk-4DCWE2WY.cjs');
4
4
  var unstableDoNotUse = require('@osdk/client/unstable-do-not-use');
5
+ var fs = require('fs');
6
+ var yaml = require('yaml');
5
7
 
6
- // ../../node_modules/.pnpm/@osdk+shared.client@1.0.1/node_modules/@osdk/shared.client/index.js
7
- var symbolClientContext = Symbol("ClientContext");
8
-
9
- // ../../node_modules/.pnpm/@osdk+shared.client2@1.0.0/node_modules/@osdk/shared.client2/index.js
10
- var symbolClientContext2 = "__osdkClientContext";
11
-
12
- // ../../node_modules/.pnpm/@osdk+shared.net.errors@2.5.0-beta.2/node_modules/@osdk/shared.net.errors/build/esm/PalantirApiError.js
13
- var PalantirApiError = class extends Error {
14
- constructor(message, errorName, errorCode, errorDescription, statusCode, errorInstanceId, parameters) {
15
- super(message);
16
- this.message = message;
17
- this.errorName = errorName;
18
- this.errorCode = errorCode;
19
- this.errorDescription = errorDescription;
20
- this.statusCode = statusCode;
21
- this.errorInstanceId = errorInstanceId;
22
- this.parameters = parameters;
23
- }
24
- };
25
-
26
- // ../../node_modules/.pnpm/@osdk+shared.net.errors@2.5.0-beta.2/node_modules/@osdk/shared.net.errors/build/esm/UnknownError.js
27
- var UnknownError = class extends PalantirApiError {
28
- constructor(message, errorName, originalError, statusCode) {
29
- super(message, errorName, void 0, void 0, statusCode);
30
- this.originalError = originalError;
31
- }
32
- };
33
-
34
- // ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.5.0/node_modules/@osdk/shared.net.platformapi/build/esm/foundryPlatformFetch.js
35
- async function foundryPlatformFetch(client, [httpMethodNum, origPath, flags, contentType, responseContentType], ...args) {
36
- const path = origPath.replace(/\{([^}]+)\}/g, () => encodeURIComponent(args.shift()));
37
- const body = flags & 1 ? args.shift() : void 0;
38
- const queryArgs = flags & 2 ? args.shift() : void 0;
39
- const headerArgs = flags & 4 ? args.shift() : void 0;
40
- const method = ["GET", "POST", "PUT", "DELETE", "PATCH"][httpMethodNum];
41
- return await apiFetch(client[symbolClientContext2] ?? client[symbolClientContext] ?? client, method, path, body, queryArgs, headerArgs, contentType, responseContentType);
42
- }
43
- async function apiFetch(clientCtx, method, endpointPath, data, queryArguments, headers, requestMediaType, responseMediaType) {
44
- const url = parseUrl(clientCtx.baseUrl, endpointPath);
45
- for (const [key, value] of Object.entries(queryArguments || {})) {
46
- if (value == null) {
47
- continue;
48
- }
49
- if (Array.isArray(value)) {
50
- for (const item of value) {
51
- url.searchParams.append(key, item);
52
- }
53
- } else {
54
- url.searchParams.append(key, value);
55
- }
56
- }
57
- const headersInit = new Headers();
58
- headersInit.set("Content-Type", requestMediaType ?? "application/json");
59
- headersInit.set("Accept", responseMediaType ?? "application/json");
60
- Object.entries(headers || {}).forEach(([key, value]) => {
61
- if (key === "Content-Type" && typeof value === "string") {
62
- headersInit.set("Content-Type", value);
63
- } else if (key === "Accept" && typeof value === "string") {
64
- headersInit.set("Accept", value);
65
- } else if (value != null) {
66
- headersInit.append(key, value.toString());
67
- }
68
- });
69
- const body = data == null || data instanceof globalThis.Blob ? data : JSON.stringify(data);
70
- const response = await clientCtx.fetch(url.toString(), {
71
- body,
72
- method,
73
- headers: headersInit
74
- });
75
- if (!response.ok) {
76
- try {
77
- const convertedError = await response.json();
78
- return new PalantirApiError(convertedError.message, convertedError.errorName, convertedError.errorCode, convertedError.errorDescription, response.status, convertedError.errorInstanceId, convertedError.parameters);
79
- } catch (e) {
80
- if (e instanceof Error) {
81
- return new UnknownError(e.message, "UNKNOWN");
82
- }
83
- return new UnknownError("Unable to parse error response", "UNKNOWN");
84
- }
85
- }
86
- if (response.status === 204) {
87
- return;
88
- }
89
- if (responseMediaType == null || responseMediaType === "application/json") {
90
- return await response.json();
91
- }
92
- return response;
93
- }
94
- function parseUrl(baseUrl, endpointPath) {
95
- baseUrl += baseUrl.endsWith("/") ? "" : "/";
96
- return new URL(`api${endpointPath}`, baseUrl);
97
- }
98
-
99
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyTransaction.js
8
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyTransaction.js
100
9
  var OntologyTransaction_exports = {};
101
- chunkQ7SFCCGT_cjs.__export(OntologyTransaction_exports, {
10
+ chunk4DCWE2WY_cjs.__export(OntologyTransaction_exports, {
102
11
  postEdits: () => postEdits
103
12
  });
104
13
  var _postEdits = [1, "/v2/ontologies/{0}/transactions/{1}/edits", 3];
105
14
  function postEdits($ctx, ...args) {
106
- return foundryPlatformFetch($ctx, _postEdits, ...args);
15
+ return chunk4DCWE2WY_cjs.foundryPlatformFetch($ctx, _postEdits, ...args);
107
16
  }
108
17
 
109
18
  // src/transactions/WriteableClient.ts
@@ -289,7 +198,45 @@ function createWriteableClient(...args) {
289
198
  });
290
199
  return writeableClient;
291
200
  }
201
+ var FOUNDRY_SERVICE_DISCOVERY_V2_ENV_VAR = "FOUNDRY_SERVICE_DISCOVERY_V2";
202
+ var API_GATEWAY_SERVICE = "api-gateway";
203
+ function hasUrisProperty(config) {
204
+ return !Array.isArray(config) && "uris" in config && Array.isArray(config.uris) && config.uris.every((uri) => typeof uri === "string");
205
+ }
206
+ function extractUris(config) {
207
+ return hasUrisProperty(config) ? config.uris : config;
208
+ }
209
+ function getApiGatewayBaseUrl() {
210
+ const filePath = process.env[FOUNDRY_SERVICE_DISCOVERY_V2_ENV_VAR];
211
+ if (!filePath) {
212
+ throw new Error(`${FOUNDRY_SERVICE_DISCOVERY_V2_ENV_VAR} environment variable is not set`);
213
+ }
214
+ let fileContent;
215
+ try {
216
+ fileContent = fs.readFileSync(filePath, "utf-8");
217
+ } catch (error) {
218
+ const errorMessage = error instanceof Error ? error.message : String(error);
219
+ throw new Error(`Failed to read service discovery file at ${filePath}: ${errorMessage}`);
220
+ }
221
+ let discovery;
222
+ try {
223
+ discovery = yaml.parse(fileContent);
224
+ } catch (error) {
225
+ const errorMessage = error instanceof Error ? error.message : String(error);
226
+ throw new Error(`Failed to parse service discovery YAML file at ${filePath}: ${errorMessage}`);
227
+ }
228
+ const apiGatewayConfig = discovery[API_GATEWAY_SERVICE];
229
+ if (!apiGatewayConfig) {
230
+ throw new Error(`${API_GATEWAY_SERVICE} service not found in service discovery file`);
231
+ }
232
+ const uris = extractUris(apiGatewayConfig);
233
+ if (uris.length === 0) {
234
+ throw new Error(`No URIs found for ${API_GATEWAY_SERVICE} service in service discovery file`);
235
+ }
236
+ return uris[0];
237
+ }
292
238
 
293
239
  exports.createWriteableClient = createWriteableClient;
240
+ exports.getApiGatewayBaseUrl = getApiGatewayBaseUrl;
294
241
  //# sourceMappingURL=unstable-do-not-use.cjs.map
295
242
  //# sourceMappingURL=unstable-do-not-use.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../node_modules/.pnpm/@osdk+shared.client@1.0.1/node_modules/@osdk/shared.client/index.js","../../../../../node_modules/.pnpm/@osdk+shared.client2@1.0.0/node_modules/@osdk/shared.client2/index.js","../../../../../node_modules/.pnpm/@osdk+shared.net.errors@2.5.0-beta.2/node_modules/@osdk/shared.net.errors/build/esm/PalantirApiError.js","../../../../../node_modules/.pnpm/@osdk+shared.net.errors@2.5.0-beta.2/node_modules/@osdk/shared.net.errors/build/esm/UnknownError.js","../../../../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.5.0/node_modules/@osdk/shared.net.platformapi/build/esm/foundryPlatformFetch.js","../../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyTransaction.js","../../../src/transactions/WriteableClient.ts","../../../src/transactions/EditRequestManager.ts","../../../src/transactions/toPropertyDataValue.ts","../../../src/transactions/createWriteableClient.ts"],"names":["symbolClientContext","__export","createClientWithTransaction"],"mappings":";;;;;;AAgBO,IAAM,mBAAA,GAAsB,OAAO,eAAe,CAAA;;;ACAlD,IAAMA,oBAAsB,GAAA,qBAAA;;;ACA5B,IAAM,gBAAA,GAAN,cAA+B,KAAM,CAAA;AAAA,EAC1C,YAAY,OAAS,EAAA,SAAA,EAAW,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AAA,CAAQ,UAAU,CAAG,EAAA;AACrD,UAAY,WAAA,CAAA,GAAG,CAAI,GAAA,mBAAA,CAAoB,KAAK,CAAA;AAAA;AAE9C,QAAA,OAAO,mBAAmB,QAAS,CAAA;AAAA,UACjC,IAAM,EAAA,cAAA;AAAA,UACN,YAAY,OAAQ,CAAA,QAAA;AAAA,UACpB,YAAY,OAAQ,CAAA,WAAA;AAAA,UACpB,UAAY,EAAA;AAAA,SACb,CAAA;AAAA;AACH,KACF;AAAA,IACA,MAAQ,EAAA;AAAA,MACN,KAAA,EAAO,SAAU,GAAK,EAAA;AACpB,QAAA,OAAO,mBAAmB,QAAS,CAAA;AAAA,UACjC,IAAM,EAAA,cAAA;AAAA,UACN,YAAY,GAAI,CAAA,QAAA;AAAA,UAChB,YAAY,GAAI,CAAA;AAAA,SACjB,CAAA;AAAA;AACH,KACF;AAAA,IACA,CAAC,sBAAsB,GAAG;AAAA,MACxB,KAAO,EAAA;AAAA,QACL,WAAA;AAAA,QACA;AAAA;AACF;AACF,GACD,CAAA;AACD,EAAO,OAAA,eAAA;AACT","file":"unstable-do-not-use.cjs","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 const symbolClientContext = Symbol(\"ClientContext\");","/*\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 const symbolClientContext = \"__osdkClientContext\";","/*\n * Copyright 2023 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 class PalantirApiError extends Error {\n constructor(message, errorName, errorCode, errorDescription, statusCode, errorInstanceId, parameters) {\n super(message);\n this.message = message;\n this.errorName = errorName;\n this.errorCode = errorCode;\n this.errorDescription = errorDescription;\n this.statusCode = statusCode;\n this.errorInstanceId = errorInstanceId;\n this.parameters = parameters;\n }\n}","/*\n * Copyright 2023 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 { PalantirApiError } from \"./PalantirApiError.js\";\nexport class UnknownError extends PalantirApiError {\n constructor(message, errorName, originalError, statusCode) {\n super(message, errorName, undefined, undefined, statusCode);\n this.originalError = originalError;\n }\n}","/*\n * Copyright 2023 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 */\nimport { symbolClientContext as oldSymbolClientContext } from \"@osdk/shared.client\";\nimport { symbolClientContext } from \"@osdk/shared.client2\";\nimport { PalantirApiError, UnknownError } from \"@osdk/shared.net.errors\";\nexport async function foundryPlatformFetch(client, [httpMethodNum, origPath, flags, contentType, responseContentType], ...args) {\n const path = origPath.replace(/\\{([^}]+)\\}/g, () => encodeURIComponent(args.shift()));\n const body = flags & 1 ? args.shift() : undefined;\n const queryArgs = flags & 2 ? args.shift() : undefined;\n const headerArgs = flags & 4 ? args.shift() : undefined;\n const method = [\"GET\", \"POST\", \"PUT\", \"DELETE\", \"PATCH\"][httpMethodNum];\n return await apiFetch(client[symbolClientContext] ?? client[oldSymbolClientContext] ?? client, method, path, body, queryArgs, headerArgs, contentType, responseContentType);\n}\nasync function apiFetch(clientCtx, method, endpointPath, data, queryArguments, headers, requestMediaType, responseMediaType) {\n const url = parseUrl(clientCtx.baseUrl, endpointPath);\n for (const [key, value] of Object.entries(queryArguments || {})) {\n if (value == null) {\n continue;\n }\n if (Array.isArray(value)) {\n for (const item of value) {\n url.searchParams.append(key, item);\n }\n } else {\n url.searchParams.append(key, value);\n }\n }\n const headersInit = new Headers();\n headersInit.set(\"Content-Type\", requestMediaType ?? \"application/json\");\n headersInit.set(\"Accept\", responseMediaType ?? \"application/json\");\n Object.entries(headers || {}).forEach(([key, value]) => {\n if (key === \"Content-Type\" && typeof value === \"string\") {\n headersInit.set(\"Content-Type\", value);\n } else if (key === \"Accept\" && typeof value === \"string\") {\n headersInit.set(\"Accept\", value);\n } else if (value != null) {\n headersInit.append(key, value.toString());\n }\n });\n const body = data == null || data instanceof globalThis.Blob ? data : JSON.stringify(data);\n // Because this uses the client's fetch, there is a 99.99% chance that it is already going\n // to handle the error case and throw a PalantirApiError since its wrapped in a\n // createFetchOrThrow.\n const response = await clientCtx.fetch(url.toString(), {\n body,\n method: method,\n headers: headersInit\n });\n // However, if we ended up using a \"regular\" fetch, the\n // error status codes are not thrown by fetch automatically,\n // we have to look at the ok property and behave accordingly\n if (!response.ok) {\n try {\n const convertedError = await response.json();\n return new PalantirApiError(convertedError.message, convertedError.errorName, convertedError.errorCode, convertedError.errorDescription, response.status, convertedError.errorInstanceId, convertedError.parameters);\n } catch (e) {\n if (e instanceof Error) {\n return new UnknownError(e.message, \"UNKNOWN\");\n }\n return new UnknownError(\"Unable to parse error response\", \"UNKNOWN\");\n }\n }\n // Do not return anything if its a 204. Do not parse either!\n if (response.status === 204) {\n return;\n }\n if (responseMediaType == null || responseMediaType === \"application/json\") {\n return await response.json();\n }\n return response;\n}\nexport function parseUrl(baseUrl, endpointPath) {\n baseUrl += baseUrl.endsWith(\"/\") ? \"\" : \"/\";\n return new URL(`api${endpointPath}`, baseUrl);\n}","/*\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _postEdits = [1, \"/v2/ontologies/{0}/transactions/{1}/edits\", 3];\n/**\n * Applies a set of edits to a transaction in order.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/transactions/{transactionRid}/edits\n */\nexport function postEdits($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _postEdits, ...args);\n}","/*\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\n/** @internal */\nexport const writeableClientContext = Symbol(\"writeableClientContext\");","/*\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 { OntologyTransactions } from \"@osdk/foundry.ontologies\";\nimport { writeableClientContext } from \"./WriteableClient.js\";\nexport class EditRequestManager {\n pendingEdits = [];\n inFlightRequest = null;\n queuedRequest = null;\n editTimeout = null;\n constructor(client) {\n this.client = client;\n }\n postEdit(edit) {\n if (this.inFlightRequest) {\n if (this.editTimeout) {\n // This means we are in the same tick that the request was created, meaning we can just add to the same request\n this.pendingEdits.push(edit);\n return this.inFlightRequest;\n }\n if (this.queuedRequest) {\n // This means we already have a queued request that will run after the inFlightRequest finishes, so we can just add to that one\n this.pendingEdits.push(edit);\n return this.queuedRequest;\n }\n // This means a request has already been sent to the wire but not been returned, so we need to queue up a new request for when that one finishes\n this.queuedRequest = this.inFlightRequest.then(async () => {\n this.inFlightRequest = this.queuedRequest;\n this.queuedRequest = null;\n this.pendingEdits.push(edit);\n await this.dispatchRequest();\n });\n return this.queuedRequest;\n } else {\n // There is no request in flight, which means we should create a new one\n this.inFlightRequest = this.createInitialPromiseWithTimeout(edit);\n return this.inFlightRequest;\n }\n }\n createInitialPromiseWithTimeout(edit) {\n return new Promise(resolve => {\n this.pendingEdits.push(edit);\n this.editTimeout = setTimeout(async () => {\n this.editTimeout = null;\n await this.dispatchRequest();\n if (!this.queuedRequest) {\n // The queued request will see this inFlightRequest resolve and should set the inFlightRequest to itself\n this.inFlightRequest = null;\n }\n resolve();\n }, 0);\n });\n }\n async dispatchRequest() {\n const copiedEdits = this.pendingEdits;\n this.pendingEdits = [];\n await OntologyTransactions.postEdits(this.client, await this.client[writeableClientContext].ontologyRid, this.client[writeableClientContext].transactionRid, {\n edits: copiedEdits\n }, {\n preview: true\n });\n }\n}","/*\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 function toPropertyDataValue(value) {\n if (value == null) {\n return null; // This differs from how actions handles null, which expects a specific enum value.\n }\n if (Array.isArray(value)) {\n return value.map(item => toPropertyDataValue(item));\n }\n if (isPoint(value)) {\n return toPropertyDataValue(`${value.coordinates[1]},${value.coordinates[0]}`);\n }\n if (typeof value === \"object\") {\n const result = {};\n for (const key in value) {\n result[key] = toPropertyDataValue(value[key]);\n }\n return result;\n }\n\n // expected to pass through - boolean, byte, date, decimal, float, double, integer, long, short, string, timestamp, object type reference\n return value;\n}\nfunction isPoint(o) {\n return o && typeof o === \"object\" && \"type\" in o && o.type === \"Point\" && \"coordinates\" in o && o.coordinates.length === 2;\n}","/*\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 { createClientWithTransaction } from \"@osdk/client/unstable-do-not-use\";\nimport { EditRequestManager } from \"./EditRequestManager.js\";\nimport { toPropertyDataValue } from \"./toPropertyDataValue.js\";\nimport { writeableClientContext } from \"./WriteableClient.js\";\nexport function createWriteableClient(...args) {\n const transactionRid = args[0];\n const ontologyRid = args[2];\n const client = createClientWithTransaction(...args);\n const editRequestManager = new EditRequestManager(client) // This cast is safe because we create the writeable client properties below.\n ;\n\n // We use define properties because the client has non-enumerable properties that we want to preserve.\n const writeableClient = Object.defineProperties(client, {\n link: {\n value: function (source, apiName, target) {\n if (!Array.isArray(target)) {\n return editRequestManager.postEdit({\n type: \"addLink\",\n objectType: source.$apiName,\n primaryKey: source.$primaryKey,\n linkType: apiName,\n linkedObjectPrimaryKey: target.$primaryKey\n });\n }\n const promises = [];\n for (const elem of target) {\n promises.push(editRequestManager.postEdit({\n type: \"addLink\",\n objectType: source.$apiName,\n primaryKey: source.$primaryKey,\n linkType: apiName,\n linkedObjectPrimaryKey: elem.$primaryKey\n }));\n }\n return Promise.all(promises).then(() => undefined);\n }\n },\n unlink: {\n value: function (source, apiName, target) {\n if (!Array.isArray(target)) {\n return editRequestManager.postEdit({\n type: \"removeLink\",\n objectType: source.$apiName,\n primaryKey: source.$primaryKey,\n linkType: apiName,\n linkedObjectPrimaryKey: target.$primaryKey\n });\n }\n const promises = [];\n for (const elem of target) {\n promises.push(editRequestManager.postEdit({\n type: \"removeLink\",\n objectType: source.$apiName,\n primaryKey: source.$primaryKey,\n linkType: apiName,\n linkedObjectPrimaryKey: elem.$primaryKey\n }));\n }\n return Promise.all(promises).then(() => undefined);\n }\n },\n create: {\n value: async function (obj, properties) {\n const propertyMap = {};\n for (const [key, value] of Object.entries(properties)) {\n propertyMap[key] = toPropertyDataValue(value);\n }\n return editRequestManager.postEdit({\n type: \"addObject\",\n objectType: obj.apiName,\n primaryKey: obj.$primaryKey,\n properties: propertyMap\n });\n }\n },\n update: {\n value: function (locator, properties) {\n const propertyMap = {};\n for (const [key, value] of Object.entries(properties)) {\n propertyMap[key] = toPropertyDataValue(value);\n }\n return editRequestManager.postEdit({\n type: \"modifyObject\",\n objectType: locator.$apiName,\n primaryKey: locator.$primaryKey,\n properties: propertyMap\n });\n }\n },\n delete: {\n value: function (obj) {\n return editRequestManager.postEdit({\n type: \"deleteObject\",\n objectType: obj.$apiName,\n primaryKey: obj.$primaryKey\n });\n }\n },\n [writeableClientContext]: {\n value: {\n ontologyRid,\n transactionRid\n }\n }\n });\n return writeableClient;\n}"]}
1
+ {"version":3,"sources":["../../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyTransaction.js","../../../src/transactions/WriteableClient.ts","../../../src/transactions/EditRequestManager.ts","../../../src/transactions/toPropertyDataValue.ts","../../../src/transactions/createWriteableClient.ts","../../../src/utils/getApiGatewayBaseUrl.ts"],"names":["__export","foundryPlatformFetch","createClientWithTransaction","readFileSync","parseYaml"],"mappings":";;;;;;;;AAAA,IAAA,2BAAA,GAAA,EAAA;AAAAA,0BAAA,CAAA,2BAAA,EAAA;AAAA,EAAA,SAAA,EAAA,MAAA;AAAA,CAAA,CAAA;AAiBA,IAAM,UAAa,GAAA,CAAC,CAAG,EAAA,2CAAA,EAA6C,CAAC,CAAA;AAS9D,SAAS,SAAA,CAAU,SAAS,IAAM,EAAA;AACvC,EAAA,OAAOC,sCAAsB,CAAA,IAAA,EAAM,UAAY,EAAA,GAAG,IAAI,CAAA;AACxD;;;ACXO,IAAM,sBAAA,GAAyB,OAAO,wBAAwB,CAAA;;;ACC9D,IAAM,qBAAN,MAAyB;AAAA,EAC9B,eAAe,EAAC;AAAA,EAChB,eAAkB,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I,CAAC,gBAAkB,EAAA;AACrB,IAAA,MAAM,IAAI,KAAA,CAAM,CAAG,EAAA,mBAAmB,CAA8C,4CAAA,CAAA,CAAA;AAAA;AAEtF,EAAM,MAAA,IAAA,GAAO,YAAY,gBAAgB,CAAA;AACzC,EAAI,IAAA,IAAA,CAAK,WAAW,CAAG,EAAA;AACrB,IAAA,MAAM,IAAI,KAAA,CAAM,CAAqB,kBAAA,EAAA,mBAAmB,CAAoC,kCAAA,CAAA,CAAA;AAAA;AAE9F,EAAA,OAAO,KAAK,CAAC,CAAA;AACf","file":"unstable-do-not-use.cjs","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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _postEdits = [1, \"/v2/ontologies/{0}/transactions/{1}/edits\", 3];\n/**\n * Applies a set of edits to a transaction in order.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/transactions/{transactionRid}/edits\n */\nexport function postEdits($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _postEdits, ...args);\n}","/*\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\n/** @internal */\nexport const writeableClientContext = Symbol(\"writeableClientContext\");","/*\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 { OntologyTransactions } from \"@osdk/foundry.ontologies\";\nimport { writeableClientContext } from \"./WriteableClient.js\";\nexport class EditRequestManager {\n pendingEdits = [];\n inFlightRequest = null;\n queuedRequest = null;\n editTimeout = null;\n constructor(client) {\n this.client = client;\n }\n postEdit(edit) {\n if (this.inFlightRequest) {\n if (this.editTimeout) {\n // This means we are in the same tick that the request was created, meaning we can just add to the same request\n this.pendingEdits.push(edit);\n return this.inFlightRequest;\n }\n if (this.queuedRequest) {\n // This means we already have a queued request that will run after the inFlightRequest finishes, so we can just add to that one\n this.pendingEdits.push(edit);\n return this.queuedRequest;\n }\n // This means a request has already been sent to the wire but not been returned, so we need to queue up a new request for when that one finishes\n this.queuedRequest = this.inFlightRequest.then(async () => {\n this.inFlightRequest = this.queuedRequest;\n this.queuedRequest = null;\n this.pendingEdits.push(edit);\n await this.dispatchRequest();\n });\n return this.queuedRequest;\n } else {\n // There is no request in flight, which means we should create a new one\n this.inFlightRequest = this.createInitialPromiseWithTimeout(edit);\n return this.inFlightRequest;\n }\n }\n createInitialPromiseWithTimeout(edit) {\n return new Promise(resolve => {\n this.pendingEdits.push(edit);\n this.editTimeout = setTimeout(async () => {\n this.editTimeout = null;\n await this.dispatchRequest();\n if (!this.queuedRequest) {\n // The queued request will see this inFlightRequest resolve and should set the inFlightRequest to itself\n this.inFlightRequest = null;\n }\n resolve();\n }, 0);\n });\n }\n async dispatchRequest() {\n const copiedEdits = this.pendingEdits;\n this.pendingEdits = [];\n await OntologyTransactions.postEdits(this.client, await this.client[writeableClientContext].ontologyRid, this.client[writeableClientContext].transactionRid, {\n edits: copiedEdits\n }, {\n preview: true\n });\n }\n}","/*\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 function toPropertyDataValue(value) {\n if (value == null) {\n return null; // This differs from how actions handles null, which expects a specific enum value.\n }\n if (Array.isArray(value)) {\n return value.map(item => toPropertyDataValue(item));\n }\n if (isPoint(value)) {\n return toPropertyDataValue(`${value.coordinates[1]},${value.coordinates[0]}`);\n }\n if (typeof value === \"object\") {\n const result = {};\n for (const key in value) {\n result[key] = toPropertyDataValue(value[key]);\n }\n return result;\n }\n\n // expected to pass through - boolean, byte, date, decimal, float, double, integer, long, short, string, timestamp, object type reference\n return value;\n}\nfunction isPoint(o) {\n return o && typeof o === \"object\" && \"type\" in o && o.type === \"Point\" && \"coordinates\" in o && o.coordinates.length === 2;\n}","/*\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 { createClientWithTransaction } from \"@osdk/client/unstable-do-not-use\";\nimport { EditRequestManager } from \"./EditRequestManager.js\";\nimport { toPropertyDataValue } from \"./toPropertyDataValue.js\";\nimport { writeableClientContext } from \"./WriteableClient.js\";\nexport function createWriteableClient(...args) {\n const transactionRid = args[0];\n const ontologyRid = args[2];\n const client = createClientWithTransaction(...args);\n const editRequestManager = new EditRequestManager(client) // This cast is safe because we create the writeable client properties below.\n ;\n\n // We use define properties because the client has non-enumerable properties that we want to preserve.\n const writeableClient = Object.defineProperties(client, {\n link: {\n value: function (source, apiName, target) {\n if (!Array.isArray(target)) {\n return editRequestManager.postEdit({\n type: \"addLink\",\n objectType: source.$apiName,\n primaryKey: source.$primaryKey,\n linkType: apiName,\n linkedObjectPrimaryKey: target.$primaryKey\n });\n }\n const promises = [];\n for (const elem of target) {\n promises.push(editRequestManager.postEdit({\n type: \"addLink\",\n objectType: source.$apiName,\n primaryKey: source.$primaryKey,\n linkType: apiName,\n linkedObjectPrimaryKey: elem.$primaryKey\n }));\n }\n return Promise.all(promises).then(() => undefined);\n }\n },\n unlink: {\n value: function (source, apiName, target) {\n if (!Array.isArray(target)) {\n return editRequestManager.postEdit({\n type: \"removeLink\",\n objectType: source.$apiName,\n primaryKey: source.$primaryKey,\n linkType: apiName,\n linkedObjectPrimaryKey: target.$primaryKey\n });\n }\n const promises = [];\n for (const elem of target) {\n promises.push(editRequestManager.postEdit({\n type: \"removeLink\",\n objectType: source.$apiName,\n primaryKey: source.$primaryKey,\n linkType: apiName,\n linkedObjectPrimaryKey: elem.$primaryKey\n }));\n }\n return Promise.all(promises).then(() => undefined);\n }\n },\n create: {\n value: async function (obj, properties) {\n const propertyMap = {};\n for (const [key, value] of Object.entries(properties)) {\n propertyMap[key] = toPropertyDataValue(value);\n }\n return editRequestManager.postEdit({\n type: \"addObject\",\n objectType: obj.apiName,\n primaryKey: obj.$primaryKey,\n properties: propertyMap\n });\n }\n },\n update: {\n value: function (locator, properties) {\n const propertyMap = {};\n for (const [key, value] of Object.entries(properties)) {\n propertyMap[key] = toPropertyDataValue(value);\n }\n return editRequestManager.postEdit({\n type: \"modifyObject\",\n objectType: locator.$apiName,\n primaryKey: locator.$primaryKey,\n properties: propertyMap\n });\n }\n },\n delete: {\n value: function (obj) {\n return editRequestManager.postEdit({\n type: \"deleteObject\",\n objectType: obj.$apiName,\n primaryKey: obj.$primaryKey\n });\n }\n },\n [writeableClientContext]: {\n value: {\n ontologyRid,\n transactionRid\n }\n }\n });\n return writeableClient;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { readFileSync } from \"fs\";\nimport { parse as parseYaml } from \"yaml\";\nconst FOUNDRY_SERVICE_DISCOVERY_V2_ENV_VAR = \"FOUNDRY_SERVICE_DISCOVERY_V2\";\nconst API_GATEWAY_SERVICE = \"api-gateway\";\n/**\n * Type guard to check if config is an object with uris property\n */\nfunction hasUrisProperty(config) {\n return !Array.isArray(config) && \"uris\" in config && Array.isArray(config.uris) && config.uris.every(uri => typeof uri === \"string\");\n}\n\n/**\n * Extracts URIs from either array or object format\n */\nfunction extractUris(config) {\n return hasUrisProperty(config) ? config.uris : config;\n}\n\n/**\n * Retrieves the API Gateway base URL from the Function's environment.\n *\n * This function is intended to be used only from within a function. Usage of this utility elsewhere may result\n * in errors since the environment may not be properly configured.\n *\n * @returns The API Gateway base URL (e.g., \"https://example.palantirfoundry.com\")\n * @throws Error if the API Gateway base URL has not been properly configured in the function's environment.\n *\n * @example\n * ```typescript\n * const baseUrl = getApiGatewayBaseUrl();\n * // Returns: \"https://example.palantirfoundry.com\"\n * ```\n */\nexport function getApiGatewayBaseUrl() {\n const filePath = process.env[FOUNDRY_SERVICE_DISCOVERY_V2_ENV_VAR];\n if (!filePath) {\n throw new Error(`${FOUNDRY_SERVICE_DISCOVERY_V2_ENV_VAR} environment variable is not set`);\n }\n let fileContent;\n try {\n fileContent = readFileSync(filePath, \"utf-8\");\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n throw new Error(`Failed to read service discovery file at ${filePath}: ${errorMessage}`);\n }\n let discovery;\n try {\n discovery = parseYaml(fileContent);\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n throw new Error(`Failed to parse service discovery YAML file at ${filePath}: ${errorMessage}`);\n }\n const apiGatewayConfig = discovery[API_GATEWAY_SERVICE];\n if (!apiGatewayConfig) {\n throw new Error(`${API_GATEWAY_SERVICE} service not found in service discovery file`);\n }\n const uris = extractUris(apiGatewayConfig);\n if (uris.length === 0) {\n throw new Error(`No URIs found for ${API_GATEWAY_SERVICE} service in service discovery file`);\n }\n return uris[0];\n}"]}
@@ -20,4 +20,21 @@ interface WriteMethods<X extends AnyEdit> {
20
20
 
21
21
  declare function createWriteableClient<X extends AnyEdit = never>(...args: Parameters<typeof createClientWithTransaction>): WriteableClient<X>;
22
22
 
23
- export { type WriteableClient, createWriteableClient };
23
+ /**
24
+ * Retrieves the API Gateway base URL from the Function's environment.
25
+ *
26
+ * This function is intended to be used only from within a function. Usage of this utility elsewhere may result
27
+ * in errors since the environment may not be properly configured.
28
+ *
29
+ * @returns The API Gateway base URL (e.g., "https://example.palantirfoundry.com")
30
+ * @throws Error if the API Gateway base URL has not been properly configured in the function's environment.
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * const baseUrl = getApiGatewayBaseUrl();
35
+ * // Returns: "https://example.palantirfoundry.com"
36
+ * ```
37
+ */
38
+ declare function getApiGatewayBaseUrl(): string;
39
+
40
+ export { type WriteableClient, createWriteableClient, getApiGatewayBaseUrl };
@@ -0,0 +1,24 @@
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 { MediaSets } from "@osdk/foundry.mediasets";
18
+ export function uploadMedia(client, mediaUpload) {
19
+ return MediaSets.uploadMedia(client, mediaUpload.data, {
20
+ filename: mediaUpload.fileName,
21
+ preview: true
22
+ });
23
+ }
24
+ //# sourceMappingURL=uploadMedia.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uploadMedia.js","names":["MediaSets","uploadMedia","client","mediaUpload","data","filename","fileName","preview"],"sources":["uploadMedia.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 { Client, MediaReference, MediaUpload } from \"@osdk/client\";\nimport { MediaSets } from \"@osdk/foundry.mediasets\";\n\nexport function uploadMedia(\n client: Client,\n mediaUpload: MediaUpload,\n): Promise<MediaReference> {\n return MediaSets.uploadMedia(client, mediaUpload.data, {\n filename: mediaUpload.fileName,\n preview: true,\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,SAAS,QAAQ,yBAAyB;AAEnD,OAAO,SAASC,WAAWA,CACzBC,MAAc,EACdC,WAAwB,EACC;EACzB,OAAOH,SAAS,CAACC,WAAW,CAACC,MAAM,EAAEC,WAAW,CAACC,IAAI,EAAE;IACrDC,QAAQ,EAAEF,WAAW,CAACG,QAAQ;IAC9BC,OAAO,EAAE;EACX,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -16,4 +16,5 @@
16
16
 
17
17
  export { createEditBatch } from "./edits/createEditBatch.js";
18
18
  export { UserFacingError } from "./errors/UserFacingError.js";
19
+ export { uploadMedia } from "./helpers/uploadMedia.js";
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["createEditBatch","UserFacingError"],"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 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\";\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;;AAkBA,SAASA,eAAe,QAAQ,4BAA4B;AAG5D,SAASC,eAAe,QAAQ,6BAA6B","ignoreList":[]}
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,SAASA,eAAe,QAAQ,4BAA4B;AAG5D,SAASC,eAAe,QAAQ,6BAA6B;AAC7D,SAASC,WAAW,QAAQ,0BAA0B","ignoreList":[]}
@@ -15,4 +15,5 @@
15
15
  */
16
16
 
17
17
  export { createWriteableClient } from "../transactions/createWriteableClient.js";
18
+ export { getApiGatewayBaseUrl } from "../utils/getApiGatewayBaseUrl.js";
18
19
  //# sourceMappingURL=unstable-do-not-use.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"unstable-do-not-use.js","names":["createWriteableClient"],"sources":["unstable-do-not-use.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 { createWriteableClient } from \"../transactions/createWriteableClient.js\";\nexport type { WriteableClient } from \"../transactions/WriteableClient.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,qBAAqB,QAAQ,0CAA0C","ignoreList":[]}
1
+ {"version":3,"file":"unstable-do-not-use.js","names":["createWriteableClient","getApiGatewayBaseUrl"],"sources":["unstable-do-not-use.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 { createWriteableClient } from \"../transactions/createWriteableClient.js\";\nexport type { WriteableClient } from \"../transactions/WriteableClient.js\";\nexport { getApiGatewayBaseUrl } from \"../utils/getApiGatewayBaseUrl.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,qBAAqB,QAAQ,0CAA0C;AAEhF,SAASC,oBAAoB,QAAQ,kCAAkC","ignoreList":[]}
@@ -0,0 +1,79 @@
1
+ /*
2
+ * Copyright 2024 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 { readFileSync } from "fs";
18
+ import { parse as parseYaml } from "yaml";
19
+ const FOUNDRY_SERVICE_DISCOVERY_V2_ENV_VAR = "FOUNDRY_SERVICE_DISCOVERY_V2";
20
+ const API_GATEWAY_SERVICE = "api-gateway";
21
+ /**
22
+ * Type guard to check if config is an object with uris property
23
+ */
24
+ function hasUrisProperty(config) {
25
+ return !Array.isArray(config) && "uris" in config && Array.isArray(config.uris) && config.uris.every(uri => typeof uri === "string");
26
+ }
27
+
28
+ /**
29
+ * Extracts URIs from either array or object format
30
+ */
31
+ function extractUris(config) {
32
+ return hasUrisProperty(config) ? config.uris : config;
33
+ }
34
+
35
+ /**
36
+ * Retrieves the API Gateway base URL from the Function's environment.
37
+ *
38
+ * This function is intended to be used only from within a function. Usage of this utility elsewhere may result
39
+ * in errors since the environment may not be properly configured.
40
+ *
41
+ * @returns The API Gateway base URL (e.g., "https://example.palantirfoundry.com")
42
+ * @throws Error if the API Gateway base URL has not been properly configured in the function's environment.
43
+ *
44
+ * @example
45
+ * ```typescript
46
+ * const baseUrl = getApiGatewayBaseUrl();
47
+ * // Returns: "https://example.palantirfoundry.com"
48
+ * ```
49
+ */
50
+ export function getApiGatewayBaseUrl() {
51
+ const filePath = process.env[FOUNDRY_SERVICE_DISCOVERY_V2_ENV_VAR];
52
+ if (!filePath) {
53
+ throw new Error(`${FOUNDRY_SERVICE_DISCOVERY_V2_ENV_VAR} environment variable is not set`);
54
+ }
55
+ let fileContent;
56
+ try {
57
+ fileContent = readFileSync(filePath, "utf-8");
58
+ } catch (error) {
59
+ const errorMessage = error instanceof Error ? error.message : String(error);
60
+ throw new Error(`Failed to read service discovery file at ${filePath}: ${errorMessage}`);
61
+ }
62
+ let discovery;
63
+ try {
64
+ discovery = parseYaml(fileContent);
65
+ } catch (error) {
66
+ const errorMessage = error instanceof Error ? error.message : String(error);
67
+ throw new Error(`Failed to parse service discovery YAML file at ${filePath}: ${errorMessage}`);
68
+ }
69
+ const apiGatewayConfig = discovery[API_GATEWAY_SERVICE];
70
+ if (!apiGatewayConfig) {
71
+ throw new Error(`${API_GATEWAY_SERVICE} service not found in service discovery file`);
72
+ }
73
+ const uris = extractUris(apiGatewayConfig);
74
+ if (uris.length === 0) {
75
+ throw new Error(`No URIs found for ${API_GATEWAY_SERVICE} service in service discovery file`);
76
+ }
77
+ return uris[0];
78
+ }
79
+ //# sourceMappingURL=getApiGatewayBaseUrl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getApiGatewayBaseUrl.js","names":["readFileSync","parse","parseYaml","FOUNDRY_SERVICE_DISCOVERY_V2_ENV_VAR","API_GATEWAY_SERVICE","hasUrisProperty","config","Array","isArray","uris","every","uri","extractUris","getApiGatewayBaseUrl","filePath","process","env","Error","fileContent","error","errorMessage","message","String","discovery","apiGatewayConfig","length"],"sources":["getApiGatewayBaseUrl.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { readFileSync } from \"fs\";\nimport { parse as parseYaml } from \"yaml\";\n\nconst FOUNDRY_SERVICE_DISCOVERY_V2_ENV_VAR =\n \"FOUNDRY_SERVICE_DISCOVERY_V2\" as const;\nconst API_GATEWAY_SERVICE = \"api-gateway\" as const;\n\ntype ServiceConfig = string[] | { uris: string[] };\n\ninterface ServiceDiscoveryConfig {\n [serviceName: string]: ServiceConfig;\n}\n\n/**\n * Type guard to check if config is an object with uris property\n */\nfunction hasUrisProperty(config: ServiceConfig): config is { uris: string[] } {\n return !Array.isArray(config)\n && \"uris\" in config\n && Array.isArray(config.uris)\n && config.uris.every((uri) => typeof uri === \"string\");\n}\n\n/**\n * Extracts URIs from either array or object format\n */\nfunction extractUris(config: ServiceConfig): string[] {\n return hasUrisProperty(config) ? config.uris : config;\n}\n\n/**\n * Retrieves the API Gateway base URL from the Function's environment.\n *\n * This function is intended to be used only from within a function. Usage of this utility elsewhere may result\n * in errors since the environment may not be properly configured.\n *\n * @returns The API Gateway base URL (e.g., \"https://example.palantirfoundry.com\")\n * @throws Error if the API Gateway base URL has not been properly configured in the function's environment.\n *\n * @example\n * ```typescript\n * const baseUrl = getApiGatewayBaseUrl();\n * // Returns: \"https://example.palantirfoundry.com\"\n * ```\n */\nexport function getApiGatewayBaseUrl(): string {\n const filePath = process.env[FOUNDRY_SERVICE_DISCOVERY_V2_ENV_VAR];\n\n if (!filePath) {\n throw new Error(\n `${FOUNDRY_SERVICE_DISCOVERY_V2_ENV_VAR} environment variable is not set`,\n );\n }\n\n let fileContent: string;\n try {\n fileContent = readFileSync(filePath, \"utf-8\");\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n throw new Error(\n `Failed to read service discovery file at ${filePath}: ${errorMessage}`,\n );\n }\n\n let discovery: ServiceDiscoveryConfig;\n try {\n discovery = parseYaml(fileContent) as ServiceDiscoveryConfig;\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n throw new Error(\n `Failed to parse service discovery YAML file at ${filePath}: ${errorMessage}`,\n );\n }\n\n const apiGatewayConfig = discovery[API_GATEWAY_SERVICE];\n\n if (!apiGatewayConfig) {\n throw new Error(\n `${API_GATEWAY_SERVICE} service not found in service discovery file`,\n );\n }\n\n const uris = extractUris(apiGatewayConfig);\n\n if (uris.length === 0) {\n throw new Error(\n `No URIs found for ${API_GATEWAY_SERVICE} service in service discovery file`,\n );\n }\n\n return uris[0];\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,YAAY,QAAQ,IAAI;AACjC,SAASC,KAAK,IAAIC,SAAS,QAAQ,MAAM;AAEzC,MAAMC,oCAAoC,GACxC,8BAAuC;AACzC,MAAMC,mBAAmB,GAAG,aAAsB;AAQlD;AACA;AACA;AACA,SAASC,eAAeA,CAACC,MAAqB,EAAgC;EAC5E,OAAO,CAACC,KAAK,CAACC,OAAO,CAACF,MAAM,CAAC,IACxB,MAAM,IAAIA,MAAM,IAChBC,KAAK,CAACC,OAAO,CAACF,MAAM,CAACG,IAAI,CAAC,IAC1BH,MAAM,CAACG,IAAI,CAACC,KAAK,CAAEC,GAAG,IAAK,OAAOA,GAAG,KAAK,QAAQ,CAAC;AAC1D;;AAEA;AACA;AACA;AACA,SAASC,WAAWA,CAACN,MAAqB,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B,MAAM,IAAIR,KAAK,CACb,qBAAqBb,mBAAmB,oCAC1C,CAAC;EACH;EAEA,OAAOK,IAAI,CAAC,CAAC,CAAC;AAChB","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import type { Client, MediaReference, MediaUpload } from "@osdk/client";
2
+ export declare function uploadMedia(client: Client, mediaUpload: MediaUpload): Promise<MediaReference>;
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cAAc,QAAQ,gBAAgB,mBAAmB,cAAe;AAGxE,OAAO,iBAAS,YACdA,QAAQ,QACRC,aAAa,cACZ,QAAQ","names":["client: Client","mediaUpload: MediaUpload"],"sources":["../../../src/helpers/uploadMedia.ts"],"version":3,"file":"uploadMedia.d.ts"}
@@ -1,9 +1,10 @@
1
1
  export type { DateISOString, Double, Float, Integer, Long, TimestampISOString } from "./PrimitiveTypes.js";
2
- export type { Attachment, Range, ThreeDimensionalAggregation, TwoDimensionalAggregation } from "@osdk/client";
2
+ export type { Attachment, MediaReference, MediaUpload, Range, ThreeDimensionalAggregation, TwoDimensionalAggregation } from "@osdk/client";
3
3
  export { createEditBatch } from "./edits/createEditBatch.js";
4
4
  export type { EditBatch } from "./edits/EditBatch.js";
5
5
  export type { Edits } from "./edits/types.js";
6
6
  export { UserFacingError } from "./errors/UserFacingError.js";
7
+ export { uploadMedia } from "./helpers/uploadMedia.js";
7
8
  export type { EmailNotification, Notification, NotificationLink, NotificationLinkTarget, ObjectLinkTarget, PlatformNotification, RidLinkTarget, UrlLinkTarget } from "./Notification.js";
8
9
  export type { ClassificationMarking, MandatoryMarking } from "./Markings.js";
9
10
  export type { GroupId, Principal, UserId } from "./UserGroup.js";
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cACE,eACA,QACA,OACA,SACA,MACA,0BACK;AAEP,cACE,YACA,OACA,6BACA,iCACK;AAEP,SAAS,uBAAuB;AAChC,cAAc,iBAAiB;AAC/B,cAAc,aAAa;AAC3B,SAAS,uBAAuB;AAEhC,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,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,2 +1,3 @@
1
1
  export { createWriteableClient } from "../transactions/createWriteableClient.js";
2
2
  export type { WriteableClient } from "../transactions/WriteableClient.js";
3
+ export { getApiGatewayBaseUrl } from "../utils/getApiGatewayBaseUrl.js";
@@ -1 +1 @@
1
- {"mappings":"AAgBA,SAAS,6BAA6B;AACtC,cAAc,uBAAuB","names":[],"sources":["../../../src/public/unstable-do-not-use.ts"],"version":3,"file":"unstable-do-not-use.d.ts"}
1
+ {"mappings":"AAgBA,SAAS,6BAA6B;AACtC,cAAc,uBAAuB;AACrC,SAAS,4BAA4B","names":[],"sources":["../../../src/public/unstable-do-not-use.ts"],"version":3,"file":"unstable-do-not-use.d.ts"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Retrieves the API Gateway base URL from the Function's environment.
3
+ *
4
+ * This function is intended to be used only from within a function. Usage of this utility elsewhere may result
5
+ * in errors since the environment may not be properly configured.
6
+ *
7
+ * @returns The API Gateway base URL (e.g., "https://example.palantirfoundry.com")
8
+ * @throws Error if the API Gateway base URL has not been properly configured in the function's environment.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * const baseUrl = getApiGatewayBaseUrl();
13
+ * // Returns: "https://example.palantirfoundry.com"
14
+ * ```
15
+ */
16
+ export declare function getApiGatewayBaseUrl(): string;
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;AA6DA,OAAO,iBAAS","names":[],"sources":["../../../src/utils/getApiGatewayBaseUrl.ts"],"version":3,"file":"getApiGatewayBaseUrl.d.ts"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/functions",
3
- "version": "1.4.0-beta.2",
3
+ "version": "1.4.0-beta.4",
4
4
  "description": "",
5
5
  "access": "public",
6
6
  "license": "Apache-2.0",
@@ -47,24 +47,27 @@
47
47
  }
48
48
  },
49
49
  "dependencies": {
50
- "@osdk/foundry.core": "^2.30.0",
51
- "@osdk/foundry.ontologies": "^2.35.0",
52
- "@types/geojson": "^7946.0.16"
50
+ "@osdk/foundry.core": "^2.38.0",
51
+ "@osdk/foundry.mediasets": "^2.38.0",
52
+ "@osdk/foundry.ontologies": "^2.38.0",
53
+ "@types/geojson": "^7946.0.16",
54
+ "yaml": "^2.8.1"
53
55
  },
54
56
  "peerDependencies": {
55
- "@osdk/client": "^2.6.0-beta.2"
57
+ "@osdk/client": "^2.6.0-beta.8"
56
58
  },
57
59
  "devDependencies": {
58
60
  "@microsoft/api-documenter": "^7.26.32",
59
61
  "@microsoft/api-extractor": "^7.52.11",
60
62
  "@types/geojson": "^7946.0.16",
63
+ "@types/node": "^18.19.0",
61
64
  "p-defer": "^4.0.1",
62
65
  "ts-expect": "^1.3.0",
63
66
  "typescript": "~5.5.4",
64
- "@osdk/client.test.ontology": "~2.6.0-beta.2",
65
- "@osdk/monorepo.tsconfig": "~0.5.0-beta.1",
67
+ "@osdk/client.test.ontology": "~2.6.0-beta.8",
68
+ "@osdk/shared.test": "~2.6.0-beta.3",
66
69
  "@osdk/monorepo.api-extractor": "~0.5.0-beta.1",
67
- "@osdk/shared.test": "~2.6.0-beta.2"
70
+ "@osdk/monorepo.tsconfig": "~0.5.0-beta.1"
68
71
  },
69
72
  "publishConfig": {
70
73
  "access": "public"
@@ -1,11 +0,0 @@
1
- 'use strict';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __export = (target, all) => {
5
- for (var name in all)
6
- __defProp(target, name, { get: all[name], enumerable: true });
7
- };
8
-
9
- exports.__export = __export;
10
- //# sourceMappingURL=chunk-Q7SFCCGT.cjs.map
11
- //# sourceMappingURL=chunk-Q7SFCCGT.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-Q7SFCCGT.cjs"}