@osdk/client 2.53.0 → 2.54.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.
- 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/cjs/{chunk-E5UOKLCW.cjs → chunk-7VOMQUIX.cjs} +2 -2
- package/build/cjs/{chunk-E5UOKLCW.cjs.map → chunk-7VOMQUIX.cjs.map} +1 -1
- package/build/cjs/{chunk-B7IRP73C.cjs → chunk-DPWQXPBJ.cjs} +45 -45
- package/build/cjs/{chunk-B7IRP73C.cjs.map → chunk-DPWQXPBJ.cjs.map} +1 -1
- package/build/cjs/{chunk-SYOUIMHV.cjs → chunk-JFTS2NKV.cjs} +79 -79
- package/build/cjs/{chunk-SYOUIMHV.cjs.map → chunk-JFTS2NKV.cjs.map} +1 -1
- package/build/cjs/{chunk-BXUXE2VL.cjs → chunk-ZPPYQPTN.cjs} +8 -8
- package/build/cjs/{chunk-BXUXE2VL.cjs.map → chunk-ZPPYQPTN.cjs.map} +1 -1
- package/build/cjs/index.cjs +10 -10
- package/build/cjs/public/experimental.cjs +8 -8
- package/build/cjs/public/internal.cjs +9 -9
- package/build/cjs/public/observable.cjs +4 -4
- package/build/cjs/public/unstable-do-not-use.cjs +15 -15
- 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/types/Client.d.ts +1 -1
- package/package.json +5 -5
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkDPWQXPBJ_cjs = require('./chunk-DPWQXPBJ.cjs');
|
|
4
|
+
var chunk7VOMQUIX_cjs = require('./chunk-7VOMQUIX.cjs');
|
|
5
5
|
|
|
6
6
|
// src/scenarios/createScenario.ts
|
|
7
7
|
async function createScenario(client) {
|
|
8
|
-
const ctx = client[
|
|
8
|
+
const ctx = client[chunk7VOMQUIX_cjs.additionalContext];
|
|
9
9
|
if (ctx.scenarioRid != null) {
|
|
10
10
|
throw new Error("createScenario: the supplied client already has an active scenario. Scenarios cannot be nested.");
|
|
11
11
|
}
|
|
12
|
-
const response = await
|
|
12
|
+
const response = await chunkDPWQXPBJ_cjs.OntologyScenario_exports.createScenario(ctx, await ctx.ontologyRid, ctx.branch != null ? {
|
|
13
13
|
base: {
|
|
14
14
|
type: "branch",
|
|
15
15
|
branch: ctx.branch
|
|
@@ -17,15 +17,15 @@ async function createScenario(client) {
|
|
|
17
17
|
} : {}, {
|
|
18
18
|
preview: true
|
|
19
19
|
});
|
|
20
|
-
return
|
|
20
|
+
return chunkDPWQXPBJ_cjs.buildScenarioClient(client, response.scenarioRid);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
// src/scenarios/withScenario.ts
|
|
24
24
|
function withScenario(client, scenarioRid) {
|
|
25
|
-
return
|
|
25
|
+
return chunkDPWQXPBJ_cjs.buildScenarioClient(client, scenarioRid);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
exports.createScenario = createScenario;
|
|
29
29
|
exports.withScenario = withScenario;
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-ZPPYQPTN.cjs.map
|
|
31
|
+
//# sourceMappingURL=chunk-ZPPYQPTN.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/scenarios/createScenario.ts","../../src/scenarios/withScenario.ts"],"names":["additionalContext","OntologyScenario_exports","buildScenarioClient"],"mappings":";;;;;;AAuCA,eAAsB,eAAe,MAAA,EAAQ;AAC3C,EAAA,MAAM,GAAA,GAAM,OAAOA,mCAAiB,CAAA;AACpC,EAAA,IAAI,GAAA,CAAI,eAAe,IAAA,EAAM;AAC3B,IAAA,MAAM,IAAI,MAAM,iGAAiG,CAAA;AAAA,EACnH;AACA,EAAA,MAAM,QAAA,GAAW,MAAMC,0CAAA,CAAkB,cAAA,CAAe,GAAA,EAAK,MAAM,GAAA,CAAI,WAAA,EAAa,GAAA,CAAI,MAAA,IAAU,IAAA,GAAO;AAAA,IACvG,IAAA,EAAM;AAAA,MACJ,IAAA,EAAM,QAAA;AAAA,MACN,QAAQ,GAAA,CAAI;AAAA;AACd,GACF,GAAI,EAAC,EAAG;AAAA,IACN,OAAA,EAAS;AAAA,GACV,CAAA;AACD,EAAA,OAAOC,qCAAA,CAAoB,MAAA,EAAQ,QAAA,CAAS,WAAW,CAAA;AACzD;;;ACdO,SAAS,YAAA,CAAa,QAAQ,WAAA,EAAa;AAChD,EAAA,OAAOA,qCAAA,CAAoB,QAAQ,WAAW,CAAA;AAChD","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../../src/scenarios/createScenario.ts","../../src/scenarios/withScenario.ts"],"names":["additionalContext","OntologyScenario_exports","buildScenarioClient"],"mappings":";;;;;;AAuCA,eAAsB,eAAe,MAAA,EAAQ;AAC3C,EAAA,MAAM,GAAA,GAAM,OAAOA,mCAAiB,CAAA;AACpC,EAAA,IAAI,GAAA,CAAI,eAAe,IAAA,EAAM;AAC3B,IAAA,MAAM,IAAI,MAAM,iGAAiG,CAAA;AAAA,EACnH;AACA,EAAA,MAAM,QAAA,GAAW,MAAMC,0CAAA,CAAkB,cAAA,CAAe,GAAA,EAAK,MAAM,GAAA,CAAI,WAAA,EAAa,GAAA,CAAI,MAAA,IAAU,IAAA,GAAO;AAAA,IACvG,IAAA,EAAM;AAAA,MACJ,IAAA,EAAM,QAAA;AAAA,MACN,QAAQ,GAAA,CAAI;AAAA;AACd,GACF,GAAI,EAAC,EAAG;AAAA,IACN,OAAA,EAAS;AAAA,GACV,CAAA;AACD,EAAA,OAAOC,qCAAA,CAAoB,MAAA,EAAQ,QAAA,CAAS,WAAW,CAAA;AACzD;;;ACdO,SAAS,YAAA,CAAa,QAAQ,WAAA,EAAa;AAChD,EAAA,OAAOA,qCAAA,CAAoB,QAAQ,WAAW,CAAA;AAChD","file":"chunk-ZPPYQPTN.cjs","sourcesContent":["/*\n * Copyright 2026 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 { OntologyScenarios } from \"@osdk/foundry.ontologies\";\nimport { additionalContext } from \"../Client.js\";\nimport { buildScenarioClient } from \"./ScenarioClient.js\";\n\n/**\n * Mint a fresh ontology scenario and return a client scoped to it.\n *\n * @param client - The base {@link Client} to derive context (`baseUrl`, `ontologyRid`, `tokenProvider`, `branch`, …)\n * from. Throws at runtime if the client is already scoped to a scenario. If the client has an active transaction,\n * the transaction is ignored (a warning is logged) and the client is scoped to the new scenario. When the base\n * client has a branch set, the newly minted scenario uses that branch as its base.\n * @returns a {@link EXPERIMENTAL_ScenarioClient} bound to the freshly minted scenario RID.\n *\n * @beta This is an experimental, unstable feature subject to change.\n *\n * @example\n * ```ts\n * import { createScenario } from \"@osdk/client/unstable-do-not-use\";\n *\n * const scenario = await createScenario(client);\n * const scenarioRid = scenario.getScenarioReference();\n * ```\n */\nexport async function createScenario(client) {\n const ctx = client[additionalContext];\n if (ctx.scenarioRid != null) {\n throw new Error(\"createScenario: the supplied client already has an active scenario. Scenarios cannot be nested.\");\n }\n const response = await OntologyScenarios.createScenario(ctx, await ctx.ontologyRid, ctx.branch != null ? {\n base: {\n type: \"branch\",\n branch: ctx.branch\n }\n } : {}, {\n preview: true\n });\n return buildScenarioClient(client, response.scenarioRid);\n}","/*\n * Copyright 2026 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 { buildScenarioClient } from \"./ScenarioClient.js\";\n\n/**\n * Attach to an existing ontology scenario. Synchronous — no network call is made. The returned client scopes all\n * subsequent operations (`fetchPage`, `applyAction`, `executeFunction`, etc.) to the given `scenarioRid`.\n *\n * @param client - The base {@link Client} to derive context (`baseUrl`, `ontologyRid`, `tokenProvider`, `branch`, …)\n * from. Throws at runtime if the client is already scoped to a scenario. If the client has an active transaction,\n * the transaction is ignored (a warning is logged) and the client is scoped to the scenario.\n * @param scenarioRid - The RID of the scenario to attach to.\n * @returns a {@link EXPERIMENTAL_ScenarioClient} bound to `scenarioRid`.\n *\n * @beta This is an experimental, unstable feature subject to change.\n *\n * @example\n * ```ts\n * import { withScenario } from \"@osdk/client/unstable-do-not-use\";\n *\n * const scenario = withScenario(client, \"ri.actions..scenario.abc\");\n * const page = await scenario(Doctor).fetchPage();\n * await scenario(Schedule).applyAction({ doctor: page.data[0], shift: \"AM\" });\n * ```\n */\nexport function withScenario(client, scenarioRid) {\n return buildScenarioClient(client, scenarioRid);\n}"]}
|
package/build/cjs/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkDPWQXPBJ_cjs = require('./chunk-DPWQXPBJ.cjs');
|
|
4
4
|
require('./chunk-IWUIN6JJ.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunk7VOMQUIX_cjs = require('./chunk-7VOMQUIX.cjs');
|
|
6
6
|
require('./chunk-BHRMH4Q2.cjs');
|
|
7
7
|
require('./chunk-I2SCCYG7.cjs');
|
|
8
8
|
require('./chunk-7R2DRDPC.cjs');
|
|
@@ -18,7 +18,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
18
18
|
var invariant__default = /*#__PURE__*/_interopDefault(invariant);
|
|
19
19
|
|
|
20
20
|
function createPlatformClient(baseUrl, tokenProvider, options = void 0, fetchFn = fetch) {
|
|
21
|
-
return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider,
|
|
21
|
+
return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider, chunkDPWQXPBJ_cjs.USER_AGENT, fetchFn);
|
|
22
22
|
}
|
|
23
23
|
var isoRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/u;
|
|
24
24
|
var extractDate = (dateTime) => {
|
|
@@ -42,31 +42,31 @@ var extractDateFromIsoString = (dateTime) => {
|
|
|
42
42
|
|
|
43
43
|
Object.defineProperty(exports, "ActionValidationError", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkDPWQXPBJ_cjs.ActionValidationError; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "createAttachmentUpload", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkDPWQXPBJ_cjs.createAttachmentUpload; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "createClient", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkDPWQXPBJ_cjs.createClient; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "createObjectSpecifierFromPrimaryKey", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkDPWQXPBJ_cjs.createObjectSpecifierFromPrimaryKey; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "extractPrimaryKeyFromObjectSpecifier", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkDPWQXPBJ_cjs.extractPrimaryKeyFromObjectSpecifier; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "getWireObjectSet", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunk7VOMQUIX_cjs.getWireObjectSet; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "isObjectSet", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunk7VOMQUIX_cjs.isObjectSet; }
|
|
70
70
|
});
|
|
71
71
|
Object.defineProperty(exports, "isOk", {
|
|
72
72
|
enumerable: true,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkZPPYQPTN_cjs = require('../chunk-ZPPYQPTN.cjs');
|
|
4
|
+
var chunkDPWQXPBJ_cjs = require('../chunk-DPWQXPBJ.cjs');
|
|
5
5
|
require('../chunk-IWUIN6JJ.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunk7VOMQUIX_cjs = require('../chunk-7VOMQUIX.cjs');
|
|
7
7
|
require('../chunk-BHRMH4Q2.cjs');
|
|
8
8
|
require('../chunk-I2SCCYG7.cjs');
|
|
9
9
|
require('../chunk-7R2DRDPC.cjs');
|
|
@@ -12,24 +12,24 @@ require('../chunk-Q7SFCCGT.cjs');
|
|
|
12
12
|
|
|
13
13
|
// src/createClientFromWriteableClient.ts
|
|
14
14
|
function createClientFromWriteableClient(writeableClient, options) {
|
|
15
|
-
const ctx = writeableClient[
|
|
15
|
+
const ctx = writeableClient[chunk7VOMQUIX_cjs.additionalContext];
|
|
16
16
|
if (ctx.transactionId === void 0 || ctx.flushEdits === void 0) {
|
|
17
17
|
throw new Error("createClientFromWriteableClient: provided client has no active transaction");
|
|
18
18
|
}
|
|
19
|
-
return
|
|
19
|
+
return chunkDPWQXPBJ_cjs.createClientWithTransaction(options?.transactionId ?? ctx.transactionId, ctx.flushEdits, options?.baseUrl ?? ctx.baseUrl, options?.ontologyRid ?? ctx.ontologyRid, options?.tokenProvider ?? ctx.tokenProvider);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
Object.defineProperty(exports, "createScenario", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkZPPYQPTN_cjs.createScenario; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "withScenario", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkZPPYQPTN_cjs.withScenario; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "createClientWithTransaction", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkDPWQXPBJ_cjs.createClientWithTransaction; }
|
|
33
33
|
});
|
|
34
34
|
exports.createClientFromWriteableClient = createClientFromWriteableClient;
|
|
35
35
|
//# sourceMappingURL=experimental.cjs.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk7VOMQUIX_cjs = require('../chunk-7VOMQUIX.cjs');
|
|
4
4
|
require('../chunk-BHRMH4Q2.cjs');
|
|
5
5
|
require('../chunk-H6PXPU6F.cjs');
|
|
6
6
|
require('../chunk-Q7SFCCGT.cjs');
|
|
7
7
|
|
|
8
8
|
// src/public-utils/createAndFetchTempObjectSetRid.ts
|
|
9
9
|
async function createAndFetchTempObjectSetRid(client, objectSet) {
|
|
10
|
-
const response = await
|
|
11
|
-
objectSet:
|
|
10
|
+
const response = await chunk7VOMQUIX_cjs.createTemporary(client, await client[chunk7VOMQUIX_cjs.additionalContext].ontologyRid, {
|
|
11
|
+
objectSet: chunk7VOMQUIX_cjs.getWireObjectSet(objectSet)
|
|
12
12
|
});
|
|
13
13
|
return response.objectSetRid;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
// src/public-utils/hydrateObjectSetFromObjectRids.ts
|
|
17
17
|
function hydrateObjectSetFromObjectRids(client, definition, rids) {
|
|
18
|
-
return
|
|
18
|
+
return chunk7VOMQUIX_cjs.createObjectSet(definition, client[chunk7VOMQUIX_cjs.additionalContext], {
|
|
19
19
|
type: "intersect",
|
|
20
20
|
objectSets: [definition.type === "interface" ? {
|
|
21
21
|
type: "interfaceBase",
|
|
@@ -35,7 +35,7 @@ function asMutableArray(array) {
|
|
|
35
35
|
|
|
36
36
|
// src/public-utils/hydrateObjectSetFromRid.ts
|
|
37
37
|
function hydrateObjectSetFromRid(client, definition, rid) {
|
|
38
|
-
return
|
|
38
|
+
return chunk7VOMQUIX_cjs.createObjectSet(definition, client[chunk7VOMQUIX_cjs.additionalContext], {
|
|
39
39
|
type: "intersect",
|
|
40
40
|
objectSets: [definition.type === "interface" ? {
|
|
41
41
|
type: "interfaceBase",
|
|
@@ -76,7 +76,7 @@ var levelStyles = {
|
|
|
76
76
|
color: "orange"
|
|
77
77
|
})
|
|
78
78
|
};
|
|
79
|
-
var BrowserLogger = class _BrowserLogger extends
|
|
79
|
+
var BrowserLogger = class _BrowserLogger extends chunk7VOMQUIX_cjs.BaseLogger {
|
|
80
80
|
constructor(bindings = {}, options = {}) {
|
|
81
81
|
super(bindings, {
|
|
82
82
|
...options,
|
|
@@ -102,15 +102,15 @@ var BrowserLogger = class _BrowserLogger extends chunkE5UOKLCW_cjs.BaseLogger {
|
|
|
102
102
|
|
|
103
103
|
Object.defineProperty(exports, "MinimalLogger", {
|
|
104
104
|
enumerable: true,
|
|
105
|
-
get: function () { return
|
|
105
|
+
get: function () { return chunk7VOMQUIX_cjs.MinimalLogger; }
|
|
106
106
|
});
|
|
107
107
|
Object.defineProperty(exports, "createMediaFromReference", {
|
|
108
108
|
enumerable: true,
|
|
109
|
-
get: function () { return
|
|
109
|
+
get: function () { return chunk7VOMQUIX_cjs.createMediaFromReference; }
|
|
110
110
|
});
|
|
111
111
|
Object.defineProperty(exports, "hydrateAttachmentFromRid", {
|
|
112
112
|
enumerable: true,
|
|
113
|
-
get: function () { return
|
|
113
|
+
get: function () { return chunk7VOMQUIX_cjs.hydrateAttachmentFromRid; }
|
|
114
114
|
});
|
|
115
115
|
exports.BrowserLogger = BrowserLogger;
|
|
116
116
|
exports.createAndFetchTempObjectSetRid = createAndFetchTempObjectSetRid;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkJFTS2NKV_cjs = require('../chunk-JFTS2NKV.cjs');
|
|
4
|
+
require('../chunk-DPWQXPBJ.cjs');
|
|
5
5
|
require('../chunk-IWUIN6JJ.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-7VOMQUIX.cjs');
|
|
7
7
|
require('../chunk-BHRMH4Q2.cjs');
|
|
8
8
|
require('../chunk-I2SCCYG7.cjs');
|
|
9
9
|
require('../chunk-7R2DRDPC.cjs');
|
|
@@ -14,7 +14,7 @@ require('../chunk-Q7SFCCGT.cjs');
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, "createObservableClient", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkJFTS2NKV_cjs.createObservableClient; }
|
|
18
18
|
});
|
|
19
19
|
//# sourceMappingURL=observable.cjs.map
|
|
20
20
|
//# sourceMappingURL=observable.cjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkZPPYQPTN_cjs = require('../chunk-ZPPYQPTN.cjs');
|
|
4
|
+
var chunkJFTS2NKV_cjs = require('../chunk-JFTS2NKV.cjs');
|
|
5
|
+
var chunkDPWQXPBJ_cjs = require('../chunk-DPWQXPBJ.cjs');
|
|
6
6
|
require('../chunk-IWUIN6JJ.cjs');
|
|
7
|
-
var
|
|
7
|
+
var chunk7VOMQUIX_cjs = require('../chunk-7VOMQUIX.cjs');
|
|
8
8
|
require('../chunk-BHRMH4Q2.cjs');
|
|
9
9
|
require('../chunk-I2SCCYG7.cjs');
|
|
10
10
|
require('../chunk-7R2DRDPC.cjs');
|
|
@@ -14,8 +14,8 @@ var unstable = require('@osdk/api/unstable');
|
|
|
14
14
|
|
|
15
15
|
// src/object/hydrateOsdkObject.ts
|
|
16
16
|
async function hydrateOsdkObject(client, objects, objectDefsByApiName, propertySecurities) {
|
|
17
|
-
return
|
|
18
|
-
client[
|
|
17
|
+
return chunkDPWQXPBJ_cjs.convertWireToOsdkObjects(
|
|
18
|
+
client[chunk7VOMQUIX_cjs.additionalContext],
|
|
19
19
|
objects,
|
|
20
20
|
/* interfaceApiName */
|
|
21
21
|
void 0,
|
|
@@ -159,7 +159,7 @@ function getLinkQueryOptions(linkDef, sourceObject, pageSize) {
|
|
|
159
159
|
return options;
|
|
160
160
|
}
|
|
161
161
|
async function buildObjectSetFromLinkDefByType(client, sourceType, sourcePrimaryKey, linkDef) {
|
|
162
|
-
const metadata = await client[
|
|
162
|
+
const metadata = await client[chunk7VOMQUIX_cjs.additionalContext].ontologyProvider.getObjectDefinition(sourceType.apiName);
|
|
163
163
|
const pkFieldName = metadata.primaryKeyApiName;
|
|
164
164
|
let objectSet = client(sourceType).where({
|
|
165
165
|
[pkFieldName]: sourcePrimaryKey
|
|
@@ -218,35 +218,35 @@ function resolveSymbolBindings(value, sourcePrimaryKey) {
|
|
|
218
218
|
|
|
219
219
|
Object.defineProperty(exports, "createScenario", {
|
|
220
220
|
enumerable: true,
|
|
221
|
-
get: function () { return
|
|
221
|
+
get: function () { return chunkZPPYQPTN_cjs.createScenario; }
|
|
222
222
|
});
|
|
223
223
|
Object.defineProperty(exports, "withScenario", {
|
|
224
224
|
enumerable: true,
|
|
225
|
-
get: function () { return
|
|
225
|
+
get: function () { return chunkZPPYQPTN_cjs.withScenario; }
|
|
226
226
|
});
|
|
227
227
|
Object.defineProperty(exports, "createObservableClient", {
|
|
228
228
|
enumerable: true,
|
|
229
|
-
get: function () { return
|
|
229
|
+
get: function () { return chunkJFTS2NKV_cjs.createObservableClient; }
|
|
230
230
|
});
|
|
231
231
|
Object.defineProperty(exports, "createClientWithSubscriptionConnection", {
|
|
232
232
|
enumerable: true,
|
|
233
|
-
get: function () { return
|
|
233
|
+
get: function () { return chunkDPWQXPBJ_cjs.createClientWithSubscriptionConnection; }
|
|
234
234
|
});
|
|
235
235
|
Object.defineProperty(exports, "createClientWithTransaction", {
|
|
236
236
|
enumerable: true,
|
|
237
|
-
get: function () { return
|
|
237
|
+
get: function () { return chunkDPWQXPBJ_cjs.createClientWithTransaction; }
|
|
238
238
|
});
|
|
239
239
|
Object.defineProperty(exports, "augment", {
|
|
240
240
|
enumerable: true,
|
|
241
|
-
get: function () { return
|
|
241
|
+
get: function () { return chunk7VOMQUIX_cjs.augment; }
|
|
242
242
|
});
|
|
243
243
|
Object.defineProperty(exports, "getWireObjectSet", {
|
|
244
244
|
enumerable: true,
|
|
245
|
-
get: function () { return
|
|
245
|
+
get: function () { return chunk7VOMQUIX_cjs.getWireObjectSet; }
|
|
246
246
|
});
|
|
247
247
|
Object.defineProperty(exports, "isObjectSet", {
|
|
248
248
|
enumerable: true,
|
|
249
|
-
get: function () { return
|
|
249
|
+
get: function () { return chunk7VOMQUIX_cjs.isObjectSet; }
|
|
250
250
|
});
|
|
251
251
|
exports.applyShapeTransformations = applyShapeTransformations;
|
|
252
252
|
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.
|
|
24
|
+
const MaxOsdkVersion = "2.54.0";
|
|
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.
|
|
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.54.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.
|
|
18
|
-
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.
|
|
17
|
+
export const USER_AGENT = `osdk-client/${"2.54.0"}`;
|
|
18
|
+
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.54.0"}`;
|
|
19
19
|
//# sourceMappingURL=UserAgent.js.map
|
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.
|
|
84
|
+
declare const MaxOsdkVersion = "2.54.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.
|
|
3
|
+
"version": "2.54.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -82,10 +82,10 @@
|
|
|
82
82
|
"tiny-invariant": "^1.3.3",
|
|
83
83
|
"type-fest": "^4.41.0",
|
|
84
84
|
"ws": "^8.20.1",
|
|
85
|
-
"@osdk/api": "~2.
|
|
86
|
-
"@osdk/
|
|
87
|
-
"@osdk/generator-converters": "2.53.0",
|
|
85
|
+
"@osdk/api": "~2.54.0",
|
|
86
|
+
"@osdk/generator-converters": "2.54.0",
|
|
88
87
|
"@osdk/shared.client.impl": "~1.13.0",
|
|
88
|
+
"@osdk/client.unstable": "2.54.0",
|
|
89
89
|
"@osdk/shared.net.errors": "~2.12.0",
|
|
90
90
|
"@osdk/shared.net.fetch": "~1.12.0"
|
|
91
91
|
},
|
|
@@ -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.
|
|
120
|
+
"@osdk/client.test.ontology": "2.54.0",
|
|
121
121
|
"@osdk/monorepo.api-extractor": "~0.7.0",
|
|
122
122
|
"@osdk/monorepo.tsconfig": "~0.7.0",
|
|
123
123
|
"@osdk/shared.test.intellisense": "~0.13.0"
|