@goauthentik/api 2024.2.2-1711369360 → 2024.2.2-1711643691

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.
Files changed (35) hide show
  1. package/.openapi-generator/FILES +2 -0
  2. package/dist/esm/models/FlowImportResult.d.ts +3 -4
  3. package/dist/esm/models/FlowImportResult.js +2 -1
  4. package/dist/esm/models/LogEvent.d.ts +58 -0
  5. package/dist/esm/models/LogEvent.js +56 -0
  6. package/dist/esm/models/LogLevelEnum.d.ts +37 -0
  7. package/dist/esm/models/LogLevelEnum.js +44 -0
  8. package/dist/esm/models/PolicyTestResult.d.ts +3 -4
  9. package/dist/esm/models/PolicyTestResult.js +2 -1
  10. package/dist/esm/models/SystemTask.d.ts +3 -2
  11. package/dist/esm/models/SystemTask.js +3 -2
  12. package/dist/esm/models/Version.d.ts +2 -2
  13. package/dist/esm/models/index.d.ts +2 -0
  14. package/dist/esm/models/index.js +2 -0
  15. package/dist/models/FlowImportResult.d.ts +3 -4
  16. package/dist/models/FlowImportResult.js +2 -1
  17. package/dist/models/LogEvent.d.ts +58 -0
  18. package/dist/models/LogEvent.js +63 -0
  19. package/dist/models/LogLevelEnum.d.ts +37 -0
  20. package/dist/models/LogLevelEnum.js +50 -0
  21. package/dist/models/PolicyTestResult.d.ts +3 -4
  22. package/dist/models/PolicyTestResult.js +2 -1
  23. package/dist/models/SystemTask.d.ts +3 -2
  24. package/dist/models/SystemTask.js +3 -2
  25. package/dist/models/Version.d.ts +2 -2
  26. package/dist/models/index.d.ts +2 -0
  27. package/dist/models/index.js +2 -0
  28. package/package.json +1 -1
  29. package/src/models/FlowImportResult.ts +10 -3
  30. package/src/models/LogEvent.ts +109 -0
  31. package/src/models/LogLevelEnum.ts +52 -0
  32. package/src/models/PolicyTestResult.ts +10 -3
  33. package/src/models/SystemTask.ts +10 -4
  34. package/src/models/Version.ts +2 -2
  35. package/src/models/index.ts +2 -0
@@ -198,6 +198,8 @@ src/models/LicenseForecast.ts
198
198
  src/models/LicenseRequest.ts
199
199
  src/models/LicenseSummary.ts
200
200
  src/models/Link.ts
201
+ src/models/LogEvent.ts
202
+ src/models/LogLevelEnum.ts
201
203
  src/models/LoginChallengeTypes.ts
202
204
  src/models/LoginMetrics.ts
203
205
  src/models/LoginSource.ts
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { LogEvent } from './LogEvent';
12
13
  /**
13
14
  * Logs of an attempted flow import
14
15
  * @export
@@ -17,12 +18,10 @@
17
18
  export interface FlowImportResult {
18
19
  /**
19
20
  *
20
- * @type {Array<{ [key: string]: any; }>}
21
+ * @type {Array<LogEvent>}
21
22
  * @memberof FlowImportResult
22
23
  */
23
- readonly logs: Array<{
24
- [key: string]: any;
25
- }>;
24
+ readonly logs: Array<LogEvent>;
26
25
  /**
27
26
  *
28
27
  * @type {boolean}
@@ -11,6 +11,7 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { LogEventFromJSON, } from './LogEvent';
14
15
  /**
15
16
  * Check if a given object implements the FlowImportResult interface.
16
17
  */
@@ -28,7 +29,7 @@ export function FlowImportResultFromJSONTyped(json, ignoreDiscriminator) {
28
29
  return json;
29
30
  }
30
31
  return {
31
- 'logs': json['logs'],
32
+ 'logs': (json['logs'].map(LogEventFromJSON)),
32
33
  'success': json['success'],
33
34
  };
34
35
  }
