fams-ts 1.0.2 → 1.0.3

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.
package/dist/account.d.ts CHANGED
@@ -6,15 +6,15 @@ export interface AccountCreateRequest {
6
6
  code: string;
7
7
  name?: string;
8
8
  type?: string;
9
- active?: boolean;
9
+ isActive?: boolean;
10
10
  }
11
11
  export interface AccountResponse {
12
12
  code: string;
13
13
  name: string;
14
14
  type: string;
15
- active: boolean;
15
+ isActive: boolean;
16
16
  }
17
- export interface Body_open_period_master_periods_open__period_code__post {
17
+ export interface Body_open_period_master_periods_open__period_code___post {
18
18
  startDate: string;
19
19
  endDate: string;
20
20
  }
@@ -2,11 +2,11 @@
2
2
  * Auto-generated by custom Python script.
3
3
  * Do not edit manually.
4
4
  */
5
- export interface Body_add_approval_comment_approvals__id__comment_post {
5
+ export interface Body_add_approval_comment_approvals__id__comment__post {
6
6
  userId: string;
7
7
  comment: string;
8
8
  }
9
- export interface Body_add_approval_instruction_approvals__id__instruction_post {
9
+ export interface Body_add_approval_instruction_approvals__id__instruction__post {
10
10
  createdBy: string;
11
11
  instruction: string;
12
12
  amount: number;
@@ -14,17 +14,17 @@ export interface Body_add_approval_instruction_approvals__id__instruction_post {
14
14
  payFrom: string;
15
15
  authority: string;
16
16
  }
17
- export interface Body_create_authority_approvals_authority_post {
17
+ export interface Body_create_authority_approvals_authority__post {
18
18
  name: string;
19
19
  role: string;
20
20
  reference: string;
21
21
  }
22
- export interface Body_create_destination_approvals_destination_post {
22
+ export interface Body_create_destination_approvals_destination__post {
23
23
  name: string;
24
24
  type: string;
25
25
  reference: string;
26
26
  }
27
- export interface Body_upload_payment_approval_approvals_upload_post {
27
+ export interface Body_upload_payment_approval_approvals_upload__post {
28
28
  paymentId: string;
29
29
  createdBy: string;
30
30
  file: string;
package/dist/auth.d.ts CHANGED
@@ -2,34 +2,84 @@
2
2
  * Auto-generated by custom Python script.
3
3
  * Do not edit manually.
4
4
  */
5
- export declare const DepartmentCode: {
6
- readonly MASTER_DATA: "MASTER_DATA";
7
- readonly BUDGET: "BUDGET";
8
- readonly EXPENDITURE: "EXPENDITURE";
9
- readonly RECEIPTS: "RECEIPTS";
10
- readonly ASSETS_LIABILITIES: "ASSETS_LIABILITIES";
11
- readonly REPORTING: "REPORTING";
12
- readonly GL: "GL";
13
- readonly APPROVALS: "APPROVALS";
14
- readonly TREASURY: "TREASURY";
15
- };
16
- export type DepartmentCode = typeof DepartmentCode[keyof typeof DepartmentCode];
5
+ export interface ActiveSessionSchema {
6
+ id: string;
7
+ ipAddress?: string;
8
+ userAgent?: string;
9
+ isRevoked: boolean;
10
+ createdAt: string;
11
+ expiresAt: string;
12
+ }
13
+ export interface AssignUserRoleSchema {
14
+ roleId: string;
15
+ }
16
+ export interface ChangePasswordSchema {
17
+ oldPassword: string;
18
+ newPassword: string;
19
+ }
20
+ export interface CreateDepartmentSchema {
21
+ name: string;
22
+ code: string;
23
+ }
24
+ export interface CreatePermissionSchema {
25
+ name: string;
26
+ resource: string;
27
+ action: string;
28
+ }
29
+ export interface CreateRoleSchema {
30
+ name: string;
31
+ code: string;
32
+ permissionIds?: string[];
33
+ }
34
+ export interface DepartmentSchema {
35
+ id: string;
36
+ name: string;
37
+ code: string;
38
+ }
17
39
  export interface HTTPValidationError {
18
40
  detail?: ValidationError[];
19
41
  }
42
+ export interface LoginResponseSchema {
43
+ session: SessionSchema;
44
+ user: UserInfoSchema;
45
+ }
46
+ export interface PermissionSchema {
47
+ id: string;
48
+ name: string;
49
+ code: string;
50
+ }
20
51
  export interface RefreshTokenSchema {
21
52
  refreshToken: string;
22
53
  }
23
- export declare const Role: {
24
- readonly SUPER_ADMIN: "SUPER_ADMIN";
25
- readonly ADMIN: "ADMIN";
26
- readonly EMPLOYEE: "EMPLOYEE";
27
- };
28
- export type Role = typeof Role[keyof typeof Role];
29
- export interface TokenSchema {
54
+ export interface RoleSchema {
55
+ id: string;
56
+ name: string;
57
+ code: string;
58
+ permissions?: PermissionSchema[];
59
+ }
60
+ export interface SessionSchema {
30
61
  accessToken: string;
31
62
  refreshToken: string;
32
63
  tokenType: string;
64
+ accessExpiry: string;
65
+ refreshExpiry: string;
66
+ }
67
+ export interface UpdateRoleSchema {
68
+ name?: string;
69
+ permissionIds?: string[];
70
+ }
71
+ export interface UserInfoSchema {
72
+ id: string;
73
+ username: string;
74
+ email: string;
75
+ title?: string;
76
+ firstName?: string;
77
+ middleName?: string;
78
+ lastName?: string;
79
+ avatar?: string;
80
+ role?: string;
81
+ department?: string;
82
+ isActive: boolean;
33
83
  }
34
84
  export interface UserLoginSchema {
35
85
  username: string;
@@ -39,8 +89,12 @@ export interface UserRegisterSchema {
39
89
  username: string;
40
90
  password: string;
41
91
  email: string;
42
- department: DepartmentCode;
43
- role: Role;
92
+ departmentId?: string;
93
+ roleId?: string;
94
+ title?: string;
95
+ firstName?: string;
96
+ middleName?: string;
97
+ lastName?: string;
44
98
  }
45
99
  export interface ValidationError {
46
100
  loc: number | string[];
package/dist/auth.js CHANGED
@@ -4,20 +4,3 @@
4
4
  * Do not edit manually.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.Role = exports.DepartmentCode = void 0;
8
- exports.DepartmentCode = {
9
- MASTER_DATA: 'MASTER_DATA',
10
- BUDGET: 'BUDGET',
11
- EXPENDITURE: 'EXPENDITURE',
12
- RECEIPTS: 'RECEIPTS',
13
- ASSETS_LIABILITIES: 'ASSETS_LIABILITIES',
14
- REPORTING: 'REPORTING',
15
- GL: 'GL',
16
- APPROVALS: 'APPROVALS',
17
- TREASURY: 'TREASURY',
18
- };
19
- exports.Role = {
20
- SUPER_ADMIN: 'SUPER_ADMIN',
21
- ADMIN: 'ADMIN',
22
- EMPLOYEE: 'EMPLOYEE',
23
- };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Auto-generated index.
3
3
  */
4
- export { AccountCreateRequest, AccountResponse, Body_open_period_master_periods_open__period_code__post, HTTPValidationError, OpeningBalanceRequest, OpeningBalanceResponse, PeriodResponse, ValidationError } from './account';
5
- export { Body_add_approval_comment_approvals__id__comment_post, Body_add_approval_instruction_approvals__id__instruction_post, Body_create_authority_approvals_authority_post, Body_create_destination_approvals_destination_post, Body_upload_payment_approval_approvals_upload_post } from './approvals';
6
- export { DepartmentCode, RefreshTokenSchema, Role, TokenSchema, UserLoginSchema, UserRegisterSchema } from './auth';
4
+ export { AccountCreateRequest, AccountResponse, Body_open_period_master_periods_open__period_code___post, HTTPValidationError, OpeningBalanceRequest, OpeningBalanceResponse, PeriodResponse, ValidationError } from './account';
5
+ export { Body_add_approval_comment_approvals__id__comment__post, Body_add_approval_instruction_approvals__id__instruction__post, Body_create_authority_approvals_authority__post, Body_create_destination_approvals_destination__post, Body_upload_payment_approval_approvals_upload__post } from './approvals';
6
+ export { ActiveSessionSchema, AssignUserRoleSchema, ChangePasswordSchema, CreateDepartmentSchema, CreatePermissionSchema, CreateRoleSchema, DepartmentSchema, LoginResponseSchema, PermissionSchema, RefreshTokenSchema, RoleSchema, SessionSchema, UpdateRoleSchema, UserInfoSchema, UserLoginSchema, UserRegisterSchema } from './auth';
7
7
  export { AIERequest, AIEResponse } from './budget';
8
8
  export { PaymentLineCreateRequest, PaymentLineResponse, PaymentVoucherCreateRequest, PaymentVoucherResponse } from './expenditure';
9
9
  export { RecordReceipt } from './receipts';
package/dist/index.js CHANGED
@@ -3,7 +3,3 @@
3
3
  * Auto-generated index.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Role = exports.DepartmentCode = void 0;
7
- var auth_1 = require("./auth");
8
- Object.defineProperty(exports, "DepartmentCode", { enumerable: true, get: function () { return auth_1.DepartmentCode; } });
9
- Object.defineProperty(exports, "Role", { enumerable: true, get: function () { return auth_1.Role; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fams-ts",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "TypeScript types for FAMS Backend (Auto-generated)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",