@computec/uibase 1.0.4 → 1.0.7
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/communication/ConnectionOptions.d.ts.map +1 -1
- package/dist/communication/HttpClient.d.ts +1 -0
- package/dist/communication/HttpClient.d.ts.map +1 -1
- package/dist/communication/HttpClient.js +6 -1
- package/dist/communication/IBaseHttpClientOptions.d.ts +1 -0
- package/dist/communication/IBaseHttpClientOptions.d.ts.map +1 -1
- package/dist/communication/IConnectionInfo.d.ts +0 -1
- package/dist/communication/IConnectionInfo.d.ts.map +1 -1
- package/dist/communication/ISignalRHubClient.d.ts.map +1 -1
- package/dist/communication/SignalRHubClient.d.ts.map +1 -1
- package/dist/helpers/ErrorHelper.d.ts +1 -1
- package/dist/helpers/ErrorHelper.d.ts.map +1 -1
- package/dist/helpers/ErrorHelper.js +6 -0
- package/dist/helpers/HttpClientHelper.d.ts.map +1 -1
- package/dist/helpers/HttpClientHelper.js +15 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/models/AppEngineException.d.ts +14 -2
- package/dist/models/AppEngineException.d.ts.map +1 -1
- package/dist/models/AppEngineException.js +24 -3
- package/dist/models/BaseError.d.ts +51 -0
- package/dist/models/BaseError.d.ts.map +1 -0
- package/dist/models/BaseError.js +53 -0
- package/dist/models/DocumentedException.d.ts +22 -0
- package/dist/models/DocumentedException.d.ts.map +1 -0
- package/dist/models/DocumentedException.js +48 -0
- package/dist/models/HttpResponse.d.ts +7 -0
- package/dist/models/HttpResponse.d.ts.map +1 -0
- package/dist/models/HttpResponse.js +9 -0
- package/dist/models/IOdataResponse.d.ts +6 -0
- package/dist/models/IOdataResponse.d.ts.map +1 -0
- package/dist/models/IOdataResponse.js +2 -0
- package/dist/models/OdataError.d.ts +56 -0
- package/dist/models/OdataError.d.ts.map +1 -0
- package/dist/models/OdataError.js +88 -0
- package/dist/models/ProblemDetails.d.ts +13 -3
- package/dist/models/ProblemDetails.d.ts.map +1 -1
- package/dist/models/ProblemDetails.js +19 -4
- package/dist/models/Session.d.ts +2 -1
- package/dist/models/Session.d.ts.map +1 -1
- package/dist/models/Session.js +5 -1
- package/dist/models/UserInfo.d.ts +27 -1
- package/dist/models/UserInfo.d.ts.map +1 -1
- package/dist/models/ValidationProblemDetails.d.ts +10 -1
- package/dist/models/ValidationProblemDetails.d.ts.map +1 -1
- package/dist/models/ValidationProblemDetails.js +13 -2
- package/dist/models/Version.d.ts +21 -1
- package/dist/models/Version.d.ts.map +1 -1
- package/dist/models/Version.js +137 -14
- package/dist/models/enums/HeadersContentTypeEnum.d.ts +7 -0
- package/dist/models/enums/HeadersContentTypeEnum.d.ts.map +1 -1
- package/dist/models/enums/HeadersContentTypeEnum.js +7 -0
- package/dist/models/interfaces/IAppEngineException.d.ts +52 -0
- package/dist/models/interfaces/IAppEngineException.d.ts.map +1 -1
- package/dist/models/interfaces/IDocumentedException.d.ts +60 -0
- package/dist/models/interfaces/IDocumentedException.d.ts.map +1 -0
- package/dist/models/interfaces/IDocumentedException.js +2 -0
- package/dist/models/interfaces/IHttpResponse.d.ts +5 -0
- package/dist/models/interfaces/IHttpResponse.d.ts.map +1 -0
- package/dist/models/interfaces/IHttpResponse.js +2 -0
- package/dist/models/interfaces/IOdataError.d.ts +182 -0
- package/dist/models/interfaces/IOdataError.d.ts.map +1 -0
- package/dist/models/interfaces/IOdataError.js +2 -0
- package/dist/models/interfaces/IProblemDetails.d.ts +85 -0
- package/dist/models/interfaces/IProblemDetails.d.ts.map +1 -1
- package/dist/models/interfaces/IValidationProblemDetails.d.ts +76 -0
- package/dist/models/interfaces/IValidationProblemDetails.d.ts.map +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/.library +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/communication/ConnectionOptions-dbg.js +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/communication/ConnectionOptions.js.map +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/communication/HttpClient-dbg.js +41 -22
- package/dist-ui5/resources/computec/appengine/uibase/communication/HttpClient.js +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/communication/HttpClient.js.map +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/communication/SignalRHubClient-dbg.js +26 -28
- package/dist-ui5/resources/computec/appengine/uibase/communication/SignalRHubClient.js +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/communication/SignalRHubClient.js.map +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/helpers/ErrorHelper-dbg.js +7 -1
- package/dist-ui5/resources/computec/appengine/uibase/helpers/ErrorHelper.js +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/helpers/ErrorHelper.js.map +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/helpers/HttpClientHelper-dbg.js +76 -85
- package/dist-ui5/resources/computec/appengine/uibase/helpers/HttpClientHelper.js +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/helpers/HttpClientHelper.js.map +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/index-dbg.js +55 -0
- package/dist-ui5/resources/computec/appengine/uibase/index.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/index.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/library-dbg.js +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/library-preload.js +53 -11
- package/dist-ui5/resources/computec/appengine/uibase/library-preload.js.map +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/library.js +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/manifest.json +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/models/AppEngineConfiguration-dbg.js +31 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/AppEngineConfiguration.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/AppEngineConfiguration.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/AppEngineException-dbg.js +46 -7
- package/dist-ui5/resources/computec/appengine/uibase/models/AppEngineException.js +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/models/AppEngineException.js.map +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/models/BaseError-dbg.js +92 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/BaseError.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/BaseError.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/CompanyInfo-dbg.js +59 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/CompanyInfo.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/CompanyInfo.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/DocumentedException-dbg.js +75 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/DocumentedException.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/DocumentedException.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/HttpResponse-dbg.js +17 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/HttpResponse.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/HttpResponse.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/IOdataResponse-dbg.js +7 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/IOdataResponse.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/IOdataResponse.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/OdataError-dbg.js +122 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/OdataError.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/OdataError.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/ProblemDetails-dbg.js +29 -7
- package/dist-ui5/resources/computec/appengine/uibase/models/ProblemDetails.js +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/models/ProblemDetails.js.map +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/models/Session-dbg.js +20 -4
- package/dist-ui5/resources/computec/appengine/uibase/models/Session.js +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/models/Session.js.map +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/models/UserInfo-dbg.js +31 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/UserInfo.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/UserInfo.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/ValidationProblemDetails-dbg.js +15 -2
- package/dist-ui5/resources/computec/appengine/uibase/models/ValidationProblemDetails.js +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/models/ValidationProblemDetails.js.map +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/models/Version-dbg.js +253 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/Version.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/Version.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/enums/HeadersContentTypeEnum-dbg.js +7 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/enums/HeadersContentTypeEnum.js +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/models/enums/HeadersContentTypeEnum.js.map +1 -1
- package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IAppEngineConfiguration-dbg.js +7 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IAppEngineConfiguration.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IAppEngineConfiguration.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IDocumentedException-dbg.js +7 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IDocumentedException.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IDocumentedException.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IHttpResponse-dbg.js +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IHttpResponse.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IHttpResponse.js.map +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IOdataError-dbg.js +1 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IOdataError.js +2 -0
- package/dist-ui5/resources/computec/appengine/uibase/models/interfaces/IOdataError.js.map +1 -0
- package/package.json +12 -6
- package/ui5.yaml +8 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const BaseError_1 = __importDefault(require("./BaseError"));
|
|
7
|
+
/**
|
|
8
|
+
* Represents an OData error that occurs during web service operations.
|
|
9
|
+
* This class is designed to handle OData error responses from C# backend services,
|
|
10
|
+
* providing structured error information including error codes, messages, details, and inner errors.
|
|
11
|
+
*
|
|
12
|
+
* OData errors typically follow the OData specification format with a hierarchical structure
|
|
13
|
+
* containing error details that can be used for debugging and user feedback.
|
|
14
|
+
*
|
|
15
|
+
* @extends BaseError
|
|
16
|
+
* @implements IOdataErrorObject
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const odataError = OdataError.create({
|
|
21
|
+
* error: {
|
|
22
|
+
* code: "ValidationError",
|
|
23
|
+
* message: "Invalid input data",
|
|
24
|
+
* details: [...],
|
|
25
|
+
* innererror: {...}
|
|
26
|
+
* }
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
class OdataError extends BaseError_1.default {
|
|
31
|
+
constructor() {
|
|
32
|
+
super(...arguments);
|
|
33
|
+
this._message = "";
|
|
34
|
+
this.code = "";
|
|
35
|
+
this.details = [];
|
|
36
|
+
this.innererror = {};
|
|
37
|
+
}
|
|
38
|
+
fillData(data) {
|
|
39
|
+
if (OdataError.is(data)) {
|
|
40
|
+
super.fillData(data.error);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
super.fillData(data);
|
|
44
|
+
}
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
get name() {
|
|
48
|
+
return "OData Error";
|
|
49
|
+
}
|
|
50
|
+
get message() {
|
|
51
|
+
return this._message;
|
|
52
|
+
}
|
|
53
|
+
set message(value) {
|
|
54
|
+
this._message = value;
|
|
55
|
+
}
|
|
56
|
+
get error() {
|
|
57
|
+
return this;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Type guard to check if an object is a valid IODataError structure.
|
|
61
|
+
* Validates that the object has the expected OData error format with
|
|
62
|
+
* nested error object containing required properties.
|
|
63
|
+
*
|
|
64
|
+
* This is particularly useful when handling responses from C# OData services
|
|
65
|
+
* that return errors in the standard OData format.
|
|
66
|
+
*
|
|
67
|
+
* @param obj - The object to check
|
|
68
|
+
* @returns True if the object matches the IODataError structure
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```typescript
|
|
72
|
+
* if (OdataError.is(responseData)) {
|
|
73
|
+
* const error = OdataError.create(responseData);
|
|
74
|
+
* }
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
static is(obj) {
|
|
78
|
+
if (typeof obj !== "object" || obj === null)
|
|
79
|
+
return false;
|
|
80
|
+
const candidate = obj;
|
|
81
|
+
return (typeof candidate.error === "object" &&
|
|
82
|
+
typeof candidate.error.code === "string" &&
|
|
83
|
+
typeof candidate.error.message === "string" &&
|
|
84
|
+
Array.isArray(candidate.error.details) &&
|
|
85
|
+
typeof candidate.error.innererror === "object");
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
exports.default = OdataError;
|
|
@@ -1,12 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import BaseError from "./BaseError";
|
|
2
2
|
import { IProblemDetails } from "./interfaces/IProblemDetails";
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Concrete implementation of RFC 7807 Problem Details for HTTP APIs.
|
|
5
|
+
* Provides standardized error representation for REST API responses
|
|
6
|
+
* with structured error information including type, title, status, and details.
|
|
7
|
+
*
|
|
8
|
+
* @extends BaseError
|
|
9
|
+
* @implements IProblemDetails
|
|
10
|
+
*/
|
|
11
|
+
export default class ProblemDetails extends BaseError implements IProblemDetails {
|
|
4
12
|
type: string;
|
|
5
13
|
title: string;
|
|
6
14
|
status: number;
|
|
7
15
|
detail: string;
|
|
8
16
|
instance: string;
|
|
9
|
-
|
|
17
|
+
fillData(data: Record<string, unknown> | object): this;
|
|
18
|
+
get name(): string;
|
|
19
|
+
get message(): string;
|
|
10
20
|
get error(): Error;
|
|
11
21
|
static is(obj: any): obj is IProblemDetails;
|
|
12
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProblemDetails.d.ts","sourceRoot":"","sources":["../../src/models/ProblemDetails.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ProblemDetails.d.ts","sourceRoot":"","sources":["../../src/models/ProblemDetails.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,SAAU,YAAW,eAAe;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IAEjB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,IAAI;IAMtD,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED,IAAI,KAAK,IAAI,KAAK,CAEjB;IAED,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,eAAe;CAS3C"}
|
|
@@ -3,13 +3,28 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
const BaseError_1 = __importDefault(require("./BaseError"));
|
|
7
|
+
/**
|
|
8
|
+
* Concrete implementation of RFC 7807 Problem Details for HTTP APIs.
|
|
9
|
+
* Provides standardized error representation for REST API responses
|
|
10
|
+
* with structured error information including type, title, status, and details.
|
|
11
|
+
*
|
|
12
|
+
* @extends BaseError
|
|
13
|
+
* @implements IProblemDetails
|
|
14
|
+
*/
|
|
15
|
+
class ProblemDetails extends BaseError_1.default {
|
|
16
|
+
fillData(data) {
|
|
17
|
+
super.fillData(data);
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
20
|
+
get name() {
|
|
21
|
+
return "Problem Details";
|
|
22
|
+
}
|
|
23
|
+
get message() {
|
|
9
24
|
return this.detail || this.title;
|
|
10
25
|
}
|
|
11
26
|
get error() {
|
|
12
|
-
return
|
|
27
|
+
return this;
|
|
13
28
|
}
|
|
14
29
|
static is(obj) {
|
|
15
30
|
if (typeof obj !== "object" || obj === null)
|
package/dist/models/Session.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Session.d.ts","sourceRoot":"","sources":["../../src/models/Session.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,
|
|
1
|
+
{"version":3,"file":"Session.d.ts","sourceRoot":"","sources":["../../src/models/Session.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAGtD,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,kBAAkB;IAC/C,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
package/dist/models/Session.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
6
|
+
const BaseBusinessObject_1 = __importDefault(require("./BaseBusinessObject"));
|
|
7
|
+
class Session extends BaseBusinessObject_1.default {
|
|
4
8
|
}
|
|
5
9
|
exports.default = Session;
|
|
@@ -1,7 +1,33 @@
|
|
|
1
1
|
import BaseBusinessObject from "./BaseBusinessObject";
|
|
2
2
|
export default class UserInfo extends BaseBusinessObject {
|
|
3
|
+
InternalKey: number;
|
|
4
|
+
UserPassword: string | null;
|
|
3
5
|
UserCode: string;
|
|
4
|
-
Superuser: string;
|
|
5
6
|
UserName: string;
|
|
7
|
+
Superuser: string;
|
|
8
|
+
eMail: string | null;
|
|
9
|
+
MobilePhoneNumber: string | null;
|
|
10
|
+
Defaults: string | null;
|
|
11
|
+
FaxNumber: string | null;
|
|
12
|
+
Branch: number;
|
|
13
|
+
Department: number;
|
|
14
|
+
LanguageCode: string;
|
|
15
|
+
Locked: string;
|
|
16
|
+
Group: string;
|
|
17
|
+
MaxDiscountGeneral: number;
|
|
18
|
+
MaxDiscountSales: number;
|
|
19
|
+
MaxDiscountPurchase: number;
|
|
20
|
+
CashLimit: string;
|
|
21
|
+
MaxCashAmtForIncmngPayts: number;
|
|
22
|
+
LastLogoutDate: string;
|
|
23
|
+
LastLoginTime: string;
|
|
24
|
+
LastLogoutTime: string;
|
|
25
|
+
LastPasswordChangeTime: string;
|
|
26
|
+
LastPasswordChangedBy: string;
|
|
27
|
+
U_StdProd: string;
|
|
28
|
+
U_CO_FrmOpenMode: string;
|
|
29
|
+
UserPermission: any[];
|
|
30
|
+
UserGroupByUser: any[];
|
|
31
|
+
UserBranchAssignment: any[];
|
|
6
32
|
}
|
|
7
33
|
//# sourceMappingURL=UserInfo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserInfo.d.ts","sourceRoot":"","sources":["../../src/models/UserInfo.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAGtD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,kBAAkB;IACvD,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"UserInfo.d.ts","sourceRoot":"","sources":["../../src/models/UserInfo.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAGtD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,kBAAkB;IACvD,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,wBAAwB,EAAE,MAAM,CAAC;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,GAAG,EAAE,CAAC;IACtB,eAAe,EAAE,GAAG,EAAE,CAAC;IACvB,oBAAoB,EAAE,GAAG,EAAE,CAAC;CAC5B"}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { IValidationProblemDetails } from "./interfaces/IValidationProblemDetails";
|
|
2
2
|
import ProblemDetails from "./ProblemDetails";
|
|
3
|
+
/**
|
|
4
|
+
* Specialized implementation for validation-specific problem details.
|
|
5
|
+
* Extends ProblemDetails to handle field-level validation errors
|
|
6
|
+
* with structured error mapping and optional request tracing.
|
|
7
|
+
*
|
|
8
|
+
* @extends ProblemDetails
|
|
9
|
+
* @implements IValidationProblemDetails
|
|
10
|
+
*/
|
|
3
11
|
export default class ValidationProblemDetails extends ProblemDetails implements IValidationProblemDetails {
|
|
4
12
|
errors: Record<string, string[]>;
|
|
5
13
|
traceId: string;
|
|
6
|
-
get
|
|
14
|
+
get name(): string;
|
|
15
|
+
get message(): string;
|
|
7
16
|
get error(): Error;
|
|
8
17
|
static is(obj: any): obj is IValidationProblemDetails;
|
|
9
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationProblemDetails.d.ts","sourceRoot":"","sources":["../../src/models/ValidationProblemDetails.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,CAAC,OAAO,OAAO,wBACpB,SAAQ,cACR,YAAW,yBAAyB;IAEpC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAM;IACtC,OAAO,EAAE,MAAM,CAAQ;IAEvB,IAAI,
|
|
1
|
+
{"version":3,"file":"ValidationProblemDetails.d.ts","sourceRoot":"","sources":["../../src/models/ValidationProblemDetails.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,OAAO,wBACpB,SAAQ,cACR,YAAW,yBAAyB;IAEpC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAM;IACtC,OAAO,EAAE,MAAM,CAAQ;IAEvB,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,OAAO,IAAI,MAAM,CAMpB;IAED,IAAI,KAAK,IAAI,KAAK,CAEjB;IAED,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,yBAAyB;CAQrD"}
|
|
@@ -4,13 +4,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const ProblemDetails_1 = __importDefault(require("./ProblemDetails"));
|
|
7
|
+
/**
|
|
8
|
+
* Specialized implementation for validation-specific problem details.
|
|
9
|
+
* Extends ProblemDetails to handle field-level validation errors
|
|
10
|
+
* with structured error mapping and optional request tracing.
|
|
11
|
+
*
|
|
12
|
+
* @extends ProblemDetails
|
|
13
|
+
* @implements IValidationProblemDetails
|
|
14
|
+
*/
|
|
7
15
|
class ValidationProblemDetails extends ProblemDetails_1.default {
|
|
8
16
|
constructor() {
|
|
9
17
|
super(...arguments);
|
|
10
18
|
this.errors = {};
|
|
11
19
|
this.traceId = null;
|
|
12
20
|
}
|
|
13
|
-
get
|
|
21
|
+
get name() {
|
|
22
|
+
return "Validation Problem Details";
|
|
23
|
+
}
|
|
24
|
+
get message() {
|
|
14
25
|
let errorMessage = "";
|
|
15
26
|
Object.entries(this.errors).forEach(([field, messages]) => {
|
|
16
27
|
errorMessage += `${field}: ${messages.join(", ")}\n`;
|
|
@@ -18,7 +29,7 @@ class ValidationProblemDetails extends ProblemDetails_1.default {
|
|
|
18
29
|
return errorMessage.trim();
|
|
19
30
|
}
|
|
20
31
|
get error() {
|
|
21
|
-
return
|
|
32
|
+
return this;
|
|
22
33
|
}
|
|
23
34
|
static is(obj) {
|
|
24
35
|
if (!ProblemDetails_1.default.is(obj))
|
package/dist/models/Version.d.ts
CHANGED
|
@@ -4,12 +4,32 @@ export default class Version extends BaseBusinessObject {
|
|
|
4
4
|
private readonly _major;
|
|
5
5
|
private readonly _minor;
|
|
6
6
|
private readonly _build;
|
|
7
|
+
private readonly _revision;
|
|
8
|
+
private readonly _prerelease;
|
|
7
9
|
constructor();
|
|
8
10
|
constructor(version: Version);
|
|
9
11
|
constructor(version: string);
|
|
10
12
|
constructor(version: number);
|
|
11
|
-
constructor(major: number, minor: number, build
|
|
13
|
+
constructor(major: number, minor: number, build?: number, revision?: number, prerelease?: string);
|
|
14
|
+
static tryParse(version: string): {
|
|
15
|
+
success: boolean;
|
|
16
|
+
version?: Version;
|
|
17
|
+
};
|
|
18
|
+
private static tryParseComponent;
|
|
12
19
|
static isVersion(obj: any): obj is Partial<Version>;
|
|
20
|
+
get major(): number;
|
|
21
|
+
get minor(): number;
|
|
22
|
+
get build(): number;
|
|
23
|
+
get revision(): number;
|
|
24
|
+
get prerelease(): string;
|
|
25
|
+
static ZERO(): Version;
|
|
26
|
+
isZero(): boolean;
|
|
13
27
|
toString(): string;
|
|
28
|
+
private compare;
|
|
29
|
+
equals(other: Version): boolean;
|
|
30
|
+
lessThan(other: Version): boolean;
|
|
31
|
+
greaterThan(other: Version): boolean;
|
|
32
|
+
lessThanOrEqual(other: Version): boolean;
|
|
33
|
+
greaterThanOrEqual(other: Version): boolean;
|
|
14
34
|
}
|
|
15
35
|
//# sourceMappingURL=Version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Version.d.ts","sourceRoot":"","sources":["../../src/models/Version.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAEtD,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,kBAAkB;IACtD,gBAAuB,eAAe,
|
|
1
|
+
{"version":3,"file":"Version.d.ts","sourceRoot":"","sources":["../../src/models/Version.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAEtD,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,kBAAkB;IACtD,gBAAuB,eAAe,SAAgC;IACtE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAa;IACpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAa;IACpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAa;IACpC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAa;IACvC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;;gBAG9B,OAAO,EAAE,OAAO;gBAChB,OAAO,EAAE,MAAM;gBACf,OAAO,EAAE,MAAM;gBAE1B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,MAAM;WA2CN,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG;QACxC,OAAO,EAAE,OAAO,CAAC;QACjB,OAAO,CAAC,EAAE,OAAO,CAAC;KAClB;IA4DD,OAAO,CAAC,MAAM,CAAC,iBAAiB;WAalB,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC;IAS1D,IAAW,KAAK,IAAI,MAAM,CAEzB;IACD,IAAW,KAAK,IAAI,MAAM,CAEzB;IACD,IAAW,KAAK,IAAI,MAAM,CAEzB;IACD,IAAW,QAAQ,IAAI,MAAM,CAE5B;IACD,IAAW,UAAU,IAAI,MAAM,CAE9B;WAEa,IAAI;IAIX,MAAM,IAAI,OAAO;IAIxB,QAAQ,IAAI,MAAM;IAYlB,OAAO,CAAC,OAAO;IA8BR,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAI/B,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAIjC,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAIpC,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAIxC,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;CAGlD"}
|
package/dist/models/Version.js
CHANGED
|
@@ -5,26 +5,32 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const BaseBusinessObject_1 = __importDefault(require("./BaseBusinessObject"));
|
|
7
7
|
class Version extends BaseBusinessObject_1.default {
|
|
8
|
-
constructor(major, minor, build) {
|
|
8
|
+
constructor(major, minor, build, revision, prerelease) {
|
|
9
9
|
super();
|
|
10
10
|
this._major = 0; // Major version number
|
|
11
11
|
this._minor = 0; // Minor version number
|
|
12
12
|
this._build = 0; // Build number
|
|
13
|
+
this._revision = 0; // Revision number
|
|
14
|
+
this._prerelease = ""; // Prerelease/metadata suffix
|
|
13
15
|
if (arguments.length === 0)
|
|
14
16
|
return this;
|
|
15
17
|
if (Version.isVersion(major)) {
|
|
16
18
|
this._major = major._major;
|
|
17
19
|
this._minor = major._minor;
|
|
18
20
|
this._build = major._build;
|
|
21
|
+
this._revision = major._revision;
|
|
22
|
+
this._prerelease = major._prerelease || "";
|
|
19
23
|
}
|
|
20
24
|
else if (typeof major === "string") {
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
const parsed = Version.tryParse(major);
|
|
26
|
+
if (!parsed.success) {
|
|
27
|
+
throw new Error("Invalid version format. Expected format: 'major.minor[.build][.revision][-prerelease]'");
|
|
23
28
|
}
|
|
24
|
-
|
|
25
|
-
this.
|
|
26
|
-
this.
|
|
27
|
-
this.
|
|
29
|
+
this._major = parsed.version._major;
|
|
30
|
+
this._minor = parsed.version._minor;
|
|
31
|
+
this._build = parsed.version._build;
|
|
32
|
+
this._revision = parsed.version._revision;
|
|
33
|
+
this._prerelease = parsed.version._prerelease;
|
|
28
34
|
}
|
|
29
35
|
else if (typeof major === "number" && arguments.length === 1) {
|
|
30
36
|
const padded = major.toString().padStart(7, "0");
|
|
@@ -33,11 +39,61 @@ class Version extends BaseBusinessObject_1.default {
|
|
|
33
39
|
this._build = parseInt(padded.slice(4, 7), 10);
|
|
34
40
|
}
|
|
35
41
|
else {
|
|
36
|
-
this._major = major;
|
|
37
|
-
this._minor = minor;
|
|
38
|
-
this._build = build;
|
|
42
|
+
this._major = major || 0;
|
|
43
|
+
this._minor = minor || 0;
|
|
44
|
+
this._build = build || 0;
|
|
45
|
+
this._revision = revision || 0;
|
|
46
|
+
this._prerelease = prerelease || "";
|
|
39
47
|
}
|
|
40
48
|
}
|
|
49
|
+
static tryParse(version) {
|
|
50
|
+
if (!version) {
|
|
51
|
+
return { success: false };
|
|
52
|
+
}
|
|
53
|
+
let prerelease = "";
|
|
54
|
+
let prereleasePosition = version.indexOf("-");
|
|
55
|
+
if (prereleasePosition === -1) {
|
|
56
|
+
prereleasePosition = version.indexOf("+");
|
|
57
|
+
}
|
|
58
|
+
const isPrerelease = prereleasePosition > 1;
|
|
59
|
+
if (isPrerelease) {
|
|
60
|
+
prerelease = version.substring(prereleasePosition + 1);
|
|
61
|
+
version = version.substring(0, prereleasePosition);
|
|
62
|
+
}
|
|
63
|
+
const parts = version.split(".");
|
|
64
|
+
const length = parts.length;
|
|
65
|
+
if (length < 2 || length > 4) {
|
|
66
|
+
return { success: false };
|
|
67
|
+
}
|
|
68
|
+
const parsedComponents = [];
|
|
69
|
+
// Parse and validate each component
|
|
70
|
+
for (let i = 0; i < length; i++) {
|
|
71
|
+
const component = this.tryParseComponent(parts[i]);
|
|
72
|
+
if (!component.success) {
|
|
73
|
+
return { success: false };
|
|
74
|
+
}
|
|
75
|
+
parsedComponents.push(component.value);
|
|
76
|
+
}
|
|
77
|
+
// Create version based on number of components
|
|
78
|
+
let parsedVersion;
|
|
79
|
+
if (length === 2) {
|
|
80
|
+
parsedVersion = new Version(parsedComponents[0], parsedComponents[1], 0, 0, prerelease);
|
|
81
|
+
}
|
|
82
|
+
else if (length === 3) {
|
|
83
|
+
parsedVersion = new Version(parsedComponents[0], parsedComponents[1], parsedComponents[2], 0, prerelease);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
parsedVersion = new Version(parsedComponents[0], parsedComponents[1], parsedComponents[2], parsedComponents[3], prerelease);
|
|
87
|
+
}
|
|
88
|
+
return { success: true, version: parsedVersion };
|
|
89
|
+
}
|
|
90
|
+
static tryParseComponent(component) {
|
|
91
|
+
const parsed = parseInt(component, 10);
|
|
92
|
+
if (isNaN(parsed) || parsed < 0) {
|
|
93
|
+
return { success: false };
|
|
94
|
+
}
|
|
95
|
+
return { success: true, value: parsed };
|
|
96
|
+
}
|
|
41
97
|
static isVersion(obj) {
|
|
42
98
|
var _a, _b, _c;
|
|
43
99
|
if (obj instanceof Version)
|
|
@@ -52,11 +108,78 @@ class Version extends BaseBusinessObject_1.default {
|
|
|
52
108
|
return false;
|
|
53
109
|
return true;
|
|
54
110
|
}
|
|
111
|
+
get major() {
|
|
112
|
+
return this._major;
|
|
113
|
+
}
|
|
114
|
+
get minor() {
|
|
115
|
+
return this._minor;
|
|
116
|
+
}
|
|
117
|
+
get build() {
|
|
118
|
+
return this._build;
|
|
119
|
+
}
|
|
120
|
+
get revision() {
|
|
121
|
+
return this._revision;
|
|
122
|
+
}
|
|
123
|
+
get prerelease() {
|
|
124
|
+
return this._prerelease;
|
|
125
|
+
}
|
|
126
|
+
static ZERO() {
|
|
127
|
+
return new Version(0, 0, 0);
|
|
128
|
+
}
|
|
129
|
+
isZero() {
|
|
130
|
+
return this._major === 0 && this._minor === 0 && this._build === 0;
|
|
131
|
+
}
|
|
55
132
|
toString() {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
133
|
+
let version = `${this._major.toString()}.${this._minor.toString()}.${this._build.toString()}`;
|
|
134
|
+
if (this._revision > 0) {
|
|
135
|
+
version += `.${this._revision.toString()}`;
|
|
136
|
+
}
|
|
137
|
+
if (this._prerelease) {
|
|
138
|
+
version += `-${this._prerelease}`;
|
|
139
|
+
}
|
|
140
|
+
return version;
|
|
141
|
+
}
|
|
142
|
+
//#region Comparison Methods
|
|
143
|
+
compare(other) {
|
|
144
|
+
if (this._major !== other._major) {
|
|
145
|
+
return this._major - other._major;
|
|
146
|
+
}
|
|
147
|
+
if (this._minor !== other._minor) {
|
|
148
|
+
return this._minor - other._minor;
|
|
149
|
+
}
|
|
150
|
+
if (this._build !== other._build) {
|
|
151
|
+
return this._build - other._build;
|
|
152
|
+
}
|
|
153
|
+
if (this._revision !== other._revision) {
|
|
154
|
+
return this._revision - other._revision;
|
|
155
|
+
}
|
|
156
|
+
// Handle prerelease comparison
|
|
157
|
+
// Normal versions (no prerelease) are greater than prerelease versions
|
|
158
|
+
if (!this._prerelease && other._prerelease)
|
|
159
|
+
return 1;
|
|
160
|
+
if (this._prerelease && !other._prerelease)
|
|
161
|
+
return -1;
|
|
162
|
+
// Both have prerelease, compare lexicographically
|
|
163
|
+
if (this._prerelease && other._prerelease) {
|
|
164
|
+
return this._prerelease.localeCompare(other._prerelease);
|
|
165
|
+
}
|
|
166
|
+
return 0;
|
|
167
|
+
}
|
|
168
|
+
equals(other) {
|
|
169
|
+
return this.compare(other) === 0;
|
|
170
|
+
}
|
|
171
|
+
lessThan(other) {
|
|
172
|
+
return this.compare(other) < 0;
|
|
173
|
+
}
|
|
174
|
+
greaterThan(other) {
|
|
175
|
+
return this.compare(other) > 0;
|
|
176
|
+
}
|
|
177
|
+
lessThanOrEqual(other) {
|
|
178
|
+
return this.compare(other) <= 0;
|
|
179
|
+
}
|
|
180
|
+
greaterThanOrEqual(other) {
|
|
181
|
+
return this.compare(other) >= 0;
|
|
59
182
|
}
|
|
60
183
|
}
|
|
61
|
-
Version.VERSION_PATTERN = /^\d
|
|
184
|
+
Version.VERSION_PATTERN = /^\d+(\.\d+){1,3}([-+].+)?$/; // Pattern for version strings with optional prerelease/metadata
|
|
62
185
|
exports.default = Version;
|
|
@@ -2,6 +2,13 @@ declare enum HeadersContentTypeEnum {
|
|
|
2
2
|
Json = "application/json",
|
|
3
3
|
Text = "text/plain",
|
|
4
4
|
OctetStream = "application/octet-stream",
|
|
5
|
+
Pdf = "application/pdf",
|
|
6
|
+
Csv = "text/csv",
|
|
7
|
+
Excel = "application/vnd.ms-excel",
|
|
8
|
+
ExcelOpenXml = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
9
|
+
Word = "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
10
|
+
Zip = "application/zip",
|
|
11
|
+
Xml = "application/xml",
|
|
5
12
|
Null = "null"
|
|
6
13
|
}
|
|
7
14
|
export default HeadersContentTypeEnum;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadersContentTypeEnum.d.ts","sourceRoot":"","sources":["../../../src/models/enums/HeadersContentTypeEnum.ts"],"names":[],"mappings":"AAAA,aAAK,sBAAsB;IACzB,IAAI,qBAAqB;IACzB,IAAI,eAAe;IACnB,WAAW,6BAA6B;IACxC,IAAI,SAAS;CACd;AAED,eAAe,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"HeadersContentTypeEnum.d.ts","sourceRoot":"","sources":["../../../src/models/enums/HeadersContentTypeEnum.ts"],"names":[],"mappings":"AAAA,aAAK,sBAAsB;IACzB,IAAI,qBAAqB;IACzB,IAAI,eAAe;IACnB,WAAW,6BAA6B;IACxC,GAAG,oBAAoB;IACvB,GAAG,aAAa;IAChB,KAAK,6BAA6B;IAClC,YAAY,sEAAsE;IAClF,IAAI,4EAA4E;IAChF,GAAG,oBAAoB;IACvB,GAAG,oBAAoB;IACvB,IAAI,SAAS;CACd;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -5,6 +5,13 @@ var HeadersContentTypeEnum;
|
|
|
5
5
|
HeadersContentTypeEnum["Json"] = "application/json";
|
|
6
6
|
HeadersContentTypeEnum["Text"] = "text/plain";
|
|
7
7
|
HeadersContentTypeEnum["OctetStream"] = "application/octet-stream";
|
|
8
|
+
HeadersContentTypeEnum["Pdf"] = "application/pdf";
|
|
9
|
+
HeadersContentTypeEnum["Csv"] = "text/csv";
|
|
10
|
+
HeadersContentTypeEnum["Excel"] = "application/vnd.ms-excel";
|
|
11
|
+
HeadersContentTypeEnum["ExcelOpenXml"] = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
12
|
+
HeadersContentTypeEnum["Word"] = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
13
|
+
HeadersContentTypeEnum["Zip"] = "application/zip";
|
|
14
|
+
HeadersContentTypeEnum["Xml"] = "application/xml";
|
|
8
15
|
HeadersContentTypeEnum["Null"] = "null";
|
|
9
16
|
})(HeadersContentTypeEnum || (HeadersContentTypeEnum = {}));
|
|
10
17
|
exports.default = HeadersContentTypeEnum;
|
|
@@ -1,5 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface for AppEngine-specific exceptions that provide structured error information.
|
|
3
|
+
* This interface defines the contract for exceptions thrown by the AppEngine system,
|
|
4
|
+
* following the RFC 7807 Problem Details specification with Title and Detail properties.
|
|
5
|
+
*
|
|
6
|
+
* AppEngineExceptions are typically used for business logic errors, validation failures,
|
|
7
|
+
* and other application-specific error conditions that need to be communicated to the UI
|
|
8
|
+
* with clear, user-friendly information.
|
|
9
|
+
*
|
|
10
|
+
* This interface is designed to work with C# backend services that implement
|
|
11
|
+
* the ProblemDetails standard for consistent error reporting across the application.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const exception: IAppEngineException = {
|
|
16
|
+
* Title: "Validation Error",
|
|
17
|
+
* Detail: "The provided email address is not in a valid format"
|
|
18
|
+
* };
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* // Business logic error
|
|
24
|
+
* const businessError: IAppEngineException = {
|
|
25
|
+
* Title: "Operation Not Allowed",
|
|
26
|
+
* Detail: "Cannot delete a customer that has active orders"
|
|
27
|
+
* };
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
1
30
|
export default interface IAppEngineException {
|
|
31
|
+
/**
|
|
32
|
+
* A short, human-readable summary of the problem.
|
|
33
|
+
* This should be a brief title that describes the general nature of the error
|
|
34
|
+
* without including instance-specific details.
|
|
35
|
+
*
|
|
36
|
+
* The title should be suitable for display in error dialogs, notifications,
|
|
37
|
+
* or as a heading for more detailed error information.
|
|
38
|
+
*
|
|
39
|
+
* @example "Validation Error", "Authorization Failed", "Resource Not Found"
|
|
40
|
+
* @example "Operation Not Allowed", "Configuration Error", "Service Unavailable"
|
|
41
|
+
*/
|
|
2
42
|
Title: string;
|
|
43
|
+
/**
|
|
44
|
+
* A human-readable explanation specific to this occurrence of the problem.
|
|
45
|
+
* This should provide detailed information about what went wrong and,
|
|
46
|
+
* when possible, guidance on how to resolve the issue.
|
|
47
|
+
*
|
|
48
|
+
* The detail should be informative enough for users or developers to understand
|
|
49
|
+
* the specific error condition and take appropriate action.
|
|
50
|
+
*
|
|
51
|
+
* @example "The email field must contain a valid email address format"
|
|
52
|
+
* @example "You do not have permission to access this resource. Please contact your administrator."
|
|
53
|
+
* @example "The customer cannot be deleted because they have 3 active orders. Please cancel or complete the orders first."
|
|
54
|
+
*/
|
|
3
55
|
Detail: string;
|
|
4
56
|
}
|
|
5
57
|
//# sourceMappingURL=IAppEngineException.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAppEngineException.d.ts","sourceRoot":"","sources":["../../../src/models/interfaces/IAppEngineException.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,WAAW,mBAAmB;IAC3C,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"IAppEngineException.d.ts","sourceRoot":"","sources":["../../../src/models/interfaces/IAppEngineException.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,CAAC,OAAO,WAAW,mBAAmB;IAC3C;;;;;;;;;;OAUG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;;;;;;OAWG;IACH,MAAM,EAAE,MAAM,CAAC;CACf"}
|