@@ -0,0 +1,58 @@
1
+ /**
2
+ * authentik
3
+ * Making authentication simple.
4
+ *
5
+ * The version of the OpenAPI document: 2024.2.2
6
+ * Contact: hello@goauthentik.io
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { LogLevelEnum } from './LogLevelEnum';
13
+ /**
14
+ * Single log message with all context logged.
15
+ * @export
16
+ * @interface LogEvent
17
+ */
18
+ export interface LogEvent {
19
+ /**
20
+ *
21
+ * @type {Date}
22
+ * @memberof LogEvent
23
+ */
24
+ timestamp: Date;
25
+ /**
26
+ *
27
+ * @type {LogLevelEnum}
28
+ * @memberof LogEvent
29
+ */
30
+ logLevel: LogLevelEnum;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof LogEvent
35
+ */
36
+ logger: string;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof LogEvent
41
+ */
42
+ event: string;
43
+ /**
44
+ *
45
+ * @type {{ [key: string]: any; }}
46
+ * @memberof LogEvent
47
+ */
48
+ attributes: {
49
+ [key: string]: any;
50
+ };
51
+ }
52
+ /**
53
+ * Check if a given object implements the LogEvent interface.
54
+ */
55
+ export declare function instanceOfLogEvent(value: object): boolean;
56
+ export declare function LogEventFromJSON(json: any): LogEvent;
57
+ export declare function LogEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): LogEvent;
58
+ export declare function LogEventToJSON(value?: LogEvent | null): any;
@@ -0,0 +1,56 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * authentik
5
+ * Making authentication simple.
6
+ *
7
+ * The version of the OpenAPI document: 2024.2.2
8
+ * Contact: hello@goauthentik.io
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { LogLevelEnumFromJSON, LogLevelEnumToJSON, } from './LogLevelEnum';
15
+ /**
16
+ * Check if a given object implements the LogEvent interface.
17
+ */
18
+ export function instanceOfLogEvent(value) {
19
+ let isInstance = true;
20
+ isInstance = isInstance && "timestamp" in value;
21
+ isInstance = isInstance && "logLevel" in value;
22
+ isInstance = isInstance && "logger" in value;
23
+ isInstance = isInstance && "event" in value;
24
+ isInstance = isInstance && "attributes" in value;
25
+ return isInstance;
26
+ }
27
+ export function LogEventFromJSON(json) {
28
+ return LogEventFromJSONTyped(json, false);
29
+ }
30
+ export function LogEventFromJSONTyped(json, ignoreDiscriminator) {
31
+ if ((json === undefined) || (json === null)) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'timestamp': (new Date(json['timestamp'])),
36
+ 'logLevel': LogLevelEnumFromJSON(json['log_level']),
37
+ 'logger': json['logger'],
38
+ 'event': json['event'],
39
+ 'attributes': json['attributes'],
40
+ };
41
+ }
42
+ export function LogEventToJSON(value) {
43
+ if (value === undefined) {
44
+ return undefined;
45
+ }
46
+ if (value === null) {
47
+ return null;
48
+ }
49
+ return {
50
+ 'timestamp': (value.timestamp.toISOString()),
51
+ 'log_level': LogLevelEnumToJSON(value.logLevel),
52
+ 'logger': value.logger,
53
+ 'event': value.event,
54
+ 'attributes': value.attributes,
55
+ };
56
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * authentik
3
+ * Making authentication simple.
4
+ *
5
+ * The version of the OpenAPI document: 2024.2.2
6
+ * Contact: hello@goauthentik.io
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * * `critical` - critical
14
+ * * `exception` - exception
15
+ * * `error` - error
16
+ * * `warn` - warn
17
+ * * `warning` - warning
18
+ * * `info` - info
19
+ * * `debug` - debug
20
+ * * `notset` - notset
21
+ * @export
22
+ */
23
+ export declare const LogLevelEnum: {
24
+ readonly Critical: "critical";
25
+ readonly Exception: "exception";
26
+ readonly Error: "error";
27
+ readonly Warn: "warn";
28
+ readonly Warning: "warning";
29
+ readonly Info: "info";
30
+ readonly Debug: "debug";
31
+ readonly Notset: "notset";
32
+ readonly UnknownDefaultOpenApi: "11184809";
33
+ };
34
+ export type LogLevelEnum = typeof LogLevelEnum[keyof typeof LogLevelEnum];
35
+ export declare function LogLevelEnumFromJSON(json: any): LogLevelEnum;
36
+ export declare function LogLevelEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): LogLevelEnum;
37
+ export declare function LogLevelEnumToJSON(value?: LogLevelEnum | null): any;
@@ -0,0 +1,44 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * authentik
5
+ * Making authentication simple.
6
+ *
7
+ * The version of the OpenAPI document: 2024.2.2
8
+ * Contact: hello@goauthentik.io
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * * `critical` - critical
16
+ * * `exception` - exception
17
+ * * `error` - error
18
+ * * `warn` - warn
19
+ * * `warning` - warning
20
+ * * `info` - info
21
+ * * `debug` - debug
22
+ * * `notset` - notset
23
+ * @export
24
+ */
25
+ export const LogLevelEnum = {
26
+ Critical: 'critical',
27
+ Exception: 'exception',
28
+ Error: 'error',
29
+ Warn: 'warn',
30
+ Warning: 'warning',
31
+ Info: 'info',
32
+ Debug: 'debug',
33
+ Notset: 'notset',
34
+ UnknownDefaultOpenApi: '11184809'
35
+ };
36
+ export function LogLevelEnumFromJSON(json) {
37
+ return LogLevelEnumFromJSONTyped(json, false);
38
+ }
39
+ export function LogLevelEnumFromJSONTyped(json, ignoreDiscriminator) {
40
+ return json;
41
+ }
42
+ export function LogLevelEnumToJSON(value) {
43
+ return value;
44
+ }
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { LogEvent } from './LogEvent';
12
13
  /**
13
14
  * result of a policy test
14
15
  * @export
@@ -29,12 +30,10 @@ export interface PolicyTestResult {
29
30
  readonly messages: Array<string>;
30
31
  /**
31
32
  *
32
- * @type {Array<{ [key: string]: any; }>}
33
+ * @type {Array<LogEvent>}
33
34
  * @memberof PolicyTestResult
34
35
  */
