@osdk/client 2.46.0 → 2.47.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.
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunkGRALTYQI_cjs = require('./chunk-GRALTYQI.cjs');
3
+ var chunkL6WZ4TZD_cjs = require('./chunk-L6WZ4TZD.cjs');
4
4
  require('./chunk-IWUIN6JJ.cjs');
5
5
  require('./chunk-IBY4PG26.cjs');
6
6
  require('./chunk-I2SCCYG7.cjs');
7
7
  require('./chunk-PIWGMK3H.cjs');
8
- var chunk4O6723FC_cjs = require('./chunk-4O6723FC.cjs');
9
- var chunkNAA6LK6A_cjs = require('./chunk-NAA6LK6A.cjs');
8
+ var chunkLIM24DBZ_cjs = require('./chunk-LIM24DBZ.cjs');
9
+ var chunkFVEA6DER_cjs = require('./chunk-FVEA6DER.cjs');
10
10
  require('./chunk-ROJIXXGF.cjs');
11
11
  require('./chunk-H6PXPU6F.cjs');
12
12
  require('./chunk-Q7SFCCGT.cjs');
@@ -20,7 +20,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
20
20
  var invariant__default = /*#__PURE__*/_interopDefault(invariant);
21
21
 
22
22
  function createPlatformClient(baseUrl, tokenProvider, options = void 0, fetchFn = fetch) {
23
- return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider, chunkGRALTYQI_cjs.USER_AGENT, fetchFn);
23
+ return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider, chunkL6WZ4TZD_cjs.USER_AGENT, fetchFn);
24
24
  }
25
25
  var isoRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/u;
