@osdk/client 2.25.0 → 2.25.1-main-90f7fb6fbd4d38d9eeb36c4bb00ec8ca7db8bd95

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,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunk6ZFTHAN6_cjs = require('./chunk-6ZFTHAN6.cjs');
4
- var chunkSVE3DMG5_cjs = require('./chunk-SVE3DMG5.cjs');
3
+ var chunkHBCI3QZV_cjs = require('./chunk-HBCI3QZV.cjs');
4
+ var chunk26AZ3LMH_cjs = require('./chunk-26AZ3LMH.cjs');
5
5
  require('./chunk-YJG67XL4.cjs');
6
6
  require('./chunk-TQUNF2DZ.cjs');
7
- var chunkWOPBEGWL_cjs = require('./chunk-WOPBEGWL.cjs');
7
+ var chunkPCJDAUL2_cjs = require('./chunk-PCJDAUL2.cjs');
8
8
  require('./chunk-ZFNHWPQA.cjs');
9
9
  require('./chunk-CEBSLQQC.cjs');
10
10
  require('./chunk-YP43NHIA.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, chunk6ZFTHAN6_cjs.USER_AGENT, fetchFn);
23
+ return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider, chunkHBCI3QZV_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})?$/;
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 chunk6ZFTHAN6_cjs.ActionValidationError; }
47
+ get: function () { return chunkHBCI3QZV_cjs.ActionValidationError; }
48
48
  });
49
49
  Object.defineProperty(exports, "createClient", {
50
50
  enumerable: true,
51
- get: function () { return chunk6ZFTHAN6_cjs.createClient; }
51
+ get: function () { return chunkHBCI3QZV_cjs.createClient; }
52
52
  });
53
53
  Object.defineProperty(exports, "createAttachmentUpload", {
54
54
  enumerable: true,
55
- get: function () { return chunkSVE3DMG5_cjs.createAttachmentUpload; }
55
+ get: function () { return chunk26AZ3LMH_cjs.createAttachmentUpload; }
56
56
  });
57
57
  Object.defineProperty(exports, "createObjectSpecifierFromPrimaryKey", {
58
58
  enumerable: true,
59
- get: function () { return chunkSVE3DMG5_cjs.createObjectSpecifierFromPrimaryKey; }
59
+ get: function () { return chunk26AZ3LMH_cjs.createObjectSpecifierFromPrimaryKey; }
60
60
  });
61
61
  Object.defineProperty(exports, "extractPrimaryKeyFromObjectSpecifier", {
62
62
  enumerable: true,
63
- get: function () { return chunkSVE3DMG5_cjs.extractPrimaryKeyFromObjectSpecifier; }
63
+ get: function () { return chunk26AZ3LMH_cjs.extractPrimaryKeyFromObjectSpecifier; }
64
64
  });
65
65
  Object.defineProperty(exports, "getWireObjectSet", {
66
66
  enumerable: true,
67
- get: function () { return chunkWOPBEGWL_cjs.getWireObjectSet; }
67
+ get: function () { return chunkPCJDAUL2_cjs.getWireObjectSet; }
68
68
  });
69
69
  Object.defineProperty(exports, "isObjectSet", {
70
70
  enumerable: true,
71
- get: function () { return chunkWOPBEGWL_cjs.isObjectSet; }
71
+ get: function () { return chunkPCJDAUL2_cjs.isObjectSet; }
72
72
  });
