alliance-shared-types 1.0.0 → 1.0.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.
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from './types/auth.types';
2
+ export * from './types/agent.types';
package/dist/index.js CHANGED
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  // Export all types from the types directory
18
18
  __exportStar(require("./types/auth.types"), exports);
19
+ __exportStar(require("./types/agent.types"), exports);
@@ -0,0 +1,117 @@
1
+ import { type AgentType, type AgentStatus, type KycStatus } from './auth.types';
2
+ /**
3
+ * Base Agent interface with common properties used in both frontend and backend
4
+ */
5
+ export interface Agent {
6
+ agentId: string;
7
+ name: string;
8
+ parentAgentId?: string;
9
+ type: AgentType;
10
+ status: AgentStatus;
11
+ kycStatus: KycStatus;
12
+ creditLimit: number;
13
+ gstin?: string;
14
+ email?: string;
15
+ phone?: string;
16
+ address?: string;
17
+ city?: string;
18
+ state?: string;
19
+ country?: string;
20
+ pincode?: string;
21
+ createdAt: string | Date;
22
+ updatedAt: string | Date;
23
+ }
24
+ /**
25
+ * Agent creation request interface
26
+ */
27
+ export interface AgentCreate {
28
+ name: string;
29
+ parentAgentId?: string;
30
+ type: AgentType;
31
+ gstin?: string;
32
+ kycStatus?: KycStatus;
33
+ creditLimit?: number;
34
+ status?: AgentStatus;
35
+ email?: string;
36
+ phone?: string;
37
+ address?: string;
38
+ city?: string;
39
+ state?: string;
40
+ country?: string;
41
+ pincode?: string;
42
+ }
43
+ /**
44
+ * Agent update request interface
45
+ */
46
+ export interface AgentUpdate {
47
+ name?: string;
48
+ gstin?: string;
49
+ kycStatus?: KycStatus;
50
+ creditLimit?: number;
51
+ status?: AgentStatus;
52
+ email?: string;
53
+ phone?: string;
54
+ address?: string;
55
+ city?: string;
56
+ state?: string;
57
+ country?: string;
58
+ pincode?: string;
59
+ }
60
+ /**
61
+ * Agent with children (sub-agents)
62
+ */
63
+ export interface AgentWithChildren extends Agent {
64
+ children?: AgentWithChildren[];
65
+ }
66
+ /**
67
+ * Agent with users
68
+ */
69
+ export interface AgentWithUsers extends Agent {
70
+ users?: {
71
+ userId: string;
72
+ email: string;
73
+ phone: string;
74
+ role: string;
75
+ status: string;
76
+ }[];
77
+ }
78
+ /**
79
+ * Agent with wallet
80
+ */
81
+ export interface AgentWithWallet extends Agent {
82
+ wallet?: {
83
+ walletId: string;
84
+ type: string;
85
+ balance: number;
86
+ currency: string;
87
+ };
88
+ }
89
+ /**
90
+ * Agent hierarchy representation
91
+ */
92
+ export interface AgentHierarchy {
93
+ agentId: string;
94
+ name: string;
95
+ type: string;
96
+ children: AgentHierarchy[];
97
+ }
98
+ /**
99
+ * Agent search parameters
100
+ */
101
+ export interface AgentSearchParams {
102
+ type?: AgentType;
103
+ status?: AgentStatus;
104
+ parentAgentId?: string;
105
+ search?: string;
106
+ page?: number;
107
+ limit?: number;
108
+ }
109
+ /**
110
+ * Agent response format for list operations
111
+ */
112
+ export interface AgentListResponse {
113
+ data: Agent[];
114
+ total: number;
115
+ page: number;
116
+ limit: number;
117
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alliance-shared-types",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Shared TypeScript types for Alliance B2B Travel Portal",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",