@osdk/functions 1.5.0 → 1.6.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,52 +1,14 @@
1
1
  # @osdk/functions
2
2
 
3
- ## 1.5.0
3
+ ## 1.6.0-beta.2
4
4
 
5
- ### Patch Changes
6
-
7
- - 776ae8a: Simulated release
8
- - c6124eb: Add ability to flush edits to transactions
9
- - 448763f: introduce new token field, note readToken as deprecated
10
- - 31cd835: Revert beta changes
11
- - dc33f68: Add Transaction ID to Queries
12
- - Updated dependencies [322c5bc]
13
- - Updated dependencies [adca853]
14
- - Updated dependencies [03db734]
15
- - Updated dependencies [1e3c147]
16
- - Updated dependencies [6cfe14a]
17
- - Updated dependencies [fb83808]
18
- - Updated dependencies [ec6ad57]
19
- - Updated dependencies [c6124eb]
20
- - Updated dependencies [6b27d8a]
21
- - Updated dependencies [0b0be9f]
22
- - Updated dependencies [24730c7]
23
- - Updated dependencies [eb3a556]
24
- - Updated dependencies [c332598]
25
- - Updated dependencies [3fc5fe6]
26
- - Updated dependencies [a23784c]
27
- - Updated dependencies [bb9d25c]
28
- - Updated dependencies [ecd18e2]
29
- - Updated dependencies [f0a57a5]
30
- - Updated dependencies [be74c3c]
31
- - Updated dependencies [31cd835]
32
- - Updated dependencies [dc33f68]
33
- - Updated dependencies [266b901]
34
- - Updated dependencies [38d5958]
35
- - Updated dependencies [0dbd0d0]
36
- - Updated dependencies [d5cfc38]
37
- - Updated dependencies [0b2cd91]
38
- - Updated dependencies [c8da6b7]
39
- - @osdk/client@2.7.0
5
+ ### Minor Changes
40
6
 
41
- ## 1.5.0-rc.5
7
+ - 0a0d7cb: Filter out $ prefixed properties when creating or updating objects in writeable client
42
8
 
43
9
  ### Patch Changes
44
10
 
45
- - 31cd835: Revert beta changes
46
- - Updated dependencies [eb3a556]
47
- - Updated dependencies [31cd835]
48
- - Updated dependencies [0dbd0d0]
49
- - @osdk/client@2.7.0-rc.15
11
+ - @osdk/client@2.8.0-beta.8
50
12
 
51
13
  ## 1.5.0-beta.4
52
14
 
@@ -82,68 +44,6 @@
82
44
  - Updated dependencies [f0a57a5]
83
45
  - @osdk/client@2.7.0-beta.3
84
46
 
85
- ## 1.4.0
86
-
87
- ### Patch Changes
88
-
89
- - 776ae8a: Simulated release
90
-
91
- - b313525: bump osdk
92
-
93
- - 3fbb596: Pipe through transactionId to endpoints that load data via object sets
94
-
95
- - 7f9f123: Add foundry hostname util
96
-
97
- - 3d7dc0a: introduce new token field, note readToken as deprecated
98
-
99
- - f318daf: Use correct API gateway service name
100
-
101
- - b307201: Add edits support for media reference.
102
-
103
- - a2e9c62: Fix upload function.
104
-
105
- - a1ffb20: Use new ephemeral media upload endpoint.
106
-
107
- - af4f3bf: Remove the following features for RC:
108
- - Property formatting
109
- - Branching
110
- - Constant RDPs
111
-
112
- - Updated dependencies [322c5bc]
113
-
114
- - Updated dependencies [b48526f]
115
-
116
- - Updated dependencies [b313525]
117
-
118
- - Updated dependencies [3fbb596]
119
-
120
- - Updated dependencies [f7ae38a]
121
-
122
- - Updated dependencies [486ef7e]
123
-
124
- - Updated dependencies [ea077c6]
125
-
126
- - Updated dependencies [507ec7f]
127
-
128
- - Updated dependencies [c5a3815]
129
-
130
- - Updated dependencies [5a9cd8f]
131
-
132
- - Updated dependencies [61eb5b0]
133
-
134
- - Updated dependencies [9961f06]
135
-
136
- - Updated dependencies [e7bf02a]
137
-
138
- - Updated dependencies [a1ffb20]
139
-
140
- - Updated dependencies [b959085]
141
-
142
- - Updated dependencies [af4f3bf]
143
-
144
- - Updated dependencies [e62c692]
145
- - @osdk/client@2.6.0
146
-
147
47
  ## 1.4.0-beta.9
148
48
 
149
49
  ### Minor Changes
