@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,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 AdminLoginRequest
20
+ */
21
+ export interface AdminLoginRequest {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof AdminLoginRequest
26
+ */
27
+ username: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AdminLoginRequest
32
+ */
33
+ password: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the AdminLoginRequest interface.
38
+ */
39
+ export function instanceOfAdminLoginRequest(value: object): value is AdminLoginRequest {
40
+ if (!('username' in value) || value['username'] === undefined) return false;
41
+ if (!('password' in value) || value['password'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function AdminLoginRequestFromJSON(json: any): AdminLoginRequest {
46
+ return AdminLoginRequestFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function AdminLoginRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminLoginRequest {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'username': json['username'],
56
+ 'password': json['password'],
57
+ };
58
+ }
59
+
60
+ export function AdminLoginRequestToJSON(json: any): AdminLoginRequest {
61
+ return AdminLoginRequestToJSONTyped(json, false);
62
+ }
63
+
64
+ export function AdminLoginRequestToJSONTyped(value?: AdminLoginRequest | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'username': value['username'],
72
+ 'password': value['password'],
73
+ };
74
+ }
75
+
@@ -0,0 +1,100 @@
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 AdminLoginResponse
20
+ */
21
+ export interface AdminLoginResponse {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof AdminLoginResponse
26
+ */
27
+ accessToken: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AdminLoginResponse
32
+ */
33
+ tokenType?: string;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof AdminLoginResponse
38
+ */
39
+ expiresIn: number;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof AdminLoginResponse
44
+ */
45
+ role?: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof AdminLoginResponse
50
+ */
51
+ tenantKey: string;
52
+ }
53
+
54
+ /**
55
+ * Check if a given object implements the AdminLoginResponse interface.
56
+ */
57
+ export function instanceOfAdminLoginResponse(value: object): value is AdminLoginResponse {
58
+ if (!('accessToken' in value) || value['accessToken'] === undefined) return false;
59
+ if (!('expiresIn' in value) || value['expiresIn'] === undefined) return false;
60
+ if (!('tenantKey' in value) || value['tenantKey'] === undefined) return false;
61
+ return true;
62
+ }
63
+
64
+ export function AdminLoginResponseFromJSON(json: any): AdminLoginResponse {
65
+ return AdminLoginResponseFromJSONTyped(json, false);
66
+ }
67
+
68
+ export function AdminLoginResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminLoginResponse {
69
+ if (json == null) {
70
+ return json;
71
+ }
72
+ return {
73
+
74
+ 'accessToken': json['access_token'],
75
+ 'tokenType': json['token_type'] == null ? undefined : json['token_type'],
76
+ 'expiresIn': json['expires_in'],
77
+ 'role': json['role'] == null ? undefined : json['role'],
78
+ 'tenantKey': json['tenant_key'],
79
+ };
80
+ }
81
+
82
+ export function AdminLoginResponseToJSON(json: any): AdminLoginResponse {
83
+ return AdminLoginResponseToJSONTyped(json, false);
84
+ }
85
+
86
+ export function AdminLoginResponseToJSONTyped(value?: AdminLoginResponse | null, ignoreDiscriminator: boolean = false): any {
87
+ if (value == null) {
88
+ return value;
89
+ }
90
+
91
+ return {
92
+
93
+ 'access_token': value['accessToken'],
94
+ 'token_type': value['tokenType'],
95
+ 'expires_in': value['expiresIn'],
96
+ 'role': value['role'],
97
+ 'tenant_key': value['tenantKey'],
98
+ };
99
+ }
100
+
@@ -0,0 +1,172 @@
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 AuditRecordOut
20
+ */
21
+ export interface AuditRecordOut {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof AuditRecordOut
26
+ */
27
+ id: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AuditRecordOut
32
+ */
33
+ principalType: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof AuditRecordOut
38
+ */
39
+ principalId: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof AuditRecordOut
44
+ */
45
+ correlationId?: string | null;
46
+ /**
47
+ *
48
+ * @type {{ [key: string]: any; }}
49
+ * @memberof AuditRecordOut
50
+ */
51
+ user: { [key: string]: any; };
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof AuditRecordOut
56
+ */
57
+ action: string;
58
+ /**
59
+ *
60
+ * @type {{ [key: string]: any; }}
61
+ * @memberof AuditRecordOut
62
+ */
63
+ resource: { [key: string]: any; };
64
+ /**
65
+ *
66
+ * @type {string}
67
+ * @memberof AuditRecordOut
68
+ */
69
+ decision: string;
70
+ /**
71
+ *
72
+ * @type {Array<any>}
73
+ * @memberof AuditRecordOut
74
+ */
75
+ matchedPolicies: Array<any>;
76
+ /**
77
+ *
78
+ * @type {string}
79
+ * @memberof AuditRecordOut
80
+ */
81
+ reason?: string | null;
82
+ /**
83
+ *
84
+ * @type {Array<any>}
85
+ * @memberof AuditRecordOut
86
+ */
87
+ evaluatedRules: Array<any>;
88
+ /**
89
+ *
90
+ * @type {Array<any>}
91
+ * @memberof AuditRecordOut
92
+ */
93
+ failedConditions: Array<any>;
94
+ /**
95
+ *
96
+ * @type {Date}
97
+ * @memberof AuditRecordOut
98
+ */
99
+ createdAt: Date;
100
+ }
101
+
102
+ /**
103
+ * Check if a given object implements the AuditRecordOut interface.
104
+ */
105
+ export function instanceOfAuditRecordOut(value: object): value is AuditRecordOut {
106
+ if (!('id' in value) || value['id'] === undefined) return false;
107
+ if (!('principalType' in value) || value['principalType'] === undefined) return false;
108
+ if (!('principalId' in value) || value['principalId'] === undefined) return false;
109
+ if (!('user' in value) || value['user'] === undefined) return false;
110
+ if (!('action' in value) || value['action'] === undefined) return false;
111
+ if (!('resource' in value) || value['resource'] === undefined) return false;
112
+ if (!('decision' in value) || value['decision'] === undefined) return false;
113
+ if (!('matchedPolicies' in value) || value['matchedPolicies'] === undefined) return false;
114
+ if (!('evaluatedRules' in value) || value['evaluatedRules'] === undefined) return false;
115
+ if (!('failedConditions' in value) || value['failedConditions'] === undefined) return false;
116
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
117
+ return true;
118
+ }
119
+
120
+ export function AuditRecordOutFromJSON(json: any): AuditRecordOut {
121
+ return AuditRecordOutFromJSONTyped(json, false);
122
+ }
123
+
124
+ export function AuditRecordOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuditRecordOut {
125
+ if (json == null) {
126
+ return json;
127
+ }
128
+ return {
129
+
130
+ 'id': json['id'],
131
+ 'principalType': json['principal_type'],
132
+ 'principalId': json['principal_id'],
133
+ 'correlationId': json['correlation_id'] == null ? undefined : json['correlation_id'],
134
+ 'user': json['user'],
135
+ 'action': json['action'],
136
+ 'resource': json['resource'],
137
+ 'decision': json['decision'],
138
+ 'matchedPolicies': json['matched_policies'],
139
+ 'reason': json['reason'] == null ? undefined : json['reason'],
140
+ 'evaluatedRules': json['evaluated_rules'],
141
+ 'failedConditions': json['failed_conditions'],
142
+ 'createdAt': (new Date(json['created_at'])),
143
+ };
144
+ }
145
+
146
+ export function AuditRecordOutToJSON(json: any): AuditRecordOut {
147
+ return AuditRecordOutToJSONTyped(json, false);
148
+ }
149
+
150
+ export function AuditRecordOutToJSONTyped(value?: AuditRecordOut | null, ignoreDiscriminator: boolean = false): any {
151
+ if (value == null) {
152
+ return value;
153
+ }
154
+
155
+ return {
156
+
157
+ 'id': value['id'],
158
+ 'principal_type': value['principalType'],
159
+ 'principal_id': value['principalId'],
160
+ 'correlation_id': value['correlationId'],
161
+ 'user': value['user'],
162
+ 'action': value['action'],
163
+ 'resource': value['resource'],
164
+ 'decision': value['decision'],
165
+ 'matched_policies': value['matchedPolicies'],
166
+ 'reason': value['reason'],
167
+ 'evaluated_rules': value['evaluatedRules'],
168
+ 'failed_conditions': value['failedConditions'],
169
+ 'created_at': value['createdAt'].toISOString(),
170
+ };
171
+ }
172
+
@@ -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 AuthModelCreate
20
+ */
21
+ export interface AuthModelCreate {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof AuthModelCreate
26
+ */
27
+ schema: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the AuthModelCreate interface.
32
+ */
33
+ export function instanceOfAuthModelCreate(value: object): value is AuthModelCreate {
34
+ if (!('schema' in value) || value['schema'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function AuthModelCreateFromJSON(json: any): AuthModelCreate {
39
+ return AuthModelCreateFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function AuthModelCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthModelCreate {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'schema': json['schema'],
49
+ };
50
+ }
51
+
52
+ export function AuthModelCreateToJSON(json: any): AuthModelCreate {
53
+ return AuthModelCreateToJSONTyped(json, false);
54
+ }
55
+
56
+ export function AuthModelCreateToJSONTyped(value?: AuthModelCreate | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'schema': value['schema'],
64
+ };
65
+ }
66
+
@@ -0,0 +1,102 @@
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 AuthModelOut
20
+ */
21
+ export interface AuthModelOut {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof AuthModelOut
26
+ */
27
+ id: number;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof AuthModelOut
32
+ */
33
+ tenantId: number;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof AuthModelOut
38
+ */
39
+ schema: string;
40
+ /**
41
+ *
42
+ * @type {{ [key: string]: any; }}
43
+ * @memberof AuthModelOut
44
+ */
45
+ parsed: { [key: string]: any; };
46
+ /**
47
+ *
48
+ * @type {{ [key: string]: any; }}
49
+ * @memberof AuthModelOut
50
+ */
51
+ compiled: { [key: string]: any; };
52
+ }
53
+
54
+ /**
55
+ * Check if a given object implements the AuthModelOut interface.
56
+ */
57
+ export function instanceOfAuthModelOut(value: object): value is AuthModelOut {
58
+ if (!('id' in value) || value['id'] === undefined) return false;
59
+ if (!('tenantId' in value) || value['tenantId'] === undefined) return false;
60
+ if (!('schema' in value) || value['schema'] === undefined) return false;
61
+ if (!('parsed' in value) || value['parsed'] === undefined) return false;
62
+ if (!('compiled' in value) || value['compiled'] === undefined) return false;
63
+ return true;
64
+ }
65
+
66
+ export function AuthModelOutFromJSON(json: any): AuthModelOut {
67
+ return AuthModelOutFromJSONTyped(json, false);
68
+ }
69
+
70
+ export function AuthModelOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthModelOut {
71
+ if (json == null) {
72
+ return json;
73
+ }
74
+ return {
75
+
76
+ 'id': json['id'],
77
+ 'tenantId': json['tenant_id'],
78
+ 'schema': json['schema'],
79
+ 'parsed': json['parsed'],
80
+ 'compiled': json['compiled'],
81
+ };
82
+ }
83
+
84
+ export function AuthModelOutToJSON(json: any): AuthModelOut {
85
+ return AuthModelOutToJSONTyped(json, false);
86
+ }
87
+
88
+ export function AuthModelOutToJSONTyped(value?: AuthModelOut | null, ignoreDiscriminator: boolean = false): any {
89
+ if (value == null) {
90
+ return value;
91
+ }
92
+
93
+ return {
94
+
95
+ 'id': value['id'],
96
+ 'tenant_id': value['tenantId'],
97
+ 'schema': value['schema'],
98
+ 'parsed': value['parsed'],
99
+ 'compiled': value['compiled'],
100
+ };
101
+ }
102
+
@@ -0,0 +1,74 @@
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 BatchAccessItem
20
+ */
21
+ export interface BatchAccessItem {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof BatchAccessItem
26
+ */
27
+ action: string;
28
+ /**
29
+ *
30
+ * @type {{ [key: string]: any; }}
31
+ * @memberof BatchAccessItem
32
+ */
33
+ resource?: { [key: string]: any; };
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the BatchAccessItem interface.
38
+ */
39
+ export function instanceOfBatchAccessItem(value: object): value is BatchAccessItem {
40
+ if (!('action' in value) || value['action'] === undefined) return false;
41
+ return true;
42
+ }
43
+
44
+ export function BatchAccessItemFromJSON(json: any): BatchAccessItem {
45
+ return BatchAccessItemFromJSONTyped(json, false);
46
+ }
47
+
48
+ export function BatchAccessItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): BatchAccessItem {
49
+ if (json == null) {
50
+ return json;
51
+ }
52
+ return {
53
+
54
+ 'action': json['action'],
55
+ 'resource': json['resource'] == null ? undefined : json['resource'],
56
+ };
57
+ }
58
+
59
+ export function BatchAccessItemToJSON(json: any): BatchAccessItem {
60
+ return BatchAccessItemToJSONTyped(json, false);
61
+ }
62
+
63
+ export function BatchAccessItemToJSONTyped(value?: BatchAccessItem | null, ignoreDiscriminator: boolean = false): any {
64
+ if (value == null) {
65
+ return value;
66
+ }
67
+
68
+ return {
69
+
70
+ 'action': value['action'],
71
+ 'resource': value['resource'],
72
+ };
73
+ }
74
+
@@ -0,0 +1,98 @@
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 { BatchAccessItem } from './BatchAccessItem';
17
+ import {
18
+ BatchAccessItemFromJSON,
19
+ BatchAccessItemFromJSONTyped,
20
+ BatchAccessItemToJSON,
21
+ BatchAccessItemToJSONTyped,
22
+ } from './BatchAccessItem';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface BatchAccessRequest
28
+ */
29
+ export interface BatchAccessRequest {
30
+ /**
31
+ *
32
+ * @type {{ [key: string]: any; }}
33
+ * @memberof BatchAccessRequest
34
+ */
35
+ user?: { [key: string]: any; };
36
+ /**
37
+ *
38
+ * @type {Array<BatchAccessItem>}
39
+ * @memberof BatchAccessRequest
40
+ */
41
+ items: Array<BatchAccessItem>;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof BatchAccessRequest
46
+ */
47
+ consistency?: string;
48
+ /**
49
+ *
50
+ * @type {number}
51
+ * @memberof BatchAccessRequest
52
+ */
53
+ revision?: number | null;
54
+ }
55
+
56
+ /**
57
+ * Check if a given object implements the BatchAccessRequest interface.
58
+ */
59
+ export function instanceOfBatchAccessRequest(value: object): value is BatchAccessRequest {
60
+ if (!('items' in value) || value['items'] === undefined) return false;
61
+ return true;
62
+ }
63
+
64
+ export function BatchAccessRequestFromJSON(json: any): BatchAccessRequest {
65
+ return BatchAccessRequestFromJSONTyped(json, false);
66
+ }
67
+
68
+ export function BatchAccessRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BatchAccessRequest {
69
+ if (json == null) {
70
+ return json;
71
+ }
72
+ return {
73
+
74
+ 'user': json['user'] == null ? undefined : json['user'],
75
+ 'items': ((json['items'] as Array<any>).map(BatchAccessItemFromJSON)),
76
+ 'consistency': json['consistency'] == null ? undefined : json['consistency'],
77
+ 'revision': json['revision'] == null ? undefined : json['revision'],
78
+ };
79
+ }
80
+
81
+ export function BatchAccessRequestToJSON(json: any): BatchAccessRequest {
82
+ return BatchAccessRequestToJSONTyped(json, false);
83
+ }
84
+
85
+ export function BatchAccessRequestToJSONTyped(value?: BatchAccessRequest | null, ignoreDiscriminator: boolean = false): any {
86
+ if (value == null) {
87
+ return value;
88
+ }
89
+
90
+ return {
91
+
92
+ 'user': value['user'],
93
+ 'items': ((value['items'] as Array<any>).map(BatchAccessItemToJSON)),
94
+ 'consistency': value['consistency'],
95
+ 'revision': value['revision'],
96
+ };
97
+ }
98
+