@endora-commerce/contracts 0.105.0 → 0.107.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin-contributions.d.ts +37 -6
- package/dist/admin-contributions.d.ts.map +1 -1
- package/dist/admin-contributions.js +37 -6
- package/dist/admin-contributions.js.map +1 -1
- package/dist/admin-roles.d.ts +32 -2
- package/dist/admin-roles.d.ts.map +1 -1
- package/dist/admin-roles.js +21 -1
- package/dist/admin-roles.js.map +1 -1
- package/dist/admin-search.d.ts +655 -0
- package/dist/admin-search.d.ts.map +1 -0
- package/dist/admin-search.js +179 -0
- package/dist/admin-search.js.map +1 -0
- package/dist/analytics.d.ts +5 -0
- package/dist/analytics.d.ts.map +1 -1
- package/dist/analytics.js +8 -0
- package/dist/analytics.js.map +1 -1
- package/dist/api-keys.d.ts +6 -0
- package/dist/api-keys.d.ts.map +1 -1
- package/dist/api-keys.js +5 -0
- package/dist/api-keys.js.map +1 -1
- package/dist/assets-library.d.ts +102 -0
- package/dist/assets-library.d.ts.map +1 -1
- package/dist/assets-library.js +89 -0
- package/dist/assets-library.js.map +1 -1
- package/dist/auth.d.ts +20 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +20 -0
- package/dist/auth.js.map +1 -1
- package/dist/blog.d.ts +1 -1
- package/dist/carts.d.ts +21 -6
- package/dist/carts.d.ts.map +1 -1
- package/dist/catalog.d.ts +58 -6
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +31 -0
- package/dist/catalog.js.map +1 -1
- package/dist/cms.d.ts +183 -3
- package/dist/cms.d.ts.map +1 -1
- package/dist/cms.js +132 -1
- package/dist/cms.js.map +1 -1
- package/dist/comparisons.d.ts +73 -0
- package/dist/comparisons.d.ts.map +1 -1
- package/dist/comparisons.js +22 -0
- package/dist/comparisons.js.map +1 -1
- package/dist/credentials.d.ts +23 -0
- package/dist/credentials.d.ts.map +1 -1
- package/dist/credentials.js +24 -0
- package/dist/credentials.js.map +1 -1
- package/dist/crm.d.ts +1 -1
- package/dist/custom-fields.d.ts +3 -3
- package/dist/customer-accounts.d.ts +92 -2
- package/dist/customer-accounts.d.ts.map +1 -1
- package/dist/document-templates.d.ts +1192 -0
- package/dist/document-templates.d.ts.map +1 -0
- package/dist/document-templates.js +472 -0
- package/dist/document-templates.js.map +1 -0
- package/dist/document-values.d.ts +156 -0
- package/dist/document-values.d.ts.map +1 -0
- package/dist/document-values.js +208 -0
- package/dist/document-values.js.map +1 -0
- package/dist/errors.d.ts +98 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +121 -0
- package/dist/errors.js.map +1 -1
- package/dist/import-export.d.ts +11 -0
- package/dist/import-export.d.ts.map +1 -1
- package/dist/import-export.js +9 -0
- package/dist/import-export.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/invoice-ledger.d.ts +6 -6
- package/dist/invoices.d.ts +88 -0
- package/dist/invoices.d.ts.map +1 -1
- package/dist/invoices.js +12 -0
- package/dist/invoices.js.map +1 -1
- package/dist/mfa.d.ts +20 -0
- package/dist/mfa.d.ts.map +1 -1
- package/dist/modules.d.ts +21 -10
- package/dist/modules.d.ts.map +1 -1
- package/dist/newsletter.d.ts +2 -0
- package/dist/newsletter.d.ts.map +1 -1
- package/dist/newsletter.js +4 -0
- package/dist/newsletter.js.map +1 -1
- package/dist/orders.d.ts +32 -1
- package/dist/orders.d.ts.map +1 -1
- package/dist/orders.js +33 -17
- package/dist/orders.js.map +1 -1
- package/dist/organizations.d.ts +78 -0
- package/dist/organizations.d.ts.map +1 -1
- package/dist/organizations.js +54 -0
- package/dist/organizations.js.map +1 -1
- package/dist/payment-methods.d.ts +2 -2
- package/dist/price-lists.d.ts +491 -2
- package/dist/price-lists.d.ts.map +1 -1
- package/dist/price-lists.js +255 -0
- package/dist/price-lists.js.map +1 -1
- package/dist/product-feeds.d.ts +13 -13
- package/dist/prompt-actions.d.ts +25 -6
- package/dist/prompt-actions.d.ts.map +1 -1
- package/dist/prompt-actions.js +17 -1
- package/dist/prompt-actions.js.map +1 -1
- package/dist/pwa.d.ts +25 -0
- package/dist/pwa.d.ts.map +1 -1
- package/dist/pwa.js +38 -0
- package/dist/pwa.js.map +1 -1
- package/dist/quote-requests.d.ts +633 -8
- package/dist/quote-requests.d.ts.map +1 -1
- package/dist/quote-requests.js +365 -2
- package/dist/quote-requests.js.map +1 -1
- package/dist/sales-channels.d.ts +46 -0
- package/dist/sales-channels.d.ts.map +1 -1
- package/dist/sales-channels.js +40 -0
- package/dist/sales-channels.js.map +1 -1
- package/dist/saved-list-views.d.ts +140 -0
- package/dist/saved-list-views.d.ts.map +1 -0
- package/dist/saved-list-views.js +108 -0
- package/dist/saved-list-views.js.map +1 -0
- package/dist/search.d.ts +6 -0
- package/dist/search.d.ts.map +1 -1
- package/dist/seo.d.ts +324 -0
- package/dist/seo.d.ts.map +1 -1
- package/dist/seo.js +303 -0
- package/dist/seo.js.map +1 -1
- package/dist/settings.d.ts +19 -0
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +18 -0
- package/dist/settings.js.map +1 -1
- package/dist/shipping-methods.d.ts +2 -2
- package/package.json +1 -1
package/dist/quote-requests.d.ts
CHANGED
|
@@ -33,13 +33,21 @@ export declare const quoteRequestItemSchema: z.ZodObject<{
|
|
|
33
33
|
lineCurrency: z.ZodString;
|
|
34
34
|
discountPercent: z.ZodNullable<z.ZodNumber>;
|
|
35
35
|
taxRate: z.ZodDefault<z.ZodNumber>;
|
|
36
|
+
referencePrice: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
37
|
+
amount: z.ZodNumber;
|
|
38
|
+
currency: z.ZodString;
|
|
39
|
+
capturedAt: z.ZodString;
|
|
40
|
+
}, z.core.$strip>>>;
|
|
41
|
+
customerProposedUnitPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
42
|
+
packagingUnitName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
43
|
+
packagingUnitBaseQuantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
36
44
|
}, z.core.$strip>;
|
|
37
45
|
export type QuoteRequestItem = z.infer<typeof quoteRequestItemSchema>;
|
|
38
46
|
export declare const rfqEventTypeSchema: z.ZodEnum<{
|
|
39
47
|
completed: "completed";
|
|
48
|
+
expired: "expired";
|
|
40
49
|
created: "created";
|
|
41
50
|
approved: "approved";
|
|
42
|
-
expired: "expired";
|
|
43
51
|
submitted: "submitted";
|
|
44
52
|
modified: "modified";
|
|
45
53
|
canceled: "canceled";
|
|
@@ -47,15 +55,16 @@ export declare const rfqEventTypeSchema: z.ZodEnum<{
|
|
|
47
55
|
"customer-rejected-revision": "customer-rejected-revision";
|
|
48
56
|
"re-submitted": "re-submitted";
|
|
49
57
|
"note-added": "note-added";
|
|
58
|
+
"pdf-sent": "pdf-sent";
|
|
50
59
|
}>;
|
|
51
60
|
export type RfqEventType = z.infer<typeof rfqEventTypeSchema>;
|
|
52
61
|
export declare const quoteRequestEventSchema: z.ZodObject<{
|
|
53
62
|
id: z.ZodString;
|
|
54
63
|
eventType: z.ZodEnum<{
|
|
55
64
|
completed: "completed";
|
|
65
|
+
expired: "expired";
|
|
56
66
|
created: "created";
|
|
57
67
|
approved: "approved";
|
|
58
|
-
expired: "expired";
|
|
59
68
|
submitted: "submitted";
|
|
60
69
|
modified: "modified";
|
|
61
70
|
canceled: "canceled";
|
|
@@ -63,6 +72,7 @@ export declare const quoteRequestEventSchema: z.ZodObject<{
|
|
|
63
72
|
"customer-rejected-revision": "customer-rejected-revision";
|
|
64
73
|
"re-submitted": "re-submitted";
|
|
65
74
|
"note-added": "note-added";
|
|
75
|
+
"pdf-sent": "pdf-sent";
|
|
66
76
|
}>;
|
|
67
77
|
actorAdminUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
78
|
actorCustomerAccountId: z.ZodNullable<z.ZodString>;
|
|
@@ -72,6 +82,380 @@ export declare const quoteRequestEventSchema: z.ZodObject<{
|
|
|
72
82
|
createdAt: z.ZodString;
|
|
73
83
|
}, z.core.$strip>;
|
|
74
84
|
export type QuoteRequestEvent = z.infer<typeof quoteRequestEventSchema>;
|
|
85
|
+
/** A line as a history change names it. */
|
|
86
|
+
export declare const quoteRequestHistoryLineRefSchema: z.ZodObject<{
|
|
87
|
+
productId: z.ZodString;
|
|
88
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
89
|
+
productName: z.ZodString;
|
|
90
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
export type QuoteRequestHistoryLineRef = z.infer<typeof quoteRequestHistoryLineRefSchema>;
|
|
93
|
+
/**
|
|
94
|
+
* One change of a `modified` entry. Packaging-unit and custom-field changes
|
|
95
|
+
* are never listed. The UI maps every `kind` to a bundle key.
|
|
96
|
+
*/
|
|
97
|
+
export declare const quoteRequestHistoryChangeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
98
|
+
kind: z.ZodLiteral<"line_added">;
|
|
99
|
+
line: z.ZodObject<{
|
|
100
|
+
productId: z.ZodString;
|
|
101
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
102
|
+
productName: z.ZodString;
|
|
103
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
quantity: z.ZodNumber;
|
|
106
|
+
agreedUnitPrice: z.ZodNullable<z.ZodNumber>;
|
|
107
|
+
currency: z.ZodString;
|
|
108
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
109
|
+
kind: z.ZodLiteral<"line_removed">;
|
|
110
|
+
line: z.ZodObject<{
|
|
111
|
+
productId: z.ZodString;
|
|
112
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
113
|
+
productName: z.ZodString;
|
|
114
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
117
|
+
kind: z.ZodLiteral<"line_quantity">;
|
|
118
|
+
line: z.ZodObject<{
|
|
119
|
+
productId: z.ZodString;
|
|
120
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
121
|
+
productName: z.ZodString;
|
|
122
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
before: z.ZodNumber;
|
|
125
|
+
after: z.ZodNumber;
|
|
126
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
127
|
+
kind: z.ZodLiteral<"line_agreed_unit_price">;
|
|
128
|
+
line: z.ZodObject<{
|
|
129
|
+
productId: z.ZodString;
|
|
130
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
131
|
+
productName: z.ZodString;
|
|
132
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
133
|
+
}, z.core.$strip>;
|
|
134
|
+
before: z.ZodNullable<z.ZodNumber>;
|
|
135
|
+
after: z.ZodNullable<z.ZodNumber>;
|
|
136
|
+
currency: z.ZodString;
|
|
137
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
138
|
+
kind: z.ZodLiteral<"line_proposed_unit_price">;
|
|
139
|
+
line: z.ZodObject<{
|
|
140
|
+
productId: z.ZodString;
|
|
141
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
142
|
+
productName: z.ZodString;
|
|
143
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
before: z.ZodNullable<z.ZodNumber>;
|
|
146
|
+
after: z.ZodNullable<z.ZodNumber>;
|
|
147
|
+
currency: z.ZodString;
|
|
148
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
149
|
+
kind: z.ZodLiteral<"line_note">;
|
|
150
|
+
line: z.ZodObject<{
|
|
151
|
+
productId: z.ZodString;
|
|
152
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
153
|
+
productName: z.ZodString;
|
|
154
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
155
|
+
}, z.core.$strip>;
|
|
156
|
+
before: z.ZodNullable<z.ZodString>;
|
|
157
|
+
after: z.ZodNullable<z.ZodString>;
|
|
158
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
159
|
+
kind: z.ZodLiteral<"header_note">;
|
|
160
|
+
before: z.ZodNullable<z.ZodString>;
|
|
161
|
+
after: z.ZodNullable<z.ZodString>;
|
|
162
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
163
|
+
kind: z.ZodLiteral<"validity">;
|
|
164
|
+
before: z.ZodNullable<z.ZodString>;
|
|
165
|
+
after: z.ZodNullable<z.ZodString>;
|
|
166
|
+
}, z.core.$strip>], "kind">;
|
|
167
|
+
export type QuoteRequestHistoryChange = z.infer<typeof quoteRequestHistoryChangeSchema>;
|
|
168
|
+
/**
|
|
169
|
+
* Who an entry is attributed to. An administrator is named by first and last
|
|
170
|
+
* name only — the admin arm has **no e-mail key** — and `name: null` means an
|
|
171
|
+
* unknown user.
|
|
172
|
+
*/
|
|
173
|
+
export declare const quoteRequestHistoryActorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
174
|
+
kind: z.ZodLiteral<"admin">;
|
|
175
|
+
adminUserId: z.ZodString;
|
|
176
|
+
name: z.ZodNullable<z.ZodString>;
|
|
177
|
+
recordedRole: z.ZodNullable<z.ZodString>;
|
|
178
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
179
|
+
kind: z.ZodLiteral<"customer">;
|
|
180
|
+
customerAccountId: z.ZodString;
|
|
181
|
+
name: z.ZodNullable<z.ZodString>;
|
|
182
|
+
email: z.ZodNullable<z.ZodString>;
|
|
183
|
+
recordedRole: z.ZodNullable<z.ZodString>;
|
|
184
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
185
|
+
kind: z.ZodLiteral<"system">;
|
|
186
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
187
|
+
kind: z.ZodLiteral<"unknown">;
|
|
188
|
+
recordedRole: z.ZodNullable<z.ZodString>;
|
|
189
|
+
}, z.core.$strip>], "kind">;
|
|
190
|
+
export type QuoteRequestHistoryActor = z.infer<typeof quoteRequestHistoryActorSchema>;
|
|
191
|
+
export declare const quoteRequestHistoryEntryKindSchema: z.ZodEnum<{
|
|
192
|
+
completed: "completed";
|
|
193
|
+
expired: "expired";
|
|
194
|
+
created: "created";
|
|
195
|
+
approved: "approved";
|
|
196
|
+
submitted: "submitted";
|
|
197
|
+
modified: "modified";
|
|
198
|
+
canceled: "canceled";
|
|
199
|
+
resubmitted: "resubmitted";
|
|
200
|
+
created_by_admin: "created_by_admin";
|
|
201
|
+
accepted_by_customer: "accepted_by_customer";
|
|
202
|
+
rejected_by_customer: "rejected_by_customer";
|
|
203
|
+
note_added: "note_added";
|
|
204
|
+
pdf_sent: "pdf_sent";
|
|
205
|
+
}>;
|
|
206
|
+
export type QuoteRequestHistoryEntryKind = z.infer<typeof quoteRequestHistoryEntryKindSchema>;
|
|
207
|
+
export declare const quoteRequestHistoryEntrySchema: z.ZodObject<{
|
|
208
|
+
id: z.ZodString;
|
|
209
|
+
eventIds: z.ZodArray<z.ZodString>;
|
|
210
|
+
kind: z.ZodEnum<{
|
|
211
|
+
completed: "completed";
|
|
212
|
+
expired: "expired";
|
|
213
|
+
created: "created";
|
|
214
|
+
approved: "approved";
|
|
215
|
+
submitted: "submitted";
|
|
216
|
+
modified: "modified";
|
|
217
|
+
canceled: "canceled";
|
|
218
|
+
resubmitted: "resubmitted";
|
|
219
|
+
created_by_admin: "created_by_admin";
|
|
220
|
+
accepted_by_customer: "accepted_by_customer";
|
|
221
|
+
rejected_by_customer: "rejected_by_customer";
|
|
222
|
+
note_added: "note_added";
|
|
223
|
+
pdf_sent: "pdf_sent";
|
|
224
|
+
}>;
|
|
225
|
+
occurredAt: z.ZodString;
|
|
226
|
+
actor: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
227
|
+
kind: z.ZodLiteral<"admin">;
|
|
228
|
+
adminUserId: z.ZodString;
|
|
229
|
+
name: z.ZodNullable<z.ZodString>;
|
|
230
|
+
recordedRole: z.ZodNullable<z.ZodString>;
|
|
231
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
232
|
+
kind: z.ZodLiteral<"customer">;
|
|
233
|
+
customerAccountId: z.ZodString;
|
|
234
|
+
name: z.ZodNullable<z.ZodString>;
|
|
235
|
+
email: z.ZodNullable<z.ZodString>;
|
|
236
|
+
recordedRole: z.ZodNullable<z.ZodString>;
|
|
237
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
238
|
+
kind: z.ZodLiteral<"system">;
|
|
239
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
240
|
+
kind: z.ZodLiteral<"unknown">;
|
|
241
|
+
recordedRole: z.ZodNullable<z.ZodString>;
|
|
242
|
+
}, z.core.$strip>], "kind">;
|
|
243
|
+
revisionNumber: z.ZodNullable<z.ZodNumber>;
|
|
244
|
+
note: z.ZodNullable<z.ZodString>;
|
|
245
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
246
|
+
changes: z.ZodNullable<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
247
|
+
kind: z.ZodLiteral<"line_added">;
|
|
248
|
+
line: z.ZodObject<{
|
|
249
|
+
productId: z.ZodString;
|
|
250
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
251
|
+
productName: z.ZodString;
|
|
252
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
253
|
+
}, z.core.$strip>;
|
|
254
|
+
quantity: z.ZodNumber;
|
|
255
|
+
agreedUnitPrice: z.ZodNullable<z.ZodNumber>;
|
|
256
|
+
currency: z.ZodString;
|
|
257
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
258
|
+
kind: z.ZodLiteral<"line_removed">;
|
|
259
|
+
line: z.ZodObject<{
|
|
260
|
+
productId: z.ZodString;
|
|
261
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
262
|
+
productName: z.ZodString;
|
|
263
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
264
|
+
}, z.core.$strip>;
|
|
265
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
266
|
+
kind: z.ZodLiteral<"line_quantity">;
|
|
267
|
+
line: z.ZodObject<{
|
|
268
|
+
productId: z.ZodString;
|
|
269
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
270
|
+
productName: z.ZodString;
|
|
271
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
272
|
+
}, z.core.$strip>;
|
|
273
|
+
before: z.ZodNumber;
|
|
274
|
+
after: z.ZodNumber;
|
|
275
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
276
|
+
kind: z.ZodLiteral<"line_agreed_unit_price">;
|
|
277
|
+
line: z.ZodObject<{
|
|
278
|
+
productId: z.ZodString;
|
|
279
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
280
|
+
productName: z.ZodString;
|
|
281
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
282
|
+
}, z.core.$strip>;
|
|
283
|
+
before: z.ZodNullable<z.ZodNumber>;
|
|
284
|
+
after: z.ZodNullable<z.ZodNumber>;
|
|
285
|
+
currency: z.ZodString;
|
|
286
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
287
|
+
kind: z.ZodLiteral<"line_proposed_unit_price">;
|
|
288
|
+
line: z.ZodObject<{
|
|
289
|
+
productId: z.ZodString;
|
|
290
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
291
|
+
productName: z.ZodString;
|
|
292
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
293
|
+
}, z.core.$strip>;
|
|
294
|
+
before: z.ZodNullable<z.ZodNumber>;
|
|
295
|
+
after: z.ZodNullable<z.ZodNumber>;
|
|
296
|
+
currency: z.ZodString;
|
|
297
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
298
|
+
kind: z.ZodLiteral<"line_note">;
|
|
299
|
+
line: z.ZodObject<{
|
|
300
|
+
productId: z.ZodString;
|
|
301
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
302
|
+
productName: z.ZodString;
|
|
303
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
304
|
+
}, z.core.$strip>;
|
|
305
|
+
before: z.ZodNullable<z.ZodString>;
|
|
306
|
+
after: z.ZodNullable<z.ZodString>;
|
|
307
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
308
|
+
kind: z.ZodLiteral<"header_note">;
|
|
309
|
+
before: z.ZodNullable<z.ZodString>;
|
|
310
|
+
after: z.ZodNullable<z.ZodString>;
|
|
311
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
312
|
+
kind: z.ZodLiteral<"validity">;
|
|
313
|
+
before: z.ZodNullable<z.ZodString>;
|
|
314
|
+
after: z.ZodNullable<z.ZodString>;
|
|
315
|
+
}, z.core.$strip>], "kind">>>;
|
|
316
|
+
relatedQuoteRequestId: z.ZodNullable<z.ZodString>;
|
|
317
|
+
orderId: z.ZodNullable<z.ZodString>;
|
|
318
|
+
delivery: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
319
|
+
recipients: z.ZodArray<z.ZodString>;
|
|
320
|
+
templateName: z.ZodNullable<z.ZodString>;
|
|
321
|
+
language: z.ZodNullable<z.ZodString>;
|
|
322
|
+
message: z.ZodNullable<z.ZodString>;
|
|
323
|
+
}, z.core.$strip>>>;
|
|
324
|
+
}, z.core.$strip>;
|
|
325
|
+
export type QuoteRequestHistoryEntry = z.infer<typeof quoteRequestHistoryEntrySchema>;
|
|
326
|
+
/**
|
|
327
|
+
* How many of a quote request's most recent events its history is built from
|
|
328
|
+
* (threat model T9). Shared so the admin's truncation notice states the number
|
|
329
|
+
* the server applies, rather than a copy of it.
|
|
330
|
+
*/
|
|
331
|
+
export declare const QUOTE_REQUEST_HISTORY_EVENT_WINDOW = 100;
|
|
332
|
+
/**
|
|
333
|
+
* The history response body's `data`: entries oldest first, built from the
|
|
334
|
+
* most recent {@link QUOTE_REQUEST_HISTORY_EVENT_WINDOW} events; `truncated` is
|
|
335
|
+
* `true` when older ones exist.
|
|
336
|
+
*/
|
|
337
|
+
export declare const quoteRequestHistorySchema: z.ZodObject<{
|
|
338
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
339
|
+
id: z.ZodString;
|
|
340
|
+
eventIds: z.ZodArray<z.ZodString>;
|
|
341
|
+
kind: z.ZodEnum<{
|
|
342
|
+
completed: "completed";
|
|
343
|
+
expired: "expired";
|
|
344
|
+
created: "created";
|
|
345
|
+
approved: "approved";
|
|
346
|
+
submitted: "submitted";
|
|
347
|
+
modified: "modified";
|
|
348
|
+
canceled: "canceled";
|
|
349
|
+
resubmitted: "resubmitted";
|
|
350
|
+
created_by_admin: "created_by_admin";
|
|
351
|
+
accepted_by_customer: "accepted_by_customer";
|
|
352
|
+
rejected_by_customer: "rejected_by_customer";
|
|
353
|
+
note_added: "note_added";
|
|
354
|
+
pdf_sent: "pdf_sent";
|
|
355
|
+
}>;
|
|
356
|
+
occurredAt: z.ZodString;
|
|
357
|
+
actor: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
358
|
+
kind: z.ZodLiteral<"admin">;
|
|
359
|
+
adminUserId: z.ZodString;
|
|
360
|
+
name: z.ZodNullable<z.ZodString>;
|
|
361
|
+
recordedRole: z.ZodNullable<z.ZodString>;
|
|
362
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
363
|
+
kind: z.ZodLiteral<"customer">;
|
|
364
|
+
customerAccountId: z.ZodString;
|
|
365
|
+
name: z.ZodNullable<z.ZodString>;
|
|
366
|
+
email: z.ZodNullable<z.ZodString>;
|
|
367
|
+
recordedRole: z.ZodNullable<z.ZodString>;
|
|
368
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
369
|
+
kind: z.ZodLiteral<"system">;
|
|
370
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
371
|
+
kind: z.ZodLiteral<"unknown">;
|
|
372
|
+
recordedRole: z.ZodNullable<z.ZodString>;
|
|
373
|
+
}, z.core.$strip>], "kind">;
|
|
374
|
+
revisionNumber: z.ZodNullable<z.ZodNumber>;
|
|
375
|
+
note: z.ZodNullable<z.ZodString>;
|
|
376
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
377
|
+
changes: z.ZodNullable<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
378
|
+
kind: z.ZodLiteral<"line_added">;
|
|
379
|
+
line: z.ZodObject<{
|
|
380
|
+
productId: z.ZodString;
|
|
381
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
382
|
+
productName: z.ZodString;
|
|
383
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
384
|
+
}, z.core.$strip>;
|
|
385
|
+
quantity: z.ZodNumber;
|
|
386
|
+
agreedUnitPrice: z.ZodNullable<z.ZodNumber>;
|
|
387
|
+
currency: z.ZodString;
|
|
388
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
389
|
+
kind: z.ZodLiteral<"line_removed">;
|
|
390
|
+
line: z.ZodObject<{
|
|
391
|
+
productId: z.ZodString;
|
|
392
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
393
|
+
productName: z.ZodString;
|
|
394
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
395
|
+
}, z.core.$strip>;
|
|
396
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
397
|
+
kind: z.ZodLiteral<"line_quantity">;
|
|
398
|
+
line: z.ZodObject<{
|
|
399
|
+
productId: z.ZodString;
|
|
400
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
401
|
+
productName: z.ZodString;
|
|
402
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
403
|
+
}, z.core.$strip>;
|
|
404
|
+
before: z.ZodNumber;
|
|
405
|
+
after: z.ZodNumber;
|
|
406
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
407
|
+
kind: z.ZodLiteral<"line_agreed_unit_price">;
|
|
408
|
+
line: z.ZodObject<{
|
|
409
|
+
productId: z.ZodString;
|
|
410
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
411
|
+
productName: z.ZodString;
|
|
412
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
413
|
+
}, z.core.$strip>;
|
|
414
|
+
before: z.ZodNullable<z.ZodNumber>;
|
|
415
|
+
after: z.ZodNullable<z.ZodNumber>;
|
|
416
|
+
currency: z.ZodString;
|
|
417
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
418
|
+
kind: z.ZodLiteral<"line_proposed_unit_price">;
|
|
419
|
+
line: z.ZodObject<{
|
|
420
|
+
productId: z.ZodString;
|
|
421
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
422
|
+
productName: z.ZodString;
|
|
423
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
424
|
+
}, z.core.$strip>;
|
|
425
|
+
before: z.ZodNullable<z.ZodNumber>;
|
|
426
|
+
after: z.ZodNullable<z.ZodNumber>;
|
|
427
|
+
currency: z.ZodString;
|
|
428
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
429
|
+
kind: z.ZodLiteral<"line_note">;
|
|
430
|
+
line: z.ZodObject<{
|
|
431
|
+
productId: z.ZodString;
|
|
432
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
433
|
+
productName: z.ZodString;
|
|
434
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
435
|
+
}, z.core.$strip>;
|
|
436
|
+
before: z.ZodNullable<z.ZodString>;
|
|
437
|
+
after: z.ZodNullable<z.ZodString>;
|
|
438
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
439
|
+
kind: z.ZodLiteral<"header_note">;
|
|
440
|
+
before: z.ZodNullable<z.ZodString>;
|
|
441
|
+
after: z.ZodNullable<z.ZodString>;
|
|
442
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
443
|
+
kind: z.ZodLiteral<"validity">;
|
|
444
|
+
before: z.ZodNullable<z.ZodString>;
|
|
445
|
+
after: z.ZodNullable<z.ZodString>;
|
|
446
|
+
}, z.core.$strip>], "kind">>>;
|
|
447
|
+
relatedQuoteRequestId: z.ZodNullable<z.ZodString>;
|
|
448
|
+
orderId: z.ZodNullable<z.ZodString>;
|
|
449
|
+
delivery: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
450
|
+
recipients: z.ZodArray<z.ZodString>;
|
|
451
|
+
templateName: z.ZodNullable<z.ZodString>;
|
|
452
|
+
language: z.ZodNullable<z.ZodString>;
|
|
453
|
+
message: z.ZodNullable<z.ZodString>;
|
|
454
|
+
}, z.core.$strip>>>;
|
|
455
|
+
}, z.core.$strip>>;
|
|
456
|
+
truncated: z.ZodBoolean;
|
|
457
|
+
}, z.core.$strip>;
|
|
458
|
+
export type QuoteRequestHistory = z.infer<typeof quoteRequestHistorySchema>;
|
|
75
459
|
export declare const rfqDiffEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
76
460
|
kind: z.ZodLiteral<"header_note">;
|
|
77
461
|
before: z.ZodNullable<z.ZodString>;
|
|
@@ -137,6 +521,7 @@ export declare const quoteRequestSchema: z.ZodObject<{
|
|
|
137
521
|
businessId: z.ZodString;
|
|
138
522
|
organizationId: z.ZodString;
|
|
139
523
|
customerAccountId: z.ZodString;
|
|
524
|
+
salesChannelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
140
525
|
createdByAdminUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
141
526
|
assignedAdminUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
142
527
|
status: z.ZodEnum<{
|
|
@@ -167,14 +552,22 @@ export declare const quoteRequestSchema: z.ZodObject<{
|
|
|
167
552
|
lineCurrency: z.ZodString;
|
|
168
553
|
discountPercent: z.ZodNullable<z.ZodNumber>;
|
|
169
554
|
taxRate: z.ZodDefault<z.ZodNumber>;
|
|
555
|
+
referencePrice: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
556
|
+
amount: z.ZodNumber;
|
|
557
|
+
currency: z.ZodString;
|
|
558
|
+
capturedAt: z.ZodString;
|
|
559
|
+
}, z.core.$strip>>>;
|
|
560
|
+
customerProposedUnitPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
561
|
+
packagingUnitName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
562
|
+
packagingUnitBaseQuantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
170
563
|
}, z.core.$strip>>;
|
|
171
564
|
events: z.ZodArray<z.ZodObject<{
|
|
172
565
|
id: z.ZodString;
|
|
173
566
|
eventType: z.ZodEnum<{
|
|
174
567
|
completed: "completed";
|
|
568
|
+
expired: "expired";
|
|
175
569
|
created: "created";
|
|
176
570
|
approved: "approved";
|
|
177
|
-
expired: "expired";
|
|
178
571
|
submitted: "submitted";
|
|
179
572
|
modified: "modified";
|
|
180
573
|
canceled: "canceled";
|
|
@@ -182,6 +575,7 @@ export declare const quoteRequestSchema: z.ZodObject<{
|
|
|
182
575
|
"customer-rejected-revision": "customer-rejected-revision";
|
|
183
576
|
"re-submitted": "re-submitted";
|
|
184
577
|
"note-added": "note-added";
|
|
578
|
+
"pdf-sent": "pdf-sent";
|
|
185
579
|
}>;
|
|
186
580
|
actorAdminUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
187
581
|
actorCustomerAccountId: z.ZodNullable<z.ZodString>;
|
|
@@ -242,6 +636,7 @@ export declare const quoteRequestSchema: z.ZodObject<{
|
|
|
242
636
|
lastName: z.ZodNullable<z.ZodString>;
|
|
243
637
|
email: z.ZodString;
|
|
244
638
|
}, z.core.$strip>>>;
|
|
639
|
+
documentTemplateId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
245
640
|
createdAt: z.ZodString;
|
|
246
641
|
updatedAt: z.ZodString;
|
|
247
642
|
version: z.ZodNumber;
|
|
@@ -289,6 +684,11 @@ export declare const createQuoteRequestLineSchema: z.ZodObject<{
|
|
|
289
684
|
packagingUnitBaseQuantity: z.ZodOptional<z.ZodNumber>;
|
|
290
685
|
}, z.core.$strip>;
|
|
291
686
|
export type CreateQuoteRequestLine = z.infer<typeof createQuoteRequestLineSchema>;
|
|
687
|
+
/**
|
|
688
|
+
* Customer-facing: **not strict**, deliberately — an unknown key (a body
|
|
689
|
+
* `lineReferencePrices`, a per-line `referenceUnitPrice`) is stripped, never
|
|
690
|
+
* refused, and never reaches the service.
|
|
691
|
+
*/
|
|
292
692
|
export declare const createQuoteRequestSchema: z.ZodObject<{
|
|
293
693
|
headerNote: z.ZodOptional<z.ZodString>;
|
|
294
694
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -414,6 +814,60 @@ export declare const storefrontQuoteRequestSettingsSchema: z.ZodObject<{
|
|
|
414
814
|
showAddToQuoteOnPdp: z.ZodBoolean;
|
|
415
815
|
}, z.core.$strip>;
|
|
416
816
|
export type StorefrontQuoteRequestSettings = z.infer<typeof storefrontQuoteRequestSettingsSchema>;
|
|
817
|
+
/** `GET|PUT /api/v1/admin/organizations/:id/quote-price-negotiation` answer. */
|
|
818
|
+
export declare const quoteRequestOrgNegotiationSchema: z.ZodObject<{
|
|
819
|
+
organizationId: z.ZodString;
|
|
820
|
+
priceProposalsAllowed: z.ZodBoolean;
|
|
821
|
+
updatedAt: z.ZodNullable<z.ZodString>;
|
|
822
|
+
}, z.core.$strip>;
|
|
823
|
+
export type QuoteRequestOrgNegotiation = z.infer<typeof quoteRequestOrgNegotiationSchema>;
|
|
824
|
+
/** Admin body — strict. */
|
|
825
|
+
export declare const setQuoteRequestOrgNegotiationSchema: z.ZodObject<{
|
|
826
|
+
priceProposalsAllowed: z.ZodBoolean;
|
|
827
|
+
}, z.core.$strict>;
|
|
828
|
+
export type SetQuoteRequestOrgNegotiation = z.infer<typeof setQuoteRequestOrgNegotiationSchema>;
|
|
829
|
+
export declare const quoteRequestNegotiationOverrideSchema: z.ZodEnum<{
|
|
830
|
+
inherit: "inherit";
|
|
831
|
+
allowed: "allowed";
|
|
832
|
+
not_allowed: "not_allowed";
|
|
833
|
+
}>;
|
|
834
|
+
export type QuoteRequestNegotiationOverride = z.infer<typeof quoteRequestNegotiationOverrideSchema>;
|
|
835
|
+
/** `GET|PUT /api/v1/admin/customers/:id/quote-price-negotiation` answer. */
|
|
836
|
+
export declare const quoteRequestAccountNegotiationSchema: z.ZodObject<{
|
|
837
|
+
customerAccountId: z.ZodString;
|
|
838
|
+
organizationId: z.ZodString;
|
|
839
|
+
override: z.ZodEnum<{
|
|
840
|
+
inherit: "inherit";
|
|
841
|
+
allowed: "allowed";
|
|
842
|
+
not_allowed: "not_allowed";
|
|
843
|
+
}>;
|
|
844
|
+
organizationPriceProposalsAllowed: z.ZodBoolean;
|
|
845
|
+
effectivePriceProposalsAllowed: z.ZodBoolean;
|
|
846
|
+
effectiveSource: z.ZodEnum<{
|
|
847
|
+
default: "default";
|
|
848
|
+
account: "account";
|
|
849
|
+
organization: "organization";
|
|
850
|
+
}>;
|
|
851
|
+
updatedAt: z.ZodNullable<z.ZodString>;
|
|
852
|
+
}, z.core.$strip>;
|
|
853
|
+
export type QuoteRequestAccountNegotiation = z.infer<typeof quoteRequestAccountNegotiationSchema>;
|
|
854
|
+
/** Admin body — strict. */
|
|
855
|
+
export declare const setQuoteRequestAccountNegotiationSchema: z.ZodObject<{
|
|
856
|
+
override: z.ZodEnum<{
|
|
857
|
+
inherit: "inherit";
|
|
858
|
+
allowed: "allowed";
|
|
859
|
+
not_allowed: "not_allowed";
|
|
860
|
+
}>;
|
|
861
|
+
}, z.core.$strict>;
|
|
862
|
+
export type SetQuoteRequestAccountNegotiation = z.infer<typeof setQuoteRequestAccountNegotiationSchema>;
|
|
863
|
+
/**
|
|
864
|
+
* `GET /api/v1/quote-requests/price-negotiation` — the signed-in customer's
|
|
865
|
+
* effective value and nothing else: no id, no organization value, no override.
|
|
866
|
+
*/
|
|
867
|
+
export declare const storefrontQuoteRequestNegotiationSchema: z.ZodObject<{
|
|
868
|
+
priceProposalsAllowed: z.ZodBoolean;
|
|
869
|
+
}, z.core.$strip>;
|
|
870
|
+
export type StorefrontQuoteRequestNegotiation = z.infer<typeof storefrontQuoteRequestNegotiationSchema>;
|
|
417
871
|
/**
|
|
418
872
|
* The lifecycle statuses of a quote request.
|
|
419
873
|
*
|
|
@@ -440,6 +894,11 @@ export interface QuoteRequestRecord {
|
|
|
440
894
|
businessId: string;
|
|
441
895
|
organizationId: string;
|
|
442
896
|
customerAccountId: string;
|
|
897
|
+
/**
|
|
898
|
+
* The channel the request was raised on; `null` when it was created outside
|
|
899
|
+
* a request scope (`specs/149-pwa-order-status-push/`).
|
|
900
|
+
*/
|
|
901
|
+
salesChannelId: string | null;
|
|
443
902
|
createdByAdminUserId: string | null;
|
|
444
903
|
assignedAdminUserId: string | null;
|
|
445
904
|
status: QuoteRequestStatus;
|
|
@@ -462,12 +921,13 @@ export interface QuoteRequestRecord {
|
|
|
462
921
|
}
|
|
463
922
|
/**
|
|
464
923
|
* One quote-request line, as the module that converts one back into a cart
|
|
465
|
-
* reads it (feature 075, `carts`' cut).
|
|
924
|
+
* reads it (feature 075, `carts`' cut), and as the ERP export readers read it.
|
|
466
925
|
*
|
|
467
926
|
* Narrower than the row on purpose: the conversion re-resolves every price
|
|
468
|
-
* against the buyer's current price list (FR-017), so
|
|
469
|
-
*
|
|
470
|
-
*
|
|
927
|
+
* against the buyer's current price list (FR-017 of feature 075), so it ignores
|
|
928
|
+
* every money field here — the quote → cart conversion never carries a price
|
|
929
|
+
* over. The money fields (`lineCurrency`, `agreedUnitPrice`, `desiredUnitPrice`,
|
|
930
|
+
* `referenceUnitPrice`, `referenceCurrency`) are for export readers.
|
|
471
931
|
* `productName` travels because a dropped line is reported by name.
|
|
472
932
|
*/
|
|
473
933
|
export interface QuoteRequestLineRecord {
|
|
@@ -483,6 +943,16 @@ export interface QuoteRequestLineRecord {
|
|
|
483
943
|
lineCurrency: string;
|
|
484
944
|
agreedUnitPrice: string | null;
|
|
485
945
|
desiredUnitPrice: string | null;
|
|
946
|
+
/**
|
|
947
|
+
* Feature 146 — the stored at-request reference unit price (net, per base
|
|
948
|
+
* piece), decimal string; `null` when none is stored. For a cart-converted
|
|
949
|
+
* line this is the cart's unit price — read it here, not from
|
|
950
|
+
* `desiredUnitPrice`, which is `null` on those lines. Optional, so every
|
|
951
|
+
* structural stub of the port written before it still compiles.
|
|
952
|
+
*/
|
|
953
|
+
referenceUnitPrice?: string | null;
|
|
954
|
+
/** Currency of `referenceUnitPrice`; `null` exactly when it is `null`. */
|
|
955
|
+
referenceCurrency?: string | null;
|
|
486
956
|
}
|
|
487
957
|
/**
|
|
488
958
|
* Container name: `quoteRequestReadPort`. Owner: `quote_requests`.
|
|
@@ -551,8 +1021,35 @@ export interface RfqCustomerContext {
|
|
|
551
1021
|
* `activation` to say, not this line's: a module declaring
|
|
552
1022
|
* `nonDeactivatable` never enters one.
|
|
553
1023
|
*/
|
|
1024
|
+
/**
|
|
1025
|
+
* Feature 146 — the optional third argument of
|
|
1026
|
+
* `RfqCustomerPort.createForCustomer`.
|
|
1027
|
+
*/
|
|
1028
|
+
export interface CreateForCustomerOptions {
|
|
1029
|
+
/**
|
|
1030
|
+
* Server-side reference prices, index-aligned with `input.items`. Set only by
|
|
1031
|
+
* an in-process caller that holds a snapshot the buyer could not have forged —
|
|
1032
|
+
* `carts`' conversion, whose cart line price is the reference. Unreachable
|
|
1033
|
+
* from HTTP: the route parses its body with `createQuoteRequestSchema`, which
|
|
1034
|
+
* has no such field and strips it. `null` at an index = resolve that line.
|
|
1035
|
+
*
|
|
1036
|
+
* Validated before any write; each violation is a programming error and
|
|
1037
|
+
* throws:
|
|
1038
|
+
* - the array length equals `input.items.length`;
|
|
1039
|
+
* - each non-`null` entry's `amount` is a finite decimal string ≥ 0 with at
|
|
1040
|
+
* most two decimals, and its `currency` matches `/^[A-Z]{3}$/`.
|
|
1041
|
+
*/
|
|
1042
|
+
lineReferencePrices?: ReadonlyArray<{
|
|
1043
|
+
amount: string;
|
|
1044
|
+
currency: string;
|
|
1045
|
+
} | null>;
|
|
1046
|
+
}
|
|
554
1047
|
export interface RfqCustomerPort {
|
|
555
|
-
|
|
1048
|
+
/**
|
|
1049
|
+
* `options` is optional and trailing, so every existing caller and every
|
|
1050
|
+
* two-argument implementation stays valid.
|
|
1051
|
+
*/
|
|
1052
|
+
createForCustomer(ctx: RfqCustomerContext, input: CreateQuoteRequest, options?: CreateForCustomerOptions): Promise<QuoteRequest>;
|
|
556
1053
|
listForCustomer(ctx: RfqCustomerContext): Promise<QuoteRequestSummary[]>;
|
|
557
1054
|
}
|
|
558
1055
|
/** The fixed names of the Quote Request events offered to outbound webhooks. */
|
|
@@ -597,4 +1094,132 @@ export declare const QUOTE_REQUEST_WEBHOOK_EVENT_SCHEMAS: {
|
|
|
597
1094
|
occurredAt: z.ZodString;
|
|
598
1095
|
}, z.core.$strict>;
|
|
599
1096
|
};
|
|
1097
|
+
/** The document type `quote_requests` registers with the document-template facility. */
|
|
1098
|
+
export declare const QUOTE_REQUEST_DOCUMENT_TYPE = "quote_requests.quote_request";
|
|
1099
|
+
/** Owner answer Q4 — what one *Send PDF to customer* may carry. */
|
|
1100
|
+
export declare const QUOTE_REQUEST_PDF_LIMITS: {
|
|
1101
|
+
readonly maxRecipients: 5;
|
|
1102
|
+
readonly maxMessageLength: 2000;
|
|
1103
|
+
/** 10 MiB — larger PDFs are refused rather than handed to a mail server. */
|
|
1104
|
+
readonly maxAttachmentBytes: number;
|
|
1105
|
+
};
|
|
1106
|
+
/**
|
|
1107
|
+
* The data one quote PDF prints, built for the requesting administrator
|
|
1108
|
+
* (`data-model.md` §4.1). JSON-serialisable: the editor's sample is the same
|
|
1109
|
+
* shape.
|
|
1110
|
+
*/
|
|
1111
|
+
export declare const quoteRequestDocumentDataSchema: z.ZodObject<{
|
|
1112
|
+
generatedAt: z.ZodString;
|
|
1113
|
+
quote: z.ZodObject<{
|
|
1114
|
+
id: z.ZodString;
|
|
1115
|
+
businessId: z.ZodString;
|
|
1116
|
+
status: z.ZodString;
|
|
1117
|
+
revisionNumber: z.ZodNumber;
|
|
1118
|
+
createdAt: z.ZodString;
|
|
1119
|
+
submittedAt: z.ZodNullable<z.ZodString>;
|
|
1120
|
+
approvedAt: z.ZodNullable<z.ZodString>;
|
|
1121
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1122
|
+
headerNote: z.ZodNullable<z.ZodString>;
|
|
1123
|
+
taxRate: z.ZodNumber;
|
|
1124
|
+
currency: z.ZodString;
|
|
1125
|
+
}, z.core.$strip>;
|
|
1126
|
+
channel: z.ZodNullable<z.ZodObject<{
|
|
1127
|
+
id: z.ZodString;
|
|
1128
|
+
name: z.ZodString;
|
|
1129
|
+
}, z.core.$strip>>;
|
|
1130
|
+
buyer: z.ZodObject<{
|
|
1131
|
+
organizationName: z.ZodString;
|
|
1132
|
+
legalName: z.ZodNullable<z.ZodString>;
|
|
1133
|
+
taxId: z.ZodNullable<z.ZodString>;
|
|
1134
|
+
address: z.ZodNullable<z.ZodObject<{
|
|
1135
|
+
line1: z.ZodString;
|
|
1136
|
+
line2: z.ZodNullable<z.ZodString>;
|
|
1137
|
+
postalCode: z.ZodString;
|
|
1138
|
+
city: z.ZodString;
|
|
1139
|
+
country: z.ZodString;
|
|
1140
|
+
}, z.core.$strip>>;
|
|
1141
|
+
customerName: z.ZodNullable<z.ZodString>;
|
|
1142
|
+
customerEmail: z.ZodNullable<z.ZodString>;
|
|
1143
|
+
}, z.core.$strip>;
|
|
1144
|
+
salesRep: z.ZodNullable<z.ZodObject<{
|
|
1145
|
+
name: z.ZodString;
|
|
1146
|
+
email: z.ZodString;
|
|
1147
|
+
}, z.core.$strip>>;
|
|
1148
|
+
details: z.ZodArray<z.ZodObject<{
|
|
1149
|
+
label: z.ZodString;
|
|
1150
|
+
value: z.ZodString;
|
|
1151
|
+
}, z.core.$strip>>;
|
|
1152
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
1153
|
+
id: z.ZodString;
|
|
1154
|
+
productId: z.ZodString;
|
|
1155
|
+
productName: z.ZodString;
|
|
1156
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
1157
|
+
sku: z.ZodNullable<z.ZodString>;
|
|
1158
|
+
quantity: z.ZodNumber;
|
|
1159
|
+
packagingUnitName: z.ZodNullable<z.ZodString>;
|
|
1160
|
+
packagingUnitBaseQuantity: z.ZodNullable<z.ZodNumber>;
|
|
1161
|
+
agreedUnitPrice: z.ZodNullable<z.ZodNumber>;
|
|
1162
|
+
proposedUnitPrice: z.ZodNullable<z.ZodNumber>;
|
|
1163
|
+
referenceUnitPrice: z.ZodNullable<z.ZodNumber>;
|
|
1164
|
+
referenceCurrency: z.ZodNullable<z.ZodString>;
|
|
1165
|
+
lineCurrency: z.ZodString;
|
|
1166
|
+
lineNote: z.ZodNullable<z.ZodString>;
|
|
1167
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1168
|
+
}, z.core.$strip>>;
|
|
1169
|
+
}, z.core.$strip>;
|
|
1170
|
+
export type QuoteRequestDocumentData = z.infer<typeof quoteRequestDocumentDataSchema>;
|
|
1171
|
+
export type QuoteRequestDocumentLine = QuoteRequestDocumentData['lines'][number];
|
|
1172
|
+
/** `GET /api/v1/admin/quote-requests/:id/document-templates` — the export and send dialogs' choices. */
|
|
1173
|
+
export declare const quoteRequestDocumentChoicesSchema: z.ZodObject<{
|
|
1174
|
+
templates: z.ZodArray<z.ZodObject<{
|
|
1175
|
+
id: z.ZodString;
|
|
1176
|
+
name: z.ZodString;
|
|
1177
|
+
salesChannelId: z.ZodNullable<z.ZodString>;
|
|
1178
|
+
languages: z.ZodArray<z.ZodString>;
|
|
1179
|
+
isDefault: z.ZodBoolean;
|
|
1180
|
+
}, z.core.$strip>>;
|
|
1181
|
+
rememberedTemplateId: z.ZodNullable<z.ZodString>;
|
|
1182
|
+
rememberedTemplateMissing: z.ZodBoolean;
|
|
1183
|
+
effectiveDefaultId: z.ZodNullable<z.ZodString>;
|
|
1184
|
+
builtInLanguages: z.ZodArray<z.ZodString>;
|
|
1185
|
+
suggestedLanguage: z.ZodString;
|
|
1186
|
+
requesterEmail: z.ZodNullable<z.ZodString>;
|
|
1187
|
+
}, z.core.$strip>;
|
|
1188
|
+
export type QuoteRequestDocumentChoices = z.infer<typeof quoteRequestDocumentChoicesSchema>;
|
|
1189
|
+
/** `PUT /api/v1/admin/quote-requests/:id/document-template`. */
|
|
1190
|
+
export declare const setQuoteRequestDocumentTemplateSchema: z.ZodObject<{
|
|
1191
|
+
documentTemplateId: z.ZodNullable<z.ZodString>;
|
|
1192
|
+
}, z.core.$strip>;
|
|
1193
|
+
export type SetQuoteRequestDocumentTemplate = z.infer<typeof setQuoteRequestDocumentTemplateSchema>;
|
|
1194
|
+
/** `GET /api/v1/admin/quote-requests/:id/pdf` query. */
|
|
1195
|
+
export declare const quoteRequestPdfQuerySchema: z.ZodObject<{
|
|
1196
|
+
templateId: z.ZodOptional<z.ZodString>;
|
|
1197
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1198
|
+
}, z.core.$strip>;
|
|
1199
|
+
export type QuoteRequestPdfQuery = z.infer<typeof quoteRequestPdfQuerySchema>;
|
|
1200
|
+
/**
|
|
1201
|
+
* `POST /api/v1/admin/quote-requests/:id/pdf/send` (owner answer Q4). The
|
|
1202
|
+
* recipients are trimmed and de-duplicated case-insensitively — the first
|
|
1203
|
+
* spelling kept — before the 1–5 bound is applied.
|
|
1204
|
+
*/
|
|
1205
|
+
export declare const quoteRequestPdfSendRequestSchema: z.ZodObject<{
|
|
1206
|
+
templateId: z.ZodOptional<z.ZodString>;
|
|
1207
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1208
|
+
recipients: z.ZodPipe<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>, z.ZodArray<z.ZodString>>;
|
|
1209
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1210
|
+
}, z.core.$strip>;
|
|
1211
|
+
export type QuoteRequestPdfSendRequest = z.infer<typeof quoteRequestPdfSendRequestSchema>;
|
|
1212
|
+
export declare const quoteRequestPdfSendResultSchema: z.ZodObject<{
|
|
1213
|
+
sent: z.ZodArray<z.ZodString>;
|
|
1214
|
+
failed: z.ZodArray<z.ZodString>;
|
|
1215
|
+
templateId: z.ZodNullable<z.ZodString>;
|
|
1216
|
+
templateSource: z.ZodEnum<{
|
|
1217
|
+
default: "default";
|
|
1218
|
+
canvas: "canvas";
|
|
1219
|
+
explicit: "explicit";
|
|
1220
|
+
built_in: "built_in";
|
|
1221
|
+
}>;
|
|
1222
|
+
requestedTemplateMissing: z.ZodBoolean;
|
|
1223
|
+
}, z.core.$strip>;
|
|
1224
|
+
export type QuoteRequestPdfSendResult = z.infer<typeof quoteRequestPdfSendResultSchema>;
|
|
600
1225
|
//# sourceMappingURL=quote-requests.d.ts.map
|