platform-types 1.10.680 → 1.10.682

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.
@@ -16,6 +16,7 @@ exports.STOREFRONT_DESIGN_LIMITS = {
16
16
  faqs: 20,
17
17
  benefits: 8,
18
18
  historyEntries: 20,
19
+ selectedSourceIds: 50,
19
20
  documentBytes: 256 * 1024,
20
21
  heading: 120,
21
22
  label: 80,
package/dist/store.d.ts CHANGED
@@ -892,6 +892,13 @@ declare global {
892
892
  * value refetches `GET /store` to see those.
893
893
  */
894
894
  publicStorefront?: PublicStorefront | null;
895
+ /**
896
+ * Server-built public contact on web GET /store and customer STORE frames.
897
+ * Absent means an older API; an empty object means no validated public
898
+ * targets. Private fields are omitted. Before design adoption, only the
899
+ * email/phone pair explicitly consented by config.publicContact is used.
900
+ */
901
+ publicContact?: StorefrontPublicContact;
895
902
  /** Read-only legacy editor seed, available only to the entitled tenant ADMIN. */
896
903
  storefrontEditorBaseline?: StorefrontEditorBaseline;
897
904
  photoURL: string;
@@ -12,6 +12,7 @@ export declare const STOREFRONT_DESIGN_LIMITS: {
12
12
  readonly faqs: 20;
13
13
  readonly benefits: 8;
14
14
  readonly historyEntries: 20;
15
+ readonly selectedSourceIds: 50;
15
16
  readonly documentBytes: number;
16
17
  readonly heading: 120;
17
18
  readonly label: 80;
@@ -229,6 +230,30 @@ declare global {
229
230
  value: StorefrontDesignContactValues[K];
230
231
  };
231
232
  };
233
+ /** Public overrides only. Missing, private, empty and invalid fields are omitted by the server. */
234
+ interface StorefrontPublicContact {
235
+ email?: string;
236
+ /** Explicit +E.164 (8–15 digits); the server never guesses a country code. */
237
+ phone?: {
238
+ number: string;
239
+ url: `tel:${string}`;
240
+ };
241
+ /** Same E.164 number, with a digits-only wa.me path and no platform fallback. */
242
+ whatsapp?: {
243
+ number: string;
244
+ url: `https://wa.me/${string}`;
245
+ };
246
+ /** Plain display text; renderers must escape markup. Independent of fiscal/legal identity. */
247
+ address?: string;
248
+ /** Rows may repeat days or overlap to represent split shifts; overnight hours use separate rows. */
249
+ hours?: StorefrontContactHours;
250
+ /** At most one account per kind (six kinds), with an approved HTTPS destination. */
251
+ socials?: StorefrontContactSocial[];
252
+ }
253
+ /** Published design projection; contact values contain normalized destinations without author visibility wrappers. */
254
+ type StorefrontDesignPublic = Omit<StorefrontDesignV1, 'contact'> & {
255
+ contact: StorefrontPublicContact;
256
+ };
232
257
  interface StorefrontDesignV1 {
233
258
  schemaVersion: 1;
234
259
  templateId: 'standard';
@@ -249,7 +274,7 @@ declare global {
249
274
  path: string;
250
275
  code: StorefrontDesignFieldErrorCode;
251
276
  }
252
- type StorefrontDesignErrorCode = 'STOREFRONT_DESIGN_INVALID' | 'STOREFRONT_SCHEMA_UNSUPPORTED' | 'STOREFRONT_REVISION_CONFLICT' | 'STOREFRONT_REQUEST_EXPIRED' | 'IDEMPOTENCY_CONFLICT' | 'STOREFRONT_EDITOR_REQUIRED' | 'STOREFRONT_ASSET_NOT_READY' | 'STOREFRONT_PREVIEW_EXPIRED' | 'STOREFRONT_PREVIEW_REVOKED' | 'STOREFRONT_PREVIEW_FORBIDDEN';
277
+ type StorefrontDesignErrorCode = 'STOREFRONT_DESIGN_INVALID' | 'STOREFRONT_SCHEMA_UNSUPPORTED' | 'STOREFRONT_REVISION_CONFLICT' | 'STOREFRONT_DRAFT_NOT_INITIALIZED' | 'STOREFRONT_REQUEST_EXPIRED' | 'STOREFRONT_PUBLICATION_NOT_FOUND' | 'STOREFRONT_DRAFT_UNAVAILABLE' | 'IDEMPOTENCY_CONFLICT' | 'STOREFRONT_EDITOR_REQUIRED' | 'STOREFRONT_ASSET_NOT_READY' | 'STOREFRONT_PREVIEW_EXPIRED' | 'STOREFRONT_PREVIEW_REVOKED' | 'STOREFRONT_PREVIEW_FORBIDDEN';
253
278
  interface StorefrontDesignMappingConflict {
254
279
  path: string;
255
280
  code: 'LEGACY_MULTIPLE_PRODUCT_FEEDS' | 'LEGACY_UNMAPPED_CONTENT';
@@ -280,6 +305,7 @@ declare global {
280
305
  }
281
306
  type StorefrontDesignSaveInput = StorefrontDesignRevisionInput & {
282
307
  document: StorefrontDesignV1;
308
+ resolvedMappingConflictPaths?: string[];
283
309
  };
284
310
  type StorefrontDesignRestoreInput = StorefrontDesignRevisionInput & {
285
311
  publicationId: string;
@@ -289,12 +315,41 @@ declare global {
289
315
  interface StorefrontDesignPreviewInput {
290
316
  draftRevision: string;
291
317
  }
318
+ interface StorefrontDesignBaselineResult {
319
+ draftRevision: null;
320
+ publishedRevision: null;
321
+ document: StorefrontDesignV1;
322
+ dirty: false;
323
+ mappingConflicts: StorefrontDesignMappingConflict[];
324
+ legacySourceRevision: string;
325
+ }
326
+ interface StorefrontDesignHistoryEntry {
327
+ publicationId: string;
328
+ committedRevision: string;
329
+ /**
330
+ * The publishing tenant ADMIN's authorizer user id (`USR…`), the same id a
331
+ * store user list carries — resolve it to a name there. Never an email,
332
+ * display name or system sentinel: the store-level `LEGACY_LOGO` actor exists
333
+ * only on private media receipts and never reaches history.
334
+ */
335
+ actor: string;
336
+ committedAt: string;
337
+ }
338
+ interface StorefrontDesignHistoryQuery {
339
+ limit?: number;
340
+ cursor?: string;
341
+ }
342
+ interface StorefrontDesignHistoryPage {
343
+ items: StorefrontDesignHistoryEntry[];
344
+ cursor?: string;
345
+ }
292
346
  interface StorefrontDesignDraftResult {
293
347
  draftRevision: string;
294
348
  publishedRevision: string | null;
295
349
  document: StorefrontDesignV1;
296
350
  dirty: boolean;
297
351
  mappingConflicts: StorefrontDesignMappingConflict[];
352
+ legacySourceRevision: string;
298
353
  }
299
354
  interface StorefrontDesignDeliveryTarget {
300
355
  targetId: string;
@@ -354,7 +409,11 @@ declare global {
354
409
  };
355
410
  type StorefrontDesignDraftResponse = {
356
411
  message: string;
357
- data: StorefrontDesignDraftResult;
412
+ data: StorefrontDesignDraftResult | StorefrontDesignBaselineResult;
413
+ } | StorefrontDesignFailure;
414
+ type StorefrontDesignHistoryResponse = {
415
+ message: string;
416
+ data: StorefrontDesignHistoryPage;
358
417
  } | StorefrontDesignFailure;
359
418
  type StorefrontDesignPublishResponse = {
360
419
  message: string;
@@ -12,6 +12,7 @@ export const STOREFRONT_DESIGN_LIMITS = {
12
12
  faqs: 20,
13
13
  benefits: 8,
14
14
  historyEntries: 20,
15
+ selectedSourceIds: 50,
15
16
  documentBytes: 256 * 1024,
16
17
  heading: 120,
17
18
  label: 80,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "platform-types",
3
- "version": "1.10.680",
3
+ "version": "1.10.682",
4
4
  "description": "Shared wire and entity contracts for the platform.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",