@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,131 @@
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
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ HTTPValidationError,
19
+ PlaygroundEvaluateRequest,
20
+ SuccessResponseDictStrAny,
21
+ } from '../models/index';
22
+ import {
23
+ HTTPValidationErrorFromJSON,
24
+ HTTPValidationErrorToJSON,
25
+ PlaygroundEvaluateRequestFromJSON,
26
+ PlaygroundEvaluateRequestToJSON,
27
+ SuccessResponseDictStrAnyFromJSON,
28
+ SuccessResponseDictStrAnyToJSON,
29
+ } from '../models/index';
30
+
31
+ export interface EvaluatePlaygroundEvaluatePostRequest {
32
+ playgroundEvaluateRequest: PlaygroundEvaluateRequest;
33
+ }
34
+
35
+ /**
36
+ * PlaygroundApi - interface
37
+ *
38
+ * @export
39
+ * @interface PlaygroundApiInterface
40
+ */
41
+ export interface PlaygroundApiInterface {
42
+ /**
43
+ * Creates request options for evaluatePlaygroundEvaluatePost without sending the request
44
+ * @param {PlaygroundEvaluateRequest} playgroundEvaluateRequest
45
+ * @throws {RequiredError}
46
+ * @memberof PlaygroundApiInterface
47
+ */
48
+ evaluatePlaygroundEvaluatePostRequestOpts(requestParameters: EvaluatePlaygroundEvaluatePostRequest): Promise<runtime.RequestOpts>;
49
+
50
+ /**
51
+ *
52
+ * @summary Evaluate
53
+ * @param {PlaygroundEvaluateRequest} playgroundEvaluateRequest
54
+ * @param {*} [options] Override http request option.
55
+ * @throws {RequiredError}
56
+ * @memberof PlaygroundApiInterface
57
+ */
58
+ evaluatePlaygroundEvaluatePostRaw(requestParameters: EvaluatePlaygroundEvaluatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SuccessResponseDictStrAny>>;
59
+
60
+ /**
61
+ * Evaluate
62
+ */
63
+ evaluatePlaygroundEvaluatePost(requestParameters: EvaluatePlaygroundEvaluatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SuccessResponseDictStrAny>;
64
+
65
+ }
66
+
67
+ /**
68
+ *
69
+ */
70
+ export class PlaygroundApi extends runtime.BaseAPI implements PlaygroundApiInterface {
71
+
72
+ /**
73
+ * Creates request options for evaluatePlaygroundEvaluatePost without sending the request
74
+ */
75
+ async evaluatePlaygroundEvaluatePostRequestOpts(requestParameters: EvaluatePlaygroundEvaluatePostRequest): Promise<runtime.RequestOpts> {
76
+ if (requestParameters['playgroundEvaluateRequest'] == null) {
77
+ throw new runtime.RequiredError(
78
+ 'playgroundEvaluateRequest',
79
+ 'Required parameter "playgroundEvaluateRequest" was null or undefined when calling evaluatePlaygroundEvaluatePost().'
80
+ );
81
+ }
82
+
83
+ const queryParameters: any = {};
84
+
85
+ const headerParameters: runtime.HTTPHeaders = {};
86
+
87
+ headerParameters['Content-Type'] = 'application/json';
88
+
89
+ if (this.configuration && this.configuration.apiKey) {
90
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // APIKeyHeader authentication
91
+ }
92
+
93
+ if (this.configuration && this.configuration.accessToken) {
94
+ const token = this.configuration.accessToken;
95
+ const tokenString = await token("HTTPBearer", []);
96
+
97
+ if (tokenString) {
98
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
99
+ }
100
+ }
101
+
102
+ let urlPath = `/playground/evaluate`;
103
+
104
+ return {
105
+ path: urlPath,
106
+ method: 'POST',
107
+ headers: headerParameters,
108
+ query: queryParameters,
109
+ body: PlaygroundEvaluateRequestToJSON(requestParameters['playgroundEvaluateRequest']),
110
+ };
111
+ }
112
+
113
+ /**
114
+ * Evaluate
115
+ */
116
+ async evaluatePlaygroundEvaluatePostRaw(requestParameters: EvaluatePlaygroundEvaluatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SuccessResponseDictStrAny>> {
117
+ const requestOptions = await this.evaluatePlaygroundEvaluatePostRequestOpts(requestParameters);
118
+ const response = await this.request(requestOptions, initOverrides);
119
+
120
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessResponseDictStrAnyFromJSON(jsonValue));
121
+ }
122
+
123
+ /**
124
+ * Evaluate
125
+ */
126
+ async evaluatePlaygroundEvaluatePost(requestParameters: EvaluatePlaygroundEvaluatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SuccessResponseDictStrAny> {
127
+ const response = await this.evaluatePlaygroundEvaluatePostRaw(requestParameters, initOverrides);
128
+ return await response.value();
129
+ }
130
+
131
+ }
@@ -0,0 +1,8 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './AccessApi';
4
+ export * from './AuthApi';
5
+ export * from './DevApi';
6
+ export * from './HealthApi';
7
+ export * from './ManagementApi';
8
+ export * from './PlaygroundApi';
package/src/index.ts ADDED
@@ -0,0 +1,6 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './runtime';
4
+ export * from './apis/index';
5
+ export * from './models/index';
6
+ export * from './keynetra-client';
@@ -0,0 +1,35 @@
1
+ import {
2
+ Configuration,
3
+ AccessApi,
4
+ AuthApi,
5
+ DevApi,
6
+ HealthApi,
7
+ ManagementApi,
8
+ PlaygroundApi
9
+ } from "./index";
10
+
11
+ export class KeyNetraClient {
12
+ public readonly access: AccessApi;
13
+ public readonly auth: AuthApi;
14
+ public readonly dev: DevApi;
15
+ public readonly health: HealthApi;
16
+ public readonly management: ManagementApi;
17
+ public readonly playground: PlaygroundApi;
18
+
19
+ constructor(options: { baseUrl: string, apiKey: string }) {
20
+ const configuration = new Configuration({
21
+ basePath: options.baseUrl,
22
+ headers: {
23
+ "X-API-Key": options.apiKey,
24
+ Authorization: `Bearer ${options.apiKey}`,
25
+ },
26
+ });
27
+
28
+ this.access = new AccessApi(configuration);
29
+ this.auth = new AuthApi(configuration);
30
+ this.dev = new DevApi(configuration);
31
+ this.health = new HealthApi(configuration);
32
+ this.management = new ManagementApi(configuration);
33
+ this.playground = new PlaygroundApi(configuration);
34
+ }
35
+ }
@@ -0,0 +1,111 @@
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 ACLCreate
20
+ */
21
+ export interface ACLCreate {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ACLCreate
26
+ */
27
+ subjectType: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ACLCreate
32
+ */
33
+ subjectId: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof ACLCreate
38
+ */
39
+ resourceType: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof ACLCreate
44
+ */
45
+ resourceId: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof ACLCreate
50
+ */
51
+ action: string;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof ACLCreate
56
+ */
57
+ effect: string;
58
+ }
59
+
60
+ /**
61
+ * Check if a given object implements the ACLCreate interface.
62
+ */
63
+ export function instanceOfACLCreate(value: object): value is ACLCreate {
64
+ if (!('subjectType' in value) || value['subjectType'] === undefined) return false;
65
+ if (!('subjectId' in value) || value['subjectId'] === undefined) return false;
66
+ if (!('resourceType' in value) || value['resourceType'] === undefined) return false;
67
+ if (!('resourceId' in value) || value['resourceId'] === undefined) return false;
68
+ if (!('action' in value) || value['action'] === undefined) return false;
69
+ if (!('effect' in value) || value['effect'] === undefined) return false;
70
+ return true;
71
+ }
72
+
73
+ export function ACLCreateFromJSON(json: any): ACLCreate {
74
+ return ACLCreateFromJSONTyped(json, false);
75
+ }
76
+
77
+ export function ACLCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ACLCreate {
78
+ if (json == null) {
79
+ return json;
80
+ }
81
+ return {
82
+
83
+ 'subjectType': json['subject_type'],
84
+ 'subjectId': json['subject_id'],
85
+ 'resourceType': json['resource_type'],
86
+ 'resourceId': json['resource_id'],
87
+ 'action': json['action'],
88
+ 'effect': json['effect'],
89
+ };
90
+ }
91
+
92
+ export function ACLCreateToJSON(json: any): ACLCreate {
93
+ return ACLCreateToJSONTyped(json, false);
94
+ }
95
+
96
+ export function ACLCreateToJSONTyped(value?: ACLCreate | null, ignoreDiscriminator: boolean = false): any {
97
+ if (value == null) {
98
+ return value;
99
+ }
100
+
101
+ return {
102
+
103
+ 'subject_type': value['subjectType'],
104
+ 'subject_id': value['subjectId'],
105
+ 'resource_type': value['resourceType'],
106
+ 'resource_id': value['resourceId'],
107
+ 'action': value['action'],
108
+ 'effect': value['effect'],
109
+ };
110
+ }
111
+
@@ -0,0 +1,137 @@
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 ACLOut
20
+ */
21
+ export interface ACLOut {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ACLOut
26
+ */
27
+ subjectType: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ACLOut
32
+ */
33
+ subjectId: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof ACLOut
38
+ */
39
+ resourceType: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof ACLOut
44
+ */
45
+ resourceId: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof ACLOut
50
+ */
51
+ action: string;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof ACLOut
56
+ */
57
+ effect: string;
58
+ /**
59
+ *
60
+ * @type {number}
61
+ * @memberof ACLOut
62
+ */
63
+ id: number;
64
+ /**
65
+ *
66
+ * @type {number}
67
+ * @memberof ACLOut
68
+ */
69
+ tenantId: number;
70
+ /**
71
+ *
72
+ * @type {Date}
73
+ * @memberof ACLOut
74
+ */
75
+ createdAt?: Date | null;
76
+ }
77
+
78
+ /**
79
+ * Check if a given object implements the ACLOut interface.
80
+ */
81
+ export function instanceOfACLOut(value: object): value is ACLOut {
82
+ if (!('subjectType' in value) || value['subjectType'] === undefined) return false;
83
+ if (!('subjectId' in value) || value['subjectId'] === undefined) return false;
84
+ if (!('resourceType' in value) || value['resourceType'] === undefined) return false;
85
+ if (!('resourceId' in value) || value['resourceId'] === undefined) return false;
86
+ if (!('action' in value) || value['action'] === undefined) return false;
87
+ if (!('effect' in value) || value['effect'] === undefined) return false;
88
+ if (!('id' in value) || value['id'] === undefined) return false;
89
+ if (!('tenantId' in value) || value['tenantId'] === undefined) return false;
90
+ return true;
91
+ }
92
+
93
+ export function ACLOutFromJSON(json: any): ACLOut {
94
+ return ACLOutFromJSONTyped(json, false);
95
+ }
96
+
97
+ export function ACLOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): ACLOut {
98
+ if (json == null) {
99
+ return json;
100
+ }
101
+ return {
102
+
103
+ 'subjectType': json['subject_type'],
104
+ 'subjectId': json['subject_id'],
105
+ 'resourceType': json['resource_type'],
106
+ 'resourceId': json['resource_id'],
107
+ 'action': json['action'],
108
+ 'effect': json['effect'],
109
+ 'id': json['id'],
110
+ 'tenantId': json['tenant_id'],
111
+ 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
112
+ };
113
+ }
114
+
115
+ export function ACLOutToJSON(json: any): ACLOut {
116
+ return ACLOutToJSONTyped(json, false);
117
+ }
118
+
119
+ export function ACLOutToJSONTyped(value?: ACLOut | null, ignoreDiscriminator: boolean = false): any {
120
+ if (value == null) {
121
+ return value;
122
+ }
123
+
124
+ return {
125
+
126
+ 'subject_type': value['subjectType'],
127
+ 'subject_id': value['subjectId'],
128
+ 'resource_type': value['resourceType'],
129
+ 'resource_id': value['resourceId'],
130
+ 'action': value['action'],
131
+ 'effect': value['effect'],
132
+ 'id': value['id'],
133
+ 'tenant_id': value['tenantId'],
134
+ 'created_at': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
135
+ };
136
+ }
137
+
@@ -0,0 +1,115 @@
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 AccessDecisionResponse
20
+ */
21
+ export interface AccessDecisionResponse {
22
+ /**
23
+ *
24
+ * @type {boolean}
25
+ * @memberof AccessDecisionResponse
26
+ */
27
+ allowed: boolean;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AccessDecisionResponse
32
+ */
33
+ decision: string;
34
+ /**
35
+ *
36
+ * @type {Array<string>}
37
+ * @memberof AccessDecisionResponse
38
+ */
39
+ matchedPolicies?: Array<string>;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof AccessDecisionResponse
44
+ */
45
+ reason?: string | null;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof AccessDecisionResponse
50
+ */
51
+ policyId?: string | null;
52
+ /**
53
+ *
54
+ * @type {Array<{ [key: string]: any; }>}
55
+ * @memberof AccessDecisionResponse
56
+ */
57
+ explainTrace?: Array<{ [key: string]: any; }>;
58
+ /**
59
+ *
60
+ * @type {number}
61
+ * @memberof AccessDecisionResponse
62
+ */
63
+ revision?: number | null;
64
+ }
65
+
66
+ /**
67
+ * Check if a given object implements the AccessDecisionResponse interface.
68
+ */
69
+ export function instanceOfAccessDecisionResponse(value: object): value is AccessDecisionResponse {
70
+ if (!('allowed' in value) || value['allowed'] === undefined) return false;
71
+ if (!('decision' in value) || value['decision'] === undefined) return false;
72
+ return true;
73
+ }
74
+
75
+ export function AccessDecisionResponseFromJSON(json: any): AccessDecisionResponse {
76
+ return AccessDecisionResponseFromJSONTyped(json, false);
77
+ }
78
+
79
+ export function AccessDecisionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccessDecisionResponse {
80
+ if (json == null) {
81
+ return json;
82
+ }
83
+ return {
84
+
85
+ 'allowed': json['allowed'],
86
+ 'decision': json['decision'],
87
+ 'matchedPolicies': json['matched_policies'] == null ? undefined : json['matched_policies'],
88
+ 'reason': json['reason'] == null ? undefined : json['reason'],
89
+ 'policyId': json['policy_id'] == null ? undefined : json['policy_id'],
90
+ 'explainTrace': json['explain_trace'] == null ? undefined : json['explain_trace'],
91
+ 'revision': json['revision'] == null ? undefined : json['revision'],
92
+ };
93
+ }
94
+
95
+ export function AccessDecisionResponseToJSON(json: any): AccessDecisionResponse {
96
+ return AccessDecisionResponseToJSONTyped(json, false);
97
+ }
98
+
99
+ export function AccessDecisionResponseToJSONTyped(value?: AccessDecisionResponse | null, ignoreDiscriminator: boolean = false): any {
100
+ if (value == null) {
101
+ return value;
102
+ }
103
+
104
+ return {
105
+
106
+ 'allowed': value['allowed'],
107
+ 'decision': value['decision'],
108
+ 'matched_policies': value['matchedPolicies'],
109
+ 'reason': value['reason'],
110
+ 'policy_id': value['policyId'],
111
+ 'explain_trace': value['explainTrace'],
112
+ 'revision': value['revision'],
113
+ };
114
+ }
115
+
@@ -0,0 +1,106 @@
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
+ * Explicit authorization request passed through the API boundary.
18
+ * @export
19
+ * @interface AccessRequest
20
+ */
21
+ export interface AccessRequest {
22
+ /**
23
+ *
24
+ * @type {{ [key: string]: any; }}
25
+ * @memberof AccessRequest
26
+ */
27
+ user?: { [key: string]: any; };
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AccessRequest
32
+ */
33
+ action: string;
34
+ /**
35
+ *
36
+ * @type {{ [key: string]: any; }}
37
+ * @memberof AccessRequest
38
+ */
39
+ resource?: { [key: string]: any; };
40
+ /**
41
+ *
42
+ * @type {{ [key: string]: any; }}
43
+ * @memberof AccessRequest
44
+ */
45
+ context?: { [key: string]: any; };
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof AccessRequest
50
+ */
51
+ consistency?: string;
52
+ /**
53
+ *
54
+ * @type {number}
55
+ * @memberof AccessRequest
56
+ */
57
+ revision?: number | null;
58
+ }
59
+
60
+ /**
61
+ * Check if a given object implements the AccessRequest interface.
62
+ */
63
+ export function instanceOfAccessRequest(value: object): value is AccessRequest {
64
+ if (!('action' in value) || value['action'] === undefined) return false;
65
+ return true;
66
+ }
67
+
68
+ export function AccessRequestFromJSON(json: any): AccessRequest {
69
+ return AccessRequestFromJSONTyped(json, false);
70
+ }
71
+
72
+ export function AccessRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccessRequest {
73
+ if (json == null) {
74
+ return json;
75
+ }
76
+ return {
77
+
78
+ 'user': json['user'] == null ? undefined : json['user'],
79
+ 'action': json['action'],
80
+ 'resource': json['resource'] == null ? undefined : json['resource'],
81
+ 'context': json['context'] == null ? undefined : json['context'],
82
+ 'consistency': json['consistency'] == null ? undefined : json['consistency'],
83
+ 'revision': json['revision'] == null ? undefined : json['revision'],
84
+ };
85
+ }
86
+
87
+ export function AccessRequestToJSON(json: any): AccessRequest {
88
+ return AccessRequestToJSONTyped(json, false);
89
+ }
90
+
91
+ export function AccessRequestToJSONTyped(value?: AccessRequest | null, ignoreDiscriminator: boolean = false): any {
92
+ if (value == null) {
93
+ return value;
94
+ }
95
+
96
+ return {
97
+
98
+ 'user': value['user'],
99
+ 'action': value['action'],
100
+ 'resource': value['resource'],
101
+ 'context': value['context'],
102
+ 'consistency': value['consistency'],
103
+ 'revision': value['revision'],
104
+ };
105
+ }
106
+