@withpotter/lib 0.13.0-next.62 → 0.13.0-next.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,484 @@
1
+ {
2
+ "status_none": {
3
+ "status": 200,
4
+ "body": {
5
+ "state": "none"
6
+ }
7
+ },
8
+ "available_no_pack": {
9
+ "status": 200,
10
+ "body": {
11
+ "available": false,
12
+ "template": "atelier-fashion-01",
13
+ "state": "none",
14
+ "reason": "no_pack"
15
+ }
16
+ },
17
+ "error_not_owner_or_admin": {
18
+ "status": 403,
19
+ "body": {
20
+ "statusCode": 403,
21
+ "code": "not_owner_or_admin",
22
+ "message": "Only the owner or an admin of this store can change demo content."
23
+ }
24
+ },
25
+ "error_clear_nothing": {
26
+ "status": 404,
27
+ "body": {
28
+ "statusCode": 404,
29
+ "code": "no_demo_content",
30
+ "message": "There is no demo content to clear."
31
+ }
32
+ },
33
+ "error_invalid_body": {
34
+ "status": 400,
35
+ "body": {
36
+ "statusCode": 400,
37
+ "code": "invalid_body",
38
+ "message": "Unknown field \"nope\"."
39
+ }
40
+ },
41
+ "available_ok": {
42
+ "status": 200,
43
+ "body": {
44
+ "available": true,
45
+ "template": "atelier-fashion-01",
46
+ "state": "none",
47
+ "pack": {
48
+ "id": "atelier-fashion-01",
49
+ "name": "Atelier starter",
50
+ "description": "A small fashion store",
51
+ "version": "1.0.0",
52
+ "audience": "starter",
53
+ "locale": "en-NG",
54
+ "hash": "8a250f256273eae1183683684d411baba581c483f382727fef07872428fb8fe0"
55
+ },
56
+ "summary": {
57
+ "products": 2,
58
+ "collections": 1,
59
+ "contentItems": 0,
60
+ "pages": 1,
61
+ "images": 3,
62
+ "shipping": true
63
+ }
64
+ }
65
+ },
66
+ "dry_run": {
67
+ "status": 200,
68
+ "body": {
69
+ "dryRun": true,
70
+ "pack": {
71
+ "id": "atelier-fashion-01",
72
+ "version": "1.0.0",
73
+ "audience": "starter",
74
+ "hash": "8a250f256273eae1183683684d411baba581c483f382727fef07872428fb8fe0"
75
+ },
76
+ "plan": {
77
+ "products": {
78
+ "create": 2,
79
+ "update": 0,
80
+ "unchanged": 0,
81
+ "conflict": 0
82
+ },
83
+ "collections": {
84
+ "create": 1,
85
+ "update": 0,
86
+ "unchanged": 0,
87
+ "conflict": 0
88
+ },
89
+ "contentItems": {
90
+ "create": 0,
91
+ "update": 0,
92
+ "unchanged": 0,
93
+ "conflict": 0
94
+ },
95
+ "pages": {
96
+ "write": 3,
97
+ "skip": 0
98
+ },
99
+ "media": 3,
100
+ "shipping": "create"
101
+ },
102
+ "conflicts": [],
103
+ "skippedPages": []
104
+ }
105
+ },
106
+ "apply_202": {
107
+ "status": 202,
108
+ "body": {
109
+ "jobId": "30ac04a6-f11b-4888-a769-84e401dfc8df",
110
+ "state": "applying",
111
+ "resumed": false
112
+ }
113
+ },
114
+ "status_applying": {
115
+ "status": 200,
116
+ "body": {
117
+ "state": "applying",
118
+ "pack": {
119
+ "id": "atelier-fashion-01",
120
+ "template": "atelier-fashion-01",
121
+ "audience": "",
122
+ "hash": ""
123
+ },
124
+ "progress": {
125
+ "phase": "fetching",
126
+ "done": 0,
127
+ "total": 0
128
+ },
129
+ "startedAt": "2026-10-30T05:44:58.977Z",
130
+ "job": "apply",
131
+ "counts": {
132
+ "products": 0,
133
+ "collections": 0,
134
+ "pages": 0,
135
+ "media": 0
136
+ }
137
+ }
138
+ },
139
+ "error_job_in_progress": {
140
+ "status": 409,
141
+ "body": {
142
+ "statusCode": 409,
143
+ "code": "job_in_progress",
144
+ "message": "Demo content is already being changed. Wait for it to finish.",
145
+ "details": {
146
+ "job": "apply"
147
+ }
148
+ }
149
+ },
150
+ "error_adopt_busy": {
151
+ "status": 409,
152
+ "body": {
153
+ "statusCode": 409,
154
+ "code": "job_in_progress",
155
+ "message": "Demo content is already being changed. Wait for it to finish.",
156
+ "details": {
157
+ "job": "apply"
158
+ }
159
+ }
160
+ },
161
+ "status_applied": {
162
+ "status": 200,
163
+ "body": {
164
+ "state": "applied",
165
+ "pack": {
166
+ "id": "atelier-fashion-01",
167
+ "template": "atelier-fashion-01",
168
+ "version": "1.0.0",
169
+ "audience": "starter",
170
+ "hash": "8a250f256273eae1183683684d411baba581c483f382727fef07872428fb8fe0"
171
+ },
172
+ "progress": {
173
+ "phase": "activating",
174
+ "done": 3,
175
+ "total": 3
176
+ },
177
+ "startedAt": "2026-10-30T05:44:58.977Z",
178
+ "job": "apply",
179
+ "finishedAt": "2026-10-30T05:44:58.983Z",
180
+ "counts": {
181
+ "products": 2,
182
+ "collections": 1,
183
+ "pages": 1,
184
+ "media": 2
185
+ }
186
+ }
187
+ },
188
+ "available_after_apply": {
189
+ "status": 200,
190
+ "body": {
191
+ "available": true,
192
+ "template": "atelier-fashion-01",
193
+ "state": "applied",
194
+ "pack": {
195
+ "id": "atelier-fashion-01",
196
+ "name": "Atelier starter",
197
+ "description": "A small fashion store",
198
+ "version": "1.0.0",
199
+ "audience": "starter",
200
+ "locale": "en-NG",
201
+ "hash": "8a250f256273eae1183683684d411baba581c483f382727fef07872428fb8fe0"
202
+ },
203
+ "summary": {
204
+ "products": 2,
205
+ "collections": 1,
206
+ "contentItems": 0,
207
+ "pages": 1,
208
+ "images": 3,
209
+ "shipping": true
210
+ }
211
+ }
212
+ },
213
+ "sample_product": {
214
+ "id": "id-1",
215
+ "type": "physical",
216
+ "slug": "classic-tee",
217
+ "title": "Classic tee",
218
+ "tags": [
219
+ "demo-pack",
220
+ "demo-pack:atelier-fashion-01"
221
+ ],
222
+ "data": {
223
+ "demoPack": {
224
+ "id": "atelier-fashion-01",
225
+ "ref": "tee"
226
+ }
227
+ },
228
+ "isActive": true
229
+ },
230
+ "sample_collection": {
231
+ "id": "id-3",
232
+ "type": "collections",
233
+ "slug": "tops",
234
+ "title": "Tops",
235
+ "tags": [
236
+ "demo-pack",
237
+ "demo-pack:atelier-fashion-01"
238
+ ],
239
+ "data": {
240
+ "productIds": [
241
+ "id-1"
242
+ ],
243
+ "demoPack": {
244
+ "id": "atelier-fashion-01",
245
+ "ref": "tops"
246
+ }
247
+ },
248
+ "isActive": true
249
+ },
250
+ "adopt_200": {
251
+ "status": 200,
252
+ "body": {
253
+ "adopted": {
254
+ "products": [
255
+ "id-1"
256
+ ],
257
+ "collections": [],
258
+ "contentItems": []
259
+ },
260
+ "notFound": [
261
+ "ghost"
262
+ ]
263
+ }
264
+ },
265
+ "sample_product_after_adopt": {
266
+ "id": "id-1",
267
+ "type": "physical",
268
+ "slug": "classic-tee",
269
+ "title": "Classic tee",
270
+ "tags": [],
271
+ "data": {},
272
+ "isActive": true
273
+ },
274
+ "error_nothing_to_adopt": {
275
+ "status": 400,
276
+ "body": {
277
+ "statusCode": 400,
278
+ "code": "nothing_to_adopt",
279
+ "message": "Name at least one item to keep, or pass all: true."
280
+ }
281
+ },
282
+ "clear_202": {
283
+ "status": 202,
284
+ "body": {
285
+ "jobId": "6764bb70-2a79-4047-9bb8-760802c6a10d",
286
+ "state": "clearing",
287
+ "resumed": false
288
+ }
289
+ },
290
+ "status_clearing": {
291
+ "status": 200,
292
+ "body": {
293
+ "state": "clearing",
294
+ "pack": {
295
+ "id": "atelier-fashion-01",
296
+ "template": "atelier-fashion-01",
297
+ "version": "1.0.0",
298
+ "audience": "starter",
299
+ "hash": "8a250f256273eae1183683684d411baba581c483f382727fef07872428fb8fe0"
300
+ },
301
+ "progress": {
302
+ "phase": "catalogue",
303
+ "done": 0,
304
+ "total": 0
305
+ },
306
+ "startedAt": "2026-10-30T05:44:58.984Z",
307
+ "job": "clear",
308
+ "counts": {
309
+ "products": 1,
310
+ "collections": 1,
311
+ "pages": 1,
312
+ "media": 2
313
+ }
314
+ }
315
+ },
316
+ "status_after_clear": {
317
+ "status": 200,
318
+ "body": {
319
+ "state": "none",
320
+ "orphanedMedia": {
321
+ "count": 2,
322
+ "clearedAt": "2026-10-30T05:44:58.985Z"
323
+ }
324
+ }
325
+ },
326
+ "status_failed_apply": {
327
+ "status": 200,
328
+ "body": {
329
+ "state": "failed",
330
+ "pack": {
331
+ "id": "atelier-fashion-01",
332
+ "template": "atelier-fashion-01",
333
+ "version": "1.0.0",
334
+ "audience": "starter",
335
+ "hash": "8a250f256273eae1183683684d411baba581c483f382727fef07872428fb8fe0"
336
+ },
337
+ "progress": {
338
+ "phase": "products",
339
+ "done": 1,
340
+ "total": 2
341
+ },
342
+ "startedAt": "2026-10-30T05:44:58.992Z",
343
+ "job": "apply",
344
+ "finishedAt": "2026-10-30T05:44:59.006Z",
345
+ "counts": {
346
+ "products": 1,
347
+ "collections": 0,
348
+ "pages": 0,
349
+ "media": 2
350
+ },
351
+ "error": {
352
+ "code": "internal",
353
+ "message": "Something went wrong while adding the demo content. Try again."
354
+ }
355
+ }
356
+ },
357
+ "apply_resumed": {
358
+ "status": 202,
359
+ "body": {
360
+ "jobId": "ebc57efe-f23d-407b-9136-158bc45b761f",
361
+ "state": "applying",
362
+ "resumed": true
363
+ }
364
+ },
365
+ "status_applied_skipped": {
366
+ "status": 200,
367
+ "body": {
368
+ "state": "applied",
369
+ "pack": {
370
+ "id": "atelier-fashion-01",
371
+ "template": "atelier-fashion-01",
372
+ "version": "1.0.0",
373
+ "audience": "starter",
374
+ "hash": "8a250f256273eae1183683684d411baba581c483f382727fef07872428fb8fe0"
375
+ },
376
+ "progress": {
377
+ "phase": "activating",
378
+ "done": 3,
379
+ "total": 3
380
+ },
381
+ "startedAt": "2026-10-30T05:44:59.017Z",
382
+ "job": "apply",
383
+ "finishedAt": "2026-10-30T05:44:59.019Z",
384
+ "counts": {
385
+ "products": 2,
386
+ "collections": 1,
387
+ "pages": 0,
388
+ "media": 2
389
+ },
390
+ "skippedPages": [
391
+ "home"
392
+ ]
393
+ }
394
+ },
395
+ "error_pack_hash_mismatch": {
396
+ "status": 422,
397
+ "body": {
398
+ "statusCode": 422,
399
+ "code": "pack_hash_mismatch",
400
+ "message": "The downloaded pack does not match its published checksum."
401
+ }
402
+ },
403
+ "error_pack_branded_assets": {
404
+ "status": 422,
405
+ "body": {
406
+ "statusCode": 422,
407
+ "code": "pack_branded_assets",
408
+ "message": "A starter pack cannot contain branded pictures.",
409
+ "details": {
410
+ "assets": [
411
+ "hero",
412
+ "tee",
413
+ "tee2"
414
+ ]
415
+ }
416
+ }
417
+ },
418
+ "error_rate_limited": {
419
+ "status": 429,
420
+ "body": {
421
+ "statusCode": 429,
422
+ "code": "rate_limited",
423
+ "message": "Demo content was applied too often. Try again later.",
424
+ "details": {
425
+ "retryAfterSeconds": 3600
426
+ }
427
+ }
428
+ },
429
+ "enums": {
430
+ "states": [
431
+ "none",
432
+ "applying",
433
+ "applied",
434
+ "clearing",
435
+ "failed"
436
+ ],
437
+ "jobs": [
438
+ "apply",
439
+ "clear"
440
+ ],
441
+ "phases": [
442
+ "fetching",
443
+ "media",
444
+ "products",
445
+ "collections",
446
+ "content",
447
+ "tenant",
448
+ "pages",
449
+ "shipping",
450
+ "pruning",
451
+ "activating",
452
+ "catalogue",
453
+ "settings"
454
+ ],
455
+ "errorCodes": [
456
+ "invalid_body",
457
+ "not_owner_or_admin",
458
+ "showroom_not_allowed",
459
+ "pack_url_forbidden",
460
+ "pack_url_invalid",
461
+ "pack_host_not_allowed",
462
+ "template_mismatch",
463
+ "no_pack",
464
+ "no_demo_content",
465
+ "job_in_progress",
466
+ "other_pack_present",
467
+ "pack_invalid",
468
+ "pack_branded_assets",
469
+ "pack_hash_mismatch",
470
+ "pack_too_large",
471
+ "pack_fetch_failed",
472
+ "quota_exceeded",
473
+ "rate_limited",
474
+ "nothing_to_adopt",
475
+ "interrupted",
476
+ "internal"
477
+ ]
478
+ },
479
+ "marker": {
480
+ "tag": "demo-pack",
481
+ "packTag": "demo-pack:atelier-fashion-01"
482
+ },
483
+ "_about": "Generated by running @withpotter/demo-content (api-next PR #620) through its real controller, guards and use cases against the in-memory world of its own specs."
484
+ }
@@ -252,6 +252,11 @@ export interface PlatformCockpit {
252
252
  performanceSeriesByCurrency?: CurrencySeries[];
253
253
  };
254
254
  attention: {
255
+ /**
256
+ * Feeds whose query failed; their counts are placeholders, not zeros.
257
+ * Absent when talking to an API that predates this field.
258
+ */
259
+ unavailable?: Array<'needsReview' | 'dormantTenants' | 'overdueInvoices' | 'failedSettlements'>;
255
260
  trialsEndingSoon: Array<AttentionTenantRef & {
256
261
  trialEndsAt: string;
257
262
  daysLeft: number;
@@ -299,6 +304,8 @@ export interface PlatformRevenue {
299
304
  };
300
305
  currency: string;
301
306
  recurring: {
307
+ /** False when no billing source feeds the figures below (all are 0). */
308
+ tracked?: boolean;
302
309
  mrr: number;
303
310
  arr: number;
304
311
  arpa: number;