chore: lint + add source code link
This commit is contained in:
parent
f3db64fa38
commit
35424ceb94
41 changed files with 15150 additions and 45895 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -3,6 +3,7 @@ docs/
|
|||
app.db
|
||||
docker/server
|
||||
server
|
||||
__debug_bin
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
|
|
|
|||
2
Makefile
2
Makefile
|
|
@ -12,7 +12,7 @@ CXXFLAGS ?=
|
|||
CXXFLAGS += -target $(TARGET_TRIPLE)
|
||||
|
||||
GOFLAGS ?=
|
||||
GOFLAGS += -x -o docker/server
|
||||
GOFLAGS += -x -trimpath -o docker/server
|
||||
|
||||
all:
|
||||
gen: gen-backend-thrift gen-frontend-thrift
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"plugins": [
|
||||
"minify-dead-code-elimination",
|
||||
"@babel/plugin-transform-classes",
|
||||
"@babel/plugin-syntax-class-properties",
|
||||
]
|
||||
}
|
||||
2
frontend/.gitignore
vendored
2
frontend/.gitignore
vendored
|
|
@ -8,8 +8,6 @@ pnpm-debug.log*
|
|||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
node_modules_linux
|
||||
node_modules_windows
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
|
|
|||
106
frontend/gen/CoreService.d.ts
vendored
106
frontend/gen/CoreService.d.ts
vendored
|
|
@ -11,7 +11,6 @@ import Int64 = require('node-int64');
|
|||
import structs_ttypes = require('./structs_types');
|
||||
import exceptions_ttypes = require('./exceptions_types');
|
||||
|
||||
|
||||
import ttypes = require('./service_types');
|
||||
|
||||
declare class Client {
|
||||
|
|
@ -19,44 +18,111 @@ declare class Client {
|
|||
private pClass: thrift.TProtocol;
|
||||
private _seqid: number;
|
||||
|
||||
constructor(output: thrift.TTransport, pClass: { new(trans: thrift.TTransport): thrift.TProtocol });
|
||||
constructor(
|
||||
output: thrift.TTransport,
|
||||
pClass: { new (trans: thrift.TTransport): thrift.TProtocol },
|
||||
);
|
||||
|
||||
login(request: structs_ttypes.LoginRequest): Promise<structs_ttypes.LoginResponse>;
|
||||
|
||||
login(request: structs_ttypes.LoginRequest, callback?: (error: exceptions_ttypes.CoreServicesException, response: structs_ttypes.LoginResponse)=>void): void;
|
||||
login(
|
||||
request: structs_ttypes.LoginRequest,
|
||||
callback?: (
|
||||
error: exceptions_ttypes.CoreServicesException,
|
||||
response: structs_ttypes.LoginResponse,
|
||||
) => void,
|
||||
): void;
|
||||
|
||||
getProfile(request: structs_ttypes.GetProfileRequest): Promise<structs_ttypes.GetProfileResponse>;
|
||||
|
||||
getProfile(request: structs_ttypes.GetProfileRequest, callback?: (error: exceptions_ttypes.CoreServicesException, response: structs_ttypes.GetProfileResponse)=>void): void;
|
||||
getProfile(
|
||||
request: structs_ttypes.GetProfileRequest,
|
||||
callback?: (
|
||||
error: exceptions_ttypes.CoreServicesException,
|
||||
response: structs_ttypes.GetProfileResponse,
|
||||
) => void,
|
||||
): void;
|
||||
|
||||
logout(request: structs_ttypes.LogoutRequest): Promise<structs_ttypes.LogoutResponse>;
|
||||
|
||||
logout(request: structs_ttypes.LogoutRequest, callback?: (error: exceptions_ttypes.CoreServicesException, response: structs_ttypes.LogoutResponse)=>void): void;
|
||||
logout(
|
||||
request: structs_ttypes.LogoutRequest,
|
||||
callback?: (
|
||||
error: exceptions_ttypes.CoreServicesException,
|
||||
response: structs_ttypes.LogoutResponse,
|
||||
) => void,
|
||||
): void;
|
||||
|
||||
getUserList(request: structs_ttypes.GetUserListRequest): Promise<structs_ttypes.GetUserListResponse>;
|
||||
getUserList(
|
||||
request: structs_ttypes.GetUserListRequest,
|
||||
): Promise<structs_ttypes.GetUserListResponse>;
|
||||
|
||||
getUserList(request: structs_ttypes.GetUserListRequest, callback?: (error: exceptions_ttypes.CoreServicesException, response: structs_ttypes.GetUserListResponse)=>void): void;
|
||||
getUserList(
|
||||
request: structs_ttypes.GetUserListRequest,
|
||||
callback?: (
|
||||
error: exceptions_ttypes.CoreServicesException,
|
||||
response: structs_ttypes.GetUserListResponse,
|
||||
) => void,
|
||||
): void;
|
||||
|
||||
createUser(request: structs_ttypes.CreateUserRequest): Promise<structs_ttypes.CreateUserResponse>;
|
||||
|
||||
createUser(request: structs_ttypes.CreateUserRequest, callback?: (error: exceptions_ttypes.CoreServicesException, response: structs_ttypes.CreateUserResponse)=>void): void;
|
||||
createUser(
|
||||
request: structs_ttypes.CreateUserRequest,
|
||||
callback?: (
|
||||
error: exceptions_ttypes.CoreServicesException,
|
||||
response: structs_ttypes.CreateUserResponse,
|
||||
) => void,
|
||||
): void;
|
||||
|
||||
deleteUsers(request: structs_ttypes.DeleteUsersRequest): Promise<structs_ttypes.DeleteUsersResponse>;
|
||||
deleteUsers(
|
||||
request: structs_ttypes.DeleteUsersRequest,
|
||||
): Promise<structs_ttypes.DeleteUsersResponse>;
|
||||
|
||||
deleteUsers(request: structs_ttypes.DeleteUsersRequest, callback?: (error: exceptions_ttypes.CoreServicesException, response: structs_ttypes.DeleteUsersResponse)=>void): void;
|
||||
deleteUsers(
|
||||
request: structs_ttypes.DeleteUsersRequest,
|
||||
callback?: (
|
||||
error: exceptions_ttypes.CoreServicesException,
|
||||
response: structs_ttypes.DeleteUsersResponse,
|
||||
) => void,
|
||||
): void;
|
||||
|
||||
getWajibPajakList(request: structs_ttypes.GetWajibPajakListRequest): Promise<structs_ttypes.GetWajibPajakListResponse>;
|
||||
getWajibPajakList(
|
||||
request: structs_ttypes.GetWajibPajakListRequest,
|
||||
): Promise<structs_ttypes.GetWajibPajakListResponse>;
|
||||
|
||||
getWajibPajakList(request: structs_ttypes.GetWajibPajakListRequest, callback?: (error: exceptions_ttypes.CoreServicesException, response: structs_ttypes.GetWajibPajakListResponse)=>void): void;
|
||||
getWajibPajakList(
|
||||
request: structs_ttypes.GetWajibPajakListRequest,
|
||||
callback?: (
|
||||
error: exceptions_ttypes.CoreServicesException,
|
||||
response: structs_ttypes.GetWajibPajakListResponse,
|
||||
) => void,
|
||||
): void;
|
||||
|
||||
createWajibPajak(request: structs_ttypes.CreateWajibPajakRequest): Promise<structs_ttypes.CreateWajibPajakResponse>;
|
||||
createWajibPajak(
|
||||
request: structs_ttypes.CreateWajibPajakRequest,
|
||||
): Promise<structs_ttypes.CreateWajibPajakResponse>;
|
||||
|
||||
createWajibPajak(request: structs_ttypes.CreateWajibPajakRequest, callback?: (error: exceptions_ttypes.CoreServicesException, response: structs_ttypes.CreateWajibPajakResponse)=>void): void;
|
||||
createWajibPajak(
|
||||
request: structs_ttypes.CreateWajibPajakRequest,
|
||||
callback?: (
|
||||
error: exceptions_ttypes.CoreServicesException,
|
||||
response: structs_ttypes.CreateWajibPajakResponse,
|
||||
) => void,
|
||||
): void;
|
||||
|
||||
deleteWajibPajakList(request: structs_ttypes.DeleteWajibpajakListRequest): Promise<structs_ttypes.DeleteWajibpajakListResponse>;
|
||||
deleteWajibPajakList(
|
||||
request: structs_ttypes.DeleteWajibpajakListRequest,
|
||||
): Promise<structs_ttypes.DeleteWajibpajakListResponse>;
|
||||
|
||||
deleteWajibPajakList(request: structs_ttypes.DeleteWajibpajakListRequest, callback?: (error: exceptions_ttypes.CoreServicesException, response: structs_ttypes.DeleteWajibpajakListResponse)=>void): void;
|
||||
}
|
||||
deleteWajibPajakList(
|
||||
request: structs_ttypes.DeleteWajibpajakListRequest,
|
||||
callback?: (
|
||||
error: exceptions_ttypes.CoreServicesException,
|
||||
response: structs_ttypes.DeleteWajibpajakListResponse,
|
||||
) => void,
|
||||
): void;
|
||||
}
|
||||
|
||||
declare class Processor {
|
||||
private _handler: object;
|
||||
|
|
@ -71,5 +137,9 @@ declare class Processor {
|
|||
process_deleteUsers(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
||||
process_getWajibPajakList(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
||||
process_createWajibPajak(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
||||
process_deleteWajibPajakList(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
||||
process_deleteWajibPajakList(
|
||||
seqid: number,
|
||||
input: thrift.TProtocol,
|
||||
output: thrift.TProtocol,
|
||||
): void;
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
7
frontend/gen/exceptions_types.d.ts
vendored
7
frontend/gen/exceptions_types.d.ts
vendored
|
|
@ -8,11 +8,10 @@ import Thrift = thrift.Thrift;
|
|||
import Q = thrift.Q;
|
||||
import Int64 = require('node-int64');
|
||||
|
||||
|
||||
declare class CoreServicesException extends Thrift.TException {
|
||||
public code: number;
|
||||
public message: string;
|
||||
public parameters: { [k: string]: string; };
|
||||
public parameters: { [k: string]: string };
|
||||
|
||||
constructor(args?: { code: number; message: string; parameters: { [k: string]: string; }; });
|
||||
}
|
||||
constructor(args?: { code: number; message: string; parameters: { [k: string]: string } });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,18 +3,19 @@
|
|||
//
|
||||
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
||||
//
|
||||
"use strict";
|
||||
'use strict';
|
||||
|
||||
const thrift = require('thrift');
|
||||
const Thrift = thrift.Thrift;
|
||||
const Int64 = require('node-int64');
|
||||
|
||||
|
||||
const ttypes = module.exports = {};
|
||||
const CoreServicesException = module.exports.CoreServicesException = class extends Thrift.TException {
|
||||
const ttypes = (module.exports = {});
|
||||
const CoreServicesException = (module.exports.CoreServicesException = class extends (
|
||||
Thrift.TException
|
||||
) {
|
||||
constructor(args) {
|
||||
super(args);
|
||||
this.name = "CoreServicesException";
|
||||
this.name = 'CoreServicesException';
|
||||
this.code = null;
|
||||
this.message = null;
|
||||
this.parameters = null;
|
||||
|
|
@ -31,7 +32,7 @@ const CoreServicesException = module.exports.CoreServicesException = class exten
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -81,7 +82,7 @@ const CoreServicesException = module.exports.CoreServicesException = class exten
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('CoreServicesException');
|
||||
if (this.code !== null && this.code !== undefined) {
|
||||
output.writeFieldBegin('code', Thrift.Type.I32, 1);
|
||||
|
|
@ -95,10 +96,14 @@ const CoreServicesException = module.exports.CoreServicesException = class exten
|
|||
}
|
||||
if (this.parameters !== null && this.parameters !== undefined) {
|
||||
output.writeFieldBegin('parameters', Thrift.Type.MAP, 3);
|
||||
output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.parameters));
|
||||
for (let kiter5 in this.parameters) {
|
||||
output.writeMapBegin(
|
||||
Thrift.Type.STRING,
|
||||
Thrift.Type.STRING,
|
||||
Thrift.objectLength(this.parameters),
|
||||
);
|
||||
for (const kiter5 in this.parameters) {
|
||||
if (this.parameters.hasOwnProperty(kiter5)) {
|
||||
let viter6 = this.parameters[kiter5];
|
||||
const viter6 = this.parameters[kiter5];
|
||||
output.writeString(kiter5);
|
||||
output.writeString(viter6);
|
||||
}
|
||||
|
|
@ -110,5 +115,4 @@ const CoreServicesException = module.exports.CoreServicesException = class exten
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
});
|
||||
|
|
|
|||
7
frontend/gen/exceptionsc_types.d.ts
vendored
7
frontend/gen/exceptionsc_types.d.ts
vendored
|
|
@ -8,11 +8,10 @@ import Thrift = thrift.Thrift;
|
|||
import Q = thrift.Q;
|
||||
import Int64 = require('node-int64');
|
||||
|
||||
|
||||
declare class CommonException extends Thrift.TException {
|
||||
public code: number;
|
||||
public message: string;
|
||||
public metadata?: { [k: string]: string; };
|
||||
public metadata?: { [k: string]: string };
|
||||
|
||||
constructor(args?: { code: number; message: string; metadata?: { [k: string]: string; }; });
|
||||
}
|
||||
constructor(args?: { code: number; message: string; metadata?: { [k: string]: string } });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,18 +3,17 @@
|
|||
//
|
||||
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
||||
//
|
||||
"use strict";
|
||||
'use strict';
|
||||
|
||||
const thrift = require('thrift');
|
||||
const Thrift = thrift.Thrift;
|
||||
const Int64 = require('node-int64');
|
||||
|
||||
|
||||
const ttypes = module.exports = {};
|
||||
const CommonException = module.exports.CommonException = class extends Thrift.TException {
|
||||
const ttypes = (module.exports = {});
|
||||
const CommonException = (module.exports.CommonException = class extends Thrift.TException {
|
||||
constructor(args) {
|
||||
super(args);
|
||||
this.name = "CommonException";
|
||||
this.name = 'CommonException';
|
||||
this.code = null;
|
||||
this.message = null;
|
||||
this.metadata = null;
|
||||
|
|
@ -31,7 +30,7 @@ const CommonException = module.exports.CommonException = class extends Thrift.TE
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -81,7 +80,7 @@ const CommonException = module.exports.CommonException = class extends Thrift.TE
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('CommonException');
|
||||
if (this.code !== null && this.code !== undefined) {
|
||||
output.writeFieldBegin('code', Thrift.Type.I32, 1);
|
||||
|
|
@ -95,10 +94,14 @@ const CommonException = module.exports.CommonException = class extends Thrift.TE
|
|||
}
|
||||
if (this.metadata !== null && this.metadata !== undefined) {
|
||||
output.writeFieldBegin('metadata', Thrift.Type.MAP, 3);
|
||||
output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.metadata));
|
||||
for (let kiter5 in this.metadata) {
|
||||
output.writeMapBegin(
|
||||
Thrift.Type.STRING,
|
||||
Thrift.Type.STRING,
|
||||
Thrift.objectLength(this.metadata),
|
||||
);
|
||||
for (const kiter5 in this.metadata) {
|
||||
if (this.metadata.hasOwnProperty(kiter5)) {
|
||||
let viter6 = this.metadata[kiter5];
|
||||
const viter6 = this.metadata[kiter5];
|
||||
output.writeString(kiter5);
|
||||
output.writeString(viter6);
|
||||
}
|
||||
|
|
@ -110,5 +113,4 @@ const CommonException = module.exports.CommonException = class extends Thrift.TE
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
});
|
||||
|
|
|
|||
2
frontend/gen/service_types.d.ts
vendored
2
frontend/gen/service_types.d.ts
vendored
|
|
@ -9,5 +9,3 @@ import Q = thrift.Q;
|
|||
import Int64 = require('node-int64');
|
||||
import structs_ttypes = require('./structs_types');
|
||||
import exceptions_ttypes = require('./exceptions_types');
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
||||
//
|
||||
"use strict";
|
||||
'use strict';
|
||||
|
||||
const thrift = require('thrift');
|
||||
const Thrift = thrift.Thrift;
|
||||
|
|
@ -12,5 +12,4 @@ const Int64 = require('node-int64');
|
|||
const structs_ttypes = require('./structs_types');
|
||||
const exceptions_ttypes = require('./exceptions_types');
|
||||
|
||||
|
||||
const ttypes = module.exports = {};
|
||||
const ttypes = (module.exports = {});
|
||||
|
|
|
|||
128
frontend/gen/structs_types.d.ts
vendored
128
frontend/gen/structs_types.d.ts
vendored
|
|
@ -8,7 +8,6 @@ import Thrift = thrift.Thrift;
|
|||
import Q = thrift.Q;
|
||||
import Int64 = require('node-int64');
|
||||
|
||||
|
||||
declare enum RoleType {
|
||||
UNKNOWN = 0,
|
||||
SYSTEM = 1,
|
||||
|
|
@ -43,8 +42,15 @@ declare class Role {
|
|||
public users?: User[];
|
||||
public wajibPajakList?: WajibPajak[];
|
||||
|
||||
constructor(args?: { id: Int64; displayName: string; roleType: RoleType; creator?: User; users?: User[]; wajibPajakList?: WajibPajak[]; });
|
||||
}
|
||||
constructor(args?: {
|
||||
id: Int64;
|
||||
displayName: string;
|
||||
roleType: RoleType;
|
||||
creator?: User;
|
||||
users?: User[];
|
||||
wajibPajakList?: WajibPajak[];
|
||||
});
|
||||
}
|
||||
|
||||
declare class User {
|
||||
public id: Int64;
|
||||
|
|
@ -57,24 +63,34 @@ declare class User {
|
|||
public ownedWajibPajakList?: WajibPajak[];
|
||||
public rolesWajibPajakList?: Role[];
|
||||
|
||||
constructor(args?: { id: Int64; username: string; password: string; displayName: string; privateKey: Buffer; publicKey: Buffer; roles?: Role[]; ownedWajibPajakList?: WajibPajak[]; rolesWajibPajakList?: Role[]; });
|
||||
}
|
||||
constructor(args?: {
|
||||
id: Int64;
|
||||
username: string;
|
||||
password: string;
|
||||
displayName: string;
|
||||
privateKey: Buffer;
|
||||
publicKey: Buffer;
|
||||
roles?: Role[];
|
||||
ownedWajibPajakList?: WajibPajak[];
|
||||
rolesWajibPajakList?: Role[];
|
||||
});
|
||||
}
|
||||
|
||||
declare class WajibPajakProfile {
|
||||
public npwp: string;
|
||||
public displayName: string;
|
||||
public address: string;
|
||||
|
||||
constructor(args?: { npwp: string; displayName: string; address: string; });
|
||||
}
|
||||
constructor(args?: { npwp: string; displayName: string; address: string });
|
||||
}
|
||||
|
||||
declare class WajibPajakTaxObligation {
|
||||
public id: Int64;
|
||||
public obligation: JenisPajak;
|
||||
public isActive: boolean;
|
||||
|
||||
constructor(args?: { id: Int64; obligation: JenisPajak; isActive: boolean; });
|
||||
}
|
||||
constructor(args?: { id: Int64; obligation: JenisPajak; isActive: boolean });
|
||||
}
|
||||
|
||||
declare class WajibPajak {
|
||||
public id: Int64;
|
||||
|
|
@ -83,127 +99,137 @@ declare class WajibPajak {
|
|||
public taxObligations?: WajibPajakTaxObligation[];
|
||||
public roles?: Role[];
|
||||
|
||||
constructor(args?: { id: Int64; profile: WajibPajakProfile; owners: User[]; taxObligations?: WajibPajakTaxObligation[]; roles?: Role[]; });
|
||||
}
|
||||
constructor(args?: {
|
||||
id: Int64;
|
||||
profile: WajibPajakProfile;
|
||||
owners: User[];
|
||||
taxObligations?: WajibPajakTaxObligation[];
|
||||
roles?: Role[];
|
||||
});
|
||||
}
|
||||
|
||||
declare class Pagination {
|
||||
public page: Int64;
|
||||
public rowsPerPage: Int64;
|
||||
|
||||
constructor(args?: { page: Int64; rowsPerPage: Int64; });
|
||||
}
|
||||
constructor(args?: { page: Int64; rowsPerPage: Int64 });
|
||||
}
|
||||
|
||||
declare class AlertInfo {
|
||||
public title: string;
|
||||
public description: string;
|
||||
|
||||
constructor(args?: { title: string; description: string; });
|
||||
}
|
||||
constructor(args?: { title: string; description: string });
|
||||
}
|
||||
|
||||
declare class LoginRequest {
|
||||
public username: string;
|
||||
public password: string;
|
||||
|
||||
constructor(args?: { username: string; password: string; });
|
||||
}
|
||||
constructor(args?: { username: string; password: string });
|
||||
}
|
||||
|
||||
declare class LoginResponse {
|
||||
public trkToken: string;
|
||||
public token: string;
|
||||
public profile?: User;
|
||||
|
||||
constructor(args?: { trkToken: string; token: string; profile?: User; });
|
||||
}
|
||||
constructor(args?: { trkToken: string; token: string; profile?: User });
|
||||
}
|
||||
|
||||
declare class LogoutRequest {
|
||||
public token: string;
|
||||
|
||||
constructor(args?: { token: string; });
|
||||
}
|
||||
constructor(args?: { token: string });
|
||||
}
|
||||
|
||||
declare class LogoutResponse {
|
||||
}
|
||||
declare class LogoutResponse {}
|
||||
|
||||
declare class GetProfileRequest {
|
||||
}
|
||||
declare class GetProfileRequest {}
|
||||
|
||||
declare class GetProfileResponse {
|
||||
public profile: User;
|
||||
|
||||
constructor(args?: { profile: User; });
|
||||
}
|
||||
constructor(args?: { profile: User });
|
||||
}
|
||||
|
||||
declare class GetUserListRequest {
|
||||
public pagination: Pagination;
|
||||
public searchTerm: string;
|
||||
|
||||
constructor(args?: { pagination: Pagination; searchTerm: string; });
|
||||
}
|
||||
constructor(args?: { pagination: Pagination; searchTerm: string });
|
||||
}
|
||||
|
||||
declare class GetUserListResponse {
|
||||
public pagination: Pagination;
|
||||
public totalUsers: Int64;
|
||||
public users: User[];
|
||||
|
||||
constructor(args?: { pagination: Pagination; totalUsers: Int64; users: User[]; });
|
||||
}
|
||||
constructor(args?: { pagination: Pagination; totalUsers: Int64; users: User[] });
|
||||
}
|
||||
|
||||
declare class CreateUserRequest {
|
||||
public user: User;
|
||||
|
||||
constructor(args?: { user: User; });
|
||||
}
|
||||
constructor(args?: { user: User });
|
||||
}
|
||||
|
||||
declare class CreateUserResponse {
|
||||
}
|
||||
declare class CreateUserResponse {}
|
||||
|
||||
declare class DeleteUsersRequest {
|
||||
public userIds: Int64[];
|
||||
|
||||
constructor(args?: { userIds: Int64[]; });
|
||||
}
|
||||
constructor(args?: { userIds: Int64[] });
|
||||
}
|
||||
|
||||
declare class DeleteUsersResponse {
|
||||
public success: Int64[];
|
||||
public ignored: Int64[];
|
||||
|
||||
constructor(args?: { success: Int64[]; ignored: Int64[]; });
|
||||
}
|
||||
constructor(args?: { success: Int64[]; ignored: Int64[] });
|
||||
}
|
||||
|
||||
declare class GetWajibPajakListRequest {
|
||||
public pagination: Pagination;
|
||||
public ownership: WajibPajakOwnership;
|
||||
public searchTerm: string;
|
||||
|
||||
constructor(args?: { pagination: Pagination; ownership: WajibPajakOwnership; searchTerm: string; });
|
||||
}
|
||||
constructor(args?: {
|
||||
pagination: Pagination;
|
||||
ownership: WajibPajakOwnership;
|
||||
searchTerm: string;
|
||||
});
|
||||
}
|
||||
|
||||
declare class GetWajibPajakListResponse {
|
||||
public pagination: Pagination;
|
||||
public totalWajibPajak: Int64;
|
||||
public wajibPajakList: WajibPajak[];
|
||||
|
||||
constructor(args?: { pagination: Pagination; totalWajibPajak: Int64; wajibPajakList: WajibPajak[]; });
|
||||
}
|
||||
constructor(args?: {
|
||||
pagination: Pagination;
|
||||
totalWajibPajak: Int64;
|
||||
wajibPajakList: WajibPajak[];
|
||||
});
|
||||
}
|
||||
|
||||
declare class CreateWajibPajakRequest {
|
||||
public wajibPajak: WajibPajak;
|
||||
|
||||
constructor(args?: { wajibPajak: WajibPajak; });
|
||||
}
|
||||
constructor(args?: { wajibPajak: WajibPajak });
|
||||
}
|
||||
|
||||
declare class CreateWajibPajakResponse {
|
||||
}
|
||||
declare class CreateWajibPajakResponse {}
|
||||
|
||||
declare class DeleteWajibpajakListRequest {
|
||||
public wpIds: Int64[];
|
||||
|
||||
constructor(args?: { wpIds: Int64[]; });
|
||||
}
|
||||
constructor(args?: { wpIds: Int64[] });
|
||||
}
|
||||
|
||||
declare class DeleteWajibpajakListResponse {
|
||||
public success: Int64[];
|
||||
public ignored: Int64[];
|
||||
|
||||
constructor(args?: { success: Int64[]; ignored: Int64[]; });
|
||||
}
|
||||
constructor(args?: { success: Int64[]; ignored: Int64[] });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,55 +3,54 @@
|
|||
//
|
||||
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
||||
//
|
||||
"use strict";
|
||||
'use strict';
|
||||
|
||||
const thrift = require('thrift');
|
||||
const Thrift = thrift.Thrift;
|
||||
const Int64 = require('node-int64');
|
||||
|
||||
|
||||
const ttypes = module.exports = {};
|
||||
const ttypes = (module.exports = {});
|
||||
ttypes.RoleType = {
|
||||
'0' : 'UNKNOWN',
|
||||
'UNKNOWN' : 0,
|
||||
'1' : 'SYSTEM',
|
||||
'SYSTEM' : 1,
|
||||
'2' : 'USER',
|
||||
'USER' : 2,
|
||||
'100' : 'WP_OWNER',
|
||||
'WP_OWNER' : 100,
|
||||
'110' : 'WP_ADMIN',
|
||||
'WP_ADMIN' : 110
|
||||
0: 'UNKNOWN',
|
||||
UNKNOWN: 0,
|
||||
1: 'SYSTEM',
|
||||
SYSTEM: 1,
|
||||
2: 'USER',
|
||||
USER: 2,
|
||||
100: 'WP_OWNER',
|
||||
WP_OWNER: 100,
|
||||
110: 'WP_ADMIN',
|
||||
WP_ADMIN: 110,
|
||||
};
|
||||
ttypes.JenisPajak = {
|
||||
'0' : 'UNKNOWN',
|
||||
'UNKNOWN' : 0,
|
||||
'1' : 'PPH_21',
|
||||
'PPH_21' : 1,
|
||||
'2' : 'PPH_23',
|
||||
'PPH_23' : 2,
|
||||
'3' : 'PPH_25',
|
||||
'PPH_25' : 3,
|
||||
'4' : 'PPH_26',
|
||||
'PPH_26' : 4,
|
||||
'5' : 'PPH_4_2',
|
||||
'PPH_4_2' : 5,
|
||||
'6' : 'PPH_15',
|
||||
'PPH_15' : 6,
|
||||
'7' : 'PPN',
|
||||
'PPN' : 7,
|
||||
'8' : 'TAHUNAN',
|
||||
'TAHUNAN' : 8
|
||||
0: 'UNKNOWN',
|
||||
UNKNOWN: 0,
|
||||
1: 'PPH_21',
|
||||
PPH_21: 1,
|
||||
2: 'PPH_23',
|
||||
PPH_23: 2,
|
||||
3: 'PPH_25',
|
||||
PPH_25: 3,
|
||||
4: 'PPH_26',
|
||||
PPH_26: 4,
|
||||
5: 'PPH_4_2',
|
||||
PPH_4_2: 5,
|
||||
6: 'PPH_15',
|
||||
PPH_15: 6,
|
||||
7: 'PPN',
|
||||
PPN: 7,
|
||||
8: 'TAHUNAN',
|
||||
TAHUNAN: 8,
|
||||
};
|
||||
ttypes.WajibPajakOwnership = {
|
||||
'0' : 'UNKNOWN',
|
||||
'UNKNOWN' : 0,
|
||||
'1' : 'OWNED',
|
||||
'OWNED' : 1,
|
||||
'2' : 'ROLE',
|
||||
'ROLE' : 2
|
||||
0: 'UNKNOWN',
|
||||
UNKNOWN: 0,
|
||||
1: 'OWNED',
|
||||
OWNED: 1,
|
||||
2: 'ROLE',
|
||||
ROLE: 2,
|
||||
};
|
||||
const Role = module.exports.Role = class {
|
||||
const Role = (module.exports.Role = class {
|
||||
constructor(args) {
|
||||
this.id = null;
|
||||
this.displayName = null;
|
||||
|
|
@ -81,7 +80,7 @@ const Role = module.exports.Role = class {
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -161,7 +160,7 @@ const Role = module.exports.Role = class {
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('Role');
|
||||
if (this.id !== null && this.id !== undefined) {
|
||||
output.writeFieldBegin('id', Thrift.Type.I64, 1);
|
||||
|
|
@ -211,9 +210,8 @@ const Role = module.exports.Role = class {
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
const User = module.exports.User = class {
|
||||
});
|
||||
const User = (module.exports.User = class {
|
||||
constructor(args) {
|
||||
this.id = null;
|
||||
this.username = null;
|
||||
|
|
@ -255,7 +253,7 @@ const User = module.exports.User = class {
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -364,7 +362,7 @@ const User = module.exports.User = class {
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('User');
|
||||
if (this.id !== null && this.id !== undefined) {
|
||||
output.writeFieldBegin('id', Thrift.Type.I64, 1);
|
||||
|
|
@ -436,9 +434,8 @@ const User = module.exports.User = class {
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
const WajibPajakProfile = module.exports.WajibPajakProfile = class {
|
||||
});
|
||||
const WajibPajakProfile = (module.exports.WajibPajakProfile = class {
|
||||
constructor(args) {
|
||||
this.npwp = null;
|
||||
this.displayName = null;
|
||||
|
|
@ -456,7 +453,7 @@ const WajibPajakProfile = module.exports.WajibPajakProfile = class {
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -496,7 +493,7 @@ const WajibPajakProfile = module.exports.WajibPajakProfile = class {
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('WajibPajakProfile');
|
||||
if (this.npwp !== null && this.npwp !== undefined) {
|
||||
output.writeFieldBegin('npwp', Thrift.Type.STRING, 2);
|
||||
|
|
@ -517,9 +514,8 @@ const WajibPajakProfile = module.exports.WajibPajakProfile = class {
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
const WajibPajakTaxObligation = module.exports.WajibPajakTaxObligation = class {
|
||||
});
|
||||
const WajibPajakTaxObligation = (module.exports.WajibPajakTaxObligation = class {
|
||||
constructor(args) {
|
||||
this.id = null;
|
||||
this.obligation = null;
|
||||
|
|
@ -537,7 +533,7 @@ const WajibPajakTaxObligation = module.exports.WajibPajakTaxObligation = class {
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -577,7 +573,7 @@ const WajibPajakTaxObligation = module.exports.WajibPajakTaxObligation = class {
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('WajibPajakTaxObligation');
|
||||
if (this.id !== null && this.id !== undefined) {
|
||||
output.writeFieldBegin('id', Thrift.Type.I64, 1);
|
||||
|
|
@ -598,9 +594,8 @@ const WajibPajakTaxObligation = module.exports.WajibPajakTaxObligation = class {
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
const WajibPajak = module.exports.WajibPajak = class {
|
||||
});
|
||||
const WajibPajak = (module.exports.WajibPajak = class {
|
||||
constructor(args) {
|
||||
this.id = null;
|
||||
this.profile = null;
|
||||
|
|
@ -618,7 +613,9 @@ const WajibPajak = module.exports.WajibPajak = class {
|
|||
this.owners = Thrift.copyList(args.owners, [ttypes.User]);
|
||||
}
|
||||
if (args.taxObligations !== undefined && args.taxObligations !== null) {
|
||||
this.taxObligations = Thrift.copyList(args.taxObligations, [ttypes.WajibPajakTaxObligation]);
|
||||
this.taxObligations = Thrift.copyList(args.taxObligations, [
|
||||
ttypes.WajibPajakTaxObligation,
|
||||
]);
|
||||
}
|
||||
if (args.roles !== undefined && args.roles !== null) {
|
||||
this.roles = Thrift.copyList(args.roles, [ttypes.Role]);
|
||||
|
|
@ -626,7 +623,7 @@ const WajibPajak = module.exports.WajibPajak = class {
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -708,7 +705,7 @@ const WajibPajak = module.exports.WajibPajak = class {
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('WajibPajak');
|
||||
if (this.id !== null && this.id !== undefined) {
|
||||
output.writeFieldBegin('id', Thrift.Type.I64, 1);
|
||||
|
|
@ -760,9 +757,8 @@ const WajibPajak = module.exports.WajibPajak = class {
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
const Pagination = module.exports.Pagination = class {
|
||||
});
|
||||
const Pagination = (module.exports.Pagination = class {
|
||||
constructor(args) {
|
||||
this.page = null;
|
||||
this.rowsPerPage = null;
|
||||
|
|
@ -776,7 +772,7 @@ const Pagination = module.exports.Pagination = class {
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -809,7 +805,7 @@ const Pagination = module.exports.Pagination = class {
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('Pagination');
|
||||
if (this.page !== null && this.page !== undefined) {
|
||||
output.writeFieldBegin('page', Thrift.Type.I64, 1);
|
||||
|
|
@ -825,9 +821,8 @@ const Pagination = module.exports.Pagination = class {
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
const AlertInfo = module.exports.AlertInfo = class {
|
||||
});
|
||||
const AlertInfo = (module.exports.AlertInfo = class {
|
||||
constructor(args) {
|
||||
this.title = null;
|
||||
this.description = null;
|
||||
|
|
@ -841,7 +836,7 @@ const AlertInfo = module.exports.AlertInfo = class {
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -874,7 +869,7 @@ const AlertInfo = module.exports.AlertInfo = class {
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('AlertInfo');
|
||||
if (this.title !== null && this.title !== undefined) {
|
||||
output.writeFieldBegin('title', Thrift.Type.STRING, 1);
|
||||
|
|
@ -890,9 +885,8 @@ const AlertInfo = module.exports.AlertInfo = class {
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
const LoginRequest = module.exports.LoginRequest = class {
|
||||
});
|
||||
const LoginRequest = (module.exports.LoginRequest = class {
|
||||
constructor(args) {
|
||||
this.username = null;
|
||||
this.password = null;
|
||||
|
|
@ -906,7 +900,7 @@ const LoginRequest = module.exports.LoginRequest = class {
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -939,7 +933,7 @@ const LoginRequest = module.exports.LoginRequest = class {
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('LoginRequest');
|
||||
if (this.username !== null && this.username !== undefined) {
|
||||
output.writeFieldBegin('username', Thrift.Type.STRING, 1);
|
||||
|
|
@ -955,9 +949,8 @@ const LoginRequest = module.exports.LoginRequest = class {
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
const LoginResponse = module.exports.LoginResponse = class {
|
||||
});
|
||||
const LoginResponse = (module.exports.LoginResponse = class {
|
||||
constructor(args) {
|
||||
this.trkToken = null;
|
||||
this.token = null;
|
||||
|
|
@ -975,7 +968,7 @@ const LoginResponse = module.exports.LoginResponse = class {
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -1016,7 +1009,7 @@ const LoginResponse = module.exports.LoginResponse = class {
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('LoginResponse');
|
||||
if (this.trkToken !== null && this.trkToken !== undefined) {
|
||||
output.writeFieldBegin('trkToken', Thrift.Type.STRING, 1);
|
||||
|
|
@ -1037,9 +1030,8 @@ const LoginResponse = module.exports.LoginResponse = class {
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
const LogoutRequest = module.exports.LogoutRequest = class {
|
||||
});
|
||||
const LogoutRequest = (module.exports.LogoutRequest = class {
|
||||
constructor(args) {
|
||||
this.token = null;
|
||||
if (args) {
|
||||
|
|
@ -1049,7 +1041,7 @@ const LogoutRequest = module.exports.LogoutRequest = class {
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -1078,7 +1070,7 @@ const LogoutRequest = module.exports.LogoutRequest = class {
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('LogoutRequest');
|
||||
if (this.token !== null && this.token !== undefined) {
|
||||
output.writeFieldBegin('token', Thrift.Type.STRING, 1);
|
||||
|
|
@ -1089,13 +1081,11 @@ const LogoutRequest = module.exports.LogoutRequest = class {
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
});
|
||||
const LogoutResponse = (module.exports.LogoutResponse = class {
|
||||
constructor(args) {}
|
||||
|
||||
};
|
||||
const LogoutResponse = module.exports.LogoutResponse = class {
|
||||
constructor(args) {
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -1110,19 +1100,17 @@ const LogoutResponse = module.exports.LogoutResponse = class {
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('LogoutResponse');
|
||||
output.writeFieldStop();
|
||||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
});
|
||||
const GetProfileRequest = (module.exports.GetProfileRequest = class {
|
||||
constructor(args) {}
|
||||
|
||||
};
|
||||
const GetProfileRequest = module.exports.GetProfileRequest = class {
|
||||
constructor(args) {
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -1137,15 +1125,14 @@ const GetProfileRequest = module.exports.GetProfileRequest = class {
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('GetProfileRequest');
|
||||
output.writeFieldStop();
|
||||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
const GetProfileResponse = module.exports.GetProfileResponse = class {
|
||||
});
|
||||
const GetProfileResponse = (module.exports.GetProfileResponse = class {
|
||||
constructor(args) {
|
||||
this.profile = null;
|
||||
if (args) {
|
||||
|
|
@ -1155,7 +1142,7 @@ const GetProfileResponse = module.exports.GetProfileResponse = class {
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -1185,7 +1172,7 @@ const GetProfileResponse = module.exports.GetProfileResponse = class {
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('GetProfileResponse');
|
||||
if (this.profile !== null && this.profile !== undefined) {
|
||||
output.writeFieldBegin('profile', Thrift.Type.STRUCT, 2);
|
||||
|
|
@ -1196,9 +1183,8 @@ const GetProfileResponse = module.exports.GetProfileResponse = class {
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
const GetUserListRequest = module.exports.GetUserListRequest = class {
|
||||
});
|
||||
const GetUserListRequest = (module.exports.GetUserListRequest = class {
|
||||
constructor(args) {
|
||||
this.pagination = null;
|
||||
this.searchTerm = null;
|
||||
|
|
@ -1212,7 +1198,7 @@ const GetUserListRequest = module.exports.GetUserListRequest = class {
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -1246,7 +1232,7 @@ const GetUserListRequest = module.exports.GetUserListRequest = class {
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('GetUserListRequest');
|
||||
if (this.pagination !== null && this.pagination !== undefined) {
|
||||
output.writeFieldBegin('pagination', Thrift.Type.STRUCT, 1);
|
||||
|
|
@ -1262,9 +1248,8 @@ const GetUserListRequest = module.exports.GetUserListRequest = class {
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
const GetUserListResponse = module.exports.GetUserListResponse = class {
|
||||
});
|
||||
const GetUserListResponse = (module.exports.GetUserListResponse = class {
|
||||
constructor(args) {
|
||||
this.pagination = null;
|
||||
this.totalUsers = null;
|
||||
|
|
@ -1282,7 +1267,7 @@ const GetUserListResponse = module.exports.GetUserListResponse = class {
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -1332,7 +1317,7 @@ const GetUserListResponse = module.exports.GetUserListResponse = class {
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('GetUserListResponse');
|
||||
if (this.pagination !== null && this.pagination !== undefined) {
|
||||
output.writeFieldBegin('pagination', Thrift.Type.STRUCT, 1);
|
||||
|
|
@ -1360,9 +1345,8 @@ const GetUserListResponse = module.exports.GetUserListResponse = class {
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
const CreateUserRequest = module.exports.CreateUserRequest = class {
|
||||
});
|
||||
const CreateUserRequest = (module.exports.CreateUserRequest = class {
|
||||
constructor(args) {
|
||||
this.user = null;
|
||||
if (args) {
|
||||
|
|
@ -1372,7 +1356,7 @@ const CreateUserRequest = module.exports.CreateUserRequest = class {
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -1402,7 +1386,7 @@ const CreateUserRequest = module.exports.CreateUserRequest = class {
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('CreateUserRequest');
|
||||
if (this.user !== null && this.user !== undefined) {
|
||||
output.writeFieldBegin('user', Thrift.Type.STRUCT, 1);
|
||||
|
|
@ -1413,13 +1397,11 @@ const CreateUserRequest = module.exports.CreateUserRequest = class {
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
});
|
||||
const CreateUserResponse = (module.exports.CreateUserResponse = class {
|
||||
constructor(args) {}
|
||||
|
||||
};
|
||||
const CreateUserResponse = module.exports.CreateUserResponse = class {
|
||||
constructor(args) {
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -1434,15 +1416,14 @@ const CreateUserResponse = module.exports.CreateUserResponse = class {
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('CreateUserResponse');
|
||||
output.writeFieldStop();
|
||||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
const DeleteUsersRequest = module.exports.DeleteUsersRequest = class {
|
||||
});
|
||||
const DeleteUsersRequest = (module.exports.DeleteUsersRequest = class {
|
||||
constructor(args) {
|
||||
this.userIds = null;
|
||||
if (args) {
|
||||
|
|
@ -1452,7 +1433,7 @@ const DeleteUsersRequest = module.exports.DeleteUsersRequest = class {
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -1489,7 +1470,7 @@ const DeleteUsersRequest = module.exports.DeleteUsersRequest = class {
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('DeleteUsersRequest');
|
||||
if (this.userIds !== null && this.userIds !== undefined) {
|
||||
output.writeFieldBegin('userIds', Thrift.Type.LIST, 1);
|
||||
|
|
@ -1507,9 +1488,8 @@ const DeleteUsersRequest = module.exports.DeleteUsersRequest = class {
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
const DeleteUsersResponse = module.exports.DeleteUsersResponse = class {
|
||||
});
|
||||
const DeleteUsersResponse = (module.exports.DeleteUsersResponse = class {
|
||||
constructor(args) {
|
||||
this.success = null;
|
||||
this.ignored = null;
|
||||
|
|
@ -1523,7 +1503,7 @@ const DeleteUsersResponse = module.exports.DeleteUsersResponse = class {
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -1572,7 +1552,7 @@ const DeleteUsersResponse = module.exports.DeleteUsersResponse = class {
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('DeleteUsersResponse');
|
||||
if (this.success !== null && this.success !== undefined) {
|
||||
output.writeFieldBegin('success', Thrift.Type.LIST, 1);
|
||||
|
|
@ -1602,9 +1582,8 @@ const DeleteUsersResponse = module.exports.DeleteUsersResponse = class {
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
const GetWajibPajakListRequest = module.exports.GetWajibPajakListRequest = class {
|
||||
});
|
||||
const GetWajibPajakListRequest = (module.exports.GetWajibPajakListRequest = class {
|
||||
constructor(args) {
|
||||
this.pagination = null;
|
||||
this.ownership = null;
|
||||
|
|
@ -1622,7 +1601,7 @@ const GetWajibPajakListRequest = module.exports.GetWajibPajakListRequest = class
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -1663,7 +1642,7 @@ const GetWajibPajakListRequest = module.exports.GetWajibPajakListRequest = class
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('GetWajibPajakListRequest');
|
||||
if (this.pagination !== null && this.pagination !== undefined) {
|
||||
output.writeFieldBegin('pagination', Thrift.Type.STRUCT, 1);
|
||||
|
|
@ -1684,9 +1663,8 @@ const GetWajibPajakListRequest = module.exports.GetWajibPajakListRequest = class
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
const GetWajibPajakListResponse = module.exports.GetWajibPajakListResponse = class {
|
||||
});
|
||||
const GetWajibPajakListResponse = (module.exports.GetWajibPajakListResponse = class {
|
||||
constructor(args) {
|
||||
this.pagination = null;
|
||||
this.totalWajibPajak = null;
|
||||
|
|
@ -1704,7 +1682,7 @@ const GetWajibPajakListResponse = module.exports.GetWajibPajakListResponse = cla
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -1754,7 +1732,7 @@ const GetWajibPajakListResponse = module.exports.GetWajibPajakListResponse = cla
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('GetWajibPajakListResponse');
|
||||
if (this.pagination !== null && this.pagination !== undefined) {
|
||||
output.writeFieldBegin('pagination', Thrift.Type.STRUCT, 1);
|
||||
|
|
@ -1782,9 +1760,8 @@ const GetWajibPajakListResponse = module.exports.GetWajibPajakListResponse = cla
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
const CreateWajibPajakRequest = module.exports.CreateWajibPajakRequest = class {
|
||||
});
|
||||
const CreateWajibPajakRequest = (module.exports.CreateWajibPajakRequest = class {
|
||||
constructor(args) {
|
||||
this.wajibPajak = null;
|
||||
if (args) {
|
||||
|
|
@ -1794,7 +1771,7 @@ const CreateWajibPajakRequest = module.exports.CreateWajibPajakRequest = class {
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -1824,7 +1801,7 @@ const CreateWajibPajakRequest = module.exports.CreateWajibPajakRequest = class {
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('CreateWajibPajakRequest');
|
||||
if (this.wajibPajak !== null && this.wajibPajak !== undefined) {
|
||||
output.writeFieldBegin('wajibPajak', Thrift.Type.STRUCT, 1);
|
||||
|
|
@ -1835,13 +1812,11 @@ const CreateWajibPajakRequest = module.exports.CreateWajibPajakRequest = class {
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
});
|
||||
const CreateWajibPajakResponse = (module.exports.CreateWajibPajakResponse = class {
|
||||
constructor(args) {}
|
||||
|
||||
};
|
||||
const CreateWajibPajakResponse = module.exports.CreateWajibPajakResponse = class {
|
||||
constructor(args) {
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -1856,15 +1831,14 @@ const CreateWajibPajakResponse = module.exports.CreateWajibPajakResponse = class
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('CreateWajibPajakResponse');
|
||||
output.writeFieldStop();
|
||||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
const DeleteWajibpajakListRequest = module.exports.DeleteWajibpajakListRequest = class {
|
||||
});
|
||||
const DeleteWajibpajakListRequest = (module.exports.DeleteWajibpajakListRequest = class {
|
||||
constructor(args) {
|
||||
this.wpIds = null;
|
||||
if (args) {
|
||||
|
|
@ -1874,7 +1848,7 @@ const DeleteWajibpajakListRequest = module.exports.DeleteWajibpajakListRequest =
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -1911,7 +1885,7 @@ const DeleteWajibpajakListRequest = module.exports.DeleteWajibpajakListRequest =
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('DeleteWajibpajakListRequest');
|
||||
if (this.wpIds !== null && this.wpIds !== undefined) {
|
||||
output.writeFieldBegin('wpIds', Thrift.Type.LIST, 1);
|
||||
|
|
@ -1929,9 +1903,8 @@ const DeleteWajibpajakListRequest = module.exports.DeleteWajibpajakListRequest =
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
const DeleteWajibpajakListResponse = module.exports.DeleteWajibpajakListResponse = class {
|
||||
});
|
||||
const DeleteWajibpajakListResponse = (module.exports.DeleteWajibpajakListResponse = class {
|
||||
constructor(args) {
|
||||
this.success = null;
|
||||
this.ignored = null;
|
||||
|
|
@ -1945,7 +1918,7 @@ const DeleteWajibpajakListResponse = module.exports.DeleteWajibpajakListResponse
|
|||
}
|
||||
}
|
||||
|
||||
read (input) {
|
||||
read(input) {
|
||||
input.readStructBegin();
|
||||
while (true) {
|
||||
const ret = input.readFieldBegin();
|
||||
|
|
@ -1994,7 +1967,7 @@ const DeleteWajibpajakListResponse = module.exports.DeleteWajibpajakListResponse
|
|||
return;
|
||||
}
|
||||
|
||||
write (output) {
|
||||
write(output) {
|
||||
output.writeStructBegin('DeleteWajibpajakListResponse');
|
||||
if (this.success !== null && this.success !== undefined) {
|
||||
output.writeFieldBegin('success', Thrift.Type.LIST, 1);
|
||||
|
|
@ -2024,5 +1997,4 @@ const DeleteWajibpajakListResponse = module.exports.DeleteWajibpajakListResponse
|
|||
output.writeStructEnd();
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>WPW-CTL</title>
|
||||
<title>Vite + Vue + TS</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "frontend",
|
||||
"name": "frontend2",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
|
|
@ -14,82 +14,50 @@
|
|||
"@algolia/client-search": "^4.14.2",
|
||||
"@heroicons/vue": "^2.0.13",
|
||||
"@vueuse/core": "^9.4.0",
|
||||
"classnames": "^2.3.2",
|
||||
"flowbite": "1.5.0",
|
||||
"flowbite-vue": "^0.0.6",
|
||||
"pinia": "^2.0.23",
|
||||
"node-int64": "^0.4.0",
|
||||
"node-stdlib-browser": "^1.2.0",
|
||||
"pinia": "^2.0.27",
|
||||
"thrift": "^0.16.0",
|
||||
"vue": "^3.2.41",
|
||||
"vue-router": "^4.1.6",
|
||||
"vue3-easy-data-table": "^1.5.12",
|
||||
"vue3-easy-data-table": "^1.5.20",
|
||||
"vue3-perfect-scrollbar": "^1.6.1"
|
||||
|
||||
},
|
||||
"devDependencies": {
|
||||
"node-stdlib-browser": "^1.2.0",
|
||||
"@ampproject/rollup-plugin-closure-compiler": "^0.27.0",
|
||||
"@babel/core": "^7.0.0",
|
||||
"@babel/plugin-syntax-class-properties": "^7.12.13",
|
||||
"@babel/plugin-transform-classes": "^7.19.0",
|
||||
"@babel/preset-env": "^7.19.4",
|
||||
"@esbuild-plugins/node-globals-polyfill": "^0.1.1",
|
||||
"@esbuild-plugins/node-modules-polyfill": "^0.1.4",
|
||||
"@lopatnov/rollup-plugin-uglify": "^2.1.5",
|
||||
"@originjs/vite-plugin-commonjs": "^1.0.3",
|
||||
"@rollup/plugin-babel": "^6.0.2",
|
||||
"@rollup/plugin-commonjs": "^22.0.2",
|
||||
"@rollup/plugin-inject": "^4.0.4",
|
||||
"@rollup/plugin-node-resolve": "^13.3.0",
|
||||
"@rollup/plugin-commonjs": "^23.0.3",
|
||||
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||
"@rollup/plugin-terser": "^0.1.0",
|
||||
"@rushstack/eslint-patch": "^1.2.0",
|
||||
"@types/node": "^16.18.3",
|
||||
"@types/thrift": "^0.10.11",
|
||||
"@vitejs/plugin-legacy": "^2.3.0",
|
||||
"@vitejs/plugin-vue": "^3.2.0",
|
||||
"@vitejs/plugin-vue-jsx": "^2.1.0",
|
||||
"@vitejs/plugin-vue-jsx": "^2.1.1",
|
||||
"@vue/eslint-config-prettier": "^7.0.0",
|
||||
"@vue/eslint-config-typescript": "^11.0.2",
|
||||
"@vue/tsconfig": "^0.1.3",
|
||||
"@vuedx/typecheck": "^0.7.6",
|
||||
"@vuedx/typescript-plugin-vue": "^0.7.6",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"babel-plugin-minify-dead-code-elimination": "^0.5.2",
|
||||
"class-names": "^1.0.0",
|
||||
"esbuild": "*",
|
||||
"eslint": "^8.5.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-vue": "^9.7.0",
|
||||
"node-int64": "^0.4.0",
|
||||
"postcss": "^8.4.18",
|
||||
"postcss": "^8.2.15",
|
||||
"prettier": "^2.7.1",
|
||||
"rollup": "^2.79.0",
|
||||
"rollup-obfuscator": "^3.0.1",
|
||||
"rollup-plugin-node-globals": "^1.4.0",
|
||||
"rollup-plugin-node-polyfills": "^0.2.1",
|
||||
"tailwindcss": "^3.2.2",
|
||||
"terser": "^5.15.1",
|
||||
"tailwindcss": "^3",
|
||||
"typescript": "^4.6.4",
|
||||
"vite": "^3.2.0",
|
||||
"vite-plugin-chunk-split": "^0.4.3",
|
||||
"vite": "^3.2.3",
|
||||
"vite-plugin-commonjs": "^0.6.0",
|
||||
"vite-plugin-node-stdlib-browser": "^0.1.1",
|
||||
"vue-router": "^4.1.6",
|
||||
"vue-tsc": "^1.0.9"
|
||||
},
|
||||
"eslintConfigxxx": {
|
||||
"root": true,
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true,
|
||||
"es6": true
|
||||
},
|
||||
"extendsxx": [
|
||||
"plugin:vue/essential",
|
||||
"plugin:prettier/recommended",
|
||||
"eslint:recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"parser": "babel-eslint"
|
||||
},
|
||||
"rules": {}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -4,8 +4,8 @@
|
|||
import NavigationBar from './components/NavigationBar.vue';
|
||||
import { useHub } from './hub';
|
||||
import { useTheme } from './stores/theme';
|
||||
import /* * as */structs from '@thriftgen/structs_types';
|
||||
import /* * as */exceptions from '@thriftgen/exceptions_types';
|
||||
import /* * as */ structs from '@thriftgen/structs_types';
|
||||
import /* * as */ exceptions from '@thriftgen/exceptions_types';
|
||||
import { RouteMeta, useRouter } from 'vue-router';
|
||||
import { AlertType, useAlert } from './stores/alert';
|
||||
import { useAuth } from './stores/auth';
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { useAlert } from '@/stores/alert';
|
|||
import { useAuth } from '@/stores/auth';
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { RouteLocationRaw, RouterLink, useRouter } from 'vue-router';
|
||||
import /* * as */structs from '@thriftgen/structs_types';
|
||||
import /* * as */ structs from '@thriftgen/structs_types';
|
||||
import SpinnerIcon from './SpinnerIcon.vue';
|
||||
import { NavbarLinkMeta } from '@/router';
|
||||
const auth = useAuth();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { ThriftClient } from './xhr_client';
|
||||
import /* * as */Core from '@thriftgen/CoreService';
|
||||
import /* * as */ Core from '@thriftgen/CoreService';
|
||||
import { ServiceType } from './service_type';
|
||||
import { ClientOptions } from '.';
|
||||
import { defaultClientOptions } from './defaults';
|
||||
|
|
|
|||
|
|
@ -8,7 +8,12 @@ import {
|
|||
} from 'thrift';
|
||||
import { computed } from 'vue';
|
||||
import { ClientOptions } from '.';
|
||||
import { CookieKeyAuthToken, CookieKeyTrackToken, HeaderKeyAuthToken, HeaderKeyTrackToken } from './hub';
|
||||
import {
|
||||
CookieKeyAuthToken,
|
||||
CookieKeyTrackToken,
|
||||
HeaderKeyAuthToken,
|
||||
HeaderKeyTrackToken,
|
||||
} from './hub';
|
||||
|
||||
export function initXHRClient<TClient>(
|
||||
clientCtor: TClientConstructor<TClient>,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { defineStore } from 'pinia';
|
||||
|
||||
import /* * as */structs from '@thriftgen/structs_types';
|
||||
import /* * as */ structs from '@thriftgen/structs_types';
|
||||
import { deleteCookie, getCookie, setCookie } from '@/utils/cookie';
|
||||
import { CookieKeyAuthToken, CookieKeyTrackToken } from '@/hub/hub';
|
||||
import { RemovableRef, useLocalStorage } from '@vueuse/core';
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export const useTheme = defineStore({
|
|||
return state._darkTheme;
|
||||
},
|
||||
navigationBarVisibility(state): boolean {
|
||||
return state._navigationBarVisibility
|
||||
return state._navigationBarVisibility;
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import /* * as */structs from '@thriftgen/structs_types';
|
||||
import /* * as */exceptions from '@thriftgen/exceptions_types';
|
||||
import /* * as */ structs from '@thriftgen/structs_types';
|
||||
import /* * as */ exceptions from '@thriftgen/exceptions_types';
|
||||
import { useHub } from '@/hub';
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import type { Header, Item, ServerOptions, SortType } from 'vue3-easy-data-table';
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ const auth = useAuth();
|
|||
<HeadingPage
|
||||
>Welcome<span v-if="auth.profile">, {{ auth.profile?.displayName }}</span></HeadingPage
|
||||
>
|
||||
|
||||
<a class="text-blue-600" href="https://git.obj.my.id/study-dumps/wpw-final">Source code</a>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import LoginCard from '@/views/core/components/LoginCard.vue';
|
|||
import NavigationBar from '@/components/NavigationBar.vue';
|
||||
import { useAuth } from '@/stores/auth';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import /* * as */structs from '@thriftgen/structs_types';
|
||||
import /* * as */exceptions from '@thriftgen/exceptions_types';
|
||||
import /* * as */ structs from '@thriftgen/structs_types';
|
||||
import /* * as */ exceptions from '@thriftgen/exceptions_types';
|
||||
import { useAlert } from '@/stores/alert';
|
||||
import { computed, watch } from 'vue';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<script lang="ts" setup>
|
||||
import AlertBox from '@/components/AlertBox.vue';
|
||||
import { useHub } from '@/hub';
|
||||
import /* * as */structs from '@thriftgen/structs_types';
|
||||
import /* * as */exceptions from '@thriftgen/exceptions_types';
|
||||
import /* * as */ structs from '@thriftgen/structs_types';
|
||||
import /* * as */ exceptions from '@thriftgen/exceptions_types';
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { Header, Item, ServerOptions, SortType } from 'vue3-easy-data-table';
|
||||
import HeadingPage from './components/HeadingPage.vue';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { useHub } from '@/hub';
|
||||
import /* * as */structs from '@thriftgen/structs_types';
|
||||
import /* * as */ structs from '@thriftgen/structs_types';
|
||||
import { EyeIcon, EyeSlashIcon } from '@heroicons/vue/24/solid';
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import AlertBox from '@/components/AlertBox.vue';
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ function hide() {
|
|||
onMounted(() => {
|
||||
const targetEl = refTargetEl.value;
|
||||
|
||||
let options: any = {
|
||||
const options: any = {
|
||||
onHide: () => {
|
||||
console.log('modal hide');
|
||||
emit('onHide');
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@ import HomeView from './HomeView.vue';
|
|||
import LoginView from './LoginView.vue';
|
||||
import UserWajibPajakListViewVue from './UserWajibPajakListView.vue';
|
||||
|
||||
|
||||
|
||||
export function routes(): RouteRecordRaw[] {
|
||||
return [
|
||||
{
|
||||
|
|
|
|||
1
frontend/src/vite-env.d.ts
vendored
1
frontend/src/vite-env.d.ts
vendored
|
|
@ -3,6 +3,5 @@
|
|||
declare module '*.vue' {
|
||||
import type { DefineComponent } from 'vue';
|
||||
const component: DefineComponent<{}, {}, any>;
|
||||
|
||||
export default component;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,9 @@
|
|||
"paths": {
|
||||
"@/*": ["./src/*"],
|
||||
"@thriftgen/*": ["./gen/*"],
|
||||
// "@flowbite-vue": ["./3rdparty/flowbite-vue/src/*"],
|
||||
},
|
||||
// "target": "ESNext",
|
||||
// "module": "ESNext",
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"target": "ES5",
|
||||
"sourceMap": true,
|
||||
"useDefineForClassFields": true,
|
||||
"moduleResolution": "Node",
|
||||
"strict": true,
|
||||
|
|
@ -19,14 +15,15 @@
|
|||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"esModuleInterop": true,
|
||||
"noImplicitReturns": true,
|
||||
"lib": ["ESNext", "DOM"],
|
||||
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
||||
"plugins": [{ "name": "@vuedx/typescript-plugin-vue" }],
|
||||
"skipLibCheck": true,
|
||||
"noEmit": true
|
||||
"noEmit": true,
|
||||
"types": [
|
||||
// "webpack-env",
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"env.d.ts",
|
||||
"src/**/*.ts",
|
||||
"src/**/*.d.ts",
|
||||
"src/**/*.tsx",
|
||||
|
|
|
|||
|
|
@ -10,6 +10,6 @@
|
|||
"include": [
|
||||
"package.json",
|
||||
"vite.config.ts",
|
||||
"vite-polyfill-aliases.ts",
|
||||
"vite-polyfill-aliases.ts"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,10 @@
|
|||
export default {
|
||||
// This Rollup aliases are extracted from @esbuild-plugins/node-modules-polyfill,
|
||||
// see https://github.com/remorses/esbuild-plugins/blob/master/node-modules-polyfill/src/polyfills.ts
|
||||
// process and buffer are excluded because already managed
|
||||
// by node-globals-polyfill
|
||||
// https://github.com/vitejs/vite/issues/9511
|
||||
|
||||
util: 'rollup-plugin-node-polyfills/polyfills/util',
|
||||
sys: 'util',
|
||||
events: 'rollup-plugin-node-polyfills/polyfills/events',
|
||||
|
|
@ -27,6 +33,4 @@ export default {
|
|||
buffer: 'rollup-plugin-node-polyfills/polyfills/buffer-es6',
|
||||
process: 'rollup-plugin-node-polyfills/polyfills/process-es6',
|
||||
|
||||
// Buffer: 'buffer/',
|
||||
// process: 'rollup-plugin-node-globals',
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import { Plugin } from 'rollup';
|
||||
|
||||
import { fileURLToPath, URL } from 'node:url';
|
||||
import { defineConfig, optimizeDeps } from 'vite';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
|
|
@ -7,28 +9,66 @@ import { esbuildCommonjs, viteCommonjs } from '@originjs/vite-plugin-commonjs';
|
|||
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill';
|
||||
import { NodeModulesPolyfillPlugin } from '@esbuild-plugins/node-modules-polyfill';
|
||||
|
||||
import { Plugin } from 'rollup';
|
||||
|
||||
import { splitVendorChunkPlugin } from 'vite';
|
||||
import rollupNodePolyfills from 'rollup-plugin-node-polyfills';
|
||||
import viteNodePolyfills from 'vite-plugin-node-stdlib-browser';
|
||||
import { nodeResolve as rollupNodeResolve } from '@rollup/plugin-node-resolve';
|
||||
import rollupCommonjs from '@rollup/plugin-commonjs';
|
||||
import terser from '@rollup/plugin-terser';
|
||||
import compiler from '@ampproject/rollup-plugin-closure-compiler';
|
||||
import { babel, getBabelOutputPlugin } from '@rollup/plugin-babel';
|
||||
import legacy from '@vitejs/plugin-legacy';
|
||||
import uglify from '@lopatnov/rollup-plugin-uglify';
|
||||
import { obfuscator } from 'rollup-obfuscator';
|
||||
import { chunkSplitPlugin } from 'vite-plugin-chunk-split';
|
||||
|
||||
import { dependencies } from './package.json';
|
||||
import polyfillAliases from './vite-polyfill-aliases';
|
||||
import { resolve } from 'node:path';
|
||||
import { dependencies } from './package.json';
|
||||
|
||||
export function injectSecPlugin(mode) {
|
||||
return ['production', 'live'].indexOf(mode) !== -1 ? secPlugins : [];
|
||||
function injectSecPlugin(mode) {
|
||||
return ['production', 'live', 'prod'].indexOf(mode) !== -1 ? secPlugins : [];
|
||||
}
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig(({ command, mode, ssrBuild }) => {
|
||||
return {
|
||||
plugins: [viteCommonjs(), vue(), vueJsx()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
'@thriftgen': fileURLToPath(new URL('./gen', import.meta.url)),
|
||||
|
||||
...polyfillAliases,
|
||||
},
|
||||
},
|
||||
define: {
|
||||
global: 'globalThis',
|
||||
},
|
||||
optimizeDeps: {
|
||||
esbuildOptions: {
|
||||
define: { global: 'globalThis' },
|
||||
plugins: [
|
||||
NodeGlobalsPolyfillPlugin({
|
||||
process: true,
|
||||
buffer: true,
|
||||
}),
|
||||
NodeModulesPolyfillPlugin(),
|
||||
],
|
||||
},
|
||||
},
|
||||
build: {
|
||||
outDir: '../public',
|
||||
manifest: true,
|
||||
minify: false,
|
||||
rollupOptions: {
|
||||
plugins: [
|
||||
rollupNodePolyfills(),
|
||||
rollupNodeResolve(),
|
||||
rollupCommonjs({}),
|
||||
esbuildCommonjs(['thrift']),
|
||||
|
||||
...injectSecPlugin(mode),
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
import { obfuscator } from 'rollup-obfuscator';
|
||||
import terser from '@rollup/plugin-terser';
|
||||
|
||||
export const secPlugins: Plugin[] = [
|
||||
// NOT WORK.
|
||||
// babel({
|
||||
|
|
@ -187,163 +227,3 @@ export const secPlugins: Plugin[] = [
|
|||
},
|
||||
}),
|
||||
];
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
|
||||
export default defineConfig(({ command, mode, ssrBuild }) => {
|
||||
return {
|
||||
plugins: [viteCommonjs(), vue(), vueJsx()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
'@thriftgen': fileURLToPath(new URL('./gen', import.meta.url)),
|
||||
|
||||
...polyfillAliases,
|
||||
},
|
||||
},
|
||||
define: {
|
||||
global: 'window',
|
||||
},
|
||||
optimizeDeps: {
|
||||
esbuildOptions: {
|
||||
define: { global: 'globalThis' },
|
||||
plugins: [
|
||||
NodeGlobalsPolyfillPlugin({
|
||||
process: true,
|
||||
buffer: true,
|
||||
}),
|
||||
NodeModulesPolyfillPlugin(),
|
||||
],
|
||||
},
|
||||
// exclude: ['flowbite', 'flowbite-vue', 'thrift'],
|
||||
},
|
||||
build: {
|
||||
outDir: '../public',
|
||||
manifest: true,
|
||||
minify: false,
|
||||
rollupOptions: {
|
||||
input: {
|
||||
main: resolve(__dirname, 'index.html'),
|
||||
},
|
||||
output: {
|
||||
// to be able to use manual chunk - iife
|
||||
// inlineDynamicImports: true,
|
||||
manualChunks(id, { getModuleInfo, getModuleIds }) {
|
||||
// const dynImpIds = getModuleInfo(id).dynamicImporters;
|
||||
|
||||
// if (/(gen\/|thrift|Thrift|util|events|inherits|WebSocket|Int64|ws)/.test(id)) return 'ext';
|
||||
// if (/flowbite/.test(id)) return 'flowbite';
|
||||
// if (/data-table/.test(id)) return 'edt';
|
||||
// if (/scrollbar/.test(id)) return 'scrollbar';
|
||||
// if (/(node_modules)/.test(id)) return 'vendor';
|
||||
|
||||
// if (id in dependencies) {
|
||||
// return 'vendor';
|
||||
// }
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
rollupNodePolyfills(),
|
||||
rollupNodeResolve(),
|
||||
rollupCommonjs({}),
|
||||
esbuildCommonjs(['thrift']),
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
export const x = defineConfig(({ command, mode, ssrBuild }) => {
|
||||
return {
|
||||
plugins: [viteNodePolyfills(), viteCommonjs(), vue(), vueJsx()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
'@thriftgen': fileURLToPath(new URL('./gen', import.meta.url)),
|
||||
// '@flowbite-vue': fileURLToPath(new URL('./3rdparty/flowbite-vue/src', import.meta.url)),
|
||||
|
||||
...polyfillAliases,
|
||||
},
|
||||
},
|
||||
optimizeDeps: {
|
||||
esbuildOptions: {
|
||||
define: { global: 'globalThis' },
|
||||
plugins: [
|
||||
NodeGlobalsPolyfillPlugin({
|
||||
process: true,
|
||||
buffer: true,
|
||||
}),
|
||||
NodeModulesPolyfillPlugin(),
|
||||
],
|
||||
},
|
||||
// include: [],
|
||||
// exclude: [/@thriftgen/],
|
||||
// exclude: [
|
||||
// 'flowbite',
|
||||
// 'flowbite-vue',
|
||||
// 'thrift',
|
||||
// 'vue3-easy-data-table',
|
||||
// 'vue3-perfect-scrollbar',
|
||||
// ...['structs_types', 'exceptions_types', 'CoreService'].map((x) => '@thriftgen/' + x),
|
||||
// ],
|
||||
},
|
||||
build: {
|
||||
outDir: '../public',
|
||||
manifest: true,
|
||||
// minify: 'terser',
|
||||
minify: false,
|
||||
|
||||
// target: 'esnext',
|
||||
|
||||
rollupOptions: {
|
||||
// input: {
|
||||
// main: resolve(__dirname, 'index.html'),
|
||||
// },
|
||||
// output: {
|
||||
// // format: 'iife',
|
||||
// // format: 'cjs',
|
||||
// globals: {
|
||||
// // vue: "Vue"
|
||||
// },
|
||||
|
||||
// // to be able to use manual chunk - iife
|
||||
// // inlineDynamicImports: true,
|
||||
// // manualChunks(id, { getModuleInfo, getModuleIds }) {
|
||||
// // // if (/(gen\/|thrift|Thrift|util|inherits|WebSocket|Int64)/.test(id)) return 'ext';
|
||||
// // // const dynImpIds = getModuleInfo(id).dynamicImporters;
|
||||
// // if (/data-table/.test(id)) return 'edt';
|
||||
// // if (/(node_modules)/.test(id)) return 'vendor';
|
||||
// // // if (id in dependencies) {
|
||||
// // // return 'vendor';
|
||||
// // // }
|
||||
// // },
|
||||
// },
|
||||
external: [
|
||||
// "vue",
|
||||
],
|
||||
plugins: [
|
||||
// chunkSplitPlugin({
|
||||
// strategy: 'single-vendor',
|
||||
// customSplitting: {
|
||||
// 'thrift-vendor': ['thrift'],
|
||||
// 'flowbite-vendor': ['flowbite'],
|
||||
// },
|
||||
// }),
|
||||
|
||||
// splitVendorChunkPlugin(),
|
||||
rollupNodePolyfills(),
|
||||
rollupNodeResolve(),
|
||||
rollupCommonjs({}),
|
||||
esbuildCommonjs(['thrift']),
|
||||
|
||||
// NOT WORK.
|
||||
// ...legacy({
|
||||
// targets: ['defaults', 'IE 11'],
|
||||
// }),
|
||||
|
||||
...injectSecPlugin(mode),
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
12728
public/assets/index.d28a354c.js
Normal file
12728
public/assets/index.d28a354c.js
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -5,7 +5,7 @@
|
|||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Vite + Vue + TS</title>
|
||||
<script type="module" crossorigin src="/assets/index.241d8ed5.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index.d28a354c.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index.d6f403e9.css">
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"index.html": {
|
||||
"file": "assets/index.241d8ed5.js",
|
||||
"file": "assets/index.d28a354c.js",
|
||||
"src": "index.html",
|
||||
"isEntry": true,
|
||||
"css": [
|
||||
|
|
|
|||
Loading…
Reference in a new issue