@@ -78,6 +78,7 @@ export function createWriteableClient(transactionId, ...args) {
78
78
  value: async function (obj, properties) {
79
79
  const propertyMap = {};
80
80
  for (const [key, value] of Object.entries(properties)) {
81
+ if (key.startsWith("$")) continue;
81
82
  propertyMap[key] = toPropertyDataValue(value);
82
83
  }
83
84
  return editRequestManager.postEdit({
@@ -91,6 +92,7 @@ export function createWriteableClient(transactionId, ...args) {
91
92
  value: function (locator, properties) {
92
93
  const propertyMap = {};
93
94
  for (const [key, value] of Object.entries(properties)) {
95
+ if (key.startsWith("$")) continue;
94
96
  propertyMap[key] = toPropertyDataValue(value);
95
97
  }
96
98
  return editRequestManager.postEdit({
@@ -1 +1 @@
1
- {"version":3,"file":"createWriteableClient.js","names":["createClientWithTransaction","EditRequestManager","toPropertyDataValue","writeableClientContext","createWriteableClient","transactionId","args","ontologyRid","client","editRequestManager","writeableClient","Object","defineProperties","link","value","source","apiName","target","Array","isArray","postEdit","type","objectType","$apiName","primaryKey","$primaryKey","linkType","linkedObjectPrimaryKey","promises","elem","push","Promise","all","then","undefined","unlink","create","obj","properties","propertyMap","key","entries","update","locator","delete"],"sources":["createWriteableClient.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 { createClientWithTransaction } from \"@osdk/client/unstable-do-not-use\";\n\nimport type { Client, createClient } from \"@osdk/client\";\nimport type {\n AddLinkApiNames,\n AddLinkSources,\n AddLinkTargets,\n CreatableObjectOrInterfaceTypeProperties,\n CreatableObjectOrInterfaceTypes,\n DeletableObjectOrInterfaceLocators,\n RemoveLinkApiNames,\n RemoveLinkSources,\n RemoveLinkTargets,\n UpdatableObjectOrInterfaceLocatorProperties,\n UpdatableObjectOrInterfaceLocators,\n} from \"../edits/EditBatch.js\";\nimport type { AnyEdit } from \"../edits/types.js\";\nimport { EditRequestManager } from \"./EditRequestManager.js\";\nimport { toPropertyDataValue } from \"./toPropertyDataValue.js\";\nimport type {\n WriteableClient,\n WriteableClientContext,\n WriteMethods,\n} from \"./WriteableClient.js\";\nimport { writeableClientContext } from \"./WriteableClient.js\";\n\nexport function createWriteableClient<\n X extends AnyEdit = never,\n>(\n transactionId: string,\n ...args: Parameters<typeof createClient>\n): WriteableClient<X> {\n const ontologyRid = args[1];\n\n const client = createClientWithTransaction(\n transactionId,\n async () => {},\n ...args,\n ) as Client;\n\n const editRequestManager = new EditRequestManager(\n client as WriteableClient<any>, // 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 client,\n {\n link: {\n value: function<\n SOL extends AddLinkSources<X>,\n A extends AddLinkApiNames<X, SOL>,\n >(\n source: SOL,\n apiName: A,\n target: AddLinkTargets<X, SOL, A>,\n ): Promise<void> {\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: Promise<void>[] = [];\n\n for (const elem of target) {\n promises.push(\n editRequestManager.postEdit({\n type: \"addLink\",\n objectType: source.$apiName,\n primaryKey: source.$primaryKey,\n linkType: apiName,\n linkedObjectPrimaryKey: elem.$primaryKey,\n }),\n );\n }\n return Promise.all(promises).then(() => undefined);\n },\n },\n unlink: {\n value: function<\n SOL extends RemoveLinkSources<X>,\n A extends RemoveLinkApiNames<X, SOL>,\n >(\n source: SOL,\n apiName: A,\n target: RemoveLinkTargets<X, SOL, A>,\n ): Promise<void> {\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: Promise<void>[] = [];\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<OTD extends CreatableObjectOrInterfaceTypes<X>>(\n obj: OTD,\n properties: CreatableObjectOrInterfaceTypeProperties<X, OTD>,\n ): Promise<void> {\n const propertyMap: { [propertyName: string]: unknown } = {};\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 properties: propertyMap,\n });\n },\n },\n update: {\n value: function<\n SOL extends UpdatableObjectOrInterfaceLocators<X>,\n OTD extends UpdatableObjectOrInterfaceLocatorProperties<X, SOL>,\n >(\n locator: SOL,\n properties: OTD,\n ): Promise<void> {\n const propertyMap: { [propertyName: string]: unknown } = {};\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<OL extends DeletableObjectOrInterfaceLocators<X>>(\n obj: OL,\n ): Promise<void> {\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 transactionId,\n editRequestManager,\n } satisfies WriteableClientContext,\n },\n } satisfies Record<\n keyof WriteMethods<any> | typeof writeableClientContext,\n PropertyDescriptor\n >,\n ) as WriteableClient<X>;\n\n return writeableClient;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,2BAA2B,QAAQ,kCAAkC;AAiB9E,SAASC,kBAAkB,QAAQ,yBAAyB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GAAG,CAACrB,OAAO;UACvBsB,UAAU,EAAEC;QACd,CAAC,CAAC;MACJ;IACF,CAAC;IACDG,MAAM,EAAE;MACN5B,KAAK,EAAE,SAAAA,CAIL6B,OAAY,EACZL,UAAe,EACA;QACf,MAAMC,WAAgD,GAAG,CAAC,CAAC;QAC3D,KAAK,MAAM,CAACC,GAAG,EAAE1B,KAAK,CAAC,IAAIH,MAAM,CAAC8B,OAAO,CAACH,UAAU,CAAC,EAAE;UACrDC,WAAW,CAACC,GAAG,CAAC,GAAGtC,mBAAmB,CAACY,KAAK,CAAC;QAC/C;QACA,OAAOL,kBAAkB,CAACW,QAAQ,CAAC;UACjCC,IAAI,EAAE,cAAc;UACpBC,UAAU,EAAEqB,OAAO,CAACpB,QAAQ;UAC5BC,UAAU,EAAEmB,OAAO,CAAClB,WAAW;UAC/Ba,UAAU,EAAEC;QACd,CAAC,CAAC;MACJ;IACF,CAAC;IACDK,MAAM,EAAE;MACN9B,KAAK,EAAE,SAAAA,CACLuB,GAAO,EACQ;QACf,OAAO5B,kBAAkB,CAACW,QAAQ,CAAC;UACjCC,IAAI,EAAE,cAAc;UACpBC,UAAU,EAAEe,GAAG,CAACd,QAAQ;UACxBC,UAAU,EAAEa,GAAG,CAACZ;QAClB,CAAC,CAAC;MACJ;IACF,CAAC;IACD,CAACtB,sBAAsB,GAAG;MACxBW,KAAK,EAAE;QACLP,WAAW;QACXF,aAAa;QACbI;MACF;IACF;EACF,CAIF,CAAuB;EAEvB,OAAOC,eAAe;AACxB","ignoreList":[]}
1
+ {"version":3,"file":"createWriteableClient.js","names":["createClientWithTransaction","EditRequestManager","toPropertyDataValue","writeableClientContext","createWriteableClient","transactionId","args","ontologyRid","client","editRequestManager","writeableClient","Object","defineProperties","link","value","source","apiName","target","Array","isArray","postEdit","type","objectType","$apiName","primaryKey","$primaryKey","linkType","linkedObjectPrimaryKey","promises","elem","push","Promise","all","then","undefined","unlink","create","obj","properties","propertyMap","key","entries","startsWith","update","locator","delete"],"sources":["createWriteableClient.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 { createClientWithTransaction } from \"@osdk/client/unstable-do-not-use\";\n\nimport type { Client, createClient } from \"@osdk/client\";\nimport type {\n AddLinkApiNames,\n AddLinkSources,\n AddLinkTargets,\n CreatableObjectOrInterfaceTypeProperties,\n CreatableObjectOrInterfaceTypes,\n DeletableObjectOrInterfaceLocators,\n RemoveLinkApiNames,\n RemoveLinkSources,\n RemoveLinkTargets,\n UpdatableObjectOrInterfaceLocatorProperties,\n UpdatableObjectOrInterfaceLocators,\n} from \"../edits/EditBatch.js\";\nimport type { AnyEdit } from \"../edits/types.js\";\nimport { EditRequestManager } from \"./EditRequestManager.js\";\nimport { toPropertyDataValue } from \"./toPropertyDataValue.js\";\nimport type {\n WriteableClient,\n WriteableClientContext,\n WriteMethods,\n} from \"./WriteableClient.js\";\nimport { writeableClientContext } from \"./WriteableClient.js\";\n\nexport function createWriteableClient<\n X extends AnyEdit = never,\n>(\n transactionId: string,\n ...args: Parameters<typeof createClient>\n): WriteableClient<X> {\n const ontologyRid = args[1];\n\n const client = createClientWithTransaction(\n transactionId,\n async () => {},\n ...args,\n ) as Client;\n\n const editRequestManager = new EditRequestManager(\n client as WriteableClient<any>, // 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 client,\n {\n link: {\n value: function<\n SOL extends AddLinkSources<X>,\n A extends AddLinkApiNames<X, SOL>,\n >(\n source: SOL,\n apiName: A,\n target: AddLinkTargets<X, SOL, A>,\n ): Promise<void> {\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: Promise<void>[] = [];\n\n for (const elem of target) {\n promises.push(\n editRequestManager.postEdit({\n type: \"addLink\",\n objectType: source.$apiName,\n primaryKey: source.$primaryKey,\n linkType: apiName,\n linkedObjectPrimaryKey: elem.$primaryKey,\n }),\n );\n }\n return Promise.all(promises).then(() => undefined);\n },\n },\n unlink: {\n value: function<\n SOL extends RemoveLinkSources<X>,\n A extends RemoveLinkApiNames<X, SOL>,\n >(\n source: SOL,\n apiName: A,\n target: RemoveLinkTargets<X, SOL, A>,\n ): Promise<void> {\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: Promise<void>[] = [];\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<OTD extends CreatableObjectOrInterfaceTypes<X>>(\n obj: OTD,\n properties: CreatableObjectOrInterfaceTypeProperties<X, OTD>,\n ): Promise<void> {\n const propertyMap: { [propertyName: string]: unknown } = {};\n for (const [key, value] of Object.entries(properties)) {\n if (key.startsWith(\"$\")) continue;\n propertyMap[key] = toPropertyDataValue(value);\n }\n return editRequestManager.postEdit({\n type: \"addObject\",\n objectType: obj.apiName,\n properties: propertyMap,\n });\n },\n },\n update: {\n value: function<\n SOL extends UpdatableObjectOrInterfaceLocators<X>,\n OTD extends UpdatableObjectOrInterfaceLocatorProperties<X, SOL>,\n >(\n locator: SOL,\n properties: OTD,\n ): Promise<void> {\n const propertyMap: { [propertyName: string]: unknown } = {};\n for (const [key, value] of Object.entries(properties)) {\n if (key.startsWith(\"$\")) continue;\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<OL extends DeletableObjectOrInterfaceLocators<X>>(\n obj: OL,\n ): Promise<void> {\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 transactionId,\n editRequestManager,\n } satisfies WriteableClientContext,\n },\n } satisfies Record<\n keyof WriteMethods<any> | typeof writeableClientContext,\n PropertyDescriptor\n >,\n ) as WriteableClient<X>;\n\n return writeableClient;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,2BAA2B,QAAQ,kCAAkC;AAiB9E,SAASC,kBAAkB,QAAQ,yBAAyB;AAC5D,SAASC,mBAAmB,QAAQ,0BAA0B;AAM9D,SAASC,sBAAsB,QAAQ,sBAAsB;AAE7D,OAAO,SAASC,qBAAqBA,CAGnCC,aAAqB,EACrB,GAAGC,IAAqC,EACpB;EACpB,MAAMC,WAAW,GAAGD,IAAI,CAAC,CAAC,CAAC;EAE3B,MAAME,MAAM,GAAGR,2BAA2B,CACxCK,aAAa,EACb,YAAY,CAAC,CAAC,EACd,GAAGC,IACL,CAAW;EAEX,MAAMG,kBAAkB,GAAG,IAAIR,kBAAkB,CAC/CO,MACF,CAAC,CADiC;EACjC;;EAED;EACA,MAAME,eAAe,GAAGC,MAAM,CAACC,gBAAgB,CAC7CJ,MAAM,EACN;IACEK,IAAI,EAAE;MACJC,KAAK,EAAE,SAAAA,CAILC,MAAW,EACXC,OAAU,EACVC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CAAC;UACjCC,IAAI,EAAE,cAAc;UACpBC,UAAU,EAAEsB,OAAO,CAACrB,QAAQ;UAC5BC,UAAU,EAAEoB,OAAO,CAACnB,WAAW;UAC/Ba,UAAU,EAAEC;QACd,CAAC,CAAC;MACJ;IACF,CAAC;IACDM,MAAM,EAAE;MACN/B,KAAK,EAAE,SAAAA,CACLuB,GAAO,EACQ;QACf,OAAO5B,kBAAkB,CAACW,QAAQ,CAAC;UACjCC,IAAI,EAAE,cAAc;UACpBC,UAAU,EAAEe,GAAG,CAACd,QAAQ;UACxBC,UAAU,EAAEa,GAAG,CAACZ;QAClB,CAAC,CAAC;MACJ;IACF,CAAC;IACD,CAACtB,sBAAsB,GAAG;MACxBW,KAAK,EAAE;QACLP,WAAW;QACXF,aAAa;QACbI;MACF;IACF;EACF,CAIF,CAAuB;EAEvB,OAAOC,eAAe;AACxB","ignoreList":[]}
@@ -175,6 +175,7 @@ function createWriteableClient(transactionId, ...args) {
175
175
  value: async function(obj, properties) {
176
176
  const propertyMap = {};
177
177
  for (const [key, value] of Object.entries(properties)) {
178
+ if (key.startsWith("$")) continue;
178
179
  propertyMap[key] = toPropertyDataValue(value);
179
180
  }
180
181
  return editRequestManager.postEdit({
@@ -188,6 +189,7 @@ function createWriteableClient(transactionId, ...args) {
188
189
  value: function(locator, properties) {
189
190
  const propertyMap = {};
190
191
  for (const [key, value] of Object.entries(properties)) {
192
+ if (key.startsWith("$")) continue;
191
193
  propertyMap[key] = toPropertyDataValue(value);
192
194
  }
193
195
  return editRequestManager.postEdit({
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.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/transactions/flushEdits.ts","../../../src/utils/getApiGatewayBaseUrl.ts"],"names":["__export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AI,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/{transactionId}/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].transactionId, {\n edits: copiedEdits\n }, {\n preview: true\n });\n }\n async flushPendingEdits() {\n if (this.editTimeout) {\n clearTimeout(this.editTimeout);\n this.editTimeout = null;\n if (this.pendingEdits.length > 0) {\n await this.dispatchRequest();\n this.inFlightRequest = null;\n }\n }\n if (this.inFlightRequest) {\n await this.inFlightRequest;\n }\n if (this.queuedRequest) {\n await this.queuedRequest;\n }\n if (this.pendingEdits.length > 0) {\n await this.dispatchRequest();\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(transactionId, ...args) {\n const ontologyRid = args[1];\n const client = createClientWithTransaction(transactionId, async () => {}, ...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 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 transactionId,\n editRequestManager\n }\n }\n });\n return writeableClient;\n}","/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { writeableClientContext } from \"./WriteableClient.js\";\nexport async function flushEdits(client) {\n await client[writeableClientContext].editRequestManager.flushPendingEdits();\n return;\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}"]}
1
+ {"version":3,"sources":["../../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.44.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/transactions/flushEdits.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,GAAA,IAAA;AAAA,EAClB,aAAgB,GAAA,IAAA;AAAA,EAChB,WAAc,GAAA,IAAA;AAAA,EACd,YAAY,MAAQ,EAAA;AAClB,IAAA,IAAA,CAAK,MAAS,GAAA,MAAA;AAAA;AAChB,EACA,SAAS,IAAM,EAAA;AACb,IAAA,IAAI,KAAK,eAAiB,EAAA;AACxB,MAAA,IAAI,KAAK,WAAa,EAAA;AAEpB,QAAK,IAAA,CAAA,YAAA,CAAa,KAAK,IAAI,CAAA;AAC3B,QAAA,OAAO,IAAK,CAAA,eAAA;AAAA;AAEd,MAAA,IAAI,KAAK,aAAe,EAAA;AAEtB,QAAK,IAAA,CAAA,YAAA,CAAa,KAAK,IAAI,CAAA;AAC3B,QAAA,OAAO,IAAK,CAAA,aAAA;AAAA;AAGd,MAAA,I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C,WAAU,WAAW,CAAA;AAAA,WAC1B,KAAO,EAAA;AACd,IAAA,MAAM,eAAe,KAAiB,YAAA,KAAA,GAAQ,KAAM,CAAA,OAAA,GAAU,OAAO,KAAK,CAAA;AAC1E,IAAA,MAAM,IAAI,KAAM,CAAA,CAAA,+CAAA,EAAkD,QAAQ,CAAA,EAAA,EAAK,YAAY,CAAE,CAAA,CAAA;AAAA;AAE/F,EAAM,MAAA,gBAAA,GAAmB,UAAU,mBAAmB,CAAA;AACtD,EAAA,IAAI,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/{transactionId}/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].transactionId, {\n edits: copiedEdits\n }, {\n preview: true\n });\n }\n async flushPendingEdits() {\n if (this.editTimeout) {\n clearTimeout(this.editTimeout);\n this.editTimeout = null;\n if (this.pendingEdits.length > 0) {\n await this.dispatchRequest();\n this.inFlightRequest = null;\n }\n }\n if (this.inFlightRequest) {\n await this.inFlightRequest;\n }\n if (this.queuedRequest) {\n await this.queuedRequest;\n }\n if (this.pendingEdits.length > 0) {\n await this.dispatchRequest();\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(transactionId, ...args) {\n const ontologyRid = args[1];\n const client = createClientWithTransaction(transactionId, async () => {}, ...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 if (key.startsWith(\"$\")) continue;\n propertyMap[key] = toPropertyDataValue(value);\n }\n return editRequestManager.postEdit({\n type: \"addObject\",\n objectType: obj.apiName,\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 if (key.startsWith(\"$\")) continue;\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 transactionId,\n editRequestManager\n }\n }\n });\n return writeableClient;\n}","/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { writeableClientContext } from \"./WriteableClient.js\";\nexport async function flushEdits(client) {\n await client[writeableClientContext].editRequestManager.flushPendingEdits();\n return;\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}"]}
@@ -78,6 +78,7 @@ export function createWriteableClient(transactionId, ...args) {
78
78
  value: async function (obj, properties) {
79
79
  const propertyMap = {};
80
80
  for (const [key, value] of Object.entries(properties)) {
81
+ if (key.startsWith("$")) continue;
81
82
  propertyMap[key] = toPropertyDataValue(value);
82
83
  }
83
84
  return editRequestManager.postEdit({
@@ -91,6 +92,7 @@ export function createWriteableClient(transactionId, ...args) {
91
92
  value: function (locator, properties) {
92
93
  const propertyMap = {};
93
94
  for (const [key, value] of Object.entries(properties)) {
95
+ if (key.startsWith("$")) continue;
94
96
  propertyMap[key] = toPropertyDataValue(value);
95
97
  }
96
98
  return editRequestManager.postEdit({
@@ -1 +1 @@
1
- {"version":3,"file":"createWriteableClient.js","names":["createClientWithTransaction","EditRequestManager","toPropertyDataValue","writeableClientContext","createWriteableClient","transactionId","args","ontologyRid","client","editRequestManager","writeableClient","Object","defineProperties","link","value","source","apiName","target","Array","isArray","postEdit","type","objectType","$apiName","primaryKey","$primaryKey","linkType","linkedObjectPrimaryKey","promises","elem","push","Promise","all","then","undefined","unlink","create","obj","properties","propertyMap","key","entries","update","locator","delete"],"sources":["createWriteableClient.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 { createClientWithTransaction } from \"@osdk/client/unstable-do-not-use\";\n\nimport type { Client, createClient } from \"@osdk/client\";\nimport type {\n AddLinkApiNames,\n AddLinkSources,\n AddLinkTargets,\n CreatableObjectOrInterfaceTypeProperties,\n CreatableObjectOrInterfaceTypes,\n DeletableObjectOrInterfaceLocators,\n RemoveLinkApiNames,\n RemoveLinkSources,\n RemoveLinkTargets,\n UpdatableObjectOrInterfaceLocatorProperties,\n UpdatableObjectOrInterfaceLocators,\n} from \"../edits/EditBatch.js\";\nimport type { AnyEdit } from \"../edits/types.js\";\nimport { EditRequestManager } from \"./EditRequestManager.js\";\nimport { toPropertyDataValue } from \"./toPropertyDataValue.js\";\nimport type {\n WriteableClient,\n WriteableClientContext,\n WriteMethods,\n} from \"./WriteableClient.js\";\nimport { writeableClientContext } from \"./WriteableClient.js\";\n\nexport function createWriteableClient<\n X extends AnyEdit = never,\n>(\n transactionId: string,\n ...args: Parameters<typeof createClient>\n): WriteableClient<X> {\n const ontologyRid = args[1];\n\n const client = createClientWithTransaction(\n transactionId,\n async () => {},\n ...args,\n ) as Client;\n\n const editRequestManager = new EditRequestManager(\n client as WriteableClient<any>, // 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 client,\n {\n link: {\n value: function<\n SOL extends AddLinkSources<X>,\n A extends AddLinkApiNames<X, SOL>,\n >(\n source: SOL,\n apiName: A,\n target: AddLinkTargets<X, SOL, A>,\n ): Promise<void> {\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: Promise<void>[] = [];\n\n for (const elem of target) {\n promises.push(\n editRequestManager.postEdit({\n type: \"addLink\",\n objectType: source.$apiName,\n primaryKey: source.$primaryKey,\n linkType: apiName,\n linkedObjectPrimaryKey: elem.$primaryKey,\n }),\n );\n }\n return Promise.all(promises).then(() => undefined);\n },\n },\n unlink: {\n value: function<\n SOL extends RemoveLinkSources<X>,\n A extends RemoveLinkApiNames<X, SOL>,\n >(\n source: SOL,\n apiName: A,\n target: RemoveLinkTargets<X, SOL, A>,\n ): Promise<void> {\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: Promise<void>[] = [];\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<OTD extends CreatableObjectOrInterfaceTypes<X>>(\n obj: OTD,\n properties: CreatableObjectOrInterfaceTypeProperties<X, OTD>,\n ): Promise<void> {\n const propertyMap: { [propertyName: string]: unknown } = {};\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 properties: propertyMap,\n });\n },\n },\n update: {\n value: function<\n SOL extends UpdatableObjectOrInterfaceLocators<X>,\n OTD extends UpdatableObjectOrInterfaceLocatorProperties<X, SOL>,\n >(\n locator: SOL,\n properties: OTD,\n ): Promise<void> {\n const propertyMap: { [propertyName: string]: unknown } = {};\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<OL extends DeletableObjectOrInterfaceLocators<X>>(\n obj: OL,\n ): Promise<void> {\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 transactionId,\n editRequestManager,\n } satisfies WriteableClientContext,\n },\n } satisfies Record<\n keyof WriteMethods<any> | typeof writeableClientContext,\n PropertyDescriptor\n >,\n ) as WriteableClient<X>;\n\n return writeableClient;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,2BAA2B,QAAQ,kCAAkC;AAiB9E,SAASC,kBAAkB,QAAQ,yBAAyB;AAC5D,SAASC,mBAAmB,QAAQ,0BAA0B;AAM9D,SAASC,sBAAsB,QAAQ,sBAAsB;AAE7D,OAAO,SAASC,qBAAqBA,CAGnCC,aAAqB,EACrB,GAAGC,IAAqC,EACpB;EACpB,MAAMC,WAAW,GAAGD,IAAI,CAAC,CAAC,CAAC;EAE3B,MAAME,MAAM,GAAGR,2BAA2B,CACxCK,aAAa,EACb,YAAY,CAAC,CAAC,EACd,GAAGC,IACL,CAAW;EAEX,MAAMG,kBAAkB,GAAG,IAAIR,kBAAkB,CAC/CO,MACF,CAAC,CADiC;EACjC;;EAED;EACA,MAAME,eAAe,GAAGC,MAAM,CAACC,gBAAgB,CAC7CJ,MAAM,EACN;IACEK,IAAI,EAAE;MACJC,KAAK,EAAE,SAAAA,CAILC,MAAW,EACXC,OAAU,EACVC,MAAiC,EAClB;QACf,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,MAAM,CAAC,EAAE;UAC1B,OAAOR,kBAAkB,CAACW,QAAQ,CAAC;YACjCC,IAAI,EAAE,SAAS;YACfC,UAAU,EAAEP,MAAM,CAACQ,QAAQ;YAC3BC,UAAU,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BC,UAAU,EAAEe,GAAG,CAACd,QAAQ;UACxBC,UAAU,EAAEa,GAAG,CAACZ;QAClB,CAAC,CAAC;MACJ;IACF,CAAC;IACD,CAACtB,sBAAsB,GAAG;MACxBW,KAAK,EAAE;QACLP,WAAW;QACXF,aAAa;QACbI;MACF;IACF;EACF,CAIF,CAAuB;EAEvB,OAAOC,eAAe;AACxB","ignoreList":[]}
1
+ {"version":3,"file":"createWriteableClient.js","names":["createClientWithTransaction","EditRequestManager","toPropertyDataValue","writeableClientContext","createWriteableClient","transactionId","args","ontologyRid","client","editRequestManager","writeableClient","Object","defineProperties","link","value","source","apiName","target","Array","isArray","postEdit","type","objectType","$apiName","primaryKey","$primaryKey","linkType","linkedObjectPrimaryKey","promises","elem","push","Promise","all","then","undefined","unlink","create","obj","properties","propertyMap","key","entries","startsWith","update","locator","delete"],"sources":["createWriteableClient.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 { createClientWithTransaction } from \"@osdk/client/unstable-do-not-use\";\n\nimport type { Client, createClient } from \"@osdk/client\";\nimport type {\n AddLinkApiNames,\n AddLinkSources,\n AddLinkTargets,\n CreatableObjectOrInterfaceTypeProperties,\n CreatableObjectOrInterfaceTypes,\n DeletableObjectOrInterfaceLocators,\n RemoveLinkApiNames,\n RemoveLinkSources,\n RemoveLinkTargets,\n UpdatableObjectOrInterfaceLocatorProperties,\n UpdatableObjectOrInterfaceLocators,\n} from \"../edits/EditBatch.js\";\nimport type { AnyEdit } from \"../edits/types.js\";\nimport { EditRequestManager } from \"./EditRequestManager.js\";\nimport { toPropertyDataValue } from \"./toPropertyDataValue.js\";\nimport type {\n WriteableClient,\n WriteableClientContext,\n WriteMethods,\n} from \"./WriteableClient.js\";\nimport { writeableClientContext } from \"./WriteableClient.js\";\n\nexport function createWriteableClient<\n X extends AnyEdit = never,\n>(\n transactionId: string,\n ...args: Parameters<typeof createClient>\n): WriteableClient<X> {\n const ontologyRid = args[1];\n\n const client = createClientWithTransaction(\n transactionId,\n async () => {},\n ...args,\n ) as Client;\n\n const editRequestManager = new EditRequestManager(\n client as WriteableClient<any>, // 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 client,\n {\n link: {\n value: function<\n SOL extends AddLinkSources<X>,\n A extends AddLinkApiNames<X, SOL>,\n >(\n source: SOL,\n apiName: A,\n target: AddLinkTargets<X, SOL, A>,\n ): Promise<void> {\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: Promise<void>[] = [];\n\n for (const elem of target) {\n promises.push(\n editRequestManager.postEdit({\n type: \"addLink\",\n objectType: source.$apiName,\n primaryKey: source.$primaryKey,\n linkType: apiName,\n linkedObjectPrimaryKey: elem.$primaryKey,\n }),\n );\n }\n return Promise.all(promises).then(() => undefined);\n },\n },\n unlink: {\n value: function<\n SOL extends RemoveLinkSources<X>,\n A extends RemoveLinkApiNames<X, SOL>,\n >(\n source: SOL,\n apiName: A,\n target: RemoveLinkTargets<X, SOL, A>,\n ): Promise<void> {\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: Promise<void>[] = [];\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<OTD extends CreatableObjectOrInterfaceTypes<X>>(\n obj: OTD,\n properties: CreatableObjectOrInterfaceTypeProperties<X, OTD>,\n ): Promise<void> {\n const propertyMap: { [propertyName: string]: unknown } = {};\n for (const [key, value] of Object.entries(properties)) {\n if (key.startsWith(\"$\")) continue;\n propertyMap[key] = toPropertyDataValue(value);\n }\n return editRequestManager.postEdit({\n type: \"addObject\",\n objectType: obj.apiName,\n properties: propertyMap,\n });\n },\n },\n update: {\n value: function<\n SOL extends UpdatableObjectOrInterfaceLocators<X>,\n OTD extends UpdatableObjectOrInterfaceLocatorProperties<X, SOL>,\n >(\n locator: SOL,\n properties: OTD,\n ): Promise<void> {\n const propertyMap: { [propertyName: string]: unknown } = {};\n for (const [key, value] of Object.entries(properties)) {\n if (key.startsWith(\"$\")) continue;\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<OL extends DeletableObjectOrInterfaceLocators<X>>(\n obj: OL,\n ): Promise<void> {\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 transactionId,\n editRequestManager,\n } satisfies WriteableClientContext,\n },\n } satisfies Record<\n keyof WriteMethods<any> | typeof writeableClientContext,\n PropertyDescriptor\n >,\n ) as WriteableClient<X>;\n\n return writeableClient;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,2BAA2B,QAAQ,kCAAkC;AAiB9E,SAASC,kBA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,kBAAkB,CAACW,QAAQ,CAAC;UACjCC,IAAI,EAAE,WAAW;UACjBC,UAAU,EAAEe,GAAG,CAACrB,OAAO;UACvBsB,UAAU,EAAEC;QACd,CAAC,CAAC;MACJ;IACF,CAAC;IACDI,MAAM,EAAE;MACN7B,KAAK,EAAE,SAAAA,CAIL8B,OAAY,EACZN,UAAe,EACA;QACf,MAAMC,WAAgD,GAAG,CAAC,CAAC;QAC3D,KAAK,MAAM,CAACC,GAAG,EAAE1B,KAAK,CAAC,IAAIH,MAAM,CAAC8B,OAAO,CAACH,UAAU,CAAC,EAAE;UACrD,IAAIE,GAAG,CAACE,UAAU,CAAC,GAAG,CAAC,EAAE;UACzBH,WAAW,CAACC,GAAG,CAAC,GAAGtC,mBAAmB,CAACY,KAAK,CAAC;QAC/C;QACA,OAAOL,kBAAkB,CAACW,QAAQ,CAAC;UACjCC,IAAI,EAAE,cAAc;UACpBC,UAAU,EAAEsB,OAAO,CAACrB,QAAQ;UAC5BC,UAAU,EAAEoB,OAAO,CAACnB,WAAW;UAC/Ba,UAAU,EAAEC;QACd,CAAC,CAAC;MACJ;IACF,CAAC;IACDM,MAAM,EAAE;MACN/B,KAAK,EAAE,SAAAA,CACLuB,GAAO,EACQ;QACf,OAAO5B,kBAAkB,CAACW,QAAQ,CAAC;UACjCC,IAAI,EAAE,cAAc;UACpBC,UAAU,EAAEe,GAAG,CAACd,QAAQ;UACxBC,UAAU,EAAEa,GAAG,CAACZ;QAClB,CAAC,CAAC;MACJ;IACF,CAAC;IACD,CAACtB,sBAAsB,GAAG;MACxBW,KAAK,EAAE;QACLP,WAAW;QACXF,aAAa;QACbI;MACF;IACF;EACF,CAIF,CAAuB;EAEvB,OAAOC,eAAe;AACxB","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/functions",
3
- "version": "1.5.0",
3
+ "version": "1.6.0-beta.2",
4
4
  "description": "",
5
5
  "access": "public",
6
6
  "license": "Apache-2.0",
@@ -63,7 +63,7 @@
63
63
  "yaml": "^2.8.1"
64
64
  },
65
65
  "peerDependencies": {
66
- "@osdk/client": "^2.7.0"
66
+ "@osdk/client": "^2.8.0-beta.8"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@microsoft/api-documenter": "^7.26.32",
@@ -73,10 +73,10 @@
73
73
  "p-defer": "^4.0.1",
74
74
  "ts-expect": "^1.3.0",
75
75
  "typescript": "~5.5.4",
76
- "@osdk/client.test.ontology": "~2.7.0",
77
- "@osdk/monorepo.tsconfig": "~0.6.0",
78
- "@osdk/shared.test": "~2.7.0",
79
- "@osdk/monorepo.api-extractor": "~0.6.0"
76
+ "@osdk/client.test.ontology": "~2.8.0-beta.8",
77
+ "@osdk/monorepo.api-extractor": "~0.7.0-beta.1",
78
+ "@osdk/monorepo.tsconfig": "~0.7.0-beta.1",
79
+ "@osdk/shared.test": "~2.8.0-beta.1"
80
80
  },
81
81
  "publishConfig": {
82
82
  "access": "public"