@osdk/client 2.51.0 → 2.51.1-main-eab07502700f00fae33f4d3d60a4e457d68f5e69
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 +8 -0
- package/build/browser/Client.js +1 -1
- package/build/browser/Client.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/browser/util/UserAgent.js.map +1 -1
- package/build/cjs/{applyStreamingQuery-ZU2G3JP3.cjs → applyStreamingQuery-USJ552ZS.cjs} +9 -9
- package/build/cjs/{applyStreamingQuery-ZU2G3JP3.cjs.map → applyStreamingQuery-USJ552ZS.cjs.map} +1 -1
- package/build/cjs/{chunk-L2ECKOK7.cjs → chunk-6MMB27KE.cjs} +13 -13
- package/build/cjs/{chunk-L2ECKOK7.cjs.map → chunk-6MMB27KE.cjs.map} +1 -1
- package/build/cjs/{chunk-ZNR7MLZ4.cjs → chunk-EWVV4MWI.cjs} +47 -47
- package/build/cjs/chunk-EWVV4MWI.cjs.map +1 -0
- package/build/cjs/{chunk-7WYI27LF.cjs → chunk-G7FTKFPT.cjs} +80 -80
- package/build/cjs/{chunk-7WYI27LF.cjs.map → chunk-G7FTKFPT.cjs.map} +1 -1
- package/build/cjs/{chunk-EHCI4VIQ.cjs → chunk-L73NLHZ4.cjs} +8 -8
- package/build/cjs/{chunk-EHCI4VIQ.cjs.map → chunk-L73NLHZ4.cjs.map} +1 -1
- package/build/cjs/{chunk-LMOJOSHA.cjs → chunk-WZYVFQIG.cjs} +2 -2
- package/build/cjs/{chunk-LMOJOSHA.cjs.map → chunk-WZYVFQIG.cjs.map} +1 -1
- package/build/cjs/index.cjs +11 -11
- package/build/cjs/public/experimental.cjs +9 -9
- package/build/cjs/public/internal.cjs +7 -7
- package/build/cjs/public/observable.cjs +5 -5
- package/build/cjs/public/unstable-do-not-use.cjs +16 -16
- package/build/esm/Client.js +1 -1
- package/build/esm/Client.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/esm/util/UserAgent.js.map +1 -1
- package/build/types/Client.d.ts +1 -1
- package/package.json +7 -7
- package/build/cjs/chunk-ZNR7MLZ4.cjs.map +0 -1
package/build/cjs/index.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkEWVV4MWI_cjs = require('./chunk-EWVV4MWI.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
|
|
9
|
-
var
|
|
8
|
+
var chunk6MMB27KE_cjs = require('./chunk-6MMB27KE.cjs');
|
|
9
|
+
var chunkWZYVFQIG_cjs = require('./chunk-WZYVFQIG.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,
|
|
23
|
+
return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider, chunkEWVV4MWI_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
|
|
47
|
+
get: function () { return chunkEWVV4MWI_cjs.ActionValidationError; }
|
|
48
48
|
});
|
|
49
49
|
Object.defineProperty(exports, "createClient", {
|
|
50
50
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkEWVV4MWI_cjs.createClient; }
|
|
52
52
|
});
|
|
53
53
|
Object.defineProperty(exports, "createAttachmentUpload", {
|
|
54
54
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunk6MMB27KE_cjs.createAttachmentUpload; }
|
|
56
56
|
});
|
|
57
57
|
Object.defineProperty(exports, "createObjectSpecifierFromPrimaryKey", {
|
|
58
58
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunk6MMB27KE_cjs.createObjectSpecifierFromPrimaryKey; }
|
|
60
60
|
});
|
|
61
61
|
Object.defineProperty(exports, "extractPrimaryKeyFromObjectSpecifier", {
|
|
62
62
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunk6MMB27KE_cjs.extractPrimaryKeyFromObjectSpecifier; }
|
|
64
64
|
});
|
|
65
65
|
Object.defineProperty(exports, "getWireObjectSet", {
|
|
66
66
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunkWZYVFQIG_cjs.getWireObjectSet; }
|
|
68
68
|
});
|
|
69
69
|
Object.defineProperty(exports, "isObjectSet", {
|
|
70
70
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunkWZYVFQIG_cjs.isObjectSet; }
|
|
72
72
|
});
|
|
73
73
|
Object.defineProperty(exports, "isOk", {
|
|
74
74
|
enumerable: true,
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkL73NLHZ4_cjs = require('../chunk-L73NLHZ4.cjs');
|
|
4
|
+
var chunkEWVV4MWI_cjs = require('../chunk-EWVV4MWI.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-
|
|
10
|
-
var
|
|
9
|
+
require('../chunk-6MMB27KE.cjs');
|
|
10
|
+
var chunkWZYVFQIG_cjs = require('../chunk-WZYVFQIG.cjs');
|
|
11
11
|
require('../chunk-ROJIXXGF.cjs');
|
|
12
12
|
require('../chunk-H6PXPU6F.cjs');
|
|
13
13
|
require('../chunk-Q7SFCCGT.cjs');
|
|
14
14
|
|
|
15
15
|
// src/createClientFromWriteableClient.ts
|
|
16
16
|
function createClientFromWriteableClient(writeableClient, options) {
|
|
17
|
-
const ctx = writeableClient[
|
|
17
|
+
const ctx = writeableClient[chunkWZYVFQIG_cjs.additionalContext];
|
|
18
18
|
if (ctx.transactionId === void 0 || ctx.flushEdits === void 0) {
|
|
19
19
|
throw new Error("createClientFromWriteableClient: provided client has no active transaction");
|
|
20
20
|
}
|
|
21
|
-
return
|
|
21
|
+
return chunkEWVV4MWI_cjs.createClientWithTransaction(options?.transactionId ?? ctx.transactionId, ctx.flushEdits, options?.baseUrl ?? ctx.baseUrl, options?.ontologyRid ?? ctx.ontologyRid, options?.tokenProvider ?? ctx.tokenProvider);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
Object.defineProperty(exports, "createScenario", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkL73NLHZ4_cjs.createScenario; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "withScenario", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkL73NLHZ4_cjs.withScenario; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "createClientWithTransaction", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkEWVV4MWI_cjs.createClientWithTransaction; }
|
|
35
35
|
});
|
|
36
36
|
exports.createClientFromWriteableClient = createClientFromWriteableClient;
|
|
37
37
|
//# 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
|
|
4
|
+
var chunkWZYVFQIG_cjs = require('../chunk-WZYVFQIG.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
|
|
12
|
-
objectSet:
|
|
11
|
+
const response = await chunkWZYVFQIG_cjs.createTemporary(client, await client[chunkWZYVFQIG_cjs.additionalContext].ontologyRid, {
|
|
12
|
+
objectSet: chunkWZYVFQIG_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
|
|
19
|
+
return chunkWZYVFQIG_cjs.createObjectSet(definition, client[chunkWZYVFQIG_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
|
|
39
|
+
return chunkWZYVFQIG_cjs.createObjectSet(definition, client[chunkWZYVFQIG_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
|
|
110
|
+
get: function () { return chunkWZYVFQIG_cjs.createMediaFromReference; }
|
|
111
111
|
});
|
|
112
112
|
Object.defineProperty(exports, "hydrateAttachmentFromRid", {
|
|
113
113
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunkWZYVFQIG_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
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkG7FTKFPT_cjs = require('../chunk-G7FTKFPT.cjs');
|
|
4
|
+
require('../chunk-EWVV4MWI.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-
|
|
10
|
-
require('../chunk-
|
|
9
|
+
require('../chunk-6MMB27KE.cjs');
|
|
10
|
+
require('../chunk-WZYVFQIG.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
|
|
19
|
+
get: function () { return chunkG7FTKFPT_cjs.createObservableClient; }
|
|
20
20
|
});
|
|
21
21
|
//# sourceMappingURL=observable.cjs.map
|
|
22
22
|
//# sourceMappingURL=observable.cjs.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkL73NLHZ4_cjs = require('../chunk-L73NLHZ4.cjs');
|
|
4
|
+
var chunkG7FTKFPT_cjs = require('../chunk-G7FTKFPT.cjs');
|
|
5
|
+
var chunkEWVV4MWI_cjs = require('../chunk-EWVV4MWI.cjs');
|
|
6
6
|
require('../chunk-IWUIN6JJ.cjs');
|
|
7
7
|
require('../chunk-IBY4PG26.cjs');
|
|
8
8
|
require('../chunk-I2SCCYG7.cjs');
|
|
9
9
|
require('../chunk-PIWGMK3H.cjs');
|
|
10
|
-
require('../chunk-
|
|
11
|
-
var
|
|
10
|
+
require('../chunk-6MMB27KE.cjs');
|
|
11
|
+
var chunkWZYVFQIG_cjs = require('../chunk-WZYVFQIG.cjs');
|
|
12
12
|
require('../chunk-ROJIXXGF.cjs');
|
|
13
13
|
require('../chunk-H6PXPU6F.cjs');
|
|
14
14
|
require('../chunk-Q7SFCCGT.cjs');
|
|
@@ -16,8 +16,8 @@ var unstable = require('@osdk/api/unstable');
|
|
|
16
16
|
|
|
17
17
|
// src/object/hydrateOsdkObject.ts
|
|
18
18
|
async function hydrateOsdkObject(client, objects, objectDefsByApiName, propertySecurities) {
|
|
19
|
-
return
|
|
20
|
-
client[
|
|
19
|
+
return chunkEWVV4MWI_cjs.convertWireToOsdkObjects(
|
|
20
|
+
client[chunkWZYVFQIG_cjs.additionalContext],
|
|
21
21
|
objects,
|
|
22
22
|
/* interfaceApiName */
|
|
23
23
|
void 0,
|
|
@@ -161,7 +161,7 @@ function getLinkQueryOptions(linkDef, sourceObject, pageSize) {
|
|
|
161
161
|
return options;
|
|
162
162
|
}
|
|
163
163
|
async function buildObjectSetFromLinkDefByType(client, sourceType, sourcePrimaryKey, linkDef) {
|
|
164
|
-
const metadata = await client[
|
|
164
|
+
const metadata = await client[chunkWZYVFQIG_cjs.additionalContext].ontologyProvider.getObjectDefinition(sourceType.apiName);
|
|
165
165
|
const pkFieldName = metadata.primaryKeyApiName;
|
|
166
166
|
let objectSet = client(sourceType).where({
|
|
167
167
|
[pkFieldName]: sourcePrimaryKey
|
|
@@ -220,35 +220,35 @@ function resolveSymbolBindings(value, sourcePrimaryKey) {
|
|
|
220
220
|
|
|
221
221
|
Object.defineProperty(exports, "createScenario", {
|
|
222
222
|
enumerable: true,
|
|
223
|
-
get: function () { return
|
|
223
|
+
get: function () { return chunkL73NLHZ4_cjs.createScenario; }
|
|
224
224
|
});
|
|
225
225
|
Object.defineProperty(exports, "withScenario", {
|
|
226
226
|
enumerable: true,
|
|
227
|
-
get: function () { return
|
|
227
|
+
get: function () { return chunkL73NLHZ4_cjs.withScenario; }
|
|
228
228
|
});
|
|
229
229
|
Object.defineProperty(exports, "createObservableClient", {
|
|
230
230
|
enumerable: true,
|
|
231
|
-
get: function () { return
|
|
231
|
+
get: function () { return chunkG7FTKFPT_cjs.createObservableClient; }
|
|
232
232
|
});
|
|
233
233
|
Object.defineProperty(exports, "createClientWithSubscriptionConnection", {
|
|
234
234
|
enumerable: true,
|
|
235
|
-
get: function () { return
|
|
235
|
+
get: function () { return chunkEWVV4MWI_cjs.createClientWithSubscriptionConnection; }
|
|
236
236
|
});
|
|
237
237
|
Object.defineProperty(exports, "createClientWithTransaction", {
|
|
238
238
|
enumerable: true,
|
|
239
|
-
get: function () { return
|
|
239
|
+
get: function () { return chunkEWVV4MWI_cjs.createClientWithTransaction; }
|
|
240
240
|
});
|
|
241
241
|
Object.defineProperty(exports, "augment", {
|
|
242
242
|
enumerable: true,
|
|
243
|
-
get: function () { return
|
|
243
|
+
get: function () { return chunkWZYVFQIG_cjs.augment; }
|
|
244
244
|
});
|
|
245
245
|
Object.defineProperty(exports, "getWireObjectSet", {
|
|
246
246
|
enumerable: true,
|
|
247
|
-
get: function () { return
|
|
247
|
+
get: function () { return chunkWZYVFQIG_cjs.getWireObjectSet; }
|
|
248
248
|
});
|
|
249
249
|
Object.defineProperty(exports, "isObjectSet", {
|
|
250
250
|
enumerable: true,
|
|
251
|
-
get: function () { return
|
|
251
|
+
get: function () { return chunkWZYVFQIG_cjs.isObjectSet; }
|
|
252
252
|
});
|
|
253
253
|
exports.applyShapeTransformations = applyShapeTransformations;
|
|
254
254
|
exports.applyShapeTransformationsToArray = applyShapeTransformationsToArray;
|
package/build/esm/Client.js
CHANGED
|
@@ -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.51.
|
|
24
|
+
const MaxOsdkVersion = "2.51.1";
|
|
25
25
|
// END: THIS IS GENERATED CODE. DO NOT EDIT.
|
|
26
26
|
|
|
27
27
|
const ErrorMessage = Symbol("ErrorMessage");
|
package/build/esm/Client.js.map
CHANGED
|
@@ -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.51.
|
|
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.51.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;;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.51.
|
|
18
|
-
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.51.
|
|
17
|
+
export const USER_AGENT = `osdk-client/${"2.51.1-main-eab07502700f00fae33f4d3d60a4e457d68f5e69"}`;
|
|
18
|
+
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.51.1-main-eab07502700f00fae33f4d3d60a4e457d68f5e69"}`;
|
|
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 = `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,
|
|
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 = `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,GAAG,kFAAuD","ignoreList":[]}
|
package/build/types/Client.d.ts
CHANGED
|
@@ -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.51.
|
|
84
|
+
declare const MaxOsdkVersion = "2.51.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.51.
|
|
3
|
+
"version": "2.51.1-main-eab07502700f00fae33f4d3d60a4e457d68f5e69",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -82,12 +82,12 @@
|
|
|
82
82
|
"tiny-invariant": "^1.3.3",
|
|
83
83
|
"type-fest": "^4.41.0",
|
|
84
84
|
"ws": "^8.20.1",
|
|
85
|
-
"@osdk/api": "~2.51.
|
|
86
|
-
"@osdk/client.unstable": "2.51.
|
|
85
|
+
"@osdk/api": "~2.51.1-main-eab07502700f00fae33f4d3d60a4e457d68f5e69",
|
|
86
|
+
"@osdk/client.unstable": "2.51.1-main-eab07502700f00fae33f4d3d60a4e457d68f5e69",
|
|
87
|
+
"@osdk/generator-converters": "2.51.1-main-eab07502700f00fae33f4d3d60a4e457d68f5e69",
|
|
88
|
+
"@osdk/shared.client.impl": "~1.13.0",
|
|
87
89
|
"@osdk/shared.net.errors": "~2.12.0",
|
|
88
|
-
"@osdk/
|
|
89
|
-
"@osdk/shared.net.fetch": "~1.12.0",
|
|
90
|
-
"@osdk/shared.client.impl": "~1.13.0"
|
|
90
|
+
"@osdk/shared.net.fetch": "~1.12.0"
|
|
91
91
|
},
|
|
92
92
|
"peerDependencies": {
|
|
93
93
|
"@osdk/shared.test": "^2.34.0"
|
|
@@ -117,7 +117,7 @@
|
|
|
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.51.
|
|
120
|
+
"@osdk/client.test.ontology": "2.51.1-main-eab07502700f00fae33f4d3d60a4e457d68f5e69",
|
|
121
121
|
"@osdk/monorepo.api-extractor": "~0.7.0",
|
|
122
122
|
"@osdk/monorepo.tsconfig": "~0.7.0",
|
|
123
123
|
"@osdk/shared.test.intellisense": "~0.11.0"
|