@emitia/node 0.1.0 → 0.2.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/README.md +1 -1
- package/dist/index.d.ts +579 -2285
- package/dist/index.js +97 -11
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -30,19 +30,24 @@ declare const AccountInfoSchema: z.ZodObject<{
|
|
|
30
30
|
id: z.ZodString;
|
|
31
31
|
name: z.ZodString;
|
|
32
32
|
dian_environment: z.ZodString;
|
|
33
|
-
key_mode: z.ZodEnum<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
key_mode: "test" | "live";
|
|
39
|
-
}, {
|
|
40
|
-
id: string;
|
|
41
|
-
name: string;
|
|
42
|
-
dian_environment: string;
|
|
43
|
-
key_mode: "test" | "live";
|
|
44
|
-
}>;
|
|
33
|
+
key_mode: z.ZodEnum<{
|
|
34
|
+
test: "test";
|
|
35
|
+
live: "live";
|
|
36
|
+
}>;
|
|
37
|
+
}, z.core.$strip>;
|
|
45
38
|
|
|
39
|
+
/**
|
|
40
|
+
* test.ts — OpenAPI path registration for POST /v1/test/trigger-event.
|
|
41
|
+
*
|
|
42
|
+
* The Zod schemas are defined inline (mirroring the shape from
|
|
43
|
+
* apps/api/src/modules/test/test.schema.ts) rather than importing from the
|
|
44
|
+
* NestJS app, keeping this package free of NestJS/DI dependencies.
|
|
45
|
+
*
|
|
46
|
+
* Spec: test-mode-sandbox §POST /v1/test/trigger-event Guard.
|
|
47
|
+
* Design: §8 Impact on OpenAPI + Docs, ADR-9.
|
|
48
|
+
*
|
|
49
|
+
* SSOT: WEBHOOK_EVENT_TYPES from @emitia/shared — no parallel list maintained here.
|
|
50
|
+
*/
|
|
46
51
|
/**
|
|
47
52
|
* TriggerEventBodySchema — request body for POST /v1/test/trigger-event.
|
|
48
53
|
*
|
|
@@ -50,18 +55,32 @@ declare const AccountInfoSchema: z.ZodObject<{
|
|
|
50
55
|
* and the contract test can assert on its properties.
|
|
51
56
|
*/
|
|
52
57
|
declare const TriggerEventBodySchema: z.ZodObject<{
|
|
53
|
-
type: z.ZodEnum<
|
|
58
|
+
type: z.ZodEnum<{
|
|
59
|
+
"invoice.accepted_by_dian": "invoice.accepted_by_dian";
|
|
60
|
+
"invoice.rejected_by_dian": "invoice.rejected_by_dian";
|
|
61
|
+
"invoice.accepted_contingency": "invoice.accepted_contingency";
|
|
62
|
+
"invoice.failed": "invoice.failed";
|
|
63
|
+
"credit_note.accepted_by_dian": "credit_note.accepted_by_dian";
|
|
64
|
+
"credit_note.rejected_by_dian": "credit_note.rejected_by_dian";
|
|
65
|
+
"credit_note.accepted_contingency": "credit_note.accepted_contingency";
|
|
66
|
+
"credit_note.failed": "credit_note.failed";
|
|
67
|
+
"debit_note.accepted_by_dian": "debit_note.accepted_by_dian";
|
|
68
|
+
"debit_note.rejected_by_dian": "debit_note.rejected_by_dian";
|
|
69
|
+
"debit_note.accepted_contingency": "debit_note.accepted_contingency";
|
|
70
|
+
"debit_note.failed": "debit_note.failed";
|
|
71
|
+
"invoice.email.delivered": "invoice.email.delivered";
|
|
72
|
+
"invoice.email.bounced": "invoice.email.bounced";
|
|
73
|
+
"invoice.email.complained": "invoice.email.complained";
|
|
74
|
+
"credit_note.email.delivered": "credit_note.email.delivered";
|
|
75
|
+
"credit_note.email.bounced": "credit_note.email.bounced";
|
|
76
|
+
"credit_note.email.complained": "credit_note.email.complained";
|
|
77
|
+
"debit_note.email.delivered": "debit_note.email.delivered";
|
|
78
|
+
"debit_note.email.bounced": "debit_note.email.bounced";
|
|
79
|
+
"debit_note.email.complained": "debit_note.email.complained";
|
|
80
|
+
}>;
|
|
54
81
|
object_id: z.ZodOptional<z.ZodString>;
|
|
55
82
|
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
56
|
-
},
|
|
57
|
-
type: "invoice.accepted_by_dian" | "invoice.rejected_by_dian" | "invoice.accepted_contingency" | "invoice.failed" | "invoice.email.delivered" | "invoice.email.bounced" | "invoice.email.complained" | "credit_note.email.delivered" | "credit_note.email.bounced" | "credit_note.email.complained" | "debit_note.email.delivered" | "debit_note.email.bounced" | "debit_note.email.complained";
|
|
58
|
-
object_id?: string | undefined;
|
|
59
|
-
data?: Record<string, unknown> | undefined;
|
|
60
|
-
}, {
|
|
61
|
-
type: "invoice.accepted_by_dian" | "invoice.rejected_by_dian" | "invoice.accepted_contingency" | "invoice.failed" | "invoice.email.delivered" | "invoice.email.bounced" | "invoice.email.complained" | "credit_note.email.delivered" | "credit_note.email.bounced" | "credit_note.email.complained" | "debit_note.email.delivered" | "debit_note.email.bounced" | "debit_note.email.complained";
|
|
62
|
-
object_id?: string | undefined;
|
|
63
|
-
data?: Record<string, unknown> | undefined;
|
|
64
|
-
}>;
|
|
83
|
+
}, z.core.$strip>;
|
|
65
84
|
/**
|
|
66
85
|
* TriggerEventResponseSchema — 201 response for POST /v1/test/trigger-event.
|
|
67
86
|
*
|
|
@@ -72,64 +91,35 @@ declare const TriggerEventResponseSchema: z.ZodObject<{
|
|
|
72
91
|
type: z.ZodString;
|
|
73
92
|
livemode: z.ZodLiteral<false>;
|
|
74
93
|
created: z.ZodString;
|
|
75
|
-
},
|
|
76
|
-
type: string;
|
|
77
|
-
id: string;
|
|
78
|
-
livemode: false;
|
|
79
|
-
created: string;
|
|
80
|
-
}, {
|
|
81
|
-
type: string;
|
|
82
|
-
id: string;
|
|
83
|
-
livemode: false;
|
|
84
|
-
created: string;
|
|
85
|
-
}>;
|
|
94
|
+
}, z.core.$strip>;
|
|
86
95
|
|
|
87
96
|
/**
|
|
88
97
|
* BalanceResponseSchema — SSOT for GET /v1/balance response shape.
|
|
89
98
|
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
99
|
+
* Additive on top of the previous MVP shape ({ current_period, all_time }):
|
|
100
|
+
* adds `plan` and extends `current_period` with `included_documents`,
|
|
101
|
+
* `overage`, `estimated_cost` (billing-metering-foundation PR4).
|
|
92
102
|
*/
|
|
93
103
|
declare const BalanceResponseSchema: z.ZodObject<{
|
|
104
|
+
plan: z.ZodObject<{
|
|
105
|
+
code: z.ZodString;
|
|
106
|
+
name: z.ZodString;
|
|
107
|
+
}, z.core.$strip>;
|
|
94
108
|
current_period: z.ZodObject<{
|
|
95
109
|
start: z.ZodString;
|
|
96
110
|
end: z.ZodString;
|
|
97
111
|
documents_used: z.ZodNumber;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
documents_used: number;
|
|
106
|
-
}>;
|
|
112
|
+
included_documents: z.ZodNumber;
|
|
113
|
+
overage: z.ZodNumber;
|
|
114
|
+
estimated_cost: z.ZodObject<{
|
|
115
|
+
amount: z.ZodString;
|
|
116
|
+
currency: z.ZodLiteral<"COP">;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
}, z.core.$strip>;
|
|
107
119
|
all_time: z.ZodObject<{
|
|
108
120
|
documents_processed: z.ZodNumber;
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
}, {
|
|
112
|
-
documents_processed: number;
|
|
113
|
-
}>;
|
|
114
|
-
}, "strip", z.ZodTypeAny, {
|
|
115
|
-
current_period: {
|
|
116
|
-
start: string;
|
|
117
|
-
end: string;
|
|
118
|
-
documents_used: number;
|
|
119
|
-
};
|
|
120
|
-
all_time: {
|
|
121
|
-
documents_processed: number;
|
|
122
|
-
};
|
|
123
|
-
}, {
|
|
124
|
-
current_period: {
|
|
125
|
-
start: string;
|
|
126
|
-
end: string;
|
|
127
|
-
documents_used: number;
|
|
128
|
-
};
|
|
129
|
-
all_time: {
|
|
130
|
-
documents_processed: number;
|
|
131
|
-
};
|
|
132
|
-
}>;
|
|
121
|
+
}, z.core.$strip>;
|
|
122
|
+
}, z.core.$strip>;
|
|
133
123
|
|
|
134
124
|
declare const CustomerResponseSchema: z.ZodObject<{
|
|
135
125
|
id: z.ZodString;
|
|
@@ -139,15 +129,7 @@ declare const CustomerResponseSchema: z.ZodObject<{
|
|
|
139
129
|
type: z.ZodString;
|
|
140
130
|
number: z.ZodString;
|
|
141
131
|
check_digit: z.ZodOptional<z.ZodString>;
|
|
142
|
-
},
|
|
143
|
-
number: string;
|
|
144
|
-
type: string;
|
|
145
|
-
check_digit?: string | undefined;
|
|
146
|
-
}, {
|
|
147
|
-
number: string;
|
|
148
|
-
type: string;
|
|
149
|
-
check_digit?: string | undefined;
|
|
150
|
-
}>;
|
|
132
|
+
}, z.core.$strip>;
|
|
151
133
|
legal_name: z.ZodString;
|
|
152
134
|
trade_name: z.ZodNullable<z.ZodString>;
|
|
153
135
|
email: z.ZodNullable<z.ZodString>;
|
|
@@ -157,78 +139,20 @@ declare const CustomerResponseSchema: z.ZodObject<{
|
|
|
157
139
|
department_code: z.ZodNullable<z.ZodString>;
|
|
158
140
|
country_code: z.ZodString;
|
|
159
141
|
postal_code: z.ZodNullable<z.ZodString>;
|
|
160
|
-
fiscal_responsibility: z.ZodArray<z.ZodString
|
|
142
|
+
fiscal_responsibility: z.ZodArray<z.ZodString>;
|
|
161
143
|
organization_type: z.ZodNullable<z.ZodString>;
|
|
162
144
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
163
145
|
deleted: z.ZodBoolean;
|
|
164
146
|
deleted_at: z.ZodNullable<z.ZodString>;
|
|
165
147
|
created_at: z.ZodString;
|
|
166
148
|
updated_at: z.ZodString;
|
|
167
|
-
},
|
|
168
|
-
object: "customer";
|
|
169
|
-
id: string;
|
|
170
|
-
livemode: boolean;
|
|
171
|
-
identification: {
|
|
172
|
-
number: string;
|
|
173
|
-
type: string;
|
|
174
|
-
check_digit?: string | undefined;
|
|
175
|
-
};
|
|
176
|
-
legal_name: string;
|
|
177
|
-
trade_name: string | null;
|
|
178
|
-
email: string | null;
|
|
179
|
-
phone: string | null;
|
|
180
|
-
address: string | null;
|
|
181
|
-
city_code: string | null;
|
|
182
|
-
department_code: string | null;
|
|
183
|
-
country_code: string;
|
|
184
|
-
postal_code: string | null;
|
|
185
|
-
fiscal_responsibility: string[];
|
|
186
|
-
organization_type: string | null;
|
|
187
|
-
metadata: Record<string, unknown>;
|
|
188
|
-
deleted: boolean;
|
|
189
|
-
deleted_at: string | null;
|
|
190
|
-
created_at: string;
|
|
191
|
-
updated_at: string;
|
|
192
|
-
}, {
|
|
193
|
-
object: "customer";
|
|
194
|
-
id: string;
|
|
195
|
-
livemode: boolean;
|
|
196
|
-
identification: {
|
|
197
|
-
number: string;
|
|
198
|
-
type: string;
|
|
199
|
-
check_digit?: string | undefined;
|
|
200
|
-
};
|
|
201
|
-
legal_name: string;
|
|
202
|
-
trade_name: string | null;
|
|
203
|
-
email: string | null;
|
|
204
|
-
phone: string | null;
|
|
205
|
-
address: string | null;
|
|
206
|
-
city_code: string | null;
|
|
207
|
-
department_code: string | null;
|
|
208
|
-
country_code: string;
|
|
209
|
-
postal_code: string | null;
|
|
210
|
-
fiscal_responsibility: string[];
|
|
211
|
-
organization_type: string | null;
|
|
212
|
-
metadata: Record<string, unknown>;
|
|
213
|
-
deleted: boolean;
|
|
214
|
-
deleted_at: string | null;
|
|
215
|
-
created_at: string;
|
|
216
|
-
updated_at: string;
|
|
217
|
-
}>;
|
|
149
|
+
}, z.core.$strip>;
|
|
218
150
|
declare const CreateCustomerRequestSchema: z.ZodObject<{
|
|
219
151
|
identification: z.ZodObject<{
|
|
220
152
|
type: z.ZodString;
|
|
221
153
|
number: z.ZodString;
|
|
222
154
|
check_digit: z.ZodOptional<z.ZodString>;
|
|
223
|
-
},
|
|
224
|
-
number: string;
|
|
225
|
-
type: string;
|
|
226
|
-
check_digit?: string | undefined;
|
|
227
|
-
}, {
|
|
228
|
-
number: string;
|
|
229
|
-
type: string;
|
|
230
|
-
check_digit?: string | undefined;
|
|
231
|
-
}>;
|
|
155
|
+
}, z.core.$strip>;
|
|
232
156
|
legal_name: z.ZodString;
|
|
233
157
|
trade_name: z.ZodOptional<z.ZodString>;
|
|
234
158
|
email: z.ZodOptional<z.ZodString>;
|
|
@@ -238,46 +162,13 @@ declare const CreateCustomerRequestSchema: z.ZodObject<{
|
|
|
238
162
|
department_code: z.ZodOptional<z.ZodString>;
|
|
239
163
|
country_code: z.ZodDefault<z.ZodString>;
|
|
240
164
|
postal_code: z.ZodOptional<z.ZodString>;
|
|
241
|
-
fiscal_responsibility: z.ZodDefault<z.ZodArray<z.ZodString
|
|
242
|
-
organization_type: z.ZodOptional<z.ZodEnum<
|
|
165
|
+
fiscal_responsibility: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
166
|
+
organization_type: z.ZodOptional<z.ZodEnum<{
|
|
167
|
+
1: "1";
|
|
168
|
+
2: "2";
|
|
169
|
+
}>>;
|
|
243
170
|
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
244
|
-
},
|
|
245
|
-
identification: {
|
|
246
|
-
number: string;
|
|
247
|
-
type: string;
|
|
248
|
-
check_digit?: string | undefined;
|
|
249
|
-
};
|
|
250
|
-
legal_name: string;
|
|
251
|
-
country_code: string;
|
|
252
|
-
fiscal_responsibility: string[];
|
|
253
|
-
metadata: Record<string, unknown>;
|
|
254
|
-
trade_name?: string | undefined;
|
|
255
|
-
email?: string | undefined;
|
|
256
|
-
phone?: string | undefined;
|
|
257
|
-
address?: string | undefined;
|
|
258
|
-
city_code?: string | undefined;
|
|
259
|
-
department_code?: string | undefined;
|
|
260
|
-
postal_code?: string | undefined;
|
|
261
|
-
organization_type?: "1" | "2" | undefined;
|
|
262
|
-
}, {
|
|
263
|
-
identification: {
|
|
264
|
-
number: string;
|
|
265
|
-
type: string;
|
|
266
|
-
check_digit?: string | undefined;
|
|
267
|
-
};
|
|
268
|
-
legal_name: string;
|
|
269
|
-
trade_name?: string | undefined;
|
|
270
|
-
email?: string | undefined;
|
|
271
|
-
phone?: string | undefined;
|
|
272
|
-
address?: string | undefined;
|
|
273
|
-
city_code?: string | undefined;
|
|
274
|
-
department_code?: string | undefined;
|
|
275
|
-
country_code?: string | undefined;
|
|
276
|
-
postal_code?: string | undefined;
|
|
277
|
-
fiscal_responsibility?: string[] | undefined;
|
|
278
|
-
organization_type?: "1" | "2" | undefined;
|
|
279
|
-
metadata?: Record<string, unknown> | undefined;
|
|
280
|
-
}>;
|
|
171
|
+
}, z.core.$strip>;
|
|
281
172
|
declare const CustomerListResponseSchema: z.ZodObject<{
|
|
282
173
|
data: z.ZodArray<z.ZodObject<{
|
|
283
174
|
id: z.ZodString;
|
|
@@ -287,15 +178,7 @@ declare const CustomerListResponseSchema: z.ZodObject<{
|
|
|
287
178
|
type: z.ZodString;
|
|
288
179
|
number: z.ZodString;
|
|
289
180
|
check_digit: z.ZodOptional<z.ZodString>;
|
|
290
|
-
},
|
|
291
|
-
number: string;
|
|
292
|
-
type: string;
|
|
293
|
-
check_digit?: string | undefined;
|
|
294
|
-
}, {
|
|
295
|
-
number: string;
|
|
296
|
-
type: string;
|
|
297
|
-
check_digit?: string | undefined;
|
|
298
|
-
}>;
|
|
181
|
+
}, z.core.$strip>;
|
|
299
182
|
legal_name: z.ZodString;
|
|
300
183
|
trade_name: z.ZodNullable<z.ZodString>;
|
|
301
184
|
email: z.ZodNullable<z.ZodString>;
|
|
@@ -305,125 +188,17 @@ declare const CustomerListResponseSchema: z.ZodObject<{
|
|
|
305
188
|
department_code: z.ZodNullable<z.ZodString>;
|
|
306
189
|
country_code: z.ZodString;
|
|
307
190
|
postal_code: z.ZodNullable<z.ZodString>;
|
|
308
|
-
fiscal_responsibility: z.ZodArray<z.ZodString
|
|
191
|
+
fiscal_responsibility: z.ZodArray<z.ZodString>;
|
|
309
192
|
organization_type: z.ZodNullable<z.ZodString>;
|
|
310
193
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
311
194
|
deleted: z.ZodBoolean;
|
|
312
195
|
deleted_at: z.ZodNullable<z.ZodString>;
|
|
313
196
|
created_at: z.ZodString;
|
|
314
197
|
updated_at: z.ZodString;
|
|
315
|
-
},
|
|
316
|
-
object: "customer";
|
|
317
|
-
id: string;
|
|
318
|
-
livemode: boolean;
|
|
319
|
-
identification: {
|
|
320
|
-
number: string;
|
|
321
|
-
type: string;
|
|
322
|
-
check_digit?: string | undefined;
|
|
323
|
-
};
|
|
324
|
-
legal_name: string;
|
|
325
|
-
trade_name: string | null;
|
|
326
|
-
email: string | null;
|
|
327
|
-
phone: string | null;
|
|
328
|
-
address: string | null;
|
|
329
|
-
city_code: string | null;
|
|
330
|
-
department_code: string | null;
|
|
331
|
-
country_code: string;
|
|
332
|
-
postal_code: string | null;
|
|
333
|
-
fiscal_responsibility: string[];
|
|
334
|
-
organization_type: string | null;
|
|
335
|
-
metadata: Record<string, unknown>;
|
|
336
|
-
deleted: boolean;
|
|
337
|
-
deleted_at: string | null;
|
|
338
|
-
created_at: string;
|
|
339
|
-
updated_at: string;
|
|
340
|
-
}, {
|
|
341
|
-
object: "customer";
|
|
342
|
-
id: string;
|
|
343
|
-
livemode: boolean;
|
|
344
|
-
identification: {
|
|
345
|
-
number: string;
|
|
346
|
-
type: string;
|
|
347
|
-
check_digit?: string | undefined;
|
|
348
|
-
};
|
|
349
|
-
legal_name: string;
|
|
350
|
-
trade_name: string | null;
|
|
351
|
-
email: string | null;
|
|
352
|
-
phone: string | null;
|
|
353
|
-
address: string | null;
|
|
354
|
-
city_code: string | null;
|
|
355
|
-
department_code: string | null;
|
|
356
|
-
country_code: string;
|
|
357
|
-
postal_code: string | null;
|
|
358
|
-
fiscal_responsibility: string[];
|
|
359
|
-
organization_type: string | null;
|
|
360
|
-
metadata: Record<string, unknown>;
|
|
361
|
-
deleted: boolean;
|
|
362
|
-
deleted_at: string | null;
|
|
363
|
-
created_at: string;
|
|
364
|
-
updated_at: string;
|
|
365
|
-
}>, "many">;
|
|
198
|
+
}, z.core.$strip>>;
|
|
366
199
|
has_more: z.ZodBoolean;
|
|
367
200
|
next_cursor: z.ZodNullable<z.ZodString>;
|
|
368
|
-
},
|
|
369
|
-
data: {
|
|
370
|
-
object: "customer";
|
|
371
|
-
id: string;
|
|
372
|
-
livemode: boolean;
|
|
373
|
-
identification: {
|
|
374
|
-
number: string;
|
|
375
|
-
type: string;
|
|
376
|
-
check_digit?: string | undefined;
|
|
377
|
-
};
|
|
378
|
-
legal_name: string;
|
|
379
|
-
trade_name: string | null;
|
|
380
|
-
email: string | null;
|
|
381
|
-
phone: string | null;
|
|
382
|
-
address: string | null;
|
|
383
|
-
city_code: string | null;
|
|
384
|
-
department_code: string | null;
|
|
385
|
-
country_code: string;
|
|
386
|
-
postal_code: string | null;
|
|
387
|
-
fiscal_responsibility: string[];
|
|
388
|
-
organization_type: string | null;
|
|
389
|
-
metadata: Record<string, unknown>;
|
|
390
|
-
deleted: boolean;
|
|
391
|
-
deleted_at: string | null;
|
|
392
|
-
created_at: string;
|
|
393
|
-
updated_at: string;
|
|
394
|
-
}[];
|
|
395
|
-
has_more: boolean;
|
|
396
|
-
next_cursor: string | null;
|
|
397
|
-
}, {
|
|
398
|
-
data: {
|
|
399
|
-
object: "customer";
|
|
400
|
-
id: string;
|
|
401
|
-
livemode: boolean;
|
|
402
|
-
identification: {
|
|
403
|
-
number: string;
|
|
404
|
-
type: string;
|
|
405
|
-
check_digit?: string | undefined;
|
|
406
|
-
};
|
|
407
|
-
legal_name: string;
|
|
408
|
-
trade_name: string | null;
|
|
409
|
-
email: string | null;
|
|
410
|
-
phone: string | null;
|
|
411
|
-
address: string | null;
|
|
412
|
-
city_code: string | null;
|
|
413
|
-
department_code: string | null;
|
|
414
|
-
country_code: string;
|
|
415
|
-
postal_code: string | null;
|
|
416
|
-
fiscal_responsibility: string[];
|
|
417
|
-
organization_type: string | null;
|
|
418
|
-
metadata: Record<string, unknown>;
|
|
419
|
-
deleted: boolean;
|
|
420
|
-
deleted_at: string | null;
|
|
421
|
-
created_at: string;
|
|
422
|
-
updated_at: string;
|
|
423
|
-
}[];
|
|
424
|
-
has_more: boolean;
|
|
425
|
-
next_cursor: string | null;
|
|
426
|
-
}>;
|
|
201
|
+
}, z.core.$strip>;
|
|
427
202
|
|
|
428
203
|
/**
|
|
429
204
|
* catalogs.ts — OpenAPI path registrations for the catalogs resource.
|
|
@@ -436,75 +211,25 @@ declare const CustomerListResponseSchema: z.ZodObject<{
|
|
|
436
211
|
declare const CatalogItemSchema: z.ZodObject<{
|
|
437
212
|
code: z.ZodString;
|
|
438
213
|
name: z.ZodString;
|
|
439
|
-
},
|
|
440
|
-
code: string;
|
|
441
|
-
name: string;
|
|
442
|
-
}, {
|
|
443
|
-
code: string;
|
|
444
|
-
name: string;
|
|
445
|
-
}>;
|
|
214
|
+
}, z.core.$strip>;
|
|
446
215
|
declare const CatalogListResponseSchema: z.ZodObject<{
|
|
447
216
|
data: z.ZodArray<z.ZodObject<{
|
|
448
217
|
code: z.ZodString;
|
|
449
218
|
name: z.ZodString;
|
|
450
|
-
},
|
|
451
|
-
|
|
452
|
-
name: string;
|
|
453
|
-
}, {
|
|
454
|
-
code: string;
|
|
455
|
-
name: string;
|
|
456
|
-
}>, "many">;
|
|
457
|
-
}, "strip", z.ZodTypeAny, {
|
|
458
|
-
data: {
|
|
459
|
-
code: string;
|
|
460
|
-
name: string;
|
|
461
|
-
}[];
|
|
462
|
-
}, {
|
|
463
|
-
data: {
|
|
464
|
-
code: string;
|
|
465
|
-
name: string;
|
|
466
|
-
}[];
|
|
467
|
-
}>;
|
|
219
|
+
}, z.core.$strip>>;
|
|
220
|
+
}, z.core.$strip>;
|
|
468
221
|
declare const MunicipioItemSchema: z.ZodObject<{
|
|
469
222
|
code: z.ZodString;
|
|
470
223
|
name: z.ZodString;
|
|
471
224
|
department_code: z.ZodString;
|
|
472
|
-
},
|
|
473
|
-
code: string;
|
|
474
|
-
name: string;
|
|
475
|
-
department_code: string;
|
|
476
|
-
}, {
|
|
477
|
-
code: string;
|
|
478
|
-
name: string;
|
|
479
|
-
department_code: string;
|
|
480
|
-
}>;
|
|
225
|
+
}, z.core.$strip>;
|
|
481
226
|
declare const MunicipioListResponseSchema: z.ZodObject<{
|
|
482
227
|
data: z.ZodArray<z.ZodObject<{
|
|
483
228
|
code: z.ZodString;
|
|
484
229
|
name: z.ZodString;
|
|
485
230
|
department_code: z.ZodString;
|
|
486
|
-
},
|
|
487
|
-
|
|
488
|
-
name: string;
|
|
489
|
-
department_code: string;
|
|
490
|
-
}, {
|
|
491
|
-
code: string;
|
|
492
|
-
name: string;
|
|
493
|
-
department_code: string;
|
|
494
|
-
}>, "many">;
|
|
495
|
-
}, "strip", z.ZodTypeAny, {
|
|
496
|
-
data: {
|
|
497
|
-
code: string;
|
|
498
|
-
name: string;
|
|
499
|
-
department_code: string;
|
|
500
|
-
}[];
|
|
501
|
-
}, {
|
|
502
|
-
data: {
|
|
503
|
-
code: string;
|
|
504
|
-
name: string;
|
|
505
|
-
department_code: string;
|
|
506
|
-
}[];
|
|
507
|
-
}>;
|
|
231
|
+
}, z.core.$strip>>;
|
|
232
|
+
}, z.core.$strip>;
|
|
508
233
|
|
|
509
234
|
/**
|
|
510
235
|
* numbering-resolutions.ts — OpenAPI path registrations for the numbering-resolutions resource.
|
|
@@ -533,68 +258,25 @@ declare const NumberingResolutionResponseSchema: z.ZodObject<{
|
|
|
533
258
|
is_active: z.ZodBoolean;
|
|
534
259
|
created_at: z.ZodString;
|
|
535
260
|
updated_at: z.ZodString;
|
|
536
|
-
},
|
|
537
|
-
object: "numbering_resolution";
|
|
538
|
-
id: string;
|
|
539
|
-
livemode: boolean;
|
|
540
|
-
created_at: string;
|
|
541
|
-
updated_at: string;
|
|
542
|
-
resolution_number: string;
|
|
543
|
-
prefix: string;
|
|
544
|
-
document_type: string;
|
|
545
|
-
range_from: number;
|
|
546
|
-
range_to: number;
|
|
547
|
-
valid_from: string;
|
|
548
|
-
valid_to: string;
|
|
549
|
-
environment: string;
|
|
550
|
-
is_active: boolean;
|
|
551
|
-
}, {
|
|
552
|
-
object: "numbering_resolution";
|
|
553
|
-
id: string;
|
|
554
|
-
livemode: boolean;
|
|
555
|
-
created_at: string;
|
|
556
|
-
updated_at: string;
|
|
557
|
-
resolution_number: string;
|
|
558
|
-
prefix: string;
|
|
559
|
-
document_type: string;
|
|
560
|
-
range_from: number;
|
|
561
|
-
range_to: number;
|
|
562
|
-
valid_from: string;
|
|
563
|
-
valid_to: string;
|
|
564
|
-
environment: string;
|
|
565
|
-
is_active: boolean;
|
|
566
|
-
}>;
|
|
261
|
+
}, z.core.$strip>;
|
|
567
262
|
declare const CreateNumberingResolutionRequestSchema: z.ZodObject<{
|
|
568
263
|
resolution_number: z.ZodString;
|
|
569
264
|
prefix: z.ZodDefault<z.ZodString>;
|
|
570
|
-
document_type: z.ZodEnum<
|
|
265
|
+
document_type: z.ZodEnum<{
|
|
266
|
+
"01": "01";
|
|
267
|
+
91: "91";
|
|
268
|
+
92: "92";
|
|
269
|
+
}>;
|
|
571
270
|
technical_key: z.ZodString;
|
|
572
271
|
range_from: z.ZodNumber;
|
|
573
272
|
range_to: z.ZodNumber;
|
|
574
|
-
valid_from: z.ZodString
|
|
575
|
-
valid_to: z.ZodString
|
|
576
|
-
environment: z.ZodEnum<
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
range_from: number;
|
|
582
|
-
range_to: number;
|
|
583
|
-
valid_from: string;
|
|
584
|
-
valid_to: string;
|
|
585
|
-
environment: "habilitacion" | "production";
|
|
586
|
-
technical_key: string;
|
|
587
|
-
}, {
|
|
588
|
-
resolution_number: string;
|
|
589
|
-
document_type: "01" | "91" | "92";
|
|
590
|
-
range_from: number;
|
|
591
|
-
range_to: number;
|
|
592
|
-
valid_from: string;
|
|
593
|
-
valid_to: string;
|
|
594
|
-
environment: "habilitacion" | "production";
|
|
595
|
-
technical_key: string;
|
|
596
|
-
prefix?: string | undefined;
|
|
597
|
-
}>;
|
|
273
|
+
valid_from: z.ZodPipe<z.ZodString, z.ZodCoercedDate<string>>;
|
|
274
|
+
valid_to: z.ZodPipe<z.ZodString, z.ZodCoercedDate<string>>;
|
|
275
|
+
environment: z.ZodEnum<{
|
|
276
|
+
habilitacion: "habilitacion";
|
|
277
|
+
production: "production";
|
|
278
|
+
}>;
|
|
279
|
+
}, z.core.$strip>;
|
|
598
280
|
declare const NumberingResolutionListResponseSchema: z.ZodObject<{
|
|
599
281
|
data: z.ZodArray<z.ZodObject<{
|
|
600
282
|
id: z.ZodString;
|
|
@@ -611,78 +293,10 @@ declare const NumberingResolutionListResponseSchema: z.ZodObject<{
|
|
|
611
293
|
is_active: z.ZodBoolean;
|
|
612
294
|
created_at: z.ZodString;
|
|
613
295
|
updated_at: z.ZodString;
|
|
614
|
-
},
|
|
615
|
-
object: "numbering_resolution";
|
|
616
|
-
id: string;
|
|
617
|
-
livemode: boolean;
|
|
618
|
-
created_at: string;
|
|
619
|
-
updated_at: string;
|
|
620
|
-
resolution_number: string;
|
|
621
|
-
prefix: string;
|
|
622
|
-
document_type: string;
|
|
623
|
-
range_from: number;
|
|
624
|
-
range_to: number;
|
|
625
|
-
valid_from: string;
|
|
626
|
-
valid_to: string;
|
|
627
|
-
environment: string;
|
|
628
|
-
is_active: boolean;
|
|
629
|
-
}, {
|
|
630
|
-
object: "numbering_resolution";
|
|
631
|
-
id: string;
|
|
632
|
-
livemode: boolean;
|
|
633
|
-
created_at: string;
|
|
634
|
-
updated_at: string;
|
|
635
|
-
resolution_number: string;
|
|
636
|
-
prefix: string;
|
|
637
|
-
document_type: string;
|
|
638
|
-
range_from: number;
|
|
639
|
-
range_to: number;
|
|
640
|
-
valid_from: string;
|
|
641
|
-
valid_to: string;
|
|
642
|
-
environment: string;
|
|
643
|
-
is_active: boolean;
|
|
644
|
-
}>, "many">;
|
|
296
|
+
}, z.core.$strip>>;
|
|
645
297
|
has_more: z.ZodBoolean;
|
|
646
298
|
next_cursor: z.ZodNullable<z.ZodString>;
|
|
647
|
-
},
|
|
648
|
-
data: {
|
|
649
|
-
object: "numbering_resolution";
|
|
650
|
-
id: string;
|
|
651
|
-
livemode: boolean;
|
|
652
|
-
created_at: string;
|
|
653
|
-
updated_at: string;
|
|
654
|
-
resolution_number: string;
|
|
655
|
-
prefix: string;
|
|
656
|
-
document_type: string;
|
|
657
|
-
range_from: number;
|
|
658
|
-
range_to: number;
|
|
659
|
-
valid_from: string;
|
|
660
|
-
valid_to: string;
|
|
661
|
-
environment: string;
|
|
662
|
-
is_active: boolean;
|
|
663
|
-
}[];
|
|
664
|
-
has_more: boolean;
|
|
665
|
-
next_cursor: string | null;
|
|
666
|
-
}, {
|
|
667
|
-
data: {
|
|
668
|
-
object: "numbering_resolution";
|
|
669
|
-
id: string;
|
|
670
|
-
livemode: boolean;
|
|
671
|
-
created_at: string;
|
|
672
|
-
updated_at: string;
|
|
673
|
-
resolution_number: string;
|
|
674
|
-
prefix: string;
|
|
675
|
-
document_type: string;
|
|
676
|
-
range_from: number;
|
|
677
|
-
range_to: number;
|
|
678
|
-
valid_from: string;
|
|
679
|
-
valid_to: string;
|
|
680
|
-
environment: string;
|
|
681
|
-
is_active: boolean;
|
|
682
|
-
}[];
|
|
683
|
-
has_more: boolean;
|
|
684
|
-
next_cursor: string | null;
|
|
685
|
-
}>;
|
|
299
|
+
}, z.core.$strip>;
|
|
686
300
|
|
|
687
301
|
/**
|
|
688
302
|
* certificates.ts — OpenAPI path registrations for the certificates resource.
|
|
@@ -720,52 +334,12 @@ declare const CertificateResponseSchema: z.ZodObject<{
|
|
|
720
334
|
deleted_at: z.ZodNullable<z.ZodString>;
|
|
721
335
|
created_at: z.ZodString;
|
|
722
336
|
updated_at: z.ZodString;
|
|
723
|
-
},
|
|
724
|
-
object: "certificate";
|
|
725
|
-
id: string;
|
|
726
|
-
livemode: boolean;
|
|
727
|
-
deleted: boolean;
|
|
728
|
-
deleted_at: string | null;
|
|
729
|
-
created_at: string;
|
|
730
|
-
updated_at: string;
|
|
731
|
-
valid_from: string;
|
|
732
|
-
is_active: boolean;
|
|
733
|
-
filename: string;
|
|
734
|
-
subject_dn: string;
|
|
735
|
-
issuer_dn: string;
|
|
736
|
-
serial_number: string;
|
|
737
|
-
fingerprint_sha256: string;
|
|
738
|
-
valid_until: string;
|
|
739
|
-
}, {
|
|
740
|
-
object: "certificate";
|
|
741
|
-
id: string;
|
|
742
|
-
livemode: boolean;
|
|
743
|
-
deleted: boolean;
|
|
744
|
-
deleted_at: string | null;
|
|
745
|
-
created_at: string;
|
|
746
|
-
updated_at: string;
|
|
747
|
-
valid_from: string;
|
|
748
|
-
is_active: boolean;
|
|
749
|
-
filename: string;
|
|
750
|
-
subject_dn: string;
|
|
751
|
-
issuer_dn: string;
|
|
752
|
-
serial_number: string;
|
|
753
|
-
fingerprint_sha256: string;
|
|
754
|
-
valid_until: string;
|
|
755
|
-
}>;
|
|
337
|
+
}, z.core.$strip>;
|
|
756
338
|
declare const CreateCertificateRequestSchema: z.ZodObject<{
|
|
757
339
|
filename: z.ZodString;
|
|
758
340
|
content_base64: z.ZodString;
|
|
759
341
|
password: z.ZodString;
|
|
760
|
-
},
|
|
761
|
-
password: string;
|
|
762
|
-
filename: string;
|
|
763
|
-
content_base64: string;
|
|
764
|
-
}, {
|
|
765
|
-
password: string;
|
|
766
|
-
filename: string;
|
|
767
|
-
content_base64: string;
|
|
768
|
-
}>;
|
|
342
|
+
}, z.core.$strip>;
|
|
769
343
|
declare const CertificateListResponseSchema: z.ZodObject<{
|
|
770
344
|
data: z.ZodArray<z.ZodObject<{
|
|
771
345
|
id: z.ZodString;
|
|
@@ -783,91 +357,28 @@ declare const CertificateListResponseSchema: z.ZodObject<{
|
|
|
783
357
|
deleted_at: z.ZodNullable<z.ZodString>;
|
|
784
358
|
created_at: z.ZodString;
|
|
785
359
|
updated_at: z.ZodString;
|
|
786
|
-
},
|
|
787
|
-
object: "certificate";
|
|
788
|
-
id: string;
|
|
789
|
-
livemode: boolean;
|
|
790
|
-
deleted: boolean;
|
|
791
|
-
deleted_at: string | null;
|
|
792
|
-
created_at: string;
|
|
793
|
-
updated_at: string;
|
|
794
|
-
valid_from: string;
|
|
795
|
-
is_active: boolean;
|
|
796
|
-
filename: string;
|
|
797
|
-
subject_dn: string;
|
|
798
|
-
issuer_dn: string;
|
|
799
|
-
serial_number: string;
|
|
800
|
-
fingerprint_sha256: string;
|
|
801
|
-
valid_until: string;
|
|
802
|
-
}, {
|
|
803
|
-
object: "certificate";
|
|
804
|
-
id: string;
|
|
805
|
-
livemode: boolean;
|
|
806
|
-
deleted: boolean;
|
|
807
|
-
deleted_at: string | null;
|
|
808
|
-
created_at: string;
|
|
809
|
-
updated_at: string;
|
|
810
|
-
valid_from: string;
|
|
811
|
-
is_active: boolean;
|
|
812
|
-
filename: string;
|
|
813
|
-
subject_dn: string;
|
|
814
|
-
issuer_dn: string;
|
|
815
|
-
serial_number: string;
|
|
816
|
-
fingerprint_sha256: string;
|
|
817
|
-
valid_until: string;
|
|
818
|
-
}>, "many">;
|
|
360
|
+
}, z.core.$strip>>;
|
|
819
361
|
has_more: z.ZodBoolean;
|
|
820
362
|
next_cursor: z.ZodNullable<z.ZodString>;
|
|
821
|
-
},
|
|
822
|
-
data: {
|
|
823
|
-
object: "certificate";
|
|
824
|
-
id: string;
|
|
825
|
-
livemode: boolean;
|
|
826
|
-
deleted: boolean;
|
|
827
|
-
deleted_at: string | null;
|
|
828
|
-
created_at: string;
|
|
829
|
-
updated_at: string;
|
|
830
|
-
valid_from: string;
|
|
831
|
-
is_active: boolean;
|
|
832
|
-
filename: string;
|
|
833
|
-
subject_dn: string;
|
|
834
|
-
issuer_dn: string;
|
|
835
|
-
serial_number: string;
|
|
836
|
-
fingerprint_sha256: string;
|
|
837
|
-
valid_until: string;
|
|
838
|
-
}[];
|
|
839
|
-
has_more: boolean;
|
|
840
|
-
next_cursor: string | null;
|
|
841
|
-
}, {
|
|
842
|
-
data: {
|
|
843
|
-
object: "certificate";
|
|
844
|
-
id: string;
|
|
845
|
-
livemode: boolean;
|
|
846
|
-
deleted: boolean;
|
|
847
|
-
deleted_at: string | null;
|
|
848
|
-
created_at: string;
|
|
849
|
-
updated_at: string;
|
|
850
|
-
valid_from: string;
|
|
851
|
-
is_active: boolean;
|
|
852
|
-
filename: string;
|
|
853
|
-
subject_dn: string;
|
|
854
|
-
issuer_dn: string;
|
|
855
|
-
serial_number: string;
|
|
856
|
-
fingerprint_sha256: string;
|
|
857
|
-
valid_until: string;
|
|
858
|
-
}[];
|
|
859
|
-
has_more: boolean;
|
|
860
|
-
next_cursor: string | null;
|
|
861
|
-
}>;
|
|
363
|
+
}, z.core.$strip>;
|
|
862
364
|
|
|
863
365
|
declare const CreateCreditNoteRequestSchema: z.ZodObject<{
|
|
864
366
|
reference_invoice_id: z.ZodString;
|
|
865
367
|
customer_id: z.ZodString;
|
|
866
368
|
prefix: z.ZodDefault<z.ZodString>;
|
|
867
|
-
discrepancy_response_code: z.ZodEnum<
|
|
369
|
+
discrepancy_response_code: z.ZodEnum<{
|
|
370
|
+
1: "1";
|
|
371
|
+
2: "2";
|
|
372
|
+
3: "3";
|
|
373
|
+
4: "4";
|
|
374
|
+
5: "5";
|
|
375
|
+
}>;
|
|
868
376
|
discrepancy_description: z.ZodOptional<z.ZodString>;
|
|
869
|
-
|
|
870
|
-
|
|
377
|
+
issue_date: z.ZodOptional<z.ZodString>;
|
|
378
|
+
currency: z.ZodDefault<z.ZodEnum<{
|
|
379
|
+
COP: "COP";
|
|
380
|
+
}>>;
|
|
381
|
+
notes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
871
382
|
lines: z.ZodArray<z.ZodObject<{
|
|
872
383
|
description: z.ZodString;
|
|
873
384
|
sku: z.ZodOptional<z.ZodString>;
|
|
@@ -875,102 +386,31 @@ declare const CreateCreditNoteRequestSchema: z.ZodObject<{
|
|
|
875
386
|
unit_code: z.ZodDefault<z.ZodString>;
|
|
876
387
|
unit_price: z.ZodString;
|
|
877
388
|
line_extension_amount: z.ZodString;
|
|
389
|
+
allowance_amount: z.ZodOptional<z.ZodString>;
|
|
390
|
+
charge_amount: z.ZodOptional<z.ZodString>;
|
|
878
391
|
taxes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
879
392
|
code: z.ZodString;
|
|
880
393
|
rate: z.ZodString;
|
|
881
394
|
base: z.ZodString;
|
|
882
395
|
value: z.ZodString;
|
|
883
|
-
},
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
rate: string;
|
|
887
|
-
base: string;
|
|
888
|
-
}, {
|
|
889
|
-
code: string;
|
|
890
|
-
value: string;
|
|
891
|
-
rate: string;
|
|
892
|
-
base: string;
|
|
893
|
-
}>, "many">>;
|
|
894
|
-
}, "strip", z.ZodTypeAny, {
|
|
895
|
-
description: string;
|
|
896
|
-
quantity: string;
|
|
897
|
-
unit_code: string;
|
|
898
|
-
unit_price: string;
|
|
899
|
-
line_extension_amount: string;
|
|
900
|
-
taxes: {
|
|
901
|
-
code: string;
|
|
902
|
-
value: string;
|
|
903
|
-
rate: string;
|
|
904
|
-
base: string;
|
|
905
|
-
}[];
|
|
906
|
-
sku?: string | undefined;
|
|
907
|
-
}, {
|
|
908
|
-
description: string;
|
|
909
|
-
quantity: string;
|
|
910
|
-
unit_price: string;
|
|
911
|
-
line_extension_amount: string;
|
|
912
|
-
sku?: string | undefined;
|
|
913
|
-
unit_code?: string | undefined;
|
|
914
|
-
taxes?: {
|
|
915
|
-
code: string;
|
|
916
|
-
value: string;
|
|
917
|
-
rate: string;
|
|
918
|
-
base: string;
|
|
919
|
-
}[] | undefined;
|
|
920
|
-
}>, "many">;
|
|
396
|
+
}, z.core.$strip>>>;
|
|
397
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
398
|
+
}, z.core.$strip>>;
|
|
921
399
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
922
|
-
},
|
|
923
|
-
prefix: string;
|
|
924
|
-
customer_id: string;
|
|
925
|
-
currency: "COP";
|
|
926
|
-
lines: {
|
|
927
|
-
description: string;
|
|
928
|
-
quantity: string;
|
|
929
|
-
unit_code: string;
|
|
930
|
-
unit_price: string;
|
|
931
|
-
line_extension_amount: string;
|
|
932
|
-
taxes: {
|
|
933
|
-
code: string;
|
|
934
|
-
value: string;
|
|
935
|
-
rate: string;
|
|
936
|
-
base: string;
|
|
937
|
-
}[];
|
|
938
|
-
sku?: string | undefined;
|
|
939
|
-
}[];
|
|
940
|
-
reference_invoice_id: string;
|
|
941
|
-
discrepancy_response_code: "1" | "2" | "3" | "4" | "5";
|
|
942
|
-
metadata?: Record<string, unknown> | undefined;
|
|
943
|
-
notes?: string[] | undefined;
|
|
944
|
-
discrepancy_description?: string | undefined;
|
|
945
|
-
}, {
|
|
946
|
-
customer_id: string;
|
|
947
|
-
lines: {
|
|
948
|
-
description: string;
|
|
949
|
-
quantity: string;
|
|
950
|
-
unit_price: string;
|
|
951
|
-
line_extension_amount: string;
|
|
952
|
-
sku?: string | undefined;
|
|
953
|
-
unit_code?: string | undefined;
|
|
954
|
-
taxes?: {
|
|
955
|
-
code: string;
|
|
956
|
-
value: string;
|
|
957
|
-
rate: string;
|
|
958
|
-
base: string;
|
|
959
|
-
}[] | undefined;
|
|
960
|
-
}[];
|
|
961
|
-
reference_invoice_id: string;
|
|
962
|
-
discrepancy_response_code: "1" | "2" | "3" | "4" | "5";
|
|
963
|
-
metadata?: Record<string, unknown> | undefined;
|
|
964
|
-
prefix?: string | undefined;
|
|
965
|
-
currency?: "COP" | undefined;
|
|
966
|
-
notes?: string[] | undefined;
|
|
967
|
-
discrepancy_description?: string | undefined;
|
|
968
|
-
}>;
|
|
400
|
+
}, z.core.$strip>;
|
|
969
401
|
declare const CreditNoteResponseSchema: z.ZodObject<{
|
|
970
402
|
id: z.ZodString;
|
|
971
403
|
object: z.ZodLiteral<"credit_note">;
|
|
972
404
|
livemode: z.ZodBoolean;
|
|
973
|
-
status: z.ZodEnum<
|
|
405
|
+
status: z.ZodEnum<{
|
|
406
|
+
processing: "processing";
|
|
407
|
+
draft: "draft";
|
|
408
|
+
signed: "signed";
|
|
409
|
+
accepted_by_dian: "accepted_by_dian";
|
|
410
|
+
rejected_by_dian: "rejected_by_dian";
|
|
411
|
+
accepted_contingency: "accepted_contingency";
|
|
412
|
+
failed: "failed";
|
|
413
|
+
}>;
|
|
974
414
|
full_number: z.ZodString;
|
|
975
415
|
cude: z.ZodNullable<z.ZodString>;
|
|
976
416
|
reference_invoice_id: z.ZodString;
|
|
@@ -986,52 +426,20 @@ declare const CreditNoteResponseSchema: z.ZodObject<{
|
|
|
986
426
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
987
427
|
created_at: z.ZodString;
|
|
988
428
|
updated_at: z.ZodString;
|
|
989
|
-
},
|
|
990
|
-
object: "credit_note";
|
|
991
|
-
id: string;
|
|
992
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
993
|
-
livemode: boolean;
|
|
994
|
-
metadata: Record<string, unknown>;
|
|
995
|
-
created_at: string;
|
|
996
|
-
updated_at: string;
|
|
997
|
-
prefix: string;
|
|
998
|
-
environment: string;
|
|
999
|
-
full_number: string;
|
|
1000
|
-
customer_id: string;
|
|
1001
|
-
numbering_resolution_id: string;
|
|
1002
|
-
issue_date: string;
|
|
1003
|
-
currency_code: string;
|
|
1004
|
-
payable_amount: string;
|
|
1005
|
-
reference_invoice_id: string;
|
|
1006
|
-
discrepancy_response_code: string;
|
|
1007
|
-
discrepancy_description: string | null;
|
|
1008
|
-
cude: string | null;
|
|
1009
|
-
}, {
|
|
1010
|
-
object: "credit_note";
|
|
1011
|
-
id: string;
|
|
1012
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
1013
|
-
livemode: boolean;
|
|
1014
|
-
metadata: Record<string, unknown>;
|
|
1015
|
-
created_at: string;
|
|
1016
|
-
updated_at: string;
|
|
1017
|
-
prefix: string;
|
|
1018
|
-
environment: string;
|
|
1019
|
-
full_number: string;
|
|
1020
|
-
customer_id: string;
|
|
1021
|
-
numbering_resolution_id: string;
|
|
1022
|
-
issue_date: string;
|
|
1023
|
-
currency_code: string;
|
|
1024
|
-
payable_amount: string;
|
|
1025
|
-
reference_invoice_id: string;
|
|
1026
|
-
discrepancy_response_code: string;
|
|
1027
|
-
discrepancy_description: string | null;
|
|
1028
|
-
cude: string | null;
|
|
1029
|
-
}>;
|
|
429
|
+
}, z.core.$strip>;
|
|
1030
430
|
declare const CreditNoteDetailResponseSchema: z.ZodObject<{
|
|
1031
431
|
id: z.ZodString;
|
|
1032
432
|
object: z.ZodLiteral<"credit_note">;
|
|
1033
433
|
livemode: z.ZodBoolean;
|
|
1034
|
-
status: z.ZodEnum<
|
|
434
|
+
status: z.ZodEnum<{
|
|
435
|
+
processing: "processing";
|
|
436
|
+
draft: "draft";
|
|
437
|
+
signed: "signed";
|
|
438
|
+
accepted_by_dian: "accepted_by_dian";
|
|
439
|
+
rejected_by_dian: "rejected_by_dian";
|
|
440
|
+
accepted_contingency: "accepted_contingency";
|
|
441
|
+
failed: "failed";
|
|
442
|
+
}>;
|
|
1035
443
|
full_number: z.ZodString;
|
|
1036
444
|
cude: z.ZodNullable<z.ZodString>;
|
|
1037
445
|
reference_invoice_id: z.ZodString;
|
|
@@ -1047,7 +455,6 @@ declare const CreditNoteDetailResponseSchema: z.ZodObject<{
|
|
|
1047
455
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1048
456
|
created_at: z.ZodString;
|
|
1049
457
|
updated_at: z.ZodString;
|
|
1050
|
-
} & {
|
|
1051
458
|
dian_response: z.ZodNullable<z.ZodObject<{
|
|
1052
459
|
track_id: z.ZodNullable<z.ZodString>;
|
|
1053
460
|
status_code: z.ZodNullable<z.ZodString>;
|
|
@@ -1057,138 +464,32 @@ declare const CreditNoteDetailResponseSchema: z.ZodObject<{
|
|
|
1057
464
|
errors: z.ZodArray<z.ZodObject<{
|
|
1058
465
|
code: z.ZodString;
|
|
1059
466
|
message: z.ZodString;
|
|
1060
|
-
},
|
|
1061
|
-
code: string;
|
|
1062
|
-
message: string;
|
|
1063
|
-
}, {
|
|
1064
|
-
code: string;
|
|
1065
|
-
message: string;
|
|
1066
|
-
}>, "many">;
|
|
467
|
+
}, z.core.$strip>>;
|
|
1067
468
|
warnings: z.ZodArray<z.ZodObject<{
|
|
1068
469
|
code: z.ZodString;
|
|
1069
470
|
message: z.ZodString;
|
|
1070
|
-
},
|
|
1071
|
-
|
|
1072
|
-
message: string;
|
|
1073
|
-
}, {
|
|
1074
|
-
code: string;
|
|
1075
|
-
message: string;
|
|
1076
|
-
}>, "many">;
|
|
1077
|
-
}, "strip", z.ZodTypeAny, {
|
|
1078
|
-
errors: {
|
|
1079
|
-
code: string;
|
|
1080
|
-
message: string;
|
|
1081
|
-
}[];
|
|
1082
|
-
track_id: string | null;
|
|
1083
|
-
status_code: string | null;
|
|
1084
|
-
status_description: string | null;
|
|
1085
|
-
is_valid: boolean;
|
|
1086
|
-
validated_at: string | null;
|
|
1087
|
-
warnings: {
|
|
1088
|
-
code: string;
|
|
1089
|
-
message: string;
|
|
1090
|
-
}[];
|
|
1091
|
-
}, {
|
|
1092
|
-
errors: {
|
|
1093
|
-
code: string;
|
|
1094
|
-
message: string;
|
|
1095
|
-
}[];
|
|
1096
|
-
track_id: string | null;
|
|
1097
|
-
status_code: string | null;
|
|
1098
|
-
status_description: string | null;
|
|
1099
|
-
is_valid: boolean;
|
|
1100
|
-
validated_at: string | null;
|
|
1101
|
-
warnings: {
|
|
1102
|
-
code: string;
|
|
1103
|
-
message: string;
|
|
1104
|
-
}[];
|
|
1105
|
-
}>>;
|
|
471
|
+
}, z.core.$strip>>;
|
|
472
|
+
}, z.core.$strip>>;
|
|
1106
473
|
has_xml: z.ZodBoolean;
|
|
1107
474
|
has_pdf: z.ZodBoolean;
|
|
1108
475
|
qr_url: z.ZodNullable<z.ZodString>;
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
1113
|
-
livemode: boolean;
|
|
1114
|
-
metadata: Record<string, unknown>;
|
|
1115
|
-
created_at: string;
|
|
1116
|
-
updated_at: string;
|
|
1117
|
-
prefix: string;
|
|
1118
|
-
environment: string;
|
|
1119
|
-
full_number: string;
|
|
1120
|
-
customer_id: string;
|
|
1121
|
-
numbering_resolution_id: string;
|
|
1122
|
-
issue_date: string;
|
|
1123
|
-
currency_code: string;
|
|
1124
|
-
payable_amount: string;
|
|
1125
|
-
dian_response: {
|
|
1126
|
-
errors: {
|
|
1127
|
-
code: string;
|
|
1128
|
-
message: string;
|
|
1129
|
-
}[];
|
|
1130
|
-
track_id: string | null;
|
|
1131
|
-
status_code: string | null;
|
|
1132
|
-
status_description: string | null;
|
|
1133
|
-
is_valid: boolean;
|
|
1134
|
-
validated_at: string | null;
|
|
1135
|
-
warnings: {
|
|
1136
|
-
code: string;
|
|
1137
|
-
message: string;
|
|
1138
|
-
}[];
|
|
1139
|
-
} | null;
|
|
1140
|
-
has_xml: boolean;
|
|
1141
|
-
has_pdf: boolean;
|
|
1142
|
-
qr_url: string | null;
|
|
1143
|
-
reference_invoice_id: string;
|
|
1144
|
-
discrepancy_response_code: string;
|
|
1145
|
-
discrepancy_description: string | null;
|
|
1146
|
-
cude: string | null;
|
|
1147
|
-
}, {
|
|
1148
|
-
object: "credit_note";
|
|
1149
|
-
id: string;
|
|
1150
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
1151
|
-
livemode: boolean;
|
|
1152
|
-
metadata: Record<string, unknown>;
|
|
1153
|
-
created_at: string;
|
|
1154
|
-
updated_at: string;
|
|
1155
|
-
prefix: string;
|
|
1156
|
-
environment: string;
|
|
1157
|
-
full_number: string;
|
|
1158
|
-
customer_id: string;
|
|
1159
|
-
numbering_resolution_id: string;
|
|
1160
|
-
issue_date: string;
|
|
1161
|
-
currency_code: string;
|
|
1162
|
-
payable_amount: string;
|
|
1163
|
-
dian_response: {
|
|
1164
|
-
errors: {
|
|
1165
|
-
code: string;
|
|
1166
|
-
message: string;
|
|
1167
|
-
}[];
|
|
1168
|
-
track_id: string | null;
|
|
1169
|
-
status_code: string | null;
|
|
1170
|
-
status_description: string | null;
|
|
1171
|
-
is_valid: boolean;
|
|
1172
|
-
validated_at: string | null;
|
|
1173
|
-
warnings: {
|
|
1174
|
-
code: string;
|
|
1175
|
-
message: string;
|
|
1176
|
-
}[];
|
|
1177
|
-
} | null;
|
|
1178
|
-
has_xml: boolean;
|
|
1179
|
-
has_pdf: boolean;
|
|
1180
|
-
qr_url: string | null;
|
|
1181
|
-
reference_invoice_id: string;
|
|
1182
|
-
discrepancy_response_code: string;
|
|
1183
|
-
discrepancy_description: string | null;
|
|
1184
|
-
cude: string | null;
|
|
1185
|
-
}>;
|
|
476
|
+
failure_reason: z.ZodNullable<z.ZodString>;
|
|
477
|
+
dian_confirmation_pending: z.ZodBoolean;
|
|
478
|
+
}, z.core.$strip>;
|
|
1186
479
|
declare const CreditNoteListResponseSchema: z.ZodObject<{
|
|
1187
480
|
data: z.ZodArray<z.ZodObject<{
|
|
1188
481
|
id: z.ZodString;
|
|
1189
482
|
object: z.ZodLiteral<"credit_note">;
|
|
1190
483
|
livemode: z.ZodBoolean;
|
|
1191
|
-
status: z.ZodEnum<
|
|
484
|
+
status: z.ZodEnum<{
|
|
485
|
+
processing: "processing";
|
|
486
|
+
draft: "draft";
|
|
487
|
+
signed: "signed";
|
|
488
|
+
accepted_by_dian: "accepted_by_dian";
|
|
489
|
+
rejected_by_dian: "rejected_by_dian";
|
|
490
|
+
accepted_contingency: "accepted_contingency";
|
|
491
|
+
failed: "failed";
|
|
492
|
+
}>;
|
|
1192
493
|
full_number: z.ZodString;
|
|
1193
494
|
cude: z.ZodNullable<z.ZodString>;
|
|
1194
495
|
reference_invoice_id: z.ZodString;
|
|
@@ -1204,7 +505,6 @@ declare const CreditNoteListResponseSchema: z.ZodObject<{
|
|
|
1204
505
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1205
506
|
created_at: z.ZodString;
|
|
1206
507
|
updated_at: z.ZodString;
|
|
1207
|
-
} & {
|
|
1208
508
|
dian_response: z.ZodNullable<z.ZodObject<{
|
|
1209
509
|
track_id: z.ZodNullable<z.ZodString>;
|
|
1210
510
|
status_code: z.ZodNullable<z.ZodString>;
|
|
@@ -1214,228 +514,38 @@ declare const CreditNoteListResponseSchema: z.ZodObject<{
|
|
|
1214
514
|
errors: z.ZodArray<z.ZodObject<{
|
|
1215
515
|
code: z.ZodString;
|
|
1216
516
|
message: z.ZodString;
|
|
1217
|
-
},
|
|
1218
|
-
code: string;
|
|
1219
|
-
message: string;
|
|
1220
|
-
}, {
|
|
1221
|
-
code: string;
|
|
1222
|
-
message: string;
|
|
1223
|
-
}>, "many">;
|
|
517
|
+
}, z.core.$strip>>;
|
|
1224
518
|
warnings: z.ZodArray<z.ZodObject<{
|
|
1225
519
|
code: z.ZodString;
|
|
1226
520
|
message: z.ZodString;
|
|
1227
|
-
},
|
|
1228
|
-
|
|
1229
|
-
message: string;
|
|
1230
|
-
}, {
|
|
1231
|
-
code: string;
|
|
1232
|
-
message: string;
|
|
1233
|
-
}>, "many">;
|
|
1234
|
-
}, "strip", z.ZodTypeAny, {
|
|
1235
|
-
errors: {
|
|
1236
|
-
code: string;
|
|
1237
|
-
message: string;
|
|
1238
|
-
}[];
|
|
1239
|
-
track_id: string | null;
|
|
1240
|
-
status_code: string | null;
|
|
1241
|
-
status_description: string | null;
|
|
1242
|
-
is_valid: boolean;
|
|
1243
|
-
validated_at: string | null;
|
|
1244
|
-
warnings: {
|
|
1245
|
-
code: string;
|
|
1246
|
-
message: string;
|
|
1247
|
-
}[];
|
|
1248
|
-
}, {
|
|
1249
|
-
errors: {
|
|
1250
|
-
code: string;
|
|
1251
|
-
message: string;
|
|
1252
|
-
}[];
|
|
1253
|
-
track_id: string | null;
|
|
1254
|
-
status_code: string | null;
|
|
1255
|
-
status_description: string | null;
|
|
1256
|
-
is_valid: boolean;
|
|
1257
|
-
validated_at: string | null;
|
|
1258
|
-
warnings: {
|
|
1259
|
-
code: string;
|
|
1260
|
-
message: string;
|
|
1261
|
-
}[];
|
|
1262
|
-
}>>;
|
|
521
|
+
}, z.core.$strip>>;
|
|
522
|
+
}, z.core.$strip>>;
|
|
1263
523
|
has_xml: z.ZodBoolean;
|
|
1264
524
|
has_pdf: z.ZodBoolean;
|
|
1265
525
|
qr_url: z.ZodNullable<z.ZodString>;
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
1270
|
-
livemode: boolean;
|
|
1271
|
-
metadata: Record<string, unknown>;
|
|
1272
|
-
created_at: string;
|
|
1273
|
-
updated_at: string;
|
|
1274
|
-
prefix: string;
|
|
1275
|
-
environment: string;
|
|
1276
|
-
full_number: string;
|
|
1277
|
-
customer_id: string;
|
|
1278
|
-
numbering_resolution_id: string;
|
|
1279
|
-
issue_date: string;
|
|
1280
|
-
currency_code: string;
|
|
1281
|
-
payable_amount: string;
|
|
1282
|
-
dian_response: {
|
|
1283
|
-
errors: {
|
|
1284
|
-
code: string;
|
|
1285
|
-
message: string;
|
|
1286
|
-
}[];
|
|
1287
|
-
track_id: string | null;
|
|
1288
|
-
status_code: string | null;
|
|
1289
|
-
status_description: string | null;
|
|
1290
|
-
is_valid: boolean;
|
|
1291
|
-
validated_at: string | null;
|
|
1292
|
-
warnings: {
|
|
1293
|
-
code: string;
|
|
1294
|
-
message: string;
|
|
1295
|
-
}[];
|
|
1296
|
-
} | null;
|
|
1297
|
-
has_xml: boolean;
|
|
1298
|
-
has_pdf: boolean;
|
|
1299
|
-
qr_url: string | null;
|
|
1300
|
-
reference_invoice_id: string;
|
|
1301
|
-
discrepancy_response_code: string;
|
|
1302
|
-
discrepancy_description: string | null;
|
|
1303
|
-
cude: string | null;
|
|
1304
|
-
}, {
|
|
1305
|
-
object: "credit_note";
|
|
1306
|
-
id: string;
|
|
1307
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
1308
|
-
livemode: boolean;
|
|
1309
|
-
metadata: Record<string, unknown>;
|
|
1310
|
-
created_at: string;
|
|
1311
|
-
updated_at: string;
|
|
1312
|
-
prefix: string;
|
|
1313
|
-
environment: string;
|
|
1314
|
-
full_number: string;
|
|
1315
|
-
customer_id: string;
|
|
1316
|
-
numbering_resolution_id: string;
|
|
1317
|
-
issue_date: string;
|
|
1318
|
-
currency_code: string;
|
|
1319
|
-
payable_amount: string;
|
|
1320
|
-
dian_response: {
|
|
1321
|
-
errors: {
|
|
1322
|
-
code: string;
|
|
1323
|
-
message: string;
|
|
1324
|
-
}[];
|
|
1325
|
-
track_id: string | null;
|
|
1326
|
-
status_code: string | null;
|
|
1327
|
-
status_description: string | null;
|
|
1328
|
-
is_valid: boolean;
|
|
1329
|
-
validated_at: string | null;
|
|
1330
|
-
warnings: {
|
|
1331
|
-
code: string;
|
|
1332
|
-
message: string;
|
|
1333
|
-
}[];
|
|
1334
|
-
} | null;
|
|
1335
|
-
has_xml: boolean;
|
|
1336
|
-
has_pdf: boolean;
|
|
1337
|
-
qr_url: string | null;
|
|
1338
|
-
reference_invoice_id: string;
|
|
1339
|
-
discrepancy_response_code: string;
|
|
1340
|
-
discrepancy_description: string | null;
|
|
1341
|
-
cude: string | null;
|
|
1342
|
-
}>, "many">;
|
|
526
|
+
failure_reason: z.ZodNullable<z.ZodString>;
|
|
527
|
+
dian_confirmation_pending: z.ZodBoolean;
|
|
528
|
+
}, z.core.$strip>>;
|
|
1343
529
|
has_more: z.ZodBoolean;
|
|
1344
530
|
next_cursor: z.ZodNullable<z.ZodString>;
|
|
1345
|
-
},
|
|
1346
|
-
data: {
|
|
1347
|
-
object: "credit_note";
|
|
1348
|
-
id: string;
|
|
1349
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
1350
|
-
livemode: boolean;
|
|
1351
|
-
metadata: Record<string, unknown>;
|
|
1352
|
-
created_at: string;
|
|
1353
|
-
updated_at: string;
|
|
1354
|
-
prefix: string;
|
|
1355
|
-
environment: string;
|
|
1356
|
-
full_number: string;
|
|
1357
|
-
customer_id: string;
|
|
1358
|
-
numbering_resolution_id: string;
|
|
1359
|
-
issue_date: string;
|
|
1360
|
-
currency_code: string;
|
|
1361
|
-
payable_amount: string;
|
|
1362
|
-
dian_response: {
|
|
1363
|
-
errors: {
|
|
1364
|
-
code: string;
|
|
1365
|
-
message: string;
|
|
1366
|
-
}[];
|
|
1367
|
-
track_id: string | null;
|
|
1368
|
-
status_code: string | null;
|
|
1369
|
-
status_description: string | null;
|
|
1370
|
-
is_valid: boolean;
|
|
1371
|
-
validated_at: string | null;
|
|
1372
|
-
warnings: {
|
|
1373
|
-
code: string;
|
|
1374
|
-
message: string;
|
|
1375
|
-
}[];
|
|
1376
|
-
} | null;
|
|
1377
|
-
has_xml: boolean;
|
|
1378
|
-
has_pdf: boolean;
|
|
1379
|
-
qr_url: string | null;
|
|
1380
|
-
reference_invoice_id: string;
|
|
1381
|
-
discrepancy_response_code: string;
|
|
1382
|
-
discrepancy_description: string | null;
|
|
1383
|
-
cude: string | null;
|
|
1384
|
-
}[];
|
|
1385
|
-
has_more: boolean;
|
|
1386
|
-
next_cursor: string | null;
|
|
1387
|
-
}, {
|
|
1388
|
-
data: {
|
|
1389
|
-
object: "credit_note";
|
|
1390
|
-
id: string;
|
|
1391
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
1392
|
-
livemode: boolean;
|
|
1393
|
-
metadata: Record<string, unknown>;
|
|
1394
|
-
created_at: string;
|
|
1395
|
-
updated_at: string;
|
|
1396
|
-
prefix: string;
|
|
1397
|
-
environment: string;
|
|
1398
|
-
full_number: string;
|
|
1399
|
-
customer_id: string;
|
|
1400
|
-
numbering_resolution_id: string;
|
|
1401
|
-
issue_date: string;
|
|
1402
|
-
currency_code: string;
|
|
1403
|
-
payable_amount: string;
|
|
1404
|
-
dian_response: {
|
|
1405
|
-
errors: {
|
|
1406
|
-
code: string;
|
|
1407
|
-
message: string;
|
|
1408
|
-
}[];
|
|
1409
|
-
track_id: string | null;
|
|
1410
|
-
status_code: string | null;
|
|
1411
|
-
status_description: string | null;
|
|
1412
|
-
is_valid: boolean;
|
|
1413
|
-
validated_at: string | null;
|
|
1414
|
-
warnings: {
|
|
1415
|
-
code: string;
|
|
1416
|
-
message: string;
|
|
1417
|
-
}[];
|
|
1418
|
-
} | null;
|
|
1419
|
-
has_xml: boolean;
|
|
1420
|
-
has_pdf: boolean;
|
|
1421
|
-
qr_url: string | null;
|
|
1422
|
-
reference_invoice_id: string;
|
|
1423
|
-
discrepancy_response_code: string;
|
|
1424
|
-
discrepancy_description: string | null;
|
|
1425
|
-
cude: string | null;
|
|
1426
|
-
}[];
|
|
1427
|
-
has_more: boolean;
|
|
1428
|
-
next_cursor: string | null;
|
|
1429
|
-
}>;
|
|
531
|
+
}, z.core.$strip>;
|
|
1430
532
|
|
|
1431
533
|
declare const CreateDebitNoteRequestSchema: z.ZodObject<{
|
|
1432
534
|
reference_invoice_id: z.ZodString;
|
|
1433
535
|
customer_id: z.ZodString;
|
|
1434
536
|
prefix: z.ZodDefault<z.ZodString>;
|
|
1435
|
-
discrepancy_response_code: z.ZodEnum<
|
|
537
|
+
discrepancy_response_code: z.ZodEnum<{
|
|
538
|
+
1: "1";
|
|
539
|
+
2: "2";
|
|
540
|
+
3: "3";
|
|
541
|
+
4: "4";
|
|
542
|
+
}>;
|
|
1436
543
|
discrepancy_description: z.ZodOptional<z.ZodString>;
|
|
1437
|
-
|
|
1438
|
-
|
|
544
|
+
issue_date: z.ZodOptional<z.ZodString>;
|
|
545
|
+
currency: z.ZodDefault<z.ZodEnum<{
|
|
546
|
+
COP: "COP";
|
|
547
|
+
}>>;
|
|
548
|
+
notes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1439
549
|
lines: z.ZodArray<z.ZodObject<{
|
|
1440
550
|
description: z.ZodString;
|
|
1441
551
|
sku: z.ZodOptional<z.ZodString>;
|
|
@@ -1443,102 +553,31 @@ declare const CreateDebitNoteRequestSchema: z.ZodObject<{
|
|
|
1443
553
|
unit_code: z.ZodDefault<z.ZodString>;
|
|
1444
554
|
unit_price: z.ZodString;
|
|
1445
555
|
line_extension_amount: z.ZodString;
|
|
556
|
+
allowance_amount: z.ZodOptional<z.ZodString>;
|
|
557
|
+
charge_amount: z.ZodOptional<z.ZodString>;
|
|
1446
558
|
taxes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1447
559
|
code: z.ZodString;
|
|
1448
560
|
rate: z.ZodString;
|
|
1449
561
|
base: z.ZodString;
|
|
1450
562
|
value: z.ZodString;
|
|
1451
|
-
},
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
rate: string;
|
|
1455
|
-
base: string;
|
|
1456
|
-
}, {
|
|
1457
|
-
code: string;
|
|
1458
|
-
value: string;
|
|
1459
|
-
rate: string;
|
|
1460
|
-
base: string;
|
|
1461
|
-
}>, "many">>;
|
|
1462
|
-
}, "strip", z.ZodTypeAny, {
|
|
1463
|
-
description: string;
|
|
1464
|
-
quantity: string;
|
|
1465
|
-
unit_code: string;
|
|
1466
|
-
unit_price: string;
|
|
1467
|
-
line_extension_amount: string;
|
|
1468
|
-
taxes: {
|
|
1469
|
-
code: string;
|
|
1470
|
-
value: string;
|
|
1471
|
-
rate: string;
|
|
1472
|
-
base: string;
|
|
1473
|
-
}[];
|
|
1474
|
-
sku?: string | undefined;
|
|
1475
|
-
}, {
|
|
1476
|
-
description: string;
|
|
1477
|
-
quantity: string;
|
|
1478
|
-
unit_price: string;
|
|
1479
|
-
line_extension_amount: string;
|
|
1480
|
-
sku?: string | undefined;
|
|
1481
|
-
unit_code?: string | undefined;
|
|
1482
|
-
taxes?: {
|
|
1483
|
-
code: string;
|
|
1484
|
-
value: string;
|
|
1485
|
-
rate: string;
|
|
1486
|
-
base: string;
|
|
1487
|
-
}[] | undefined;
|
|
1488
|
-
}>, "many">;
|
|
563
|
+
}, z.core.$strip>>>;
|
|
564
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
565
|
+
}, z.core.$strip>>;
|
|
1489
566
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1490
|
-
},
|
|
1491
|
-
prefix: string;
|
|
1492
|
-
customer_id: string;
|
|
1493
|
-
currency: "COP";
|
|
1494
|
-
lines: {
|
|
1495
|
-
description: string;
|
|
1496
|
-
quantity: string;
|
|
1497
|
-
unit_code: string;
|
|
1498
|
-
unit_price: string;
|
|
1499
|
-
line_extension_amount: string;
|
|
1500
|
-
taxes: {
|
|
1501
|
-
code: string;
|
|
1502
|
-
value: string;
|
|
1503
|
-
rate: string;
|
|
1504
|
-
base: string;
|
|
1505
|
-
}[];
|
|
1506
|
-
sku?: string | undefined;
|
|
1507
|
-
}[];
|
|
1508
|
-
reference_invoice_id: string;
|
|
1509
|
-
discrepancy_response_code: "1" | "2" | "3" | "4";
|
|
1510
|
-
metadata?: Record<string, unknown> | undefined;
|
|
1511
|
-
notes?: string[] | undefined;
|
|
1512
|
-
discrepancy_description?: string | undefined;
|
|
1513
|
-
}, {
|
|
1514
|
-
customer_id: string;
|
|
1515
|
-
lines: {
|
|
1516
|
-
description: string;
|
|
1517
|
-
quantity: string;
|
|
1518
|
-
unit_price: string;
|
|
1519
|
-
line_extension_amount: string;
|
|
1520
|
-
sku?: string | undefined;
|
|
1521
|
-
unit_code?: string | undefined;
|
|
1522
|
-
taxes?: {
|
|
1523
|
-
code: string;
|
|
1524
|
-
value: string;
|
|
1525
|
-
rate: string;
|
|
1526
|
-
base: string;
|
|
1527
|
-
}[] | undefined;
|
|
1528
|
-
}[];
|
|
1529
|
-
reference_invoice_id: string;
|
|
1530
|
-
discrepancy_response_code: "1" | "2" | "3" | "4";
|
|
1531
|
-
metadata?: Record<string, unknown> | undefined;
|
|
1532
|
-
prefix?: string | undefined;
|
|
1533
|
-
currency?: "COP" | undefined;
|
|
1534
|
-
notes?: string[] | undefined;
|
|
1535
|
-
discrepancy_description?: string | undefined;
|
|
1536
|
-
}>;
|
|
567
|
+
}, z.core.$strip>;
|
|
1537
568
|
declare const DebitNoteResponseSchema: z.ZodObject<{
|
|
1538
569
|
id: z.ZodString;
|
|
1539
570
|
object: z.ZodLiteral<"debit_note">;
|
|
1540
571
|
livemode: z.ZodBoolean;
|
|
1541
|
-
status: z.ZodEnum<
|
|
572
|
+
status: z.ZodEnum<{
|
|
573
|
+
processing: "processing";
|
|
574
|
+
draft: "draft";
|
|
575
|
+
signed: "signed";
|
|
576
|
+
accepted_by_dian: "accepted_by_dian";
|
|
577
|
+
rejected_by_dian: "rejected_by_dian";
|
|
578
|
+
accepted_contingency: "accepted_contingency";
|
|
579
|
+
failed: "failed";
|
|
580
|
+
}>;
|
|
1542
581
|
full_number: z.ZodString;
|
|
1543
582
|
cude: z.ZodNullable<z.ZodString>;
|
|
1544
583
|
reference_invoice_id: z.ZodString;
|
|
@@ -1554,52 +593,20 @@ declare const DebitNoteResponseSchema: z.ZodObject<{
|
|
|
1554
593
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1555
594
|
created_at: z.ZodString;
|
|
1556
595
|
updated_at: z.ZodString;
|
|
1557
|
-
},
|
|
1558
|
-
object: "debit_note";
|
|
1559
|
-
id: string;
|
|
1560
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
1561
|
-
livemode: boolean;
|
|
1562
|
-
metadata: Record<string, unknown>;
|
|
1563
|
-
created_at: string;
|
|
1564
|
-
updated_at: string;
|
|
1565
|
-
prefix: string;
|
|
1566
|
-
environment: string;
|
|
1567
|
-
full_number: string;
|
|
1568
|
-
customer_id: string;
|
|
1569
|
-
numbering_resolution_id: string;
|
|
1570
|
-
issue_date: string;
|
|
1571
|
-
currency_code: string;
|
|
1572
|
-
payable_amount: string;
|
|
1573
|
-
reference_invoice_id: string;
|
|
1574
|
-
discrepancy_response_code: string;
|
|
1575
|
-
discrepancy_description: string | null;
|
|
1576
|
-
cude: string | null;
|
|
1577
|
-
}, {
|
|
1578
|
-
object: "debit_note";
|
|
1579
|
-
id: string;
|
|
1580
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
1581
|
-
livemode: boolean;
|
|
1582
|
-
metadata: Record<string, unknown>;
|
|
1583
|
-
created_at: string;
|
|
1584
|
-
updated_at: string;
|
|
1585
|
-
prefix: string;
|
|
1586
|
-
environment: string;
|
|
1587
|
-
full_number: string;
|
|
1588
|
-
customer_id: string;
|
|
1589
|
-
numbering_resolution_id: string;
|
|
1590
|
-
issue_date: string;
|
|
1591
|
-
currency_code: string;
|
|
1592
|
-
payable_amount: string;
|
|
1593
|
-
reference_invoice_id: string;
|
|
1594
|
-
discrepancy_response_code: string;
|
|
1595
|
-
discrepancy_description: string | null;
|
|
1596
|
-
cude: string | null;
|
|
1597
|
-
}>;
|
|
596
|
+
}, z.core.$strip>;
|
|
1598
597
|
declare const DebitNoteDetailResponseSchema: z.ZodObject<{
|
|
1599
598
|
id: z.ZodString;
|
|
1600
599
|
object: z.ZodLiteral<"debit_note">;
|
|
1601
600
|
livemode: z.ZodBoolean;
|
|
1602
|
-
status: z.ZodEnum<
|
|
601
|
+
status: z.ZodEnum<{
|
|
602
|
+
processing: "processing";
|
|
603
|
+
draft: "draft";
|
|
604
|
+
signed: "signed";
|
|
605
|
+
accepted_by_dian: "accepted_by_dian";
|
|
606
|
+
rejected_by_dian: "rejected_by_dian";
|
|
607
|
+
accepted_contingency: "accepted_contingency";
|
|
608
|
+
failed: "failed";
|
|
609
|
+
}>;
|
|
1603
610
|
full_number: z.ZodString;
|
|
1604
611
|
cude: z.ZodNullable<z.ZodString>;
|
|
1605
612
|
reference_invoice_id: z.ZodString;
|
|
@@ -1615,7 +622,6 @@ declare const DebitNoteDetailResponseSchema: z.ZodObject<{
|
|
|
1615
622
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1616
623
|
created_at: z.ZodString;
|
|
1617
624
|
updated_at: z.ZodString;
|
|
1618
|
-
} & {
|
|
1619
625
|
dian_response: z.ZodNullable<z.ZodObject<{
|
|
1620
626
|
track_id: z.ZodNullable<z.ZodString>;
|
|
1621
627
|
status_code: z.ZodNullable<z.ZodString>;
|
|
@@ -1625,138 +631,32 @@ declare const DebitNoteDetailResponseSchema: z.ZodObject<{
|
|
|
1625
631
|
errors: z.ZodArray<z.ZodObject<{
|
|
1626
632
|
code: z.ZodString;
|
|
1627
633
|
message: z.ZodString;
|
|
1628
|
-
},
|
|
1629
|
-
code: string;
|
|
1630
|
-
message: string;
|
|
1631
|
-
}, {
|
|
1632
|
-
code: string;
|
|
1633
|
-
message: string;
|
|
1634
|
-
}>, "many">;
|
|
634
|
+
}, z.core.$strip>>;
|
|
1635
635
|
warnings: z.ZodArray<z.ZodObject<{
|
|
1636
636
|
code: z.ZodString;
|
|
1637
637
|
message: z.ZodString;
|
|
1638
|
-
},
|
|
1639
|
-
|
|
1640
|
-
message: string;
|
|
1641
|
-
}, {
|
|
1642
|
-
code: string;
|
|
1643
|
-
message: string;
|
|
1644
|
-
}>, "many">;
|
|
1645
|
-
}, "strip", z.ZodTypeAny, {
|
|
1646
|
-
errors: {
|
|
1647
|
-
code: string;
|
|
1648
|
-
message: string;
|
|
1649
|
-
}[];
|
|
1650
|
-
track_id: string | null;
|
|
1651
|
-
status_code: string | null;
|
|
1652
|
-
status_description: string | null;
|
|
1653
|
-
is_valid: boolean;
|
|
1654
|
-
validated_at: string | null;
|
|
1655
|
-
warnings: {
|
|
1656
|
-
code: string;
|
|
1657
|
-
message: string;
|
|
1658
|
-
}[];
|
|
1659
|
-
}, {
|
|
1660
|
-
errors: {
|
|
1661
|
-
code: string;
|
|
1662
|
-
message: string;
|
|
1663
|
-
}[];
|
|
1664
|
-
track_id: string | null;
|
|
1665
|
-
status_code: string | null;
|
|
1666
|
-
status_description: string | null;
|
|
1667
|
-
is_valid: boolean;
|
|
1668
|
-
validated_at: string | null;
|
|
1669
|
-
warnings: {
|
|
1670
|
-
code: string;
|
|
1671
|
-
message: string;
|
|
1672
|
-
}[];
|
|
1673
|
-
}>>;
|
|
638
|
+
}, z.core.$strip>>;
|
|
639
|
+
}, z.core.$strip>>;
|
|
1674
640
|
has_xml: z.ZodBoolean;
|
|
1675
641
|
has_pdf: z.ZodBoolean;
|
|
1676
642
|
qr_url: z.ZodNullable<z.ZodString>;
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
1681
|
-
livemode: boolean;
|
|
1682
|
-
metadata: Record<string, unknown>;
|
|
1683
|
-
created_at: string;
|
|
1684
|
-
updated_at: string;
|
|
1685
|
-
prefix: string;
|
|
1686
|
-
environment: string;
|
|
1687
|
-
full_number: string;
|
|
1688
|
-
customer_id: string;
|
|
1689
|
-
numbering_resolution_id: string;
|
|
1690
|
-
issue_date: string;
|
|
1691
|
-
currency_code: string;
|
|
1692
|
-
payable_amount: string;
|
|
1693
|
-
dian_response: {
|
|
1694
|
-
errors: {
|
|
1695
|
-
code: string;
|
|
1696
|
-
message: string;
|
|
1697
|
-
}[];
|
|
1698
|
-
track_id: string | null;
|
|
1699
|
-
status_code: string | null;
|
|
1700
|
-
status_description: string | null;
|
|
1701
|
-
is_valid: boolean;
|
|
1702
|
-
validated_at: string | null;
|
|
1703
|
-
warnings: {
|
|
1704
|
-
code: string;
|
|
1705
|
-
message: string;
|
|
1706
|
-
}[];
|
|
1707
|
-
} | null;
|
|
1708
|
-
has_xml: boolean;
|
|
1709
|
-
has_pdf: boolean;
|
|
1710
|
-
qr_url: string | null;
|
|
1711
|
-
reference_invoice_id: string;
|
|
1712
|
-
discrepancy_response_code: string;
|
|
1713
|
-
discrepancy_description: string | null;
|
|
1714
|
-
cude: string | null;
|
|
1715
|
-
}, {
|
|
1716
|
-
object: "debit_note";
|
|
1717
|
-
id: string;
|
|
1718
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
1719
|
-
livemode: boolean;
|
|
1720
|
-
metadata: Record<string, unknown>;
|
|
1721
|
-
created_at: string;
|
|
1722
|
-
updated_at: string;
|
|
1723
|
-
prefix: string;
|
|
1724
|
-
environment: string;
|
|
1725
|
-
full_number: string;
|
|
1726
|
-
customer_id: string;
|
|
1727
|
-
numbering_resolution_id: string;
|
|
1728
|
-
issue_date: string;
|
|
1729
|
-
currency_code: string;
|
|
1730
|
-
payable_amount: string;
|
|
1731
|
-
dian_response: {
|
|
1732
|
-
errors: {
|
|
1733
|
-
code: string;
|
|
1734
|
-
message: string;
|
|
1735
|
-
}[];
|
|
1736
|
-
track_id: string | null;
|
|
1737
|
-
status_code: string | null;
|
|
1738
|
-
status_description: string | null;
|
|
1739
|
-
is_valid: boolean;
|
|
1740
|
-
validated_at: string | null;
|
|
1741
|
-
warnings: {
|
|
1742
|
-
code: string;
|
|
1743
|
-
message: string;
|
|
1744
|
-
}[];
|
|
1745
|
-
} | null;
|
|
1746
|
-
has_xml: boolean;
|
|
1747
|
-
has_pdf: boolean;
|
|
1748
|
-
qr_url: string | null;
|
|
1749
|
-
reference_invoice_id: string;
|
|
1750
|
-
discrepancy_response_code: string;
|
|
1751
|
-
discrepancy_description: string | null;
|
|
1752
|
-
cude: string | null;
|
|
1753
|
-
}>;
|
|
643
|
+
failure_reason: z.ZodNullable<z.ZodString>;
|
|
644
|
+
dian_confirmation_pending: z.ZodBoolean;
|
|
645
|
+
}, z.core.$strip>;
|
|
1754
646
|
declare const DebitNoteListResponseSchema: z.ZodObject<{
|
|
1755
647
|
data: z.ZodArray<z.ZodObject<{
|
|
1756
648
|
id: z.ZodString;
|
|
1757
649
|
object: z.ZodLiteral<"debit_note">;
|
|
1758
650
|
livemode: z.ZodBoolean;
|
|
1759
|
-
status: z.ZodEnum<
|
|
651
|
+
status: z.ZodEnum<{
|
|
652
|
+
processing: "processing";
|
|
653
|
+
draft: "draft";
|
|
654
|
+
signed: "signed";
|
|
655
|
+
accepted_by_dian: "accepted_by_dian";
|
|
656
|
+
rejected_by_dian: "rejected_by_dian";
|
|
657
|
+
accepted_contingency: "accepted_contingency";
|
|
658
|
+
failed: "failed";
|
|
659
|
+
}>;
|
|
1760
660
|
full_number: z.ZodString;
|
|
1761
661
|
cude: z.ZodNullable<z.ZodString>;
|
|
1762
662
|
reference_invoice_id: z.ZodString;
|
|
@@ -1772,7 +672,6 @@ declare const DebitNoteListResponseSchema: z.ZodObject<{
|
|
|
1772
672
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1773
673
|
created_at: z.ZodString;
|
|
1774
674
|
updated_at: z.ZodString;
|
|
1775
|
-
} & {
|
|
1776
675
|
dian_response: z.ZodNullable<z.ZodObject<{
|
|
1777
676
|
track_id: z.ZodNullable<z.ZodString>;
|
|
1778
677
|
status_code: z.ZodNullable<z.ZodString>;
|
|
@@ -1782,264 +681,36 @@ declare const DebitNoteListResponseSchema: z.ZodObject<{
|
|
|
1782
681
|
errors: z.ZodArray<z.ZodObject<{
|
|
1783
682
|
code: z.ZodString;
|
|
1784
683
|
message: z.ZodString;
|
|
1785
|
-
},
|
|
1786
|
-
code: string;
|
|
1787
|
-
message: string;
|
|
1788
|
-
}, {
|
|
1789
|
-
code: string;
|
|
1790
|
-
message: string;
|
|
1791
|
-
}>, "many">;
|
|
684
|
+
}, z.core.$strip>>;
|
|
1792
685
|
warnings: z.ZodArray<z.ZodObject<{
|
|
1793
686
|
code: z.ZodString;
|
|
1794
687
|
message: z.ZodString;
|
|
1795
|
-
},
|
|
1796
|
-
|
|
1797
|
-
message: string;
|
|
1798
|
-
}, {
|
|
1799
|
-
code: string;
|
|
1800
|
-
message: string;
|
|
1801
|
-
}>, "many">;
|
|
1802
|
-
}, "strip", z.ZodTypeAny, {
|
|
1803
|
-
errors: {
|
|
1804
|
-
code: string;
|
|
1805
|
-
message: string;
|
|
1806
|
-
}[];
|
|
1807
|
-
track_id: string | null;
|
|
1808
|
-
status_code: string | null;
|
|
1809
|
-
status_description: string | null;
|
|
1810
|
-
is_valid: boolean;
|
|
1811
|
-
validated_at: string | null;
|
|
1812
|
-
warnings: {
|
|
1813
|
-
code: string;
|
|
1814
|
-
message: string;
|
|
1815
|
-
}[];
|
|
1816
|
-
}, {
|
|
1817
|
-
errors: {
|
|
1818
|
-
code: string;
|
|
1819
|
-
message: string;
|
|
1820
|
-
}[];
|
|
1821
|
-
track_id: string | null;
|
|
1822
|
-
status_code: string | null;
|
|
1823
|
-
status_description: string | null;
|
|
1824
|
-
is_valid: boolean;
|
|
1825
|
-
validated_at: string | null;
|
|
1826
|
-
warnings: {
|
|
1827
|
-
code: string;
|
|
1828
|
-
message: string;
|
|
1829
|
-
}[];
|
|
1830
|
-
}>>;
|
|
688
|
+
}, z.core.$strip>>;
|
|
689
|
+
}, z.core.$strip>>;
|
|
1831
690
|
has_xml: z.ZodBoolean;
|
|
1832
691
|
has_pdf: z.ZodBoolean;
|
|
1833
692
|
qr_url: z.ZodNullable<z.ZodString>;
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
1838
|
-
livemode: boolean;
|
|
1839
|
-
metadata: Record<string, unknown>;
|
|
1840
|
-
created_at: string;
|
|
1841
|
-
updated_at: string;
|
|
1842
|
-
prefix: string;
|
|
1843
|
-
environment: string;
|
|
1844
|
-
full_number: string;
|
|
1845
|
-
customer_id: string;
|
|
1846
|
-
numbering_resolution_id: string;
|
|
1847
|
-
issue_date: string;
|
|
1848
|
-
currency_code: string;
|
|
1849
|
-
payable_amount: string;
|
|
1850
|
-
dian_response: {
|
|
1851
|
-
errors: {
|
|
1852
|
-
code: string;
|
|
1853
|
-
message: string;
|
|
1854
|
-
}[];
|
|
1855
|
-
track_id: string | null;
|
|
1856
|
-
status_code: string | null;
|
|
1857
|
-
status_description: string | null;
|
|
1858
|
-
is_valid: boolean;
|
|
1859
|
-
validated_at: string | null;
|
|
1860
|
-
warnings: {
|
|
1861
|
-
code: string;
|
|
1862
|
-
message: string;
|
|
1863
|
-
}[];
|
|
1864
|
-
} | null;
|
|
1865
|
-
has_xml: boolean;
|
|
1866
|
-
has_pdf: boolean;
|
|
1867
|
-
qr_url: string | null;
|
|
1868
|
-
reference_invoice_id: string;
|
|
1869
|
-
discrepancy_response_code: string;
|
|
1870
|
-
discrepancy_description: string | null;
|
|
1871
|
-
cude: string | null;
|
|
1872
|
-
}, {
|
|
1873
|
-
object: "debit_note";
|
|
1874
|
-
id: string;
|
|
1875
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
1876
|
-
livemode: boolean;
|
|
1877
|
-
metadata: Record<string, unknown>;
|
|
1878
|
-
created_at: string;
|
|
1879
|
-
updated_at: string;
|
|
1880
|
-
prefix: string;
|
|
1881
|
-
environment: string;
|
|
1882
|
-
full_number: string;
|
|
1883
|
-
customer_id: string;
|
|
1884
|
-
numbering_resolution_id: string;
|
|
1885
|
-
issue_date: string;
|
|
1886
|
-
currency_code: string;
|
|
1887
|
-
payable_amount: string;
|
|
1888
|
-
dian_response: {
|
|
1889
|
-
errors: {
|
|
1890
|
-
code: string;
|
|
1891
|
-
message: string;
|
|
1892
|
-
}[];
|
|
1893
|
-
track_id: string | null;
|
|
1894
|
-
status_code: string | null;
|
|
1895
|
-
status_description: string | null;
|
|
1896
|
-
is_valid: boolean;
|
|
1897
|
-
validated_at: string | null;
|
|
1898
|
-
warnings: {
|
|
1899
|
-
code: string;
|
|
1900
|
-
message: string;
|
|
1901
|
-
}[];
|
|
1902
|
-
} | null;
|
|
1903
|
-
has_xml: boolean;
|
|
1904
|
-
has_pdf: boolean;
|
|
1905
|
-
qr_url: string | null;
|
|
1906
|
-
reference_invoice_id: string;
|
|
1907
|
-
discrepancy_response_code: string;
|
|
1908
|
-
discrepancy_description: string | null;
|
|
1909
|
-
cude: string | null;
|
|
1910
|
-
}>, "many">;
|
|
693
|
+
failure_reason: z.ZodNullable<z.ZodString>;
|
|
694
|
+
dian_confirmation_pending: z.ZodBoolean;
|
|
695
|
+
}, z.core.$strip>>;
|
|
1911
696
|
has_more: z.ZodBoolean;
|
|
1912
697
|
next_cursor: z.ZodNullable<z.ZodString>;
|
|
1913
|
-
},
|
|
1914
|
-
data: {
|
|
1915
|
-
object: "debit_note";
|
|
1916
|
-
id: string;
|
|
1917
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
1918
|
-
livemode: boolean;
|
|
1919
|
-
metadata: Record<string, unknown>;
|
|
1920
|
-
created_at: string;
|
|
1921
|
-
updated_at: string;
|
|
1922
|
-
prefix: string;
|
|
1923
|
-
environment: string;
|
|
1924
|
-
full_number: string;
|
|
1925
|
-
customer_id: string;
|
|
1926
|
-
numbering_resolution_id: string;
|
|
1927
|
-
issue_date: string;
|
|
1928
|
-
currency_code: string;
|
|
1929
|
-
payable_amount: string;
|
|
1930
|
-
dian_response: {
|
|
1931
|
-
errors: {
|
|
1932
|
-
code: string;
|
|
1933
|
-
message: string;
|
|
1934
|
-
}[];
|
|
1935
|
-
track_id: string | null;
|
|
1936
|
-
status_code: string | null;
|
|
1937
|
-
status_description: string | null;
|
|
1938
|
-
is_valid: boolean;
|
|
1939
|
-
validated_at: string | null;
|
|
1940
|
-
warnings: {
|
|
1941
|
-
code: string;
|
|
1942
|
-
message: string;
|
|
1943
|
-
}[];
|
|
1944
|
-
} | null;
|
|
1945
|
-
has_xml: boolean;
|
|
1946
|
-
has_pdf: boolean;
|
|
1947
|
-
qr_url: string | null;
|
|
1948
|
-
reference_invoice_id: string;
|
|
1949
|
-
discrepancy_response_code: string;
|
|
1950
|
-
discrepancy_description: string | null;
|
|
1951
|
-
cude: string | null;
|
|
1952
|
-
}[];
|
|
1953
|
-
has_more: boolean;
|
|
1954
|
-
next_cursor: string | null;
|
|
1955
|
-
}, {
|
|
1956
|
-
data: {
|
|
1957
|
-
object: "debit_note";
|
|
1958
|
-
id: string;
|
|
1959
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
1960
|
-
livemode: boolean;
|
|
1961
|
-
metadata: Record<string, unknown>;
|
|
1962
|
-
created_at: string;
|
|
1963
|
-
updated_at: string;
|
|
1964
|
-
prefix: string;
|
|
1965
|
-
environment: string;
|
|
1966
|
-
full_number: string;
|
|
1967
|
-
customer_id: string;
|
|
1968
|
-
numbering_resolution_id: string;
|
|
1969
|
-
issue_date: string;
|
|
1970
|
-
currency_code: string;
|
|
1971
|
-
payable_amount: string;
|
|
1972
|
-
dian_response: {
|
|
1973
|
-
errors: {
|
|
1974
|
-
code: string;
|
|
1975
|
-
message: string;
|
|
1976
|
-
}[];
|
|
1977
|
-
track_id: string | null;
|
|
1978
|
-
status_code: string | null;
|
|
1979
|
-
status_description: string | null;
|
|
1980
|
-
is_valid: boolean;
|
|
1981
|
-
validated_at: string | null;
|
|
1982
|
-
warnings: {
|
|
1983
|
-
code: string;
|
|
1984
|
-
message: string;
|
|
1985
|
-
}[];
|
|
1986
|
-
} | null;
|
|
1987
|
-
has_xml: boolean;
|
|
1988
|
-
has_pdf: boolean;
|
|
1989
|
-
qr_url: string | null;
|
|
1990
|
-
reference_invoice_id: string;
|
|
1991
|
-
discrepancy_response_code: string;
|
|
1992
|
-
discrepancy_description: string | null;
|
|
1993
|
-
cude: string | null;
|
|
1994
|
-
}[];
|
|
1995
|
-
has_more: boolean;
|
|
1996
|
-
next_cursor: string | null;
|
|
1997
|
-
}>;
|
|
698
|
+
}, z.core.$strip>;
|
|
1998
699
|
|
|
1999
|
-
/**
|
|
2000
|
-
* invoices.ts — OpenAPI path registrations for the invoices resource (PR4a + PR4b + PR4 emails).
|
|
2001
|
-
*
|
|
2002
|
-
* Spec: invoices-resource/spec.md, email-delivery PR4.
|
|
2003
|
-
* Design: ADR-1 (create-draft-and-enqueue; API NEVER numbers), ADR-5 (paginate).
|
|
2004
|
-
*
|
|
2005
|
-
* CRITICAL response contract:
|
|
2006
|
-
* - POST /v1/invoices returns 202 (accepted for async processing).
|
|
2007
|
-
* - Response includes status:'draft', full_number:'', cufe:null.
|
|
2008
|
-
* - The API NEVER assigns consecutive or full_number — the worker does.
|
|
2009
|
-
* - docs/API.md §6.2 example is being corrected in T-24/PR6 (shows status:'draft').
|
|
2010
|
-
*
|
|
2011
|
-
* Endpoints registered:
|
|
2012
|
-
* POST /v1/invoices — create draft + enqueue dian-submit (PR4a)
|
|
2013
|
-
* GET /v1/invoices — list (paginated, filterable) — items are SUMMARY (no lines) (PR4b)
|
|
2014
|
-
* GET /v1/invoices/{id} — get by id — DETAIL (includes all line items) (PR4b)
|
|
2015
|
-
* GET /v1/invoices/{id}/emails — list email deliveries (PR4 trazabilidad)
|
|
2016
|
-
*/
|
|
2017
700
|
declare const InvoiceResponseSchema: z.ZodObject<{
|
|
2018
701
|
id: z.ZodString;
|
|
2019
702
|
object: z.ZodLiteral<"invoice">;
|
|
2020
703
|
livemode: z.ZodBoolean;
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
* rejected_by_dian — DIAN rechazó
|
|
2031
|
-
* accepted_contingency — Tipo 04 emitido
|
|
2032
|
-
* failed — error interno
|
|
2033
|
-
*/
|
|
2034
|
-
status: z.ZodEnum<["draft", "processing", "signed", "accepted_by_dian", "rejected_by_dian", "accepted_contingency", "failed"]>;
|
|
2035
|
-
/**
|
|
2036
|
-
* full_number: '' in the 202 draft response. Filled by worker after reserveNumber.
|
|
2037
|
-
* Format: '{prefix}{consecutive}', e.g. 'FE0042'.
|
|
2038
|
-
*/
|
|
704
|
+
status: z.ZodEnum<{
|
|
705
|
+
processing: "processing";
|
|
706
|
+
draft: "draft";
|
|
707
|
+
signed: "signed";
|
|
708
|
+
accepted_by_dian: "accepted_by_dian";
|
|
709
|
+
rejected_by_dian: "rejected_by_dian";
|
|
710
|
+
accepted_contingency: "accepted_contingency";
|
|
711
|
+
failed: "failed";
|
|
712
|
+
}>;
|
|
2039
713
|
full_number: z.ZodString;
|
|
2040
|
-
/**
|
|
2041
|
-
* cufe: null in the 202 draft response. Filled by worker after signing.
|
|
2042
|
-
*/
|
|
2043
714
|
cufe: z.ZodNullable<z.ZodString>;
|
|
2044
715
|
customer_id: z.ZodString;
|
|
2045
716
|
prefix: z.ZodString;
|
|
@@ -2051,41 +722,7 @@ declare const InvoiceResponseSchema: z.ZodObject<{
|
|
|
2051
722
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2052
723
|
created_at: z.ZodString;
|
|
2053
724
|
updated_at: z.ZodString;
|
|
2054
|
-
},
|
|
2055
|
-
object: "invoice";
|
|
2056
|
-
id: string;
|
|
2057
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
2058
|
-
livemode: boolean;
|
|
2059
|
-
metadata: Record<string, unknown>;
|
|
2060
|
-
created_at: string;
|
|
2061
|
-
updated_at: string;
|
|
2062
|
-
prefix: string;
|
|
2063
|
-
environment: string;
|
|
2064
|
-
full_number: string;
|
|
2065
|
-
cufe: string | null;
|
|
2066
|
-
customer_id: string;
|
|
2067
|
-
numbering_resolution_id: string;
|
|
2068
|
-
issue_date: string;
|
|
2069
|
-
currency_code: string;
|
|
2070
|
-
payable_amount: string;
|
|
2071
|
-
}, {
|
|
2072
|
-
object: "invoice";
|
|
2073
|
-
id: string;
|
|
2074
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
2075
|
-
livemode: boolean;
|
|
2076
|
-
metadata: Record<string, unknown>;
|
|
2077
|
-
created_at: string;
|
|
2078
|
-
updated_at: string;
|
|
2079
|
-
prefix: string;
|
|
2080
|
-
environment: string;
|
|
2081
|
-
full_number: string;
|
|
2082
|
-
cufe: string | null;
|
|
2083
|
-
customer_id: string;
|
|
2084
|
-
numbering_resolution_id: string;
|
|
2085
|
-
issue_date: string;
|
|
2086
|
-
currency_code: string;
|
|
2087
|
-
payable_amount: string;
|
|
2088
|
-
}>;
|
|
725
|
+
}, z.core.$strip>;
|
|
2089
726
|
declare const CreateInvoiceRequestSchema: z.ZodObject<{
|
|
2090
727
|
customer_id: z.ZodString;
|
|
2091
728
|
prefix: z.ZodDefault<z.ZodString>;
|
|
@@ -2093,154 +730,51 @@ declare const CreateInvoiceRequestSchema: z.ZodObject<{
|
|
|
2093
730
|
due_date: z.ZodOptional<z.ZodString>;
|
|
2094
731
|
payment_means: z.ZodOptional<z.ZodObject<{
|
|
2095
732
|
code: z.ZodString;
|
|
2096
|
-
type: z.ZodEnum<
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
type: "1" | "2";
|
|
2104
|
-
code: string;
|
|
2105
|
-
due_date?: string | undefined;
|
|
733
|
+
type: z.ZodEnum<{
|
|
734
|
+
1: "1";
|
|
735
|
+
2: "2";
|
|
736
|
+
}>;
|
|
737
|
+
}, z.core.$strip>>;
|
|
738
|
+
currency: z.ZodDefault<z.ZodEnum<{
|
|
739
|
+
COP: "COP";
|
|
2106
740
|
}>>;
|
|
2107
|
-
currency: z.ZodDefault<z.ZodEnum<["COP"]>>;
|
|
2108
741
|
operation_type: z.ZodDefault<z.ZodString>;
|
|
2109
742
|
lines: z.ZodArray<z.ZodObject<{
|
|
2110
743
|
description: z.ZodString;
|
|
2111
744
|
sku: z.ZodOptional<z.ZodString>;
|
|
745
|
+
standard_item_id: z.ZodOptional<z.ZodString>;
|
|
746
|
+
standard_item_schema: z.ZodOptional<z.ZodString>;
|
|
2112
747
|
quantity: z.ZodString;
|
|
2113
748
|
unit_code: z.ZodDefault<z.ZodString>;
|
|
2114
749
|
unit_price: z.ZodString;
|
|
2115
750
|
line_extension_amount: z.ZodString;
|
|
751
|
+
allowance_amount: z.ZodOptional<z.ZodString>;
|
|
752
|
+
charge_amount: z.ZodOptional<z.ZodString>;
|
|
2116
753
|
taxes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
2117
754
|
code: z.ZodString;
|
|
2118
755
|
rate: z.ZodString;
|
|
2119
756
|
base: z.ZodString;
|
|
2120
757
|
value: z.ZodString;
|
|
2121
|
-
},
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
base: string;
|
|
2126
|
-
}, {
|
|
2127
|
-
code: string;
|
|
2128
|
-
value: string;
|
|
2129
|
-
rate: string;
|
|
2130
|
-
base: string;
|
|
2131
|
-
}>, "many">>;
|
|
2132
|
-
}, "strip", z.ZodTypeAny, {
|
|
2133
|
-
description: string;
|
|
2134
|
-
quantity: string;
|
|
2135
|
-
unit_code: string;
|
|
2136
|
-
unit_price: string;
|
|
2137
|
-
line_extension_amount: string;
|
|
2138
|
-
taxes: {
|
|
2139
|
-
code: string;
|
|
2140
|
-
value: string;
|
|
2141
|
-
rate: string;
|
|
2142
|
-
base: string;
|
|
2143
|
-
}[];
|
|
2144
|
-
sku?: string | undefined;
|
|
2145
|
-
}, {
|
|
2146
|
-
description: string;
|
|
2147
|
-
quantity: string;
|
|
2148
|
-
unit_price: string;
|
|
2149
|
-
line_extension_amount: string;
|
|
2150
|
-
sku?: string | undefined;
|
|
2151
|
-
unit_code?: string | undefined;
|
|
2152
|
-
taxes?: {
|
|
2153
|
-
code: string;
|
|
2154
|
-
value: string;
|
|
2155
|
-
rate: string;
|
|
2156
|
-
base: string;
|
|
2157
|
-
}[] | undefined;
|
|
2158
|
-
}>, "many">;
|
|
2159
|
-
notes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
758
|
+
}, z.core.$strip>>>;
|
|
759
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
760
|
+
}, z.core.$strip>>;
|
|
761
|
+
notes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2160
762
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2161
|
-
},
|
|
2162
|
-
prefix: string;
|
|
2163
|
-
customer_id: string;
|
|
2164
|
-
currency: "COP";
|
|
2165
|
-
operation_type: string;
|
|
2166
|
-
lines: {
|
|
2167
|
-
description: string;
|
|
2168
|
-
quantity: string;
|
|
2169
|
-
unit_code: string;
|
|
2170
|
-
unit_price: string;
|
|
2171
|
-
line_extension_amount: string;
|
|
2172
|
-
taxes: {
|
|
2173
|
-
code: string;
|
|
2174
|
-
value: string;
|
|
2175
|
-
rate: string;
|
|
2176
|
-
base: string;
|
|
2177
|
-
}[];
|
|
2178
|
-
sku?: string | undefined;
|
|
2179
|
-
}[];
|
|
2180
|
-
metadata?: Record<string, unknown> | undefined;
|
|
2181
|
-
issue_date?: string | undefined;
|
|
2182
|
-
due_date?: string | undefined;
|
|
2183
|
-
payment_means?: {
|
|
2184
|
-
type: "1" | "2";
|
|
2185
|
-
code: string;
|
|
2186
|
-
due_date?: string | undefined;
|
|
2187
|
-
} | undefined;
|
|
2188
|
-
notes?: string[] | undefined;
|
|
2189
|
-
}, {
|
|
2190
|
-
customer_id: string;
|
|
2191
|
-
lines: {
|
|
2192
|
-
description: string;
|
|
2193
|
-
quantity: string;
|
|
2194
|
-
unit_price: string;
|
|
2195
|
-
line_extension_amount: string;
|
|
2196
|
-
sku?: string | undefined;
|
|
2197
|
-
unit_code?: string | undefined;
|
|
2198
|
-
taxes?: {
|
|
2199
|
-
code: string;
|
|
2200
|
-
value: string;
|
|
2201
|
-
rate: string;
|
|
2202
|
-
base: string;
|
|
2203
|
-
}[] | undefined;
|
|
2204
|
-
}[];
|
|
2205
|
-
metadata?: Record<string, unknown> | undefined;
|
|
2206
|
-
prefix?: string | undefined;
|
|
2207
|
-
issue_date?: string | undefined;
|
|
2208
|
-
due_date?: string | undefined;
|
|
2209
|
-
payment_means?: {
|
|
2210
|
-
type: "1" | "2";
|
|
2211
|
-
code: string;
|
|
2212
|
-
due_date?: string | undefined;
|
|
2213
|
-
} | undefined;
|
|
2214
|
-
currency?: "COP" | undefined;
|
|
2215
|
-
operation_type?: string | undefined;
|
|
2216
|
-
notes?: string[] | undefined;
|
|
2217
|
-
}>;
|
|
763
|
+
}, z.core.$strip>;
|
|
2218
764
|
declare const InvoiceDetailResponseSchema: z.ZodObject<{
|
|
2219
765
|
id: z.ZodString;
|
|
2220
766
|
object: z.ZodLiteral<"invoice">;
|
|
2221
767
|
livemode: z.ZodBoolean;
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
* rejected_by_dian — DIAN rechazó
|
|
2232
|
-
* accepted_contingency — Tipo 04 emitido
|
|
2233
|
-
* failed — error interno
|
|
2234
|
-
*/
|
|
2235
|
-
status: z.ZodEnum<["draft", "processing", "signed", "accepted_by_dian", "rejected_by_dian", "accepted_contingency", "failed"]>;
|
|
2236
|
-
/**
|
|
2237
|
-
* full_number: '' in the 202 draft response. Filled by worker after reserveNumber.
|
|
2238
|
-
* Format: '{prefix}{consecutive}', e.g. 'FE0042'.
|
|
2239
|
-
*/
|
|
768
|
+
status: z.ZodEnum<{
|
|
769
|
+
processing: "processing";
|
|
770
|
+
draft: "draft";
|
|
771
|
+
signed: "signed";
|
|
772
|
+
accepted_by_dian: "accepted_by_dian";
|
|
773
|
+
rejected_by_dian: "rejected_by_dian";
|
|
774
|
+
accepted_contingency: "accepted_contingency";
|
|
775
|
+
failed: "failed";
|
|
776
|
+
}>;
|
|
2240
777
|
full_number: z.ZodString;
|
|
2241
|
-
/**
|
|
2242
|
-
* cufe: null in the 202 draft response. Filled by worker after signing.
|
|
2243
|
-
*/
|
|
2244
778
|
cufe: z.ZodNullable<z.ZodString>;
|
|
2245
779
|
customer_id: z.ZodString;
|
|
2246
780
|
prefix: z.ZodString;
|
|
@@ -2252,7 +786,6 @@ declare const InvoiceDetailResponseSchema: z.ZodObject<{
|
|
|
2252
786
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2253
787
|
created_at: z.ZodString;
|
|
2254
788
|
updated_at: z.ZodString;
|
|
2255
|
-
} & {
|
|
2256
789
|
dian_response: z.ZodNullable<z.ZodObject<{
|
|
2257
790
|
track_id: z.ZodNullable<z.ZodString>;
|
|
2258
791
|
status_code: z.ZodNullable<z.ZodString>;
|
|
@@ -2262,56 +795,17 @@ declare const InvoiceDetailResponseSchema: z.ZodObject<{
|
|
|
2262
795
|
errors: z.ZodArray<z.ZodObject<{
|
|
2263
796
|
code: z.ZodString;
|
|
2264
797
|
message: z.ZodString;
|
|
2265
|
-
},
|
|
2266
|
-
code: string;
|
|
2267
|
-
message: string;
|
|
2268
|
-
}, {
|
|
2269
|
-
code: string;
|
|
2270
|
-
message: string;
|
|
2271
|
-
}>, "many">;
|
|
798
|
+
}, z.core.$strip>>;
|
|
2272
799
|
warnings: z.ZodArray<z.ZodObject<{
|
|
2273
800
|
code: z.ZodString;
|
|
2274
801
|
message: z.ZodString;
|
|
2275
|
-
},
|
|
2276
|
-
|
|
2277
|
-
message: string;
|
|
2278
|
-
}, {
|
|
2279
|
-
code: string;
|
|
2280
|
-
message: string;
|
|
2281
|
-
}>, "many">;
|
|
2282
|
-
}, "strip", z.ZodTypeAny, {
|
|
2283
|
-
errors: {
|
|
2284
|
-
code: string;
|
|
2285
|
-
message: string;
|
|
2286
|
-
}[];
|
|
2287
|
-
track_id: string | null;
|
|
2288
|
-
status_code: string | null;
|
|
2289
|
-
status_description: string | null;
|
|
2290
|
-
is_valid: boolean;
|
|
2291
|
-
validated_at: string | null;
|
|
2292
|
-
warnings: {
|
|
2293
|
-
code: string;
|
|
2294
|
-
message: string;
|
|
2295
|
-
}[];
|
|
2296
|
-
}, {
|
|
2297
|
-
errors: {
|
|
2298
|
-
code: string;
|
|
2299
|
-
message: string;
|
|
2300
|
-
}[];
|
|
2301
|
-
track_id: string | null;
|
|
2302
|
-
status_code: string | null;
|
|
2303
|
-
status_description: string | null;
|
|
2304
|
-
is_valid: boolean;
|
|
2305
|
-
validated_at: string | null;
|
|
2306
|
-
warnings: {
|
|
2307
|
-
code: string;
|
|
2308
|
-
message: string;
|
|
2309
|
-
}[];
|
|
2310
|
-
}>>;
|
|
802
|
+
}, z.core.$strip>>;
|
|
803
|
+
}, z.core.$strip>>;
|
|
2311
804
|
has_xml: z.ZodBoolean;
|
|
2312
805
|
has_pdf: z.ZodBoolean;
|
|
2313
806
|
qr_url: z.ZodNullable<z.ZodString>;
|
|
2314
|
-
|
|
807
|
+
failure_reason: z.ZodNullable<z.ZodString>;
|
|
808
|
+
dian_confirmation_pending: z.ZodBoolean;
|
|
2315
809
|
lines: z.ZodArray<z.ZodObject<{
|
|
2316
810
|
id: z.ZodString;
|
|
2317
811
|
line_number: z.ZodNumber;
|
|
@@ -2333,191 +827,23 @@ declare const InvoiceDetailResponseSchema: z.ZodObject<{
|
|
|
2333
827
|
ica_rate: z.ZodString;
|
|
2334
828
|
ica_amount: z.ZodString;
|
|
2335
829
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2336
|
-
},
|
|
2337
|
-
|
|
2338
|
-
id: string;
|
|
2339
|
-
metadata: Record<string, unknown>;
|
|
2340
|
-
sku: string | null;
|
|
2341
|
-
quantity: string;
|
|
2342
|
-
unit_code: string;
|
|
2343
|
-
unit_price: string;
|
|
2344
|
-
line_extension_amount: string;
|
|
2345
|
-
line_number: number;
|
|
2346
|
-
standard_item_id: string | null;
|
|
2347
|
-
standard_item_schema: string | null;
|
|
2348
|
-
allowance_amount: string;
|
|
2349
|
-
charge_amount: string;
|
|
2350
|
-
iva_rate: string;
|
|
2351
|
-
iva_base: string;
|
|
2352
|
-
iva_amount: string;
|
|
2353
|
-
inc_rate: string;
|
|
2354
|
-
inc_amount: string;
|
|
2355
|
-
ica_rate: string;
|
|
2356
|
-
ica_amount: string;
|
|
2357
|
-
}, {
|
|
2358
|
-
description: string;
|
|
2359
|
-
id: string;
|
|
2360
|
-
metadata: Record<string, unknown>;
|
|
2361
|
-
sku: string | null;
|
|
2362
|
-
quantity: string;
|
|
2363
|
-
unit_code: string;
|
|
2364
|
-
unit_price: string;
|
|
2365
|
-
line_extension_amount: string;
|
|
2366
|
-
line_number: number;
|
|
2367
|
-
standard_item_id: string | null;
|
|
2368
|
-
standard_item_schema: string | null;
|
|
2369
|
-
allowance_amount: string;
|
|
2370
|
-
charge_amount: string;
|
|
2371
|
-
iva_rate: string;
|
|
2372
|
-
iva_base: string;
|
|
2373
|
-
iva_amount: string;
|
|
2374
|
-
inc_rate: string;
|
|
2375
|
-
inc_amount: string;
|
|
2376
|
-
ica_rate: string;
|
|
2377
|
-
ica_amount: string;
|
|
2378
|
-
}>, "many">;
|
|
2379
|
-
}, "strip", z.ZodTypeAny, {
|
|
2380
|
-
object: "invoice";
|
|
2381
|
-
id: string;
|
|
2382
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
2383
|
-
livemode: boolean;
|
|
2384
|
-
metadata: Record<string, unknown>;
|
|
2385
|
-
created_at: string;
|
|
2386
|
-
updated_at: string;
|
|
2387
|
-
prefix: string;
|
|
2388
|
-
environment: string;
|
|
2389
|
-
full_number: string;
|
|
2390
|
-
cufe: string | null;
|
|
2391
|
-
customer_id: string;
|
|
2392
|
-
numbering_resolution_id: string;
|
|
2393
|
-
issue_date: string;
|
|
2394
|
-
currency_code: string;
|
|
2395
|
-
payable_amount: string;
|
|
2396
|
-
lines: {
|
|
2397
|
-
description: string;
|
|
2398
|
-
id: string;
|
|
2399
|
-
metadata: Record<string, unknown>;
|
|
2400
|
-
sku: string | null;
|
|
2401
|
-
quantity: string;
|
|
2402
|
-
unit_code: string;
|
|
2403
|
-
unit_price: string;
|
|
2404
|
-
line_extension_amount: string;
|
|
2405
|
-
line_number: number;
|
|
2406
|
-
standard_item_id: string | null;
|
|
2407
|
-
standard_item_schema: string | null;
|
|
2408
|
-
allowance_amount: string;
|
|
2409
|
-
charge_amount: string;
|
|
2410
|
-
iva_rate: string;
|
|
2411
|
-
iva_base: string;
|
|
2412
|
-
iva_amount: string;
|
|
2413
|
-
inc_rate: string;
|
|
2414
|
-
inc_amount: string;
|
|
2415
|
-
ica_rate: string;
|
|
2416
|
-
ica_amount: string;
|
|
2417
|
-
}[];
|
|
2418
|
-
dian_response: {
|
|
2419
|
-
errors: {
|
|
2420
|
-
code: string;
|
|
2421
|
-
message: string;
|
|
2422
|
-
}[];
|
|
2423
|
-
track_id: string | null;
|
|
2424
|
-
status_code: string | null;
|
|
2425
|
-
status_description: string | null;
|
|
2426
|
-
is_valid: boolean;
|
|
2427
|
-
validated_at: string | null;
|
|
2428
|
-
warnings: {
|
|
2429
|
-
code: string;
|
|
2430
|
-
message: string;
|
|
2431
|
-
}[];
|
|
2432
|
-
} | null;
|
|
2433
|
-
has_xml: boolean;
|
|
2434
|
-
has_pdf: boolean;
|
|
2435
|
-
qr_url: string | null;
|
|
2436
|
-
}, {
|
|
2437
|
-
object: "invoice";
|
|
2438
|
-
id: string;
|
|
2439
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
2440
|
-
livemode: boolean;
|
|
2441
|
-
metadata: Record<string, unknown>;
|
|
2442
|
-
created_at: string;
|
|
2443
|
-
updated_at: string;
|
|
2444
|
-
prefix: string;
|
|
2445
|
-
environment: string;
|
|
2446
|
-
full_number: string;
|
|
2447
|
-
cufe: string | null;
|
|
2448
|
-
customer_id: string;
|
|
2449
|
-
numbering_resolution_id: string;
|
|
2450
|
-
issue_date: string;
|
|
2451
|
-
currency_code: string;
|
|
2452
|
-
payable_amount: string;
|
|
2453
|
-
lines: {
|
|
2454
|
-
description: string;
|
|
2455
|
-
id: string;
|
|
2456
|
-
metadata: Record<string, unknown>;
|
|
2457
|
-
sku: string | null;
|
|
2458
|
-
quantity: string;
|
|
2459
|
-
unit_code: string;
|
|
2460
|
-
unit_price: string;
|
|
2461
|
-
line_extension_amount: string;
|
|
2462
|
-
line_number: number;
|
|
2463
|
-
standard_item_id: string | null;
|
|
2464
|
-
standard_item_schema: string | null;
|
|
2465
|
-
allowance_amount: string;
|
|
2466
|
-
charge_amount: string;
|
|
2467
|
-
iva_rate: string;
|
|
2468
|
-
iva_base: string;
|
|
2469
|
-
iva_amount: string;
|
|
2470
|
-
inc_rate: string;
|
|
2471
|
-
inc_amount: string;
|
|
2472
|
-
ica_rate: string;
|
|
2473
|
-
ica_amount: string;
|
|
2474
|
-
}[];
|
|
2475
|
-
dian_response: {
|
|
2476
|
-
errors: {
|
|
2477
|
-
code: string;
|
|
2478
|
-
message: string;
|
|
2479
|
-
}[];
|
|
2480
|
-
track_id: string | null;
|
|
2481
|
-
status_code: string | null;
|
|
2482
|
-
status_description: string | null;
|
|
2483
|
-
is_valid: boolean;
|
|
2484
|
-
validated_at: string | null;
|
|
2485
|
-
warnings: {
|
|
2486
|
-
code: string;
|
|
2487
|
-
message: string;
|
|
2488
|
-
}[];
|
|
2489
|
-
} | null;
|
|
2490
|
-
has_xml: boolean;
|
|
2491
|
-
has_pdf: boolean;
|
|
2492
|
-
qr_url: string | null;
|
|
2493
|
-
}>;
|
|
830
|
+
}, z.core.$strip>>;
|
|
831
|
+
}, z.core.$strip>;
|
|
2494
832
|
declare const InvoiceListResponseSchema: z.ZodObject<{
|
|
2495
833
|
data: z.ZodArray<z.ZodObject<{
|
|
2496
834
|
id: z.ZodString;
|
|
2497
835
|
object: z.ZodLiteral<"invoice">;
|
|
2498
836
|
livemode: z.ZodBoolean;
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
* rejected_by_dian — DIAN rechazó
|
|
2509
|
-
* accepted_contingency — Tipo 04 emitido
|
|
2510
|
-
* failed — error interno
|
|
2511
|
-
*/
|
|
2512
|
-
status: z.ZodEnum<["draft", "processing", "signed", "accepted_by_dian", "rejected_by_dian", "accepted_contingency", "failed"]>;
|
|
2513
|
-
/**
|
|
2514
|
-
* full_number: '' in the 202 draft response. Filled by worker after reserveNumber.
|
|
2515
|
-
* Format: '{prefix}{consecutive}', e.g. 'FE0042'.
|
|
2516
|
-
*/
|
|
837
|
+
status: z.ZodEnum<{
|
|
838
|
+
processing: "processing";
|
|
839
|
+
draft: "draft";
|
|
840
|
+
signed: "signed";
|
|
841
|
+
accepted_by_dian: "accepted_by_dian";
|
|
842
|
+
rejected_by_dian: "rejected_by_dian";
|
|
843
|
+
accepted_contingency: "accepted_contingency";
|
|
844
|
+
failed: "failed";
|
|
845
|
+
}>;
|
|
2517
846
|
full_number: z.ZodString;
|
|
2518
|
-
/**
|
|
2519
|
-
* cufe: null in the 202 draft response. Filled by worker after signing.
|
|
2520
|
-
*/
|
|
2521
847
|
cufe: z.ZodNullable<z.ZodString>;
|
|
2522
848
|
customer_id: z.ZodString;
|
|
2523
849
|
prefix: z.ZodString;
|
|
@@ -2529,7 +855,6 @@ declare const InvoiceListResponseSchema: z.ZodObject<{
|
|
|
2529
855
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2530
856
|
created_at: z.ZodString;
|
|
2531
857
|
updated_at: z.ZodString;
|
|
2532
|
-
} & {
|
|
2533
858
|
dian_response: z.ZodNullable<z.ZodObject<{
|
|
2534
859
|
track_id: z.ZodNullable<z.ZodString>;
|
|
2535
860
|
status_code: z.ZodNullable<z.ZodString>;
|
|
@@ -2539,207 +864,21 @@ declare const InvoiceListResponseSchema: z.ZodObject<{
|
|
|
2539
864
|
errors: z.ZodArray<z.ZodObject<{
|
|
2540
865
|
code: z.ZodString;
|
|
2541
866
|
message: z.ZodString;
|
|
2542
|
-
},
|
|
2543
|
-
code: string;
|
|
2544
|
-
message: string;
|
|
2545
|
-
}, {
|
|
2546
|
-
code: string;
|
|
2547
|
-
message: string;
|
|
2548
|
-
}>, "many">;
|
|
867
|
+
}, z.core.$strip>>;
|
|
2549
868
|
warnings: z.ZodArray<z.ZodObject<{
|
|
2550
869
|
code: z.ZodString;
|
|
2551
870
|
message: z.ZodString;
|
|
2552
|
-
},
|
|
2553
|
-
|
|
2554
|
-
message: string;
|
|
2555
|
-
}, {
|
|
2556
|
-
code: string;
|
|
2557
|
-
message: string;
|
|
2558
|
-
}>, "many">;
|
|
2559
|
-
}, "strip", z.ZodTypeAny, {
|
|
2560
|
-
errors: {
|
|
2561
|
-
code: string;
|
|
2562
|
-
message: string;
|
|
2563
|
-
}[];
|
|
2564
|
-
track_id: string | null;
|
|
2565
|
-
status_code: string | null;
|
|
2566
|
-
status_description: string | null;
|
|
2567
|
-
is_valid: boolean;
|
|
2568
|
-
validated_at: string | null;
|
|
2569
|
-
warnings: {
|
|
2570
|
-
code: string;
|
|
2571
|
-
message: string;
|
|
2572
|
-
}[];
|
|
2573
|
-
}, {
|
|
2574
|
-
errors: {
|
|
2575
|
-
code: string;
|
|
2576
|
-
message: string;
|
|
2577
|
-
}[];
|
|
2578
|
-
track_id: string | null;
|
|
2579
|
-
status_code: string | null;
|
|
2580
|
-
status_description: string | null;
|
|
2581
|
-
is_valid: boolean;
|
|
2582
|
-
validated_at: string | null;
|
|
2583
|
-
warnings: {
|
|
2584
|
-
code: string;
|
|
2585
|
-
message: string;
|
|
2586
|
-
}[];
|
|
2587
|
-
}>>;
|
|
871
|
+
}, z.core.$strip>>;
|
|
872
|
+
}, z.core.$strip>>;
|
|
2588
873
|
has_xml: z.ZodBoolean;
|
|
2589
874
|
has_pdf: z.ZodBoolean;
|
|
2590
875
|
qr_url: z.ZodNullable<z.ZodString>;
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
2595
|
-
livemode: boolean;
|
|
2596
|
-
metadata: Record<string, unknown>;
|
|
2597
|
-
created_at: string;
|
|
2598
|
-
updated_at: string;
|
|
2599
|
-
prefix: string;
|
|
2600
|
-
environment: string;
|
|
2601
|
-
full_number: string;
|
|
2602
|
-
cufe: string | null;
|
|
2603
|
-
customer_id: string;
|
|
2604
|
-
numbering_resolution_id: string;
|
|
2605
|
-
issue_date: string;
|
|
2606
|
-
currency_code: string;
|
|
2607
|
-
payable_amount: string;
|
|
2608
|
-
dian_response: {
|
|
2609
|
-
errors: {
|
|
2610
|
-
code: string;
|
|
2611
|
-
message: string;
|
|
2612
|
-
}[];
|
|
2613
|
-
track_id: string | null;
|
|
2614
|
-
status_code: string | null;
|
|
2615
|
-
status_description: string | null;
|
|
2616
|
-
is_valid: boolean;
|
|
2617
|
-
validated_at: string | null;
|
|
2618
|
-
warnings: {
|
|
2619
|
-
code: string;
|
|
2620
|
-
message: string;
|
|
2621
|
-
}[];
|
|
2622
|
-
} | null;
|
|
2623
|
-
has_xml: boolean;
|
|
2624
|
-
has_pdf: boolean;
|
|
2625
|
-
qr_url: string | null;
|
|
2626
|
-
}, {
|
|
2627
|
-
object: "invoice";
|
|
2628
|
-
id: string;
|
|
2629
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
2630
|
-
livemode: boolean;
|
|
2631
|
-
metadata: Record<string, unknown>;
|
|
2632
|
-
created_at: string;
|
|
2633
|
-
updated_at: string;
|
|
2634
|
-
prefix: string;
|
|
2635
|
-
environment: string;
|
|
2636
|
-
full_number: string;
|
|
2637
|
-
cufe: string | null;
|
|
2638
|
-
customer_id: string;
|
|
2639
|
-
numbering_resolution_id: string;
|
|
2640
|
-
issue_date: string;
|
|
2641
|
-
currency_code: string;
|
|
2642
|
-
payable_amount: string;
|
|
2643
|
-
dian_response: {
|
|
2644
|
-
errors: {
|
|
2645
|
-
code: string;
|
|
2646
|
-
message: string;
|
|
2647
|
-
}[];
|
|
2648
|
-
track_id: string | null;
|
|
2649
|
-
status_code: string | null;
|
|
2650
|
-
status_description: string | null;
|
|
2651
|
-
is_valid: boolean;
|
|
2652
|
-
validated_at: string | null;
|
|
2653
|
-
warnings: {
|
|
2654
|
-
code: string;
|
|
2655
|
-
message: string;
|
|
2656
|
-
}[];
|
|
2657
|
-
} | null;
|
|
2658
|
-
has_xml: boolean;
|
|
2659
|
-
has_pdf: boolean;
|
|
2660
|
-
qr_url: string | null;
|
|
2661
|
-
}>, "many">;
|
|
876
|
+
failure_reason: z.ZodNullable<z.ZodString>;
|
|
877
|
+
dian_confirmation_pending: z.ZodBoolean;
|
|
878
|
+
}, z.core.$strip>>;
|
|
2662
879
|
has_more: z.ZodBoolean;
|
|
2663
880
|
next_cursor: z.ZodNullable<z.ZodString>;
|
|
2664
|
-
},
|
|
2665
|
-
data: {
|
|
2666
|
-
object: "invoice";
|
|
2667
|
-
id: string;
|
|
2668
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
2669
|
-
livemode: boolean;
|
|
2670
|
-
metadata: Record<string, unknown>;
|
|
2671
|
-
created_at: string;
|
|
2672
|
-
updated_at: string;
|
|
2673
|
-
prefix: string;
|
|
2674
|
-
environment: string;
|
|
2675
|
-
full_number: string;
|
|
2676
|
-
cufe: string | null;
|
|
2677
|
-
customer_id: string;
|
|
2678
|
-
numbering_resolution_id: string;
|
|
2679
|
-
issue_date: string;
|
|
2680
|
-
currency_code: string;
|
|
2681
|
-
payable_amount: string;
|
|
2682
|
-
dian_response: {
|
|
2683
|
-
errors: {
|
|
2684
|
-
code: string;
|
|
2685
|
-
message: string;
|
|
2686
|
-
}[];
|
|
2687
|
-
track_id: string | null;
|
|
2688
|
-
status_code: string | null;
|
|
2689
|
-
status_description: string | null;
|
|
2690
|
-
is_valid: boolean;
|
|
2691
|
-
validated_at: string | null;
|
|
2692
|
-
warnings: {
|
|
2693
|
-
code: string;
|
|
2694
|
-
message: string;
|
|
2695
|
-
}[];
|
|
2696
|
-
} | null;
|
|
2697
|
-
has_xml: boolean;
|
|
2698
|
-
has_pdf: boolean;
|
|
2699
|
-
qr_url: string | null;
|
|
2700
|
-
}[];
|
|
2701
|
-
has_more: boolean;
|
|
2702
|
-
next_cursor: string | null;
|
|
2703
|
-
}, {
|
|
2704
|
-
data: {
|
|
2705
|
-
object: "invoice";
|
|
2706
|
-
id: string;
|
|
2707
|
-
status: "draft" | "processing" | "signed" | "accepted_by_dian" | "rejected_by_dian" | "accepted_contingency" | "failed";
|
|
2708
|
-
livemode: boolean;
|
|
2709
|
-
metadata: Record<string, unknown>;
|
|
2710
|
-
created_at: string;
|
|
2711
|
-
updated_at: string;
|
|
2712
|
-
prefix: string;
|
|
2713
|
-
environment: string;
|
|
2714
|
-
full_number: string;
|
|
2715
|
-
cufe: string | null;
|
|
2716
|
-
customer_id: string;
|
|
2717
|
-
numbering_resolution_id: string;
|
|
2718
|
-
issue_date: string;
|
|
2719
|
-
currency_code: string;
|
|
2720
|
-
payable_amount: string;
|
|
2721
|
-
dian_response: {
|
|
2722
|
-
errors: {
|
|
2723
|
-
code: string;
|
|
2724
|
-
message: string;
|
|
2725
|
-
}[];
|
|
2726
|
-
track_id: string | null;
|
|
2727
|
-
status_code: string | null;
|
|
2728
|
-
status_description: string | null;
|
|
2729
|
-
is_valid: boolean;
|
|
2730
|
-
validated_at: string | null;
|
|
2731
|
-
warnings: {
|
|
2732
|
-
code: string;
|
|
2733
|
-
message: string;
|
|
2734
|
-
}[];
|
|
2735
|
-
} | null;
|
|
2736
|
-
has_xml: boolean;
|
|
2737
|
-
has_pdf: boolean;
|
|
2738
|
-
qr_url: string | null;
|
|
2739
|
-
}[];
|
|
2740
|
-
has_more: boolean;
|
|
2741
|
-
next_cursor: string | null;
|
|
2742
|
-
}>;
|
|
881
|
+
}, z.core.$strip>;
|
|
2743
882
|
/**
|
|
2744
883
|
* EmailDeliveryResponseSchema — shape of a single email delivery row (PR4 trazabilidad).
|
|
2745
884
|
*
|
|
@@ -2748,131 +887,63 @@ declare const InvoiceListResponseSchema: z.ZodObject<{
|
|
|
2748
887
|
*/
|
|
2749
888
|
declare const EmailDeliveryResponseSchema: z.ZodObject<{
|
|
2750
889
|
id: z.ZodString;
|
|
2751
|
-
status: z.ZodEnum<
|
|
2752
|
-
|
|
890
|
+
status: z.ZodEnum<{
|
|
891
|
+
queued: "queued";
|
|
892
|
+
sent: "sent";
|
|
893
|
+
delivered: "delivered";
|
|
894
|
+
bounced: "bounced";
|
|
895
|
+
complained: "complained";
|
|
896
|
+
}>;
|
|
897
|
+
mode: z.ZodEnum<{
|
|
898
|
+
test: "test";
|
|
899
|
+
live: "live";
|
|
900
|
+
}>;
|
|
2753
901
|
recipient_email: z.ZodString;
|
|
2754
902
|
provider_message_id: z.ZodNullable<z.ZodString>;
|
|
2755
903
|
attempts: z.ZodNumber;
|
|
2756
904
|
last_error: z.ZodNullable<z.ZodString>;
|
|
2757
|
-
trigger_source: z.ZodEnum<
|
|
905
|
+
trigger_source: z.ZodEnum<{
|
|
906
|
+
auto: "auto";
|
|
907
|
+
manual: "manual";
|
|
908
|
+
}>;
|
|
2758
909
|
sent_at: z.ZodNullable<z.ZodString>;
|
|
2759
910
|
delivered_at: z.ZodNullable<z.ZodString>;
|
|
2760
911
|
bounced_at: z.ZodNullable<z.ZodString>;
|
|
2761
912
|
complained_at: z.ZodNullable<z.ZodString>;
|
|
2762
913
|
created_at: z.ZodString;
|
|
2763
|
-
},
|
|
2764
|
-
id: string;
|
|
2765
|
-
status: "queued" | "sent" | "delivered" | "bounced" | "complained";
|
|
2766
|
-
created_at: string;
|
|
2767
|
-
mode: "test" | "live";
|
|
2768
|
-
recipient_email: string;
|
|
2769
|
-
provider_message_id: string | null;
|
|
2770
|
-
attempts: number;
|
|
2771
|
-
last_error: string | null;
|
|
2772
|
-
trigger_source: "auto" | "manual";
|
|
2773
|
-
sent_at: string | null;
|
|
2774
|
-
delivered_at: string | null;
|
|
2775
|
-
bounced_at: string | null;
|
|
2776
|
-
complained_at: string | null;
|
|
2777
|
-
}, {
|
|
2778
|
-
id: string;
|
|
2779
|
-
status: "queued" | "sent" | "delivered" | "bounced" | "complained";
|
|
2780
|
-
created_at: string;
|
|
2781
|
-
mode: "test" | "live";
|
|
2782
|
-
recipient_email: string;
|
|
2783
|
-
provider_message_id: string | null;
|
|
2784
|
-
attempts: number;
|
|
2785
|
-
last_error: string | null;
|
|
2786
|
-
trigger_source: "auto" | "manual";
|
|
2787
|
-
sent_at: string | null;
|
|
2788
|
-
delivered_at: string | null;
|
|
2789
|
-
bounced_at: string | null;
|
|
2790
|
-
complained_at: string | null;
|
|
2791
|
-
}>;
|
|
914
|
+
}, z.core.$strip>;
|
|
2792
915
|
declare const EmailDeliveryListResponseSchema: z.ZodObject<{
|
|
2793
916
|
data: z.ZodArray<z.ZodObject<{
|
|
2794
917
|
id: z.ZodString;
|
|
2795
|
-
status: z.ZodEnum<
|
|
2796
|
-
|
|
918
|
+
status: z.ZodEnum<{
|
|
919
|
+
queued: "queued";
|
|
920
|
+
sent: "sent";
|
|
921
|
+
delivered: "delivered";
|
|
922
|
+
bounced: "bounced";
|
|
923
|
+
complained: "complained";
|
|
924
|
+
}>;
|
|
925
|
+
mode: z.ZodEnum<{
|
|
926
|
+
test: "test";
|
|
927
|
+
live: "live";
|
|
928
|
+
}>;
|
|
2797
929
|
recipient_email: z.ZodString;
|
|
2798
930
|
provider_message_id: z.ZodNullable<z.ZodString>;
|
|
2799
931
|
attempts: z.ZodNumber;
|
|
2800
932
|
last_error: z.ZodNullable<z.ZodString>;
|
|
2801
|
-
trigger_source: z.ZodEnum<
|
|
933
|
+
trigger_source: z.ZodEnum<{
|
|
934
|
+
auto: "auto";
|
|
935
|
+
manual: "manual";
|
|
936
|
+
}>;
|
|
2802
937
|
sent_at: z.ZodNullable<z.ZodString>;
|
|
2803
938
|
delivered_at: z.ZodNullable<z.ZodString>;
|
|
2804
939
|
bounced_at: z.ZodNullable<z.ZodString>;
|
|
2805
940
|
complained_at: z.ZodNullable<z.ZodString>;
|
|
2806
941
|
created_at: z.ZodString;
|
|
2807
|
-
},
|
|
2808
|
-
|
|
2809
|
-
status: "queued" | "sent" | "delivered" | "bounced" | "complained";
|
|
2810
|
-
created_at: string;
|
|
2811
|
-
mode: "test" | "live";
|
|
2812
|
-
recipient_email: string;
|
|
2813
|
-
provider_message_id: string | null;
|
|
2814
|
-
attempts: number;
|
|
2815
|
-
last_error: string | null;
|
|
2816
|
-
trigger_source: "auto" | "manual";
|
|
2817
|
-
sent_at: string | null;
|
|
2818
|
-
delivered_at: string | null;
|
|
2819
|
-
bounced_at: string | null;
|
|
2820
|
-
complained_at: string | null;
|
|
2821
|
-
}, {
|
|
2822
|
-
id: string;
|
|
2823
|
-
status: "queued" | "sent" | "delivered" | "bounced" | "complained";
|
|
2824
|
-
created_at: string;
|
|
2825
|
-
mode: "test" | "live";
|
|
2826
|
-
recipient_email: string;
|
|
2827
|
-
provider_message_id: string | null;
|
|
2828
|
-
attempts: number;
|
|
2829
|
-
last_error: string | null;
|
|
2830
|
-
trigger_source: "auto" | "manual";
|
|
2831
|
-
sent_at: string | null;
|
|
2832
|
-
delivered_at: string | null;
|
|
2833
|
-
bounced_at: string | null;
|
|
2834
|
-
complained_at: string | null;
|
|
2835
|
-
}>, "many">;
|
|
2836
|
-
}, "strip", z.ZodTypeAny, {
|
|
2837
|
-
data: {
|
|
2838
|
-
id: string;
|
|
2839
|
-
status: "queued" | "sent" | "delivered" | "bounced" | "complained";
|
|
2840
|
-
created_at: string;
|
|
2841
|
-
mode: "test" | "live";
|
|
2842
|
-
recipient_email: string;
|
|
2843
|
-
provider_message_id: string | null;
|
|
2844
|
-
attempts: number;
|
|
2845
|
-
last_error: string | null;
|
|
2846
|
-
trigger_source: "auto" | "manual";
|
|
2847
|
-
sent_at: string | null;
|
|
2848
|
-
delivered_at: string | null;
|
|
2849
|
-
bounced_at: string | null;
|
|
2850
|
-
complained_at: string | null;
|
|
2851
|
-
}[];
|
|
2852
|
-
}, {
|
|
2853
|
-
data: {
|
|
2854
|
-
id: string;
|
|
2855
|
-
status: "queued" | "sent" | "delivered" | "bounced" | "complained";
|
|
2856
|
-
created_at: string;
|
|
2857
|
-
mode: "test" | "live";
|
|
2858
|
-
recipient_email: string;
|
|
2859
|
-
provider_message_id: string | null;
|
|
2860
|
-
attempts: number;
|
|
2861
|
-
last_error: string | null;
|
|
2862
|
-
trigger_source: "auto" | "manual";
|
|
2863
|
-
sent_at: string | null;
|
|
2864
|
-
delivered_at: string | null;
|
|
2865
|
-
bounced_at: string | null;
|
|
2866
|
-
complained_at: string | null;
|
|
2867
|
-
}[];
|
|
2868
|
-
}>;
|
|
942
|
+
}, z.core.$strip>>;
|
|
943
|
+
}, z.core.$strip>;
|
|
2869
944
|
declare const SendEmailRequestSchema: z.ZodObject<{
|
|
2870
945
|
to: z.ZodOptional<z.ZodString>;
|
|
2871
|
-
},
|
|
2872
|
-
to?: string | undefined;
|
|
2873
|
-
}, {
|
|
2874
|
-
to?: string | undefined;
|
|
2875
|
-
}>;
|
|
946
|
+
}, z.core.$strip>;
|
|
2876
947
|
declare const EmailContentResponseSchema: z.ZodObject<{
|
|
2877
948
|
recipient: z.ZodNullable<z.ZodString>;
|
|
2878
949
|
subject: z.ZodString;
|
|
@@ -2880,39 +951,166 @@ declare const EmailContentResponseSchema: z.ZodObject<{
|
|
|
2880
951
|
available: z.ZodBoolean;
|
|
2881
952
|
download_url: z.ZodNullable<z.ZodString>;
|
|
2882
953
|
expires_in: z.ZodNullable<z.ZodNumber>;
|
|
2883
|
-
},
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
954
|
+
}, z.core.$strip>;
|
|
955
|
+
}, z.core.$strip>;
|
|
956
|
+
|
|
957
|
+
declare const WebhookEndpointResponseSchema: z.ZodObject<{
|
|
958
|
+
id: z.ZodString;
|
|
959
|
+
object: z.ZodLiteral<"webhook_endpoint">;
|
|
960
|
+
livemode: z.ZodBoolean;
|
|
961
|
+
url: z.ZodString;
|
|
962
|
+
description: z.ZodNullable<z.ZodString>;
|
|
963
|
+
subscribed_events: z.ZodArray<z.ZodString>;
|
|
964
|
+
is_active: z.ZodBoolean;
|
|
965
|
+
api_version: z.ZodString;
|
|
966
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
967
|
+
created_at: z.ZodString;
|
|
968
|
+
updated_at: z.ZodString;
|
|
969
|
+
}, z.core.$strip>;
|
|
970
|
+
declare const CreateWebhookEndpointResponseSchema: z.ZodObject<{
|
|
971
|
+
id: z.ZodString;
|
|
972
|
+
object: z.ZodLiteral<"webhook_endpoint">;
|
|
973
|
+
livemode: z.ZodBoolean;
|
|
974
|
+
url: z.ZodString;
|
|
975
|
+
description: z.ZodNullable<z.ZodString>;
|
|
976
|
+
subscribed_events: z.ZodArray<z.ZodString>;
|
|
977
|
+
is_active: z.ZodBoolean;
|
|
978
|
+
api_version: z.ZodString;
|
|
979
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
980
|
+
created_at: z.ZodString;
|
|
981
|
+
updated_at: z.ZodString;
|
|
982
|
+
secret: z.ZodString;
|
|
983
|
+
}, z.core.$strip>;
|
|
984
|
+
declare const RotateSecretResponseSchema: z.ZodObject<{
|
|
985
|
+
id: z.ZodString;
|
|
986
|
+
object: z.ZodLiteral<"webhook_endpoint">;
|
|
987
|
+
secret: z.ZodString;
|
|
988
|
+
}, z.core.$strip>;
|
|
989
|
+
declare const DeleteWebhookEndpointResponseSchema: z.ZodObject<{
|
|
990
|
+
id: z.ZodString;
|
|
991
|
+
object: z.ZodLiteral<"webhook_endpoint">;
|
|
992
|
+
deleted: z.ZodLiteral<true>;
|
|
993
|
+
}, z.core.$strip>;
|
|
994
|
+
declare const WebhookEndpointListResponseSchema: z.ZodObject<{
|
|
995
|
+
data: z.ZodArray<z.ZodObject<{
|
|
996
|
+
id: z.ZodString;
|
|
997
|
+
object: z.ZodLiteral<"webhook_endpoint">;
|
|
998
|
+
livemode: z.ZodBoolean;
|
|
999
|
+
url: z.ZodString;
|
|
1000
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1001
|
+
subscribed_events: z.ZodArray<z.ZodString>;
|
|
1002
|
+
is_active: z.ZodBoolean;
|
|
1003
|
+
api_version: z.ZodString;
|
|
1004
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1005
|
+
created_at: z.ZodString;
|
|
1006
|
+
updated_at: z.ZodString;
|
|
1007
|
+
}, z.core.$strip>>;
|
|
1008
|
+
has_more: z.ZodBoolean;
|
|
1009
|
+
next_cursor: z.ZodNullable<z.ZodString>;
|
|
1010
|
+
}, z.core.$strip>;
|
|
1011
|
+
declare const CreateWebhookEndpointRequestSchema: z.ZodObject<{
|
|
1012
|
+
url: z.ZodString;
|
|
1013
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1014
|
+
subscribed_events: z.ZodDefault<z.ZodPipe<z.ZodArray<z.ZodEnum<{
|
|
1015
|
+
"invoice.accepted_by_dian": "invoice.accepted_by_dian";
|
|
1016
|
+
"invoice.rejected_by_dian": "invoice.rejected_by_dian";
|
|
1017
|
+
"invoice.accepted_contingency": "invoice.accepted_contingency";
|
|
1018
|
+
"invoice.failed": "invoice.failed";
|
|
1019
|
+
"credit_note.accepted_by_dian": "credit_note.accepted_by_dian";
|
|
1020
|
+
"credit_note.rejected_by_dian": "credit_note.rejected_by_dian";
|
|
1021
|
+
"credit_note.accepted_contingency": "credit_note.accepted_contingency";
|
|
1022
|
+
"credit_note.failed": "credit_note.failed";
|
|
1023
|
+
"debit_note.accepted_by_dian": "debit_note.accepted_by_dian";
|
|
1024
|
+
"debit_note.rejected_by_dian": "debit_note.rejected_by_dian";
|
|
1025
|
+
"debit_note.accepted_contingency": "debit_note.accepted_contingency";
|
|
1026
|
+
"debit_note.failed": "debit_note.failed";
|
|
1027
|
+
"invoice.email.delivered": "invoice.email.delivered";
|
|
1028
|
+
"invoice.email.bounced": "invoice.email.bounced";
|
|
1029
|
+
"invoice.email.complained": "invoice.email.complained";
|
|
1030
|
+
"credit_note.email.delivered": "credit_note.email.delivered";
|
|
1031
|
+
"credit_note.email.bounced": "credit_note.email.bounced";
|
|
1032
|
+
"credit_note.email.complained": "credit_note.email.complained";
|
|
1033
|
+
"debit_note.email.delivered": "debit_note.email.delivered";
|
|
1034
|
+
"debit_note.email.bounced": "debit_note.email.bounced";
|
|
1035
|
+
"debit_note.email.complained": "debit_note.email.complained";
|
|
1036
|
+
}>>, z.ZodTransform<("invoice.accepted_by_dian" | "invoice.rejected_by_dian" | "invoice.accepted_contingency" | "invoice.failed" | "credit_note.accepted_by_dian" | "credit_note.rejected_by_dian" | "credit_note.accepted_contingency" | "credit_note.failed" | "debit_note.accepted_by_dian" | "debit_note.rejected_by_dian" | "debit_note.accepted_contingency" | "debit_note.failed" | "invoice.email.delivered" | "invoice.email.bounced" | "invoice.email.complained" | "credit_note.email.delivered" | "credit_note.email.bounced" | "credit_note.email.complained" | "debit_note.email.delivered" | "debit_note.email.bounced" | "debit_note.email.complained")[], ("invoice.accepted_by_dian" | "invoice.rejected_by_dian" | "invoice.accepted_contingency" | "invoice.failed" | "credit_note.accepted_by_dian" | "credit_note.rejected_by_dian" | "credit_note.accepted_contingency" | "credit_note.failed" | "debit_note.accepted_by_dian" | "debit_note.rejected_by_dian" | "debit_note.accepted_contingency" | "debit_note.failed" | "invoice.email.delivered" | "invoice.email.bounced" | "invoice.email.complained" | "credit_note.email.delivered" | "credit_note.email.bounced" | "credit_note.email.complained" | "debit_note.email.delivered" | "debit_note.email.bounced" | "debit_note.email.complained")[]>>>;
|
|
1037
|
+
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1038
|
+
}, z.core.$strip>;
|
|
1039
|
+
declare const UpdateWebhookEndpointRequestSchema: z.ZodObject<{
|
|
1040
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1041
|
+
description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1042
|
+
subscribed_events: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodEnum<{
|
|
1043
|
+
"invoice.accepted_by_dian": "invoice.accepted_by_dian";
|
|
1044
|
+
"invoice.rejected_by_dian": "invoice.rejected_by_dian";
|
|
1045
|
+
"invoice.accepted_contingency": "invoice.accepted_contingency";
|
|
1046
|
+
"invoice.failed": "invoice.failed";
|
|
1047
|
+
"credit_note.accepted_by_dian": "credit_note.accepted_by_dian";
|
|
1048
|
+
"credit_note.rejected_by_dian": "credit_note.rejected_by_dian";
|
|
1049
|
+
"credit_note.accepted_contingency": "credit_note.accepted_contingency";
|
|
1050
|
+
"credit_note.failed": "credit_note.failed";
|
|
1051
|
+
"debit_note.accepted_by_dian": "debit_note.accepted_by_dian";
|
|
1052
|
+
"debit_note.rejected_by_dian": "debit_note.rejected_by_dian";
|
|
1053
|
+
"debit_note.accepted_contingency": "debit_note.accepted_contingency";
|
|
1054
|
+
"debit_note.failed": "debit_note.failed";
|
|
1055
|
+
"invoice.email.delivered": "invoice.email.delivered";
|
|
1056
|
+
"invoice.email.bounced": "invoice.email.bounced";
|
|
1057
|
+
"invoice.email.complained": "invoice.email.complained";
|
|
1058
|
+
"credit_note.email.delivered": "credit_note.email.delivered";
|
|
1059
|
+
"credit_note.email.bounced": "credit_note.email.bounced";
|
|
1060
|
+
"credit_note.email.complained": "credit_note.email.complained";
|
|
1061
|
+
"debit_note.email.delivered": "debit_note.email.delivered";
|
|
1062
|
+
"debit_note.email.bounced": "debit_note.email.bounced";
|
|
1063
|
+
"debit_note.email.complained": "debit_note.email.complained";
|
|
1064
|
+
}>>, z.ZodTransform<("invoice.accepted_by_dian" | "invoice.rejected_by_dian" | "invoice.accepted_contingency" | "invoice.failed" | "credit_note.accepted_by_dian" | "credit_note.rejected_by_dian" | "credit_note.accepted_contingency" | "credit_note.failed" | "debit_note.accepted_by_dian" | "debit_note.rejected_by_dian" | "debit_note.accepted_contingency" | "debit_note.failed" | "invoice.email.delivered" | "invoice.email.bounced" | "invoice.email.complained" | "credit_note.email.delivered" | "credit_note.email.bounced" | "credit_note.email.complained" | "debit_note.email.delivered" | "debit_note.email.bounced" | "debit_note.email.complained")[], ("invoice.accepted_by_dian" | "invoice.rejected_by_dian" | "invoice.accepted_contingency" | "invoice.failed" | "credit_note.accepted_by_dian" | "credit_note.rejected_by_dian" | "credit_note.accepted_contingency" | "credit_note.failed" | "debit_note.accepted_by_dian" | "debit_note.rejected_by_dian" | "debit_note.accepted_contingency" | "debit_note.failed" | "invoice.email.delivered" | "invoice.email.bounced" | "invoice.email.complained" | "credit_note.email.delivered" | "credit_note.email.bounced" | "credit_note.email.complained" | "debit_note.email.delivered" | "debit_note.email.bounced" | "debit_note.email.complained")[]>>>;
|
|
1065
|
+
is_active: z.ZodOptional<z.ZodBoolean>;
|
|
1066
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1067
|
+
}, z.core.$strip>;
|
|
1068
|
+
|
|
1069
|
+
/**
|
|
1070
|
+
* Canonical webhook event-type registry — the SINGLE source of truth.
|
|
1071
|
+
*
|
|
1072
|
+
* These are the event types produced by the FE emission pipeline and consumed by
|
|
1073
|
+
* the webhook fan-out, the webhook-endpoints subscription validation, and the
|
|
1074
|
+
* SDK constructEvent. There must be exactly ONE list, exported from here. All
|
|
1075
|
+
* consumers (worker, api, sdk-node) import from this module. NO parallel lists.
|
|
1076
|
+
*
|
|
1077
|
+
* Strings are verbatim from their origin call-sites:
|
|
1078
|
+
* - DIAN outcomes: apps/worker/src/steps/persist-result.ts (outcomeEventType)
|
|
1079
|
+
* Format: `{object_type}.{verb}` where verb ∈ {accepted_by_dian,
|
|
1080
|
+
* rejected_by_dian, accepted_contingency, failed}
|
|
1081
|
+
* - Email events: apps/api/src/modules/webhooks/resend.service.ts (fanOutEmailEvent)
|
|
1082
|
+
* Format: `{document_kind}.email.{suffix}` where suffix ∈ {delivered, bounced, complained}
|
|
1083
|
+
*
|
|
1084
|
+
* Any change to these strings MUST be accompanied by a DB migration renaming
|
|
1085
|
+
* existing events rows, since `events.type` stores these verbatim strings.
|
|
1086
|
+
*/
|
|
1087
|
+
/**
|
|
1088
|
+
* ⚠️ MIGRATION WARNING — these strings are persisted verbatim in `events.type`.
|
|
1089
|
+
*
|
|
1090
|
+
* - ADDING a new event type is SAFE (no historical rows reference it).
|
|
1091
|
+
* - RENAMING or DELETING an existing string is NOT safe: historical `events`
|
|
1092
|
+
* rows (and any webhook-endpoint `subscribed_events` arrays) already store
|
|
1093
|
+
* the old value. Any rename/removal MUST ship a DB data migration that
|
|
1094
|
+
* updates `events.type` (and subscriptions) for existing rows, or webhook
|
|
1095
|
+
* delivery/subscription matching will silently break for past events.
|
|
1096
|
+
*
|
|
1097
|
+
* All webhook event types emitted by the Emitia platform.
|
|
1098
|
+
*/
|
|
1099
|
+
declare const WEBHOOK_EVENT_TYPES: readonly ["invoice.accepted_by_dian", "invoice.rejected_by_dian", "invoice.accepted_contingency", "invoice.failed", "credit_note.accepted_by_dian", "credit_note.rejected_by_dian", "credit_note.accepted_contingency", "credit_note.failed", "debit_note.accepted_by_dian", "debit_note.rejected_by_dian", "debit_note.accepted_contingency", "debit_note.failed", "invoice.email.delivered", "invoice.email.bounced", "invoice.email.complained", "credit_note.email.delivered", "credit_note.email.bounced", "credit_note.email.complained", "debit_note.email.delivered", "debit_note.email.bounced", "debit_note.email.complained"];
|
|
1100
|
+
/** A valid webhook event type emitted by the Emitia platform. */
|
|
1101
|
+
type WebhookEventType = (typeof WEBHOOK_EVENT_TYPES)[number];
|
|
2909
1102
|
|
|
2910
1103
|
/**
|
|
2911
1104
|
* Generated SDK types inferred from @emitia/openapi Zod schemas.
|
|
2912
1105
|
*
|
|
2913
|
-
* ADR-1:
|
|
1106
|
+
* ADR-1: types come from @emitia/openapi (devDependency, type-only).
|
|
2914
1107
|
* @emitia/openapi is NEVER bundled into dist — types are erased at runtime.
|
|
2915
1108
|
*
|
|
1109
|
+
* Convención: REQUEST/input types (los que el consumidor PASA) usan `z.input`,
|
|
1110
|
+
* para que los campos con `.default()` en el schema sean OPCIONALES en la firma
|
|
1111
|
+
* del SDK (el server aplica el default). RESPONSE/output types usan `z.infer`
|
|
1112
|
+
* (el consumidor RECIBE el objeto ya con defaults aplicados).
|
|
1113
|
+
*
|
|
2916
1114
|
* This file is purely a type alias re-export. No runtime code.
|
|
2917
1115
|
*/
|
|
2918
1116
|
|
|
@@ -2923,32 +1121,39 @@ type CatalogListResponse = z.infer<typeof CatalogListResponseSchema>;
|
|
|
2923
1121
|
type MunicipioItem = z.infer<typeof MunicipioItemSchema>;
|
|
2924
1122
|
type MunicipioListResponse = z.infer<typeof MunicipioListResponseSchema>;
|
|
2925
1123
|
type CustomerResponse = z.infer<typeof CustomerResponseSchema>;
|
|
2926
|
-
type CreateCustomerRequest = z.
|
|
1124
|
+
type CreateCustomerRequest = z.input<typeof CreateCustomerRequestSchema>;
|
|
2927
1125
|
type CustomerListResponse = z.infer<typeof CustomerListResponseSchema>;
|
|
2928
1126
|
type NumberingResolutionResponse = z.infer<typeof NumberingResolutionResponseSchema>;
|
|
2929
|
-
type CreateNumberingResolutionRequest = z.
|
|
1127
|
+
type CreateNumberingResolutionRequest = z.input<typeof CreateNumberingResolutionRequestSchema>;
|
|
2930
1128
|
type NumberingResolutionListResponse = z.infer<typeof NumberingResolutionListResponseSchema>;
|
|
2931
1129
|
type InvoiceResponse = z.infer<typeof InvoiceResponseSchema>;
|
|
2932
1130
|
type InvoiceDetailResponse = z.infer<typeof InvoiceDetailResponseSchema>;
|
|
2933
1131
|
type InvoiceListResponse = z.infer<typeof InvoiceListResponseSchema>;
|
|
2934
|
-
type CreateInvoiceRequest = z.
|
|
1132
|
+
type CreateInvoiceRequest = z.input<typeof CreateInvoiceRequestSchema>;
|
|
2935
1133
|
type EmailDeliveryResponse = z.infer<typeof EmailDeliveryResponseSchema>;
|
|
2936
1134
|
type EmailDeliveryListResponse = z.infer<typeof EmailDeliveryListResponseSchema>;
|
|
2937
|
-
type SendEmailRequest = z.
|
|
1135
|
+
type SendEmailRequest = z.input<typeof SendEmailRequestSchema>;
|
|
2938
1136
|
type EmailContentResponse = z.infer<typeof EmailContentResponseSchema>;
|
|
2939
1137
|
type CreditNoteResponse = z.infer<typeof CreditNoteResponseSchema>;
|
|
2940
1138
|
type CreditNoteDetailResponse = z.infer<typeof CreditNoteDetailResponseSchema>;
|
|
2941
1139
|
type CreditNoteListResponse = z.infer<typeof CreditNoteListResponseSchema>;
|
|
2942
|
-
type CreateCreditNoteRequest = z.
|
|
1140
|
+
type CreateCreditNoteRequest = z.input<typeof CreateCreditNoteRequestSchema>;
|
|
2943
1141
|
type DebitNoteResponse = z.infer<typeof DebitNoteResponseSchema>;
|
|
2944
1142
|
type DebitNoteDetailResponse = z.infer<typeof DebitNoteDetailResponseSchema>;
|
|
2945
1143
|
type DebitNoteListResponse = z.infer<typeof DebitNoteListResponseSchema>;
|
|
2946
|
-
type CreateDebitNoteRequest = z.
|
|
1144
|
+
type CreateDebitNoteRequest = z.input<typeof CreateDebitNoteRequestSchema>;
|
|
2947
1145
|
type CertificateResponse = z.infer<typeof CertificateResponseSchema>;
|
|
2948
|
-
type CreateCertificateRequest = z.
|
|
1146
|
+
type CreateCertificateRequest = z.input<typeof CreateCertificateRequestSchema>;
|
|
2949
1147
|
type CertificateListResponse = z.infer<typeof CertificateListResponseSchema>;
|
|
2950
|
-
type TriggerEventBody = z.
|
|
1148
|
+
type TriggerEventBody = z.input<typeof TriggerEventBodySchema>;
|
|
2951
1149
|
type TriggerEventResponse = z.infer<typeof TriggerEventResponseSchema>;
|
|
1150
|
+
type WebhookEndpointResponse = z.infer<typeof WebhookEndpointResponseSchema>;
|
|
1151
|
+
type CreateWebhookEndpointResponse = z.infer<typeof CreateWebhookEndpointResponseSchema>;
|
|
1152
|
+
type RotateSecretResponse = z.infer<typeof RotateSecretResponseSchema>;
|
|
1153
|
+
type DeleteWebhookEndpointResponse = z.infer<typeof DeleteWebhookEndpointResponseSchema>;
|
|
1154
|
+
type WebhookEndpointListResponse = z.infer<typeof WebhookEndpointListResponseSchema>;
|
|
1155
|
+
type CreateWebhookEndpointRequest = z.input<typeof CreateWebhookEndpointRequestSchema>;
|
|
1156
|
+
type UpdateWebhookEndpointRequest = z.input<typeof UpdateWebhookEndpointRequestSchema>;
|
|
2952
1157
|
|
|
2953
1158
|
/**
|
|
2954
1159
|
* HTTP transport for the @emitia/node SDK.
|
|
@@ -3386,6 +1591,69 @@ declare class TestResource extends BaseResource {
|
|
|
3386
1591
|
triggerEvent(body: TriggerEventBody): Promise<TriggerEventResponse>;
|
|
3387
1592
|
}
|
|
3388
1593
|
|
|
1594
|
+
/**
|
|
1595
|
+
* WebhookEndpointsResource — read + write methods for /v1/webhook-endpoints
|
|
1596
|
+
*
|
|
1597
|
+
* R06: create(body, opts?), list(params?), retrieve(id), update(id, body), del(id), rotateSecret(id).
|
|
1598
|
+
* R03: create() is a POST that creates a resource — auto-generates idempotency-key.
|
|
1599
|
+
* rotateSecret() does NOT auto-generate (no Idempotency-Key header in openapi spec).
|
|
1600
|
+
* PATCH and DELETE do NOT carry idempotency-key.
|
|
1601
|
+
*
|
|
1602
|
+
* Security invariants:
|
|
1603
|
+
* - create() and rotateSecret() responses include `secret` (whsec_... returned ONCE).
|
|
1604
|
+
* - list(), retrieve(), update() responses do NOT include `secret`.
|
|
1605
|
+
* - del() response includes `deleted: true` (hard delete).
|
|
1606
|
+
*/
|
|
1607
|
+
|
|
1608
|
+
interface WebhookEndpointListParams {
|
|
1609
|
+
/** Number of results per page (1–100, default 20). */
|
|
1610
|
+
limit?: number;
|
|
1611
|
+
/** Opaque cursor for pagination (ID of the last item from the previous page). */
|
|
1612
|
+
starting_after?: string;
|
|
1613
|
+
}
|
|
1614
|
+
interface WebhookEndpointCreateOpts {
|
|
1615
|
+
/** Explicit idempotency key. When omitted a UUID v4 is auto-generated (R03). */
|
|
1616
|
+
idempotencyKey?: string;
|
|
1617
|
+
}
|
|
1618
|
+
declare class WebhookEndpointsResource extends BaseResource {
|
|
1619
|
+
/**
|
|
1620
|
+
* POST /v1/webhook-endpoints — Create a webhook endpoint.
|
|
1621
|
+
* Returns 201. Auto-generates idempotency-key (R03).
|
|
1622
|
+
* The signing secret (whsec_...) is returned ONCE in the response — store it immediately.
|
|
1623
|
+
*/
|
|
1624
|
+
create(body: CreateWebhookEndpointRequest, opts?: WebhookEndpointCreateOpts): Promise<CreateWebhookEndpointResponse>;
|
|
1625
|
+
/**
|
|
1626
|
+
* GET /v1/webhook-endpoints
|
|
1627
|
+
* Returns a cursor-paginated list of webhook endpoints.
|
|
1628
|
+
* The signing secret is NEVER included in list responses.
|
|
1629
|
+
*/
|
|
1630
|
+
list(params?: WebhookEndpointListParams): Promise<WebhookEndpointListResponse>;
|
|
1631
|
+
/**
|
|
1632
|
+
* GET /v1/webhook-endpoints/{id}
|
|
1633
|
+
* Returns a webhook endpoint by public ID.
|
|
1634
|
+
* 404 if not found or belongs to a different tenant.
|
|
1635
|
+
* The signing secret is NEVER included in get responses.
|
|
1636
|
+
*/
|
|
1637
|
+
retrieve(id: string): Promise<WebhookEndpointResponse>;
|
|
1638
|
+
/**
|
|
1639
|
+
* PATCH /v1/webhook-endpoints/{id} — Partially update a webhook endpoint.
|
|
1640
|
+
* Returns 200 with updated WebhookEndpointResponse. No idempotency-key.
|
|
1641
|
+
* The signing secret is NEVER included in update responses.
|
|
1642
|
+
*/
|
|
1643
|
+
update(id: string, body: UpdateWebhookEndpointRequest): Promise<WebhookEndpointResponse>;
|
|
1644
|
+
/**
|
|
1645
|
+
* DELETE /v1/webhook-endpoints/{id} — Hard-delete a webhook endpoint.
|
|
1646
|
+
* Returns 200 with { id, object, deleted: true }. No idempotency-key.
|
|
1647
|
+
*/
|
|
1648
|
+
del(id: string): Promise<DeleteWebhookEndpointResponse>;
|
|
1649
|
+
/**
|
|
1650
|
+
* POST /v1/webhook-endpoints/{id}/rotate-secret
|
|
1651
|
+
* Generates a new signing secret (ADR-2: instant rotation, no grace period).
|
|
1652
|
+
* The new whsec_ is returned ONCE — store it immediately. No idempotency-key.
|
|
1653
|
+
*/
|
|
1654
|
+
rotateSecret(id: string): Promise<RotateSecretResponse>;
|
|
1655
|
+
}
|
|
1656
|
+
|
|
3389
1657
|
/**
|
|
3390
1658
|
* Emitia SDK client.
|
|
3391
1659
|
*
|
|
@@ -3417,6 +1685,7 @@ declare class Emitia {
|
|
|
3417
1685
|
readonly creditNotes: CreditNotesResource;
|
|
3418
1686
|
readonly debitNotes: DebitNotesResource;
|
|
3419
1687
|
readonly test: TestResource;
|
|
1688
|
+
readonly webhookEndpoints: WebhookEndpointsResource;
|
|
3420
1689
|
constructor(apiKey: string, opts?: EmitiaOptions);
|
|
3421
1690
|
}
|
|
3422
1691
|
|
|
@@ -3428,15 +1697,29 @@ declare class Emitia {
|
|
|
3428
1697
|
* Design: SDK redeclares its own hierarchy. Does NOT import @emitia/shared
|
|
3429
1698
|
* at runtime — @emitia/shared is a backend-private package.
|
|
3430
1699
|
*
|
|
3431
|
-
* Mapping
|
|
3432
|
-
*
|
|
3433
|
-
*
|
|
3434
|
-
*
|
|
3435
|
-
*
|
|
3436
|
-
*
|
|
3437
|
-
*
|
|
3438
|
-
* type=
|
|
3439
|
-
*
|
|
1700
|
+
* Mapping keys are the `error.type` strings the API actually emits (see
|
|
1701
|
+
* `EmitiaErrorType` in @emitia/shared/errors.ts). The SDK redeclares them as plain
|
|
1702
|
+
* strings — it does NOT import @emitia/shared at runtime (backend-private package).
|
|
1703
|
+
*
|
|
1704
|
+
* Mapping (1:1 with the `type`s the API emits — see EmitiaErrorType in @emitia/shared):
|
|
1705
|
+
* type=authentication_error → AuthenticationError (401)
|
|
1706
|
+
* type=permission_error → PermissionError (403)
|
|
1707
|
+
* type=not_found → NotFoundError (404)
|
|
1708
|
+
* type=validation_error → ValidationError (400; schema/format)
|
|
1709
|
+
* type=invalid_request → InvalidRequestError (400/409/422; unprocessable state)
|
|
1710
|
+
* type=numbering_error → NumberingError (422)
|
|
1711
|
+
* type=certificate_error → CertificateError (400)
|
|
1712
|
+
* type=rate_limited → RateLimitError (429)
|
|
1713
|
+
* type=idempotency_error → IdempotencyError (409; Idempotency-Key reuse only)
|
|
1714
|
+
* type=dian_rejected → DianRejectedError (reserved)
|
|
1715
|
+
* type=internal_error → ApiError (500)
|
|
1716
|
+
* type=api_error → ApiError (503)
|
|
1717
|
+
* unknown type → HTTP-status class → ApiError
|
|
1718
|
+
*
|
|
1719
|
+
* "reserved" = present in the EmitiaErrorType union but surfaced asynchronously
|
|
1720
|
+
* (DIAN rejections arrive via document status + webhook events, not as a synchronous
|
|
1721
|
+
* HTTP error), mapped here for forward-compatibility. `err.statusCode` always carries
|
|
1722
|
+
* the real HTTP status, so internal_error (500) vs api_error (503) stay distinguishable.
|
|
3440
1723
|
*/
|
|
3441
1724
|
interface ErrorPayloadInner {
|
|
3442
1725
|
type: string;
|
|
@@ -3474,16 +1757,18 @@ declare class PermissionError extends EmitiaError {
|
|
|
3474
1757
|
}
|
|
3475
1758
|
declare class NotFoundError extends EmitiaError {
|
|
3476
1759
|
}
|
|
1760
|
+
/** Schema/format validation failure (type=validation_error). */
|
|
3477
1761
|
declare class ValidationError extends EmitiaError {
|
|
3478
1762
|
}
|
|
1763
|
+
/** Valid request, unprocessable by resource state / business precondition (type=invalid_request). */
|
|
1764
|
+
declare class InvalidRequestError extends EmitiaError {
|
|
1765
|
+
}
|
|
3479
1766
|
declare class RateLimitError extends EmitiaError {
|
|
3480
1767
|
}
|
|
3481
1768
|
declare class IdempotencyError extends EmitiaError {
|
|
3482
1769
|
}
|
|
3483
1770
|
declare class DianRejectedError extends EmitiaError {
|
|
3484
1771
|
}
|
|
3485
|
-
declare class DianUnavailableError extends EmitiaError {
|
|
3486
|
-
}
|
|
3487
1772
|
declare class CertificateError extends EmitiaError {
|
|
3488
1773
|
}
|
|
3489
1774
|
declare class NumberingError extends EmitiaError {
|
|
@@ -3527,6 +1812,7 @@ declare function fromPayload(envelope: ErrorEnvelope, httpStatus: number, reques
|
|
|
3527
1812
|
* - JSON.parse is called ONLY after signature verification — never on
|
|
3528
1813
|
* unverified input first.
|
|
3529
1814
|
*/
|
|
1815
|
+
|
|
3530
1816
|
/**
|
|
3531
1817
|
* Emitia webhook event shape.
|
|
3532
1818
|
*
|
|
@@ -3535,12 +1821,20 @@ declare function fromPayload(envelope: ErrorEnvelope, httpStatus: number, reques
|
|
|
3535
1821
|
*
|
|
3536
1822
|
* NOTE: There is no shared schema in @emitia/openapi for the event envelope —
|
|
3537
1823
|
* it is built inline in the worker. This type mirrors that shape exactly.
|
|
1824
|
+
*
|
|
1825
|
+
* P3-2.2: `type` is narrowed to WebhookEventType (union of 21 known event types
|
|
1826
|
+
* from @emitia/shared SSOT, re-exported via @emitia/openapi). Callers performing
|
|
1827
|
+
* a switch/exhaustive check on `.type` get compile-time exhaustiveness checking.
|
|
3538
1828
|
*/
|
|
3539
1829
|
interface EmitiaEvent {
|
|
3540
1830
|
/** Event ID (e.g. "evt_01HX..."). */
|
|
3541
1831
|
id: string;
|
|
3542
|
-
/**
|
|
3543
|
-
|
|
1832
|
+
/**
|
|
1833
|
+
* Event type. One of the 21 known Emitia event types
|
|
1834
|
+
* (e.g. "invoice.accepted_by_dian", "invoice.rejected_by_dian", etc.).
|
|
1835
|
+
* Narrowed to WebhookEventType for compile-time exhaustiveness checking.
|
|
1836
|
+
*/
|
|
1837
|
+
type: WebhookEventType;
|
|
3544
1838
|
/** API version that generated this event (e.g. "2024-01-01"). */
|
|
3545
1839
|
api_version: string;
|
|
3546
1840
|
/** Unix timestamp (seconds) when the event was created. */
|
|
@@ -3582,6 +1876,6 @@ declare function constructEvent(payload: string | Buffer, signatureHeader: strin
|
|
|
3582
1876
|
* Not imported via import JSON (fragile ESM) — kept in sync by a test guard
|
|
3583
1877
|
* (src/__tests__/version.test.ts) that fails if they diverge.
|
|
3584
1878
|
*/
|
|
3585
|
-
declare const SDK_VERSION = "0.
|
|
1879
|
+
declare const SDK_VERSION = "0.2.0";
|
|
3586
1880
|
|
|
3587
|
-
export { type AccountInfo, ApiError, AuthenticationError, type BalanceResponse, type CatalogItem, type CatalogListResponse, CertificateError, type CertificateListResponse, type CertificateResponse, type CreateCertificateRequest, type CreateCreditNoteRequest, type CreateCustomerRequest, type CreateDebitNoteRequest, type CreateInvoiceRequest, type CreateNumberingResolutionRequest, type CreditNoteDetailResponse, type CreditNoteListResponse, type CreditNoteResponse, type CustomerListResponse, type CustomerResponse, type DebitNoteDetailResponse, type DebitNoteListResponse, type DebitNoteResponse,
|
|
1881
|
+
export { type AccountInfo, ApiError, AuthenticationError, type BalanceResponse, type CatalogItem, type CatalogListResponse, CertificateError, type CertificateListResponse, type CertificateResponse, type CreateCertificateRequest, type CreateCreditNoteRequest, type CreateCustomerRequest, type CreateDebitNoteRequest, type CreateInvoiceRequest, type CreateNumberingResolutionRequest, type CreateWebhookEndpointRequest, type CreateWebhookEndpointResponse, type CreditNoteDetailResponse, type CreditNoteListResponse, type CreditNoteResponse, type CustomerListResponse, type CustomerResponse, type DebitNoteDetailResponse, type DebitNoteListResponse, type DebitNoteResponse, type DeleteWebhookEndpointResponse, DianRejectedError, type EmailContentResponse, type EmailDeliveryListResponse, type EmailDeliveryResponse, Emitia, EmitiaError, type EmitiaEvent, type EmitiaOptions, IdempotencyError, InvalidRequestError, type InvoiceDetailResponse, type InvoiceListResponse, type InvoiceResponse, type MunicipioItem, type MunicipioListResponse, NotFoundError, NumberingError, type NumberingResolutionListResponse, type NumberingResolutionResponse, PermissionError, RateLimitError, type RotateSecretResponse, SDK_VERSION, type SendEmailRequest, SignatureVerificationError, type SignatureVerificationReason, type TriggerEventBody, type TriggerEventResponse, type UpdateWebhookEndpointRequest, ValidationError, type WebhookEndpointListResponse, type WebhookEndpointResponse, constructEvent, fromPayload, isErrorEnvelope };
|