35
- readonly logMessages: Array<{
36
- [key: string]: any;
37
- }>;
36
+ readonly logMessages: Array<LogEvent>;
38
37
  }
39
38
  /**
40
39
  * Check if a given object implements the PolicyTestResult interface.
@@ -11,6 +11,7 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { LogEventFromJSON, } from './LogEvent';
14
15
  /**
15
16
  * Check if a given object implements the PolicyTestResult interface.
16
17
  */
@@ -31,7 +32,7 @@ export function PolicyTestResultFromJSONTyped(json, ignoreDiscriminator) {
31
32
  return {
32
33
  'passing': json['passing'],
33
34
  'messages': json['messages'],
34
- 'logMessages': json['log_messages'],
35
+ 'logMessages': (json['log_messages'].map(LogEventFromJSON)),
35
36
  };
36
37
  }
37
38
  export function PolicyTestResultToJSON(value) {
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { LogEvent } from './LogEvent';
12
13
  import type { SystemTaskStatusEnum } from './SystemTaskStatusEnum';
13
14
  /**
14
15
  * Serialize TaskInfo and TaskResult
@@ -72,10 +73,10 @@ export interface SystemTask {
72
73
  status: SystemTaskStatusEnum;
73
74
  /**
74
75
  *
75
- * @type {Array<string>}
76
+ * @type {Array<LogEvent>}
76
77
  * @memberof SystemTask
77
78
  */
78
- messages: Array<string>;
79
+ messages: Array<LogEvent>;
79
80
  }
80
81
  /**
81
82
  * Check if a given object implements the SystemTask interface.
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { exists } from '../runtime';
15
+ import { LogEventFromJSON, LogEventToJSON, } from './LogEvent';
15
16
  import { SystemTaskStatusEnumFromJSON, SystemTaskStatusEnumToJSON, } from './SystemTaskStatusEnum';
16
17
  /**
17
18
  * Check if a given object implements the SystemTask interface.
@@ -46,7 +47,7 @@ export function SystemTaskFromJSONTyped(json, ignoreDiscriminator) {
46
47
  'finishTimestamp': (new Date(json['finish_timestamp'])),
47
48
  'duration': json['duration'],
48
49
  'status': SystemTaskStatusEnumFromJSON(json['status']),
49
- 'messages': json['messages'],
50
+ 'messages': (json['messages'].map(LogEventFromJSON)),
50
51
  };
51
52
  }
52
53
  export function SystemTaskToJSON(value) {
@@ -61,6 +62,6 @@ export function SystemTaskToJSON(value) {
61
62
  'uid': value.uid,
62
63
  'description': value.description,
63
64
  'status': SystemTaskStatusEnumToJSON(value.status),
64
- 'messages': value.messages,
65
+ 'messages': (value.messages.map(LogEventToJSON)),
65
66
  };
66
67
  }
@@ -29,10 +29,10 @@ export interface Version {
29
29
  readonly versionLatest: string;
30
30
  /**
31
31
  * Check if latest version is valid
32
- * @type {string}
32
+ * @type {boolean}
33
33
  * @memberof Version
34
34
  */
35
- readonly versionLatestValid: string;
35
+ readonly versionLatestValid: boolean;
36
36
  /**
37
37
  * Get build hash, if version is not latest or released
38
38
  * @type {string}
@@ -171,6 +171,8 @@ export * from './LicenseForecast';
171
171
  export * from './LicenseRequest';
172
172
  export * from './LicenseSummary';
173
173
  export * from './Link';
174
+ export * from './LogEvent';
175
+ export * from './LogLevelEnum';
174
176
  export * from './LoginChallengeTypes';
175
177
  export * from './LoginMetrics';
176
178
  export * from './LoginSource';
@@ -173,6 +173,8 @@ export * from './LicenseForecast';
173
173
  export * from './LicenseRequest';
174
174
  export * from './LicenseSummary';
175
175
  export * from './Link';
176
+ export * from './LogEvent';
177
+ export * from './LogLevelEnum';
176
178
  export * from './LoginChallengeTypes';
177
179
  export * from './LoginMetrics';
178
180
  export * from './LoginSource';
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { LogEvent } from './LogEvent';
12
13
  /**
13
14
  * Logs of an attempted flow import
14
15
  * @export
@@ -17,12 +18,10 @@
17
18
  export interface FlowImportResult {
18
19
  /**
19
20
  *
20
- * @type {Array<{ [key: string]: any; }>}
21
+ * @type {Array<LogEvent>}
21
22
  * @memberof FlowImportResult
22
23
  */
