@keynetra/client 0.1.1

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 (72) hide show
  1. package/README.md +53 -0
  2. package/package.json +26 -0
  3. package/src/apis/AccessApi.ts +326 -0
  4. package/src/apis/AuthApi.ts +193 -0
  5. package/src/apis/DevApi.ts +168 -0
  6. package/src/apis/HealthApi.ts +216 -0
  7. package/src/apis/ManagementApi.ts +2641 -0
  8. package/src/apis/PlaygroundApi.ts +131 -0
  9. package/src/apis/index.ts +8 -0
  10. package/src/index.ts +6 -0
  11. package/src/keynetra-client.ts +35 -0
  12. package/src/models/ACLCreate.ts +111 -0
  13. package/src/models/ACLOut.ts +137 -0
  14. package/src/models/AccessDecisionResponse.ts +115 -0
  15. package/src/models/AccessRequest.ts +106 -0
  16. package/src/models/AdminLoginRequest.ts +75 -0
  17. package/src/models/AdminLoginResponse.ts +100 -0
  18. package/src/models/AuditRecordOut.ts +172 -0
  19. package/src/models/AuthModelCreate.ts +66 -0
  20. package/src/models/AuthModelOut.ts +102 -0
  21. package/src/models/BatchAccessItem.ts +74 -0
  22. package/src/models/BatchAccessRequest.ts +98 -0
  23. package/src/models/BatchAccessResponse.ts +82 -0
  24. package/src/models/BatchAccessResult.ts +83 -0
  25. package/src/models/DataValue.ts +46 -0
  26. package/src/models/HTTPValidationError.ts +73 -0
  27. package/src/models/ImpactAnalysisRequest.ts +66 -0
  28. package/src/models/ImpactAnalysisResponse.ts +73 -0
  29. package/src/models/LocationInner.ts +46 -0
  30. package/src/models/MetaBody.ts +89 -0
  31. package/src/models/PermissionCreate.ts +66 -0
  32. package/src/models/PermissionOut.ts +75 -0
  33. package/src/models/PermissionUpdate.ts +66 -0
  34. package/src/models/PlaygroundEvaluateRequest.ts +90 -0
  35. package/src/models/PlaygroundInput.ts +89 -0
  36. package/src/models/PlaygroundPolicy.ts +98 -0
  37. package/src/models/PolicyCreate.ts +98 -0
  38. package/src/models/PolicyOut.ts +110 -0
  39. package/src/models/PolicySimulationInput.ts +81 -0
  40. package/src/models/PolicySimulationRequest.ts +81 -0
  41. package/src/models/PolicySimulationResponse.ts +75 -0
  42. package/src/models/RelationshipCreate.ts +102 -0
  43. package/src/models/RelationshipOut.ts +111 -0
  44. package/src/models/RoleCreate.ts +66 -0
  45. package/src/models/RoleOut.ts +75 -0
  46. package/src/models/RoleUpdate.ts +66 -0
  47. package/src/models/SimulationResponse.ts +115 -0
  48. package/src/models/SuccessResponseACLOut.ts +97 -0
  49. package/src/models/SuccessResponseAccessDecisionResponse.ts +97 -0
  50. package/src/models/SuccessResponseAdminLoginResponse.ts +97 -0
  51. package/src/models/SuccessResponseAuthModelOut.ts +97 -0
  52. package/src/models/SuccessResponseBatchAccessResponse.ts +97 -0
  53. package/src/models/SuccessResponseDictStrAny.ts +90 -0
  54. package/src/models/SuccessResponseDictStrInt.ts +90 -0
  55. package/src/models/SuccessResponseDictStrObject.ts +90 -0
  56. package/src/models/SuccessResponseDictStrStr.ts +90 -0
  57. package/src/models/SuccessResponseDictStrUnionIntStr.ts +97 -0
  58. package/src/models/SuccessResponseImpactAnalysisResponse.ts +97 -0
  59. package/src/models/SuccessResponseListACLOut.ts +97 -0
  60. package/src/models/SuccessResponseListAuditRecordOut.ts +97 -0
  61. package/src/models/SuccessResponseListDictStrStr.ts +90 -0
  62. package/src/models/SuccessResponseListPermissionOut.ts +97 -0
  63. package/src/models/SuccessResponseListPolicyOut.ts +97 -0
  64. package/src/models/SuccessResponseListRoleOut.ts +97 -0
  65. package/src/models/SuccessResponsePermissionOut.ts +97 -0
  66. package/src/models/SuccessResponsePolicyOut.ts +97 -0
  67. package/src/models/SuccessResponsePolicySimulationResponse.ts +97 -0
  68. package/src/models/SuccessResponseRelationshipOut.ts +97 -0
  69. package/src/models/SuccessResponseSimulationResponse.ts +97 -0
  70. package/src/models/ValidationError.ts +108 -0
  71. package/src/models/index.ts +61 -0
  72. package/src/runtime.ts +450 -0
