platform-types 1.10.801 → 1.10.802
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/literals.d.ts +7 -0
- package/dist/platform.d.ts +64 -1
- package/dist/userActivity.d.ts +1 -0
- package/package.json +1 -1
package/dist/literals.d.ts
CHANGED
|
@@ -10,6 +10,13 @@ declare global {
|
|
|
10
10
|
interface ResolvedStorefrontLiterals {
|
|
11
11
|
values: Record<string, string>;
|
|
12
12
|
provenance: Record<string, 'default' | 'GLOBAL' | 'WEB' | `WEB#${string}`>;
|
|
13
|
+
/**
|
|
14
|
+
* The compiled storefront default of each key, before any layer is applied: what a
|
|
15
|
+
* revert restores, and the text whose `{tokens}` an override must keep. No stored
|
|
16
|
+
* layer changes it. A key the catalog generator excludes has no entry, so a missing
|
|
17
|
+
* entry means "default unknown"; the six blanked payment keys are `''`.
|
|
18
|
+
*/
|
|
19
|
+
defaults: Record<string, string>;
|
|
13
20
|
}
|
|
14
21
|
/**
|
|
15
22
|
* One scope's literals, unmerged.
|
package/dist/platform.d.ts
CHANGED
|
@@ -227,9 +227,72 @@ export interface PlatformLiteralsBody extends PlatformOperatorReason {
|
|
|
227
227
|
literals: Record<string, string | null>;
|
|
228
228
|
/**
|
|
229
229
|
* Must equal the store id inside a per-tenant scope; absent or wrong there is
|
|
230
|
-
* `400 CONFIRMATION_MISMATCH`. Ignored on a global scope, which names no tenant
|
|
230
|
+
* `400 CONFIRMATION_MISMATCH`. Ignored on a global scope, which names no tenant,
|
|
231
|
+
* and ignored on a dry run.
|
|
231
232
|
*/
|
|
232
233
|
confirm?: string;
|
|
234
|
+
/**
|
|
235
|
+
* `true` judges each key on its own and writes nothing: no row, no activity
|
|
236
|
+
* row, no audit row. The answer is `PlatformLiteralsDryRunResult`. A bad
|
|
237
|
+
* scope, an empty map or a bad reason is still a request-level 400. The
|
|
238
|
+
* legacy `WEB#` write conflicts happen only at commit and are not predicted.
|
|
239
|
+
*/
|
|
240
|
+
dryRun?: boolean;
|
|
241
|
+
}
|
|
242
|
+
/** Why a dry run says one key would be refused. */
|
|
243
|
+
export type PlatformLiteralDryRunError = 'RESERVED_KEY' | 'INVALID_KEY' | 'VALUE_TOO_LONG' | 'LITERAL_KEY_NOT_ALLOWED';
|
|
244
|
+
/**
|
|
245
|
+
* One key of a dry run: what the write would do (`set` a new value, `remove` a
|
|
246
|
+
* stored one, or leave it `unchanged`), or the code that would refuse it.
|
|
247
|
+
*/
|
|
248
|
+
export type PlatformLiteralDryRunKeyResult = {
|
|
249
|
+
key: string;
|
|
250
|
+
verdict: 'set' | 'remove' | 'unchanged';
|
|
251
|
+
} | {
|
|
252
|
+
key: string;
|
|
253
|
+
error: PlatformLiteralDryRunError;
|
|
254
|
+
};
|
|
255
|
+
/** `POST /platform/literals { dryRun: true }` → `200 { message, data }`, one result per body key. */
|
|
256
|
+
export interface PlatformLiteralsDryRunResult {
|
|
257
|
+
results: PlatformLiteralDryRunKeyResult[];
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* One change on `GET /platform/literals/{scope}/{key}/history`. `before` and
|
|
261
|
+
* `after` are the stored values on each side of the change, `''` for a key the
|
|
262
|
+
* scope does not hold. `actorStoreId` is the acting manager's own store, since
|
|
263
|
+
* `actorId` is numbered per store. `actorName` is absent when the actor's
|
|
264
|
+
* activity row can no longer be read; `reason` is absent when none was sent.
|
|
265
|
+
*/
|
|
266
|
+
export interface PlatformLiteralHistoryEntry {
|
|
267
|
+
at: string;
|
|
268
|
+
actorId: string;
|
|
269
|
+
actorStoreId?: string;
|
|
270
|
+
actorName?: string;
|
|
271
|
+
before: string;
|
|
272
|
+
after: string;
|
|
273
|
+
reason?: string;
|
|
274
|
+
}
|
|
275
|
+
/** `GET /platform/literals/{scope}/{key}/history`: newest first; send `cursor` back as `?cursor=`. */
|
|
276
|
+
export interface PlatformLiteralHistoryResponse {
|
|
277
|
+
data: PlatformLiteralHistoryEntry[];
|
|
278
|
+
cursor?: string;
|
|
279
|
+
}
|
|
280
|
+
/** One store's own value for a key, on its `APP#{storeId}` or `WEB#{storeId}` row. */
|
|
281
|
+
export interface PlatformLiteralOverride {
|
|
282
|
+
storeId: string;
|
|
283
|
+
/** Absent when the store row has no name, or can no longer be read. */
|
|
284
|
+
storeName?: string;
|
|
285
|
+
scope: `APP#${string}` | `WEB#${string}`;
|
|
286
|
+
value: string;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* `GET /platform/literals/overrides?key=K`. `truncated` is `true` when the read
|
|
290
|
+
* stopped at its bound before reaching every tenant row, so the list may be
|
|
291
|
+
* incomplete.
|
|
292
|
+
*/
|
|
293
|
+
export interface PlatformLiteralOverridesResponse {
|
|
294
|
+
data: PlatformLiteralOverride[];
|
|
295
|
+
truncated?: true;
|
|
233
296
|
}
|
|
234
297
|
/** `POST /platform/operations { mode: 'mp-recover-payment' }`. */
|
|
235
298
|
/** Tracked non-money refresh returned inside the standard response data envelope. */
|
package/dist/userActivity.d.ts
CHANGED