23
- readonly logs: Array<{
24
- [key: string]: any;
25
- }>;
24
+ readonly logs: Array<LogEvent>;
26
25
  /**
27
26
  *
28
27
  * @type {boolean}
@@ -14,6 +14,7 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.FlowImportResultToJSON = exports.FlowImportResultFromJSONTyped = exports.FlowImportResultFromJSON = exports.instanceOfFlowImportResult = void 0;
17
+ const LogEvent_1 = require("./LogEvent");
17
18
  /**
18
19
  * Check if a given object implements the FlowImportResult interface.
19
20
  */
@@ -33,7 +34,7 @@ function FlowImportResultFromJSONTyped(json, ignoreDiscriminator) {
33
34
  return json;
34
35
  }
35
36
  return {
36
- 'logs': json['logs'],
37
+ 'logs': (json['logs'].map(LogEvent_1.LogEventFromJSON)),
37
38
  'success': json['success'],
38
39
  };
39
40
  }
@@ -0,0 +1,58 @@
1
+ /**
2
+ * authentik
3
+ * Making authentication simple.
4
+ *
5
+ * The version of the OpenAPI document: 2024.2.2
6
+ * Contact: hello@goauthentik.io
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { LogLevelEnum } from './LogLevelEnum';
13
+ /**
14
+ * Single log message with all context logged.
15
+ * @export
16
+ * @interface LogEvent
17
+ */
18
+ export interface LogEvent {
19
+ /**
20
+ *
21
+ * @type {Date}
22
+ * @memberof LogEvent
23
+ */
24
+ timestamp: Date;
25
+ /**
26
+ *
27
+ * @type {LogLevelEnum}
28
+ * @memberof LogEvent
29
+ */
30
+ logLevel: LogLevelEnum;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof LogEvent
35
+ */
36
+ logger: string;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof LogEvent
41
+ */
42
+ event: string;
43
+ /**
44
+ *
45
+ * @type {{ [key: string]: any; }}
46
+ * @memberof LogEvent
47
+ */
48
+ attributes: {
49
+ [key: string]: any;
50
+ };
51
+ }
52
+ /**
53
+ * Check if a given object implements the LogEvent interface.
54
+ */
55
+ export declare function instanceOfLogEvent(value: object): boolean;
56
+ export declare function LogEventFromJSON(json: any): LogEvent;
57
+ export declare function LogEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): LogEvent;
58
+ export declare function LogEventToJSON(value?: LogEvent | null): any;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * authentik
6
+ * Making authentication simple.
7
+ *
8
+ * The version of the OpenAPI document: 2024.2.2
9
+ * Contact: hello@goauthentik.io
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.LogEventToJSON = exports.LogEventFromJSONTyped = exports.LogEventFromJSON = exports.instanceOfLogEvent = void 0;
17
+ const LogLevelEnum_1 = require("./LogLevelEnum");
18
+ /**
19
+ * Check if a given object implements the LogEvent interface.
20
+ */
21
+ function instanceOfLogEvent(value) {
22
+ let isInstance = true;
23
+ isInstance = isInstance && "timestamp" in value;
24
+ isInstance = isInstance && "logLevel" in value;
25
+ isInstance = isInstance && "logger" in value;
26
+ isInstance = isInstance && "event" in value;
27
+ isInstance = isInstance && "attributes" in value;
28
+ return isInstance;
29
+ }
30
+ exports.instanceOfLogEvent = instanceOfLogEvent;
31
+ function LogEventFromJSON(json) {
32
+ return LogEventFromJSONTyped(json, false);
33
+ }
34
+ exports.LogEventFromJSON = LogEventFromJSON;
35
+ function LogEventFromJSONTyped(json, ignoreDiscriminator) {
36
+ if ((json === undefined) || (json === null)) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'timestamp': (new Date(json['timestamp'])),
41
+ 'logLevel': (0, LogLevelEnum_1.LogLevelEnumFromJSON)(json['log_level']),
42
+ 'logger': json['logger'],
43
+ 'event': json['event'],
44
+ 'attributes': json['attributes'],
45
+ };
46
+ }
47
+ exports.LogEventFromJSONTyped = LogEventFromJSONTyped;
48
+ function LogEventToJSON(value) {
49
+ if (value === undefined) {
50
+ return undefined;
51
+ }
52
+ if (value === null) {
53
+ return null;
54
+ }
55
+ return {
56
+ 'timestamp': (value.timestamp.toISOString()),
57
+ 'log_level': (0, LogLevelEnum_1.LogLevelEnumToJSON)(value.logLevel),
58
+ 'logger': value.logger,
59
+ 'event': value.event,
60
+ 'attributes': value.attributes,
61
+ };
62
+ }
63
+ exports.LogEventToJSON = LogEventToJSON;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * authentik
3
+ * Making authentication simple.
4
+ *
5
+ * The version of the OpenAPI document: 2024.2.2
6
+ * Contact: hello@goauthentik.io
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * * `critical` - critical
14
+ * * `exception` - exception
15
+ * * `error` - error
16
+ * * `warn` - warn
17
+ * * `warning` - warning
18
+ * * `info` - info
19
+ * * `debug` - debug
20
+ * * `notset` - notset
21
+ * @export
22
+ */
23
+ export declare const LogLevelEnum: {
24
+ readonly Critical: "critical";
25
+ readonly Exception: "exception";
26
+ readonly Error: "error";
27
+ readonly Warn: "warn";
28
+ readonly Warning: "warning";
29
+ readonly Info: "info";
30
+ readonly Debug: "debug";
31
+ readonly Notset: "notset";
32
+ readonly UnknownDefaultOpenApi: "11184809";
33
+ };
34
+ export type LogLevelEnum = typeof LogLevelEnum[keyof typeof LogLevelEnum];
35
+ export declare function LogLevelEnumFromJSON(json: any): LogLevelEnum;
36
+ export declare function LogLevelEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): LogLevelEnum;
37
+ export declare function LogLevelEnumToJSON(value?: LogLevelEnum | null): any;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * authentik
6
+ * Making authentication simple.
7
+ *
8
+ * The version of the OpenAPI document: 2024.2.2
9
+ * Contact: hello@goauthentik.io
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.LogLevelEnumToJSON = exports.LogLevelEnumFromJSONTyped = exports.LogLevelEnumFromJSON = exports.LogLevelEnum = void 0;
17
+ /**
18
+ * * `critical` - critical
19
+ * * `exception` - exception
20
+ * * `error` - error
21
+ * * `warn` - warn
22
+ * * `warning` - warning
23
+ * * `info` - info
24
+ * * `debug` - debug
25
+ * * `notset` - notset
26
+ * @export
27
+ */
28
+ exports.LogLevelEnum = {
29
+ Critical: 'critical',
30
+ Exception: 'exception',
31
+ Error: 'error',
32
+ Warn: 'warn',
33
+ Warning: 'warning',
34
+ Info: 'info',
35
+ Debug: 'debug',
36
+ Notset: 'notset',
37
+ UnknownDefaultOpenApi: '11184809'
38
+ };
39
+ function LogLevelEnumFromJSON(json) {
40
+ return LogLevelEnumFromJSONTyped(json, false);
41
+ }
42
+ exports.LogLevelEnumFromJSON = LogLevelEnumFromJSON;
43
+ function LogLevelEnumFromJSONTyped(json, ignoreDiscriminator) {
44
+ return json;
45
+ }
46
+ exports.LogLevelEnumFromJSONTyped = LogLevelEnumFromJSONTyped;
47
+ function LogLevelEnumToJSON(value) {
48
+ return value;
49
+ }
50
+ exports.LogLevelEnumToJSON = LogLevelEnumToJSON;
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { LogEvent } from './LogEvent';
12
13
  /**
13
14
  * result of a policy test
14
15
  * @export
@@ -29,12 +30,10 @@ export interface PolicyTestResult {
29
30
  readonly messages: Array<string>;
30
31
  /**
31
32
  *
32
- * @type {Array<{ [key: string]: any; }>}
33
+ * @type {Array<LogEvent>}
33
34
  * @memberof PolicyTestResult
34
35
  */
