@osdk/client 2.1.0-beta.26 → 2.1.0-beta.27

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.
@@ -869,6 +869,28 @@ var basePropDefs = {
869
869
  get: function() {
870
870
  return get$link(this);
871
871
  }
872
+ },
873
+ "$clone": {
874
+ value: function(update) {
875
+ const rawObj = this[UnderlyingOsdkObject];
876
+ const def = this[ObjectDefRef];
877
+ if (update == null) {
878
+ return createOsdkObject(this[ClientRef], def, {
879
+ ...rawObj
880
+ });
881
+ }
882
+ if (def.primaryKeyApiName in update && rawObj[def.primaryKeyApiName] !== update[def.primaryKeyApiName]) {
883
+ throw new Error(`Cannot update ${def.apiName} object with differing primary key values `);
884
+ }
885
+ if (def.titleProperty in update && !("$title" in update)) {
886
+ update.$title = update[def.titleProperty];
887
+ }
888
+ const newObject = {
889
+ ...this[UnderlyingOsdkObject],
890
+ ...update
891
+ };
892
+ return createOsdkObject(this[ClientRef], this[ObjectDefRef], newObject);
893
+ }
872
894
  }
873
895
  };
874
896
  function createOsdkObject(client, objectDef, rawObj) {
@@ -1189,7 +1211,7 @@ var createStandardOntologyProviderFactory = (client) => {
1189
1211
  };
1190
1212
 
1191
1213
  // src/util/UserAgent.ts
1192
- var USER_AGENT = `osdk-client/${"2.1.0-beta.26"}`;
1214
+ var USER_AGENT = `osdk-client/${"2.1.0-beta.27"}`;
1193
1215
 
1194
1216
  // src/createMinimalClient.ts
1195
1217
  function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkAMEMEGJZ_cjs.createObjectSet) {