@osdk/client 0.19.0 → 0.19.1-main-20240517182038

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 (37) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/build/js/{chunk-RRZAWVXI.browser.mjs → chunk-3CNPDXOR.browser.mjs} +525 -16
  3. package/build/js/chunk-3CNPDXOR.browser.mjs.map +1 -0
  4. package/build/js/{chunk-UFAOLLVO.mjs → chunk-HJIFZCUU.mjs} +525 -16
  5. package/build/js/chunk-HJIFZCUU.mjs.map +1 -0
  6. package/build/js/{chunk-OLO4AGDC.cjs → chunk-PWETA2FS.cjs} +525 -15
  7. package/build/js/chunk-PWETA2FS.cjs.map +1 -0
  8. package/build/js/index.browser.mjs +1 -1
  9. package/build/js/index.cjs +3 -3
  10. package/build/js/index.mjs +1 -1
  11. package/build/js/public/unstable-do-not-use.browser.mjs +4 -8
  12. package/build/js/public/unstable-do-not-use.browser.mjs.map +1 -1
  13. package/build/js/public/unstable-do-not-use.cjs +8 -12
  14. package/build/js/public/unstable-do-not-use.cjs.map +1 -1
  15. package/build/js/public/unstable-do-not-use.mjs +4 -8
  16. package/build/js/public/unstable-do-not-use.mjs.map +1 -1
  17. package/build/types/Client.d.ts +1 -1
  18. package/build/types/generatedNoCheck/OntologyMetadata.d.ts +1 -1
  19. package/build/types/object/fetchPage.d.ts.map +1 -1
  20. package/build/types/object/fetchSingle.d.ts +1 -1
  21. package/build/types/object/fetchSingle.d.ts.map +1 -1
  22. package/build/types/objectSet/ObjectSetListenerWebsocket.d.ts +7 -1
  23. package/build/types/objectSet/ObjectSetListenerWebsocket.d.ts.map +1 -1
  24. package/build/types/objectSet/toConjureObjectSet.d.ts +1 -1
  25. package/build/types/objectSet/toConjureObjectSet.d.ts.map +1 -1
  26. package/build/types/ontology/StandardOntologyProvider.d.ts.map +1 -1
  27. package/build/types/ontology/loadFullObjectMetadata.d.ts.map +1 -1
  28. package/build/types/util/WireObjectSet.d.ts +1 -1
  29. package/build/types/util/WireObjectSet.d.ts.map +1 -1
  30. package/build/types/util/isOntologyObjectV2.d.ts +1 -1
  31. package/build/types/util/isOntologyObjectV2.d.ts.map +1 -1
  32. package/build/types/util/toDataValue.d.ts +1 -1
  33. package/build/types/util/toDataValue.d.ts.map +1 -1
  34. package/package.json +7 -7
  35. package/build/js/chunk-OLO4AGDC.cjs.map +0 -1
  36. package/build/js/chunk-RRZAWVXI.browser.mjs.map +0 -1
  37. package/build/js/chunk-UFAOLLVO.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkOLO4AGDC_cjs = require('../chunk-OLO4AGDC.cjs');
3
+ var chunkPWETA2FS_cjs = require('../chunk-PWETA2FS.cjs');
4
4
  var shared_net = require('@osdk/shared.net');
5
5
  var WebSocket = require('isomorphic-ws');
6
6
  var invariant2 = require('tiny-invariant');
@@ -11,10 +11,6 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
11
11
  var WebSocket__default = /*#__PURE__*/_interopDefault(WebSocket);
12
12
  var invariant2__default = /*#__PURE__*/_interopDefault(invariant2);
13
13
 
14
- var _getObjectTypeV2 = [0, "/v2/ontologies/{0}/objectTypes/{1}"];
15
- function getObjectTypeV2($ctx, ...args) {
16
- return shared_net.foundryPlatformFetch($ctx, _getObjectTypeV2, ...args);
17
- }
18
14
  async function getLinkTypesForObjectTypes(ctx, request) {
19
15
  return conjureLite.conjureFetch(ctx, `/ontology/linkTypesForObjectTypes`, "POST", request);
20
16
  }
@@ -46,8 +42,8 @@ async function getOntologyVersionForRid(ctx, ontologyRid) {
46
42
  !cachedAllOntologies.ontologies[ontologyRid] ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, "ontology should be loaded") : invariant2__default.default(false) : void 0;