73
73
  Object.defineProperty(exports, "isOk", {
74
74
  enumerable: true,
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunk6ZFTHAN6_cjs = require('../chunk-6ZFTHAN6.cjs');
4
- require('../chunk-SVE3DMG5.cjs');
3
+ var chunkHBCI3QZV_cjs = require('../chunk-HBCI3QZV.cjs');
4
+ require('../chunk-26AZ3LMH.cjs');
5
5
  require('../chunk-YJG67XL4.cjs');
6
6
  require('../chunk-TQUNF2DZ.cjs');
7
- var chunkWOPBEGWL_cjs = require('../chunk-WOPBEGWL.cjs');
7
+ var chunkPCJDAUL2_cjs = require('../chunk-PCJDAUL2.cjs');
8
8
  require('../chunk-ZFNHWPQA.cjs');
9
9
  require('../chunk-CEBSLQQC.cjs');
10
10
  require('../chunk-YP43NHIA.cjs');
@@ -13,16 +13,16 @@ require('../chunk-74HV6NQQ.cjs');
13
13
 
14
14
  // src/createClientFromWriteableClient.ts
15
15
  function createClientFromWriteableClient(writeableClient, options) {
16
- const ctx = writeableClient[chunkWOPBEGWL_cjs.additionalContext];
16
+ const ctx = writeableClient[chunkPCJDAUL2_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 chunk6ZFTHAN6_cjs.createClientWithTransaction(options?.transactionId ?? ctx.transactionId, ctx.flushEdits, options?.baseUrl ?? ctx.baseUrl, options?.ontologyRid ?? ctx.ontologyRid, options?.tokenProvider ?? ctx.tokenProvider);
20
+ return chunkHBCI3QZV_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 chunk6ZFTHAN6_cjs.createClientWithTransaction; }
25
+ get: function () { return chunkHBCI3QZV_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 chunkTQUNF2DZ_cjs = require('../chunk-TQUNF2DZ.cjs');
4
- var chunkWOPBEGWL_cjs = require('../chunk-WOPBEGWL.cjs');
4
+ var chunkPCJDAUL2_cjs = require('../chunk-PCJDAUL2.cjs');
5
5
  require('../chunk-ZFNHWPQA.cjs');
6
6
  require('../chunk-D26YLHTV.cjs');
7
7
  require('../chunk-74HV6NQQ.cjs');
8
8
 
9
9
  // src/public-utils/createAndFetchTempObjectSetRid.ts
10
10
  async function createAndFetchTempObjectSetRid(client, objectSet) {
11
- const response = await chunkWOPBEGWL_cjs.createTemporary(client, await client[chunkWOPBEGWL_cjs.additionalContext].ontologyRid, {
12
- objectSet: chunkWOPBEGWL_cjs.getWireObjectSet(objectSet)
11
+ const response = await chunkPCJDAUL2_cjs.createTemporary(client, await client[chunkPCJDAUL2_cjs.additionalContext].ontologyRid, {
12
+ objectSet: chunkPCJDAUL2_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 chunkWOPBEGWL_cjs.createObjectSet(definition, client[chunkWOPBEGWL_cjs.additionalContext], {
19
+ return chunkPCJDAUL2_cjs.createObjectSet(definition, client[chunkPCJDAUL2_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 chunkWOPBEGWL_cjs.createObjectSet(definition, client[chunkWOPBEGWL_cjs.additionalContext], {
39
+ return chunkPCJDAUL2_cjs.createObjectSet(definition, client[chunkPCJDAUL2_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 chunkWOPBEGWL_cjs.createMediaFromReference; }
110
+ get: function () { return chunkPCJDAUL2_cjs.createMediaFromReference; }
111
111
  });
112
112
  Object.defineProperty(exports, "hydrateAttachmentFromRid", {
113
113
  enumerable: true,
114
- get: function () { return chunkWOPBEGWL_cjs.hydrateAttachmentFromRid; }
114
+ get: function () { return chunkPCJDAUL2_cjs.hydrateAttachmentFromRid; }
115
115
  });
116
116
  exports.BrowserLogger = BrowserLogger;
117
117
  exports.createAndFetchTempObjectSetRid = createAndFetchTempObjectSetRid;
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkWA246HQE_cjs = require('../chunk-WA246HQE.cjs');
4
- require('../chunk-6ZFTHAN6.cjs');
5
- require('../chunk-SVE3DMG5.cjs');
3
+ var chunkDZA3BOGZ_cjs = require('../chunk-DZA3BOGZ.cjs');
4
+ require('../chunk-HBCI3QZV.cjs');
5
+ require('../chunk-26AZ3LMH.cjs');
6
6
  require('../chunk-YJG67XL4.cjs');
7
7
  require('../chunk-TQUNF2DZ.cjs');
8
- require('../chunk-WOPBEGWL.cjs');
8
+ require('../chunk-PCJDAUL2.cjs');
9
9
  require('../chunk-ZFNHWPQA.cjs');
10
10
  require('../chunk-CEBSLQQC.cjs');
11
11
  require('../chunk-YP43NHIA.cjs');
@@ -16,7 +16,7 @@ require('../chunk-74HV6NQQ.cjs');
16
16
 
17
17
  Object.defineProperty(exports, "createObservableClient", {
18
18
  enumerable: true,
19
- get: function () { return chunkWA246HQE_cjs.createObservableClient; }
19
+ get: function () { return chunkDZA3BOGZ_cjs.createObservableClient; }
20
20
  });
21
21
  //# sourceMappingURL=observable.cjs.map
22
22
  //# sourceMappingURL=observable.cjs.map
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkWA246HQE_cjs = require('../chunk-WA246HQE.cjs');
4
- var chunk6ZFTHAN6_cjs = require('../chunk-6ZFTHAN6.cjs');
5
- require('../chunk-SVE3DMG5.cjs');
3
+ var chunkDZA3BOGZ_cjs = require('../chunk-DZA3BOGZ.cjs');
4
+ var chunkHBCI3QZV_cjs = require('../chunk-HBCI3QZV.cjs');
5
+ require('../chunk-26AZ3LMH.cjs');
6
6
  require('../chunk-YJG67XL4.cjs');
7
7
  require('../chunk-TQUNF2DZ.cjs');
8
- var chunkWOPBEGWL_cjs = require('../chunk-WOPBEGWL.cjs');
8
+ var chunkPCJDAUL2_cjs = require('../chunk-PCJDAUL2.cjs');
9
9
  require('../chunk-ZFNHWPQA.cjs');
10
10
  require('../chunk-CEBSLQQC.cjs');
11
11
  require('../chunk-YP43NHIA.cjs');
@@ -49,25 +49,25 @@ function getOsdkConfig(ontologyRid) {
49
49
 
50
50
  // src/scenarios/createScenario.ts
51
51
  async function createScenario(client) {
52
- const ctx = client[chunkWOPBEGWL_cjs.additionalContext];
52
+ const ctx = client[chunkPCJDAUL2_cjs.additionalContext];
53
53
  if (ctx.transactionId != null) {
54
54
  throw new Error("createScenario: the supplied client already has an active transaction. Scenarios cannot be nested on transactions.");
55
55
  }
56
56
  if (ctx.scenarioRid != null) {
57
57
  throw new Error("createScenario: the supplied client already has an active scenario. Scenarios cannot be nested.");
58
58
  }
59
- const response = await chunk6ZFTHAN6_cjs.OntologyScenario_exports.createScenario(ctx, await ctx.ontologyRid, ctx.branch != null ? {
59
+ const response = await chunkHBCI3QZV_cjs.OntologyScenario_exports.createScenario(ctx, await ctx.ontologyRid, ctx.branch != null ? {
60
60
  base: {
61
61
  type: "branch",
62
62
  branch: ctx.branch
63
63
  }
64
64
  } : {});
65
- return chunk6ZFTHAN6_cjs.buildScenarioClient(client, response.scenarioRid);
65
+ return chunkHBCI3QZV_cjs.buildScenarioClient(client, response.scenarioRid);
66
66
  }
67
67
 
68
68
  // src/scenarios/withScenario.ts
69
69
  function withScenario(client, scenarioRid) {
70
- return chunk6ZFTHAN6_cjs.buildScenarioClient(client, scenarioRid);
70
+ return chunkHBCI3QZV_cjs.buildScenarioClient(client, scenarioRid);
71
71
  }
72
72
 
73
73
  // src/shapes/applyShapeTransformations.ts
@@ -193,7 +193,7 @@ function getLinkQueryOptions(linkDef, sourceObject, pageSize) {
193
193
  return options;
194
194
  }
195
195
  async function buildObjectSetFromLinkDefByType(client, sourceType, sourcePrimaryKey, linkDef) {
196
- const metadata = await client[chunkWOPBEGWL_cjs.additionalContext].ontologyProvider.getObjectDefinition(sourceType.apiName);
196
+ const metadata = await client[chunkPCJDAUL2_cjs.additionalContext].ontologyProvider.getObjectDefinition(sourceType.apiName);
197
197
  const pkFieldName = metadata.primaryKeyApiName;
198
198
  let objectSet = client(sourceType).where({
199
199
  [pkFieldName]: sourcePrimaryKey
@@ -252,23 +252,23 @@ function resolveSymbolBindings(value, sourcePrimaryKey) {
252
252
 
253
253
  Object.defineProperty(exports, "createObservableClient", {
254
254
  enumerable: true,
255
- get: function () { return chunkWA246HQE_cjs.createObservableClient; }
255
+ get: function () { return chunkDZA3BOGZ_cjs.createObservableClient; }
256
256
  });
257
257
  Object.defineProperty(exports, "createClientWithTransaction", {
258
258
  enumerable: true,
259
- get: function () { return chunk6ZFTHAN6_cjs.createClientWithTransaction; }
259
+ get: function () { return chunkHBCI3QZV_cjs.createClientWithTransaction; }
260
260
  });
261
261
  Object.defineProperty(exports, "augment", {
262
262
  enumerable: true,
263
- get: function () { return chunkWOPBEGWL_cjs.augment; }
263
+ get: function () { return chunkPCJDAUL2_cjs.augment; }
264
264
  });
265
265
  Object.defineProperty(exports, "getWireObjectSet", {
266
266
  enumerable: true,
267
- get: function () { return chunkWOPBEGWL_cjs.getWireObjectSet; }
267
+ get: function () { return chunkPCJDAUL2_cjs.getWireObjectSet; }
268
268
  });
269
269
  Object.defineProperty(exports, "isObjectSet", {
270
270
  enumerable: true,
271
- get: function () { return chunkWOPBEGWL_cjs.isObjectSet; }
271
+ get: function () { return chunkPCJDAUL2_cjs.isObjectSet; }
272
272
  });
273
273
  exports.applyShapeTransformations = applyShapeTransformations;
274
274
  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.25.0";
24
+ const MaxOsdkVersion = "2.25.1";
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\";\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> = Q extends VersionBound<infer V> ? (\n SatisfiesSemver<V, MaxOsdkVersion> extends true ? Q\n : Q & {\n [ErrorMessage]:\n `Your SDK requires a semver compatible version with ${V}. You have ${MaxOsdkVersion}. Update your package.json`;\n }\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\"] ? 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\"] ? 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>>(\n o: Q,\n ): 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>>(\n o: Q,\n ): 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): Promise<\n Q extends ObjectTypeDefinition ? ObjectMetadata\n : Q extends InterfaceDefinition ? InterfaceMetadata\n : Q extends ActionDefinition<any> ? ActionMetadata\n : Q extends QueryDefinition<any> ? 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.25.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;;AA0BA;;AA8HA;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\";\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> = Q extends VersionBound<infer V> ? (\n SatisfiesSemver<V, MaxOsdkVersion> extends true ? Q\n : Q & {\n [ErrorMessage]:\n `Your SDK requires a semver compatible version with ${V}. You have ${MaxOsdkVersion}. Update your package.json`;\n }\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\"] ? 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\"] ? 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>>(\n o: Q,\n ): 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>>(\n o: Q,\n ): 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): Promise<\n Q extends ObjectTypeDefinition ? ObjectMetadata\n : Q extends InterfaceDefinition ? InterfaceMetadata\n : Q extends ActionDefinition<any> ? ActionMetadata\n : Q extends QueryDefinition<any> ? 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.25.1\";\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;;AA0BA;;AA8HA;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.25.0"}`;
18
- export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.25.0"}`;
17
+ export const USER_AGENT = `osdk-client/${"2.25.1-main-90f7fb6fbd4d38d9eeb36c4bb00ec8ca7db8bd95"}`;
18
+ export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.25.1-main-90f7fb6fbd4d38d9eeb36c4bb00ec8ca7db8bd95"}`;
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,yBAA4C;AAC9E,OAAO,MAAMC,qBAA6B,GACxC,oCAAuD","ignoreList":[]}
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,uEAA4C;AAC9E,OAAO,MAAMC,qBAA6B,GACxC,kFAAuD","ignoreList":[]}
@@ -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.25.0";
84
+ declare const MaxOsdkVersion = "2.25.1";
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.25.0",
3
+ "version": "2.25.1-main-90f7fb6fbd4d38d9eeb36c4bb00ec8ca7db8bd95",
4
4
  "description": "",
5
5
  "access": "public",
6
6
  "license": "Apache-2.0",
@@ -90,11 +90,11 @@
90
90
  "tiny-invariant": "^1.3.3",
91
91
  "type-fest": "^4.41.0",
92
92
  "ws": "^8.18.3",
93
- "@osdk/api": "~2.25.0",
94
- "@osdk/client.unstable": "2.25.0",
95
- "@osdk/shared.net.errors": "~2.10.0",
93
+ "@osdk/client.unstable": "2.25.1-main-90f7fb6fbd4d38d9eeb36c4bb00ec8ca7db8bd95",
94
+ "@osdk/generator-converters": "2.25.1-main-90f7fb6fbd4d38d9eeb36c4bb00ec8ca7db8bd95",
95
+ "@osdk/api": "~2.25.1-main-90f7fb6fbd4d38d9eeb36c4bb00ec8ca7db8bd95",
96
96
  "@osdk/shared.client.impl": "~1.12.0",
97
- "@osdk/generator-converters": "2.25.0",
97
+ "@osdk/shared.net.errors": "~2.10.0",
98
98
  "@osdk/shared.net.fetch": "~1.10.0"
99
99
  },
100
100
  "peerDependencies": {
@@ -124,7 +124,7 @@
124
124
  "ts-expect": "^1.3.0",
125
125
  "typescript": "~5.5.4",
126
126
  "zod": "^3.25.76",
127
- "@osdk/client.test.ontology": "2.25.0",
127
+ "@osdk/client.test.ontology": "2.25.1-main-90f7fb6fbd4d38d9eeb36c4bb00ec8ca7db8bd95",
128
128
  "@osdk/monorepo.api-extractor": "~0.7.0",
129
129
  "@osdk/monorepo.tsconfig": "~0.7.0"
130
130
  },