@@ -0,0 +1,82 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KeyNetra
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.1
8
+ *
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 { mapValues } from '../runtime';
16
+ import type { BatchAccessResult } from './BatchAccessResult';
17
+ import {
18
+ BatchAccessResultFromJSON,
19
+ BatchAccessResultFromJSONTyped,
20
+ BatchAccessResultToJSON,
21
+ BatchAccessResultToJSONTyped,
22
+ } from './BatchAccessResult';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface BatchAccessResponse
28
+ */
29
+ export interface BatchAccessResponse {
30
+ /**
31
+ *
32
+ * @type {Array<BatchAccessResult>}
33
+ * @memberof BatchAccessResponse
34
+ */
35
+ results: Array<BatchAccessResult>;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof BatchAccessResponse
40
+ */
41
+ revision?: number | null;
42
+ }
43
+
44
+ /**
45
+ * Check if a given object implements the BatchAccessResponse interface.
46
+ */
47
+ export function instanceOfBatchAccessResponse(value: object): value is BatchAccessResponse {
48
+ if (!('results' in value) || value['results'] === undefined) return false;
49
+ return true;
50
+ }
51
+
52
+ export function BatchAccessResponseFromJSON(json: any): BatchAccessResponse {
53
+ return BatchAccessResponseFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function BatchAccessResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BatchAccessResponse {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'results': ((json['results'] as Array<any>).map(BatchAccessResultFromJSON)),
63
+ 'revision': json['revision'] == null ? undefined : json['revision'],
64
+ };
65
+ }
66
+
67
+ export function BatchAccessResponseToJSON(json: any): BatchAccessResponse {
68
+ return BatchAccessResponseToJSONTyped(json, false);
69
+ }
70
+
71
+ export function BatchAccessResponseToJSONTyped(value?: BatchAccessResponse | null, ignoreDiscriminator: boolean = false): any {
72
+ if (value == null) {
73
+ return value;
74
+ }
75
+
76
+ return {
77
+
78
+ 'results': ((value['results'] as Array<any>).map(BatchAccessResultToJSON)),
79
+ 'revision': value['revision'],
80
+ };
81
+ }
82
+
@@ -0,0 +1,83 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KeyNetra
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.1
8
+ *
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 { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface BatchAccessResult
20
+ */
21
+ export interface BatchAccessResult {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof BatchAccessResult
26
+ */
27
+ action: string;
28
+ /**
29
+ *
30
+ * @type {boolean}
31
+ * @memberof BatchAccessResult
32
+ */
33
+ allowed: boolean;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof BatchAccessResult
38
+ */
39
+ revision?: number | null;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the BatchAccessResult interface.
44
+ */
45
+ export function instanceOfBatchAccessResult(value: object): value is BatchAccessResult {
46
+ if (!('action' in value) || value['action'] === undefined) return false;
47
+ if (!('allowed' in value) || value['allowed'] === undefined) return false;
48
+ return true;
49
+ }
50
+
51
+ export function BatchAccessResultFromJSON(json: any): BatchAccessResult {
52
+ return BatchAccessResultFromJSONTyped(json, false);
53
+ }
54
+
55
+ export function BatchAccessResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): BatchAccessResult {
56
+ if (json == null) {
57
+ return json;
58
+ }
59
+ return {
60
+
61
+ 'action': json['action'],
62
+ 'allowed': json['allowed'],
63
+ 'revision': json['revision'] == null ? undefined : json['revision'],
64
+ };
65
+ }
66
+
67
+ export function BatchAccessResultToJSON(json: any): BatchAccessResult {
68
+ return BatchAccessResultToJSONTyped(json, false);
69
+ }
70
+
71
+ export function BatchAccessResultToJSONTyped(value?: BatchAccessResult | null, ignoreDiscriminator: boolean = false): any {
72
+ if (value == null) {
73
+ return value;
74
+ }
75
+
76
+ return {
77
+
78
+ 'action': value['action'],
79
+ 'allowed': value['allowed'],
80
+ 'revision': value['revision'],
81
+ };
82
+ }
83
+
@@ -0,0 +1,46 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KeyNetra
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.1
8
+ *
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 { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface DataValue
20
+ */
21
+ export interface DataValue {
22
+ }
23
+
24
+ /**
25
+ * Check if a given object implements the DataValue interface.
26
+ */
27
+ export function instanceOfDataValue(value: object): value is DataValue {
28
+ return true;
29
+ }
30
+
31
+ export function DataValueFromJSON(json: any): DataValue {
32
+ return DataValueFromJSONTyped(json, false);
33
+ }
34
+
35
+ export function DataValueFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataValue {
36
+ return json;
37
+ }
38
+
39
+ export function DataValueToJSON(json: any): DataValue {
40
+ return DataValueToJSONTyped(json, false);
41
+ }
42
+
43
+ export function DataValueToJSONTyped(value?: DataValue | null, ignoreDiscriminator: boolean = false): any {
44
+ return value;
45
+ }
46
+
@@ -0,0 +1,73 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KeyNetra
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.1
8
+ *
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 { mapValues } from '../runtime';
16
+ import type { ValidationError } from './ValidationError';
17
+ import {
18
+ ValidationErrorFromJSON,
19
+ ValidationErrorFromJSONTyped,
20
+ ValidationErrorToJSON,
21
+ ValidationErrorToJSONTyped,
22
+ } from './ValidationError';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface HTTPValidationError
28
+ */
29
+ export interface HTTPValidationError {
30
+ /**
31
+ *
32
+ * @type {Array<ValidationError>}
33
+ * @memberof HTTPValidationError
34
+ */
35
+ detail?: Array<ValidationError>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the HTTPValidationError interface.
40
+ */
41
+ export function instanceOfHTTPValidationError(value: object): value is HTTPValidationError {
42
+ return true;
43
+ }
44
+
45
+ export function HTTPValidationErrorFromJSON(json: any): HTTPValidationError {
46
+ return HTTPValidationErrorFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function HTTPValidationErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): HTTPValidationError {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'detail': json['detail'] == null ? undefined : ((json['detail'] as Array<any>).map(ValidationErrorFromJSON)),
56
+ };
57
+ }
58
+
59
+ export function HTTPValidationErrorToJSON(json: any): HTTPValidationError {
60
+ return HTTPValidationErrorToJSONTyped(json, false);
61
+ }
62
+
63
+ export function HTTPValidationErrorToJSONTyped(value?: HTTPValidationError | null, ignoreDiscriminator: boolean = false): any {
64
+ if (value == null) {
65
+ return value;
66
+ }
67
+
68
+ return {
69
+
70
+ 'detail': value['detail'] == null ? undefined : ((value['detail'] as Array<any>).map(ValidationErrorToJSON)),
71
+ };
72
+ }
73
+
@@ -0,0 +1,66 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KeyNetra
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.1
8
+ *
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 { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ImpactAnalysisRequest
20
+ */
21
+ export interface ImpactAnalysisRequest {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ImpactAnalysisRequest
26
+ */
27
+ policyChange: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the ImpactAnalysisRequest interface.
32
+ */
33
+ export function instanceOfImpactAnalysisRequest(value: object): value is ImpactAnalysisRequest {
34
+ if (!('policyChange' in value) || value['policyChange'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function ImpactAnalysisRequestFromJSON(json: any): ImpactAnalysisRequest {
39
+ return ImpactAnalysisRequestFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function ImpactAnalysisRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImpactAnalysisRequest {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'policyChange': json['policy_change'],
49
+ };
50
+ }
51
+
52
+ export function ImpactAnalysisRequestToJSON(json: any): ImpactAnalysisRequest {
53
+ return ImpactAnalysisRequestToJSONTyped(json, false);
54
+ }
55
+
56
+ export function ImpactAnalysisRequestToJSONTyped(value?: ImpactAnalysisRequest | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'policy_change': value['policyChange'],
64
+ };
65
+ }
66
+
@@ -0,0 +1,73 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KeyNetra
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.1
8
+ *
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 { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ImpactAnalysisResponse
20
+ */
21
+ export interface ImpactAnalysisResponse {
22
+ /**
23
+ *
24
+ * @type {Array<number>}
25
+ * @memberof ImpactAnalysisResponse
26
+ */
27
+ gainedAccess?: Array<number>;
28
+ /**
29
+ *
30
+ * @type {Array<number>}
31
+ * @memberof ImpactAnalysisResponse
32
+ */
33
+ lostAccess?: Array<number>;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the ImpactAnalysisResponse interface.
38
+ */
39
+ export function instanceOfImpactAnalysisResponse(value: object): value is ImpactAnalysisResponse {
40
+ return true;
41
+ }
42
+
43
+ export function ImpactAnalysisResponseFromJSON(json: any): ImpactAnalysisResponse {
44
+ return ImpactAnalysisResponseFromJSONTyped(json, false);
45
+ }
46
+
47
+ export function ImpactAnalysisResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImpactAnalysisResponse {
48
+ if (json == null) {
49
+ return json;
50
+ }
51
+ return {
52
+
53
+ 'gainedAccess': json['gained_access'] == null ? undefined : json['gained_access'],
54
+ 'lostAccess': json['lost_access'] == null ? undefined : json['lost_access'],
55
+ };
56
+ }
57
+
58
+ export function ImpactAnalysisResponseToJSON(json: any): ImpactAnalysisResponse {
59
+ return ImpactAnalysisResponseToJSONTyped(json, false);
60
+ }
61
+
62
+ export function ImpactAnalysisResponseToJSONTyped(value?: ImpactAnalysisResponse | null, ignoreDiscriminator: boolean = false): any {
63
+ if (value == null) {
64
+ return value;
65
+ }
66
+
67
+ return {
68
+
69
+ 'gained_access': value['gainedAccess'],
70
+ 'lost_access': value['lostAccess'],
71
+ };
72
+ }
73
+
@@ -0,0 +1,46 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KeyNetra
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.1
8
+ *
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 { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface LocationInner
20
+ */
21
+ export interface LocationInner {
22
+ }
23
+
24
+ /**
25
+ * Check if a given object implements the LocationInner interface.
26
+ */
27
+ export function instanceOfLocationInner(value: object): value is LocationInner {
28
+ return true;
29
+ }
30
+
31
+ export function LocationInnerFromJSON(json: any): LocationInner {
32
+ return LocationInnerFromJSONTyped(json, false);
33
+ }
34
+
35
+ export function LocationInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): LocationInner {
36
+ return json;
37
+ }
38
+
39
+ export function LocationInnerToJSON(json: any): LocationInner {
40
+ return LocationInnerToJSONTyped(json, false);
41
+ }
42
+
43
+ export function LocationInnerToJSONTyped(value?: LocationInner | null, ignoreDiscriminator: boolean = false): any {
44
+ return value;
45
+ }
46
+
@@ -0,0 +1,89 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KeyNetra
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.1
8
+ *
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 { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface MetaBody
20
+ */
21
+ export interface MetaBody {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof MetaBody
26
+ */
27
+ requestId?: string | null;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof MetaBody
32
+ */
33
+ limit?: number | null;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof MetaBody
38
+ */
39
+ nextCursor?: string | null;
40
+ /**
41
+ *
42
+ * @type {{ [key: string]: any; }}
43
+ * @memberof MetaBody
44
+ */
45
+ extra?: { [key: string]: any; };
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the MetaBody interface.
50
+ */
51
+ export function instanceOfMetaBody(value: object): value is MetaBody {
52
+ return true;
53
+ }
54
+
55
+ export function MetaBodyFromJSON(json: any): MetaBody {
56
+ return MetaBodyFromJSONTyped(json, false);
57
+ }
58
+
59
+ export function MetaBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetaBody {
60
+ if (json == null) {
61
+ return json;
62
+ }
63
+ return {
64
+
65
+ 'requestId': json['request_id'] == null ? undefined : json['request_id'],
66
+ 'limit': json['limit'] == null ? undefined : json['limit'],
67
+ 'nextCursor': json['next_cursor'] == null ? undefined : json['next_cursor'],
68
+ 'extra': json['extra'] == null ? undefined : json['extra'],
69
+ };
70
+ }
71
+
72
+ export function MetaBodyToJSON(json: any): MetaBody {
73
+ return MetaBodyToJSONTyped(json, false);
74
+ }
75
+
76
+ export function MetaBodyToJSONTyped(value?: MetaBody | null, ignoreDiscriminator: boolean = false): any {
77
+ if (value == null) {
78
+ return value;
79
+ }
80
+
81
+ return {
82
+
83
+ 'request_id': value['requestId'],
84
+ 'limit': value['limit'],
85
+ 'next_cursor': value['nextCursor'],
86
+ 'extra': value['extra'],
87
+ };
88
+ }
89
+
@@ -0,0 +1,66 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KeyNetra
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.1
8
+ *
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 { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface PermissionCreate
20
+ */
21
+ export interface PermissionCreate {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof PermissionCreate
26
+ */
27
+ action: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the PermissionCreate interface.
32
+ */
33
+ export function instanceOfPermissionCreate(value: object): value is PermissionCreate {
34
+ if (!('action' in value) || value['action'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function PermissionCreateFromJSON(json: any): PermissionCreate {
39
+ return PermissionCreateFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function PermissionCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): PermissionCreate {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'action': json['action'],
49
+ };
50
+ }
51
+
52
+ export function PermissionCreateToJSON(json: any): PermissionCreate {
53
+ return PermissionCreateToJSONTyped(json, false);
54
+ }
55
+
56
+ export function PermissionCreateToJSONTyped(value?: PermissionCreate | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'action': value['action'],
64
+ };
65
+ }
66
+
@@ -0,0 +1,75 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KeyNetra
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.1
8
+ *
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 { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface PermissionOut
20
+ */
21
+ export interface PermissionOut {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof PermissionOut
26
+ */
27
+ id: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof PermissionOut
32
+ */
33
+ action: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the PermissionOut interface.
38
+ */
39
+ export function instanceOfPermissionOut(value: object): value is PermissionOut {
40
+ if (!('id' in value) || value['id'] === undefined) return false;
41
+ if (!('action' in value) || value['action'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function PermissionOutFromJSON(json: any): PermissionOut {
46
+ return PermissionOutFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function PermissionOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): PermissionOut {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'id': json['id'],
56
+ 'action': json['action'],
57
+ };
58
+ }
59
+
60
+ export function PermissionOutToJSON(json: any): PermissionOut {
61
+ return PermissionOutToJSONTyped(json, false);
62
+ }
63
+
64
+ export function PermissionOutToJSONTyped(value?: PermissionOut | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'id': value['id'],
72
+ 'action': value['action'],
73
+ };
74
+ }
75
+