summaryrefslogtreecommitdiff
path: root/src-migrate/types/tempo.ts
blob: 880a30bb352388d8dd3ec3ce17a110dcdb29cd72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
import {
  TempoSchema,
  TempoSchemaKontakPerson,
  TempoSchemaPengiriman,
  TempoSchemaSupplier,
  TempoSchemaDokumen,
} from '~/validations/tempo';
import { OdooApiRes } from './odoo';
import { z } from 'zod';

export type tempoProps = {
  name: string;
  industry_id: string;
  street: string;
  state: string;
  city: string;
  zip: string;
  mobile: string;
  bankName: string;
  accountName: string;
  accountNumber: string;
  estimasi: string;
  tempoDuration: string;
  bersedia: string;
};

export type tempoPropsKontakPerson = {
  direkturName: string;
  direkturMobile: string;
  direkturEmail: string;
  purchasingName: string;
  purchasingEmail: string;
  financeMobile: string;
  financeEmail: string;
  financeName: string;
  purchasingMobile: string;
};
export type tempoPropsPengiriman = {
  PICName: string;
  streetPengiriman: string;
  statePengiriman: string;
  cityPengiriman: string;
  streetInvoice: string;
  zip: string;
  PICBarangMobile: string;
  invoicePicMobile: string;
  invoicePic: string;
  isSameAddrees: string;
  stateInvoice: string;
  cityInvoice: string;
  tukarInvoiceInput: string;
  tukarInvoiceInputPembayaran: string;
  dokumenPengiriman: string;
  dokumenPengirimanInput: string;
  dokumenPengirimanInvoice: string;
  dokumenPengirimanInvoiceInput: string;
  dokumenProsedur: string;
};
export type tempoPropsSupplier = {
  supplier: string;
  pic: string;
  telepon: string;
  durasiTempo: string;
  creditLimit: string;
};
export type tempoPropsDokumen = {
  dokumenNib: { name: string; format: string; base64: string };
  dokumenNpwp: { name: string; format: string; base64: string };
  dokumenSppkp: { name: string; format: string; base64: string };
  dokumenAktaPerubahan: { name: string; format: string; base64: string };
  dokumenKtpDirut: { name: string; format: string; base64: string };
  dokumenAktaPendirian: { name: string; format: string; base64: string };
  dokumenLaporanKeuangan: { name: string; format: string; base64: string };
  dokumenFotoKantor: { name: string; format: string; base64: string };
  dokumenTempatBekerja: { name: string; format: string; base64: string };
};

export type TempoApiProps = OdooApiRes<TempoProps>;

export type TempoProps = z.infer<typeof TempoSchema>;
export type TempoPropsKontakPerson = z.infer<typeof TempoSchemaKontakPerson>;
export type TempoPropsPengiriman = z.infer<typeof TempoSchemaPengiriman>;
export type TempoPropsSupplier = z.infer<typeof TempoSchemaSupplier>;
export type TempoPropsDokumen = z.infer<typeof TempoSchemaDokumen>;

export type TempoResApiProps = {
  Tempo: boolean;
  reason: 'EMAIL_USED' | 'NOT_ACTIVE' | 'BISNIS_NOT_FOUND' | null;
};

type ActivationResProps = {
  activation: boolean;
  user: TempoProps | null;
};

export type ActivationTokenProps = {
  token: string;
};

export type ActivationTokenResApiProps = ActivationResProps & {
  reason: 'INVALID_TOKEN' | null;
};

export type ActivationOtpProps = {
  email: string;
  otp: string;
};

export type ActivationOtpResApiProps = ActivationResProps & {
  reason: 'INVALID_OTP' | null;
};

export type ActivationReqProps = {
  email: string;
};

export type ActivationReqResApiProps = {
  activation_request: boolean;
  reason: 'NOT_FOUND' | 'ACTIVE' | null;
};