@osdk/client 2.7.0-rc.15 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -0
- package/build/browser/observable/internal/actions/ActionApplication.js +1 -2
- package/build/browser/observable/internal/actions/ActionApplication.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/browser/util/UserAgent.js.map +1 -1
- package/build/cjs/{chunk-CDUYWOVQ.cjs → chunk-W4BHRZWL.cjs} +4 -4
- package/build/cjs/{chunk-CDUYWOVQ.cjs.map → chunk-W4BHRZWL.cjs.map} +1 -1
- package/build/cjs/index.cjs +7 -7
- package/build/cjs/public/unstable-do-not-use.cjs +18 -19
- package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
- package/build/esm/observable/internal/actions/ActionApplication.js +1 -2
- package/build/esm/observable/internal/actions/ActionApplication.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/esm/util/UserAgent.js.map +1 -1
- package/build/types/observable/internal/actions/ActionApplication.d.ts.map +1 -1
- package/package.json +11 -12
- package/build/cjs/delay-W2TSML2P.cjs +0 -75
- package/build/cjs/delay-W2TSML2P.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,65 @@
|
|
|
1
1
|
# @osdk/client
|
|
2
2
|
|
|
3
|
+
## 2.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 6cfe14a: add new useOsdkFunction hook and supporting client infrastructure
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 322c5bc: Simulated release
|
|
12
|
+
- adca853: fix fetchMore behavior
|
|
13
|
+
- 03db734: Move platform SDK deps to pnpm catalog
|
|
14
|
+
- 1e3c147: Add experimental_asyncIterLinks method on object sets
|
|
15
|
+
- fb83808: Allow arrays to use all subtype filters
|
|
16
|
+
- ec6ad57: guard against empty ontology edits in actions
|
|
17
|
+
- c6124eb: Add ability to flush edits to transactions
|
|
18
|
+
- 6b27d8a: fix sorting strategy initialization for ListQuery and ObjectSetQuery
|
|
19
|
+
- 0b0be9f: fix object spread related bug by using createOsdkObject
|
|
20
|
+
- 24730c7: fix rdp pivot behavior
|
|
21
|
+
- eb3a556: wire totalCount for osdk react hooks
|
|
22
|
+
- c332598: Adds experimental platform API hooks to fetch Foundry users
|
|
23
|
+
- 3fc5fe6: fix interface loading
|
|
24
|
+
- a23784c: wire action edit response types through for useOsdkAction
|
|
25
|
+
- bb9d25c: Allow requesting rids for OSW updates
|
|
26
|
+
- ecd18e2: fix pivotTo with where usage
|
|
27
|
+
- f0a57a5: Use new interface property fields to include interface property types in codegen
|
|
28
|
+
- be74c3c: Remove delay dependency
|
|
29
|
+
- 31cd835: Revert beta changes
|
|
30
|
+
- dc33f68: Add Transaction ID to Queries
|
|
31
|
+
- 266b901: Fix queries that return arrays of objects.
|
|
32
|
+
- 38d5958: fix order by via key stabilization
|
|
33
|
+
- 0dbd0d0: add useOsdkObjects rid querying support
|
|
34
|
+
- d5cfc38: Add null option to actions to allow clearing data
|
|
35
|
+
- 0b2cd91: fix SimplePropertyDef issue, wire RDPs through, update names
|
|
36
|
+
- c8da6b7: fix useLinks sorting strategy initialization
|
|
37
|
+
- Updated dependencies [322c5bc]
|
|
38
|
+
- Updated dependencies [322c5bc]
|
|
39
|
+
- Updated dependencies [322c5bc]
|
|
40
|
+
- Updated dependencies [322c5bc]
|
|
41
|
+
- Updated dependencies [322c5bc]
|
|
42
|
+
- Updated dependencies [322c5bc]
|
|
43
|
+
- Updated dependencies [1e3c147]
|
|
44
|
+
- Updated dependencies [8381ac2]
|
|
45
|
+
- Updated dependencies [fb83808]
|
|
46
|
+
- Updated dependencies [e462938]
|
|
47
|
+
- Updated dependencies [c9ca08d]
|
|
48
|
+
- Updated dependencies [24a1e29]
|
|
49
|
+
- Updated dependencies [448763f]
|
|
50
|
+
- Updated dependencies [bb9d25c]
|
|
51
|
+
- Updated dependencies [f0a57a5]
|
|
52
|
+
- Updated dependencies [31cd835]
|
|
53
|
+
- Updated dependencies [dc33f68]
|
|
54
|
+
- Updated dependencies [c95f3bc]
|
|
55
|
+
- Updated dependencies [d5cfc38]
|
|
56
|
+
- @osdk/api@2.7.0
|
|
57
|
+
- @osdk/client.unstable@2.7.0
|
|
58
|
+
- @osdk/generator-converters@2.7.0
|
|
59
|
+
- @osdk/shared.client.impl@1.7.0
|
|
60
|
+
- @osdk/shared.net.errors@2.7.0
|
|
61
|
+
- @osdk/shared.net.fetch@1.7.0
|
|
62
|
+
|
|
3
63
|
## 2.7.0-rc.15
|
|
4
64
|
|
|
5
65
|
### Patch Changes
|
|
@@ -50,8 +50,7 @@ export class ActionApplication {
|
|
|
50
50
|
if (process.env.NODE_ENV !== "production") {
|
|
51
51
|
if (ACTION_DELAY > 0) {
|
|
52
52
|
logger?.debug("action done, pausing", actionResults);
|
|
53
|
-
|
|
54
|
-
await delay(ACTION_DELAY);
|
|
53
|
+
await new Promise(resolve => setTimeout(resolve, ACTION_DELAY));
|
|
55
54
|
logger?.debug("action done, pausing done");
|
|
56
55
|
}
|
|
57
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionApplication.js","names":["runOptimisticJob","ACTION_DELAY","process","env","NODE_ENV","ActionApplication","constructor","store","applyAction","action","args","optimisticUpdate","logger","child","methodName","removeOptimisticResult","Array","isArray","debug","results","client","batchApplyAction","$returnEdits","invalidateActionEditResponse","actionResults","
|
|
1
|
+
{"version":3,"file":"ActionApplication.js","names":["runOptimisticJob","ACTION_DELAY","process","env","NODE_ENV","ActionApplication","constructor","store","applyAction","action","args","optimisticUpdate","logger","child","methodName","removeOptimisticResult","Array","isArray","debug","results","client","batchApplyAction","$returnEdits","invalidateActionEditResponse","actionResults","Promise","resolve","setTimeout","actionEditResponse","deletedObjects","modifiedObjects","addedObjects","editedObjectTypes","type","changes","promisesToWait","list","obj","push","invalidateObject","objectType","primaryKey","batch","cacheKey","cacheKeys","get","undefined","queries","peek","deleteFromStore","all","apiName","invalidateObjectType"],"sources":["ActionApplication.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionDefinition,\n ActionEditResponse,\n ActionReturnTypeForOptions,\n} from \"@osdk/api\";\nimport type { ActionSignatureFromDef } from \"../../../actions/applyAction.js\";\nimport { type Changes } from \"../Changes.js\";\nimport type { ObjectCacheKey } from \"../object/ObjectCacheKey.js\";\nimport type { Store } from \"../Store.js\";\nimport { runOptimisticJob } from \"./OptimisticJob.js\";\n\nconst ACTION_DELAY = process.env.NODE_ENV === \"production\" ? 0 : 1000;\n\nexport class ActionApplication {\n constructor(private store: Store) {}\n\n applyAction: <Q extends ActionDefinition<any>>(\n action: Q,\n args:\n | Parameters<ActionSignatureFromDef<Q>[\"applyAction\"]>[0]\n | Array<Parameters<ActionSignatureFromDef<Q>[\"applyAction\"]>[0]>,\n opts?: Store.ApplyActionOptions,\n ) => Promise<ActionEditResponse> = async (\n action,\n args,\n { optimisticUpdate } = {},\n ) => {\n const logger = process.env.NODE_ENV !== \"production\"\n ? this.store.logger?.child({ methodName: \"applyAction\" })\n : this.store.logger;\n const removeOptimisticResult = runOptimisticJob(\n this.store,\n optimisticUpdate,\n );\n\n return await (async () => {\n try {\n if (Array.isArray(args)) {\n if (process.env.NODE_ENV !== \"production\") {\n logger?.debug(\"applying action to multiple args\", args);\n }\n\n const results: ActionReturnTypeForOptions<{ $returnEdits: true }> =\n await this.store\n .client(action).batchApplyAction(\n args,\n { $returnEdits: true },\n );\n\n await this.#invalidateActionEditResponse(results);\n\n return results;\n }\n\n // The types for client get confused when we dynamically applyAction so we\n // have to deal with the `any` here and force cast it to what it should be.\n // TODO: Update the types so this doesn't happen!\n\n const actionResults: ActionEditResponse = await this.store.client(\n action,\n ).applyAction(args as any, { $returnEdits: true });\n\n if (process.env.NODE_ENV !== \"production\") {\n if (ACTION_DELAY > 0) {\n logger?.debug(\"action done, pausing\", actionResults);\n await new Promise<void>(resolve =>\n setTimeout(resolve, ACTION_DELAY)\n );\n logger?.debug(\"action done, pausing done\");\n }\n }\n await this.#invalidateActionEditResponse(actionResults);\n return actionResults;\n } finally {\n if (process.env.NODE_ENV !== \"production\") {\n logger?.debug(\n \"optimistic action complete; remove the results\",\n );\n }\n // make sure this happens even if the action fails\n await removeOptimisticResult();\n }\n })();\n };\n\n #invalidateActionEditResponse = async (\n actionEditResponse: ActionEditResponse | undefined,\n ): Promise<void> => {\n if (actionEditResponse == null) {\n return;\n }\n const {\n deletedObjects,\n modifiedObjects,\n addedObjects,\n editedObjectTypes,\n type,\n } = actionEditResponse;\n let changes: Changes | undefined;\n if (type === \"edits\") {\n const promisesToWait: Promise<any>[] = [];\n\n for (const list of [deletedObjects, modifiedObjects, addedObjects]) {\n for (const obj of list ?? []) {\n promisesToWait.push(\n this.store.invalidateObject(obj.objectType, obj.primaryKey),\n );\n }\n }\n\n this.store.batch({}, (batch) => {\n for (const { objectType, primaryKey } of deletedObjects ?? []) {\n const cacheKey = this.store.cacheKeys.get<ObjectCacheKey>(\n \"object\",\n objectType,\n primaryKey,\n /* rdpConfig */ undefined,\n );\n this.store.queries.peek(cacheKey)?.deleteFromStore(\n \"loaded\", // this is probably not the best value to use\n batch,\n );\n }\n });\n await Promise.all(promisesToWait);\n } else {\n for (const apiName of editedObjectTypes) {\n await this.store.invalidateObjectType(apiName as string, changes);\n }\n }\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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AAC,CAAC,CAAC,EAAGA,KAAK,IAAK;QAC9B,KAAK,MAAM;UAAEF,UAAU;UAAEC;QAAW,CAAC,IAAIZ,cAAc,IAAI,EAAE,EAAE;UAC7D,MAAMc,QAAQ,GAAG,IAAI,CAACpC,KAAK,CAACqC,SAAS,CAACC,GAAG,CACvC,QAAQ,EACRL,UAAU,EACVC,UAAU,EACV,eAAgBK,SAClB,CAAC;UACD,IAAI,CAACvC,KAAK,CAACwC,OAAO,CAACC,IAAI,CAACL,QAAQ,CAAC,EAAEM,eAAe,CAChD,QAAQ;UAAE;UACVP,KACF,CAAC;QACH;MACF,CAAC,CAAC;MACF,MAAMjB,OAAO,CAACyB,GAAG,CAACf,cAAc,CAAC;IACnC,CAAC,MAAM;MACL,KAAK,MAAMgB,OAAO,IAAInB,iBAAiB,EAAE;QACvC,MAAM,IAAI,CAACzB,KAAK,CAAC6C,oBAAoB,CAACD,OAAO,EAAYjB,OAAO,CAAC;MACnE;IACF;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
export const USER_AGENT = `osdk-client/${"2.7.0
|
|
18
|
-
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.7.0
|
|
17
|
+
export const USER_AGENT = `osdk-client/${"2.7.0"}`;
|
|
18
|
+
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.7.0"}`;
|
|
19
19
|
//# sourceMappingURL=UserAgent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserAgent.js","names":["USER_AGENT","OBSERVABLE_USER_AGENT"],"sources":["UserAgent.ts"],"sourcesContent":["/*\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 const USER_AGENT: string = `osdk-client/${process.env.PACKAGE_VERSION}`;\nexport const OBSERVABLE_USER_AGENT: string =\n `osdk-observable-client/${process.env.PACKAGE_VERSION}`;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,UAAkB,GAAG,
|
|
1
|
+
{"version":3,"file":"UserAgent.js","names":["USER_AGENT","OBSERVABLE_USER_AGENT"],"sources":["UserAgent.ts"],"sourcesContent":["/*\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 const USER_AGENT: string = `osdk-client/${process.env.PACKAGE_VERSION}`;\nexport const OBSERVABLE_USER_AGENT: string =\n `osdk-observable-client/${process.env.PACKAGE_VERSION}`;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,UAAkB,GAAG,wBAA4C;AAC9E,OAAO,MAAMC,qBAA6B,GACxC,mCAAuD","ignoreList":[]}
|
|
@@ -1922,8 +1922,8 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1922
1922
|
|
|
1923
1923
|
// src/util/UserAgent.ts
|
|
1924
1924
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
1925
|
-
var USER_AGENT = `osdk-client/${"2.7.0
|
|
1926
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.7.0
|
|
1925
|
+
var USER_AGENT = `osdk-client/${"2.7.0"}`;
|
|
1926
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.7.0"}`;
|
|
1927
1927
|
|
|
1928
1928
|
// src/createMinimalClient.ts
|
|
1929
1929
|
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkY362HOIZ_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
@@ -2463,5 +2463,5 @@ exports.createObjectSpecifierFromPrimaryKey = createObjectSpecifierFromPrimaryKe
|
|
|
2463
2463
|
exports.createOsdkObject = createOsdkObject;
|
|
2464
2464
|
exports.extractPrimaryKeyFromObjectSpecifier = extractPrimaryKeyFromObjectSpecifier;
|
|
2465
2465
|
exports.isObjectSpecifiersObject = isObjectSpecifiersObject;
|
|
2466
|
-
//# sourceMappingURL=chunk-
|
|
2467
|
-
//# sourceMappingURL=chunk-
|
|
2466
|
+
//# sourceMappingURL=chunk-W4BHRZWL.cjs.map
|
|
2467
|
+
//# sourceMappingURL=chunk-W4BHRZWL.cjs.map
|