47
43
  return cachedAllOntologies.ontologies[ontologyRid].currentOntologyVersion;
48
44
  }
49
- var strongMemoAsync = (fn) => chunkOLO4AGDC_cjs.createSimpleAsyncCache("strong", fn).get;
50
- var weakMemoAsync = (fn) => chunkOLO4AGDC_cjs.createSimpleAsyncCache("weak", fn).get;
45
+ var strongMemoAsync = (fn) => chunkPWETA2FS_cjs.createSimpleAsyncCache("strong", fn).get;
46
+ var weakMemoAsync = (fn) => chunkPWETA2FS_cjs.createSimpleAsyncCache("weak", fn).get;
51
47
  var MetadataClient = class {
52
48
  #client;
53
49
  #ctx;
@@ -437,7 +433,7 @@ var ObjectSetListenerWebsocket = class _ObjectSetListenerWebsocket {
437
433
  this.#ensureWebsocket(),
438
434
  // look up the object type's rid and ensure that we have enabled object set watcher for that rid
439
435
  // TODO ???
440
- getObjectSetBaseType(sub.objectSet).then((baseType) => getObjectTypeV2(this.#client, this.#client.ontologyRid, baseType)).then((objectType) => this.#enableObjectSetsWatcher([objectType.rid]))
436
+ getObjectSetBaseType(sub.objectSet).then((baseType) => chunkPWETA2FS_cjs.js_exports.ObjectTypeV2.getObjectTypeV2(this.#client, this.#client.ontologyRid, baseType)).then((objectType) => this.#enableObjectSetsWatcher([objectType.rid]))
441
437
  ]);
442
438
  if (subscriptionIsDone(sub)) {
443
439
  return;
@@ -669,7 +665,7 @@ async function convertFoundryToOsdkObjects(client, ctx, objects) {
669
665
  }), [propertyMapping?.propertyIdToApiNameMapping[Object.entries(object.key)[0][0]], Object.entries(object.key)[0][1]], ["__apiName", propertyMapping?.apiName], ["$apiName", propertyMapping?.apiName]]);
670
666
  return convertedObject;
671
667
  }));
672
- return await chunkOLO4AGDC_cjs.convertWireToOsdkObjects(client, osdkObjects, void 0);
668
+ return await chunkPWETA2FS_cjs.convertWireToOsdkObjects(client, osdkObjects, void 0);
673
669
  }
674
670
 
675
671
  // src/objectSet/createUnstableObjectSet.ts
@@ -678,7 +674,7 @@ function UNSTABLE_createObjectSet(objectType, clientCtx, objectSet = {
678
674
  objectType: objectType["apiName"]
679
675
  }) {
680
676
  return Object.assign(
681
- chunkOLO4AGDC_cjs.createObjectSet(objectType, clientCtx, objectSet),
677
+ chunkPWETA2FS_cjs.createObjectSet(objectType, clientCtx, objectSet),
682
678
  {
683
679
  subscribe(listener) {
684
680
  const pendingSubscribe = ObjectSetListenerWebsocket.getInstance(clientCtx).subscribe(objectSet, listener);
@@ -810,7 +806,7 @@ function getPrimaryKeyOrThrow(ref) {
810
806
 
811
807
  // src/__unstable/UNSTABLE_createClient.ts
812
808
  function UNSTABLE_createClient(...args) {
813
- const client = chunkOLO4AGDC_cjs.createClientInternal(UNSTABLE_createObjectSet, ...args);
809
+ const client = chunkPWETA2FS_cjs.createClientInternal(UNSTABLE_createObjectSet, ...args);
814
810
  const unstableClient = Object.defineProperties(client, {
815
811
  __UNSTABLE_getBulkLinks: {
816
812
  get: () => createBulkLinksAsyncIterFactory(client[shared_net.symbolClientContext])
@@ -835,7 +831,7 @@ function UNSTABLE_createClient(...args) {
835
831
 
836
832
  Object.defineProperty(exports, "augment", {
837
833
  enumerable: true,
838
- get: function () { return chunkOLO4AGDC_cjs.augment; }
834
+ get: function () { return chunkPWETA2FS_cjs.augment; }
839
835
  });
840
836
  exports.createClient = UNSTABLE_createClient;
841
837
  //# sourceMappingURL=out.js.map