35
- readonly logMessages: Array<{
36
- [key: string]: any;
37
- }>;
36
+ readonly logMessages: Array<LogEvent>;
38
37
  }
39
38
  /**
40
39
  * Check if a given object implements the PolicyTestResult interface.
@@ -14,6 +14,7 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.PolicyTestResultToJSON = exports.PolicyTestResultFromJSONTyped = exports.PolicyTestResultFromJSON = exports.instanceOfPolicyTestResult = void 0;
17
+ const LogEvent_1 = require("./LogEvent");
17
18
  /**
18
19
  * Check if a given object implements the PolicyTestResult interface.
19
20
  */
@@ -36,7 +37,7 @@ function PolicyTestResultFromJSONTyped(json, ignoreDiscriminator) {
36
37
  return {
37
38
  'passing': json['passing'],
38
39
  'messages': json['messages'],
39
- 'logMessages': json['log_messages'],
40
+ 'logMessages': (json['log_messages'].map(LogEvent_1.LogEventFromJSON)),
40
41
  };
41
42
  }
42
43
  exports.PolicyTestResultFromJSONTyped = PolicyTestResultFromJSONTyped;
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { LogEvent } from './LogEvent';
12
13
  import type { SystemTaskStatusEnum } from './SystemTaskStatusEnum';
