@deepintel-ltd/farmpro-contracts 1.25.2 → 1.27.0
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/routes/farm-enterprises.routes.d.ts +44 -44
- package/dist/routes/farms.routes.d.ts +9 -9
- package/dist/routes/geofences.routes.d.ts +2 -2
- package/dist/routes/livestock-groups.routes.d.ts +724 -54
- package/dist/routes/livestock-groups.routes.d.ts.map +1 -1
- package/dist/routes/livestock-groups.routes.js +17 -1
- package/dist/routes/livestock.routes.d.ts +3505 -42
- package/dist/routes/livestock.routes.d.ts.map +1 -1
- package/dist/routes/livestock.routes.js +111 -1
- package/dist/routes/organizations.routes.d.ts +112 -14
- package/dist/routes/organizations.routes.d.ts.map +1 -1
- package/dist/routes/team.routes.d.ts +44 -44
- package/dist/routes/trade-cash-events.routes.d.ts +7711 -559
- package/dist/routes/trade-cash-events.routes.d.ts.map +1 -1
- package/dist/routes/trade-cash-events.routes.js +148 -2
- package/dist/schemas/farm-enterprises.schemas.d.ts +58 -58
- package/dist/schemas/farm-enterprises.schemas.d.ts.map +1 -1
- package/dist/schemas/farm-enterprises.schemas.js +1 -0
- package/dist/schemas/farms.schemas.d.ts +12 -12
- package/dist/schemas/farms.schemas.js +1 -1
- package/dist/schemas/geofences.schemas.d.ts +4 -4
- package/dist/schemas/livestock-groups.schemas.d.ts +166 -40
- package/dist/schemas/livestock-groups.schemas.d.ts.map +1 -1
- package/dist/schemas/livestock-groups.schemas.js +25 -0
- package/dist/schemas/livestock.schemas.d.ts +1796 -36
- package/dist/schemas/livestock.schemas.d.ts.map +1 -1
- package/dist/schemas/livestock.schemas.js +129 -0
- package/dist/schemas/organizations.schemas.d.ts +104 -16
- package/dist/schemas/organizations.schemas.d.ts.map +1 -1
- package/dist/schemas/organizations.schemas.js +8 -1
- package/dist/schemas/team.schemas.d.ts +43 -43
- package/dist/schemas/team.schemas.d.ts.map +1 -1
- package/dist/schemas/team.schemas.js +1 -0
- package/dist/schemas/trade-cash-events.schemas.d.ts +2645 -68
- package/dist/schemas/trade-cash-events.schemas.d.ts.map +1 -1
- package/dist/schemas/trade-cash-events.schemas.js +210 -0
- package/package.json +1 -1
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const tradeCashEventTypeSchema: z.ZodEnum<["capital_in", "capital_out", "commission_payout", "supplier_payment", "buyer_receipt"]>;
|
|
3
|
-
export declare const tradeCashPartyTypeSchema: z.ZodEnum<["investor", "staff", "supplier", "buyer", "broker", "other"]>;
|
|
2
|
+
export declare const tradeCashEventTypeSchema: z.ZodEnum<["capital_in", "capital_out", "commission_payout", "supplier_payment", "buyer_receipt", "advance_disburse", "advance_handoff", "advance_settle", "advance_return", "advance_writeoff"]>;
|
|
3
|
+
export declare const tradeCashPartyTypeSchema: z.ZodEnum<["investor", "staff", "supplier", "buyer", "broker", "other", "company"]>;
|
|
4
|
+
export declare const tradeCashFunderTypeSchema: z.ZodEnum<["company", "staff", "investor", "unattributed"]>;
|
|
5
|
+
export declare const tradeSourcingAdvanceStatusSchema: z.ZodEnum<["pending_receipt", "open", "settled", "written_off", "cancelled"]>;
|
|
6
|
+
export declare const tradeSourcingAdvanceHolderTypeSchema: z.ZodEnum<["staff", "supplier", "other"]>;
|
|
7
|
+
export declare const advanceSettlementOutcomeSchema: z.ZodEnum<["spent", "returned", "written_off", "overspend"]>;
|
|
4
8
|
export declare const tradeCashEventAttributesSchema: z.ZodObject<{
|
|
5
9
|
organizationId: z.ZodString;
|
|
6
|
-
type: z.ZodEnum<["capital_in", "capital_out", "commission_payout", "supplier_payment", "buyer_receipt"]>;
|
|
7
|
-
partyType: z.ZodEnum<["investor", "staff", "supplier", "buyer", "broker", "other"]>;
|
|
10
|
+
type: z.ZodEnum<["capital_in", "capital_out", "commission_payout", "supplier_payment", "buyer_receipt", "advance_disburse", "advance_handoff", "advance_settle", "advance_return", "advance_writeoff"]>;
|
|
11
|
+
partyType: z.ZodEnum<["investor", "staff", "supplier", "buyer", "broker", "other", "company"]>;
|
|
8
12
|
partyId: z.ZodString;
|
|
9
13
|
partyName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
14
|
amount: z.ZodNumber;
|
|
@@ -15,33 +19,47 @@ export declare const tradeCashEventAttributesSchema: z.ZodObject<{
|
|
|
15
19
|
dealId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
20
|
invoiceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17
21
|
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
|
+
funderType: z.ZodDefault<z.ZodOptional<z.ZodEnum<["company", "staff", "investor", "unattributed"]>>>;
|
|
23
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
25
|
+
advanceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
|
+
voidedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
|
+
voidedById: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
28
|
+
voidReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
29
|
} & {
|
|
19
30
|
createdAt: z.ZodString;
|
|
20
31
|
updatedAt: z.ZodString;
|
|
21
32
|
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
33
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
23
34
|
createdAt: string;
|
|
24
35
|
updatedAt: string;
|
|
25
36
|
organizationId: string;
|
|
26
37
|
currency: string;
|
|
27
38
|
occurredAt: string;
|
|
28
39
|
amount: number;
|
|
29
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
40
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
30
41
|
partyId: string;
|
|
42
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
31
43
|
method?: string | null | undefined;
|
|
32
44
|
notes?: string | null | undefined;
|
|
33
45
|
invoiceId?: string | null | undefined;
|
|
34
46
|
reference?: string | null | undefined;
|
|
35
47
|
dealId?: string | null | undefined;
|
|
36
48
|
partyName?: string | null | undefined;
|
|
49
|
+
funderId?: string | null | undefined;
|
|
50
|
+
funderName?: string | null | undefined;
|
|
51
|
+
advanceId?: string | null | undefined;
|
|
52
|
+
voidedAt?: string | null | undefined;
|
|
53
|
+
voidedById?: string | null | undefined;
|
|
54
|
+
voidReason?: string | null | undefined;
|
|
37
55
|
}, {
|
|
38
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
56
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
39
57
|
createdAt: string;
|
|
40
58
|
updatedAt: string;
|
|
41
59
|
organizationId: string;
|
|
42
60
|
occurredAt: string;
|
|
43
61
|
amount: number;
|
|
44
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
62
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
45
63
|
partyId: string;
|
|
46
64
|
method?: string | null | undefined;
|
|
47
65
|
currency?: string | undefined;
|
|
@@ -50,10 +68,17 @@ export declare const tradeCashEventAttributesSchema: z.ZodObject<{
|
|
|
50
68
|
reference?: string | null | undefined;
|
|
51
69
|
dealId?: string | null | undefined;
|
|
52
70
|
partyName?: string | null | undefined;
|
|
71
|
+
funderType?: "investor" | "staff" | "company" | "unattributed" | undefined;
|
|
72
|
+
funderId?: string | null | undefined;
|
|
73
|
+
funderName?: string | null | undefined;
|
|
74
|
+
advanceId?: string | null | undefined;
|
|
75
|
+
voidedAt?: string | null | undefined;
|
|
76
|
+
voidedById?: string | null | undefined;
|
|
77
|
+
voidReason?: string | null | undefined;
|
|
53
78
|
}>;
|
|
54
79
|
export declare const createTradeCashEventAttributesSchema: z.ZodObject<{
|
|
55
|
-
type: z.ZodEnum<["capital_in", "capital_out", "commission_payout", "supplier_payment", "buyer_receipt"]>;
|
|
56
|
-
partyType: z.ZodEnum<["investor", "staff", "supplier", "buyer", "broker", "other"]>;
|
|
80
|
+
type: z.ZodEnum<["capital_in", "capital_out", "commission_payout", "supplier_payment", "buyer_receipt", "advance_disburse", "advance_handoff", "advance_settle", "advance_return", "advance_writeoff"]>;
|
|
81
|
+
partyType: z.ZodEnum<["investor", "staff", "supplier", "buyer", "broker", "other", "company"]>;
|
|
57
82
|
partyId: z.ZodString;
|
|
58
83
|
partyName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
59
84
|
amount: z.ZodNumber;
|
|
@@ -64,12 +89,17 @@ export declare const createTradeCashEventAttributesSchema: z.ZodObject<{
|
|
|
64
89
|
dealId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
65
90
|
invoiceId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
66
91
|
notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
92
|
+
/** Required for supplier_payment and advance events; derived for capital_in/out. */
|
|
93
|
+
funderType: z.ZodOptional<z.ZodEnum<["company", "staff", "investor", "unattributed"]>>;
|
|
94
|
+
funderId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
95
|
+
funderName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
96
|
+
advanceId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
67
97
|
}, "strip", z.ZodTypeAny, {
|
|
68
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
98
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
69
99
|
currency: string;
|
|
70
100
|
occurredAt: string;
|
|
71
101
|
amount: number;
|
|
72
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
102
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
73
103
|
partyId: string;
|
|
74
104
|
method?: string | null | undefined;
|
|
75
105
|
notes?: string | null | undefined;
|
|
@@ -77,11 +107,15 @@ export declare const createTradeCashEventAttributesSchema: z.ZodObject<{
|
|
|
77
107
|
reference?: string | null | undefined;
|
|
78
108
|
dealId?: string | null | undefined;
|
|
79
109
|
partyName?: string | null | undefined;
|
|
110
|
+
funderType?: "investor" | "staff" | "company" | "unattributed" | undefined;
|
|
111
|
+
funderId?: string | null | undefined;
|
|
112
|
+
funderName?: string | null | undefined;
|
|
113
|
+
advanceId?: string | null | undefined;
|
|
80
114
|
}, {
|
|
81
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
115
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
82
116
|
occurredAt: string;
|
|
83
117
|
amount: number;
|
|
84
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
118
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
85
119
|
partyId: string;
|
|
86
120
|
method?: string | null | undefined;
|
|
87
121
|
currency?: string | undefined;
|
|
@@ -90,14 +124,25 @@ export declare const createTradeCashEventAttributesSchema: z.ZodObject<{
|
|
|
90
124
|
reference?: string | null | undefined;
|
|
91
125
|
dealId?: string | null | undefined;
|
|
92
126
|
partyName?: string | null | undefined;
|
|
127
|
+
funderType?: "investor" | "staff" | "company" | "unattributed" | undefined;
|
|
128
|
+
funderId?: string | null | undefined;
|
|
129
|
+
funderName?: string | null | undefined;
|
|
130
|
+
advanceId?: string | null | undefined;
|
|
131
|
+
}>;
|
|
132
|
+
export declare const voidTradeCashEventAttributesSchema: z.ZodObject<{
|
|
133
|
+
reason: z.ZodString;
|
|
134
|
+
}, "strip", z.ZodTypeAny, {
|
|
135
|
+
reason: string;
|
|
136
|
+
}, {
|
|
137
|
+
reason: string;
|
|
93
138
|
}>;
|
|
94
139
|
export declare const tradeCashEventResourceSchema: z.ZodObject<{
|
|
95
140
|
type: z.ZodLiteral<string>;
|
|
96
141
|
id: z.ZodString;
|
|
97
142
|
attributes: z.ZodObject<{
|
|
98
143
|
organizationId: z.ZodString;
|
|
99
|
-
type: z.ZodEnum<["capital_in", "capital_out", "commission_payout", "supplier_payment", "buyer_receipt"]>;
|
|
100
|
-
partyType: z.ZodEnum<["investor", "staff", "supplier", "buyer", "broker", "other"]>;
|
|
144
|
+
type: z.ZodEnum<["capital_in", "capital_out", "commission_payout", "supplier_payment", "buyer_receipt", "advance_disburse", "advance_handoff", "advance_settle", "advance_return", "advance_writeoff"]>;
|
|
145
|
+
partyType: z.ZodEnum<["investor", "staff", "supplier", "buyer", "broker", "other", "company"]>;
|
|
101
146
|
partyId: z.ZodString;
|
|
102
147
|
partyName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
103
148
|
amount: z.ZodNumber;
|
|
@@ -108,33 +153,47 @@ export declare const tradeCashEventResourceSchema: z.ZodObject<{
|
|
|
108
153
|
dealId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
109
154
|
invoiceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
110
155
|
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
156
|
+
funderType: z.ZodDefault<z.ZodOptional<z.ZodEnum<["company", "staff", "investor", "unattributed"]>>>;
|
|
157
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
158
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
159
|
+
advanceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
160
|
+
voidedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
161
|
+
voidedById: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
162
|
+
voidReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
111
163
|
} & {
|
|
112
164
|
createdAt: z.ZodString;
|
|
113
165
|
updatedAt: z.ZodString;
|
|
114
166
|
}, "strip", z.ZodTypeAny, {
|
|
115
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
167
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
116
168
|
createdAt: string;
|
|
117
169
|
updatedAt: string;
|
|
118
170
|
organizationId: string;
|
|
119
171
|
currency: string;
|
|
120
172
|
occurredAt: string;
|
|
121
173
|
amount: number;
|
|
122
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
174
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
123
175
|
partyId: string;
|
|
176
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
124
177
|
method?: string | null | undefined;
|
|
125
178
|
notes?: string | null | undefined;
|
|
126
179
|
invoiceId?: string | null | undefined;
|
|
127
180
|
reference?: string | null | undefined;
|
|
128
181
|
dealId?: string | null | undefined;
|
|
129
182
|
partyName?: string | null | undefined;
|
|
183
|
+
funderId?: string | null | undefined;
|
|
184
|
+
funderName?: string | null | undefined;
|
|
185
|
+
advanceId?: string | null | undefined;
|
|
186
|
+
voidedAt?: string | null | undefined;
|
|
187
|
+
voidedById?: string | null | undefined;
|
|
188
|
+
voidReason?: string | null | undefined;
|
|
130
189
|
}, {
|
|
131
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
190
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
132
191
|
createdAt: string;
|
|
133
192
|
updatedAt: string;
|
|
134
193
|
organizationId: string;
|
|
135
194
|
occurredAt: string;
|
|
136
195
|
amount: number;
|
|
137
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
196
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
138
197
|
partyId: string;
|
|
139
198
|
method?: string | null | undefined;
|
|
140
199
|
currency?: string | undefined;
|
|
@@ -143,6 +202,13 @@ export declare const tradeCashEventResourceSchema: z.ZodObject<{
|
|
|
143
202
|
reference?: string | null | undefined;
|
|
144
203
|
dealId?: string | null | undefined;
|
|
145
204
|
partyName?: string | null | undefined;
|
|
205
|
+
funderType?: "investor" | "staff" | "company" | "unattributed" | undefined;
|
|
206
|
+
funderId?: string | null | undefined;
|
|
207
|
+
funderName?: string | null | undefined;
|
|
208
|
+
advanceId?: string | null | undefined;
|
|
209
|
+
voidedAt?: string | null | undefined;
|
|
210
|
+
voidedById?: string | null | undefined;
|
|
211
|
+
voidReason?: string | null | undefined;
|
|
146
212
|
}>;
|
|
147
213
|
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
148
214
|
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -151,21 +217,28 @@ export declare const tradeCashEventResourceSchema: z.ZodObject<{
|
|
|
151
217
|
type: string;
|
|
152
218
|
id: string;
|
|
153
219
|
attributes: {
|
|
154
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
220
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
155
221
|
createdAt: string;
|
|
156
222
|
updatedAt: string;
|
|
157
223
|
organizationId: string;
|
|
158
224
|
currency: string;
|
|
159
225
|
occurredAt: string;
|
|
160
226
|
amount: number;
|
|
161
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
227
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
162
228
|
partyId: string;
|
|
229
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
163
230
|
method?: string | null | undefined;
|
|
164
231
|
notes?: string | null | undefined;
|
|
165
232
|
invoiceId?: string | null | undefined;
|
|
166
233
|
reference?: string | null | undefined;
|
|
167
234
|
dealId?: string | null | undefined;
|
|
168
235
|
partyName?: string | null | undefined;
|
|
236
|
+
funderId?: string | null | undefined;
|
|
237
|
+
funderName?: string | null | undefined;
|
|
238
|
+
advanceId?: string | null | undefined;
|
|
239
|
+
voidedAt?: string | null | undefined;
|
|
240
|
+
voidedById?: string | null | undefined;
|
|
241
|
+
voidReason?: string | null | undefined;
|
|
169
242
|
};
|
|
170
243
|
relationships?: Record<string, unknown> | undefined;
|
|
171
244
|
links?: Record<string, string> | undefined;
|
|
@@ -174,13 +247,13 @@ export declare const tradeCashEventResourceSchema: z.ZodObject<{
|
|
|
174
247
|
type: string;
|
|
175
248
|
id: string;
|
|
176
249
|
attributes: {
|
|
177
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
250
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
178
251
|
createdAt: string;
|
|
179
252
|
updatedAt: string;
|
|
180
253
|
organizationId: string;
|
|
181
254
|
occurredAt: string;
|
|
182
255
|
amount: number;
|
|
183
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
256
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
184
257
|
partyId: string;
|
|
185
258
|
method?: string | null | undefined;
|
|
186
259
|
currency?: string | undefined;
|
|
@@ -189,6 +262,13 @@ export declare const tradeCashEventResourceSchema: z.ZodObject<{
|
|
|
189
262
|
reference?: string | null | undefined;
|
|
190
263
|
dealId?: string | null | undefined;
|
|
191
264
|
partyName?: string | null | undefined;
|
|
265
|
+
funderType?: "investor" | "staff" | "company" | "unattributed" | undefined;
|
|
266
|
+
funderId?: string | null | undefined;
|
|
267
|
+
funderName?: string | null | undefined;
|
|
268
|
+
advanceId?: string | null | undefined;
|
|
269
|
+
voidedAt?: string | null | undefined;
|
|
270
|
+
voidedById?: string | null | undefined;
|
|
271
|
+
voidReason?: string | null | undefined;
|
|
192
272
|
};
|
|
193
273
|
relationships?: Record<string, unknown> | undefined;
|
|
194
274
|
links?: Record<string, string> | undefined;
|
|
@@ -200,8 +280,8 @@ export declare const tradeCashEventResponseSchema: z.ZodObject<{
|
|
|
200
280
|
id: z.ZodString;
|
|
201
281
|
attributes: z.ZodObject<{
|
|
202
282
|
organizationId: z.ZodString;
|
|
203
|
-
type: z.ZodEnum<["capital_in", "capital_out", "commission_payout", "supplier_payment", "buyer_receipt"]>;
|
|
204
|
-
partyType: z.ZodEnum<["investor", "staff", "supplier", "buyer", "broker", "other"]>;
|
|
283
|
+
type: z.ZodEnum<["capital_in", "capital_out", "commission_payout", "supplier_payment", "buyer_receipt", "advance_disburse", "advance_handoff", "advance_settle", "advance_return", "advance_writeoff"]>;
|
|
284
|
+
partyType: z.ZodEnum<["investor", "staff", "supplier", "buyer", "broker", "other", "company"]>;
|
|
205
285
|
partyId: z.ZodString;
|
|
206
286
|
partyName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
207
287
|
amount: z.ZodNumber;
|
|
@@ -212,33 +292,47 @@ export declare const tradeCashEventResponseSchema: z.ZodObject<{
|
|
|
212
292
|
dealId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
213
293
|
invoiceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
214
294
|
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
295
|
+
funderType: z.ZodDefault<z.ZodOptional<z.ZodEnum<["company", "staff", "investor", "unattributed"]>>>;
|
|
296
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
297
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
298
|
+
advanceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
299
|
+
voidedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
300
|
+
voidedById: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
301
|
+
voidReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
215
302
|
} & {
|
|
216
303
|
createdAt: z.ZodString;
|
|
217
304
|
updatedAt: z.ZodString;
|
|
218
305
|
}, "strip", z.ZodTypeAny, {
|
|
219
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
306
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
220
307
|
createdAt: string;
|
|
221
308
|
updatedAt: string;
|
|
222
309
|
organizationId: string;
|
|
223
310
|
currency: string;
|
|
224
311
|
occurredAt: string;
|
|
225
312
|
amount: number;
|
|
226
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
313
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
227
314
|
partyId: string;
|
|
315
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
228
316
|
method?: string | null | undefined;
|
|
229
317
|
notes?: string | null | undefined;
|
|
230
318
|
invoiceId?: string | null | undefined;
|
|
231
319
|
reference?: string | null | undefined;
|
|
232
320
|
dealId?: string | null | undefined;
|
|
233
321
|
partyName?: string | null | undefined;
|
|
322
|
+
funderId?: string | null | undefined;
|
|
323
|
+
funderName?: string | null | undefined;
|
|
324
|
+
advanceId?: string | null | undefined;
|
|
325
|
+
voidedAt?: string | null | undefined;
|
|
326
|
+
voidedById?: string | null | undefined;
|
|
327
|
+
voidReason?: string | null | undefined;
|
|
234
328
|
}, {
|
|
235
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
329
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
236
330
|
createdAt: string;
|
|
237
331
|
updatedAt: string;
|
|
238
332
|
organizationId: string;
|
|
239
333
|
occurredAt: string;
|
|
240
334
|
amount: number;
|
|
241
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
335
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
242
336
|
partyId: string;
|
|
243
337
|
method?: string | null | undefined;
|
|
244
338
|
currency?: string | undefined;
|
|
@@ -247,6 +341,13 @@ export declare const tradeCashEventResponseSchema: z.ZodObject<{
|
|
|
247
341
|
reference?: string | null | undefined;
|
|
248
342
|
dealId?: string | null | undefined;
|
|
249
343
|
partyName?: string | null | undefined;
|
|
344
|
+
funderType?: "investor" | "staff" | "company" | "unattributed" | undefined;
|
|
345
|
+
funderId?: string | null | undefined;
|
|
346
|
+
funderName?: string | null | undefined;
|
|
347
|
+
advanceId?: string | null | undefined;
|
|
348
|
+
voidedAt?: string | null | undefined;
|
|
349
|
+
voidedById?: string | null | undefined;
|
|
350
|
+
voidReason?: string | null | undefined;
|
|
250
351
|
}>;
|
|
251
352
|
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
252
353
|
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -255,21 +356,28 @@ export declare const tradeCashEventResponseSchema: z.ZodObject<{
|
|
|
255
356
|
type: string;
|
|
256
357
|
id: string;
|
|
257
358
|
attributes: {
|
|
258
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
359
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
259
360
|
createdAt: string;
|
|
260
361
|
updatedAt: string;
|
|
261
362
|
organizationId: string;
|
|
262
363
|
currency: string;
|
|
263
364
|
occurredAt: string;
|
|
264
365
|
amount: number;
|
|
265
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
366
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
266
367
|
partyId: string;
|
|
368
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
267
369
|
method?: string | null | undefined;
|
|
268
370
|
notes?: string | null | undefined;
|
|
269
371
|
invoiceId?: string | null | undefined;
|
|
270
372
|
reference?: string | null | undefined;
|
|
271
373
|
dealId?: string | null | undefined;
|
|
272
374
|
partyName?: string | null | undefined;
|
|
375
|
+
funderId?: string | null | undefined;
|
|
376
|
+
funderName?: string | null | undefined;
|
|
377
|
+
advanceId?: string | null | undefined;
|
|
378
|
+
voidedAt?: string | null | undefined;
|
|
379
|
+
voidedById?: string | null | undefined;
|
|
380
|
+
voidReason?: string | null | undefined;
|
|
273
381
|
};
|
|
274
382
|
relationships?: Record<string, unknown> | undefined;
|
|
275
383
|
links?: Record<string, string> | undefined;
|
|
@@ -278,13 +386,13 @@ export declare const tradeCashEventResponseSchema: z.ZodObject<{
|
|
|
278
386
|
type: string;
|
|
279
387
|
id: string;
|
|
280
388
|
attributes: {
|
|
281
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
389
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
282
390
|
createdAt: string;
|
|
283
391
|
updatedAt: string;
|
|
284
392
|
organizationId: string;
|
|
285
393
|
occurredAt: string;
|
|
286
394
|
amount: number;
|
|
287
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
395
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
288
396
|
partyId: string;
|
|
289
397
|
method?: string | null | undefined;
|
|
290
398
|
currency?: string | undefined;
|
|
@@ -293,6 +401,13 @@ export declare const tradeCashEventResponseSchema: z.ZodObject<{
|
|
|
293
401
|
reference?: string | null | undefined;
|
|
294
402
|
dealId?: string | null | undefined;
|
|
295
403
|
partyName?: string | null | undefined;
|
|
404
|
+
funderType?: "investor" | "staff" | "company" | "unattributed" | undefined;
|
|
405
|
+
funderId?: string | null | undefined;
|
|
406
|
+
funderName?: string | null | undefined;
|
|
407
|
+
advanceId?: string | null | undefined;
|
|
408
|
+
voidedAt?: string | null | undefined;
|
|
409
|
+
voidedById?: string | null | undefined;
|
|
410
|
+
voidReason?: string | null | undefined;
|
|
296
411
|
};
|
|
297
412
|
relationships?: Record<string, unknown> | undefined;
|
|
298
413
|
links?: Record<string, string> | undefined;
|
|
@@ -327,21 +442,28 @@ export declare const tradeCashEventResponseSchema: z.ZodObject<{
|
|
|
327
442
|
type: string;
|
|
328
443
|
id: string;
|
|
329
444
|
attributes: {
|
|
330
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
445
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
331
446
|
createdAt: string;
|
|
332
447
|
updatedAt: string;
|
|
333
448
|
organizationId: string;
|
|
334
449
|
currency: string;
|
|
335
450
|
occurredAt: string;
|
|
336
451
|
amount: number;
|
|
337
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
452
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
338
453
|
partyId: string;
|
|
454
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
339
455
|
method?: string | null | undefined;
|
|
340
456
|
notes?: string | null | undefined;
|
|
341
457
|
invoiceId?: string | null | undefined;
|
|
342
458
|
reference?: string | null | undefined;
|
|
343
459
|
dealId?: string | null | undefined;
|
|
344
460
|
partyName?: string | null | undefined;
|
|
461
|
+
funderId?: string | null | undefined;
|
|
462
|
+
funderName?: string | null | undefined;
|
|
463
|
+
advanceId?: string | null | undefined;
|
|
464
|
+
voidedAt?: string | null | undefined;
|
|
465
|
+
voidedById?: string | null | undefined;
|
|
466
|
+
voidReason?: string | null | undefined;
|
|
345
467
|
};
|
|
346
468
|
relationships?: Record<string, unknown> | undefined;
|
|
347
469
|
links?: Record<string, string> | undefined;
|
|
@@ -362,13 +484,13 @@ export declare const tradeCashEventResponseSchema: z.ZodObject<{
|
|
|
362
484
|
type: string;
|
|
363
485
|
id: string;
|
|
364
486
|
attributes: {
|
|
365
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
487
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
366
488
|
createdAt: string;
|
|
367
489
|
updatedAt: string;
|
|
368
490
|
organizationId: string;
|
|
369
491
|
occurredAt: string;
|
|
370
492
|
amount: number;
|
|
371
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
493
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
372
494
|
partyId: string;
|
|
373
495
|
method?: string | null | undefined;
|
|
374
496
|
currency?: string | undefined;
|
|
@@ -377,6 +499,13 @@ export declare const tradeCashEventResponseSchema: z.ZodObject<{
|
|
|
377
499
|
reference?: string | null | undefined;
|
|
378
500
|
dealId?: string | null | undefined;
|
|
379
501
|
partyName?: string | null | undefined;
|
|
502
|
+
funderType?: "investor" | "staff" | "company" | "unattributed" | undefined;
|
|
503
|
+
funderId?: string | null | undefined;
|
|
504
|
+
funderName?: string | null | undefined;
|
|
505
|
+
advanceId?: string | null | undefined;
|
|
506
|
+
voidedAt?: string | null | undefined;
|
|
507
|
+
voidedById?: string | null | undefined;
|
|
508
|
+
voidReason?: string | null | undefined;
|
|
380
509
|
};
|
|
381
510
|
relationships?: Record<string, unknown> | undefined;
|
|
382
511
|
links?: Record<string, string> | undefined;
|
|
@@ -399,8 +528,8 @@ export declare const tradeCashEventListResponseSchema: z.ZodObject<{
|
|
|
399
528
|
id: z.ZodString;
|
|
400
529
|
attributes: z.ZodObject<{
|
|
401
530
|
organizationId: z.ZodString;
|
|
402
|
-
type: z.ZodEnum<["capital_in", "capital_out", "commission_payout", "supplier_payment", "buyer_receipt"]>;
|
|
403
|
-
partyType: z.ZodEnum<["investor", "staff", "supplier", "buyer", "broker", "other"]>;
|
|
531
|
+
type: z.ZodEnum<["capital_in", "capital_out", "commission_payout", "supplier_payment", "buyer_receipt", "advance_disburse", "advance_handoff", "advance_settle", "advance_return", "advance_writeoff"]>;
|
|
532
|
+
partyType: z.ZodEnum<["investor", "staff", "supplier", "buyer", "broker", "other", "company"]>;
|
|
404
533
|
partyId: z.ZodString;
|
|
405
534
|
partyName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
406
535
|
amount: z.ZodNumber;
|
|
@@ -411,33 +540,47 @@ export declare const tradeCashEventListResponseSchema: z.ZodObject<{
|
|
|
411
540
|
dealId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
412
541
|
invoiceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
413
542
|
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
543
|
+
funderType: z.ZodDefault<z.ZodOptional<z.ZodEnum<["company", "staff", "investor", "unattributed"]>>>;
|
|
544
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
545
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
546
|
+
advanceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
547
|
+
voidedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
548
|
+
voidedById: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
549
|
+
voidReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
414
550
|
} & {
|
|
415
551
|
createdAt: z.ZodString;
|
|
416
552
|
updatedAt: z.ZodString;
|
|
417
553
|
}, "strip", z.ZodTypeAny, {
|
|
418
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
554
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
419
555
|
createdAt: string;
|
|
420
556
|
updatedAt: string;
|
|
421
557
|
organizationId: string;
|
|
422
558
|
currency: string;
|
|
423
559
|
occurredAt: string;
|
|
424
560
|
amount: number;
|
|
425
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
561
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
426
562
|
partyId: string;
|
|
563
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
427
564
|
method?: string | null | undefined;
|
|
428
565
|
notes?: string | null | undefined;
|
|
429
566
|
invoiceId?: string | null | undefined;
|
|
430
567
|
reference?: string | null | undefined;
|
|
431
568
|
dealId?: string | null | undefined;
|
|
432
569
|
partyName?: string | null | undefined;
|
|
570
|
+
funderId?: string | null | undefined;
|
|
571
|
+
funderName?: string | null | undefined;
|
|
572
|
+
advanceId?: string | null | undefined;
|
|
573
|
+
voidedAt?: string | null | undefined;
|
|
574
|
+
voidedById?: string | null | undefined;
|
|
575
|
+
voidReason?: string | null | undefined;
|
|
433
576
|
}, {
|
|
434
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
577
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
435
578
|
createdAt: string;
|
|
436
579
|
updatedAt: string;
|
|
437
580
|
organizationId: string;
|
|
438
581
|
occurredAt: string;
|
|
439
582
|
amount: number;
|
|
440
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
583
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
441
584
|
partyId: string;
|
|
442
585
|
method?: string | null | undefined;
|
|
443
586
|
currency?: string | undefined;
|
|
@@ -446,6 +589,13 @@ export declare const tradeCashEventListResponseSchema: z.ZodObject<{
|
|
|
446
589
|
reference?: string | null | undefined;
|
|
447
590
|
dealId?: string | null | undefined;
|
|
448
591
|
partyName?: string | null | undefined;
|
|
592
|
+
funderType?: "investor" | "staff" | "company" | "unattributed" | undefined;
|
|
593
|
+
funderId?: string | null | undefined;
|
|
594
|
+
funderName?: string | null | undefined;
|
|
595
|
+
advanceId?: string | null | undefined;
|
|
596
|
+
voidedAt?: string | null | undefined;
|
|
597
|
+
voidedById?: string | null | undefined;
|
|
598
|
+
voidReason?: string | null | undefined;
|
|
449
599
|
}>;
|
|
450
600
|
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
451
601
|
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -454,21 +604,28 @@ export declare const tradeCashEventListResponseSchema: z.ZodObject<{
|
|
|
454
604
|
type: string;
|
|
455
605
|
id: string;
|
|
456
606
|
attributes: {
|
|
457
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
607
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
458
608
|
createdAt: string;
|
|
459
609
|
updatedAt: string;
|
|
460
610
|
organizationId: string;
|
|
461
611
|
currency: string;
|
|
462
612
|
occurredAt: string;
|
|
463
613
|
amount: number;
|
|
464
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
614
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
465
615
|
partyId: string;
|
|
616
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
466
617
|
method?: string | null | undefined;
|
|
467
618
|
notes?: string | null | undefined;
|
|
468
619
|
invoiceId?: string | null | undefined;
|
|
469
620
|
reference?: string | null | undefined;
|
|
470
621
|
dealId?: string | null | undefined;
|
|
471
622
|
partyName?: string | null | undefined;
|
|
623
|
+
funderId?: string | null | undefined;
|
|
624
|
+
funderName?: string | null | undefined;
|
|
625
|
+
advanceId?: string | null | undefined;
|
|
626
|
+
voidedAt?: string | null | undefined;
|
|
627
|
+
voidedById?: string | null | undefined;
|
|
628
|
+
voidReason?: string | null | undefined;
|
|
472
629
|
};
|
|
473
630
|
relationships?: Record<string, unknown> | undefined;
|
|
474
631
|
links?: Record<string, string> | undefined;
|
|
@@ -477,13 +634,13 @@ export declare const tradeCashEventListResponseSchema: z.ZodObject<{
|
|
|
477
634
|
type: string;
|
|
478
635
|
id: string;
|
|
479
636
|
attributes: {
|
|
480
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
637
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
481
638
|
createdAt: string;
|
|
482
639
|
updatedAt: string;
|
|
483
640
|
organizationId: string;
|
|
484
641
|
occurredAt: string;
|
|
485
642
|
amount: number;
|
|
486
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
643
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
487
644
|
partyId: string;
|
|
488
645
|
method?: string | null | undefined;
|
|
489
646
|
currency?: string | undefined;
|
|
@@ -492,6 +649,13 @@ export declare const tradeCashEventListResponseSchema: z.ZodObject<{
|
|
|
492
649
|
reference?: string | null | undefined;
|
|
493
650
|
dealId?: string | null | undefined;
|
|
494
651
|
partyName?: string | null | undefined;
|
|
652
|
+
funderType?: "investor" | "staff" | "company" | "unattributed" | undefined;
|
|
653
|
+
funderId?: string | null | undefined;
|
|
654
|
+
funderName?: string | null | undefined;
|
|
655
|
+
advanceId?: string | null | undefined;
|
|
656
|
+
voidedAt?: string | null | undefined;
|
|
657
|
+
voidedById?: string | null | undefined;
|
|
658
|
+
voidReason?: string | null | undefined;
|
|
495
659
|
};
|
|
496
660
|
relationships?: Record<string, unknown> | undefined;
|
|
497
661
|
links?: Record<string, string> | undefined;
|
|
@@ -526,21 +690,28 @@ export declare const tradeCashEventListResponseSchema: z.ZodObject<{
|
|
|
526
690
|
type: string;
|
|
527
691
|
id: string;
|
|
528
692
|
attributes: {
|
|
529
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
693
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
530
694
|
createdAt: string;
|
|
531
695
|
updatedAt: string;
|
|
532
696
|
organizationId: string;
|
|
533
697
|
currency: string;
|
|
534
698
|
occurredAt: string;
|
|
535
699
|
amount: number;
|
|
536
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
700
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
537
701
|
partyId: string;
|
|
702
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
538
703
|
method?: string | null | undefined;
|
|
539
704
|
notes?: string | null | undefined;
|
|
540
705
|
invoiceId?: string | null | undefined;
|
|
541
706
|
reference?: string | null | undefined;
|
|
542
707
|
dealId?: string | null | undefined;
|
|
543
708
|
partyName?: string | null | undefined;
|
|
709
|
+
funderId?: string | null | undefined;
|
|
710
|
+
funderName?: string | null | undefined;
|
|
711
|
+
advanceId?: string | null | undefined;
|
|
712
|
+
voidedAt?: string | null | undefined;
|
|
713
|
+
voidedById?: string | null | undefined;
|
|
714
|
+
voidReason?: string | null | undefined;
|
|
544
715
|
};
|
|
545
716
|
relationships?: Record<string, unknown> | undefined;
|
|
546
717
|
links?: Record<string, string> | undefined;
|
|
@@ -561,13 +732,13 @@ export declare const tradeCashEventListResponseSchema: z.ZodObject<{
|
|
|
561
732
|
type: string;
|
|
562
733
|
id: string;
|
|
563
734
|
attributes: {
|
|
564
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
735
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
565
736
|
createdAt: string;
|
|
566
737
|
updatedAt: string;
|
|
567
738
|
organizationId: string;
|
|
568
739
|
occurredAt: string;
|
|
569
740
|
amount: number;
|
|
570
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
741
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
571
742
|
partyId: string;
|
|
572
743
|
method?: string | null | undefined;
|
|
573
744
|
currency?: string | undefined;
|
|
@@ -576,6 +747,13 @@ export declare const tradeCashEventListResponseSchema: z.ZodObject<{
|
|
|
576
747
|
reference?: string | null | undefined;
|
|
577
748
|
dealId?: string | null | undefined;
|
|
578
749
|
partyName?: string | null | undefined;
|
|
750
|
+
funderType?: "investor" | "staff" | "company" | "unattributed" | undefined;
|
|
751
|
+
funderId?: string | null | undefined;
|
|
752
|
+
funderName?: string | null | undefined;
|
|
753
|
+
advanceId?: string | null | undefined;
|
|
754
|
+
voidedAt?: string | null | undefined;
|
|
755
|
+
voidedById?: string | null | undefined;
|
|
756
|
+
voidReason?: string | null | undefined;
|
|
579
757
|
};
|
|
580
758
|
relationships?: Record<string, unknown> | undefined;
|
|
581
759
|
links?: Record<string, string> | undefined;
|
|
@@ -595,8 +773,8 @@ export declare const tradeCashEventListResponseSchema: z.ZodObject<{
|
|
|
595
773
|
export declare const createTradeCashEventSchema: z.ZodObject<{
|
|
596
774
|
type: z.ZodLiteral<"trade-cash-events">;
|
|
597
775
|
attributes: z.ZodObject<{
|
|
598
|
-
type: z.ZodEnum<["capital_in", "capital_out", "commission_payout", "supplier_payment", "buyer_receipt"]>;
|
|
599
|
-
partyType: z.ZodEnum<["investor", "staff", "supplier", "buyer", "broker", "other"]>;
|
|
776
|
+
type: z.ZodEnum<["capital_in", "capital_out", "commission_payout", "supplier_payment", "buyer_receipt", "advance_disburse", "advance_handoff", "advance_settle", "advance_return", "advance_writeoff"]>;
|
|
777
|
+
partyType: z.ZodEnum<["investor", "staff", "supplier", "buyer", "broker", "other", "company"]>;
|
|
600
778
|
partyId: z.ZodString;
|
|
601
779
|
partyName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
602
780
|
amount: z.ZodNumber;
|
|
@@ -607,12 +785,17 @@ export declare const createTradeCashEventSchema: z.ZodObject<{
|
|
|
607
785
|
dealId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
608
786
|
invoiceId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
609
787
|
notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
788
|
+
/** Required for supplier_payment and advance events; derived for capital_in/out. */
|
|
789
|
+
funderType: z.ZodOptional<z.ZodEnum<["company", "staff", "investor", "unattributed"]>>;
|
|
790
|
+
funderId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
791
|
+
funderName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
792
|
+
advanceId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
610
793
|
}, "strip", z.ZodTypeAny, {
|
|
611
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
794
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
612
795
|
currency: string;
|
|
613
796
|
occurredAt: string;
|
|
614
797
|
amount: number;
|
|
615
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
798
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
616
799
|
partyId: string;
|
|
617
800
|
method?: string | null | undefined;
|
|
618
801
|
notes?: string | null | undefined;
|
|
@@ -620,11 +803,15 @@ export declare const createTradeCashEventSchema: z.ZodObject<{
|
|
|
620
803
|
reference?: string | null | undefined;
|
|
621
804
|
dealId?: string | null | undefined;
|
|
622
805
|
partyName?: string | null | undefined;
|
|
806
|
+
funderType?: "investor" | "staff" | "company" | "unattributed" | undefined;
|
|
807
|
+
funderId?: string | null | undefined;
|
|
808
|
+
funderName?: string | null | undefined;
|
|
809
|
+
advanceId?: string | null | undefined;
|
|
623
810
|
}, {
|
|
624
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
811
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
625
812
|
occurredAt: string;
|
|
626
813
|
amount: number;
|
|
627
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
814
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
628
815
|
partyId: string;
|
|
629
816
|
method?: string | null | undefined;
|
|
630
817
|
currency?: string | undefined;
|
|
@@ -633,15 +820,19 @@ export declare const createTradeCashEventSchema: z.ZodObject<{
|
|
|
633
820
|
reference?: string | null | undefined;
|
|
634
821
|
dealId?: string | null | undefined;
|
|
635
822
|
partyName?: string | null | undefined;
|
|
823
|
+
funderType?: "investor" | "staff" | "company" | "unattributed" | undefined;
|
|
824
|
+
funderId?: string | null | undefined;
|
|
825
|
+
funderName?: string | null | undefined;
|
|
826
|
+
advanceId?: string | null | undefined;
|
|
636
827
|
}>;
|
|
637
828
|
}, "strip", z.ZodTypeAny, {
|
|
638
829
|
type: "trade-cash-events";
|
|
639
830
|
attributes: {
|
|
640
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
831
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
641
832
|
currency: string;
|
|
642
833
|
occurredAt: string;
|
|
643
834
|
amount: number;
|
|
644
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
835
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
645
836
|
partyId: string;
|
|
646
837
|
method?: string | null | undefined;
|
|
647
838
|
notes?: string | null | undefined;
|
|
@@ -649,14 +840,18 @@ export declare const createTradeCashEventSchema: z.ZodObject<{
|
|
|
649
840
|
reference?: string | null | undefined;
|
|
650
841
|
dealId?: string | null | undefined;
|
|
651
842
|
partyName?: string | null | undefined;
|
|
843
|
+
funderType?: "investor" | "staff" | "company" | "unattributed" | undefined;
|
|
844
|
+
funderId?: string | null | undefined;
|
|
845
|
+
funderName?: string | null | undefined;
|
|
846
|
+
advanceId?: string | null | undefined;
|
|
652
847
|
};
|
|
653
848
|
}, {
|
|
654
849
|
type: "trade-cash-events";
|
|
655
850
|
attributes: {
|
|
656
|
-
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt";
|
|
851
|
+
type: "capital_in" | "capital_out" | "commission_payout" | "supplier_payment" | "buyer_receipt" | "advance_disburse" | "advance_handoff" | "advance_settle" | "advance_return" | "advance_writeoff";
|
|
657
852
|
occurredAt: string;
|
|
658
853
|
amount: number;
|
|
659
|
-
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker";
|
|
854
|
+
partyType: "investor" | "other" | "supplier" | "buyer" | "staff" | "broker" | "company";
|
|
660
855
|
partyId: string;
|
|
661
856
|
method?: string | null | undefined;
|
|
662
857
|
currency?: string | undefined;
|
|
@@ -665,6 +860,30 @@ export declare const createTradeCashEventSchema: z.ZodObject<{
|
|
|
665
860
|
reference?: string | null | undefined;
|
|
666
861
|
dealId?: string | null | undefined;
|
|
667
862
|
partyName?: string | null | undefined;
|
|
863
|
+
funderType?: "investor" | "staff" | "company" | "unattributed" | undefined;
|
|
864
|
+
funderId?: string | null | undefined;
|
|
865
|
+
funderName?: string | null | undefined;
|
|
866
|
+
advanceId?: string | null | undefined;
|
|
867
|
+
};
|
|
868
|
+
}>;
|
|
869
|
+
export declare const voidTradeCashEventSchema: z.ZodObject<{
|
|
870
|
+
type: z.ZodLiteral<"trade-cash-events">;
|
|
871
|
+
attributes: z.ZodObject<{
|
|
872
|
+
reason: z.ZodString;
|
|
873
|
+
}, "strip", z.ZodTypeAny, {
|
|
874
|
+
reason: string;
|
|
875
|
+
}, {
|
|
876
|
+
reason: string;
|
|
877
|
+
}>;
|
|
878
|
+
}, "strip", z.ZodTypeAny, {
|
|
879
|
+
type: "trade-cash-events";
|
|
880
|
+
attributes: {
|
|
881
|
+
reason: string;
|
|
882
|
+
};
|
|
883
|
+
}, {
|
|
884
|
+
type: "trade-cash-events";
|
|
885
|
+
attributes: {
|
|
886
|
+
reason: string;
|
|
668
887
|
};
|
|
669
888
|
}>;
|
|
670
889
|
export declare const investorBalanceAttributesSchema: z.ZodObject<{
|
|
@@ -673,6 +892,10 @@ export declare const investorBalanceAttributesSchema: z.ZodObject<{
|
|
|
673
892
|
capitalIn: z.ZodNumber;
|
|
674
893
|
capitalOut: z.ZodNumber;
|
|
675
894
|
balance: z.ZodNumber;
|
|
895
|
+
/** Earliest non-voided capital_in occurredAt — for fund performance dating. */
|
|
896
|
+
firstCapitalInAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
897
|
+
/** Most recent non-voided capital_in occurredAt. */
|
|
898
|
+
lastCapitalInAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
676
899
|
dealCount: z.ZodOptional<z.ZodNumber>;
|
|
677
900
|
}, "strip", z.ZodTypeAny, {
|
|
678
901
|
balance: number;
|
|
@@ -681,6 +904,8 @@ export declare const investorBalanceAttributesSchema: z.ZodObject<{
|
|
|
681
904
|
capitalOut: number;
|
|
682
905
|
dealCount?: number | undefined;
|
|
683
906
|
partyName?: string | null | undefined;
|
|
907
|
+
firstCapitalInAt?: string | null | undefined;
|
|
908
|
+
lastCapitalInAt?: string | null | undefined;
|
|
684
909
|
}, {
|
|
685
910
|
balance: number;
|
|
686
911
|
partyId: string;
|
|
@@ -688,6 +913,8 @@ export declare const investorBalanceAttributesSchema: z.ZodObject<{
|
|
|
688
913
|
capitalOut: number;
|
|
689
914
|
dealCount?: number | undefined;
|
|
690
915
|
partyName?: string | null | undefined;
|
|
916
|
+
firstCapitalInAt?: string | null | undefined;
|
|
917
|
+
lastCapitalInAt?: string | null | undefined;
|
|
691
918
|
}>;
|
|
692
919
|
export declare const investorBalancesResponseSchema: z.ZodObject<{
|
|
693
920
|
data: z.ZodObject<{
|
|
@@ -700,6 +927,10 @@ export declare const investorBalancesResponseSchema: z.ZodObject<{
|
|
|
700
927
|
capitalIn: z.ZodNumber;
|
|
701
928
|
capitalOut: z.ZodNumber;
|
|
702
929
|
balance: z.ZodNumber;
|
|
930
|
+
/** Earliest non-voided capital_in occurredAt — for fund performance dating. */
|
|
931
|
+
firstCapitalInAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
932
|
+
/** Most recent non-voided capital_in occurredAt. */
|
|
933
|
+
lastCapitalInAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
703
934
|
dealCount: z.ZodOptional<z.ZodNumber>;
|
|
704
935
|
}, "strip", z.ZodTypeAny, {
|
|
705
936
|
balance: number;
|
|
@@ -708,6 +939,8 @@ export declare const investorBalancesResponseSchema: z.ZodObject<{
|
|
|
708
939
|
capitalOut: number;
|
|
709
940
|
dealCount?: number | undefined;
|
|
710
941
|
partyName?: string | null | undefined;
|
|
942
|
+
firstCapitalInAt?: string | null | undefined;
|
|
943
|
+
lastCapitalInAt?: string | null | undefined;
|
|
711
944
|
}, {
|
|
712
945
|
balance: number;
|
|
713
946
|
partyId: string;
|
|
@@ -715,6 +948,8 @@ export declare const investorBalancesResponseSchema: z.ZodObject<{
|
|
|
715
948
|
capitalOut: number;
|
|
716
949
|
dealCount?: number | undefined;
|
|
717
950
|
partyName?: string | null | undefined;
|
|
951
|
+
firstCapitalInAt?: string | null | undefined;
|
|
952
|
+
lastCapitalInAt?: string | null | undefined;
|
|
718
953
|
}>, "many">;
|
|
719
954
|
}, "strip", z.ZodTypeAny, {
|
|
720
955
|
balances: {
|
|
@@ -724,6 +959,8 @@ export declare const investorBalancesResponseSchema: z.ZodObject<{
|
|
|
724
959
|
capitalOut: number;
|
|
725
960
|
dealCount?: number | undefined;
|
|
726
961
|
partyName?: string | null | undefined;
|
|
962
|
+
firstCapitalInAt?: string | null | undefined;
|
|
963
|
+
lastCapitalInAt?: string | null | undefined;
|
|
727
964
|
}[];
|
|
728
965
|
}, {
|
|
729
966
|
balances: {
|
|
@@ -733,6 +970,8 @@ export declare const investorBalancesResponseSchema: z.ZodObject<{
|
|
|
733
970
|
capitalOut: number;
|
|
734
971
|
dealCount?: number | undefined;
|
|
735
972
|
partyName?: string | null | undefined;
|
|
973
|
+
firstCapitalInAt?: string | null | undefined;
|
|
974
|
+
lastCapitalInAt?: string | null | undefined;
|
|
736
975
|
}[];
|
|
737
976
|
}>;
|
|
738
977
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -746,6 +985,8 @@ export declare const investorBalancesResponseSchema: z.ZodObject<{
|
|
|
746
985
|
capitalOut: number;
|
|
747
986
|
dealCount?: number | undefined;
|
|
748
987
|
partyName?: string | null | undefined;
|
|
988
|
+
firstCapitalInAt?: string | null | undefined;
|
|
989
|
+
lastCapitalInAt?: string | null | undefined;
|
|
749
990
|
}[];
|
|
750
991
|
};
|
|
751
992
|
}, {
|
|
@@ -759,6 +1000,8 @@ export declare const investorBalancesResponseSchema: z.ZodObject<{
|
|
|
759
1000
|
capitalOut: number;
|
|
760
1001
|
dealCount?: number | undefined;
|
|
761
1002
|
partyName?: string | null | undefined;
|
|
1003
|
+
firstCapitalInAt?: string | null | undefined;
|
|
1004
|
+
lastCapitalInAt?: string | null | undefined;
|
|
762
1005
|
}[];
|
|
763
1006
|
};
|
|
764
1007
|
}>;
|
|
@@ -774,6 +1017,8 @@ export declare const investorBalancesResponseSchema: z.ZodObject<{
|
|
|
774
1017
|
capitalOut: number;
|
|
775
1018
|
dealCount?: number | undefined;
|
|
776
1019
|
partyName?: string | null | undefined;
|
|
1020
|
+
firstCapitalInAt?: string | null | undefined;
|
|
1021
|
+
lastCapitalInAt?: string | null | undefined;
|
|
777
1022
|
}[];
|
|
778
1023
|
};
|
|
779
1024
|
};
|
|
@@ -789,7 +1034,1187 @@ export declare const investorBalancesResponseSchema: z.ZodObject<{
|
|
|
789
1034
|
capitalOut: number;
|
|
790
1035
|
dealCount?: number | undefined;
|
|
791
1036
|
partyName?: string | null | undefined;
|
|
1037
|
+
firstCapitalInAt?: string | null | undefined;
|
|
1038
|
+
lastCapitalInAt?: string | null | undefined;
|
|
1039
|
+
}[];
|
|
1040
|
+
};
|
|
1041
|
+
};
|
|
1042
|
+
}>;
|
|
1043
|
+
export declare const funderBreakdownSchema: z.ZodObject<{
|
|
1044
|
+
funderType: z.ZodEnum<["company", "staff", "investor", "unattributed"]>;
|
|
1045
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1046
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1047
|
+
amount: z.ZodNumber;
|
|
1048
|
+
}, "strip", z.ZodTypeAny, {
|
|
1049
|
+
amount: number;
|
|
1050
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1051
|
+
funderId?: string | null | undefined;
|
|
1052
|
+
funderName?: string | null | undefined;
|
|
1053
|
+
}, {
|
|
1054
|
+
amount: number;
|
|
1055
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1056
|
+
funderId?: string | null | undefined;
|
|
1057
|
+
funderName?: string | null | undefined;
|
|
1058
|
+
}>;
|
|
1059
|
+
export declare const advancePositionSchema: z.ZodObject<{
|
|
1060
|
+
advanceId: z.ZodString;
|
|
1061
|
+
holderType: z.ZodEnum<["staff", "supplier", "other"]>;
|
|
1062
|
+
holderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1063
|
+
holderName: z.ZodString;
|
|
1064
|
+
funderType: z.ZodEnum<["company", "staff", "investor", "unattributed"]>;
|
|
1065
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1066
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1067
|
+
remaining: z.ZodNumber;
|
|
1068
|
+
amount: z.ZodNumber;
|
|
1069
|
+
status: z.ZodEnum<["pending_receipt", "open", "settled", "written_off", "cancelled"]>;
|
|
1070
|
+
openedAt: z.ZodString;
|
|
1071
|
+
expectedSettleBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1072
|
+
overdue: z.ZodBoolean;
|
|
1073
|
+
ageDays: z.ZodNumber;
|
|
1074
|
+
}, "strip", z.ZodTypeAny, {
|
|
1075
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
1076
|
+
remaining: number;
|
|
1077
|
+
amount: number;
|
|
1078
|
+
overdue: boolean;
|
|
1079
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1080
|
+
advanceId: string;
|
|
1081
|
+
holderType: "other" | "supplier" | "staff";
|
|
1082
|
+
holderName: string;
|
|
1083
|
+
openedAt: string;
|
|
1084
|
+
ageDays: number;
|
|
1085
|
+
funderId?: string | null | undefined;
|
|
1086
|
+
funderName?: string | null | undefined;
|
|
1087
|
+
holderId?: string | null | undefined;
|
|
1088
|
+
expectedSettleBy?: string | null | undefined;
|
|
1089
|
+
}, {
|
|
1090
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
1091
|
+
remaining: number;
|
|
1092
|
+
amount: number;
|
|
1093
|
+
overdue: boolean;
|
|
1094
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1095
|
+
advanceId: string;
|
|
1096
|
+
holderType: "other" | "supplier" | "staff";
|
|
1097
|
+
holderName: string;
|
|
1098
|
+
openedAt: string;
|
|
1099
|
+
ageDays: number;
|
|
1100
|
+
funderId?: string | null | undefined;
|
|
1101
|
+
funderName?: string | null | undefined;
|
|
1102
|
+
holderId?: string | null | undefined;
|
|
1103
|
+
expectedSettleBy?: string | null | undefined;
|
|
1104
|
+
}>;
|
|
1105
|
+
export declare const tradeTreasuryAttributesSchema: z.ZodObject<{
|
|
1106
|
+
asOf: z.ZodString;
|
|
1107
|
+
computedAt: z.ZodString;
|
|
1108
|
+
currency: z.ZodString;
|
|
1109
|
+
received: z.ZodNumber;
|
|
1110
|
+
returnedToFunders: z.ZodNumber;
|
|
1111
|
+
available: z.ZodNumber;
|
|
1112
|
+
inSourcing: z.ZodNumber;
|
|
1113
|
+
unallocatedSpend: z.ZodNumber;
|
|
1114
|
+
goodsNotDelivered: z.ZodNumber;
|
|
1115
|
+
deliveredUnpaid: z.ZodNumber;
|
|
1116
|
+
/** Landed cost recovered on deals that are paid (and typically delivered). */
|
|
1117
|
+
deliveredPaid: z.ZodOptional<z.ZodNumber>;
|
|
1118
|
+
receivable: z.ZodNumber;
|
|
1119
|
+
capitalOutstanding: z.ZodNumber;
|
|
1120
|
+
buyerReceipts: z.ZodNumber;
|
|
1121
|
+
/** received − returned vs available + capitalOutstanding */
|
|
1122
|
+
reconciliation: z.ZodObject<{
|
|
1123
|
+
capitalBase: z.ZodNumber;
|
|
1124
|
+
deployedAndHeld: z.ZodNumber;
|
|
1125
|
+
profitLossAndCostsRetained: z.ZodNumber;
|
|
1126
|
+
}, "strip", z.ZodTypeAny, {
|
|
1127
|
+
capitalBase: number;
|
|
1128
|
+
deployedAndHeld: number;
|
|
1129
|
+
profitLossAndCostsRetained: number;
|
|
1130
|
+
}, {
|
|
1131
|
+
capitalBase: number;
|
|
1132
|
+
deployedAndHeld: number;
|
|
1133
|
+
profitLossAndCostsRetained: number;
|
|
1134
|
+
}>;
|
|
1135
|
+
byFunder: z.ZodObject<{
|
|
1136
|
+
received: z.ZodArray<z.ZodObject<{
|
|
1137
|
+
funderType: z.ZodEnum<["company", "staff", "investor", "unattributed"]>;
|
|
1138
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1139
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1140
|
+
amount: z.ZodNumber;
|
|
1141
|
+
}, "strip", z.ZodTypeAny, {
|
|
1142
|
+
amount: number;
|
|
1143
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1144
|
+
funderId?: string | null | undefined;
|
|
1145
|
+
funderName?: string | null | undefined;
|
|
1146
|
+
}, {
|
|
1147
|
+
amount: number;
|
|
1148
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1149
|
+
funderId?: string | null | undefined;
|
|
1150
|
+
funderName?: string | null | undefined;
|
|
1151
|
+
}>, "many">;
|
|
1152
|
+
returned: z.ZodArray<z.ZodObject<{
|
|
1153
|
+
funderType: z.ZodEnum<["company", "staff", "investor", "unattributed"]>;
|
|
1154
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1155
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1156
|
+
amount: z.ZodNumber;
|
|
1157
|
+
}, "strip", z.ZodTypeAny, {
|
|
1158
|
+
amount: number;
|
|
1159
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1160
|
+
funderId?: string | null | undefined;
|
|
1161
|
+
funderName?: string | null | undefined;
|
|
1162
|
+
}, {
|
|
1163
|
+
amount: number;
|
|
1164
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1165
|
+
funderId?: string | null | undefined;
|
|
1166
|
+
funderName?: string | null | undefined;
|
|
1167
|
+
}>, "many">;
|
|
1168
|
+
inSourcing: z.ZodArray<z.ZodObject<{
|
|
1169
|
+
funderType: z.ZodEnum<["company", "staff", "investor", "unattributed"]>;
|
|
1170
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1171
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1172
|
+
amount: z.ZodNumber;
|
|
1173
|
+
}, "strip", z.ZodTypeAny, {
|
|
1174
|
+
amount: number;
|
|
1175
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1176
|
+
funderId?: string | null | undefined;
|
|
1177
|
+
funderName?: string | null | undefined;
|
|
1178
|
+
}, {
|
|
1179
|
+
amount: number;
|
|
1180
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1181
|
+
funderId?: string | null | undefined;
|
|
1182
|
+
funderName?: string | null | undefined;
|
|
1183
|
+
}>, "many">;
|
|
1184
|
+
unallocatedSpend: z.ZodArray<z.ZodObject<{
|
|
1185
|
+
funderType: z.ZodEnum<["company", "staff", "investor", "unattributed"]>;
|
|
1186
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1187
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1188
|
+
amount: z.ZodNumber;
|
|
1189
|
+
}, "strip", z.ZodTypeAny, {
|
|
1190
|
+
amount: number;
|
|
1191
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1192
|
+
funderId?: string | null | undefined;
|
|
1193
|
+
funderName?: string | null | undefined;
|
|
1194
|
+
}, {
|
|
1195
|
+
amount: number;
|
|
1196
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1197
|
+
funderId?: string | null | undefined;
|
|
1198
|
+
funderName?: string | null | undefined;
|
|
1199
|
+
}>, "many">;
|
|
1200
|
+
goodsNotDelivered: z.ZodArray<z.ZodObject<{
|
|
1201
|
+
funderType: z.ZodEnum<["company", "staff", "investor", "unattributed"]>;
|
|
1202
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1203
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1204
|
+
amount: z.ZodNumber;
|
|
1205
|
+
}, "strip", z.ZodTypeAny, {
|
|
1206
|
+
amount: number;
|
|
1207
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1208
|
+
funderId?: string | null | undefined;
|
|
1209
|
+
funderName?: string | null | undefined;
|
|
1210
|
+
}, {
|
|
1211
|
+
amount: number;
|
|
1212
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1213
|
+
funderId?: string | null | undefined;
|
|
1214
|
+
funderName?: string | null | undefined;
|
|
1215
|
+
}>, "many">;
|
|
1216
|
+
deliveredUnpaid: z.ZodArray<z.ZodObject<{
|
|
1217
|
+
funderType: z.ZodEnum<["company", "staff", "investor", "unattributed"]>;
|
|
1218
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1219
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1220
|
+
amount: z.ZodNumber;
|
|
1221
|
+
}, "strip", z.ZodTypeAny, {
|
|
1222
|
+
amount: number;
|
|
1223
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1224
|
+
funderId?: string | null | undefined;
|
|
1225
|
+
funderName?: string | null | undefined;
|
|
1226
|
+
}, {
|
|
1227
|
+
amount: number;
|
|
1228
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1229
|
+
funderId?: string | null | undefined;
|
|
1230
|
+
funderName?: string | null | undefined;
|
|
1231
|
+
}>, "many">;
|
|
1232
|
+
}, "strip", z.ZodTypeAny, {
|
|
1233
|
+
received: {
|
|
1234
|
+
amount: number;
|
|
1235
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1236
|
+
funderId?: string | null | undefined;
|
|
1237
|
+
funderName?: string | null | undefined;
|
|
1238
|
+
}[];
|
|
1239
|
+
returned: {
|
|
1240
|
+
amount: number;
|
|
1241
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1242
|
+
funderId?: string | null | undefined;
|
|
1243
|
+
funderName?: string | null | undefined;
|
|
1244
|
+
}[];
|
|
1245
|
+
inSourcing: {
|
|
1246
|
+
amount: number;
|
|
1247
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1248
|
+
funderId?: string | null | undefined;
|
|
1249
|
+
funderName?: string | null | undefined;
|
|
1250
|
+
}[];
|
|
1251
|
+
unallocatedSpend: {
|
|
1252
|
+
amount: number;
|
|
1253
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1254
|
+
funderId?: string | null | undefined;
|
|
1255
|
+
funderName?: string | null | undefined;
|
|
1256
|
+
}[];
|
|
1257
|
+
goodsNotDelivered: {
|
|
1258
|
+
amount: number;
|
|
1259
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1260
|
+
funderId?: string | null | undefined;
|
|
1261
|
+
funderName?: string | null | undefined;
|
|
1262
|
+
}[];
|
|
1263
|
+
deliveredUnpaid: {
|
|
1264
|
+
amount: number;
|
|
1265
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1266
|
+
funderId?: string | null | undefined;
|
|
1267
|
+
funderName?: string | null | undefined;
|
|
1268
|
+
}[];
|
|
1269
|
+
}, {
|
|
1270
|
+
received: {
|
|
1271
|
+
amount: number;
|
|
1272
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1273
|
+
funderId?: string | null | undefined;
|
|
1274
|
+
funderName?: string | null | undefined;
|
|
1275
|
+
}[];
|
|
1276
|
+
returned: {
|
|
1277
|
+
amount: number;
|
|
1278
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1279
|
+
funderId?: string | null | undefined;
|
|
1280
|
+
funderName?: string | null | undefined;
|
|
1281
|
+
}[];
|
|
1282
|
+
inSourcing: {
|
|
1283
|
+
amount: number;
|
|
1284
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1285
|
+
funderId?: string | null | undefined;
|
|
1286
|
+
funderName?: string | null | undefined;
|
|
1287
|
+
}[];
|
|
1288
|
+
unallocatedSpend: {
|
|
1289
|
+
amount: number;
|
|
1290
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1291
|
+
funderId?: string | null | undefined;
|
|
1292
|
+
funderName?: string | null | undefined;
|
|
1293
|
+
}[];
|
|
1294
|
+
goodsNotDelivered: {
|
|
1295
|
+
amount: number;
|
|
1296
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1297
|
+
funderId?: string | null | undefined;
|
|
1298
|
+
funderName?: string | null | undefined;
|
|
1299
|
+
}[];
|
|
1300
|
+
deliveredUnpaid: {
|
|
1301
|
+
amount: number;
|
|
1302
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1303
|
+
funderId?: string | null | undefined;
|
|
1304
|
+
funderName?: string | null | undefined;
|
|
1305
|
+
}[];
|
|
1306
|
+
}>;
|
|
1307
|
+
openAdvances: z.ZodArray<z.ZodObject<{
|
|
1308
|
+
advanceId: z.ZodString;
|
|
1309
|
+
holderType: z.ZodEnum<["staff", "supplier", "other"]>;
|
|
1310
|
+
holderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1311
|
+
holderName: z.ZodString;
|
|
1312
|
+
funderType: z.ZodEnum<["company", "staff", "investor", "unattributed"]>;
|
|
1313
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1314
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1315
|
+
remaining: z.ZodNumber;
|
|
1316
|
+
amount: z.ZodNumber;
|
|
1317
|
+
status: z.ZodEnum<["pending_receipt", "open", "settled", "written_off", "cancelled"]>;
|
|
1318
|
+
openedAt: z.ZodString;
|
|
1319
|
+
expectedSettleBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1320
|
+
overdue: z.ZodBoolean;
|
|
1321
|
+
ageDays: z.ZodNumber;
|
|
1322
|
+
}, "strip", z.ZodTypeAny, {
|
|
1323
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
1324
|
+
remaining: number;
|
|
1325
|
+
amount: number;
|
|
1326
|
+
overdue: boolean;
|
|
1327
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1328
|
+
advanceId: string;
|
|
1329
|
+
holderType: "other" | "supplier" | "staff";
|
|
1330
|
+
holderName: string;
|
|
1331
|
+
openedAt: string;
|
|
1332
|
+
ageDays: number;
|
|
1333
|
+
funderId?: string | null | undefined;
|
|
1334
|
+
funderName?: string | null | undefined;
|
|
1335
|
+
holderId?: string | null | undefined;
|
|
1336
|
+
expectedSettleBy?: string | null | undefined;
|
|
1337
|
+
}, {
|
|
1338
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
1339
|
+
remaining: number;
|
|
1340
|
+
amount: number;
|
|
1341
|
+
overdue: boolean;
|
|
1342
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1343
|
+
advanceId: string;
|
|
1344
|
+
holderType: "other" | "supplier" | "staff";
|
|
1345
|
+
holderName: string;
|
|
1346
|
+
openedAt: string;
|
|
1347
|
+
ageDays: number;
|
|
1348
|
+
funderId?: string | null | undefined;
|
|
1349
|
+
funderName?: string | null | undefined;
|
|
1350
|
+
holderId?: string | null | undefined;
|
|
1351
|
+
expectedSettleBy?: string | null | undefined;
|
|
1352
|
+
}>, "many">;
|
|
1353
|
+
}, "strip", z.ZodTypeAny, {
|
|
1354
|
+
received: number;
|
|
1355
|
+
currency: string;
|
|
1356
|
+
available: number;
|
|
1357
|
+
computedAt: string;
|
|
1358
|
+
asOf: string;
|
|
1359
|
+
returnedToFunders: number;
|
|
1360
|
+
inSourcing: number;
|
|
1361
|
+
unallocatedSpend: number;
|
|
1362
|
+
goodsNotDelivered: number;
|
|
1363
|
+
deliveredUnpaid: number;
|
|
1364
|
+
receivable: number;
|
|
1365
|
+
capitalOutstanding: number;
|
|
1366
|
+
buyerReceipts: number;
|
|
1367
|
+
reconciliation: {
|
|
1368
|
+
capitalBase: number;
|
|
1369
|
+
deployedAndHeld: number;
|
|
1370
|
+
profitLossAndCostsRetained: number;
|
|
1371
|
+
};
|
|
1372
|
+
byFunder: {
|
|
1373
|
+
received: {
|
|
1374
|
+
amount: number;
|
|
1375
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1376
|
+
funderId?: string | null | undefined;
|
|
1377
|
+
funderName?: string | null | undefined;
|
|
1378
|
+
}[];
|
|
1379
|
+
returned: {
|
|
1380
|
+
amount: number;
|
|
1381
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1382
|
+
funderId?: string | null | undefined;
|
|
1383
|
+
funderName?: string | null | undefined;
|
|
1384
|
+
}[];
|
|
1385
|
+
inSourcing: {
|
|
1386
|
+
amount: number;
|
|
1387
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1388
|
+
funderId?: string | null | undefined;
|
|
1389
|
+
funderName?: string | null | undefined;
|
|
1390
|
+
}[];
|
|
1391
|
+
unallocatedSpend: {
|
|
1392
|
+
amount: number;
|
|
1393
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1394
|
+
funderId?: string | null | undefined;
|
|
1395
|
+
funderName?: string | null | undefined;
|
|
1396
|
+
}[];
|
|
1397
|
+
goodsNotDelivered: {
|
|
1398
|
+
amount: number;
|
|
1399
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1400
|
+
funderId?: string | null | undefined;
|
|
1401
|
+
funderName?: string | null | undefined;
|
|
1402
|
+
}[];
|
|
1403
|
+
deliveredUnpaid: {
|
|
1404
|
+
amount: number;
|
|
1405
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1406
|
+
funderId?: string | null | undefined;
|
|
1407
|
+
funderName?: string | null | undefined;
|
|
1408
|
+
}[];
|
|
1409
|
+
};
|
|
1410
|
+
openAdvances: {
|
|
1411
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
1412
|
+
remaining: number;
|
|
1413
|
+
amount: number;
|
|
1414
|
+
overdue: boolean;
|
|
1415
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1416
|
+
advanceId: string;
|
|
1417
|
+
holderType: "other" | "supplier" | "staff";
|
|
1418
|
+
holderName: string;
|
|
1419
|
+
openedAt: string;
|
|
1420
|
+
ageDays: number;
|
|
1421
|
+
funderId?: string | null | undefined;
|
|
1422
|
+
funderName?: string | null | undefined;
|
|
1423
|
+
holderId?: string | null | undefined;
|
|
1424
|
+
expectedSettleBy?: string | null | undefined;
|
|
1425
|
+
}[];
|
|
1426
|
+
deliveredPaid?: number | undefined;
|
|
1427
|
+
}, {
|
|
1428
|
+
received: number;
|
|
1429
|
+
currency: string;
|
|
1430
|
+
available: number;
|
|
1431
|
+
computedAt: string;
|
|
1432
|
+
asOf: string;
|
|
1433
|
+
returnedToFunders: number;
|
|
1434
|
+
inSourcing: number;
|
|
1435
|
+
unallocatedSpend: number;
|
|
1436
|
+
goodsNotDelivered: number;
|
|
1437
|
+
deliveredUnpaid: number;
|
|
1438
|
+
receivable: number;
|
|
1439
|
+
capitalOutstanding: number;
|
|
1440
|
+
buyerReceipts: number;
|
|
1441
|
+
reconciliation: {
|
|
1442
|
+
capitalBase: number;
|
|
1443
|
+
deployedAndHeld: number;
|
|
1444
|
+
profitLossAndCostsRetained: number;
|
|
1445
|
+
};
|
|
1446
|
+
byFunder: {
|
|
1447
|
+
received: {
|
|
1448
|
+
amount: number;
|
|
1449
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1450
|
+
funderId?: string | null | undefined;
|
|
1451
|
+
funderName?: string | null | undefined;
|
|
1452
|
+
}[];
|
|
1453
|
+
returned: {
|
|
1454
|
+
amount: number;
|
|
1455
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1456
|
+
funderId?: string | null | undefined;
|
|
1457
|
+
funderName?: string | null | undefined;
|
|
1458
|
+
}[];
|
|
1459
|
+
inSourcing: {
|
|
1460
|
+
amount: number;
|
|
1461
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1462
|
+
funderId?: string | null | undefined;
|
|
1463
|
+
funderName?: string | null | undefined;
|
|
1464
|
+
}[];
|
|
1465
|
+
unallocatedSpend: {
|
|
1466
|
+
amount: number;
|
|
1467
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1468
|
+
funderId?: string | null | undefined;
|
|
1469
|
+
funderName?: string | null | undefined;
|
|
1470
|
+
}[];
|
|
1471
|
+
goodsNotDelivered: {
|
|
1472
|
+
amount: number;
|
|
1473
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1474
|
+
funderId?: string | null | undefined;
|
|
1475
|
+
funderName?: string | null | undefined;
|
|
1476
|
+
}[];
|
|
1477
|
+
deliveredUnpaid: {
|
|
1478
|
+
amount: number;
|
|
1479
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1480
|
+
funderId?: string | null | undefined;
|
|
1481
|
+
funderName?: string | null | undefined;
|
|
1482
|
+
}[];
|
|
1483
|
+
};
|
|
1484
|
+
openAdvances: {
|
|
1485
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
1486
|
+
remaining: number;
|
|
1487
|
+
amount: number;
|
|
1488
|
+
overdue: boolean;
|
|
1489
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1490
|
+
advanceId: string;
|
|
1491
|
+
holderType: "other" | "supplier" | "staff";
|
|
1492
|
+
holderName: string;
|
|
1493
|
+
openedAt: string;
|
|
1494
|
+
ageDays: number;
|
|
1495
|
+
funderId?: string | null | undefined;
|
|
1496
|
+
funderName?: string | null | undefined;
|
|
1497
|
+
holderId?: string | null | undefined;
|
|
1498
|
+
expectedSettleBy?: string | null | undefined;
|
|
1499
|
+
}[];
|
|
1500
|
+
deliveredPaid?: number | undefined;
|
|
1501
|
+
}>;
|
|
1502
|
+
export declare const tradeTreasuryResponseSchema: z.ZodObject<{
|
|
1503
|
+
data: z.ZodObject<{
|
|
1504
|
+
type: z.ZodLiteral<"trade-treasury">;
|
|
1505
|
+
id: z.ZodString;
|
|
1506
|
+
attributes: z.ZodObject<{
|
|
1507
|
+
asOf: z.ZodString;
|
|
1508
|
+
computedAt: z.ZodString;
|
|
1509
|
+
currency: z.ZodString;
|
|
1510
|
+
received: z.ZodNumber;
|
|
1511
|
+
returnedToFunders: z.ZodNumber;
|
|
1512
|
+
available: z.ZodNumber;
|
|
1513
|
+
inSourcing: z.ZodNumber;
|
|
1514
|
+
unallocatedSpend: z.ZodNumber;
|
|
1515
|
+
goodsNotDelivered: z.ZodNumber;
|
|
1516
|
+
deliveredUnpaid: z.ZodNumber;
|
|
1517
|
+
/** Landed cost recovered on deals that are paid (and typically delivered). */
|
|
1518
|
+
deliveredPaid: z.ZodOptional<z.ZodNumber>;
|
|
1519
|
+
receivable: z.ZodNumber;
|
|
1520
|
+
capitalOutstanding: z.ZodNumber;
|
|
1521
|
+
buyerReceipts: z.ZodNumber;
|
|
1522
|
+
/** received − returned vs available + capitalOutstanding */
|
|
1523
|
+
reconciliation: z.ZodObject<{
|
|
1524
|
+
capitalBase: z.ZodNumber;
|
|
1525
|
+
deployedAndHeld: z.ZodNumber;
|
|
1526
|
+
profitLossAndCostsRetained: z.ZodNumber;
|
|
1527
|
+
}, "strip", z.ZodTypeAny, {
|
|
1528
|
+
capitalBase: number;
|
|
1529
|
+
deployedAndHeld: number;
|
|
1530
|
+
profitLossAndCostsRetained: number;
|
|
1531
|
+
}, {
|
|
1532
|
+
capitalBase: number;
|
|
1533
|
+
deployedAndHeld: number;
|
|
1534
|
+
profitLossAndCostsRetained: number;
|
|
1535
|
+
}>;
|
|
1536
|
+
byFunder: z.ZodObject<{
|
|
1537
|
+
received: z.ZodArray<z.ZodObject<{
|
|
1538
|
+
funderType: z.ZodEnum<["company", "staff", "investor", "unattributed"]>;
|
|
1539
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1540
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1541
|
+
amount: z.ZodNumber;
|
|
1542
|
+
}, "strip", z.ZodTypeAny, {
|
|
1543
|
+
amount: number;
|
|
1544
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1545
|
+
funderId?: string | null | undefined;
|
|
1546
|
+
funderName?: string | null | undefined;
|
|
1547
|
+
}, {
|
|
1548
|
+
amount: number;
|
|
1549
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1550
|
+
funderId?: string | null | undefined;
|
|
1551
|
+
funderName?: string | null | undefined;
|
|
1552
|
+
}>, "many">;
|
|
1553
|
+
returned: z.ZodArray<z.ZodObject<{
|
|
1554
|
+
funderType: z.ZodEnum<["company", "staff", "investor", "unattributed"]>;
|
|
1555
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1556
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1557
|
+
amount: z.ZodNumber;
|
|
1558
|
+
}, "strip", z.ZodTypeAny, {
|
|
1559
|
+
amount: number;
|
|
1560
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1561
|
+
funderId?: string | null | undefined;
|
|
1562
|
+
funderName?: string | null | undefined;
|
|
1563
|
+
}, {
|
|
1564
|
+
amount: number;
|
|
1565
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1566
|
+
funderId?: string | null | undefined;
|
|
1567
|
+
funderName?: string | null | undefined;
|
|
1568
|
+
}>, "many">;
|
|
1569
|
+
inSourcing: z.ZodArray<z.ZodObject<{
|
|
1570
|
+
funderType: z.ZodEnum<["company", "staff", "investor", "unattributed"]>;
|
|
1571
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1572
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1573
|
+
amount: z.ZodNumber;
|
|
1574
|
+
}, "strip", z.ZodTypeAny, {
|
|
1575
|
+
amount: number;
|
|
1576
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1577
|
+
funderId?: string | null | undefined;
|
|
1578
|
+
funderName?: string | null | undefined;
|
|
1579
|
+
}, {
|
|
1580
|
+
amount: number;
|
|
1581
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1582
|
+
funderId?: string | null | undefined;
|
|
1583
|
+
funderName?: string | null | undefined;
|
|
1584
|
+
}>, "many">;
|
|
1585
|
+
unallocatedSpend: z.ZodArray<z.ZodObject<{
|
|
1586
|
+
funderType: z.ZodEnum<["company", "staff", "investor", "unattributed"]>;
|
|
1587
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1588
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1589
|
+
amount: z.ZodNumber;
|
|
1590
|
+
}, "strip", z.ZodTypeAny, {
|
|
1591
|
+
amount: number;
|
|
1592
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1593
|
+
funderId?: string | null | undefined;
|
|
1594
|
+
funderName?: string | null | undefined;
|
|
1595
|
+
}, {
|
|
1596
|
+
amount: number;
|
|
1597
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1598
|
+
funderId?: string | null | undefined;
|
|
1599
|
+
funderName?: string | null | undefined;
|
|
1600
|
+
}>, "many">;
|
|
1601
|
+
goodsNotDelivered: z.ZodArray<z.ZodObject<{
|
|
1602
|
+
funderType: z.ZodEnum<["company", "staff", "investor", "unattributed"]>;
|
|
1603
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1604
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1605
|
+
amount: z.ZodNumber;
|
|
1606
|
+
}, "strip", z.ZodTypeAny, {
|
|
1607
|
+
amount: number;
|
|
1608
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1609
|
+
funderId?: string | null | undefined;
|
|
1610
|
+
funderName?: string | null | undefined;
|
|
1611
|
+
}, {
|
|
1612
|
+
amount: number;
|
|
1613
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1614
|
+
funderId?: string | null | undefined;
|
|
1615
|
+
funderName?: string | null | undefined;
|
|
1616
|
+
}>, "many">;
|
|
1617
|
+
deliveredUnpaid: z.ZodArray<z.ZodObject<{
|
|
1618
|
+
funderType: z.ZodEnum<["company", "staff", "investor", "unattributed"]>;
|
|
1619
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1620
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1621
|
+
amount: z.ZodNumber;
|
|
1622
|
+
}, "strip", z.ZodTypeAny, {
|
|
1623
|
+
amount: number;
|
|
1624
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1625
|
+
funderId?: string | null | undefined;
|
|
1626
|
+
funderName?: string | null | undefined;
|
|
1627
|
+
}, {
|
|
1628
|
+
amount: number;
|
|
1629
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1630
|
+
funderId?: string | null | undefined;
|
|
1631
|
+
funderName?: string | null | undefined;
|
|
1632
|
+
}>, "many">;
|
|
1633
|
+
}, "strip", z.ZodTypeAny, {
|
|
1634
|
+
received: {
|
|
1635
|
+
amount: number;
|
|
1636
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1637
|
+
funderId?: string | null | undefined;
|
|
1638
|
+
funderName?: string | null | undefined;
|
|
1639
|
+
}[];
|
|
1640
|
+
returned: {
|
|
1641
|
+
amount: number;
|
|
1642
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1643
|
+
funderId?: string | null | undefined;
|
|
1644
|
+
funderName?: string | null | undefined;
|
|
1645
|
+
}[];
|
|
1646
|
+
inSourcing: {
|
|
1647
|
+
amount: number;
|
|
1648
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1649
|
+
funderId?: string | null | undefined;
|
|
1650
|
+
funderName?: string | null | undefined;
|
|
1651
|
+
}[];
|
|
1652
|
+
unallocatedSpend: {
|
|
1653
|
+
amount: number;
|
|
1654
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1655
|
+
funderId?: string | null | undefined;
|
|
1656
|
+
funderName?: string | null | undefined;
|
|
1657
|
+
}[];
|
|
1658
|
+
goodsNotDelivered: {
|
|
1659
|
+
amount: number;
|
|
1660
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1661
|
+
funderId?: string | null | undefined;
|
|
1662
|
+
funderName?: string | null | undefined;
|
|
1663
|
+
}[];
|
|
1664
|
+
deliveredUnpaid: {
|
|
1665
|
+
amount: number;
|
|
1666
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1667
|
+
funderId?: string | null | undefined;
|
|
1668
|
+
funderName?: string | null | undefined;
|
|
1669
|
+
}[];
|
|
1670
|
+
}, {
|
|
1671
|
+
received: {
|
|
1672
|
+
amount: number;
|
|
1673
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1674
|
+
funderId?: string | null | undefined;
|
|
1675
|
+
funderName?: string | null | undefined;
|
|
1676
|
+
}[];
|
|
1677
|
+
returned: {
|
|
1678
|
+
amount: number;
|
|
1679
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1680
|
+
funderId?: string | null | undefined;
|
|
1681
|
+
funderName?: string | null | undefined;
|
|
1682
|
+
}[];
|
|
1683
|
+
inSourcing: {
|
|
1684
|
+
amount: number;
|
|
1685
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1686
|
+
funderId?: string | null | undefined;
|
|
1687
|
+
funderName?: string | null | undefined;
|
|
1688
|
+
}[];
|
|
1689
|
+
unallocatedSpend: {
|
|
1690
|
+
amount: number;
|
|
1691
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1692
|
+
funderId?: string | null | undefined;
|
|
1693
|
+
funderName?: string | null | undefined;
|
|
1694
|
+
}[];
|
|
1695
|
+
goodsNotDelivered: {
|
|
1696
|
+
amount: number;
|
|
1697
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1698
|
+
funderId?: string | null | undefined;
|
|
1699
|
+
funderName?: string | null | undefined;
|
|
1700
|
+
}[];
|
|
1701
|
+
deliveredUnpaid: {
|
|
1702
|
+
amount: number;
|
|
1703
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1704
|
+
funderId?: string | null | undefined;
|
|
1705
|
+
funderName?: string | null | undefined;
|
|
1706
|
+
}[];
|
|
1707
|
+
}>;
|
|
1708
|
+
openAdvances: z.ZodArray<z.ZodObject<{
|
|
1709
|
+
advanceId: z.ZodString;
|
|
1710
|
+
holderType: z.ZodEnum<["staff", "supplier", "other"]>;
|
|
1711
|
+
holderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1712
|
+
holderName: z.ZodString;
|
|
1713
|
+
funderType: z.ZodEnum<["company", "staff", "investor", "unattributed"]>;
|
|
1714
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1715
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1716
|
+
remaining: z.ZodNumber;
|
|
1717
|
+
amount: z.ZodNumber;
|
|
1718
|
+
status: z.ZodEnum<["pending_receipt", "open", "settled", "written_off", "cancelled"]>;
|
|
1719
|
+
openedAt: z.ZodString;
|
|
1720
|
+
expectedSettleBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1721
|
+
overdue: z.ZodBoolean;
|
|
1722
|
+
ageDays: z.ZodNumber;
|
|
1723
|
+
}, "strip", z.ZodTypeAny, {
|
|
1724
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
1725
|
+
remaining: number;
|
|
1726
|
+
amount: number;
|
|
1727
|
+
overdue: boolean;
|
|
1728
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1729
|
+
advanceId: string;
|
|
1730
|
+
holderType: "other" | "supplier" | "staff";
|
|
1731
|
+
holderName: string;
|
|
1732
|
+
openedAt: string;
|
|
1733
|
+
ageDays: number;
|
|
1734
|
+
funderId?: string | null | undefined;
|
|
1735
|
+
funderName?: string | null | undefined;
|
|
1736
|
+
holderId?: string | null | undefined;
|
|
1737
|
+
expectedSettleBy?: string | null | undefined;
|
|
1738
|
+
}, {
|
|
1739
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
1740
|
+
remaining: number;
|
|
1741
|
+
amount: number;
|
|
1742
|
+
overdue: boolean;
|
|
1743
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1744
|
+
advanceId: string;
|
|
1745
|
+
holderType: "other" | "supplier" | "staff";
|
|
1746
|
+
holderName: string;
|
|
1747
|
+
openedAt: string;
|
|
1748
|
+
ageDays: number;
|
|
1749
|
+
funderId?: string | null | undefined;
|
|
1750
|
+
funderName?: string | null | undefined;
|
|
1751
|
+
holderId?: string | null | undefined;
|
|
1752
|
+
expectedSettleBy?: string | null | undefined;
|
|
1753
|
+
}>, "many">;
|
|
1754
|
+
}, "strip", z.ZodTypeAny, {
|
|
1755
|
+
received: number;
|
|
1756
|
+
currency: string;
|
|
1757
|
+
available: number;
|
|
1758
|
+
computedAt: string;
|
|
1759
|
+
asOf: string;
|
|
1760
|
+
returnedToFunders: number;
|
|
1761
|
+
inSourcing: number;
|
|
1762
|
+
unallocatedSpend: number;
|
|
1763
|
+
goodsNotDelivered: number;
|
|
1764
|
+
deliveredUnpaid: number;
|
|
1765
|
+
receivable: number;
|
|
1766
|
+
capitalOutstanding: number;
|
|
1767
|
+
buyerReceipts: number;
|
|
1768
|
+
reconciliation: {
|
|
1769
|
+
capitalBase: number;
|
|
1770
|
+
deployedAndHeld: number;
|
|
1771
|
+
profitLossAndCostsRetained: number;
|
|
1772
|
+
};
|
|
1773
|
+
byFunder: {
|
|
1774
|
+
received: {
|
|
1775
|
+
amount: number;
|
|
1776
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1777
|
+
funderId?: string | null | undefined;
|
|
1778
|
+
funderName?: string | null | undefined;
|
|
1779
|
+
}[];
|
|
1780
|
+
returned: {
|
|
1781
|
+
amount: number;
|
|
1782
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1783
|
+
funderId?: string | null | undefined;
|
|
1784
|
+
funderName?: string | null | undefined;
|
|
1785
|
+
}[];
|
|
1786
|
+
inSourcing: {
|
|
1787
|
+
amount: number;
|
|
1788
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1789
|
+
funderId?: string | null | undefined;
|
|
1790
|
+
funderName?: string | null | undefined;
|
|
1791
|
+
}[];
|
|
1792
|
+
unallocatedSpend: {
|
|
1793
|
+
amount: number;
|
|
1794
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1795
|
+
funderId?: string | null | undefined;
|
|
1796
|
+
funderName?: string | null | undefined;
|
|
1797
|
+
}[];
|
|
1798
|
+
goodsNotDelivered: {
|
|
1799
|
+
amount: number;
|
|
1800
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1801
|
+
funderId?: string | null | undefined;
|
|
1802
|
+
funderName?: string | null | undefined;
|
|
1803
|
+
}[];
|
|
1804
|
+
deliveredUnpaid: {
|
|
1805
|
+
amount: number;
|
|
1806
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1807
|
+
funderId?: string | null | undefined;
|
|
1808
|
+
funderName?: string | null | undefined;
|
|
1809
|
+
}[];
|
|
1810
|
+
};
|
|
1811
|
+
openAdvances: {
|
|
1812
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
1813
|
+
remaining: number;
|
|
1814
|
+
amount: number;
|
|
1815
|
+
overdue: boolean;
|
|
1816
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1817
|
+
advanceId: string;
|
|
1818
|
+
holderType: "other" | "supplier" | "staff";
|
|
1819
|
+
holderName: string;
|
|
1820
|
+
openedAt: string;
|
|
1821
|
+
ageDays: number;
|
|
1822
|
+
funderId?: string | null | undefined;
|
|
1823
|
+
funderName?: string | null | undefined;
|
|
1824
|
+
holderId?: string | null | undefined;
|
|
1825
|
+
expectedSettleBy?: string | null | undefined;
|
|
1826
|
+
}[];
|
|
1827
|
+
deliveredPaid?: number | undefined;
|
|
1828
|
+
}, {
|
|
1829
|
+
received: number;
|
|
1830
|
+
currency: string;
|
|
1831
|
+
available: number;
|
|
1832
|
+
computedAt: string;
|
|
1833
|
+
asOf: string;
|
|
1834
|
+
returnedToFunders: number;
|
|
1835
|
+
inSourcing: number;
|
|
1836
|
+
unallocatedSpend: number;
|
|
1837
|
+
goodsNotDelivered: number;
|
|
1838
|
+
deliveredUnpaid: number;
|
|
1839
|
+
receivable: number;
|
|
1840
|
+
capitalOutstanding: number;
|
|
1841
|
+
buyerReceipts: number;
|
|
1842
|
+
reconciliation: {
|
|
1843
|
+
capitalBase: number;
|
|
1844
|
+
deployedAndHeld: number;
|
|
1845
|
+
profitLossAndCostsRetained: number;
|
|
1846
|
+
};
|
|
1847
|
+
byFunder: {
|
|
1848
|
+
received: {
|
|
1849
|
+
amount: number;
|
|
1850
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1851
|
+
funderId?: string | null | undefined;
|
|
1852
|
+
funderName?: string | null | undefined;
|
|
1853
|
+
}[];
|
|
1854
|
+
returned: {
|
|
1855
|
+
amount: number;
|
|
1856
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1857
|
+
funderId?: string | null | undefined;
|
|
1858
|
+
funderName?: string | null | undefined;
|
|
1859
|
+
}[];
|
|
1860
|
+
inSourcing: {
|
|
1861
|
+
amount: number;
|
|
1862
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1863
|
+
funderId?: string | null | undefined;
|
|
1864
|
+
funderName?: string | null | undefined;
|
|
1865
|
+
}[];
|
|
1866
|
+
unallocatedSpend: {
|
|
1867
|
+
amount: number;
|
|
1868
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1869
|
+
funderId?: string | null | undefined;
|
|
1870
|
+
funderName?: string | null | undefined;
|
|
1871
|
+
}[];
|
|
1872
|
+
goodsNotDelivered: {
|
|
1873
|
+
amount: number;
|
|
1874
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1875
|
+
funderId?: string | null | undefined;
|
|
1876
|
+
funderName?: string | null | undefined;
|
|
1877
|
+
}[];
|
|
1878
|
+
deliveredUnpaid: {
|
|
1879
|
+
amount: number;
|
|
1880
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1881
|
+
funderId?: string | null | undefined;
|
|
1882
|
+
funderName?: string | null | undefined;
|
|
1883
|
+
}[];
|
|
1884
|
+
};
|
|
1885
|
+
openAdvances: {
|
|
1886
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
1887
|
+
remaining: number;
|
|
1888
|
+
amount: number;
|
|
1889
|
+
overdue: boolean;
|
|
1890
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1891
|
+
advanceId: string;
|
|
1892
|
+
holderType: "other" | "supplier" | "staff";
|
|
1893
|
+
holderName: string;
|
|
1894
|
+
openedAt: string;
|
|
1895
|
+
ageDays: number;
|
|
1896
|
+
funderId?: string | null | undefined;
|
|
1897
|
+
funderName?: string | null | undefined;
|
|
1898
|
+
holderId?: string | null | undefined;
|
|
1899
|
+
expectedSettleBy?: string | null | undefined;
|
|
1900
|
+
}[];
|
|
1901
|
+
deliveredPaid?: number | undefined;
|
|
1902
|
+
}>;
|
|
1903
|
+
}, "strip", z.ZodTypeAny, {
|
|
1904
|
+
type: "trade-treasury";
|
|
1905
|
+
id: string;
|
|
1906
|
+
attributes: {
|
|
1907
|
+
received: number;
|
|
1908
|
+
currency: string;
|
|
1909
|
+
available: number;
|
|
1910
|
+
computedAt: string;
|
|
1911
|
+
asOf: string;
|
|
1912
|
+
returnedToFunders: number;
|
|
1913
|
+
inSourcing: number;
|
|
1914
|
+
unallocatedSpend: number;
|
|
1915
|
+
goodsNotDelivered: number;
|
|
1916
|
+
deliveredUnpaid: number;
|
|
1917
|
+
receivable: number;
|
|
1918
|
+
capitalOutstanding: number;
|
|
1919
|
+
buyerReceipts: number;
|
|
1920
|
+
reconciliation: {
|
|
1921
|
+
capitalBase: number;
|
|
1922
|
+
deployedAndHeld: number;
|
|
1923
|
+
profitLossAndCostsRetained: number;
|
|
1924
|
+
};
|
|
1925
|
+
byFunder: {
|
|
1926
|
+
received: {
|
|
1927
|
+
amount: number;
|
|
1928
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1929
|
+
funderId?: string | null | undefined;
|
|
1930
|
+
funderName?: string | null | undefined;
|
|
1931
|
+
}[];
|
|
1932
|
+
returned: {
|
|
1933
|
+
amount: number;
|
|
1934
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1935
|
+
funderId?: string | null | undefined;
|
|
1936
|
+
funderName?: string | null | undefined;
|
|
1937
|
+
}[];
|
|
1938
|
+
inSourcing: {
|
|
1939
|
+
amount: number;
|
|
1940
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1941
|
+
funderId?: string | null | undefined;
|
|
1942
|
+
funderName?: string | null | undefined;
|
|
1943
|
+
}[];
|
|
1944
|
+
unallocatedSpend: {
|
|
1945
|
+
amount: number;
|
|
1946
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1947
|
+
funderId?: string | null | undefined;
|
|
1948
|
+
funderName?: string | null | undefined;
|
|
1949
|
+
}[];
|
|
1950
|
+
goodsNotDelivered: {
|
|
1951
|
+
amount: number;
|
|
1952
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1953
|
+
funderId?: string | null | undefined;
|
|
1954
|
+
funderName?: string | null | undefined;
|
|
1955
|
+
}[];
|
|
1956
|
+
deliveredUnpaid: {
|
|
1957
|
+
amount: number;
|
|
1958
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1959
|
+
funderId?: string | null | undefined;
|
|
1960
|
+
funderName?: string | null | undefined;
|
|
1961
|
+
}[];
|
|
1962
|
+
};
|
|
1963
|
+
openAdvances: {
|
|
1964
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
1965
|
+
remaining: number;
|
|
1966
|
+
amount: number;
|
|
1967
|
+
overdue: boolean;
|
|
1968
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
1969
|
+
advanceId: string;
|
|
1970
|
+
holderType: "other" | "supplier" | "staff";
|
|
1971
|
+
holderName: string;
|
|
1972
|
+
openedAt: string;
|
|
1973
|
+
ageDays: number;
|
|
1974
|
+
funderId?: string | null | undefined;
|
|
1975
|
+
funderName?: string | null | undefined;
|
|
1976
|
+
holderId?: string | null | undefined;
|
|
1977
|
+
expectedSettleBy?: string | null | undefined;
|
|
1978
|
+
}[];
|
|
1979
|
+
deliveredPaid?: number | undefined;
|
|
1980
|
+
};
|
|
1981
|
+
}, {
|
|
1982
|
+
type: "trade-treasury";
|
|
1983
|
+
id: string;
|
|
1984
|
+
attributes: {
|
|
1985
|
+
received: number;
|
|
1986
|
+
currency: string;
|
|
1987
|
+
available: number;
|
|
1988
|
+
computedAt: string;
|
|
1989
|
+
asOf: string;
|
|
1990
|
+
returnedToFunders: number;
|
|
1991
|
+
inSourcing: number;
|
|
1992
|
+
unallocatedSpend: number;
|
|
1993
|
+
goodsNotDelivered: number;
|
|
1994
|
+
deliveredUnpaid: number;
|
|
1995
|
+
receivable: number;
|
|
1996
|
+
capitalOutstanding: number;
|
|
1997
|
+
buyerReceipts: number;
|
|
1998
|
+
reconciliation: {
|
|
1999
|
+
capitalBase: number;
|
|
2000
|
+
deployedAndHeld: number;
|
|
2001
|
+
profitLossAndCostsRetained: number;
|
|
2002
|
+
};
|
|
2003
|
+
byFunder: {
|
|
2004
|
+
received: {
|
|
2005
|
+
amount: number;
|
|
2006
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2007
|
+
funderId?: string | null | undefined;
|
|
2008
|
+
funderName?: string | null | undefined;
|
|
2009
|
+
}[];
|
|
2010
|
+
returned: {
|
|
2011
|
+
amount: number;
|
|
2012
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2013
|
+
funderId?: string | null | undefined;
|
|
2014
|
+
funderName?: string | null | undefined;
|
|
2015
|
+
}[];
|
|
2016
|
+
inSourcing: {
|
|
2017
|
+
amount: number;
|
|
2018
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2019
|
+
funderId?: string | null | undefined;
|
|
2020
|
+
funderName?: string | null | undefined;
|
|
2021
|
+
}[];
|
|
2022
|
+
unallocatedSpend: {
|
|
2023
|
+
amount: number;
|
|
2024
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2025
|
+
funderId?: string | null | undefined;
|
|
2026
|
+
funderName?: string | null | undefined;
|
|
2027
|
+
}[];
|
|
2028
|
+
goodsNotDelivered: {
|
|
2029
|
+
amount: number;
|
|
2030
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2031
|
+
funderId?: string | null | undefined;
|
|
2032
|
+
funderName?: string | null | undefined;
|
|
2033
|
+
}[];
|
|
2034
|
+
deliveredUnpaid: {
|
|
2035
|
+
amount: number;
|
|
2036
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2037
|
+
funderId?: string | null | undefined;
|
|
2038
|
+
funderName?: string | null | undefined;
|
|
2039
|
+
}[];
|
|
2040
|
+
};
|
|
2041
|
+
openAdvances: {
|
|
2042
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
2043
|
+
remaining: number;
|
|
2044
|
+
amount: number;
|
|
2045
|
+
overdue: boolean;
|
|
2046
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2047
|
+
advanceId: string;
|
|
2048
|
+
holderType: "other" | "supplier" | "staff";
|
|
2049
|
+
holderName: string;
|
|
2050
|
+
openedAt: string;
|
|
2051
|
+
ageDays: number;
|
|
2052
|
+
funderId?: string | null | undefined;
|
|
2053
|
+
funderName?: string | null | undefined;
|
|
2054
|
+
holderId?: string | null | undefined;
|
|
2055
|
+
expectedSettleBy?: string | null | undefined;
|
|
2056
|
+
}[];
|
|
2057
|
+
deliveredPaid?: number | undefined;
|
|
2058
|
+
};
|
|
2059
|
+
}>;
|
|
2060
|
+
}, "strip", z.ZodTypeAny, {
|
|
2061
|
+
data: {
|
|
2062
|
+
type: "trade-treasury";
|
|
2063
|
+
id: string;
|
|
2064
|
+
attributes: {
|
|
2065
|
+
received: number;
|
|
2066
|
+
currency: string;
|
|
2067
|
+
available: number;
|
|
2068
|
+
computedAt: string;
|
|
2069
|
+
asOf: string;
|
|
2070
|
+
returnedToFunders: number;
|
|
2071
|
+
inSourcing: number;
|
|
2072
|
+
unallocatedSpend: number;
|
|
2073
|
+
goodsNotDelivered: number;
|
|
2074
|
+
deliveredUnpaid: number;
|
|
2075
|
+
receivable: number;
|
|
2076
|
+
capitalOutstanding: number;
|
|
2077
|
+
buyerReceipts: number;
|
|
2078
|
+
reconciliation: {
|
|
2079
|
+
capitalBase: number;
|
|
2080
|
+
deployedAndHeld: number;
|
|
2081
|
+
profitLossAndCostsRetained: number;
|
|
2082
|
+
};
|
|
2083
|
+
byFunder: {
|
|
2084
|
+
received: {
|
|
2085
|
+
amount: number;
|
|
2086
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2087
|
+
funderId?: string | null | undefined;
|
|
2088
|
+
funderName?: string | null | undefined;
|
|
2089
|
+
}[];
|
|
2090
|
+
returned: {
|
|
2091
|
+
amount: number;
|
|
2092
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2093
|
+
funderId?: string | null | undefined;
|
|
2094
|
+
funderName?: string | null | undefined;
|
|
2095
|
+
}[];
|
|
2096
|
+
inSourcing: {
|
|
2097
|
+
amount: number;
|
|
2098
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2099
|
+
funderId?: string | null | undefined;
|
|
2100
|
+
funderName?: string | null | undefined;
|
|
2101
|
+
}[];
|
|
2102
|
+
unallocatedSpend: {
|
|
2103
|
+
amount: number;
|
|
2104
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2105
|
+
funderId?: string | null | undefined;
|
|
2106
|
+
funderName?: string | null | undefined;
|
|
2107
|
+
}[];
|
|
2108
|
+
goodsNotDelivered: {
|
|
2109
|
+
amount: number;
|
|
2110
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2111
|
+
funderId?: string | null | undefined;
|
|
2112
|
+
funderName?: string | null | undefined;
|
|
2113
|
+
}[];
|
|
2114
|
+
deliveredUnpaid: {
|
|
2115
|
+
amount: number;
|
|
2116
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2117
|
+
funderId?: string | null | undefined;
|
|
2118
|
+
funderName?: string | null | undefined;
|
|
2119
|
+
}[];
|
|
2120
|
+
};
|
|
2121
|
+
openAdvances: {
|
|
2122
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
2123
|
+
remaining: number;
|
|
2124
|
+
amount: number;
|
|
2125
|
+
overdue: boolean;
|
|
2126
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2127
|
+
advanceId: string;
|
|
2128
|
+
holderType: "other" | "supplier" | "staff";
|
|
2129
|
+
holderName: string;
|
|
2130
|
+
openedAt: string;
|
|
2131
|
+
ageDays: number;
|
|
2132
|
+
funderId?: string | null | undefined;
|
|
2133
|
+
funderName?: string | null | undefined;
|
|
2134
|
+
holderId?: string | null | undefined;
|
|
2135
|
+
expectedSettleBy?: string | null | undefined;
|
|
2136
|
+
}[];
|
|
2137
|
+
deliveredPaid?: number | undefined;
|
|
2138
|
+
};
|
|
2139
|
+
};
|
|
2140
|
+
}, {
|
|
2141
|
+
data: {
|
|
2142
|
+
type: "trade-treasury";
|
|
2143
|
+
id: string;
|
|
2144
|
+
attributes: {
|
|
2145
|
+
received: number;
|
|
2146
|
+
currency: string;
|
|
2147
|
+
available: number;
|
|
2148
|
+
computedAt: string;
|
|
2149
|
+
asOf: string;
|
|
2150
|
+
returnedToFunders: number;
|
|
2151
|
+
inSourcing: number;
|
|
2152
|
+
unallocatedSpend: number;
|
|
2153
|
+
goodsNotDelivered: number;
|
|
2154
|
+
deliveredUnpaid: number;
|
|
2155
|
+
receivable: number;
|
|
2156
|
+
capitalOutstanding: number;
|
|
2157
|
+
buyerReceipts: number;
|
|
2158
|
+
reconciliation: {
|
|
2159
|
+
capitalBase: number;
|
|
2160
|
+
deployedAndHeld: number;
|
|
2161
|
+
profitLossAndCostsRetained: number;
|
|
2162
|
+
};
|
|
2163
|
+
byFunder: {
|
|
2164
|
+
received: {
|
|
2165
|
+
amount: number;
|
|
2166
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2167
|
+
funderId?: string | null | undefined;
|
|
2168
|
+
funderName?: string | null | undefined;
|
|
2169
|
+
}[];
|
|
2170
|
+
returned: {
|
|
2171
|
+
amount: number;
|
|
2172
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2173
|
+
funderId?: string | null | undefined;
|
|
2174
|
+
funderName?: string | null | undefined;
|
|
2175
|
+
}[];
|
|
2176
|
+
inSourcing: {
|
|
2177
|
+
amount: number;
|
|
2178
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2179
|
+
funderId?: string | null | undefined;
|
|
2180
|
+
funderName?: string | null | undefined;
|
|
2181
|
+
}[];
|
|
2182
|
+
unallocatedSpend: {
|
|
2183
|
+
amount: number;
|
|
2184
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2185
|
+
funderId?: string | null | undefined;
|
|
2186
|
+
funderName?: string | null | undefined;
|
|
2187
|
+
}[];
|
|
2188
|
+
goodsNotDelivered: {
|
|
2189
|
+
amount: number;
|
|
2190
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2191
|
+
funderId?: string | null | undefined;
|
|
2192
|
+
funderName?: string | null | undefined;
|
|
2193
|
+
}[];
|
|
2194
|
+
deliveredUnpaid: {
|
|
2195
|
+
amount: number;
|
|
2196
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2197
|
+
funderId?: string | null | undefined;
|
|
2198
|
+
funderName?: string | null | undefined;
|
|
2199
|
+
}[];
|
|
2200
|
+
};
|
|
2201
|
+
openAdvances: {
|
|
2202
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
2203
|
+
remaining: number;
|
|
2204
|
+
amount: number;
|
|
2205
|
+
overdue: boolean;
|
|
2206
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2207
|
+
advanceId: string;
|
|
2208
|
+
holderType: "other" | "supplier" | "staff";
|
|
2209
|
+
holderName: string;
|
|
2210
|
+
openedAt: string;
|
|
2211
|
+
ageDays: number;
|
|
2212
|
+
funderId?: string | null | undefined;
|
|
2213
|
+
funderName?: string | null | undefined;
|
|
2214
|
+
holderId?: string | null | undefined;
|
|
2215
|
+
expectedSettleBy?: string | null | undefined;
|
|
792
2216
|
}[];
|
|
2217
|
+
deliveredPaid?: number | undefined;
|
|
793
2218
|
};
|
|
794
2219
|
};
|
|
795
2220
|
}>;
|
|
@@ -851,12 +2276,12 @@ export declare const tradeControlBoardResponseSchema: z.ZodObject<{
|
|
|
851
2276
|
dealCount: number;
|
|
852
2277
|
capitalIn: number;
|
|
853
2278
|
capitalOut: number;
|
|
2279
|
+
buyerReceipts: number;
|
|
854
2280
|
purchaseTotal: number;
|
|
855
2281
|
transportTotal: number;
|
|
856
2282
|
storageTotal: number;
|
|
857
2283
|
miscellaneousTotal: number;
|
|
858
2284
|
saleTotal: number;
|
|
859
|
-
buyerReceipts: number;
|
|
860
2285
|
supplierPayments: number;
|
|
861
2286
|
commissionPayouts: number;
|
|
862
2287
|
openDealCount: number;
|
|
@@ -877,12 +2302,12 @@ export declare const tradeControlBoardResponseSchema: z.ZodObject<{
|
|
|
877
2302
|
dealCount: number;
|
|
878
2303
|
capitalIn: number;
|
|
879
2304
|
capitalOut: number;
|
|
2305
|
+
buyerReceipts: number;
|
|
880
2306
|
purchaseTotal: number;
|
|
881
2307
|
transportTotal: number;
|
|
882
2308
|
storageTotal: number;
|
|
883
2309
|
miscellaneousTotal: number;
|
|
884
2310
|
saleTotal: number;
|
|
885
|
-
buyerReceipts: number;
|
|
886
2311
|
supplierPayments: number;
|
|
887
2312
|
commissionPayouts: number;
|
|
888
2313
|
openDealCount: number;
|
|
@@ -907,12 +2332,12 @@ export declare const tradeControlBoardResponseSchema: z.ZodObject<{
|
|
|
907
2332
|
dealCount: number;
|
|
908
2333
|
capitalIn: number;
|
|
909
2334
|
capitalOut: number;
|
|
2335
|
+
buyerReceipts: number;
|
|
910
2336
|
purchaseTotal: number;
|
|
911
2337
|
transportTotal: number;
|
|
912
2338
|
storageTotal: number;
|
|
913
2339
|
miscellaneousTotal: number;
|
|
914
2340
|
saleTotal: number;
|
|
915
|
-
buyerReceipts: number;
|
|
916
2341
|
supplierPayments: number;
|
|
917
2342
|
commissionPayouts: number;
|
|
918
2343
|
openDealCount: number;
|
|
@@ -937,12 +2362,12 @@ export declare const tradeControlBoardResponseSchema: z.ZodObject<{
|
|
|
937
2362
|
dealCount: number;
|
|
938
2363
|
capitalIn: number;
|
|
939
2364
|
capitalOut: number;
|
|
2365
|
+
buyerReceipts: number;
|
|
940
2366
|
purchaseTotal: number;
|
|
941
2367
|
transportTotal: number;
|
|
942
2368
|
storageTotal: number;
|
|
943
2369
|
miscellaneousTotal: number;
|
|
944
2370
|
saleTotal: number;
|
|
945
|
-
buyerReceipts: number;
|
|
946
2371
|
supplierPayments: number;
|
|
947
2372
|
commissionPayouts: number;
|
|
948
2373
|
openDealCount: number;
|
|
@@ -969,12 +2394,12 @@ export declare const tradeControlBoardResponseSchema: z.ZodObject<{
|
|
|
969
2394
|
dealCount: number;
|
|
970
2395
|
capitalIn: number;
|
|
971
2396
|
capitalOut: number;
|
|
2397
|
+
buyerReceipts: number;
|
|
972
2398
|
purchaseTotal: number;
|
|
973
2399
|
transportTotal: number;
|
|
974
2400
|
storageTotal: number;
|
|
975
2401
|
miscellaneousTotal: number;
|
|
976
2402
|
saleTotal: number;
|
|
977
|
-
buyerReceipts: number;
|
|
978
2403
|
supplierPayments: number;
|
|
979
2404
|
commissionPayouts: number;
|
|
980
2405
|
openDealCount: number;
|
|
@@ -1001,12 +2426,12 @@ export declare const tradeControlBoardResponseSchema: z.ZodObject<{
|
|
|
1001
2426
|
dealCount: number;
|
|
1002
2427
|
capitalIn: number;
|
|
1003
2428
|
capitalOut: number;
|
|
2429
|
+
buyerReceipts: number;
|
|
1004
2430
|
purchaseTotal: number;
|
|
1005
2431
|
transportTotal: number;
|
|
1006
2432
|
storageTotal: number;
|
|
1007
2433
|
miscellaneousTotal: number;
|
|
1008
2434
|
saleTotal: number;
|
|
1009
|
-
buyerReceipts: number;
|
|
1010
2435
|
supplierPayments: number;
|
|
1011
2436
|
commissionPayouts: number;
|
|
1012
2437
|
openDealCount: number;
|
|
@@ -1526,6 +2951,1158 @@ export declare const createInvoicePaymentSchema: z.ZodObject<{
|
|
|
1526
2951
|
reference?: string | null | undefined;
|
|
1527
2952
|
};
|
|
1528
2953
|
}>;
|
|
2954
|
+
export declare const tradeSourcingAdvanceAttributesSchema: z.ZodObject<{
|
|
2955
|
+
organizationId: z.ZodString;
|
|
2956
|
+
holderType: z.ZodEnum<["staff", "supplier", "other"]>;
|
|
2957
|
+
holderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2958
|
+
holderName: z.ZodString;
|
|
2959
|
+
funderType: z.ZodEnum<["company", "staff", "investor", "unattributed"]>;
|
|
2960
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2961
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2962
|
+
parentAdvanceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2963
|
+
amount: z.ZodNumber;
|
|
2964
|
+
remaining: z.ZodNumber;
|
|
2965
|
+
currency: z.ZodDefault<z.ZodString>;
|
|
2966
|
+
status: z.ZodEnum<["pending_receipt", "open", "settled", "written_off", "cancelled"]>;
|
|
2967
|
+
expectedSettleBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2968
|
+
dealId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2969
|
+
purchaseOrderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2970
|
+
purpose: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2971
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2972
|
+
confirmedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2973
|
+
overdue: z.ZodOptional<z.ZodBoolean>;
|
|
2974
|
+
} & {
|
|
2975
|
+
createdAt: z.ZodString;
|
|
2976
|
+
updatedAt: z.ZodString;
|
|
2977
|
+
}, "strip", z.ZodTypeAny, {
|
|
2978
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
2979
|
+
createdAt: string;
|
|
2980
|
+
updatedAt: string;
|
|
2981
|
+
organizationId: string;
|
|
2982
|
+
currency: string;
|
|
2983
|
+
remaining: number;
|
|
2984
|
+
amount: number;
|
|
2985
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
2986
|
+
holderType: "other" | "supplier" | "staff";
|
|
2987
|
+
holderName: string;
|
|
2988
|
+
notes?: string | null | undefined;
|
|
2989
|
+
overdue?: boolean | undefined;
|
|
2990
|
+
dealId?: string | null | undefined;
|
|
2991
|
+
funderId?: string | null | undefined;
|
|
2992
|
+
funderName?: string | null | undefined;
|
|
2993
|
+
holderId?: string | null | undefined;
|
|
2994
|
+
expectedSettleBy?: string | null | undefined;
|
|
2995
|
+
parentAdvanceId?: string | null | undefined;
|
|
2996
|
+
purchaseOrderId?: string | null | undefined;
|
|
2997
|
+
purpose?: string | null | undefined;
|
|
2998
|
+
confirmedAt?: string | null | undefined;
|
|
2999
|
+
}, {
|
|
3000
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
3001
|
+
createdAt: string;
|
|
3002
|
+
updatedAt: string;
|
|
3003
|
+
organizationId: string;
|
|
3004
|
+
remaining: number;
|
|
3005
|
+
amount: number;
|
|
3006
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
3007
|
+
holderType: "other" | "supplier" | "staff";
|
|
3008
|
+
holderName: string;
|
|
3009
|
+
currency?: string | undefined;
|
|
3010
|
+
notes?: string | null | undefined;
|
|
3011
|
+
overdue?: boolean | undefined;
|
|
3012
|
+
dealId?: string | null | undefined;
|
|
3013
|
+
funderId?: string | null | undefined;
|
|
3014
|
+
funderName?: string | null | undefined;
|
|
3015
|
+
holderId?: string | null | undefined;
|
|
3016
|
+
expectedSettleBy?: string | null | undefined;
|
|
3017
|
+
parentAdvanceId?: string | null | undefined;
|
|
3018
|
+
purchaseOrderId?: string | null | undefined;
|
|
3019
|
+
purpose?: string | null | undefined;
|
|
3020
|
+
confirmedAt?: string | null | undefined;
|
|
3021
|
+
}>;
|
|
3022
|
+
export declare const createSourcingAdvanceAttributesSchema: z.ZodObject<{
|
|
3023
|
+
holderType: z.ZodEnum<["staff", "supplier", "other"]>;
|
|
3024
|
+
holderId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3025
|
+
holderName: z.ZodString;
|
|
3026
|
+
funderType: z.ZodEnum<["company", "staff", "investor"]>;
|
|
3027
|
+
funderId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3028
|
+
funderName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3029
|
+
amount: z.ZodNumber;
|
|
3030
|
+
currency: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
3031
|
+
occurredAt: z.ZodString;
|
|
3032
|
+
expectedSettleBy: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3033
|
+
dealId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3034
|
+
purchaseOrderId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3035
|
+
purpose: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3036
|
+
notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3037
|
+
method: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3038
|
+
reference: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3039
|
+
}, "strip", z.ZodTypeAny, {
|
|
3040
|
+
currency: string;
|
|
3041
|
+
occurredAt: string;
|
|
3042
|
+
amount: number;
|
|
3043
|
+
funderType: "investor" | "staff" | "company";
|
|
3044
|
+
holderType: "other" | "supplier" | "staff";
|
|
3045
|
+
holderName: string;
|
|
3046
|
+
method?: string | null | undefined;
|
|
3047
|
+
notes?: string | null | undefined;
|
|
3048
|
+
reference?: string | null | undefined;
|
|
3049
|
+
dealId?: string | null | undefined;
|
|
3050
|
+
funderId?: string | null | undefined;
|
|
3051
|
+
funderName?: string | null | undefined;
|
|
3052
|
+
holderId?: string | null | undefined;
|
|
3053
|
+
expectedSettleBy?: string | null | undefined;
|
|
3054
|
+
purchaseOrderId?: string | null | undefined;
|
|
3055
|
+
purpose?: string | null | undefined;
|
|
3056
|
+
}, {
|
|
3057
|
+
occurredAt: string;
|
|
3058
|
+
amount: number;
|
|
3059
|
+
funderType: "investor" | "staff" | "company";
|
|
3060
|
+
holderType: "other" | "supplier" | "staff";
|
|
3061
|
+
holderName: string;
|
|
3062
|
+
method?: string | null | undefined;
|
|
3063
|
+
currency?: string | undefined;
|
|
3064
|
+
notes?: string | null | undefined;
|
|
3065
|
+
reference?: string | null | undefined;
|
|
3066
|
+
dealId?: string | null | undefined;
|
|
3067
|
+
funderId?: string | null | undefined;
|
|
3068
|
+
funderName?: string | null | undefined;
|
|
3069
|
+
holderId?: string | null | undefined;
|
|
3070
|
+
expectedSettleBy?: string | null | undefined;
|
|
3071
|
+
purchaseOrderId?: string | null | undefined;
|
|
3072
|
+
purpose?: string | null | undefined;
|
|
3073
|
+
}>;
|
|
3074
|
+
export declare const handoffAdvanceAttributesSchema: z.ZodObject<{
|
|
3075
|
+
amount: z.ZodNumber;
|
|
3076
|
+
holderType: z.ZodEnum<["staff", "supplier", "other"]>;
|
|
3077
|
+
holderId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3078
|
+
holderName: z.ZodString;
|
|
3079
|
+
occurredAt: z.ZodString;
|
|
3080
|
+
notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3081
|
+
}, "strip", z.ZodTypeAny, {
|
|
3082
|
+
occurredAt: string;
|
|
3083
|
+
amount: number;
|
|
3084
|
+
holderType: "other" | "supplier" | "staff";
|
|
3085
|
+
holderName: string;
|
|
3086
|
+
notes?: string | null | undefined;
|
|
3087
|
+
holderId?: string | null | undefined;
|
|
3088
|
+
}, {
|
|
3089
|
+
occurredAt: string;
|
|
3090
|
+
amount: number;
|
|
3091
|
+
holderType: "other" | "supplier" | "staff";
|
|
3092
|
+
holderName: string;
|
|
3093
|
+
notes?: string | null | undefined;
|
|
3094
|
+
holderId?: string | null | undefined;
|
|
3095
|
+
}>;
|
|
3096
|
+
export declare const advanceSettlementLineSchema: z.ZodObject<{
|
|
3097
|
+
outcome: z.ZodEnum<["spent", "returned", "written_off", "overspend"]>;
|
|
3098
|
+
amount: z.ZodNumber;
|
|
3099
|
+
supplierName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3100
|
+
supplierId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3101
|
+
dealId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3102
|
+
purchaseOrderId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3103
|
+
proofRef: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3104
|
+
notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3105
|
+
}, "strip", z.ZodTypeAny, {
|
|
3106
|
+
amount: number;
|
|
3107
|
+
outcome: "written_off" | "spent" | "returned" | "overspend";
|
|
3108
|
+
notes?: string | null | undefined;
|
|
3109
|
+
supplierId?: string | null | undefined;
|
|
3110
|
+
supplierName?: string | null | undefined;
|
|
3111
|
+
dealId?: string | null | undefined;
|
|
3112
|
+
purchaseOrderId?: string | null | undefined;
|
|
3113
|
+
proofRef?: string | null | undefined;
|
|
3114
|
+
}, {
|
|
3115
|
+
amount: number;
|
|
3116
|
+
outcome: "written_off" | "spent" | "returned" | "overspend";
|
|
3117
|
+
notes?: string | null | undefined;
|
|
3118
|
+
supplierId?: string | null | undefined;
|
|
3119
|
+
supplierName?: string | null | undefined;
|
|
3120
|
+
dealId?: string | null | undefined;
|
|
3121
|
+
purchaseOrderId?: string | null | undefined;
|
|
3122
|
+
proofRef?: string | null | undefined;
|
|
3123
|
+
}>;
|
|
3124
|
+
export declare const submitAdvanceSettlementAttributesSchema: z.ZodObject<{
|
|
3125
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
3126
|
+
outcome: z.ZodEnum<["spent", "returned", "written_off", "overspend"]>;
|
|
3127
|
+
amount: z.ZodNumber;
|
|
3128
|
+
supplierName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3129
|
+
supplierId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3130
|
+
dealId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3131
|
+
purchaseOrderId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3132
|
+
proofRef: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3133
|
+
notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3134
|
+
}, "strip", z.ZodTypeAny, {
|
|
3135
|
+
amount: number;
|
|
3136
|
+
outcome: "written_off" | "spent" | "returned" | "overspend";
|
|
3137
|
+
notes?: string | null | undefined;
|
|
3138
|
+
supplierId?: string | null | undefined;
|
|
3139
|
+
supplierName?: string | null | undefined;
|
|
3140
|
+
dealId?: string | null | undefined;
|
|
3141
|
+
purchaseOrderId?: string | null | undefined;
|
|
3142
|
+
proofRef?: string | null | undefined;
|
|
3143
|
+
}, {
|
|
3144
|
+
amount: number;
|
|
3145
|
+
outcome: "written_off" | "spent" | "returned" | "overspend";
|
|
3146
|
+
notes?: string | null | undefined;
|
|
3147
|
+
supplierId?: string | null | undefined;
|
|
3148
|
+
supplierName?: string | null | undefined;
|
|
3149
|
+
dealId?: string | null | undefined;
|
|
3150
|
+
purchaseOrderId?: string | null | undefined;
|
|
3151
|
+
proofRef?: string | null | undefined;
|
|
3152
|
+
}>, "many">;
|
|
3153
|
+
notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3154
|
+
}, "strip", z.ZodTypeAny, {
|
|
3155
|
+
lines: {
|
|
3156
|
+
amount: number;
|
|
3157
|
+
outcome: "written_off" | "spent" | "returned" | "overspend";
|
|
3158
|
+
notes?: string | null | undefined;
|
|
3159
|
+
supplierId?: string | null | undefined;
|
|
3160
|
+
supplierName?: string | null | undefined;
|
|
3161
|
+
dealId?: string | null | undefined;
|
|
3162
|
+
purchaseOrderId?: string | null | undefined;
|
|
3163
|
+
proofRef?: string | null | undefined;
|
|
3164
|
+
}[];
|
|
3165
|
+
notes?: string | null | undefined;
|
|
3166
|
+
}, {
|
|
3167
|
+
lines: {
|
|
3168
|
+
amount: number;
|
|
3169
|
+
outcome: "written_off" | "spent" | "returned" | "overspend";
|
|
3170
|
+
notes?: string | null | undefined;
|
|
3171
|
+
supplierId?: string | null | undefined;
|
|
3172
|
+
supplierName?: string | null | undefined;
|
|
3173
|
+
dealId?: string | null | undefined;
|
|
3174
|
+
purchaseOrderId?: string | null | undefined;
|
|
3175
|
+
proofRef?: string | null | undefined;
|
|
3176
|
+
}[];
|
|
3177
|
+
notes?: string | null | undefined;
|
|
3178
|
+
}>;
|
|
3179
|
+
export declare const approveAdvanceSettlementAttributesSchema: z.ZodObject<{
|
|
3180
|
+
occurredAt: z.ZodString;
|
|
3181
|
+
notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3182
|
+
}, "strip", z.ZodTypeAny, {
|
|
3183
|
+
occurredAt: string;
|
|
3184
|
+
notes?: string | null | undefined;
|
|
3185
|
+
}, {
|
|
3186
|
+
occurredAt: string;
|
|
3187
|
+
notes?: string | null | undefined;
|
|
3188
|
+
}>;
|
|
3189
|
+
export declare const writeoffAdvanceAttributesSchema: z.ZodObject<{
|
|
3190
|
+
amount: z.ZodNumber;
|
|
3191
|
+
reason: z.ZodString;
|
|
3192
|
+
occurredAt: z.ZodString;
|
|
3193
|
+
}, "strip", z.ZodTypeAny, {
|
|
3194
|
+
reason: string;
|
|
3195
|
+
occurredAt: string;
|
|
3196
|
+
amount: number;
|
|
3197
|
+
}, {
|
|
3198
|
+
reason: string;
|
|
3199
|
+
occurredAt: string;
|
|
3200
|
+
amount: number;
|
|
3201
|
+
}>;
|
|
3202
|
+
export declare const tradeSourcingAdvanceResourceSchema: z.ZodObject<{
|
|
3203
|
+
type: z.ZodLiteral<string>;
|
|
3204
|
+
id: z.ZodString;
|
|
3205
|
+
attributes: z.ZodObject<{
|
|
3206
|
+
organizationId: z.ZodString;
|
|
3207
|
+
holderType: z.ZodEnum<["staff", "supplier", "other"]>;
|
|
3208
|
+
holderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3209
|
+
holderName: z.ZodString;
|
|
3210
|
+
funderType: z.ZodEnum<["company", "staff", "investor", "unattributed"]>;
|
|
3211
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3212
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3213
|
+
parentAdvanceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3214
|
+
amount: z.ZodNumber;
|
|
3215
|
+
remaining: z.ZodNumber;
|
|
3216
|
+
currency: z.ZodDefault<z.ZodString>;
|
|
3217
|
+
status: z.ZodEnum<["pending_receipt", "open", "settled", "written_off", "cancelled"]>;
|
|
3218
|
+
expectedSettleBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3219
|
+
dealId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3220
|
+
purchaseOrderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3221
|
+
purpose: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3222
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3223
|
+
confirmedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3224
|
+
overdue: z.ZodOptional<z.ZodBoolean>;
|
|
3225
|
+
} & {
|
|
3226
|
+
createdAt: z.ZodString;
|
|
3227
|
+
updatedAt: z.ZodString;
|
|
3228
|
+
}, "strip", z.ZodTypeAny, {
|
|
3229
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
3230
|
+
createdAt: string;
|
|
3231
|
+
updatedAt: string;
|
|
3232
|
+
organizationId: string;
|
|
3233
|
+
currency: string;
|
|
3234
|
+
remaining: number;
|
|
3235
|
+
amount: number;
|
|
3236
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
3237
|
+
holderType: "other" | "supplier" | "staff";
|
|
3238
|
+
holderName: string;
|
|
3239
|
+
notes?: string | null | undefined;
|
|
3240
|
+
overdue?: boolean | undefined;
|
|
3241
|
+
dealId?: string | null | undefined;
|
|
3242
|
+
funderId?: string | null | undefined;
|
|
3243
|
+
funderName?: string | null | undefined;
|
|
3244
|
+
holderId?: string | null | undefined;
|
|
3245
|
+
expectedSettleBy?: string | null | undefined;
|
|
3246
|
+
parentAdvanceId?: string | null | undefined;
|
|
3247
|
+
purchaseOrderId?: string | null | undefined;
|
|
3248
|
+
purpose?: string | null | undefined;
|
|
3249
|
+
confirmedAt?: string | null | undefined;
|
|
3250
|
+
}, {
|
|
3251
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
3252
|
+
createdAt: string;
|
|
3253
|
+
updatedAt: string;
|
|
3254
|
+
organizationId: string;
|
|
3255
|
+
remaining: number;
|
|
3256
|
+
amount: number;
|
|
3257
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
3258
|
+
holderType: "other" | "supplier" | "staff";
|
|
3259
|
+
holderName: string;
|
|
3260
|
+
currency?: string | undefined;
|
|
3261
|
+
notes?: string | null | undefined;
|
|
3262
|
+
overdue?: boolean | undefined;
|
|
3263
|
+
dealId?: string | null | undefined;
|
|
3264
|
+
funderId?: string | null | undefined;
|
|
3265
|
+
funderName?: string | null | undefined;
|
|
3266
|
+
holderId?: string | null | undefined;
|
|
3267
|
+
expectedSettleBy?: string | null | undefined;
|
|
3268
|
+
parentAdvanceId?: string | null | undefined;
|
|
3269
|
+
purchaseOrderId?: string | null | undefined;
|
|
3270
|
+
purpose?: string | null | undefined;
|
|
3271
|
+
confirmedAt?: string | null | undefined;
|
|
3272
|
+
}>;
|
|
3273
|
+
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3274
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3275
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3276
|
+
}, "strip", z.ZodTypeAny, {
|
|
3277
|
+
type: string;
|
|
3278
|
+
id: string;
|
|
3279
|
+
attributes: {
|
|
3280
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
3281
|
+
createdAt: string;
|
|
3282
|
+
updatedAt: string;
|
|
3283
|
+
organizationId: string;
|
|
3284
|
+
currency: string;
|
|
3285
|
+
remaining: number;
|
|
3286
|
+
amount: number;
|
|
3287
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
3288
|
+
holderType: "other" | "supplier" | "staff";
|
|
3289
|
+
holderName: string;
|
|
3290
|
+
notes?: string | null | undefined;
|
|
3291
|
+
overdue?: boolean | undefined;
|
|
3292
|
+
dealId?: string | null | undefined;
|
|
3293
|
+
funderId?: string | null | undefined;
|
|
3294
|
+
funderName?: string | null | undefined;
|
|
3295
|
+
holderId?: string | null | undefined;
|
|
3296
|
+
expectedSettleBy?: string | null | undefined;
|
|
3297
|
+
parentAdvanceId?: string | null | undefined;
|
|
3298
|
+
purchaseOrderId?: string | null | undefined;
|
|
3299
|
+
purpose?: string | null | undefined;
|
|
3300
|
+
confirmedAt?: string | null | undefined;
|
|
3301
|
+
};
|
|
3302
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3303
|
+
links?: Record<string, string> | undefined;
|
|
3304
|
+
meta?: Record<string, unknown> | undefined;
|
|
3305
|
+
}, {
|
|
3306
|
+
type: string;
|
|
3307
|
+
id: string;
|
|
3308
|
+
attributes: {
|
|
3309
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
3310
|
+
createdAt: string;
|
|
3311
|
+
updatedAt: string;
|
|
3312
|
+
organizationId: string;
|
|
3313
|
+
remaining: number;
|
|
3314
|
+
amount: number;
|
|
3315
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
3316
|
+
holderType: "other" | "supplier" | "staff";
|
|
3317
|
+
holderName: string;
|
|
3318
|
+
currency?: string | undefined;
|
|
3319
|
+
notes?: string | null | undefined;
|
|
3320
|
+
overdue?: boolean | undefined;
|
|
3321
|
+
dealId?: string | null | undefined;
|
|
3322
|
+
funderId?: string | null | undefined;
|
|
3323
|
+
funderName?: string | null | undefined;
|
|
3324
|
+
holderId?: string | null | undefined;
|
|
3325
|
+
expectedSettleBy?: string | null | undefined;
|
|
3326
|
+
parentAdvanceId?: string | null | undefined;
|
|
3327
|
+
purchaseOrderId?: string | null | undefined;
|
|
3328
|
+
purpose?: string | null | undefined;
|
|
3329
|
+
confirmedAt?: string | null | undefined;
|
|
3330
|
+
};
|
|
3331
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3332
|
+
links?: Record<string, string> | undefined;
|
|
3333
|
+
meta?: Record<string, unknown> | undefined;
|
|
3334
|
+
}>;
|
|
3335
|
+
export declare const tradeSourcingAdvanceResponseSchema: z.ZodObject<{
|
|
3336
|
+
data: z.ZodObject<{
|
|
3337
|
+
type: z.ZodLiteral<string>;
|
|
3338
|
+
id: z.ZodString;
|
|
3339
|
+
attributes: z.ZodObject<{
|
|
3340
|
+
organizationId: z.ZodString;
|
|
3341
|
+
holderType: z.ZodEnum<["staff", "supplier", "other"]>;
|
|
3342
|
+
holderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3343
|
+
holderName: z.ZodString;
|
|
3344
|
+
funderType: z.ZodEnum<["company", "staff", "investor", "unattributed"]>;
|
|
3345
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3346
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3347
|
+
parentAdvanceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3348
|
+
amount: z.ZodNumber;
|
|
3349
|
+
remaining: z.ZodNumber;
|
|
3350
|
+
currency: z.ZodDefault<z.ZodString>;
|
|
3351
|
+
status: z.ZodEnum<["pending_receipt", "open", "settled", "written_off", "cancelled"]>;
|
|
3352
|
+
expectedSettleBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3353
|
+
dealId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3354
|
+
purchaseOrderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3355
|
+
purpose: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3356
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3357
|
+
confirmedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3358
|
+
overdue: z.ZodOptional<z.ZodBoolean>;
|
|
3359
|
+
} & {
|
|
3360
|
+
createdAt: z.ZodString;
|
|
3361
|
+
updatedAt: z.ZodString;
|
|
3362
|
+
}, "strip", z.ZodTypeAny, {
|
|
3363
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
3364
|
+
createdAt: string;
|
|
3365
|
+
updatedAt: string;
|
|
3366
|
+
organizationId: string;
|
|
3367
|
+
currency: string;
|
|
3368
|
+
remaining: number;
|
|
3369
|
+
amount: number;
|
|
3370
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
3371
|
+
holderType: "other" | "supplier" | "staff";
|
|
3372
|
+
holderName: string;
|
|
3373
|
+
notes?: string | null | undefined;
|
|
3374
|
+
overdue?: boolean | undefined;
|
|
3375
|
+
dealId?: string | null | undefined;
|
|
3376
|
+
funderId?: string | null | undefined;
|
|
3377
|
+
funderName?: string | null | undefined;
|
|
3378
|
+
holderId?: string | null | undefined;
|
|
3379
|
+
expectedSettleBy?: string | null | undefined;
|
|
3380
|
+
parentAdvanceId?: string | null | undefined;
|
|
3381
|
+
purchaseOrderId?: string | null | undefined;
|
|
3382
|
+
purpose?: string | null | undefined;
|
|
3383
|
+
confirmedAt?: string | null | undefined;
|
|
3384
|
+
}, {
|
|
3385
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
3386
|
+
createdAt: string;
|
|
3387
|
+
updatedAt: string;
|
|
3388
|
+
organizationId: string;
|
|
3389
|
+
remaining: number;
|
|
3390
|
+
amount: number;
|
|
3391
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
3392
|
+
holderType: "other" | "supplier" | "staff";
|
|
3393
|
+
holderName: string;
|
|
3394
|
+
currency?: string | undefined;
|
|
3395
|
+
notes?: string | null | undefined;
|
|
3396
|
+
overdue?: boolean | undefined;
|
|
3397
|
+
dealId?: string | null | undefined;
|
|
3398
|
+
funderId?: string | null | undefined;
|
|
3399
|
+
funderName?: string | null | undefined;
|
|
3400
|
+
holderId?: string | null | undefined;
|
|
3401
|
+
expectedSettleBy?: string | null | undefined;
|
|
3402
|
+
parentAdvanceId?: string | null | undefined;
|
|
3403
|
+
purchaseOrderId?: string | null | undefined;
|
|
3404
|
+
purpose?: string | null | undefined;
|
|
3405
|
+
confirmedAt?: string | null | undefined;
|
|
3406
|
+
}>;
|
|
3407
|
+
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3408
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3409
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3410
|
+
}, "strip", z.ZodTypeAny, {
|
|
3411
|
+
type: string;
|
|
3412
|
+
id: string;
|
|
3413
|
+
attributes: {
|
|
3414
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
3415
|
+
createdAt: string;
|
|
3416
|
+
updatedAt: string;
|
|
3417
|
+
organizationId: string;
|
|
3418
|
+
currency: string;
|
|
3419
|
+
remaining: number;
|
|
3420
|
+
amount: number;
|
|
3421
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
3422
|
+
holderType: "other" | "supplier" | "staff";
|
|
3423
|
+
holderName: string;
|
|
3424
|
+
notes?: string | null | undefined;
|
|
3425
|
+
overdue?: boolean | undefined;
|
|
3426
|
+
dealId?: string | null | undefined;
|
|
3427
|
+
funderId?: string | null | undefined;
|
|
3428
|
+
funderName?: string | null | undefined;
|
|
3429
|
+
holderId?: string | null | undefined;
|
|
3430
|
+
expectedSettleBy?: string | null | undefined;
|
|
3431
|
+
parentAdvanceId?: string | null | undefined;
|
|
3432
|
+
purchaseOrderId?: string | null | undefined;
|
|
3433
|
+
purpose?: string | null | undefined;
|
|
3434
|
+
confirmedAt?: string | null | undefined;
|
|
3435
|
+
};
|
|
3436
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3437
|
+
links?: Record<string, string> | undefined;
|
|
3438
|
+
meta?: Record<string, unknown> | undefined;
|
|
3439
|
+
}, {
|
|
3440
|
+
type: string;
|
|
3441
|
+
id: string;
|
|
3442
|
+
attributes: {
|
|
3443
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
3444
|
+
createdAt: string;
|
|
3445
|
+
updatedAt: string;
|
|
3446
|
+
organizationId: string;
|
|
3447
|
+
remaining: number;
|
|
3448
|
+
amount: number;
|
|
3449
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
3450
|
+
holderType: "other" | "supplier" | "staff";
|
|
3451
|
+
holderName: string;
|
|
3452
|
+
currency?: string | undefined;
|
|
3453
|
+
notes?: string | null | undefined;
|
|
3454
|
+
overdue?: boolean | undefined;
|
|
3455
|
+
dealId?: string | null | undefined;
|
|
3456
|
+
funderId?: string | null | undefined;
|
|
3457
|
+
funderName?: string | null | undefined;
|
|
3458
|
+
holderId?: string | null | undefined;
|
|
3459
|
+
expectedSettleBy?: string | null | undefined;
|
|
3460
|
+
parentAdvanceId?: string | null | undefined;
|
|
3461
|
+
purchaseOrderId?: string | null | undefined;
|
|
3462
|
+
purpose?: string | null | undefined;
|
|
3463
|
+
confirmedAt?: string | null | undefined;
|
|
3464
|
+
};
|
|
3465
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3466
|
+
links?: Record<string, string> | undefined;
|
|
3467
|
+
meta?: Record<string, unknown> | undefined;
|
|
3468
|
+
}>;
|
|
3469
|
+
included: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3470
|
+
type: z.ZodString;
|
|
3471
|
+
id: z.ZodString;
|
|
3472
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3473
|
+
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3474
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3475
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3476
|
+
}, "strip", z.ZodTypeAny, {
|
|
3477
|
+
type: string;
|
|
3478
|
+
id: string;
|
|
3479
|
+
attributes?: Record<string, unknown> | undefined;
|
|
3480
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3481
|
+
links?: Record<string, string> | undefined;
|
|
3482
|
+
meta?: Record<string, unknown> | undefined;
|
|
3483
|
+
}, {
|
|
3484
|
+
type: string;
|
|
3485
|
+
id: string;
|
|
3486
|
+
attributes?: Record<string, unknown> | undefined;
|
|
3487
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3488
|
+
links?: Record<string, string> | undefined;
|
|
3489
|
+
meta?: Record<string, unknown> | undefined;
|
|
3490
|
+
}>, "many">>;
|
|
3491
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3492
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3493
|
+
}, "strip", z.ZodTypeAny, {
|
|
3494
|
+
data: {
|
|
3495
|
+
type: string;
|
|
3496
|
+
id: string;
|
|
3497
|
+
attributes: {
|
|
3498
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
3499
|
+
createdAt: string;
|
|
3500
|
+
updatedAt: string;
|
|
3501
|
+
organizationId: string;
|
|
3502
|
+
currency: string;
|
|
3503
|
+
remaining: number;
|
|
3504
|
+
amount: number;
|
|
3505
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
3506
|
+
holderType: "other" | "supplier" | "staff";
|
|
3507
|
+
holderName: string;
|
|
3508
|
+
notes?: string | null | undefined;
|
|
3509
|
+
overdue?: boolean | undefined;
|
|
3510
|
+
dealId?: string | null | undefined;
|
|
3511
|
+
funderId?: string | null | undefined;
|
|
3512
|
+
funderName?: string | null | undefined;
|
|
3513
|
+
holderId?: string | null | undefined;
|
|
3514
|
+
expectedSettleBy?: string | null | undefined;
|
|
3515
|
+
parentAdvanceId?: string | null | undefined;
|
|
3516
|
+
purchaseOrderId?: string | null | undefined;
|
|
3517
|
+
purpose?: string | null | undefined;
|
|
3518
|
+
confirmedAt?: string | null | undefined;
|
|
3519
|
+
};
|
|
3520
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3521
|
+
links?: Record<string, string> | undefined;
|
|
3522
|
+
meta?: Record<string, unknown> | undefined;
|
|
3523
|
+
};
|
|
3524
|
+
links?: Record<string, string> | undefined;
|
|
3525
|
+
meta?: Record<string, unknown> | undefined;
|
|
3526
|
+
included?: {
|
|
3527
|
+
type: string;
|
|
3528
|
+
id: string;
|
|
3529
|
+
attributes?: Record<string, unknown> | undefined;
|
|
3530
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3531
|
+
links?: Record<string, string> | undefined;
|
|
3532
|
+
meta?: Record<string, unknown> | undefined;
|
|
3533
|
+
}[] | undefined;
|
|
3534
|
+
}, {
|
|
3535
|
+
data: {
|
|
3536
|
+
type: string;
|
|
3537
|
+
id: string;
|
|
3538
|
+
attributes: {
|
|
3539
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
3540
|
+
createdAt: string;
|
|
3541
|
+
updatedAt: string;
|
|
3542
|
+
organizationId: string;
|
|
3543
|
+
remaining: number;
|
|
3544
|
+
amount: number;
|
|
3545
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
3546
|
+
holderType: "other" | "supplier" | "staff";
|
|
3547
|
+
holderName: string;
|
|
3548
|
+
currency?: string | undefined;
|
|
3549
|
+
notes?: string | null | undefined;
|
|
3550
|
+
overdue?: boolean | undefined;
|
|
3551
|
+
dealId?: string | null | undefined;
|
|
3552
|
+
funderId?: string | null | undefined;
|
|
3553
|
+
funderName?: string | null | undefined;
|
|
3554
|
+
holderId?: string | null | undefined;
|
|
3555
|
+
expectedSettleBy?: string | null | undefined;
|
|
3556
|
+
parentAdvanceId?: string | null | undefined;
|
|
3557
|
+
purchaseOrderId?: string | null | undefined;
|
|
3558
|
+
purpose?: string | null | undefined;
|
|
3559
|
+
confirmedAt?: string | null | undefined;
|
|
3560
|
+
};
|
|
3561
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3562
|
+
links?: Record<string, string> | undefined;
|
|
3563
|
+
meta?: Record<string, unknown> | undefined;
|
|
3564
|
+
};
|
|
3565
|
+
links?: Record<string, string> | undefined;
|
|
3566
|
+
meta?: Record<string, unknown> | undefined;
|
|
3567
|
+
included?: {
|
|
3568
|
+
type: string;
|
|
3569
|
+
id: string;
|
|
3570
|
+
attributes?: Record<string, unknown> | undefined;
|
|
3571
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3572
|
+
links?: Record<string, string> | undefined;
|
|
3573
|
+
meta?: Record<string, unknown> | undefined;
|
|
3574
|
+
}[] | undefined;
|
|
3575
|
+
}>;
|
|
3576
|
+
export declare const tradeSourcingAdvanceListResponseSchema: z.ZodObject<{
|
|
3577
|
+
data: z.ZodArray<z.ZodObject<{
|
|
3578
|
+
type: z.ZodLiteral<string>;
|
|
3579
|
+
id: z.ZodString;
|
|
3580
|
+
attributes: z.ZodObject<{
|
|
3581
|
+
organizationId: z.ZodString;
|
|
3582
|
+
holderType: z.ZodEnum<["staff", "supplier", "other"]>;
|
|
3583
|
+
holderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3584
|
+
holderName: z.ZodString;
|
|
3585
|
+
funderType: z.ZodEnum<["company", "staff", "investor", "unattributed"]>;
|
|
3586
|
+
funderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3587
|
+
funderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3588
|
+
parentAdvanceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3589
|
+
amount: z.ZodNumber;
|
|
3590
|
+
remaining: z.ZodNumber;
|
|
3591
|
+
currency: z.ZodDefault<z.ZodString>;
|
|
3592
|
+
status: z.ZodEnum<["pending_receipt", "open", "settled", "written_off", "cancelled"]>;
|
|
3593
|
+
expectedSettleBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3594
|
+
dealId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3595
|
+
purchaseOrderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3596
|
+
purpose: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3597
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3598
|
+
confirmedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3599
|
+
overdue: z.ZodOptional<z.ZodBoolean>;
|
|
3600
|
+
} & {
|
|
3601
|
+
createdAt: z.ZodString;
|
|
3602
|
+
updatedAt: z.ZodString;
|
|
3603
|
+
}, "strip", z.ZodTypeAny, {
|
|
3604
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
3605
|
+
createdAt: string;
|
|
3606
|
+
updatedAt: string;
|
|
3607
|
+
organizationId: string;
|
|
3608
|
+
currency: string;
|
|
3609
|
+
remaining: number;
|
|
3610
|
+
amount: number;
|
|
3611
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
3612
|
+
holderType: "other" | "supplier" | "staff";
|
|
3613
|
+
holderName: string;
|
|
3614
|
+
notes?: string | null | undefined;
|
|
3615
|
+
overdue?: boolean | undefined;
|
|
3616
|
+
dealId?: string | null | undefined;
|
|
3617
|
+
funderId?: string | null | undefined;
|
|
3618
|
+
funderName?: string | null | undefined;
|
|
3619
|
+
holderId?: string | null | undefined;
|
|
3620
|
+
expectedSettleBy?: string | null | undefined;
|
|
3621
|
+
parentAdvanceId?: string | null | undefined;
|
|
3622
|
+
purchaseOrderId?: string | null | undefined;
|
|
3623
|
+
purpose?: string | null | undefined;
|
|
3624
|
+
confirmedAt?: string | null | undefined;
|
|
3625
|
+
}, {
|
|
3626
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
3627
|
+
createdAt: string;
|
|
3628
|
+
updatedAt: string;
|
|
3629
|
+
organizationId: string;
|
|
3630
|
+
remaining: number;
|
|
3631
|
+
amount: number;
|
|
3632
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
3633
|
+
holderType: "other" | "supplier" | "staff";
|
|
3634
|
+
holderName: string;
|
|
3635
|
+
currency?: string | undefined;
|
|
3636
|
+
notes?: string | null | undefined;
|
|
3637
|
+
overdue?: boolean | undefined;
|
|
3638
|
+
dealId?: string | null | undefined;
|
|
3639
|
+
funderId?: string | null | undefined;
|
|
3640
|
+
funderName?: string | null | undefined;
|
|
3641
|
+
holderId?: string | null | undefined;
|
|
3642
|
+
expectedSettleBy?: string | null | undefined;
|
|
3643
|
+
parentAdvanceId?: string | null | undefined;
|
|
3644
|
+
purchaseOrderId?: string | null | undefined;
|
|
3645
|
+
purpose?: string | null | undefined;
|
|
3646
|
+
confirmedAt?: string | null | undefined;
|
|
3647
|
+
}>;
|
|
3648
|
+
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3649
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3650
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3651
|
+
}, "strip", z.ZodTypeAny, {
|
|
3652
|
+
type: string;
|
|
3653
|
+
id: string;
|
|
3654
|
+
attributes: {
|
|
3655
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
3656
|
+
createdAt: string;
|
|
3657
|
+
updatedAt: string;
|
|
3658
|
+
organizationId: string;
|
|
3659
|
+
currency: string;
|
|
3660
|
+
remaining: number;
|
|
3661
|
+
amount: number;
|
|
3662
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
3663
|
+
holderType: "other" | "supplier" | "staff";
|
|
3664
|
+
holderName: string;
|
|
3665
|
+
notes?: string | null | undefined;
|
|
3666
|
+
overdue?: boolean | undefined;
|
|
3667
|
+
dealId?: string | null | undefined;
|
|
3668
|
+
funderId?: string | null | undefined;
|
|
3669
|
+
funderName?: string | null | undefined;
|
|
3670
|
+
holderId?: string | null | undefined;
|
|
3671
|
+
expectedSettleBy?: string | null | undefined;
|
|
3672
|
+
parentAdvanceId?: string | null | undefined;
|
|
3673
|
+
purchaseOrderId?: string | null | undefined;
|
|
3674
|
+
purpose?: string | null | undefined;
|
|
3675
|
+
confirmedAt?: string | null | undefined;
|
|
3676
|
+
};
|
|
3677
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3678
|
+
links?: Record<string, string> | undefined;
|
|
3679
|
+
meta?: Record<string, unknown> | undefined;
|
|
3680
|
+
}, {
|
|
3681
|
+
type: string;
|
|
3682
|
+
id: string;
|
|
3683
|
+
attributes: {
|
|
3684
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
3685
|
+
createdAt: string;
|
|
3686
|
+
updatedAt: string;
|
|
3687
|
+
organizationId: string;
|
|
3688
|
+
remaining: number;
|
|
3689
|
+
amount: number;
|
|
3690
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
3691
|
+
holderType: "other" | "supplier" | "staff";
|
|
3692
|
+
holderName: string;
|
|
3693
|
+
currency?: string | undefined;
|
|
3694
|
+
notes?: string | null | undefined;
|
|
3695
|
+
overdue?: boolean | undefined;
|
|
3696
|
+
dealId?: string | null | undefined;
|
|
3697
|
+
funderId?: string | null | undefined;
|
|
3698
|
+
funderName?: string | null | undefined;
|
|
3699
|
+
holderId?: string | null | undefined;
|
|
3700
|
+
expectedSettleBy?: string | null | undefined;
|
|
3701
|
+
parentAdvanceId?: string | null | undefined;
|
|
3702
|
+
purchaseOrderId?: string | null | undefined;
|
|
3703
|
+
purpose?: string | null | undefined;
|
|
3704
|
+
confirmedAt?: string | null | undefined;
|
|
3705
|
+
};
|
|
3706
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3707
|
+
links?: Record<string, string> | undefined;
|
|
3708
|
+
meta?: Record<string, unknown> | undefined;
|
|
3709
|
+
}>, "many">;
|
|
3710
|
+
included: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3711
|
+
type: z.ZodString;
|
|
3712
|
+
id: z.ZodString;
|
|
3713
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3714
|
+
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3715
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3716
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3717
|
+
}, "strip", z.ZodTypeAny, {
|
|
3718
|
+
type: string;
|
|
3719
|
+
id: string;
|
|
3720
|
+
attributes?: Record<string, unknown> | undefined;
|
|
3721
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3722
|
+
links?: Record<string, string> | undefined;
|
|
3723
|
+
meta?: Record<string, unknown> | undefined;
|
|
3724
|
+
}, {
|
|
3725
|
+
type: string;
|
|
3726
|
+
id: string;
|
|
3727
|
+
attributes?: Record<string, unknown> | undefined;
|
|
3728
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3729
|
+
links?: Record<string, string> | undefined;
|
|
3730
|
+
meta?: Record<string, unknown> | undefined;
|
|
3731
|
+
}>, "many">>;
|
|
3732
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3733
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3734
|
+
}, "strip", z.ZodTypeAny, {
|
|
3735
|
+
data: {
|
|
3736
|
+
type: string;
|
|
3737
|
+
id: string;
|
|
3738
|
+
attributes: {
|
|
3739
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
3740
|
+
createdAt: string;
|
|
3741
|
+
updatedAt: string;
|
|
3742
|
+
organizationId: string;
|
|
3743
|
+
currency: string;
|
|
3744
|
+
remaining: number;
|
|
3745
|
+
amount: number;
|
|
3746
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
3747
|
+
holderType: "other" | "supplier" | "staff";
|
|
3748
|
+
holderName: string;
|
|
3749
|
+
notes?: string | null | undefined;
|
|
3750
|
+
overdue?: boolean | undefined;
|
|
3751
|
+
dealId?: string | null | undefined;
|
|
3752
|
+
funderId?: string | null | undefined;
|
|
3753
|
+
funderName?: string | null | undefined;
|
|
3754
|
+
holderId?: string | null | undefined;
|
|
3755
|
+
expectedSettleBy?: string | null | undefined;
|
|
3756
|
+
parentAdvanceId?: string | null | undefined;
|
|
3757
|
+
purchaseOrderId?: string | null | undefined;
|
|
3758
|
+
purpose?: string | null | undefined;
|
|
3759
|
+
confirmedAt?: string | null | undefined;
|
|
3760
|
+
};
|
|
3761
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3762
|
+
links?: Record<string, string> | undefined;
|
|
3763
|
+
meta?: Record<string, unknown> | undefined;
|
|
3764
|
+
}[];
|
|
3765
|
+
links?: Record<string, string> | undefined;
|
|
3766
|
+
meta?: Record<string, unknown> | undefined;
|
|
3767
|
+
included?: {
|
|
3768
|
+
type: string;
|
|
3769
|
+
id: string;
|
|
3770
|
+
attributes?: Record<string, unknown> | undefined;
|
|
3771
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3772
|
+
links?: Record<string, string> | undefined;
|
|
3773
|
+
meta?: Record<string, unknown> | undefined;
|
|
3774
|
+
}[] | undefined;
|
|
3775
|
+
}, {
|
|
3776
|
+
data: {
|
|
3777
|
+
type: string;
|
|
3778
|
+
id: string;
|
|
3779
|
+
attributes: {
|
|
3780
|
+
status: "cancelled" | "open" | "pending_receipt" | "settled" | "written_off";
|
|
3781
|
+
createdAt: string;
|
|
3782
|
+
updatedAt: string;
|
|
3783
|
+
organizationId: string;
|
|
3784
|
+
remaining: number;
|
|
3785
|
+
amount: number;
|
|
3786
|
+
funderType: "investor" | "staff" | "company" | "unattributed";
|
|
3787
|
+
holderType: "other" | "supplier" | "staff";
|
|
3788
|
+
holderName: string;
|
|
3789
|
+
currency?: string | undefined;
|
|
3790
|
+
notes?: string | null | undefined;
|
|
3791
|
+
overdue?: boolean | undefined;
|
|
3792
|
+
dealId?: string | null | undefined;
|
|
3793
|
+
funderId?: string | null | undefined;
|
|
3794
|
+
funderName?: string | null | undefined;
|
|
3795
|
+
holderId?: string | null | undefined;
|
|
3796
|
+
expectedSettleBy?: string | null | undefined;
|
|
3797
|
+
parentAdvanceId?: string | null | undefined;
|
|
3798
|
+
purchaseOrderId?: string | null | undefined;
|
|
3799
|
+
purpose?: string | null | undefined;
|
|
3800
|
+
confirmedAt?: string | null | undefined;
|
|
3801
|
+
};
|
|
3802
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3803
|
+
links?: Record<string, string> | undefined;
|
|
3804
|
+
meta?: Record<string, unknown> | undefined;
|
|
3805
|
+
}[];
|
|
3806
|
+
links?: Record<string, string> | undefined;
|
|
3807
|
+
meta?: Record<string, unknown> | undefined;
|
|
3808
|
+
included?: {
|
|
3809
|
+
type: string;
|
|
3810
|
+
id: string;
|
|
3811
|
+
attributes?: Record<string, unknown> | undefined;
|
|
3812
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3813
|
+
links?: Record<string, string> | undefined;
|
|
3814
|
+
meta?: Record<string, unknown> | undefined;
|
|
3815
|
+
}[] | undefined;
|
|
3816
|
+
}>;
|
|
3817
|
+
export declare const createSourcingAdvanceSchema: z.ZodObject<{
|
|
3818
|
+
type: z.ZodLiteral<"trade-sourcing-advances">;
|
|
3819
|
+
attributes: z.ZodObject<{
|
|
3820
|
+
holderType: z.ZodEnum<["staff", "supplier", "other"]>;
|
|
3821
|
+
holderId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3822
|
+
holderName: z.ZodString;
|
|
3823
|
+
funderType: z.ZodEnum<["company", "staff", "investor"]>;
|
|
3824
|
+
funderId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3825
|
+
funderName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3826
|
+
amount: z.ZodNumber;
|
|
3827
|
+
currency: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
3828
|
+
occurredAt: z.ZodString;
|
|
3829
|
+
expectedSettleBy: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3830
|
+
dealId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3831
|
+
purchaseOrderId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3832
|
+
purpose: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3833
|
+
notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3834
|
+
method: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3835
|
+
reference: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3836
|
+
}, "strip", z.ZodTypeAny, {
|
|
3837
|
+
currency: string;
|
|
3838
|
+
occurredAt: string;
|
|
3839
|
+
amount: number;
|
|
3840
|
+
funderType: "investor" | "staff" | "company";
|
|
3841
|
+
holderType: "other" | "supplier" | "staff";
|
|
3842
|
+
holderName: string;
|
|
3843
|
+
method?: string | null | undefined;
|
|
3844
|
+
notes?: string | null | undefined;
|
|
3845
|
+
reference?: string | null | undefined;
|
|
3846
|
+
dealId?: string | null | undefined;
|
|
3847
|
+
funderId?: string | null | undefined;
|
|
3848
|
+
funderName?: string | null | undefined;
|
|
3849
|
+
holderId?: string | null | undefined;
|
|
3850
|
+
expectedSettleBy?: string | null | undefined;
|
|
3851
|
+
purchaseOrderId?: string | null | undefined;
|
|
3852
|
+
purpose?: string | null | undefined;
|
|
3853
|
+
}, {
|
|
3854
|
+
occurredAt: string;
|
|
3855
|
+
amount: number;
|
|
3856
|
+
funderType: "investor" | "staff" | "company";
|
|
3857
|
+
holderType: "other" | "supplier" | "staff";
|
|
3858
|
+
holderName: string;
|
|
3859
|
+
method?: string | null | undefined;
|
|
3860
|
+
currency?: string | undefined;
|
|
3861
|
+
notes?: string | null | undefined;
|
|
3862
|
+
reference?: string | null | undefined;
|
|
3863
|
+
dealId?: string | null | undefined;
|
|
3864
|
+
funderId?: string | null | undefined;
|
|
3865
|
+
funderName?: string | null | undefined;
|
|
3866
|
+
holderId?: string | null | undefined;
|
|
3867
|
+
expectedSettleBy?: string | null | undefined;
|
|
3868
|
+
purchaseOrderId?: string | null | undefined;
|
|
3869
|
+
purpose?: string | null | undefined;
|
|
3870
|
+
}>;
|
|
3871
|
+
}, "strip", z.ZodTypeAny, {
|
|
3872
|
+
type: "trade-sourcing-advances";
|
|
3873
|
+
attributes: {
|
|
3874
|
+
currency: string;
|
|
3875
|
+
occurredAt: string;
|
|
3876
|
+
amount: number;
|
|
3877
|
+
funderType: "investor" | "staff" | "company";
|
|
3878
|
+
holderType: "other" | "supplier" | "staff";
|
|
3879
|
+
holderName: string;
|
|
3880
|
+
method?: string | null | undefined;
|
|
3881
|
+
notes?: string | null | undefined;
|
|
3882
|
+
reference?: string | null | undefined;
|
|
3883
|
+
dealId?: string | null | undefined;
|
|
3884
|
+
funderId?: string | null | undefined;
|
|
3885
|
+
funderName?: string | null | undefined;
|
|
3886
|
+
holderId?: string | null | undefined;
|
|
3887
|
+
expectedSettleBy?: string | null | undefined;
|
|
3888
|
+
purchaseOrderId?: string | null | undefined;
|
|
3889
|
+
purpose?: string | null | undefined;
|
|
3890
|
+
};
|
|
3891
|
+
}, {
|
|
3892
|
+
type: "trade-sourcing-advances";
|
|
3893
|
+
attributes: {
|
|
3894
|
+
occurredAt: string;
|
|
3895
|
+
amount: number;
|
|
3896
|
+
funderType: "investor" | "staff" | "company";
|
|
3897
|
+
holderType: "other" | "supplier" | "staff";
|
|
3898
|
+
holderName: string;
|
|
3899
|
+
method?: string | null | undefined;
|
|
3900
|
+
currency?: string | undefined;
|
|
3901
|
+
notes?: string | null | undefined;
|
|
3902
|
+
reference?: string | null | undefined;
|
|
3903
|
+
dealId?: string | null | undefined;
|
|
3904
|
+
funderId?: string | null | undefined;
|
|
3905
|
+
funderName?: string | null | undefined;
|
|
3906
|
+
holderId?: string | null | undefined;
|
|
3907
|
+
expectedSettleBy?: string | null | undefined;
|
|
3908
|
+
purchaseOrderId?: string | null | undefined;
|
|
3909
|
+
purpose?: string | null | undefined;
|
|
3910
|
+
};
|
|
3911
|
+
}>;
|
|
3912
|
+
export declare const handoffAdvanceSchema: z.ZodObject<{
|
|
3913
|
+
type: z.ZodLiteral<"trade-sourcing-advances">;
|
|
3914
|
+
attributes: z.ZodObject<{
|
|
3915
|
+
amount: z.ZodNumber;
|
|
3916
|
+
holderType: z.ZodEnum<["staff", "supplier", "other"]>;
|
|
3917
|
+
holderId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3918
|
+
holderName: z.ZodString;
|
|
3919
|
+
occurredAt: z.ZodString;
|
|
3920
|
+
notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3921
|
+
}, "strip", z.ZodTypeAny, {
|
|
3922
|
+
occurredAt: string;
|
|
3923
|
+
amount: number;
|
|
3924
|
+
holderType: "other" | "supplier" | "staff";
|
|
3925
|
+
holderName: string;
|
|
3926
|
+
notes?: string | null | undefined;
|
|
3927
|
+
holderId?: string | null | undefined;
|
|
3928
|
+
}, {
|
|
3929
|
+
occurredAt: string;
|
|
3930
|
+
amount: number;
|
|
3931
|
+
holderType: "other" | "supplier" | "staff";
|
|
3932
|
+
holderName: string;
|
|
3933
|
+
notes?: string | null | undefined;
|
|
3934
|
+
holderId?: string | null | undefined;
|
|
3935
|
+
}>;
|
|
3936
|
+
}, "strip", z.ZodTypeAny, {
|
|
3937
|
+
type: "trade-sourcing-advances";
|
|
3938
|
+
attributes: {
|
|
3939
|
+
occurredAt: string;
|
|
3940
|
+
amount: number;
|
|
3941
|
+
holderType: "other" | "supplier" | "staff";
|
|
3942
|
+
holderName: string;
|
|
3943
|
+
notes?: string | null | undefined;
|
|
3944
|
+
holderId?: string | null | undefined;
|
|
3945
|
+
};
|
|
3946
|
+
}, {
|
|
3947
|
+
type: "trade-sourcing-advances";
|
|
3948
|
+
attributes: {
|
|
3949
|
+
occurredAt: string;
|
|
3950
|
+
amount: number;
|
|
3951
|
+
holderType: "other" | "supplier" | "staff";
|
|
3952
|
+
holderName: string;
|
|
3953
|
+
notes?: string | null | undefined;
|
|
3954
|
+
holderId?: string | null | undefined;
|
|
3955
|
+
};
|
|
3956
|
+
}>;
|
|
3957
|
+
export declare const submitAdvanceSettlementSchema: z.ZodObject<{
|
|
3958
|
+
type: z.ZodLiteral<"trade-sourcing-settlement-requests">;
|
|
3959
|
+
attributes: z.ZodObject<{
|
|
3960
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
3961
|
+
outcome: z.ZodEnum<["spent", "returned", "written_off", "overspend"]>;
|
|
3962
|
+
amount: z.ZodNumber;
|
|
3963
|
+
supplierName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3964
|
+
supplierId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3965
|
+
dealId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3966
|
+
purchaseOrderId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3967
|
+
proofRef: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3968
|
+
notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3969
|
+
}, "strip", z.ZodTypeAny, {
|
|
3970
|
+
amount: number;
|
|
3971
|
+
outcome: "written_off" | "spent" | "returned" | "overspend";
|
|
3972
|
+
notes?: string | null | undefined;
|
|
3973
|
+
supplierId?: string | null | undefined;
|
|
3974
|
+
supplierName?: string | null | undefined;
|
|
3975
|
+
dealId?: string | null | undefined;
|
|
3976
|
+
purchaseOrderId?: string | null | undefined;
|
|
3977
|
+
proofRef?: string | null | undefined;
|
|
3978
|
+
}, {
|
|
3979
|
+
amount: number;
|
|
3980
|
+
outcome: "written_off" | "spent" | "returned" | "overspend";
|
|
3981
|
+
notes?: string | null | undefined;
|
|
3982
|
+
supplierId?: string | null | undefined;
|
|
3983
|
+
supplierName?: string | null | undefined;
|
|
3984
|
+
dealId?: string | null | undefined;
|
|
3985
|
+
purchaseOrderId?: string | null | undefined;
|
|
3986
|
+
proofRef?: string | null | undefined;
|
|
3987
|
+
}>, "many">;
|
|
3988
|
+
notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3989
|
+
}, "strip", z.ZodTypeAny, {
|
|
3990
|
+
lines: {
|
|
3991
|
+
amount: number;
|
|
3992
|
+
outcome: "written_off" | "spent" | "returned" | "overspend";
|
|
3993
|
+
notes?: string | null | undefined;
|
|
3994
|
+
supplierId?: string | null | undefined;
|
|
3995
|
+
supplierName?: string | null | undefined;
|
|
3996
|
+
dealId?: string | null | undefined;
|
|
3997
|
+
purchaseOrderId?: string | null | undefined;
|
|
3998
|
+
proofRef?: string | null | undefined;
|
|
3999
|
+
}[];
|
|
4000
|
+
notes?: string | null | undefined;
|
|
4001
|
+
}, {
|
|
4002
|
+
lines: {
|
|
4003
|
+
amount: number;
|
|
4004
|
+
outcome: "written_off" | "spent" | "returned" | "overspend";
|
|
4005
|
+
notes?: string | null | undefined;
|
|
4006
|
+
supplierId?: string | null | undefined;
|
|
4007
|
+
supplierName?: string | null | undefined;
|
|
4008
|
+
dealId?: string | null | undefined;
|
|
4009
|
+
purchaseOrderId?: string | null | undefined;
|
|
4010
|
+
proofRef?: string | null | undefined;
|
|
4011
|
+
}[];
|
|
4012
|
+
notes?: string | null | undefined;
|
|
4013
|
+
}>;
|
|
4014
|
+
}, "strip", z.ZodTypeAny, {
|
|
4015
|
+
type: "trade-sourcing-settlement-requests";
|
|
4016
|
+
attributes: {
|
|
4017
|
+
lines: {
|
|
4018
|
+
amount: number;
|
|
4019
|
+
outcome: "written_off" | "spent" | "returned" | "overspend";
|
|
4020
|
+
notes?: string | null | undefined;
|
|
4021
|
+
supplierId?: string | null | undefined;
|
|
4022
|
+
supplierName?: string | null | undefined;
|
|
4023
|
+
dealId?: string | null | undefined;
|
|
4024
|
+
purchaseOrderId?: string | null | undefined;
|
|
4025
|
+
proofRef?: string | null | undefined;
|
|
4026
|
+
}[];
|
|
4027
|
+
notes?: string | null | undefined;
|
|
4028
|
+
};
|
|
4029
|
+
}, {
|
|
4030
|
+
type: "trade-sourcing-settlement-requests";
|
|
4031
|
+
attributes: {
|
|
4032
|
+
lines: {
|
|
4033
|
+
amount: number;
|
|
4034
|
+
outcome: "written_off" | "spent" | "returned" | "overspend";
|
|
4035
|
+
notes?: string | null | undefined;
|
|
4036
|
+
supplierId?: string | null | undefined;
|
|
4037
|
+
supplierName?: string | null | undefined;
|
|
4038
|
+
dealId?: string | null | undefined;
|
|
4039
|
+
purchaseOrderId?: string | null | undefined;
|
|
4040
|
+
proofRef?: string | null | undefined;
|
|
4041
|
+
}[];
|
|
4042
|
+
notes?: string | null | undefined;
|
|
4043
|
+
};
|
|
4044
|
+
}>;
|
|
4045
|
+
export declare const approveAdvanceSettlementSchema: z.ZodObject<{
|
|
4046
|
+
type: z.ZodLiteral<"trade-sourcing-settlement-requests">;
|
|
4047
|
+
attributes: z.ZodObject<{
|
|
4048
|
+
occurredAt: z.ZodString;
|
|
4049
|
+
notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4050
|
+
}, "strip", z.ZodTypeAny, {
|
|
4051
|
+
occurredAt: string;
|
|
4052
|
+
notes?: string | null | undefined;
|
|
4053
|
+
}, {
|
|
4054
|
+
occurredAt: string;
|
|
4055
|
+
notes?: string | null | undefined;
|
|
4056
|
+
}>;
|
|
4057
|
+
}, "strip", z.ZodTypeAny, {
|
|
4058
|
+
type: "trade-sourcing-settlement-requests";
|
|
4059
|
+
attributes: {
|
|
4060
|
+
occurredAt: string;
|
|
4061
|
+
notes?: string | null | undefined;
|
|
4062
|
+
};
|
|
4063
|
+
}, {
|
|
4064
|
+
type: "trade-sourcing-settlement-requests";
|
|
4065
|
+
attributes: {
|
|
4066
|
+
occurredAt: string;
|
|
4067
|
+
notes?: string | null | undefined;
|
|
4068
|
+
};
|
|
4069
|
+
}>;
|
|
4070
|
+
export declare const writeoffAdvanceSchema: z.ZodObject<{
|
|
4071
|
+
type: z.ZodLiteral<"trade-sourcing-advances">;
|
|
4072
|
+
attributes: z.ZodObject<{
|
|
4073
|
+
amount: z.ZodNumber;
|
|
4074
|
+
reason: z.ZodString;
|
|
4075
|
+
occurredAt: z.ZodString;
|
|
4076
|
+
}, "strip", z.ZodTypeAny, {
|
|
4077
|
+
reason: string;
|
|
4078
|
+
occurredAt: string;
|
|
4079
|
+
amount: number;
|
|
4080
|
+
}, {
|
|
4081
|
+
reason: string;
|
|
4082
|
+
occurredAt: string;
|
|
4083
|
+
amount: number;
|
|
4084
|
+
}>;
|
|
4085
|
+
}, "strip", z.ZodTypeAny, {
|
|
4086
|
+
type: "trade-sourcing-advances";
|
|
4087
|
+
attributes: {
|
|
4088
|
+
reason: string;
|
|
4089
|
+
occurredAt: string;
|
|
4090
|
+
amount: number;
|
|
4091
|
+
};
|
|
4092
|
+
}, {
|
|
4093
|
+
type: "trade-sourcing-advances";
|
|
4094
|
+
attributes: {
|
|
4095
|
+
reason: string;
|
|
4096
|
+
occurredAt: string;
|
|
4097
|
+
amount: number;
|
|
4098
|
+
};
|
|
4099
|
+
}>;
|
|
1529
4100
|
export type CreateTradeCashEventAttributes = z.infer<typeof createTradeCashEventAttributesSchema>;
|
|
1530
4101
|
export type CreateInvoicePaymentAttributes = z.infer<typeof createInvoicePaymentAttributesSchema>;
|
|
4102
|
+
export type CreateSourcingAdvanceAttributes = z.infer<typeof createSourcingAdvanceAttributesSchema>;
|
|
4103
|
+
export type HandoffAdvanceAttributes = z.infer<typeof handoffAdvanceAttributesSchema>;
|
|
4104
|
+
export type SubmitAdvanceSettlementAttributes = z.infer<typeof submitAdvanceSettlementAttributesSchema>;
|
|
4105
|
+
export type ApproveAdvanceSettlementAttributes = z.infer<typeof approveAdvanceSettlementAttributesSchema>;
|
|
4106
|
+
export type WriteoffAdvanceAttributes = z.infer<typeof writeoffAdvanceAttributesSchema>;
|
|
4107
|
+
export type AdvanceSettlementLine = z.infer<typeof advanceSettlementLineSchema>;
|
|
1531
4108
|
//# sourceMappingURL=trade-cash-events.schemas.d.ts.map
|