@neo-edi/types 0.1.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.
@@ -0,0 +1,401 @@
1
+ /**
2
+ * Customer entity types
3
+ */
4
+ interface EdiCustomer {
5
+ customerId: string;
6
+ customerName: string;
7
+ isActive: boolean;
8
+ customerMetadata: Record<string, unknown>;
9
+ createdAt: Date;
10
+ updatedAt: Date;
11
+ }
12
+ interface CreateCustomerRequest {
13
+ customerId: string;
14
+ customerName: string;
15
+ isActive?: boolean;
16
+ customerMetadata?: Record<string, unknown>;
17
+ }
18
+ interface UpdateCustomerRequest {
19
+ customerName?: string;
20
+ isActive?: boolean;
21
+ customerMetadata?: Record<string, unknown>;
22
+ }
23
+ interface ListCustomersParams {
24
+ search?: string;
25
+ isActive?: boolean;
26
+ limit?: number;
27
+ offset?: number;
28
+ }
29
+
30
+ /**
31
+ * Partner entity types
32
+ */
33
+ interface Address {
34
+ street?: string;
35
+ city?: string;
36
+ state?: string;
37
+ zip?: string;
38
+ country?: string;
39
+ }
40
+ interface EdiPartner {
41
+ partnerId: string;
42
+ partnerName: string;
43
+ email: string;
44
+ phone?: string | null;
45
+ image?: string | null;
46
+ address: Address;
47
+ ediQualifier?: string | null;
48
+ ediIdentifier?: string | null;
49
+ partnerMetadata: Record<string, unknown>;
50
+ isActive: boolean;
51
+ createdAt: Date | null;
52
+ updatedAt: Date;
53
+ }
54
+ interface CreatePartnerRequest {
55
+ partnerId: string;
56
+ partnerName: string;
57
+ email: string;
58
+ phone?: string;
59
+ image?: string;
60
+ address?: Address;
61
+ ediQualifier?: string;
62
+ ediIdentifier?: string;
63
+ partnerMetadata?: Record<string, unknown>;
64
+ }
65
+ interface UpdatePartnerRequest {
66
+ partnerName?: string;
67
+ email?: string;
68
+ phone?: string;
69
+ image?: string;
70
+ address?: Address;
71
+ ediQualifier?: string;
72
+ ediIdentifier?: string;
73
+ partnerMetadata?: Record<string, unknown>;
74
+ isActive?: boolean;
75
+ }
76
+
77
+ /**
78
+ * Partner-Customer relationship types
79
+ */
80
+ interface EdiPartnerCustomer {
81
+ id: string;
82
+ tradingPartnerId: string;
83
+ customerId: string;
84
+ tradingPartnerLocationId?: string | null;
85
+ customerLocationId?: string | null;
86
+ isActive: boolean;
87
+ notes?: string | null;
88
+ createdAt: Date;
89
+ updatedAt: Date;
90
+ }
91
+ interface RegisterPartnerCustomerRequest {
92
+ customerId: string;
93
+ tradingPartnerIds: string[];
94
+ isActive?: boolean;
95
+ notes?: string;
96
+ }
97
+ interface PartnerCustomerRegistrationResult {
98
+ customerId: string;
99
+ results: Array<{
100
+ tradingPartnerId: string;
101
+ created: boolean;
102
+ activated: boolean;
103
+ relationshipId: string;
104
+ }>;
105
+ }
106
+
107
+ /**
108
+ * EDI 852 (Product Activity Data) types
109
+ */
110
+ type Edi852Status = "pending" | "processed" | "rejected" | "archived";
111
+ interface Edi852Header {
112
+ id: string;
113
+ documentId: string;
114
+ reportTypeCode: string;
115
+ reportDate: string;
116
+ reportStartDate?: string | null;
117
+ reportEndDate?: string | null;
118
+ vendorCode?: string | null;
119
+ retailerCode?: string | null;
120
+ currencyCode?: string | null;
121
+ totalLocations?: number | null;
122
+ totalItems?: number | null;
123
+ status?: string | null;
124
+ metadata: Record<string, unknown>;
125
+ rawSegments: Record<string, unknown>;
126
+ vendorPartnerId: string;
127
+ retailerPartnerId?: string | null;
128
+ createdAt: Date;
129
+ updatedAt: Date;
130
+ }
131
+ interface Edi852Location {
132
+ id: string;
133
+ edi852HeaderId: string;
134
+ locationNumber: string;
135
+ locationName?: string | null;
136
+ locationType?: string | null;
137
+ address: Record<string, unknown>;
138
+ activityDate: string;
139
+ metadata: Record<string, unknown>;
140
+ createdAt: Date;
141
+ }
142
+ interface Edi852Item {
143
+ id: string;
144
+ edi852LocationId: string;
145
+ invoiceNumber?: string | null;
146
+ upc?: string | null;
147
+ ean?: string | null;
148
+ gtin?: string | null;
149
+ vendorPartNumber?: string | null;
150
+ buyerPartNumber?: string | null;
151
+ productDescription?: string | null;
152
+ quantityOnHand?: string | null;
153
+ quantitySold?: string | null;
154
+ quantityOnOrder?: string | null;
155
+ quantityReceived?: string | null;
156
+ quantityTransferredIn?: string | null;
157
+ quantityTransferredOut?: string | null;
158
+ quantityAdjusted?: string | null;
159
+ unitCost?: string | null;
160
+ suggestedRetailPrice?: string | null;
161
+ currentRetailPrice?: string | null;
162
+ unitOfMeasure?: string | null;
163
+ daysOnHand?: number | null;
164
+ lastSaleDate?: string | null;
165
+ lastReceiptDate?: string | null;
166
+ vendorData: Record<string, unknown>;
167
+ createdAt: Date;
168
+ updatedAt?: Date | null;
169
+ }
170
+ interface Edi852HeaderFilter {
171
+ id?: string;
172
+ documentId?: string;
173
+ vendorPartnerId?: string;
174
+ retailerPartnerId?: string;
175
+ status?: Edi852Status;
176
+ reportDateStart?: string;
177
+ reportDateEnd?: string;
178
+ limit?: number;
179
+ offset?: number;
180
+ }
181
+ interface Edi852DeliverySummary {
182
+ headerId: string;
183
+ documentId: string;
184
+ reportDate: string;
185
+ reportTypeCode: string;
186
+ vendorPartnerId: string;
187
+ retailerPartnerId?: string | null;
188
+ status: string;
189
+ totalLocations: number;
190
+ totalItems: number;
191
+ }
192
+
193
+ /**
194
+ * Mapping template types
195
+ */
196
+ interface EdiMappingTemplate {
197
+ id: string;
198
+ name: string;
199
+ description?: string | null;
200
+ targetTable: string;
201
+ mappingConfig: Record<string, unknown>;
202
+ transformationConfig?: Record<string, unknown> | null;
203
+ isPublic: boolean;
204
+ createdBy?: string | null;
205
+ usageCount: number;
206
+ tags: string[];
207
+ createdAt: Date;
208
+ updatedAt: Date;
209
+ }
210
+ interface CreateMappingTemplateRequest {
211
+ id?: string;
212
+ name: string;
213
+ description?: string;
214
+ targetTable: string;
215
+ mappingConfig: Record<string, unknown>;
216
+ transformationConfig?: Record<string, unknown>;
217
+ isPublic?: boolean;
218
+ tags?: string[];
219
+ }
220
+ interface UpdateMappingTemplateRequest {
221
+ name?: string;
222
+ description?: string;
223
+ targetTable?: string;
224
+ mappingConfig?: Record<string, unknown>;
225
+ transformationConfig?: Record<string, unknown>;
226
+ isPublic?: boolean;
227
+ tags?: string[];
228
+ }
229
+ interface ListMappingTemplatesParams {
230
+ search?: string;
231
+ targetTable?: string;
232
+ isPublic?: boolean;
233
+ limit?: number;
234
+ offset?: number;
235
+ }
236
+
237
+ /**
238
+ * CSV ingestion types
239
+ */
240
+ interface CsvHeaderMappingConfig {
241
+ id: string;
242
+ version: number;
243
+ table: {
244
+ name: string;
245
+ idempotentKey?: string[];
246
+ batchSize: number;
247
+ };
248
+ mapping: Record<string, string | string[]>;
249
+ defaults: Record<string, string>;
250
+ }
251
+ interface CsvHeaderTableEntry {
252
+ batchSize: number;
253
+ idempotentKey?: string[];
254
+ mapping: Record<string, string | string[]>;
255
+ defaults: Record<string, string>;
256
+ }
257
+ interface CsvHeaderMappingCollection {
258
+ id: string;
259
+ version: number;
260
+ tables: Record<string, CsvHeaderTableEntry>;
261
+ }
262
+ interface CsvHeaderDefinition {
263
+ name: string;
264
+ alias?: string;
265
+ description?: string;
266
+ required: boolean;
267
+ sampleValue?: string;
268
+ }
269
+ type CsvAddHeadersStrategy = "replace_all" | "fill_missing" | "prepend" | "append";
270
+ interface CsvAddHeadersTransformation {
271
+ id: string;
272
+ type: "csv_add_headers";
273
+ label?: string;
274
+ description?: string;
275
+ enabled: boolean;
276
+ priority: number;
277
+ appliesTo: {
278
+ dataset: "entire_file" | "first_row";
279
+ };
280
+ config: {
281
+ headers: CsvHeaderDefinition[];
282
+ strategy: CsvAddHeadersStrategy;
283
+ skipIfPresent: boolean;
284
+ fillMissingWith?: string;
285
+ };
286
+ conditions: {
287
+ whenMissingHeaderRow: boolean;
288
+ expectedHeaderCount?: number;
289
+ };
290
+ }
291
+ type CsvDataTransformationStep = CsvAddHeadersTransformation;
292
+ interface CsvDataTransformationConfig {
293
+ id: string;
294
+ version: number;
295
+ transformations: CsvDataTransformationStep[];
296
+ metadata: Record<string, unknown>;
297
+ notes?: string;
298
+ }
299
+ interface IngestCsvRequest {
300
+ partnerId: string;
301
+ mappingConfig: CsvHeaderMappingCollection;
302
+ transformationConfig?: CsvDataTransformationConfig;
303
+ dryRun?: boolean;
304
+ }
305
+ interface IngestCsvResult {
306
+ success: boolean;
307
+ stats: {
308
+ totalRows: number;
309
+ processedRows: number;
310
+ errorRows: number;
311
+ tables: Record<string, {
312
+ inserted: number;
313
+ updated: number;
314
+ skipped: number;
315
+ }>;
316
+ };
317
+ errors?: Array<{
318
+ row: number;
319
+ column?: string;
320
+ message: string;
321
+ }>;
322
+ warnings?: Array<{
323
+ row: number;
324
+ column?: string;
325
+ message: string;
326
+ }>;
327
+ }
328
+ interface DryRunResult {
329
+ valid: boolean;
330
+ stats: {
331
+ totalRows: number;
332
+ validRows: number;
333
+ errorRows: number;
334
+ };
335
+ errors: Array<{
336
+ row: number;
337
+ column?: string;
338
+ table?: string;
339
+ message: string;
340
+ errorType?: string;
341
+ }>;
342
+ warnings: Array<{
343
+ row: number;
344
+ column?: string;
345
+ message: string;
346
+ warningType?: string;
347
+ }>;
348
+ preview?: Array<Record<string, unknown>>;
349
+ }
350
+
351
+ /**
352
+ * API response wrapper types
353
+ */
354
+ interface ApiSuccessResponse<T> {
355
+ success: true;
356
+ data: T;
357
+ }
358
+ interface ApiErrorResponse {
359
+ success: false;
360
+ error: string;
361
+ code?: string;
362
+ details?: Record<string, unknown>;
363
+ }
364
+ type ApiResponse<T> = ApiSuccessResponse<T> | ApiErrorResponse;
365
+ interface PaginatedData<T> {
366
+ items: T[];
367
+ total: number;
368
+ limit: number;
369
+ offset: number;
370
+ hasMore: boolean;
371
+ }
372
+ type PaginatedResponse<T> = ApiResponse<PaginatedData<T>>;
373
+ /**
374
+ * Execution log types
375
+ */
376
+ interface ExecutionSummary {
377
+ tradingPartnerId: string;
378
+ customerId?: string | null;
379
+ lastExecutedAt: Date;
380
+ documentCount: number;
381
+ status: string;
382
+ }
383
+ interface ExecutionDetail {
384
+ id: string;
385
+ partnerId: string;
386
+ executionType: string;
387
+ status: string;
388
+ stats?: Record<string, unknown>;
389
+ errorMessage?: string | null;
390
+ createdAt: Date;
391
+ }
392
+ interface ListExecutionsParams {
393
+ partnerId: string;
394
+ startDate?: string;
395
+ endDate?: string;
396
+ status?: string;
397
+ limit?: number;
398
+ offset?: number;
399
+ }
400
+
401
+ export type { Address, ApiErrorResponse, ApiResponse, ApiSuccessResponse, CreateCustomerRequest, CreateMappingTemplateRequest, CreatePartnerRequest, CsvAddHeadersStrategy, CsvAddHeadersTransformation, CsvDataTransformationConfig, CsvDataTransformationStep, CsvHeaderDefinition, CsvHeaderMappingCollection, CsvHeaderMappingConfig, CsvHeaderTableEntry, DryRunResult, Edi852DeliverySummary, Edi852Header, Edi852HeaderFilter, Edi852Item, Edi852Location, Edi852Status, EdiCustomer, EdiMappingTemplate, EdiPartner, EdiPartnerCustomer, ExecutionDetail, ExecutionSummary, IngestCsvRequest, IngestCsvResult, ListCustomersParams, ListExecutionsParams, ListMappingTemplatesParams, PaginatedData, PaginatedResponse, PartnerCustomerRegistrationResult, RegisterPartnerCustomerRequest, UpdateCustomerRequest, UpdateMappingTemplateRequest, UpdatePartnerRequest };
@@ -0,0 +1,401 @@
1
+ /**
2
+ * Customer entity types
3
+ */
4
+ interface EdiCustomer {
5
+ customerId: string;
6
+ customerName: string;
7
+ isActive: boolean;
8
+ customerMetadata: Record<string, unknown>;
9
+ createdAt: Date;
10
+ updatedAt: Date;
11
+ }
12
+ interface CreateCustomerRequest {
13
+ customerId: string;
14
+ customerName: string;
15
+ isActive?: boolean;
16
+ customerMetadata?: Record<string, unknown>;
17
+ }
18
+ interface UpdateCustomerRequest {
19
+ customerName?: string;
20
+ isActive?: boolean;
21
+ customerMetadata?: Record<string, unknown>;
22
+ }
23
+ interface ListCustomersParams {
24
+ search?: string;
25
+ isActive?: boolean;
26
+ limit?: number;
27
+ offset?: number;
28
+ }
29
+
30
+ /**
31
+ * Partner entity types
32
+ */
33
+ interface Address {
34
+ street?: string;
35
+ city?: string;
36
+ state?: string;
37
+ zip?: string;
38
+ country?: string;
39
+ }
40
+ interface EdiPartner {
41
+ partnerId: string;
42
+ partnerName: string;
43
+ email: string;
44
+ phone?: string | null;
45
+ image?: string | null;
46
+ address: Address;
47
+ ediQualifier?: string | null;
48
+ ediIdentifier?: string | null;
49
+ partnerMetadata: Record<string, unknown>;
50
+ isActive: boolean;
51
+ createdAt: Date | null;
52
+ updatedAt: Date;
53
+ }
54
+ interface CreatePartnerRequest {
55
+ partnerId: string;
56
+ partnerName: string;
57
+ email: string;
58
+ phone?: string;
59
+ image?: string;
60
+ address?: Address;
61
+ ediQualifier?: string;
62
+ ediIdentifier?: string;
63
+ partnerMetadata?: Record<string, unknown>;
64
+ }
65
+ interface UpdatePartnerRequest {
66
+ partnerName?: string;
67
+ email?: string;
68
+ phone?: string;
69
+ image?: string;
70
+ address?: Address;
71
+ ediQualifier?: string;
72
+ ediIdentifier?: string;
73
+ partnerMetadata?: Record<string, unknown>;
74
+ isActive?: boolean;
75
+ }
76
+
77
+ /**
78
+ * Partner-Customer relationship types
79
+ */
80
+ interface EdiPartnerCustomer {
81
+ id: string;
82
+ tradingPartnerId: string;
83
+ customerId: string;
84
+ tradingPartnerLocationId?: string | null;
85
+ customerLocationId?: string | null;
86
+ isActive: boolean;
87
+ notes?: string | null;
88
+ createdAt: Date;
89
+ updatedAt: Date;
90
+ }
91
+ interface RegisterPartnerCustomerRequest {
92
+ customerId: string;
93
+ tradingPartnerIds: string[];
94
+ isActive?: boolean;
95
+ notes?: string;
96
+ }
97
+ interface PartnerCustomerRegistrationResult {
98
+ customerId: string;
99
+ results: Array<{
100
+ tradingPartnerId: string;
101
+ created: boolean;
102
+ activated: boolean;
103
+ relationshipId: string;
104
+ }>;
105
+ }
106
+
107
+ /**
108
+ * EDI 852 (Product Activity Data) types
109
+ */
110
+ type Edi852Status = "pending" | "processed" | "rejected" | "archived";
111
+ interface Edi852Header {
112
+ id: string;
113
+ documentId: string;
114
+ reportTypeCode: string;
115
+ reportDate: string;
116
+ reportStartDate?: string | null;
117
+ reportEndDate?: string | null;
118
+ vendorCode?: string | null;
119
+ retailerCode?: string | null;
120
+ currencyCode?: string | null;
121
+ totalLocations?: number | null;
122
+ totalItems?: number | null;
123
+ status?: string | null;
124
+ metadata: Record<string, unknown>;
125
+ rawSegments: Record<string, unknown>;
126
+ vendorPartnerId: string;
127
+ retailerPartnerId?: string | null;
128
+ createdAt: Date;
129
+ updatedAt: Date;
130
+ }
131
+ interface Edi852Location {
132
+ id: string;
133
+ edi852HeaderId: string;
134
+ locationNumber: string;
135
+ locationName?: string | null;
136
+ locationType?: string | null;
137
+ address: Record<string, unknown>;
138
+ activityDate: string;
139
+ metadata: Record<string, unknown>;
140
+ createdAt: Date;
141
+ }
142
+ interface Edi852Item {
143
+ id: string;
144
+ edi852LocationId: string;
145
+ invoiceNumber?: string | null;
146
+ upc?: string | null;
147
+ ean?: string | null;
148
+ gtin?: string | null;
149
+ vendorPartNumber?: string | null;
150
+ buyerPartNumber?: string | null;
151
+ productDescription?: string | null;
152
+ quantityOnHand?: string | null;
153
+ quantitySold?: string | null;
154
+ quantityOnOrder?: string | null;
155
+ quantityReceived?: string | null;
156
+ quantityTransferredIn?: string | null;
157
+ quantityTransferredOut?: string | null;
158
+ quantityAdjusted?: string | null;
159
+ unitCost?: string | null;
160
+ suggestedRetailPrice?: string | null;
161
+ currentRetailPrice?: string | null;
162
+ unitOfMeasure?: string | null;
163
+ daysOnHand?: number | null;
164
+ lastSaleDate?: string | null;
165
+ lastReceiptDate?: string | null;
166
+ vendorData: Record<string, unknown>;
167
+ createdAt: Date;
168
+ updatedAt?: Date | null;
169
+ }
170
+ interface Edi852HeaderFilter {
171
+ id?: string;
172
+ documentId?: string;
173
+ vendorPartnerId?: string;
174
+ retailerPartnerId?: string;
175
+ status?: Edi852Status;
176
+ reportDateStart?: string;
177
+ reportDateEnd?: string;
178
+ limit?: number;
179
+ offset?: number;
180
+ }
181
+ interface Edi852DeliverySummary {
182
+ headerId: string;
183
+ documentId: string;
184
+ reportDate: string;
185
+ reportTypeCode: string;
186
+ vendorPartnerId: string;
187
+ retailerPartnerId?: string | null;
188
+ status: string;
189
+ totalLocations: number;
190
+ totalItems: number;
191
+ }
192
+
193
+ /**
194
+ * Mapping template types
195
+ */
196
+ interface EdiMappingTemplate {
197
+ id: string;
198
+ name: string;
199
+ description?: string | null;
200
+ targetTable: string;
201
+ mappingConfig: Record<string, unknown>;
202
+ transformationConfig?: Record<string, unknown> | null;
203
+ isPublic: boolean;
204
+ createdBy?: string | null;
205
+ usageCount: number;
206
+ tags: string[];
207
+ createdAt: Date;
208
+ updatedAt: Date;
209
+ }
210
+ interface CreateMappingTemplateRequest {
211
+ id?: string;
212
+ name: string;
213
+ description?: string;
214
+ targetTable: string;
215
+ mappingConfig: Record<string, unknown>;
216
+ transformationConfig?: Record<string, unknown>;
217
+ isPublic?: boolean;
218
+ tags?: string[];
219
+ }
220
+ interface UpdateMappingTemplateRequest {
221
+ name?: string;
222
+ description?: string;
223
+ targetTable?: string;
224
+ mappingConfig?: Record<string, unknown>;
225
+ transformationConfig?: Record<string, unknown>;
226
+ isPublic?: boolean;
227
+ tags?: string[];
228
+ }
229
+ interface ListMappingTemplatesParams {
230
+ search?: string;
231
+ targetTable?: string;
232
+ isPublic?: boolean;
233
+ limit?: number;
234
+ offset?: number;
235
+ }
236
+
237
+ /**
238
+ * CSV ingestion types
239
+ */
240
+ interface CsvHeaderMappingConfig {
241
+ id: string;
242
+ version: number;
243
+ table: {
244
+ name: string;
245
+ idempotentKey?: string[];
246
+ batchSize: number;
247
+ };
248
+ mapping: Record<string, string | string[]>;
249
+ defaults: Record<string, string>;
250
+ }
251
+ interface CsvHeaderTableEntry {
252
+ batchSize: number;
253
+ idempotentKey?: string[];
254
+ mapping: Record<string, string | string[]>;
255
+ defaults: Record<string, string>;
256
+ }
257
+ interface CsvHeaderMappingCollection {
258
+ id: string;
259
+ version: number;
260
+ tables: Record<string, CsvHeaderTableEntry>;
261
+ }
262
+ interface CsvHeaderDefinition {
263
+ name: string;
264
+ alias?: string;
265
+ description?: string;
266
+ required: boolean;
267
+ sampleValue?: string;
268
+ }
269
+ type CsvAddHeadersStrategy = "replace_all" | "fill_missing" | "prepend" | "append";
270
+ interface CsvAddHeadersTransformation {
271
+ id: string;
272
+ type: "csv_add_headers";
273
+ label?: string;
274
+ description?: string;
275
+ enabled: boolean;
276
+ priority: number;
277
+ appliesTo: {
278
+ dataset: "entire_file" | "first_row";
279
+ };
280
+ config: {
281
+ headers: CsvHeaderDefinition[];
282
+ strategy: CsvAddHeadersStrategy;
283
+ skipIfPresent: boolean;
284
+ fillMissingWith?: string;
285
+ };
286
+ conditions: {
287
+ whenMissingHeaderRow: boolean;
288
+ expectedHeaderCount?: number;
289
+ };
290
+ }
291
+ type CsvDataTransformationStep = CsvAddHeadersTransformation;
292
+ interface CsvDataTransformationConfig {
293
+ id: string;
294
+ version: number;
295
+ transformations: CsvDataTransformationStep[];
296
+ metadata: Record<string, unknown>;
297
+ notes?: string;
298
+ }
299
+ interface IngestCsvRequest {
300
+ partnerId: string;
301
+ mappingConfig: CsvHeaderMappingCollection;
302
+ transformationConfig?: CsvDataTransformationConfig;
303
+ dryRun?: boolean;
304
+ }
305
+ interface IngestCsvResult {
306
+ success: boolean;
307
+ stats: {
308
+ totalRows: number;
309
+ processedRows: number;
310
+ errorRows: number;
311
+ tables: Record<string, {
312
+ inserted: number;
313
+ updated: number;
314
+ skipped: number;
315
+ }>;
316
+ };
317
+ errors?: Array<{
318
+ row: number;
319
+ column?: string;
320
+ message: string;
321
+ }>;
322
+ warnings?: Array<{
323
+ row: number;
324
+ column?: string;
325
+ message: string;
326
+ }>;
327
+ }
328
+ interface DryRunResult {
329
+ valid: boolean;
330
+ stats: {
331
+ totalRows: number;
332
+ validRows: number;
333
+ errorRows: number;
334
+ };
335
+ errors: Array<{
336
+ row: number;
337
+ column?: string;
338
+ table?: string;
339
+ message: string;
340
+ errorType?: string;
341
+ }>;
342
+ warnings: Array<{
343
+ row: number;
344
+ column?: string;
345
+ message: string;
346
+ warningType?: string;
347
+ }>;
348
+ preview?: Array<Record<string, unknown>>;
349
+ }
350
+
351
+ /**
352
+ * API response wrapper types
353
+ */
354
+ interface ApiSuccessResponse<T> {
355
+ success: true;
356
+ data: T;
357
+ }
358
+ interface ApiErrorResponse {
359
+ success: false;
360
+ error: string;
361
+ code?: string;
362
+ details?: Record<string, unknown>;
363
+ }
364
+ type ApiResponse<T> = ApiSuccessResponse<T> | ApiErrorResponse;
365
+ interface PaginatedData<T> {
366
+ items: T[];
367
+ total: number;
368
+ limit: number;
369
+ offset: number;
370
+ hasMore: boolean;
371
+ }
372
+ type PaginatedResponse<T> = ApiResponse<PaginatedData<T>>;
373
+ /**
374
+ * Execution log types
375
+ */
376
+ interface ExecutionSummary {
377
+ tradingPartnerId: string;
378
+ customerId?: string | null;
379
+ lastExecutedAt: Date;
380
+ documentCount: number;
381
+ status: string;
382
+ }
383
+ interface ExecutionDetail {
384
+ id: string;
385
+ partnerId: string;
386
+ executionType: string;
387
+ status: string;
388
+ stats?: Record<string, unknown>;
389
+ errorMessage?: string | null;
390
+ createdAt: Date;
391
+ }
392
+ interface ListExecutionsParams {
393
+ partnerId: string;
394
+ startDate?: string;
395
+ endDate?: string;
396
+ status?: string;
397
+ limit?: number;
398
+ offset?: number;
399
+ }
400
+
401
+ export type { Address, ApiErrorResponse, ApiResponse, ApiSuccessResponse, CreateCustomerRequest, CreateMappingTemplateRequest, CreatePartnerRequest, CsvAddHeadersStrategy, CsvAddHeadersTransformation, CsvDataTransformationConfig, CsvDataTransformationStep, CsvHeaderDefinition, CsvHeaderMappingCollection, CsvHeaderMappingConfig, CsvHeaderTableEntry, DryRunResult, Edi852DeliverySummary, Edi852Header, Edi852HeaderFilter, Edi852Item, Edi852Location, Edi852Status, EdiCustomer, EdiMappingTemplate, EdiPartner, EdiPartnerCustomer, ExecutionDetail, ExecutionSummary, IngestCsvRequest, IngestCsvResult, ListCustomersParams, ListExecutionsParams, ListMappingTemplatesParams, PaginatedData, PaginatedResponse, PartnerCustomerRegistrationResult, RegisterPartnerCustomerRequest, UpdateCustomerRequest, UpdateMappingTemplateRequest, UpdatePartnerRequest };
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/index.ts
17
+ var index_exports = {};
18
+ module.exports = __toCommonJS(index_exports);
package/dist/index.mjs ADDED
File without changes
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@neo-edi/types",
3
+ "version": "0.1.0",
4
+ "description": "TypeScript types for the Neo-EDI platform",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.mjs",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "devDependencies": {
19
+ "tsup": "^8.0.0",
20
+ "typescript": "^5.0.0"
21
+ },
22
+ "scripts": {
23
+ "build": "tsup src/index.ts --format cjs,esm --dts",
24
+ "dev": "tsup src/index.ts --format cjs,esm --dts --watch"
25
+ }
26
+ }