catalyst-relay 0.6.1 → 0.6.2
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/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1868,6 +1868,23 @@ async function updateObject(client, object, lockHandle, transport) {
|
|
|
1868
1868
|
}
|
|
1869
1869
|
|
|
1870
1870
|
// src/core/adt/craud/classInclude.ts
|
|
1871
|
+
async function readClassInclude(client, className, includeType) {
|
|
1872
|
+
const [config, configErr] = requireConfig("aclass");
|
|
1873
|
+
if (configErr) return err(configErr);
|
|
1874
|
+
debug(`Read class include ${className}/${includeType}`);
|
|
1875
|
+
const [response, requestErr] = await client.request({
|
|
1876
|
+
method: "GET",
|
|
1877
|
+
path: `/sap/bc/adt/${config.endpoint}/${className.toLowerCase()}/includes/${includeType}`,
|
|
1878
|
+
headers: { "Accept": "text/plain" }
|
|
1879
|
+
});
|
|
1880
|
+
const [content, checkErr] = await checkResponse(
|
|
1881
|
+
response,
|
|
1882
|
+
requestErr,
|
|
1883
|
+
`Failed to read ${includeType} include of class ${className}`
|
|
1884
|
+
);
|
|
1885
|
+
if (checkErr) return err(checkErr);
|
|
1886
|
+
return ok(content);
|
|
1887
|
+
}
|
|
1871
1888
|
async function updateClassInclude(client, className, includeType, source, lockHandle, transport) {
|
|
1872
1889
|
const [config, configErr] = requireConfig("aclass");
|
|
1873
1890
|
if (configErr) return err(configErr);
|
|
@@ -3584,6 +3601,12 @@ async function update(state, requestor, object, transport) {
|
|
|
3584
3601
|
return ok(void 0);
|
|
3585
3602
|
}
|
|
3586
3603
|
|
|
3604
|
+
// src/client/methods/craud/specialcases/classes/readClassInclude.ts
|
|
3605
|
+
async function readClassInclude2(state, requestor, className, includeType) {
|
|
3606
|
+
if (!state.session) return err(new Error("Not logged in"));
|
|
3607
|
+
return readClassInclude(requestor, className, includeType);
|
|
3608
|
+
}
|
|
3609
|
+
|
|
3587
3610
|
// src/client/methods/craud/specialcases/classes/writeClassInclude.ts
|
|
3588
3611
|
async function writeClassInclude(state, requestor, className, includeType, source, transport) {
|
|
3589
3612
|
if (!state.session) return err(new Error("Not logged in"));
|
|
@@ -4120,6 +4143,9 @@ var ADTClientImpl = class {
|
|
|
4120
4143
|
async update(object, transport) {
|
|
4121
4144
|
return update(this.state, this.requestor, object, transport);
|
|
4122
4145
|
}
|
|
4146
|
+
async readClassInclude(className, includeType) {
|
|
4147
|
+
return readClassInclude2(this.state, this.requestor, className, includeType);
|
|
4148
|
+
}
|
|
4123
4149
|
async writeClassInclude(className, includeType, source, transport) {
|
|
4124
4150
|
return writeClassInclude(this.state, this.requestor, className, includeType, source, transport);
|
|
4125
4151
|
}
|