abra-flexi 0.5.3 → 0.5.4
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.cjs +29 -3
- package/dist/index.d.cts +445 -444
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +445 -444
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +29 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -40647,7 +40647,7 @@ var AFTypUzivatelskeVazby = class extends AFEntity {
|
|
|
40647
40647
|
|
|
40648
40648
|
//#endregion
|
|
40649
40649
|
//#region src/generated/entities/AFUzivatelskaVazba.ts
|
|
40650
|
-
var AFUzivatelskaVazba = class extends AFEntity {
|
|
40650
|
+
var AFUzivatelskaVazba$1 = class extends AFEntity {
|
|
40651
40651
|
static {
|
|
40652
40652
|
this.EntityPath = "uzivatelska-vazba";
|
|
40653
40653
|
}
|
|
@@ -66332,7 +66332,7 @@ const AFEntityRegistry = {
|
|
|
66332
66332
|
AFFormaDopravy,
|
|
66333
66333
|
AFCisloBaliku,
|
|
66334
66334
|
AFTypUzivatelskeVazby,
|
|
66335
|
-
AFUzivatelskaVazba,
|
|
66335
|
+
AFUzivatelskaVazba: AFUzivatelskaVazba$1,
|
|
66336
66336
|
AFVztah,
|
|
66337
66337
|
AFIntrastatKrajUrceni,
|
|
66338
66338
|
AFIntrastatZvlastniPohyb,
|
|
@@ -66911,6 +66911,32 @@ var AFApiClient = class {
|
|
|
66911
66911
|
throw e;
|
|
66912
66912
|
}
|
|
66913
66913
|
}
|
|
66914
|
+
async deleteUserRelation(entity, options) {
|
|
66915
|
+
if (!this.company || !this.company.length) throw new AFError(AFErrorCode.MISSING_ABRA_COMPANY, `Can't query AFApiClient without providing company path component first.`);
|
|
66916
|
+
const id = entity?.id;
|
|
66917
|
+
if (!id && typeof id !== "number") throw new AFError(AFErrorCode.MISSING_ID, `Can't delete entity without knowing it's id.`);
|
|
66918
|
+
let url = this._url + "/c/" + this.company + "/" + AFUzivatelskaVazba.EntityPath + ".json";
|
|
66919
|
+
try {
|
|
66920
|
+
const raw$1 = await this._fetch(url, {
|
|
66921
|
+
signal: options.abortController?.signal,
|
|
66922
|
+
method: "PUT",
|
|
66923
|
+
body: JSON.stringify({ winstrom: [{
|
|
66924
|
+
[AFUzivatelskaVazba.EntityPath]: { id },
|
|
66925
|
+
[AFUzivatelskaVazba.EntityPath + "@action"]: "delete"
|
|
66926
|
+
}] })
|
|
66927
|
+
});
|
|
66928
|
+
if (raw$1.status >= 400 && raw$1.status < 600) throw new AFError(AFErrorCode.ABRA_FLEXI_ERROR, `${raw$1.status} ${raw$1.statusText}`);
|
|
66929
|
+
const json = await raw$1.json();
|
|
66930
|
+
console.log(json);
|
|
66931
|
+
if (json.winstrom["success"] === "true") {}
|
|
66932
|
+
} catch (e) {
|
|
66933
|
+
if (!(e instanceof AFError)) {
|
|
66934
|
+
console.log(e);
|
|
66935
|
+
e = new AFError(AFErrorCode.UNKNOWN, e.toString());
|
|
66936
|
+
}
|
|
66937
|
+
throw e;
|
|
66938
|
+
}
|
|
66939
|
+
}
|
|
66914
66940
|
_decodeEntityObj(entity, obj) {
|
|
66915
66941
|
if (!obj) return [];
|
|
66916
66942
|
if (typeof obj === "string") {
|
|
@@ -67480,7 +67506,7 @@ exports.AFUmisteniVeSkladuRegal = AFUmisteniVeSkladuRegal;
|
|
|
67480
67506
|
exports.AFUplatneniDaneZavazku = AFUplatneniDaneZavazku;
|
|
67481
67507
|
exports.AFUplatneniDaneZavazkuPolozka = AFUplatneniDaneZavazkuPolozka;
|
|
67482
67508
|
exports.AFUzivatel = AFUzivatel;
|
|
67483
|
-
exports.AFUzivatelskaVazba = AFUzivatelskaVazba;
|
|
67509
|
+
exports.AFUzivatelskaVazba = AFUzivatelskaVazba$1;
|
|
67484
67510
|
exports.AFUzivatelskyDotaz = AFUzivatelskyDotaz;
|
|
67485
67511
|
exports.AFUzivatelskyDotazParametr = AFUzivatelskyDotazParametr;
|
|
67486
67512
|
exports.AFUzivatelskyDotazVlastnost = AFUzivatelskyDotazVlastnost;
|