13
14
  /**
14
15
  * Serialize TaskInfo and TaskResult
@@ -72,10 +73,10 @@ export interface SystemTask {
72
73
  status: SystemTaskStatusEnum;
73
74
  /**
74
75
  *
75
- * @type {Array<string>}
76
+ * @type {Array<LogEvent>}
76
77
  * @memberof SystemTask
77
78
  */
78
- messages: Array<string>;
79
+ messages: Array<LogEvent>;
79
80
  }
80
81
  /**
81
82
  * Check if a given object implements the SystemTask interface.
@@ -15,6 +15,7 @@
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.SystemTaskToJSON = exports.SystemTaskFromJSONTyped = exports.SystemTaskFromJSON = exports.instanceOfSystemTask = void 0;
17
17
  const runtime_1 = require("../runtime");
18
+ const LogEvent_1 = require("./LogEvent");
18
19
  const SystemTaskStatusEnum_1 = require("./SystemTaskStatusEnum");
19
20
  /**
20
21
  * Check if a given object implements the SystemTask interface.
@@ -51,7 +52,7 @@ function SystemTaskFromJSONTyped(json, ignoreDiscriminator) {
51
52
  'finishTimestamp': (new Date(json['finish_timestamp'])),
52
53
  'duration': json['duration'],
53
54
  'status': (0, SystemTaskStatusEnum_1.SystemTaskStatusEnumFromJSON)(json['status']),
54
- 'messages': json['messages'],
55
+ 'messages': (json['messages'].map(LogEvent_1.LogEventFromJSON)),
55
56
  };
56
57
  }
57
58
  exports.SystemTaskFromJSONTyped = SystemTaskFromJSONTyped;
@@ -67,7 +68,7 @@ function SystemTaskToJSON(value) {
67
68
  'uid': value.uid,
68
69
  'description': value.description,
69
70
  'status': (0, SystemTaskStatusEnum_1.SystemTaskStatusEnumToJSON)(value.status),
70
- 'messages': value.messages,
71
+ 'messages': (value.messages.map(LogEvent_1.LogEventToJSON)),
71
72
  };
72
73
  }
73
74
  exports.SystemTaskToJSON = SystemTaskToJSON;
@@ -29,10 +29,10 @@ export interface Version {
29
29
  readonly versionLatest: string;
30
30
  /**
31
31
  * Check if latest version is valid
32
- * @type {string}
32
+ * @type {boolean}
33
33
  * @memberof Version
34
34
  */
35
- readonly versionLatestValid: string;
35
+ readonly versionLatestValid: boolean;
36
36
  /**
37
37
  * Get build hash, if version is not latest or released
38
38
  * @type {string}
@@ -171,6 +171,8 @@ export * from './LicenseForecast';
171
171
  export * from './LicenseRequest';
172
172
  export * from './LicenseSummary';
173
173
  export * from './Link';
174
+ export * from './LogEvent';
175
+ export * from './LogLevelEnum';
174
176
  export * from './LoginChallengeTypes';
175
177
  export * from './LoginMetrics';
176
178
  export * from './LoginSource';
@@ -189,6 +189,8 @@ __exportStar(require("./LicenseForecast"), exports);
189
189
  __exportStar(require("./LicenseRequest"), exports);
190
190
  __exportStar(require("./LicenseSummary"), exports);
191
191
  __exportStar(require("./Link"), exports);
192
+ __exportStar(require("./LogEvent"), exports);
193
+ __exportStar(require("./LogLevelEnum"), exports);
192
194
  __exportStar(require("./LoginChallengeTypes"), exports);
193
195
  __exportStar(require("./LoginMetrics"), exports);
194
196
  __exportStar(require("./LoginSource"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goauthentik/api",
3
- "version": "2024.2.2-1711369360",
3
+ "version": "2024.2.2-1711643691",
4
4
  "description": "OpenAPI client for @goauthentik/api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -13,6 +13,13 @@
13
13
  */
14
14
 
15
15
  import { exists, mapValues } from '../runtime';
16
+ import type { LogEvent } from './LogEvent';
17
+ import {
18
+ LogEventFromJSON,
19
+ LogEventFromJSONTyped,
20
+ LogEventToJSON,
21
+ } from './LogEvent';
22
+
16
23
  /**
17
24
  * Logs of an attempted flow import
18
25
  * @export
@@ -21,10 +28,10 @@ import { exists, mapValues } from '../runtime';
21
28
  export interface FlowImportResult {
22
29
  /**
23
30
  *
24
- * @type {Array<{ [key: string]: any; }>}
31
+ * @type {Array<LogEvent>}
25
32
  * @memberof FlowImportResult
26
33
  */
