@autobusal/providers 1.0.59 → 1.0.60

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.
@@ -27,9 +27,7 @@ apiClient.interceptors.response.use(response => (
27
27
  if (error.response) {
28
28
  // if we have a 401, we go to the logout page
29
29
  if (error.response.status === 401) {
30
- // if (!window.location.hash) {
31
- // window.location.href = '/account/logout#redirect';
32
- // }
30
+ window.location.href = '/account/logout';
33
31
  }
34
32
 
35
33
  // if we have a 422 error, we display the message
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/providers",
3
- "version": "1.0.59",
3
+ "version": "1.0.60",
4
4
  "type": "module",
5
5
  "main": "index.ts"
6
6
  }
package/stores/page.ts ADDED
@@ -0,0 +1,15 @@
1
+ import { create } from 'zustand';
2
+
3
+ export interface PageStore {
4
+ current: string
5
+ save: (newPage: string) => void
6
+ }
7
+
8
+ const usePageStore = create<PageStore>((set) => ({
9
+ current: '',
10
+ save: (newPage) => set(() => ({
11
+ current: newPage
12
+ }))
13
+ }));
14
+
15
+ export default usePageStore;
@@ -0,0 +1,17 @@
1
+ import { AgentData } from './agents';
2
+ import { OperatorData } from './operators';
3
+
4
+ export interface TransactionData {
5
+ id: number
6
+ public_display: string[]
7
+ from?: OperatorData | AgentData
8
+ to?: OperatorData | AgentData
9
+ amount_display: string
10
+ paid_date: string
11
+ }
12
+
13
+ export interface NotificationData {
14
+ id: number
15
+ title: string
16
+ content: string
17
+ }
package/types/agents.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export interface AgentData {
2
2
  id: number
3
3
  company: string
4
+ name: string
4
5
  link: string
5
6
  logo_url: string
6
7
  description: string
@@ -3,6 +3,7 @@ import { RouteData } from './routes';
3
3
  export interface OperatorData {
4
4
  id: number
5
5
  company: string
6
+ name: string
6
7
  code: string
7
8
  link: string
8
9
  logo_url: string
package/types/users.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export interface UserData {
2
2
  id: number
3
3
  name: string
4
- type: 'operator' | 'financer'
4
+ type: 'operator' | 'financer' | 'agent'
5
5
  verified: Date
6
6
  status: number
7
7
  funds: string
@@ -0,0 +1,14 @@
1
+ export interface VisitorData {
2
+ id: number
3
+ first_name: string
4
+ last_name: string
5
+ sex: number
6
+ dob: string
7
+ passport: string
8
+ phone: string
9
+ address: string
10
+ city: string
11
+ country_id: number
12
+ company: string
13
+ nipt: string
14
+ }