26
26
  var extractDate = (dateTime) => {
@@ -44,31 +44,31 @@ var extractDateFromIsoString = (dateTime) => {
44
44
 
45
45
  Object.defineProperty(exports, "ActionValidationError", {
46
46
  enumerable: true,
47
- get: function () { return chunkGRALTYQI_cjs.ActionValidationError; }
47
+ get: function () { return chunkL6WZ4TZD_cjs.ActionValidationError; }
48
48
  });
49
49
  Object.defineProperty(exports, "createClient", {
50
50
  enumerable: true,
51
- get: function () { return chunkGRALTYQI_cjs.createClient; }
51
+ get: function () { return chunkL6WZ4TZD_cjs.createClient; }
52
52
  });
53
53
  Object.defineProperty(exports, "createAttachmentUpload", {
54
54
  enumerable: true,
55
- get: function () { return chunk4O6723FC_cjs.createAttachmentUpload; }
55
+ get: function () { return chunkLIM24DBZ_cjs.createAttachmentUpload; }
56
56
  });
57
57
  Object.defineProperty(exports, "createObjectSpecifierFromPrimaryKey", {
58
58
  enumerable: true,
59
- get: function () { return chunk4O6723FC_cjs.createObjectSpecifierFromPrimaryKey; }
59
+ get: function () { return chunkLIM24DBZ_cjs.createObjectSpecifierFromPrimaryKey; }
60
60
  });
61
61
  Object.defineProperty(exports, "extractPrimaryKeyFromObjectSpecifier", {
62
62
  enumerable: true,
63
- get: function () { return chunk4O6723FC_cjs.extractPrimaryKeyFromObjectSpecifier; }
63
+ get: function () { return chunkLIM24DBZ_cjs.extractPrimaryKeyFromObjectSpecifier; }
64
64
  });
65
65
  Object.defineProperty(exports, "getWireObjectSet", {
66
66
  enumerable: true,
67
- get: function () { return chunkNAA6LK6A_cjs.getWireObjectSet; }
67
+ get: function () { return chunkFVEA6DER_cjs.getWireObjectSet; }
68
68
  });
69
69
  Object.defineProperty(exports, "isObjectSet", {
70
70
  enumerable: true,
71
- get: function () { return chunkNAA6LK6A_cjs.isObjectSet; }
71
+ get: function () { return chunkFVEA6DER_cjs.isObjectSet; }
72
72
  });
73
73
  Object.defineProperty(exports, "isOk", {
74
74
  enumerable: true,
@@ -1,28 +1,28 @@
1
1
  'use strict';
2
2
 
3
- var chunkGRALTYQI_cjs = require('../chunk-GRALTYQI.cjs');
3
+ var chunkL6WZ4TZD_cjs = require('../chunk-L6WZ4TZD.cjs');
4
4
  require('../chunk-IWUIN6JJ.cjs');
5
5
  require('../chunk-IBY4PG26.cjs');
6
6
  require('../chunk-I2SCCYG7.cjs');
7
7
  require('../chunk-PIWGMK3H.cjs');
8
- require('../chunk-4O6723FC.cjs');
9
- var chunkNAA6LK6A_cjs = require('../chunk-NAA6LK6A.cjs');
8
+ require('../chunk-LIM24DBZ.cjs');
9
+ var chunkFVEA6DER_cjs = require('../chunk-FVEA6DER.cjs');
10
10
  require('../chunk-ROJIXXGF.cjs');
11
11
  require('../chunk-H6PXPU6F.cjs');
12
12
  require('../chunk-Q7SFCCGT.cjs');
13
13
 
14
14
  // src/createClientFromWriteableClient.ts
15
15
  function createClientFromWriteableClient(writeableClient, options) {
16
- const ctx = writeableClient[chunkNAA6LK6A_cjs.additionalContext];
16
+ const ctx = writeableClient[chunkFVEA6DER_cjs.additionalContext];
17
17
  if (ctx.transactionId === void 0 || ctx.flushEdits === void 0) {
18
18
  throw new Error("createClientFromWriteableClient: provided client has no active transaction");
19
19
  }
20
- return chunkGRALTYQI_cjs.createClientWithTransaction(options?.transactionId ?? ctx.transactionId, ctx.flushEdits, options?.baseUrl ?? ctx.baseUrl, options?.ontologyRid ?? ctx.ontologyRid, options?.tokenProvider ?? ctx.tokenProvider);
20
+ return chunkL6WZ4TZD_cjs.createClientWithTransaction(options?.transactionId ?? ctx.transactionId, ctx.flushEdits, options?.baseUrl ?? ctx.baseUrl, options?.ontologyRid ?? ctx.ontologyRid, options?.tokenProvider ?? ctx.tokenProvider);
21
21
  }
22
22
 
23
23
  Object.defineProperty(exports, "createClientWithTransaction", {
24
24
  enumerable: true,
25
- get: function () { return chunkGRALTYQI_cjs.createClientWithTransaction; }
25
+ get: function () { return chunkL6WZ4TZD_cjs.createClientWithTransaction; }
26
26
  });
27
27
  exports.createClientFromWriteableClient = createClientFromWriteableClient;
28
28
  //# sourceMappingURL=experimental.cjs.map
@@ -1,22 +1,22 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkIBY4PG26_cjs = require('../chunk-IBY4PG26.cjs');
4
- var chunkNAA6LK6A_cjs = require('../chunk-NAA6LK6A.cjs');
4
+ var chunkFVEA6DER_cjs = require('../chunk-FVEA6DER.cjs');
5
5
  require('../chunk-ROJIXXGF.cjs');
6
6
  require('../chunk-H6PXPU6F.cjs');
7
7
  require('../chunk-Q7SFCCGT.cjs');
8
8
 
9
9
  // src/public-utils/createAndFetchTempObjectSetRid.ts
10
10
  async function createAndFetchTempObjectSetRid(client, objectSet) {
11
- const response = await chunkNAA6LK6A_cjs.createTemporary(client, await client[chunkNAA6LK6A_cjs.additionalContext].ontologyRid, {
12
- objectSet: chunkNAA6LK6A_cjs.getWireObjectSet(objectSet)
11
+ const response = await chunkFVEA6DER_cjs.createTemporary(client, await client[chunkFVEA6DER_cjs.additionalContext].ontologyRid, {
12
+ objectSet: chunkFVEA6DER_cjs.getWireObjectSet(objectSet)
13
13
  });
14
14
  return response.objectSetRid;
15
15
  }
16
16
 
17
17
  // src/public-utils/hydrateObjectSetFromObjectRids.ts
18
18
  function hydrateObjectSetFromObjectRids(client, definition, rids) {
19
- return chunkNAA6LK6A_cjs.createObjectSet(definition, client[chunkNAA6LK6A_cjs.additionalContext], {
19
+ return chunkFVEA6DER_cjs.createObjectSet(definition, client[chunkFVEA6DER_cjs.additionalContext], {
20
20
  type: "intersect",
21
21
  objectSets: [definition.type === "interface" ? {
22
22
  type: "interfaceBase",
@@ -36,7 +36,7 @@ function asMutableArray(array) {
36
36
 
37
37
  // src/public-utils/hydrateObjectSetFromRid.ts
38
38
  function hydrateObjectSetFromRid(client, definition, rid) {
39
- return chunkNAA6LK6A_cjs.createObjectSet(definition, client[chunkNAA6LK6A_cjs.additionalContext], {
39
+ return chunkFVEA6DER_cjs.createObjectSet(definition, client[chunkFVEA6DER_cjs.additionalContext], {
40
40
  type: "intersect",
41
41
  objectSets: [definition.type === "interface" ? {
42
42
  type: "interfaceBase",
@@ -107,11 +107,11 @@ Object.defineProperty(exports, "MinimalLogger", {
107
107
  });
108
108
  Object.defineProperty(exports, "createMediaFromReference", {
109
109
  enumerable: true,
110
- get: function () { return chunkNAA6LK6A_cjs.createMediaFromReference; }
110
+ get: function () { return chunkFVEA6DER_cjs.createMediaFromReference; }
111
111
  });
112
112
  Object.defineProperty(exports, "hydrateAttachmentFromRid", {
113
113
  enumerable: true,
114
- get: function () { return chunkNAA6LK6A_cjs.hydrateAttachmentFromRid; }
114
+ get: function () { return chunkFVEA6DER_cjs.hydrateAttachmentFromRid; }
115
115
  });
116
116
  exports.BrowserLogger = BrowserLogger;
117
117
  exports.createAndFetchTempObjectSetRid = createAndFetchTempObjectSetRid;
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunk2LTFLIBH_cjs = require('../chunk-2LTFLIBH.cjs');
4
- require('../chunk-GRALTYQI.cjs');
3
+ var chunkR6OXL7NT_cjs = require('../chunk-R6OXL7NT.cjs');
4
+ require('../chunk-L6WZ4TZD.cjs');
5
5
  require('../chunk-IWUIN6JJ.cjs');
6
6
  require('../chunk-IBY4PG26.cjs');
7
7
  require('../chunk-I2SCCYG7.cjs');
8
8
  require('../chunk-PIWGMK3H.cjs');
9
- require('../chunk-4O6723FC.cjs');
10
- require('../chunk-NAA6LK6A.cjs');
9
+ require('../chunk-LIM24DBZ.cjs');
10
+ require('../chunk-FVEA6DER.cjs');
11
11
  require('../chunk-ROJIXXGF.cjs');
12
12
  require('../chunk-H6PXPU6F.cjs');
13
13
  require('../chunk-Q7SFCCGT.cjs');
@@ -16,7 +16,7 @@ require('../chunk-Q7SFCCGT.cjs');
16
16
 
17
17
  Object.defineProperty(exports, "createObservableClient", {
18
18
  enumerable: true,
19
- get: function () { return chunk2LTFLIBH_cjs.createObservableClient; }
19
+ get: function () { return chunkR6OXL7NT_cjs.createObservableClient; }
20
20
  });
21
21
  //# sourceMappingURL=observable.cjs.map
22
22
  //# sourceMappingURL=observable.cjs.map
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunk2LTFLIBH_cjs = require('../chunk-2LTFLIBH.cjs');
4
- var chunkGRALTYQI_cjs = require('../chunk-GRALTYQI.cjs');
3
+ var chunkR6OXL7NT_cjs = require('../chunk-R6OXL7NT.cjs');
4
+ var chunkL6WZ4TZD_cjs = require('../chunk-L6WZ4TZD.cjs');
5
5
  require('../chunk-IWUIN6JJ.cjs');
6
6
  require('../chunk-IBY4PG26.cjs');
7
7
  require('../chunk-I2SCCYG7.cjs');
8
8
  require('../chunk-PIWGMK3H.cjs');
9
- require('../chunk-4O6723FC.cjs');
10
- var chunkNAA6LK6A_cjs = require('../chunk-NAA6LK6A.cjs');
9
+ require('../chunk-LIM24DBZ.cjs');
10
+ var chunkFVEA6DER_cjs = require('../chunk-FVEA6DER.cjs');
11
11
  require('../chunk-ROJIXXGF.cjs');
12
12
  require('../chunk-H6PXPU6F.cjs');
13
13
  require('../chunk-Q7SFCCGT.cjs');
@@ -15,8 +15,8 @@ var unstable = require('@osdk/api/unstable');
15
15
 
16
16
  // src/object/hydrateOsdkObject.ts
17
17
  async function hydrateOsdkObject(client, objects, objectDefsByApiName, propertySecurities) {
18
- return chunkGRALTYQI_cjs.convertWireToOsdkObjects(
19
- client[chunkNAA6LK6A_cjs.additionalContext],
18
+ return chunkL6WZ4TZD_cjs.convertWireToOsdkObjects(
19
+ client[chunkFVEA6DER_cjs.additionalContext],
20
20
  objects,
21
21
  /* interfaceApiName */
22
22
  void 0,
@@ -73,11 +73,11 @@ function getOsdkConfig(ontologyRid) {
73
73
 
74
74
  // src/scenarios/createScenario.ts
75
75
  async function createScenario(client) {
76
- const ctx = client[chunkNAA6LK6A_cjs.additionalContext];
76
+ const ctx = client[chunkFVEA6DER_cjs.additionalContext];
77
77
  if (ctx.scenarioRid != null) {
78
78
  throw new Error("createScenario: the supplied client already has an active scenario. Scenarios cannot be nested.");
79
79
  }
80
- const response = await chunkGRALTYQI_cjs.OntologyScenario_exports.createScenario(ctx, await ctx.ontologyRid, ctx.branch != null ? {
80
+ const response = await chunkL6WZ4TZD_cjs.OntologyScenario_exports.createScenario(ctx, await ctx.ontologyRid, ctx.branch != null ? {
81
81
  base: {
82
82
  type: "branch",
83
83
  branch: ctx.branch
@@ -85,12 +85,12 @@ async function createScenario(client) {
85
85
  } : {}, {
86
86
  preview: true
87
87
  });
88
- return chunkGRALTYQI_cjs.buildScenarioClient(client, response.scenarioRid);
88
+ return chunkL6WZ4TZD_cjs.buildScenarioClient(client, response.scenarioRid);
89
89
  }
90
90
 
91
91
  // src/scenarios/withScenario.ts
92
92
  function withScenario(client, scenarioRid) {
93
- return chunkGRALTYQI_cjs.buildScenarioClient(client, scenarioRid);
93
+ return chunkL6WZ4TZD_cjs.buildScenarioClient(client, scenarioRid);
94
94
  }
95
95
 
96
96
  // src/shapes/applyShapeTransformations.ts
@@ -216,7 +216,7 @@ function getLinkQueryOptions(linkDef, sourceObject, pageSize) {
216
216
  return options;
217
217
  }
218
218
  async function buildObjectSetFromLinkDefByType(client, sourceType, sourcePrimaryKey, linkDef) {
219
- const metadata = await client[chunkNAA6LK6A_cjs.additionalContext].ontologyProvider.getObjectDefinition(sourceType.apiName);
219
+ const metadata = await client[chunkFVEA6DER_cjs.additionalContext].ontologyProvider.getObjectDefinition(sourceType.apiName);
220
220
  const pkFieldName = metadata.primaryKeyApiName;
221
221
  let objectSet = client(sourceType).where({
222
222
  [pkFieldName]: sourcePrimaryKey
@@ -275,27 +275,27 @@ function resolveSymbolBindings(value, sourcePrimaryKey) {
275
275
 
276
276
  Object.defineProperty(exports, "createObservableClient", {
277
277
  enumerable: true,
278
- get: function () { return chunk2LTFLIBH_cjs.createObservableClient; }
278
+ get: function () { return chunkR6OXL7NT_cjs.createObservableClient; }
279
279
  });
280
280
  Object.defineProperty(exports, "createClientWithSubscriptionConnection", {
281
281
  enumerable: true,
282
- get: function () { return chunkGRALTYQI_cjs.createClientWithSubscriptionConnection; }
282
+ get: function () { return chunkL6WZ4TZD_cjs.createClientWithSubscriptionConnection; }
283
283
  });
284
284
  Object.defineProperty(exports, "createClientWithTransaction", {
285
285
  enumerable: true,
286
- get: function () { return chunkGRALTYQI_cjs.createClientWithTransaction; }
286
+ get: function () { return chunkL6WZ4TZD_cjs.createClientWithTransaction; }
287
287
  });
288
288
  Object.defineProperty(exports, "augment", {
289
289
  enumerable: true,
290
- get: function () { return chunkNAA6LK6A_cjs.augment; }
290
+ get: function () { return chunkFVEA6DER_cjs.augment; }
291
291
  });
292
292
  Object.defineProperty(exports, "getWireObjectSet", {
293
293
  enumerable: true,
294
- get: function () { return chunkNAA6LK6A_cjs.getWireObjectSet; }
294
+ get: function () { return chunkFVEA6DER_cjs.getWireObjectSet; }
295
295
  });
296
296
  Object.defineProperty(exports, "isObjectSet", {
297
297
  enumerable: true,
298
- get: function () { return chunkNAA6LK6A_cjs.isObjectSet; }
298
+ get: function () { return chunkFVEA6DER_cjs.isObjectSet; }
299
299
  });
300
300
  exports.applyShapeTransformations = applyShapeTransformations;
301
301
  exports.applyShapeTransformationsToArray = applyShapeTransformationsToArray;
@@ -21,7 +21,7 @@
21
21
  export const additionalContext = Symbol("additionalContext");
22
22
 
23
23
  // BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.
24
- const MaxOsdkVersion = "2.46.0";
24
+ const MaxOsdkVersion = "2.47.0";
25
25
  // END: THIS IS GENERATED CODE. DO NOT EDIT.
26
26
 
27
27
  const ErrorMessage = Symbol("ErrorMessage");
@@ -1 +1 @@
1
- {"version":3,"file":"Client.js","names":["additionalContext","Symbol","MaxOsdkVersion","ErrorMessage"],"sources":["Client.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\nimport type {\n ActionDefinition,\n ActionMetadata,\n CompileTimeMetadata,\n InterfaceDefinition,\n InterfaceMetadata,\n ObjectMetadata,\n ObjectSet,\n ObjectTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n VersionBound,\n} from \"@osdk/api\";\nimport type {\n Experiment,\n ExperimentFns,\n MinimalObjectSet,\n} from \"@osdk/api/unstable\";\nimport type { SharedClient } from \"@osdk/shared.client2\";\n\nimport type { ActionSignatureFromDef } from \"./actions/applyAction.js\";\nimport type { MinimalClient } from \"./MinimalClientContext.js\";\nimport type { QuerySignatureFromDef } from \"./queries/types.js\";\nimport type { SatisfiesSemver } from \"./SatisfiesSemver.js\";\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\ntype OldSharedClient = import(\"@osdk/shared.client\").SharedClient;\n\nexport type CheckVersionBound<Q> =\n Q extends VersionBound<infer V>\n ? SatisfiesSemver<V, MaxOsdkVersion> extends true\n ? Q\n : Q & {\n [ErrorMessage]: `Your SDK requires a semver compatible version with ${V}. You have ${MaxOsdkVersion}. Update your package.json`;\n }\n : Q;\n\nexport interface Client extends SharedClient, OldSharedClient {\n /**\n * Returns the operation surface for the given ontology definition. The shape of the\n * returned value is dispatched on what kind of definition is passed:\n * - object type → the object set type for that ontology object (typically a generated extension of {@link ObjectSet})\n * - interface → a {@link MinimalObjectSet} for the interface\n * - action → a callable with `applyAction` / `batchApplyAction`\n * - query → a callable with `executeFunction`\n * - experiment → the unstable feature surface for that experiment\n *\n * @param o - The object type definition to wrap.\n * @example\n * ```ts\n * const employees = await client(Employee).fetchPage({ $pageSize: 30 });\n * const employee = await client(Employee).fetchOne(12345);\n * ```\n * @returns an object set scoped to all objects of this type.\n */\n <Q extends ObjectTypeDefinition>(\n o: Q\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"]\n ? ObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n /**\n * @param o - The interface definition to wrap.\n * @example\n * ```ts\n * const page = await client(MyInterface).fetchPage({ $pageSize: 30 });\n * ```\n * @returns a minimal object set over all objects implementing the interface.\n */\n <Q extends InterfaceDefinition>(\n o: Q\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"]\n ? MinimalObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n /**\n * @param o - The action definition to invoke.\n * @example\n * ```ts\n * const result = await client(createEmployee).applyAction(\n * { name: \"Jane\", department: \"Engineering\" },\n * { $returnEdits: true },\n * );\n * ```\n * @returns a callable for applying (or batch-applying) the action.\n */\n <Q extends ActionDefinition<any>>(o: Q): ActionSignatureFromDef<Q>;\n\n /**\n * @param o - The query definition to invoke.\n * @example\n * ```ts\n * const result = await client(getEmployeeCount).executeFunction({ department: \"Engineering\" });\n * ```\n * @returns a callable for executing the query function.\n */\n <Q extends QueryDefinition<any>>(o: Q): QuerySignatureFromDef<Q>;\n\n /**\n * @param experiment - The experiment marker that gates an unstable feature.\n * @example\n * ```ts\n * const ref = await client(__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference)\n * .createMediaReference({ data: blob, fileName: \"media.mp4\", objectType: Employee, propertyType: \"photo\" });\n * ```\n * @returns the experiment-specific function surface.\n */\n <\n Q extends\n | Experiment<\"2.0.8\">\n | Experiment<\"2.1.0\">\n | Experiment<\"2.2.0\">\n | Experiment<\"2.8.0\">\n | Experiment<\"2.19.0\">,\n >(\n experiment: Q\n ): ExperimentFns<Q>;\n\n /**\n * Fetches runtime metadata for the given ontology definition. The returned shape\n * is dispatched on the kind of definition passed: {@link ObjectMetadata},\n * {@link InterfaceMetadata}, {@link ActionMetadata}, or {@link QueryMetadata}.\n * @param o - The object type, interface, action, or query definition to look up.\n * @example\n * ```ts\n * const meta = await client.fetchMetadata(Employee);\n * console.log(meta.displayName, meta.description);\n * ```\n * @returns a promise resolving to the metadata for the given definition.\n */\n fetchMetadata<\n Q extends\n | ObjectTypeDefinition\n | InterfaceDefinition\n | ActionDefinition<any>\n | QueryDefinition<any>,\n >(\n o: Q\n ): Promise<\n Q extends ObjectTypeDefinition\n ? ObjectMetadata\n : Q extends InterfaceDefinition\n ? InterfaceMetadata\n : Q extends ActionDefinition<any>\n ? ActionMetadata\n : Q extends QueryDefinition<any>\n ? QueryMetadata\n : never\n >;\n\n /** @internal */\n [additionalContext]: MinimalClient;\n}\n\n// DO NOT EXPORT FROM PACKAGE\n/** @internal */\nexport const additionalContext: unique symbol = Symbol(\"additionalContext\");\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst MaxOsdkVersion = \"2.46.0\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\nexport type MaxOsdkVersion = typeof MaxOsdkVersion;\nconst ErrorMessage: unique symbol = Symbol(\"ErrorMessage\");\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA2BA;;AAiIA;AACA;AACA,OAAO,MAAMA,iBAAgC,GAAGC,MAAM,CAAC,mBAAmB,CAAC;;AAE3E;AACA,MAAMC,cAAc,GAAG,QAAQ;AAC/B;;AAEA,MAAMC,YAA2B,GAAGF,MAAM,CAAC,cAAc,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Client.js","names":["additionalContext","Symbol","MaxOsdkVersion","ErrorMessage"],"sources":["Client.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\nimport type {\n ActionDefinition,\n ActionMetadata,\n CompileTimeMetadata,\n InterfaceDefinition,\n InterfaceMetadata,\n ObjectMetadata,\n ObjectSet,\n ObjectTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n VersionBound,\n} from \"@osdk/api\";\nimport type {\n Experiment,\n ExperimentFns,\n MinimalObjectSet,\n} from \"@osdk/api/unstable\";\nimport type { SharedClient } from \"@osdk/shared.client2\";\n\nimport type { ActionSignatureFromDef } from \"./actions/applyAction.js\";\nimport type { MinimalClient } from \"./MinimalClientContext.js\";\nimport type { QuerySignatureFromDef } from \"./queries/types.js\";\nimport type { SatisfiesSemver } from \"./SatisfiesSemver.js\";\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\ntype OldSharedClient = import(\"@osdk/shared.client\").SharedClient;\n\nexport type CheckVersionBound<Q> =\n Q extends VersionBound<infer V>\n ? SatisfiesSemver<V, MaxOsdkVersion> extends true\n ? Q\n : Q & {\n [ErrorMessage]: `Your SDK requires a semver compatible version with ${V}. You have ${MaxOsdkVersion}. Update your package.json`;\n }\n : Q;\n\nexport interface Client extends SharedClient, OldSharedClient {\n /**\n * Returns the operation surface for the given ontology definition. The shape of the\n * returned value is dispatched on what kind of definition is passed:\n * - object type → the object set type for that ontology object (typically a generated extension of {@link ObjectSet})\n * - interface → a {@link MinimalObjectSet} for the interface\n * - action → a callable with `applyAction` / `batchApplyAction`\n * - query → a callable with `executeFunction`\n * - experiment → the unstable feature surface for that experiment\n *\n * @param o - The object type definition to wrap.\n * @example\n * ```ts\n * const employees = await client(Employee).fetchPage({ $pageSize: 30 });\n * const employee = await client(Employee).fetchOne(12345);\n * ```\n * @returns an object set scoped to all objects of this type.\n */\n <Q extends ObjectTypeDefinition>(\n o: Q\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"]\n ? ObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n /**\n * @param o - The interface definition to wrap.\n * @example\n * ```ts\n * const page = await client(MyInterface).fetchPage({ $pageSize: 30 });\n * ```\n * @returns a minimal object set over all objects implementing the interface.\n */\n <Q extends InterfaceDefinition>(\n o: Q\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"]\n ? MinimalObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n /**\n * @param o - The action definition to invoke.\n * @example\n * ```ts\n * const result = await client(createEmployee).applyAction(\n * { name: \"Jane\", department: \"Engineering\" },\n * { $returnEdits: true },\n * );\n * ```\n * @returns a callable for applying (or batch-applying) the action.\n */\n <Q extends ActionDefinition<any>>(o: Q): ActionSignatureFromDef<Q>;\n\n /**\n * @param o - The query definition to invoke.\n * @example\n * ```ts\n * const result = await client(getEmployeeCount).executeFunction({ department: \"Engineering\" });\n * ```\n * @returns a callable for executing the query function.\n */\n <Q extends QueryDefinition<any>>(o: Q): QuerySignatureFromDef<Q>;\n\n /**\n * @param experiment - The experiment marker that gates an unstable feature.\n * @example\n * ```ts\n * const ref = await client(__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference)\n * .createMediaReference({ data: blob, fileName: \"media.mp4\", objectType: Employee, propertyType: \"photo\" });\n * ```\n * @returns the experiment-specific function surface.\n */\n <\n Q extends\n | Experiment<\"2.0.8\">\n | Experiment<\"2.1.0\">\n | Experiment<\"2.2.0\">\n | Experiment<\"2.8.0\">\n | Experiment<\"2.19.0\">,\n >(\n experiment: Q\n ): ExperimentFns<Q>;\n\n /**\n * Fetches runtime metadata for the given ontology definition. The returned shape\n * is dispatched on the kind of definition passed: {@link ObjectMetadata},\n * {@link InterfaceMetadata}, {@link ActionMetadata}, or {@link QueryMetadata}.\n * @param o - The object type, interface, action, or query definition to look up.\n * @example\n * ```ts\n * const meta = await client.fetchMetadata(Employee);\n * console.log(meta.displayName, meta.description);\n * ```\n * @returns a promise resolving to the metadata for the given definition.\n */\n fetchMetadata<\n Q extends\n | ObjectTypeDefinition\n | InterfaceDefinition\n | ActionDefinition<any>\n | QueryDefinition<any>,\n >(\n o: Q\n ): Promise<\n Q extends ObjectTypeDefinition\n ? ObjectMetadata\n : Q extends InterfaceDefinition\n ? InterfaceMetadata\n : Q extends ActionDefinition<any>\n ? ActionMetadata\n : Q extends QueryDefinition<any>\n ? QueryMetadata\n : never\n >;\n\n /** @internal */\n [additionalContext]: MinimalClient;\n}\n\n// DO NOT EXPORT FROM PACKAGE\n/** @internal */\nexport const additionalContext: unique symbol = Symbol(\"additionalContext\");\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst MaxOsdkVersion = \"2.47.0\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\nexport type MaxOsdkVersion = typeof MaxOsdkVersion;\nconst ErrorMessage: unique symbol = Symbol(\"ErrorMessage\");\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA2BA;;AAiIA;AACA;AACA,OAAO,MAAMA,iBAAgC,GAAGC,MAAM,CAAC,mBAAmB,CAAC;;AAE3E;AACA,MAAMC,cAAc,GAAG,QAAQ;AAC/B;;AAEA,MAAMC,YAA2B,GAAGF,MAAM,CAAC,cAAc,CAAC","ignoreList":[]}
@@ -14,6 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- export const USER_AGENT = `osdk-client/${"2.46.0"}`;
18
- export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.46.0"}`;
17
+ export const USER_AGENT = `osdk-client/${"2.47.0"}`;
18
+ export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.47.0"}`;
19
19
  //# sourceMappingURL=UserAgent.js.map
@@ -81,7 +81,7 @@ export interface Client extends SharedClient, OldSharedClient {
81
81
  */
82
82
  fetchMetadata<Q extends ObjectTypeDefinition | InterfaceDefinition | ActionDefinition<any> | QueryDefinition<any>>(o: Q): Promise<Q extends ObjectTypeDefinition ? ObjectMetadata : Q extends InterfaceDefinition ? InterfaceMetadata : Q extends ActionDefinition<any> ? ActionMetadata : Q extends QueryDefinition<any> ? QueryMetadata : never>;
83
83
  }
84
- declare const MaxOsdkVersion = "2.46.0";
84
+ declare const MaxOsdkVersion = "2.47.0";
85
85
  export type MaxOsdkVersion = typeof MaxOsdkVersion;
86
86
  declare const ErrorMessage: unique symbol;
87
87
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/client",
3
- "version": "2.46.0",
3
+ "version": "2.47.0",
4
4
  "description": "",
5
5
  "access": "public",
6
6
  "license": "Apache-2.0",
@@ -82,15 +82,15 @@
82
82
  "tiny-invariant": "^1.3.3",
83
83
  "type-fest": "^4.41.0",
84
84
  "ws": "^8.20.1",
85
- "@osdk/api": "~2.46.0",
86
- "@osdk/generator-converters": "2.46.0",
85
+ "@osdk/api": "~2.47.0",
86
+ "@osdk/client.unstable": "2.47.0",
87
87
  "@osdk/shared.client.impl": "~1.13.0",
88
- "@osdk/client.unstable": "2.46.0",
89
88
  "@osdk/shared.net.errors": "~2.12.0",
90
- "@osdk/shared.net.fetch": "~1.12.0"
89
+ "@osdk/shared.net.fetch": "~1.12.0",
90
+ "@osdk/generator-converters": "2.47.0"
91
91
  },
92
92
  "peerDependencies": {
93
- "@osdk/shared.test": "^2.32.0"
93
+ "@osdk/shared.test": "^2.33.0"
94
94
  },
95
95
  "peerDependenciesMeta": {
96
96
  "@osdk/shared.test": {
@@ -117,10 +117,10 @@
117
117
  "ts-expect": "^1.3.0",
118
118
  "typescript": "~5.5.4",
119
119
  "zod": "^3.25.76",
120
- "@osdk/client.test.ontology": "2.46.0",
121
120
  "@osdk/monorepo.api-extractor": "~0.7.0",
122
121
  "@osdk/monorepo.tsconfig": "~0.7.0",
123
- "@osdk/shared.test.intellisense": "~0.9.0"
122
+ "@osdk/shared.test.intellisense": "~0.10.0",
123
+ "@osdk/client.test.ontology": "2.47.0"
124
124
  },
125
125
  "publishConfig": {
126
126
  "access": "public"