@sixtyninecommerce/admin 0.8.0 → 0.10.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 +2739 -17
- package/dist/api-tokens/index.d.ts +15 -5
- package/dist/api-tokens/index.js +1 -0
- package/dist/apps/event-subscription.d.ts +59 -0
- package/dist/apps/event-subscription.js +32 -0
- package/dist/apps/hook-secret.d.ts +22 -0
- package/dist/apps/hook-secret.js +36 -0
- package/dist/apps/index.d.ts +54 -3
- package/dist/apps/index.js +17 -0
- package/dist/audit/index.d.ts +7 -0
- package/dist/auth/queries.d.ts +5 -1
- package/dist/auth/queries.js +6 -0
- package/dist/bulk/index.d.ts +323 -0
- package/dist/bulk/index.js +162 -0
- package/dist/catalog/assets.d.ts +147 -0
- package/dist/catalog/assets.js +164 -0
- package/dist/catalog/collections.d.ts +109 -0
- package/dist/catalog/collections.js +91 -0
- package/dist/catalog/facets.d.ts +103 -0
- package/dist/catalog/facets.js +100 -0
- package/dist/catalog/index.d.ts +115 -0
- package/dist/catalog/index.js +21 -0
- package/dist/catalog/options.d.ts +89 -0
- package/dist/catalog/options.js +88 -0
- package/dist/catalog/products-bulk.d.ts +21 -0
- package/dist/catalog/products-bulk.js +58 -0
- package/dist/catalog/products.d.ts +650 -0
- package/dist/catalog/products.js +458 -0
- package/dist/catalog/properties.d.ts +234 -0
- package/dist/catalog/properties.js +158 -0
- package/dist/catalog/types.d.ts +174 -0
- package/dist/catalog/types.js +141 -0
- package/dist/catalog/variants.d.ts +324 -0
- package/dist/catalog/variants.js +288 -0
- package/dist/catalog/visibility.d.ts +57 -0
- package/dist/catalog/visibility.js +59 -0
- package/dist/client.d.ts +192 -3
- package/dist/client.js +87 -12
- package/dist/compliance/index.d.ts +88 -0
- package/dist/compliance/index.js +88 -0
- package/dist/customer-data-redaction.d.ts +14 -0
- package/dist/customer-data-redaction.js +22 -0
- package/dist/customers/index.d.ts +428 -17
- package/dist/customers/index.js +322 -15
- package/dist/documents/index.d.ts +513 -16
- package/dist/documents/index.js +229 -3
- package/dist/events/index.d.ts +259 -0
- package/dist/events/index.js +147 -0
- package/dist/feeds/ai.d.ts +46 -0
- package/dist/feeds/ai.js +43 -0
- package/dist/feeds/categories.d.ts +50 -0
- package/dist/feeds/categories.js +56 -0
- package/dist/feeds/configs.d.ts +54 -0
- package/dist/feeds/configs.js +85 -0
- package/dist/feeds/identifier-fields.d.ts +25 -0
- package/dist/feeds/identifier-fields.js +29 -0
- package/dist/feeds/index.d.ts +54 -0
- package/dist/feeds/index.js +46 -0
- package/dist/feeds/preserve.d.ts +38 -0
- package/dist/feeds/preserve.js +74 -0
- package/dist/feeds/rules.d.ts +42 -0
- package/dist/feeds/rules.js +56 -0
- package/dist/feeds/types.d.ts +654 -0
- package/dist/feeds/types.js +135 -0
- package/dist/fulfillments/index.d.ts +437 -0
- package/dist/fulfillments/index.js +534 -0
- package/dist/heads/index.d.ts +60 -0
- package/dist/heads/index.js +45 -0
- package/dist/hooks/assignments.d.ts +90 -0
- package/dist/hooks/assignments.js +53 -0
- package/dist/hooks/index.d.ts +97 -0
- package/dist/hooks/index.js +76 -0
- package/dist/index.d.ts +95 -9
- package/dist/index.js +21 -1
- package/dist/integrations/index.d.ts +14 -0
- package/dist/integrations/index.js +9 -0
- package/dist/integrations/pipelines.d.ts +113 -0
- package/dist/integrations/pipelines.js +62 -0
- package/dist/integrations/types.d.ts +176 -0
- package/dist/integrations/types.js +8 -0
- package/dist/jobs/bulk-action-run.d.ts +74 -0
- package/dist/jobs/bulk-action-run.js +69 -0
- package/dist/locations/index.d.ts +6 -2
- package/dist/meta/index.d.ts +32 -0
- package/dist/orders/bulk.d.ts +75 -0
- package/dist/orders/bulk.js +150 -0
- package/dist/orders/commit-edit.d.ts +123 -0
- package/dist/orders/commit-edit.js +142 -0
- package/dist/orders/deposit-policy.d.ts +103 -0
- package/dist/orders/deposit-policy.js +202 -0
- package/dist/orders/get.d.ts +722 -0
- package/dist/orders/get.js +530 -0
- package/dist/orders/index.d.ts +186 -21
- package/dist/orders/index.js +57 -0
- package/dist/orders/line-price-preview.d.ts +297 -0
- package/dist/orders/line-price-preview.js +50 -0
- package/dist/orders/manual-discounts.d.ts +141 -0
- package/dist/orders/manual-discounts.js +97 -0
- package/dist/orders/manual-pricing.d.ts +192 -0
- package/dist/orders/manual-pricing.js +72 -0
- package/dist/orders/order-entry.d.ts +566 -0
- package/dist/orders/order-entry.js +129 -0
- package/dist/orders/parcel-charge.d.ts +45 -0
- package/dist/orders/parcel-charge.js +55 -0
- package/dist/orders/plan-edit.d.ts +489 -0
- package/dist/orders/plan-edit.js +93 -0
- package/dist/orders/status.d.ts +235 -0
- package/dist/orders/status.js +96 -0
- package/dist/orders/surcharges.d.ts +75 -2
- package/dist/orders/surcharges.js +110 -4
- package/dist/payments/account-credit.d.ts +171 -0
- package/dist/payments/account-credit.js +107 -0
- package/dist/payments/index.d.ts +241 -9
- package/dist/payments/index.js +92 -0
- package/dist/payments/methods.d.ts +37 -0
- package/dist/payments/methods.js +33 -0
- package/dist/platform/catalog.d.ts +148 -0
- package/dist/platform/catalog.js +74 -0
- package/dist/platform/entitlements.d.ts +111 -0
- package/dist/platform/entitlements.js +86 -0
- package/dist/platform/legal-entities.d.ts +139 -0
- package/dist/platform/legal-entities.js +126 -0
- package/dist/platform/legal-entity-numbering.d.ts +103 -0
- package/dist/platform/legal-entity-numbering.js +101 -0
- package/dist/platform/organization-membership.d.ts +80 -0
- package/dist/platform/organization-membership.js +71 -0
- package/dist/platform/organization-settings.d.ts +33 -0
- package/dist/platform/organization-settings.js +42 -0
- package/dist/platform/organization-sharing.d.ts +172 -0
- package/dist/platform/organization-sharing.js +120 -0
- package/dist/platform/organizations.d.ts +205 -0
- package/dist/platform/organizations.js +180 -0
- package/dist/platform/provision-store.d.ts +88 -8
- package/dist/platform/provision-store.js +12 -0
- package/dist/platform/reports.d.ts +46 -0
- package/dist/platform/reports.js +31 -0
- package/dist/platform/server-metrics.d.ts +58 -0
- package/dist/platform/server-metrics.js +11 -0
- package/dist/pos/index.d.ts +567 -0
- package/dist/pos/index.js +205 -0
- package/dist/pricing/index.d.ts +408 -0
- package/dist/pricing/index.js +353 -0
- package/dist/pricing/vouchers.d.ts +103 -0
- package/dist/pricing/vouchers.js +69 -0
- package/dist/provenance/index.d.ts +93 -0
- package/dist/provenance/index.js +53 -0
- package/dist/reports/index.d.ts +199 -0
- package/dist/reports/index.js +154 -0
- package/dist/returns/index.d.ts +225 -0
- package/dist/returns/index.js +160 -0
- package/dist/search/index.d.ts +99 -0
- package/dist/search/index.js +62 -0
- package/dist/shipping/parcel-count-suggestion.d.ts +52 -0
- package/dist/shipping/parcel-count-suggestion.js +73 -0
- package/dist/shipping/parcel-rule.d.ts +48 -0
- package/dist/shipping/parcel-rule.js +91 -0
- package/dist/stock/index.d.ts +166 -0
- package/dist/stock/index.js +115 -0
- package/dist/stock/transfers.d.ts +520 -0
- package/dist/stock/transfers.js +437 -0
- package/dist/stored-value/index.d.ts +154 -0
- package/dist/stored-value/index.js +130 -0
- package/dist/tenant/capabilities.d.ts +10 -0
- package/dist/tenant/entitlements.d.ts +35 -0
- package/dist/tenant/entitlements.js +15 -0
- package/dist/tenant/field-groups.d.ts +64 -0
- package/dist/tenant/field-groups.js +34 -0
- package/dist/tenant/legal-entity.d.ts +32 -0
- package/dist/tenant/legal-entity.js +41 -0
- package/dist/tenant/notifications.d.ts +148 -0
- package/dist/tenant/notifications.js +79 -0
- package/dist/tenant/retention.d.ts +10 -4
- package/dist/tenant/settings-sources.d.ts +103 -0
- package/dist/tenant/settings-sources.js +92 -0
- package/dist/types.d.ts +86 -11
- package/dist/uploads/index.d.ts +11 -7
- package/dist/users/index.d.ts +104 -0
- package/dist/users/index.js +80 -0
- package/package.json +3 -2
|
@@ -0,0 +1,654 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The product-feed contract: the rule AST a merchant builds, the configuration
|
|
3
|
+
* it lives in, and everything the generator, the review queues and the AI
|
|
4
|
+
* helpers report back.
|
|
5
|
+
*
|
|
6
|
+
* TWO CASING WORLDS meet here, and the difference is not cosmetic.
|
|
7
|
+
*
|
|
8
|
+
* 1. **The DTOs are camelCase**, like every other module: the wire is
|
|
9
|
+
* snake_case (`language_code`, `refresh_interval_minutes` — the plugins
|
|
10
|
+
* controllers project every row onto it) and the transport converts in both
|
|
11
|
+
* directions.
|
|
12
|
+
* 2. **The rule AST inside `mappingJson`, `filtersJson`, `settingsJson`,
|
|
13
|
+
* `rulesJson`, `entriesJson`, `perDestinationJson`, `payloadJson`,
|
|
14
|
+
* `statsJson` and `defaultSource` is camelCase ON THE WIRE**, stored and
|
|
15
|
+
* echoed byte-for-byte by the service. Those subtrees are never converted
|
|
16
|
+
* (see `preserve.ts`), so what a consumer builds is what the compiler reads.
|
|
17
|
+
*
|
|
18
|
+
* SYNC NOTE — the AST block mirrors `services/plugins/src/feeds/rules/types.ts`
|
|
19
|
+
* (plus `destinations/types.ts` for the destination and delivery keys, and the
|
|
20
|
+
* entity modules for the string unions). It is a hand-kept mirror, not
|
|
21
|
+
* generated: every shape is copied verbatim, never "improved" in transit. When
|
|
22
|
+
* the engine's AST changes, change this file in the same branch, or the rules a
|
|
23
|
+
* consumer emits come back as a 400 `INVALID_RULES`.
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* How one output value is produced. Every variant resolves to a STRING —
|
|
27
|
+
* numeric source fields are stringified on the way out and only compared
|
|
28
|
+
* numerically inside conditions.
|
|
29
|
+
*/
|
|
30
|
+
export type FeedValueSource =
|
|
31
|
+
/** A source-field key from the registry, e.g. `title`, `facet:colour`, `internal:size`. */
|
|
32
|
+
{
|
|
33
|
+
kind: 'field';
|
|
34
|
+
field: string;
|
|
35
|
+
}
|
|
36
|
+
/** A literal. */
|
|
37
|
+
| {
|
|
38
|
+
kind: 'static';
|
|
39
|
+
value: string;
|
|
40
|
+
}
|
|
41
|
+
/** Concatenation of parts, blank parts dropped before joining. */
|
|
42
|
+
| {
|
|
43
|
+
kind: 'combine';
|
|
44
|
+
parts: FeedValueSource[];
|
|
45
|
+
separator: string;
|
|
46
|
+
}
|
|
47
|
+
/** First-match substitution through a named lookup table; a miss yields ''. */
|
|
48
|
+
| {
|
|
49
|
+
kind: 'lookup';
|
|
50
|
+
source: FeedValueSource;
|
|
51
|
+
tableName: string;
|
|
52
|
+
}
|
|
53
|
+
/** Regex extraction; no match yields ''. `group` defaults to 1 (0 = whole match). */
|
|
54
|
+
| {
|
|
55
|
+
kind: 'extract';
|
|
56
|
+
source: FeedValueSource;
|
|
57
|
+
pattern: string;
|
|
58
|
+
group?: number;
|
|
59
|
+
}
|
|
60
|
+
/** The already-computed value of an internal field at a lower position. */
|
|
61
|
+
| {
|
|
62
|
+
kind: 'internal';
|
|
63
|
+
name: string;
|
|
64
|
+
};
|
|
65
|
+
/** Every `FeedValueSource.kind`, in the order a builder should offer them. */
|
|
66
|
+
export declare const FEED_VALUE_SOURCE_KINDS: readonly ["field", "static", "combine", "lookup", "extract", "internal"];
|
|
67
|
+
/** Discriminates a {@link FeedValueSource} without a switch at every call site. */
|
|
68
|
+
export declare function isFeedValueSourceKind<K extends FeedValueSource['kind']>(source: FeedValueSource, kind: K): source is Extract<FeedValueSource, {
|
|
69
|
+
kind: K;
|
|
70
|
+
}>;
|
|
71
|
+
export type FeedConditionOperator = 'eq' | 'neq' | 'contains' | 'not_contains' | 'blank' | 'not_blank' | 'gt' | 'lt' | 'gte' | 'lte' | 'in';
|
|
72
|
+
export declare const FEED_CONDITION_OPERATORS: readonly ["eq", "neq", "contains", "not_contains", "blank", "not_blank", "gt", "lt", "gte", "lte", "in"];
|
|
73
|
+
/** Operators that take NO `value` — a builder must hide the operand input for these. */
|
|
74
|
+
export declare const VALUELESS_FEED_CONDITION_OPERATORS: readonly FeedConditionOperator[];
|
|
75
|
+
/** Comparison operand. `in` takes the array form; `blank`/`not_blank` take none. */
|
|
76
|
+
export type FeedConditionValue = string | number | boolean | Array<string | number>;
|
|
77
|
+
/**
|
|
78
|
+
* A condition reads EITHER a bare source field (the common case) OR a full
|
|
79
|
+
* value source (for computed left-hand sides). The union makes "exactly one of
|
|
80
|
+
* them" a type error rather than a runtime check.
|
|
81
|
+
*/
|
|
82
|
+
export type FeedConditionOperand = {
|
|
83
|
+
field: string;
|
|
84
|
+
source?: never;
|
|
85
|
+
} | {
|
|
86
|
+
source: FeedValueSource;
|
|
87
|
+
field?: never;
|
|
88
|
+
};
|
|
89
|
+
export type FeedCondition = FeedConditionOperand & {
|
|
90
|
+
op: FeedConditionOperator;
|
|
91
|
+
value?: FeedConditionValue;
|
|
92
|
+
};
|
|
93
|
+
/** Boolean group; nests arbitrarily deep. An empty `conditions` array is vacuously true. */
|
|
94
|
+
export interface FeedConditionGroup {
|
|
95
|
+
logic: 'and' | 'or';
|
|
96
|
+
conditions: Array<FeedCondition | FeedConditionGroup>;
|
|
97
|
+
}
|
|
98
|
+
/** Narrows a node of a {@link FeedConditionGroup.conditions} array. */
|
|
99
|
+
export declare function isFeedConditionGroup(node: FeedCondition | FeedConditionGroup): node is FeedConditionGroup;
|
|
100
|
+
/** A post-processing step applied to a resolved value, in array order. */
|
|
101
|
+
export type FeedTransformSpec = {
|
|
102
|
+
kind: 'strip_html';
|
|
103
|
+
} | {
|
|
104
|
+
kind: 'truncate';
|
|
105
|
+
maxLen: number;
|
|
106
|
+
} | {
|
|
107
|
+
kind: 'upper';
|
|
108
|
+
} | {
|
|
109
|
+
kind: 'lower';
|
|
110
|
+
} | {
|
|
111
|
+
kind: 'capitalize';
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Minor units → `"1234.50 EUR"`, always in the feed's own currency — the
|
|
115
|
+
* amount is denominated in it, so no other code may label it.
|
|
116
|
+
*/
|
|
117
|
+
| {
|
|
118
|
+
kind: 'price_format';
|
|
119
|
+
};
|
|
120
|
+
/** Every `FeedTransformSpec.kind`, in the order a builder should offer them. */
|
|
121
|
+
export declare const FEED_TRANSFORM_KINDS: readonly ["strip_html", "truncate", "upper", "lower", "capitalize", "price_format"];
|
|
122
|
+
/** One conditional assignment. `when` omitted ⇒ unconditional (a catch-all). */
|
|
123
|
+
export interface FeedFieldRule {
|
|
124
|
+
when?: FeedConditionGroup;
|
|
125
|
+
value: FeedValueSource;
|
|
126
|
+
}
|
|
127
|
+
/** Rules producing one feed output field, e.g. `g:id` or `title`. */
|
|
128
|
+
export interface FeedFieldMapping {
|
|
129
|
+
/** Template target key this mapping fills. */
|
|
130
|
+
target: string;
|
|
131
|
+
/** Evaluated in order; FIRST MATCHING rule wins. */
|
|
132
|
+
rules: FeedFieldRule[];
|
|
133
|
+
/** Used when no rule matched. Without it the template's `defaultSource` applies. */
|
|
134
|
+
fallback?: FeedValueSource;
|
|
135
|
+
/** Applied to the resolved value, in order. */
|
|
136
|
+
transforms?: FeedTransformSpec[];
|
|
137
|
+
}
|
|
138
|
+
/** Stored shape of `feed_config.mapping_json` (column default `{}`). */
|
|
139
|
+
export interface FeedMappingSpec {
|
|
140
|
+
fields?: FeedFieldMapping[];
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* A computed value referenced as `internal:<name>`. Evaluated in ascending
|
|
144
|
+
* `position`, and may reference ONLY internal fields at a strictly lower
|
|
145
|
+
* position — the compiler rejects forward references.
|
|
146
|
+
*/
|
|
147
|
+
export interface FeedInternalFieldSpec {
|
|
148
|
+
name: string;
|
|
149
|
+
position: number;
|
|
150
|
+
rules: FeedFieldRule[];
|
|
151
|
+
fallback?: FeedValueSource;
|
|
152
|
+
transforms?: FeedTransformSpec[];
|
|
153
|
+
}
|
|
154
|
+
/** Stored shape of `feed_internal_field.rules_json` — the spec minus its columns. */
|
|
155
|
+
export type FeedInternalFieldRules = Omit<FeedInternalFieldSpec, 'name' | 'position'>;
|
|
156
|
+
/**
|
|
157
|
+
* Row inclusion. Both sides are optional; `exclude` WINS over `include` — a row
|
|
158
|
+
* matched by both is dropped.
|
|
159
|
+
*/
|
|
160
|
+
export interface FeedFilterSpec {
|
|
161
|
+
include?: FeedConditionGroup;
|
|
162
|
+
exclude?: FeedConditionGroup;
|
|
163
|
+
}
|
|
164
|
+
/** One substitution. `caseInsensitive` applies to this entry's `match` only. */
|
|
165
|
+
export interface FeedLookupEntry {
|
|
166
|
+
match: string;
|
|
167
|
+
value: string;
|
|
168
|
+
caseInsensitive?: boolean;
|
|
169
|
+
}
|
|
170
|
+
export type FeedDestinationKey = 'google' | 'meta' | 'tiktok' | 'pinterest';
|
|
171
|
+
/** Enforced by a CHECK constraint on `feed_config.destination`. */
|
|
172
|
+
export declare const FEED_DESTINATIONS: readonly ["google", "meta", "tiktok", "pinterest"];
|
|
173
|
+
/**
|
|
174
|
+
* How the items reach the destination:
|
|
175
|
+
* - `hosted-xml` — the platform hosts a URL the destination fetches on a schedule.
|
|
176
|
+
* - `api-push` — the platform pushes items over the destination's API.
|
|
177
|
+
*/
|
|
178
|
+
export type FeedDeliveryMode = 'hosted-xml' | 'api-push';
|
|
179
|
+
/** Server default page size; a list that omits `limit` gets this many rows. */
|
|
180
|
+
export declare const DEFAULT_FEED_PAGE_LIMIT = 20;
|
|
181
|
+
/** Hard ceiling — a larger `limit` is a 400, not a silent clamp. */
|
|
182
|
+
export declare const MAX_FEED_PAGE_LIMIT = 100;
|
|
183
|
+
/**
|
|
184
|
+
* Non-rule knobs the generator and the delivery layer read directly. Stored in
|
|
185
|
+
* `settings_json`, a preserved column — so these keys stay camelCase on the wire.
|
|
186
|
+
*/
|
|
187
|
+
export interface FeedConfigSettings {
|
|
188
|
+
/** Drop rows whose availability is `out_of_stock` instead of emitting them. */
|
|
189
|
+
excludeOutOfStock?: boolean;
|
|
190
|
+
/** Hard cap on emitted items; unset/0 means "no cap". */
|
|
191
|
+
maxItems?: number;
|
|
192
|
+
/** Storefront origin used to build `link`, e.g. `https://shop.example.com`. */
|
|
193
|
+
storefrontUrl?: string;
|
|
194
|
+
/** Public base URL assets are served from, used to build `image_link`. */
|
|
195
|
+
assetBaseUrl?: string;
|
|
196
|
+
}
|
|
197
|
+
export interface FeedConfig {
|
|
198
|
+
id: string;
|
|
199
|
+
name: string;
|
|
200
|
+
destination: FeedDestinationKey;
|
|
201
|
+
enabled: boolean;
|
|
202
|
+
/** Vendure `LanguageCode`, e.g. `nl` or `pt-BR`. */
|
|
203
|
+
languageCode: string;
|
|
204
|
+
/** ISO 3166-1 alpha-2, upper-case. */
|
|
205
|
+
country: string;
|
|
206
|
+
/** ISO 4217, upper-case. */
|
|
207
|
+
currencyCode: string;
|
|
208
|
+
/** Unguessable path segment of the public feed URL (32 hex chars). */
|
|
209
|
+
token: string;
|
|
210
|
+
filtersJson: FeedFilterSpec;
|
|
211
|
+
mappingJson: FeedMappingSpec;
|
|
212
|
+
settingsJson: FeedConfigSettings;
|
|
213
|
+
refreshIntervalMinutes: number;
|
|
214
|
+
createdAt: string;
|
|
215
|
+
updatedAt: string;
|
|
216
|
+
}
|
|
217
|
+
/** `token` is deliberately absent: it is minted server-side and only rotated. */
|
|
218
|
+
export interface CreateFeedConfigInput {
|
|
219
|
+
name: string;
|
|
220
|
+
destination: FeedDestinationKey;
|
|
221
|
+
enabled?: boolean;
|
|
222
|
+
languageCode: string;
|
|
223
|
+
country: string;
|
|
224
|
+
currencyCode: string;
|
|
225
|
+
filtersJson?: FeedFilterSpec;
|
|
226
|
+
mappingJson?: FeedMappingSpec;
|
|
227
|
+
settingsJson?: FeedConfigSettings;
|
|
228
|
+
refreshIntervalMinutes?: number;
|
|
229
|
+
}
|
|
230
|
+
export interface UpdateFeedConfigInput {
|
|
231
|
+
name?: string;
|
|
232
|
+
/** Changing this re-validates `mappingJson` against the new destination template. */
|
|
233
|
+
destination?: FeedDestinationKey;
|
|
234
|
+
enabled?: boolean;
|
|
235
|
+
languageCode?: string;
|
|
236
|
+
country?: string;
|
|
237
|
+
currencyCode?: string;
|
|
238
|
+
filtersJson?: FeedFilterSpec;
|
|
239
|
+
mappingJson?: FeedMappingSpec;
|
|
240
|
+
settingsJson?: FeedConfigSettings;
|
|
241
|
+
refreshIntervalMinutes?: number;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Accepted range for `refreshIntervalMinutes` — mirrors the DTO's own bounds.
|
|
245
|
+
*
|
|
246
|
+
* The floor is the sweep's, not an arbitrary one: the scheduler ticks every 10
|
|
247
|
+
* minutes and refuses to rebuild a feed more often than every 30, so a shorter
|
|
248
|
+
* interval was accepted and then quietly held to 30 — a setting that read back
|
|
249
|
+
* as something the platform never did.
|
|
250
|
+
*/
|
|
251
|
+
export declare const MIN_REFRESH_INTERVAL_MINUTES = 30;
|
|
252
|
+
export declare const MAX_REFRESH_INTERVAL_MINUTES = 10080;
|
|
253
|
+
/** Column default: rebuild every 6 hours. */
|
|
254
|
+
export declare const DEFAULT_REFRESH_INTERVAL_MINUTES = 360;
|
|
255
|
+
/** What `feeds.rotateToken` answers — the previous public URL stops resolving. */
|
|
256
|
+
export interface RotateFeedTokenResult {
|
|
257
|
+
token: string;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* One output field in a destination's template.
|
|
261
|
+
*
|
|
262
|
+
* `defaultSource` is a rule AST echoed verbatim, which is why it is preserved:
|
|
263
|
+
* without that a `lookup` default would arrive as `table_name` and a builder
|
|
264
|
+
* would save it corrupted.
|
|
265
|
+
*/
|
|
266
|
+
export interface FeedDestinationTemplateEntry {
|
|
267
|
+
/** Output key exactly as it must appear in the feed, e.g. `g:id`, `title`. */
|
|
268
|
+
target: string;
|
|
269
|
+
/** Missing/blank at validation time ⇒ an `error` issue (the item is unusable). */
|
|
270
|
+
required: boolean;
|
|
271
|
+
/** Platform cap in characters. Over-length values are truncated, then warned about. */
|
|
272
|
+
maxLen?: number;
|
|
273
|
+
/** Applied when the channel's mapping produced no value for `target`. */
|
|
274
|
+
defaultSource?: FeedValueSource;
|
|
275
|
+
/** Human note surfaced in the rule builder. */
|
|
276
|
+
notes?: string;
|
|
277
|
+
/**
|
|
278
|
+
* The feed GENERATOR fills this target itself — `link` from the canonical
|
|
279
|
+
* route, `g:item_group_id` from the product id, `g:additional_image_link`
|
|
280
|
+
* from the row's images, `g:google_product_category` from the channel's
|
|
281
|
+
* category mappings. No `defaultSource` can express any of those, so a UI
|
|
282
|
+
* that reads only `defaultSource` would report a filled field as unfilled.
|
|
283
|
+
* A mapping on such a target still wins.
|
|
284
|
+
*/
|
|
285
|
+
generatorFilled?: boolean;
|
|
286
|
+
}
|
|
287
|
+
export interface FeedDestination {
|
|
288
|
+
key: FeedDestinationKey;
|
|
289
|
+
label: string;
|
|
290
|
+
deliveryMode: FeedDeliveryMode;
|
|
291
|
+
/** Absent for `api-push` destinations whose payload is not a field template. */
|
|
292
|
+
template?: FeedDestinationTemplateEntry[];
|
|
293
|
+
}
|
|
294
|
+
export type FeedRunStatus = 'running' | 'completed' | 'failed';
|
|
295
|
+
export declare const FEED_RUN_STATUSES: readonly ["running", "completed", "failed"];
|
|
296
|
+
/** What asked for the run. `source_changed` = the catalogue watermark moved. */
|
|
297
|
+
export type FeedRunTrigger = 'scheduled' | 'source_changed' | 'manual';
|
|
298
|
+
export declare const FEED_RUN_TRIGGERS: readonly ["scheduled", "source_changed", "manual"];
|
|
299
|
+
/**
|
|
300
|
+
* Free-form per-run display data, written by the generator and echoed verbatim
|
|
301
|
+
* — so its members are camelCase and its counters are keyed by ISSUE CODE
|
|
302
|
+
* (`no_category`, `missing_required`), which is why the whole subtree is
|
|
303
|
+
* preserved.
|
|
304
|
+
*/
|
|
305
|
+
export interface FeedRunStats {
|
|
306
|
+
/** Issue code → number of issues with that code in this run. */
|
|
307
|
+
issueCounts?: Record<string, number>;
|
|
308
|
+
/** Language the snapshot was extracted in — one run covers exactly one. */
|
|
309
|
+
languageCode?: string;
|
|
310
|
+
[key: string]: unknown;
|
|
311
|
+
}
|
|
312
|
+
export interface FeedRun {
|
|
313
|
+
id: string;
|
|
314
|
+
feedConfigId: string;
|
|
315
|
+
status: FeedRunStatus;
|
|
316
|
+
trigger: FeedRunTrigger;
|
|
317
|
+
/** `productFeedSourceStats.version` the snapshot was taken at (bigint as text). */
|
|
318
|
+
sourceVersion: string;
|
|
319
|
+
itemsTotal: number;
|
|
320
|
+
itemsIncluded: number;
|
|
321
|
+
itemsExcluded: number;
|
|
322
|
+
/** Size of the UNCOMPRESSED rendered feed body. */
|
|
323
|
+
bytes: number;
|
|
324
|
+
durationMs: number;
|
|
325
|
+
/** Populated only for `status = 'failed'`. */
|
|
326
|
+
error: string | null;
|
|
327
|
+
statsJson: FeedRunStats;
|
|
328
|
+
startedAt: string;
|
|
329
|
+
finishedAt: string | null;
|
|
330
|
+
createdAt: string;
|
|
331
|
+
}
|
|
332
|
+
/** `error` blocks the item at the destination; `warning` ships but degrades it. */
|
|
333
|
+
export type FeedItemIssueSeverity = 'error' | 'warning';
|
|
334
|
+
export declare const FEED_ITEM_ISSUE_SEVERITIES: readonly ["error", "warning"];
|
|
335
|
+
/**
|
|
336
|
+
* One finding about one item. Only the LATEST successful run's issues are kept
|
|
337
|
+
* per configuration — these always describe the body being served right now.
|
|
338
|
+
*/
|
|
339
|
+
export interface FeedItemIssue {
|
|
340
|
+
id: string;
|
|
341
|
+
runId: string;
|
|
342
|
+
feedConfigId: string;
|
|
343
|
+
productId: string;
|
|
344
|
+
variantId: string;
|
|
345
|
+
severity: FeedItemIssueSeverity;
|
|
346
|
+
/** Machine code, e.g. `missing_required`, `no_category`, `duplicate_id`. Not a closed set. */
|
|
347
|
+
code: string;
|
|
348
|
+
/** Template target the issue is about (`title`, `g:gtin`); null for item-level issues. */
|
|
349
|
+
field: string | null;
|
|
350
|
+
message: string;
|
|
351
|
+
sampleValue: string | null;
|
|
352
|
+
createdAt: string;
|
|
353
|
+
}
|
|
354
|
+
/** Ack for an enqueued regeneration — the work happens on the queue. */
|
|
355
|
+
export interface FeedRegenerateResult {
|
|
356
|
+
/**
|
|
357
|
+
* Always `true` on a 2xx: a job for this feed IS on the queue, whether this
|
|
358
|
+
* call put it there or found it already waiting.
|
|
359
|
+
*/
|
|
360
|
+
enqueued: boolean;
|
|
361
|
+
/** Queue job id, so a caller can correlate the run that appears seconds later. */
|
|
362
|
+
jobId: string;
|
|
363
|
+
feedConfigId: string;
|
|
364
|
+
/**
|
|
365
|
+
* Present and `true` only when this press found the SAME feed's job already
|
|
366
|
+
* queued or running, so nothing new was enqueued. A caller should say
|
|
367
|
+
* "already queued" rather than claim it started a second pass — eleven
|
|
368
|
+
* impatient clicks are one run.
|
|
369
|
+
*/
|
|
370
|
+
deduplicated?: true;
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* The 429 a forced regeneration is refused with while the CHANNEL's throttle
|
|
374
|
+
* window is still open. Every forced pass walks the whole catalogue on a
|
|
375
|
+
* `concurrency: 1` worker shared by every tenant, so a tenant with twenty feeds
|
|
376
|
+
* cannot queue twenty walks ahead of everyone else's scheduled refresh.
|
|
377
|
+
*
|
|
378
|
+
* It is NOT the dedup case above: that one is a 202 and means "your job is
|
|
379
|
+
* already running". This one means "nothing was queued, come back later".
|
|
380
|
+
*/
|
|
381
|
+
export declare const FEED_REGENERATE_THROTTLED = "FEED_REGENERATE_THROTTLED";
|
|
382
|
+
/** A refused regeneration, with the wait the service asked for. */
|
|
383
|
+
export interface FeedRegenerateThrottle {
|
|
384
|
+
/** Seconds to wait, when the service named one. */
|
|
385
|
+
retryAfterSeconds?: number;
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Read a rejected {@link FeedsModule.regenerate} as a throttle refusal, or
|
|
389
|
+
* `null` for anything else (a 404, a network failure) — those stay generic.
|
|
390
|
+
*
|
|
391
|
+
* A guard rather than a class check: the transport maps the problem body onto a
|
|
392
|
+
* `RateLimitedError`, and a caller should key on the stable CODE rather than on
|
|
393
|
+
* an instance that a future mapping change could swap.
|
|
394
|
+
*/
|
|
395
|
+
export declare function readFeedRegenerateThrottle(error: unknown): FeedRegenerateThrottle | null;
|
|
396
|
+
/** A draft configuration evaluated against real source rows and thrown away. */
|
|
397
|
+
export interface FeedPreviewDraft {
|
|
398
|
+
destination: FeedDestinationKey;
|
|
399
|
+
languageCode: string;
|
|
400
|
+
country: string;
|
|
401
|
+
currencyCode: string;
|
|
402
|
+
filtersJson?: FeedFilterSpec;
|
|
403
|
+
mappingJson?: FeedMappingSpec;
|
|
404
|
+
settingsJson?: FeedConfigSettings;
|
|
405
|
+
/** 1…50; omitted ⇒ the server's default of 10. */
|
|
406
|
+
sampleSize?: number;
|
|
407
|
+
}
|
|
408
|
+
export interface FeedPreviewIssue {
|
|
409
|
+
severity: FeedItemIssueSeverity;
|
|
410
|
+
code: string;
|
|
411
|
+
field: string;
|
|
412
|
+
message: string;
|
|
413
|
+
}
|
|
414
|
+
export interface FeedPreviewItem {
|
|
415
|
+
productId: string;
|
|
416
|
+
variantId: string;
|
|
417
|
+
sku: string;
|
|
418
|
+
/** False when the draft's filters dropped the row; `values` is then empty. */
|
|
419
|
+
included: boolean;
|
|
420
|
+
/** Final evaluated values keyed by template target — post-transform, post-truncation. */
|
|
421
|
+
values: Record<string, string>;
|
|
422
|
+
/** Resolved internal-field values, keyed by name. */
|
|
423
|
+
appliedInternal: Record<string, string>;
|
|
424
|
+
issues: FeedPreviewIssue[];
|
|
425
|
+
}
|
|
426
|
+
export interface FeedPreview {
|
|
427
|
+
/** Rows actually evaluated (may be fewer than requested on a small catalogue). */
|
|
428
|
+
sampleSize: number;
|
|
429
|
+
items: FeedPreviewItem[];
|
|
430
|
+
/** Per-code totals across the sample, for the "N items have no category" banner. */
|
|
431
|
+
issueCounts: Record<string, number>;
|
|
432
|
+
}
|
|
433
|
+
/** Sample size when the caller does not ask for one. */
|
|
434
|
+
export declare const DEFAULT_PREVIEW_SAMPLE_SIZE = 10;
|
|
435
|
+
/** Hard ceiling on a preview sample; a bigger request is a 400. */
|
|
436
|
+
export declare const MAX_PREVIEW_SAMPLE_SIZE = 50;
|
|
437
|
+
/**
|
|
438
|
+
* A channel-scoped computed value that mapping rules reference as
|
|
439
|
+
* `internal:<name>`. Evaluated in ascending `position`; a field may only
|
|
440
|
+
* reference fields at a strictly LOWER position.
|
|
441
|
+
*/
|
|
442
|
+
export interface FeedInternalField {
|
|
443
|
+
id: string;
|
|
444
|
+
/** Identifier (not a label): `^[a-z][a-z0-9_]*$`, unique within the channel. */
|
|
445
|
+
name: string;
|
|
446
|
+
position: number;
|
|
447
|
+
rulesJson: FeedInternalFieldRules;
|
|
448
|
+
createdAt: string;
|
|
449
|
+
updatedAt: string;
|
|
450
|
+
}
|
|
451
|
+
export interface CreateFeedInternalFieldInput {
|
|
452
|
+
name: string;
|
|
453
|
+
position?: number;
|
|
454
|
+
rulesJson: FeedInternalFieldRules;
|
|
455
|
+
}
|
|
456
|
+
export interface UpdateFeedInternalFieldInput {
|
|
457
|
+
name?: string;
|
|
458
|
+
position?: number;
|
|
459
|
+
rulesJson?: FeedInternalFieldRules;
|
|
460
|
+
}
|
|
461
|
+
/** Identifier rule shared by internal fields and lookup tables. */
|
|
462
|
+
export declare const FEED_IDENTIFIER_PATTERN: RegExp;
|
|
463
|
+
/**
|
|
464
|
+
* A named substitution table referenced by `{ kind: 'lookup', tableName }`.
|
|
465
|
+
* Entries are ordered and FIRST MATCH WINS; a miss yields the empty string.
|
|
466
|
+
*/
|
|
467
|
+
export interface FeedLookupTable {
|
|
468
|
+
id: string;
|
|
469
|
+
name: string;
|
|
470
|
+
entriesJson: FeedLookupEntry[];
|
|
471
|
+
/** Convenience for list views that must not walk the array to count it. */
|
|
472
|
+
entryCount: number;
|
|
473
|
+
createdAt: string;
|
|
474
|
+
updatedAt: string;
|
|
475
|
+
}
|
|
476
|
+
export interface CreateFeedLookupTableInput {
|
|
477
|
+
name: string;
|
|
478
|
+
entriesJson: FeedLookupEntry[];
|
|
479
|
+
}
|
|
480
|
+
export interface UpdateFeedLookupTableInput {
|
|
481
|
+
name?: string;
|
|
482
|
+
/** Entries are replaced WHOLESALE — send the full list, never a delta. */
|
|
483
|
+
entriesJson?: FeedLookupEntry[];
|
|
484
|
+
}
|
|
485
|
+
/** Server cap on `entriesJson` length. */
|
|
486
|
+
export declare const MAX_LOOKUP_ENTRIES = 5000;
|
|
487
|
+
/** How a mapping row is matched against an item. */
|
|
488
|
+
export type FeedCategoryMatchType = 'collection' | 'facet_value' | 'default';
|
|
489
|
+
export declare const FEED_CATEGORY_MATCH_TYPES: readonly ["collection", "facet_value", "default"];
|
|
490
|
+
/** Where the mapping came from — a human, or the AI categoriser. */
|
|
491
|
+
export type FeedCategoryMappingSource = 'manual' | 'ai';
|
|
492
|
+
export declare const FEED_CATEGORY_MAPPING_SOURCES: readonly ["manual", "ai"];
|
|
493
|
+
/** Review state. Only `approved` rows are applied when generating a feed. */
|
|
494
|
+
export type FeedCategoryMappingStatus = 'approved' | 'suggested' | 'rejected';
|
|
495
|
+
export declare const FEED_CATEGORY_MAPPING_STATUSES: readonly ["approved", "suggested", "rejected"];
|
|
496
|
+
/**
|
|
497
|
+
* Per-destination category overrides, keyed by destination key. Stored in the
|
|
498
|
+
* preserved column `per_destination_json`, so the inner keys stay camelCase.
|
|
499
|
+
*/
|
|
500
|
+
export type FeedPerDestinationCategories = Partial<Record<FeedDestinationKey, {
|
|
501
|
+
categoryId?: string;
|
|
502
|
+
categoryPath?: string;
|
|
503
|
+
}>>;
|
|
504
|
+
export interface FeedCategoryMapping {
|
|
505
|
+
id: string;
|
|
506
|
+
matchType: FeedCategoryMatchType;
|
|
507
|
+
/** Vendure Collection id; set iff `matchType === 'collection'`. */
|
|
508
|
+
collectionId: string | null;
|
|
509
|
+
/** Vendure FacetValue id; set iff `matchType === 'facet_value'`. */
|
|
510
|
+
facetValueId: string | null;
|
|
511
|
+
/** Google taxonomy numeric id, as text (it is an identifier, not a number). */
|
|
512
|
+
googleCategoryId: string;
|
|
513
|
+
/** Full ` > `-separated path — always RE-DERIVED server-side, never echoed. */
|
|
514
|
+
googleCategoryPath: string;
|
|
515
|
+
perDestinationJson: FeedPerDestinationCategories;
|
|
516
|
+
source: FeedCategoryMappingSource;
|
|
517
|
+
/** Model confidence in [0,1] for `source = 'ai'`; null for manual rows. */
|
|
518
|
+
aiConfidence: number | null;
|
|
519
|
+
status: FeedCategoryMappingStatus;
|
|
520
|
+
createdAt: string;
|
|
521
|
+
updatedAt: string;
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* `collectionId` is set iff `matchType = 'collection'`, `facetValueId` iff
|
|
525
|
+
* `'facet_value'`; `'default'` carries neither (at most one per channel).
|
|
526
|
+
*
|
|
527
|
+
* A `googleCategoryPath` is accepted but IGNORED — the service re-derives it
|
|
528
|
+
* from `googleCategoryId` against the vendored taxonomy, which is why this
|
|
529
|
+
* input does not offer one.
|
|
530
|
+
*/
|
|
531
|
+
export interface CreateFeedCategoryMappingInput {
|
|
532
|
+
matchType: FeedCategoryMatchType;
|
|
533
|
+
collectionId?: string;
|
|
534
|
+
facetValueId?: string;
|
|
535
|
+
googleCategoryId: string;
|
|
536
|
+
perDestinationJson?: FeedPerDestinationCategories;
|
|
537
|
+
source?: FeedCategoryMappingSource;
|
|
538
|
+
aiConfidence?: number;
|
|
539
|
+
status?: FeedCategoryMappingStatus;
|
|
540
|
+
}
|
|
541
|
+
export interface UpdateFeedCategoryMappingInput {
|
|
542
|
+
googleCategoryId?: string;
|
|
543
|
+
perDestinationJson?: FeedPerDestinationCategories;
|
|
544
|
+
status?: FeedCategoryMappingStatus;
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* Decide a batch of suggestions, selected EITHER by id or by confidence.
|
|
548
|
+
*
|
|
549
|
+
* `minConfidence` is not a convenience: a client only ever holds the rows it
|
|
550
|
+
* has paged in, so an id list built from the loaded page silently stops at the
|
|
551
|
+
* page boundary. Selecting server-side is the only way "approve everything the
|
|
552
|
+
* model was sure about" can mean every such row in the channel.
|
|
553
|
+
*/
|
|
554
|
+
export interface BulkUpdateCategoryMappingStatusInput {
|
|
555
|
+
/** Explicit rows (max {@link MAX_BULK_STATUS_IDS}). Takes precedence over the threshold. */
|
|
556
|
+
ids?: string[];
|
|
557
|
+
/** Every `suggested` AI row in the channel at or above this confidence. */
|
|
558
|
+
minConfidence?: number;
|
|
559
|
+
status: FeedCategoryMappingStatus;
|
|
560
|
+
}
|
|
561
|
+
export interface BulkStatusUpdateResult {
|
|
562
|
+
/** Rows actually changed — ids belonging to another channel are skipped, not errored. */
|
|
563
|
+
updated: number;
|
|
564
|
+
status: FeedCategoryMappingStatus;
|
|
565
|
+
}
|
|
566
|
+
/** Server cap on one bulk status call. */
|
|
567
|
+
export declare const MAX_BULK_STATUS_IDS = 500;
|
|
568
|
+
export interface FeedTaxonomyNode {
|
|
569
|
+
/** Google's numeric taxonomy id, e.g. 166. */
|
|
570
|
+
id: number;
|
|
571
|
+
/** Full ` > `-separated path, e.g. `Apparel & Accessories > Clothing`. */
|
|
572
|
+
path: string;
|
|
573
|
+
}
|
|
574
|
+
export declare const TAXONOMY_DEFAULT_LIMIT = 20;
|
|
575
|
+
export declare const TAXONOMY_MAX_LIMIT = 50;
|
|
576
|
+
/** Lifecycle of one channel's categorisation pass. `idle` = never run / marker expired. */
|
|
577
|
+
export type FeedCategorySuggestState = 'idle' | 'queued' | 'running' | 'completed' | 'failed';
|
|
578
|
+
/** What a finished pass produced. Every counter is merchant-facing. */
|
|
579
|
+
export interface FeedCategorySuggestSummary {
|
|
580
|
+
collectionsConsidered: number;
|
|
581
|
+
/** Collections that already had a manual or approved mapping. */
|
|
582
|
+
collectionsSkipped: number;
|
|
583
|
+
suggestionsWritten: number;
|
|
584
|
+
/** Model answers whose path did not match the taxonomy — discarded, never guessed. */
|
|
585
|
+
discardedNoMatch: number;
|
|
586
|
+
cacheHits: number;
|
|
587
|
+
/** Suggestions lost to a mapping the merchant created WHILE the pass ran. */
|
|
588
|
+
writeConflicts: number;
|
|
589
|
+
/**
|
|
590
|
+
* Answers that proposed exactly the category the merchant had rejected for
|
|
591
|
+
* that collection — not re-proposed. Absent on a summary from an older
|
|
592
|
+
* plugins service.
|
|
593
|
+
*/
|
|
594
|
+
rejectedAgain?: number;
|
|
595
|
+
}
|
|
596
|
+
export interface SuggestCategoryMappingsInput {
|
|
597
|
+
/** Re-ask the model for every collection, ignoring the per-collection result cache. */
|
|
598
|
+
force?: boolean;
|
|
599
|
+
}
|
|
600
|
+
export interface CategorySuggestEnqueueResult {
|
|
601
|
+
enqueued: boolean;
|
|
602
|
+
jobId: string | null;
|
|
603
|
+
aiAvailable: boolean;
|
|
604
|
+
}
|
|
605
|
+
export interface CategorySuggestStatus {
|
|
606
|
+
state: FeedCategorySuggestState;
|
|
607
|
+
/** False when the platform has no LLM configured — render the hint, don't error. */
|
|
608
|
+
aiAvailable: boolean;
|
|
609
|
+
jobId: string | null;
|
|
610
|
+
queuedAt: string | null;
|
|
611
|
+
startedAt: string | null;
|
|
612
|
+
finishedAt: string | null;
|
|
613
|
+
summary: FeedCategorySuggestSummary | null;
|
|
614
|
+
error: string | null;
|
|
615
|
+
}
|
|
616
|
+
export type FeedAiSuggestionKind = 'title_preset';
|
|
617
|
+
export type FeedAiSuggestionStatus = 'suggested' | 'accepted' | 'dismissed';
|
|
618
|
+
/**
|
|
619
|
+
* One before/after pair. `after` is evaluated SERVER-SIDE with the real rules
|
|
620
|
+
* engine against a real catalogue row — it is what the feed will emit, not text
|
|
621
|
+
* the model wrote.
|
|
622
|
+
*/
|
|
623
|
+
export interface TitlePresetExample {
|
|
624
|
+
sku: string;
|
|
625
|
+
before: string;
|
|
626
|
+
after: string;
|
|
627
|
+
}
|
|
628
|
+
/** `payloadJson` of a `title_preset` suggestion. `mapping` is a rule AST. */
|
|
629
|
+
export interface TitlePresetPayload {
|
|
630
|
+
mapping: FeedFieldMapping;
|
|
631
|
+
rationale: string;
|
|
632
|
+
examples: TitlePresetExample[];
|
|
633
|
+
model?: string;
|
|
634
|
+
}
|
|
635
|
+
export interface FeedAiSuggestion {
|
|
636
|
+
id: string;
|
|
637
|
+
feedConfigId: string | null;
|
|
638
|
+
kind: FeedAiSuggestionKind;
|
|
639
|
+
status: FeedAiSuggestionStatus;
|
|
640
|
+
payloadJson: TitlePresetPayload;
|
|
641
|
+
createdAt: string;
|
|
642
|
+
updatedAt: string;
|
|
643
|
+
}
|
|
644
|
+
/** Read shape of a mapping tab's AI affordance: the pending proposal, if any. */
|
|
645
|
+
export interface TitlePresetStatus {
|
|
646
|
+
aiAvailable: boolean;
|
|
647
|
+
suggestion: FeedAiSuggestion | null;
|
|
648
|
+
}
|
|
649
|
+
export interface GenerateTitlePresetInput {
|
|
650
|
+
/** Rows to sample; the server default is 20. */
|
|
651
|
+
sampleSize?: number;
|
|
652
|
+
}
|
|
653
|
+
/** The 409 both AI endpoints refuse with when no LLM is configured. */
|
|
654
|
+
export declare const AI_UNAVAILABLE_CODE = "AI_UNAVAILABLE";
|