Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 708704c

Browse files
committed
fix: reindent at 2 spaces
1 parent aa44daa commit 708704c

File tree

2 files changed

+63
-64
lines changed

2 files changed

+63
-64
lines changed

src/endpoints/audit-logs.js

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
import { buildURL } from '../utils/helpers'
2-
import BaseExtend from '../extends/base'
3-
4-
class AuditLogsEndpoint extends BaseExtend {
5-
constructor(endpoint) {
6-
super(endpoint)
7-
this.endpoint = 'audit/logs'
8-
}
9-
10-
All(token = null) {
11-
const { limit, offset, filter } = this
12-
13-
const url = buildURL(this.endpoint, {
14-
limit,
15-
offset,
16-
filter
17-
})
18-
19-
return this.request.send(url, 'GET', undefined, token, this)
20-
}
21-
22-
Filter(resourceType, resourceId) {
23-
this.filter = {
24-
eq: {
25-
resource_type: resourceType,
26-
resource_id: resourceId
27-
}
28-
}
29-
30-
return this
31-
}
32-
}
33-
34-
export default AuditLogsEndpoint
1+
import { buildURL } from '../utils/helpers'
2+
import BaseExtend from '../extends/base'
3+
4+
class AuditLogsEndpoint extends BaseExtend {
5+
constructor(endpoint) {
6+
super(endpoint)
7+
this.endpoint = 'audit/logs'
8+
}
9+
10+
All(token = null) {
11+
const { limit, offset, filter } = this
12+
13+
const url = buildURL(this.endpoint, {
14+
limit,
15+
offset,
16+
filter
17+
})
18+
19+
return this.request.send(url, 'GET', undefined, token, this)
20+
}
21+
22+
Filter(resourceType, resourceId) {
23+
this.filter = {
24+
eq: {
25+
resource_type: resourceType,
26+
resource_id: resourceId
27+
}
28+
}
29+
30+
return this
31+
}
32+
}
33+
34+
export default AuditLogsEndpoint

src/types/audit-logs.d.ts

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
1-
2-
import { Identifiable, ResourcePage } from './core'
3-
4-
export interface AuditLogsRecord extends Identifiable {
5-
store_id: string;
6-
type: string;
7-
initiator: {
8-
"access-token-email": string;
9-
"access-token-id": string;
10-
"access-token-name": string;
11-
"access-token-store-id": string;
12-
"access-token-type": string;
13-
}
14-
time: string;
15-
event_type: string;
16-
delta: Record<string, any>;
17-
resource_type: string;
18-
relationships: Record<string, any>;
19-
links: Record<string, string>;
20-
}
21-
22-
export interface AuditLogsEndpoint {
23-
All(): Promise<ResourcePage<AuditLogsRecord>>
24-
25-
Filter(resourceType: string, resourceId: string): AuditLogsEndpoint
26-
27-
Limit(value: number): AuditLogsEndpoint
28-
29-
Offset(value: number): AuditLogsEndpoint
30-
}
1+
import { Identifiable, ResourcePage } from './core'
2+
3+
export interface AuditLogsRecord extends Identifiable {
4+
store_id: string
5+
type: string
6+
initiator: {
7+
'access-token-email': string
8+
'access-token-id': string
9+
'access-token-name': string
10+
'access-token-store-id': string
11+
'access-token-type': string
12+
}
13+
time: string
14+
event_type: string
15+
delta: Record<string, any>
16+
resource_type: string
17+
relationships: Record<string, any>
18+
links: Record<string, string>
19+
}
20+
21+
export interface AuditLogsEndpoint {
22+
All(): Promise<ResourcePage<AuditLogsRecord>>
23+
24+
Filter(resourceType: string, resourceId: string): AuditLogsEndpoint
25+
26+
Limit(value: number): AuditLogsEndpoint
27+
28+
Offset(value: number): AuditLogsEndpoint
29+
}

0 commit comments

Comments
 (0)