27
- readonly logs: Array<{ [key: string]: any; }>;
34
+ readonly logs: Array<LogEvent>;
28
35
  /**
29
36
  *
30
37
  * @type {boolean}
@@ -54,7 +61,7 @@ export function FlowImportResultFromJSONTyped(json: any, ignoreDiscriminator: bo
54
61
  }
55
62
  return {
56
63
 
57
- 'logs': json['logs'],
64
+ 'logs': ((json['logs'] as Array<any>).map(LogEventFromJSON)),
58
65
  'success': json['success'],
59
66
  };
60
67
  }
@@ -0,0 +1,109 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * authentik
5
+ * Making authentication simple.
6
+ *
7
+ * The version of the OpenAPI document: 2024.2.2
8
+ * Contact: hello@goauthentik.io
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ import type { LogLevelEnum } from './LogLevelEnum';
17
+ import {
18
+ LogLevelEnumFromJSON,
19
+ LogLevelEnumFromJSONTyped,
20
+ LogLevelEnumToJSON,
21
+ } from './LogLevelEnum';
22
+
23
+ /**
24
+ * Single log message with all context logged.
25
+ * @export
26
+ * @interface LogEvent
27
+ */
28
+ export interface LogEvent {
29
+ /**
30
+ *
31
+ * @type {Date}
32
+ * @memberof LogEvent
33
+ */
34
+ timestamp: Date;
35
+ /**
36
+ *
37
+ * @type {LogLevelEnum}
38
+ * @memberof LogEvent
39
+ */
40
+ logLevel: LogLevelEnum;
41
+ /**
42
+ *
43
+ * @type {string}
44
+ * @memberof LogEvent
45
+ */
46
+ logger: string;
47
+ /**
48
+ *
49
+ * @type {string}
50
+ * @memberof LogEvent
51
+ */
52
+ event: string;
53
+ /**
54
+ *
55
+ * @type {{ [key: string]: any; }}
56
+ * @memberof LogEvent
57
+ */
58
+ attributes: { [key: string]: any; };
59
+ }
60
+
61
+ /**
62
+ * Check if a given object implements the LogEvent interface.
63
+ */
64
+ export function instanceOfLogEvent(value: object): boolean {
65
+ let isInstance = true;
66
+ isInstance = isInstance && "timestamp" in value;
67
+ isInstance = isInstance && "logLevel" in value;
68
+ isInstance = isInstance && "logger" in value;
69
+ isInstance = isInstance && "event" in value;
70
+ isInstance = isInstance && "attributes" in value;
71
+
72
+ return isInstance;
73
+ }
74
+
75
+ export function LogEventFromJSON(json: any): LogEvent {
76
+ return LogEventFromJSONTyped(json, false);
77
+ }
78
+
79
+ export function LogEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): LogEvent {
80
+ if ((json === undefined) || (json === null)) {
81
+ return json;
82
+ }
83
+ return {
84
+
85
+ 'timestamp': (new Date(json['timestamp'])),
86
+ 'logLevel': LogLevelEnumFromJSON(json['log_level']),
87
+ 'logger': json['logger'],
88
+ 'event': json['event'],
89
+ 'attributes': json['attributes'],
90
+ };
91
+ }
92
+
93
+ export function LogEventToJSON(value?: LogEvent | null): any {
94
+ if (value === undefined) {
95
+ return undefined;
96
+ }
97
+ if (value === null) {
98
+ return null;
99
+ }
100
+ return {
101
+
102
+ 'timestamp': (value.timestamp.toISOString()),
103
+ 'log_level': LogLevelEnumToJSON(value.logLevel),
104
+ 'logger': value.logger,
105
+ 'event': value.event,
106
+ 'attributes': value.attributes,
107
+ };
108
+ }
109
+
@@ -0,0 +1,52 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * authentik
5
+ * Making authentication simple.
6
+ *
7
+ * The version of the OpenAPI document: 2024.2.2
8
+ * Contact: hello@goauthentik.io
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ /**
17
+ * * `critical` - critical
18
+ * * `exception` - exception
19
+ * * `error` - error
20
+ * * `warn` - warn
21
+ * * `warning` - warning
22
+ * * `info` - info
23
+ * * `debug` - debug
24
+ * * `notset` - notset
25
+ * @export
26
+ */
27
+ export const LogLevelEnum = {
28
+ Critical: 'critical',
29
+ Exception: 'exception',
30
+ Error: 'error',
31
+ Warn: 'warn',
32
+ Warning: 'warning',
33
+ Info: 'info',
34
+ Debug: 'debug',
35
+ Notset: 'notset',
36
+ UnknownDefaultOpenApi: '11184809'
37
+ } as const;
38
+ export type LogLevelEnum = typeof LogLevelEnum[keyof typeof LogLevelEnum];
39
+
40
+
41
+ export function LogLevelEnumFromJSON(json: any): LogLevelEnum {
42
+ return LogLevelEnumFromJSONTyped(json, false);
43
+ }
44
+
45
+ export function LogLevelEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): LogLevelEnum {
46
+ return json as LogLevelEnum;
47
+ }
48
+
49
+ export function LogLevelEnumToJSON(value?: LogLevelEnum | null): any {
50
+ return value as any;
51
+ }
52
+
@@ -13,6 +13,13 @@
13
13
  */
