@osdk/client 2.0.0-beta.6 → 2.0.0-beta.7
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 +20 -0
- package/build/browser/{chunk-CCGBSE5A.js → chunk-FGMBMQIJ.js} +50 -16
- package/build/browser/chunk-FGMBMQIJ.js.map +1 -0
- package/build/browser/index.js +2 -2
- package/build/browser/public/unstable-do-not-use.js +2 -2
- package/build/esm/actions/applyAction.d.ts +3 -1
- package/build/esm/actions/applyAction.d.ts.map +1 -1
- package/build/esm/{chunk-CCGBSE5A.js → chunk-FGMBMQIJ.js} +50 -16
- package/build/esm/chunk-FGMBMQIJ.js.map +1 -0
- package/build/esm/index.js +2 -2
- package/build/esm/public/unstable-do-not-use.js +2 -2
- package/package.json +12 -12
- package/build/browser/chunk-CCGBSE5A.js.map +0 -1
- package/build/esm/chunk-CCGBSE5A.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @osdk/client
|
|
2
2
|
|
|
3
|
+
## 2.0.0-beta.7
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 39525b8: We now have a hard dependency on pino for type resolution. This has no effect on a project if it doesn't provide a logger to the client.
|
|
8
|
+
- 512ee35: Exposed editedObjectTypes for all action results and split edits based on edit type.
|
|
9
|
+
- fc28eae: Fetching interfaces learns $\_\_EXPERIMENTAL_selectedObjectTypes
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [9b0617d]
|
|
14
|
+
- Updated dependencies [512ee35]
|
|
15
|
+
- Updated dependencies [e86c505]
|
|
16
|
+
- Updated dependencies [fc28eae]
|
|
17
|
+
- Updated dependencies [ee39a61]
|
|
18
|
+
- @osdk/api@2.0.0-beta.7
|
|
19
|
+
- @osdk/client.api@2.0.0-beta.7
|
|
20
|
+
- @osdk/client.unstable@2.0.0-beta.7
|
|
21
|
+
- @osdk/generator-converters@2.0.0-beta.7
|
|
22
|
+
|
|
3
23
|
## 2.0.0-beta.6
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
|
@@ -221,7 +221,7 @@ var __export3 = (target, all) => {
|
|
|
221
221
|
});
|
|
222
222
|
};
|
|
223
223
|
|
|
224
|
-
// ../internal.foundry.ontologies/build/esm/chunk-
|
|
224
|
+
// ../internal.foundry.ontologies/build/esm/chunk-UM4N5F6D.js
|
|
225
225
|
var QueryType_exports = {};
|
|
226
226
|
__export3(QueryType_exports, {
|
|
227
227
|
getQueryType: () => getQueryType,
|
|
@@ -231,7 +231,7 @@ var _listQueryTypes = [0, "/v1/ontologies/{0}/queryTypes", 2];
|
|
|
231
231
|
function listQueryTypes($ctx, ...args) {
|
|
232
232
|
return foundryPlatformFetch($ctx, _listQueryTypes, ...args);
|
|
233
233
|
}
|
|
234
|
-
var _getQueryType = [0, "/v1/ontologies/{0}/queryTypes/{1}"
|
|
234
|
+
var _getQueryType = [0, "/v1/ontologies/{0}/queryTypes/{1}"];
|
|
235
235
|
function getQueryType($ctx, ...args) {
|
|
236
236
|
return foundryPlatformFetch($ctx, _getQueryType, ...args);
|
|
237
237
|
}
|
|
@@ -381,12 +381,12 @@ function aggregateObjects($ctx, ...args) {
|
|
|
381
381
|
return foundryPlatformFetch($ctx, _aggregateObjects, ...args);
|
|
382
382
|
}
|
|
383
383
|
|
|
384
|
-
// ../internal.foundry.ontologies/build/esm/chunk-
|
|
384
|
+
// ../internal.foundry.ontologies/build/esm/chunk-SALCOSHR.js
|
|
385
385
|
var Query_exports = {};
|
|
386
386
|
__export3(Query_exports, {
|
|
387
387
|
executeQuery: () => executeQuery
|
|
388
388
|
});
|
|
389
|
-
var _executeQuery = [1, "/v1/ontologies/{0}/queries/{1}/execute",
|
|
389
|
+
var _executeQuery = [1, "/v1/ontologies/{0}/queries/{1}/execute", 1];
|
|
390
390
|
function executeQuery($ctx, ...args) {
|
|
391
391
|
return foundryPlatformFetch($ctx, _executeQuery, ...args);
|
|
392
392
|
}
|
|
@@ -922,7 +922,7 @@ function createAsyncClientCache(fn, createCacheLocal = createClientCache) {
|
|
|
922
922
|
}
|
|
923
923
|
|
|
924
924
|
// src/ontology/OntologyProvider.ts
|
|
925
|
-
var InterfaceDefinitions = Symbol(
|
|
925
|
+
var InterfaceDefinitions = Symbol("InterfaceDefinitions" );
|
|
926
926
|
|
|
927
927
|
// src/object/SimpleCache.ts
|
|
928
928
|
function createSimpleCache(map = /* @__PURE__ */ new Map(), fn) {
|
|
@@ -973,11 +973,11 @@ function createSimpleAsyncCache(type, fn, createCacheLocal = createSimpleCache)
|
|
|
973
973
|
}
|
|
974
974
|
|
|
975
975
|
// src/object/convertWireToOsdkObjects/InternalSymbols.ts
|
|
976
|
-
var UnderlyingOsdkObject = Symbol(
|
|
977
|
-
var ObjectDefRef = Symbol(
|
|
978
|
-
var InterfaceDefRef = Symbol(
|
|
979
|
-
var RawObject = Symbol(
|
|
980
|
-
var ClientRef = Symbol(
|
|
976
|
+
var UnderlyingOsdkObject = Symbol("Underlying Object" );
|
|
977
|
+
var ObjectDefRef = Symbol("ObjectDefinition" );
|
|
978
|
+
var InterfaceDefRef = Symbol("InterfaceDefinition" );
|
|
979
|
+
var RawObject = Symbol("RawObject" );
|
|
980
|
+
var ClientRef = Symbol("ClientRef" );
|
|
981
981
|
|
|
982
982
|
// src/object/convertWireToOsdkObjects/createOsdkInterface.ts
|
|
983
983
|
var handlerCache = createSimpleCache(/* @__PURE__ */ new WeakMap(), createInterfaceProxyHandler);
|
|
@@ -1733,7 +1733,7 @@ async function fetchInterfacePage(client, interfaceType, args, objectSet) {
|
|
|
1733
1733
|
augmentedProperties: args.$augment ?? {},
|
|
1734
1734
|
augmentedSharedPropertyTypes: {},
|
|
1735
1735
|
otherInterfaceTypes: [],
|
|
1736
|
-
selectedObjectTypes: [],
|
|
1736
|
+
selectedObjectTypes: args.$__EXPERIMENTAL_selectedObjectTypes ?? [],
|
|
1737
1737
|
selectedSharedPropertyTypes: args.$select ?? [],
|
|
1738
1738
|
where: objectSetToSearchJsonV2(objectSet, interfaceType.apiName)
|
|
1739
1739
|
}), {
|
|
@@ -1868,7 +1868,8 @@ async function applyAction2(client, action, parameters, options = {}) {
|
|
|
1868
1868
|
returnEdits: options?.$returnEdits ? "ALL" : "NONE"
|
|
1869
1869
|
}
|
|
1870
1870
|
});
|
|
1871
|
-
|
|
1871
|
+
const edits = response.edits;
|
|
1872
|
+
return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
|
|
1872
1873
|
} else {
|
|
1873
1874
|
const response = await esm_exports2.Actions.applyActionV2(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
1874
1875
|
parameters: await remapActionParams(parameters, client),
|
|
@@ -1883,7 +1884,8 @@ async function applyAction2(client, action, parameters, options = {}) {
|
|
|
1883
1884
|
if (response.validation?.result === "INVALID") {
|
|
1884
1885
|
throw new ActionValidationError(response.validation);
|
|
1885
1886
|
}
|
|
1886
|
-
|
|
1887
|
+
const edits = response.edits;
|
|
1888
|
+
return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
|
|
1887
1889
|
}
|
|
1888
1890
|
}
|
|
1889
1891
|
async function remapActionParams(params, client) {
|
|
@@ -1904,6 +1906,38 @@ async function remapBatchActionParams(params, client) {
|
|
|
1904
1906
|
}));
|
|
1905
1907
|
return remappedParams;
|
|
1906
1908
|
}
|
|
1909
|
+
function remapActionResponse(response) {
|
|
1910
|
+
const editResponses = response?.edits;
|
|
1911
|
+
if (editResponses?.type === "edits") {
|
|
1912
|
+
const remappedActionResponse = {
|
|
1913
|
+
type: editResponses.type,
|
|
1914
|
+
deletedLinksCount: editResponses.deletedLinksCount,
|
|
1915
|
+
deletedObjectsCount: editResponses.deletedObjectsCount,
|
|
1916
|
+
addedLinks: [],
|
|
1917
|
+
addedObjects: [],
|
|
1918
|
+
modifiedObjects: [],
|
|
1919
|
+
editedObjectTypes: []
|
|
1920
|
+
};
|
|
1921
|
+
const editedObjectTypesSet = /* @__PURE__ */ new Set();
|
|
1922
|
+
for (const edit of editResponses.edits) {
|
|
1923
|
+
if (edit.type === "addLink") {
|
|
1924
|
+
remappedActionResponse.addedLinks.push(edit);
|
|
1925
|
+
editedObjectTypesSet.add(edit.aSideObject.objectType);
|
|
1926
|
+
editedObjectTypesSet.add(edit.bSideObject.objectType);
|
|
1927
|
+
} else if (edit.type === "addObject") {
|
|
1928
|
+
remappedActionResponse.addedObjects.push(edit);
|
|
1929
|
+
editedObjectTypesSet.add(edit.objectType);
|
|
1930
|
+
} else if (edit.type === "modifyObject") {
|
|
1931
|
+
remappedActionResponse.modifiedObjects.push(edit);
|
|
1932
|
+
editedObjectTypesSet.add(edit.objectType);
|
|
1933
|
+
} else {
|
|
1934
|
+
process.env.NODE_ENV !== "production" ? invariant(false, "Unknown edit type") : invariant(false) ;
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1937
|
+
remappedActionResponse.editedObjectTypes = [...editedObjectTypesSet];
|
|
1938
|
+
return remappedActionResponse;
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1907
1941
|
async function loadFullObjectMetadata(client, objectType) {
|
|
1908
1942
|
const full = await esm_exports2.ObjectTypesV2.getObjectTypeFullMetadata(client, await client.ontologyRid, objectType, {
|
|
1909
1943
|
preview: true
|
|
@@ -1957,7 +1991,7 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1957
1991
|
};
|
|
1958
1992
|
|
|
1959
1993
|
// src/util/UserAgent.ts
|
|
1960
|
-
var USER_AGENT = `osdk-client/${"2.0.0-beta.
|
|
1994
|
+
var USER_AGENT = `osdk-client/${"2.0.0-beta.7"}`;
|
|
1961
1995
|
|
|
1962
1996
|
// src/createMinimalClient.ts
|
|
1963
1997
|
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = createObjectSet) {
|
|
@@ -2285,5 +2319,5 @@ function createClientInternal(objectSetFactory, baseUrl, ontologyRid, tokenProvi
|
|
|
2285
2319
|
var createClient = createClientInternal.bind(void 0, createObjectSet);
|
|
2286
2320
|
|
|
2287
2321
|
export { ActionValidationError, USER_AGENT, augment, convertWireToOsdkObjects, createAttachmentFromRid, createAttachmentUpload, createClient, createClientInternal, createObjectSet, createSimpleAsyncCache, esm_exports2 as esm_exports };
|
|
2288
|
-
//# sourceMappingURL=chunk-
|
|
2289
|
-
//# sourceMappingURL=chunk-
|
|
2322
|
+
//# sourceMappingURL=chunk-FGMBMQIJ.js.map
|
|
2323
|
+
//# sourceMappingURL=chunk-FGMBMQIJ.js.map
|