14
14
 
15
15
  import { exists, mapValues } from '../runtime';
16
+ import type { LogEvent } from './LogEvent';
17
+ import {
18
+ LogEventFromJSON,
19
+ LogEventFromJSONTyped,
20
+ LogEventToJSON,
21
+ } from './LogEvent';
22
+
16
23
  /**
17
24
  * result of a policy test
18
25
  * @export
@@ -33,10 +40,10 @@ export interface PolicyTestResult {
33
40
  readonly messages: Array<string>;
34
41
  /**
35
42
  *
36
- * @type {Array<{ [key: string]: any; }>}
43
+ * @type {Array<LogEvent>}
37
44
  * @memberof PolicyTestResult
38
45
  */
39
- readonly logMessages: Array<{ [key: string]: any; }>;
46
+ readonly logMessages: Array<LogEvent>;
40
47
  }
41
48
 
42
49
  /**
@@ -63,7 +70,7 @@ export function PolicyTestResultFromJSONTyped(json: any, ignoreDiscriminator: bo
63
70
 
64
71
  'passing': json['passing'],
65
72
  'messages': json['messages'],
66
- 'logMessages': json['log_messages'],
73
+ 'logMessages': ((json['log_messages'] as Array<any>).map(LogEventFromJSON)),
67
74
  };
68
75
  }
69
76
 
@@ -13,6 +13,12 @@
13
13
  */
14
14
 
15
15
  import { exists, mapValues } from '../runtime';
16
+ import type { LogEvent } from './LogEvent';
17
+ import {
18
+ LogEventFromJSON,
19
+ LogEventFromJSONTyped,
20
+ LogEventToJSON,
21
+ } from './LogEvent';
16
22
  import type { SystemTaskStatusEnum } from './SystemTaskStatusEnum';
17
23
  import {
18
24
  SystemTaskStatusEnumFromJSON,
@@ -82,10 +88,10 @@ export interface SystemTask {
82
88
  status: SystemTaskStatusEnum;
83
89
  /**
84
90
  *
85
- * @type {Array<string>}
91
+ * @type {Array<LogEvent>}
86
92
  * @memberof SystemTask
87
93
  */
88
- messages: Array<string>;
94
+ messages: Array<LogEvent>;
89
95
  }
90
96
 
91
97
  /**
@@ -125,7 +131,7 @@ export function SystemTaskFromJSONTyped(json: any, ignoreDiscriminator: boolean)
125
131
  'finishTimestamp': (new Date(json['finish_timestamp'])),
126
132
  'duration': json['duration'],
127
133
  'status': SystemTaskStatusEnumFromJSON(json['status']),
128
- 'messages': json['messages'],
134
+ 'messages': ((json['messages'] as Array<any>).map(LogEventFromJSON)),
129
135
  };
130
136
  }
131
137
 
@@ -142,7 +148,7 @@ export function SystemTaskToJSON(value?: SystemTask | null): any {
142
148
  'uid': value.uid,
143
149
  'description': value.description,
144
150
  'status': SystemTaskStatusEnumToJSON(value.status),
145
- 'messages': value.messages,
151
+ 'messages': ((value.messages as Array<any>).map(LogEventToJSON)),
146
152
  };
147
153
  }
148
154
 
@@ -33,10 +33,10 @@ export interface Version {
33
33
  readonly versionLatest: string;
34
34
  /**
35
35
  * Check if latest version is valid
36
- * @type {string}
36
+ * @type {boolean}
37
37
  * @memberof Version
38
38
  */
39
- readonly versionLatestValid: string;
39
+ readonly versionLatestValid: boolean;
40
40
  /**
41
41
  * Get build hash, if version is not latest or released
42
42
  * @type {string}
@@ -173,6 +173,8 @@ export * from './LicenseForecast';
173
173
  export * from './LicenseRequest';
174
174
  export * from './LicenseSummary';
175
175
  export * from './Link';
176
+ export * from './LogEvent';
177
+ export * from './LogLevelEnum';
176
178
  export * from './LoginChallengeTypes';
177
179
  export * from './LoginMetrics';
178
180
  export * from './LoginSource';