@financial-times/cp-content-pipeline-schema 3.0.3 → 3.1.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.
Files changed (69) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/lib/generated/index.d.ts +33 -4
  3. package/lib/helpers/flatten-formatted-zod-errors.d.ts +1 -1
  4. package/lib/helpers/flatten-formatted-zod-errors.js +1 -0
  5. package/lib/helpers/flatten-formatted-zod-errors.js.map +1 -1
  6. package/lib/model/CapiResponse.d.ts +3 -2
  7. package/lib/model/CapiResponse.js +84 -23
  8. package/lib/model/CapiResponse.js.map +1 -1
  9. package/lib/model/Person.d.ts +2 -0
  10. package/lib/model/Person.js +16 -0
  11. package/lib/model/Person.js.map +1 -1
  12. package/lib/model/Topper.js +19 -1
  13. package/lib/model/Topper.js.map +1 -1
  14. package/lib/model/schemas/capi/article.d.ts +222 -0
  15. package/lib/model/schemas/capi/audio.d.ts +194 -0
  16. package/lib/model/schemas/capi/base-schema.d.ts +420 -0
  17. package/lib/model/schemas/capi/base-schema.js +25 -2
  18. package/lib/model/schemas/capi/base-schema.js.map +1 -1
  19. package/lib/model/schemas/capi/content-package.d.ts +194 -0
  20. package/lib/model/schemas/capi/custom-code-component.d.ts +1906 -0
  21. package/lib/model/schemas/capi/custom-code-component.js +17 -0
  22. package/lib/model/schemas/capi/custom-code-component.js.map +1 -0
  23. package/lib/model/schemas/capi/index.d.ts +2947 -16
  24. package/lib/model/schemas/capi/index.js +3 -0
  25. package/lib/model/schemas/capi/index.js.map +1 -1
  26. package/lib/model/schemas/capi/internal-content.d.ts +5 -2
  27. package/lib/model/schemas/capi/live-blog-package.d.ts +222 -0
  28. package/lib/model/schemas/capi/placeholder.d.ts +222 -0
  29. package/lib/model/schemas/capi/video.d.ts +194 -0
  30. package/lib/resolvers/content-tree/Workarounds.d.ts +5 -1
  31. package/lib/resolvers/content-tree/references/CustomCodeComponent.d.ts +13 -0
  32. package/lib/resolvers/content-tree/references/CustomCodeComponent.js +58 -0
  33. package/lib/resolvers/content-tree/references/CustomCodeComponent.js.map +1 -0
  34. package/lib/resolvers/content-tree/references/Reference.d.ts +1 -1
  35. package/lib/resolvers/content-tree/references/index.d.ts +3 -1
  36. package/lib/resolvers/content-tree/references/index.js +3 -0
  37. package/lib/resolvers/content-tree/references/index.js.map +1 -1
  38. package/lib/resolvers/content-tree/tagMappings.js +27 -2
  39. package/lib/resolvers/content-tree/tagMappings.js.map +1 -1
  40. package/lib/resolvers/content-tree/tagMappings.test.js +19 -0
  41. package/lib/resolvers/content-tree/tagMappings.test.js.map +1 -1
  42. package/lib/resolvers/content.d.ts +8 -8
  43. package/lib/resolvers/content.js +4 -0
  44. package/lib/resolvers/content.js.map +1 -1
  45. package/lib/resolvers/index.d.ts +10 -9
  46. package/lib/resolvers/scalars.d.ts +2 -2
  47. package/lib/resolvers/scalars.js +1 -0
  48. package/lib/resolvers/scalars.js.map +1 -1
  49. package/package.json +2 -2
  50. package/queries/article.graphql +24 -7
  51. package/src/generated/index.ts +34 -3
  52. package/src/helpers/flatten-formatted-zod-errors.ts +2 -1
  53. package/src/model/CapiResponse.ts +93 -34
  54. package/src/model/Person.ts +19 -0
  55. package/src/model/Topper.ts +18 -1
  56. package/src/model/schemas/capi/base-schema.ts +27 -1
  57. package/src/model/schemas/capi/custom-code-component.ts +20 -0
  58. package/src/model/schemas/capi/index.ts +3 -0
  59. package/src/model/schemas/capi/internal-content.ts +7 -0
  60. package/src/resolvers/content-tree/Workarounds.ts +7 -1
  61. package/src/resolvers/content-tree/references/CustomCodeComponent.ts +78 -0
  62. package/src/resolvers/content-tree/references/index.ts +5 -0
  63. package/src/resolvers/content-tree/tagMappings.test.ts +29 -0
  64. package/src/resolvers/content-tree/tagMappings.ts +46 -4
  65. package/src/resolvers/content.ts +7 -0
  66. package/src/resolvers/scalars.ts +3 -1
  67. package/tsconfig.tsbuildinfo +1 -1
  68. package/typedefs/content.graphql +1 -1
  69. package/typedefs/references/CustomCodeComponent.graphql +17 -0
@@ -84,6 +84,9 @@ export declare const contentPackageSchema: import("zod").ZodObject<import("zod")
84
84
  }>, "many">;
85
85
  webUrl: import("zod").ZodOptional<import("zod").ZodString>;
86
86
  canonicalWebUrl: import("zod").ZodOptional<import("zod").ZodString>;
87
+ apiUrl: import("zod").ZodOptional<import("zod").ZodString>;
88
+ path: import("zod").ZodString;
89
+ versionRange: import("zod").ZodString;
87
90
  type: import("zod").ZodOptional<import("zod").ZodString>;
88
91
  types: import("zod").ZodArray<import("zod").ZodString, "many">;
89
92
  standout: import("zod").ZodOptional<import("zod").ZodObject<{
@@ -1304,6 +1307,197 @@ export declare const contentPackageSchema: import("zod").ZodObject<import("zod")
1304
1307
  }[] | undefined;
1305
1308
  transcript?: string | undefined;
1306
1309
  } | undefined;
1310
+ }>, import("zod").ZodObject<import("zod").objectUtil.extendShape<import("zod").objectUtil.extendShape<Pick<{
1311
+ id: import("zod").ZodString;
1312
+ annotations: import("zod").ZodArray<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
1313
+ id: import("zod").ZodString;
1314
+ apiUrl: import("zod").ZodString;
1315
+ directType: import("zod").ZodString;
1316
+ prefLabel: import("zod").ZodString;
1317
+ type: import("zod").ZodOptional<import("zod").ZodString>;
1318
+ types: import("zod").ZodArray<import("zod").ZodString, "many">;
1319
+ headshot: import("zod").ZodOptional<import("zod").ZodString>;
1320
+ }, {
1321
+ predicate: import("zod").ZodString;
1322
+ }>, "strip", import("zod").ZodTypeAny, {
1323
+ id: string;
1324
+ apiUrl: string;
1325
+ directType: string;
1326
+ prefLabel: string;
1327
+ types: string[];
1328
+ predicate: string;
1329
+ type?: string | undefined;
1330
+ headshot?: string | undefined;
1331
+ }, {
1332
+ id: string;
1333
+ apiUrl: string;
1334
+ directType: string;
1335
+ prefLabel: string;
1336
+ types: string[];
1337
+ predicate: string;
1338
+ type?: string | undefined;
1339
+ headshot?: string | undefined;
1340
+ }>, "many">;
1341
+ webUrl: import("zod").ZodOptional<import("zod").ZodString>;
1342
+ canonicalWebUrl: import("zod").ZodOptional<import("zod").ZodString>;
1343
+ apiUrl: import("zod").ZodOptional<import("zod").ZodString>;
1344
+ path: import("zod").ZodString;
1345
+ versionRange: import("zod").ZodString;
1346
+ type: import("zod").ZodOptional<import("zod").ZodString>;
1347
+ types: import("zod").ZodArray<import("zod").ZodString, "many">;
1348
+ standout: import("zod").ZodOptional<import("zod").ZodObject<{
1349
+ editorsChoice: import("zod").ZodBoolean;
1350
+ exclusive: import("zod").ZodBoolean;
1351
+ scoop: import("zod").ZodBoolean;
1352
+ }, "strip", import("zod").ZodTypeAny, {
1353
+ editorsChoice: boolean;
1354
+ exclusive: boolean;
1355
+ scoop: boolean;
1356
+ }, {
1357
+ editorsChoice: boolean;
1358
+ exclusive: boolean;
1359
+ scoop: boolean;
1360
+ }>>;
1361
+ publishedDate: import("zod").ZodString;
1362
+ firstPublishedDate: import("zod").ZodString;
1363
+ publishReference: import("zod").ZodOptional<import("zod").ZodString>;
1364
+ lastModified: import("zod").ZodOptional<import("zod").ZodString>;
1365
+ realtime: import("zod").ZodBoolean;
1366
+ editorialDesk: import("zod").ZodOptional<import("zod").ZodString>;
1367
+ accessLevel: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"premium">, import("zod").ZodLiteral<"subscribed">, import("zod").ZodLiteral<"registered">, import("zod").ZodLiteral<"free">]>>;
1368
+ canBeSyndicated: import("zod").ZodUnion<[import("zod").ZodLiteral<"yes">, import("zod").ZodLiteral<"no">, import("zod").ZodLiteral<"verify">, import("zod").ZodLiteral<"withContributorPayment">, import("zod").ZodLiteral<"unknown">]>;
1369
+ canBeDistributed: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"yes">, import("zod").ZodLiteral<"no">, import("zod").ZodLiteral<"verify">]>>;
1370
+ topper: import("zod").ZodOptional<import("zod").ZodObject<{
1371
+ headline: import("zod").ZodOptional<import("zod").ZodString>;
1372
+ standfirst: import("zod").ZodOptional<import("zod").ZodString>;
1373
+ backgroundColour: import("zod").ZodString;
1374
+ backgroundBox: import("zod").ZodOptional<import("zod").ZodBoolean>;
1375
+ textShadow: import("zod").ZodOptional<import("zod").ZodBoolean>;
1376
+ layout: import("zod").ZodString;
1377
+ layoutWidth: import("zod").ZodOptional<import("zod").ZodString>;
1378
+ }, "strip", import("zod").ZodTypeAny, {
1379
+ backgroundColour: string;
1380
+ layout: string;
1381
+ headline?: string | undefined;
1382
+ standfirst?: string | undefined;
1383
+ backgroundBox?: boolean | undefined;
1384
+ textShadow?: boolean | undefined;
1385
+ layoutWidth?: string | undefined;
1386
+ }, {
1387
+ backgroundColour: string;
1388
+ layout: string;
1389
+ headline?: string | undefined;
1390
+ standfirst?: string | undefined;
1391
+ backgroundBox?: boolean | undefined;
1392
+ textShadow?: boolean | undefined;
1393
+ layoutWidth?: string | undefined;
1394
+ }>>;
1395
+ comments: import("zod").ZodOptional<import("zod").ZodObject<{
1396
+ enabled: import("zod").ZodBoolean;
1397
+ }, "strip", import("zod").ZodTypeAny, {
1398
+ enabled: boolean;
1399
+ }, {
1400
+ enabled: boolean;
1401
+ }>>;
1402
+ containedIn: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
1403
+ apiUrl: import("zod").ZodString;
1404
+ id: import("zod").ZodString;
1405
+ }, "strip", import("zod").ZodTypeAny, {
1406
+ id: string;
1407
+ apiUrl: string;
1408
+ }, {
1409
+ id: string;
1410
+ apiUrl: string;
1411
+ }>, "many">>;
1412
+ tableOfContents: import("zod").ZodOptional<import("zod").ZodObject<{
1413
+ labelType: import("zod").ZodString;
1414
+ sequence: import("zod").ZodString;
1415
+ }, "strip", import("zod").ZodTypeAny, {
1416
+ labelType: string;
1417
+ sequence: string;
1418
+ }, {
1419
+ labelType: string;
1420
+ sequence: string;
1421
+ }>>;
1422
+ }, "id" | "publishedDate" | "canonicalWebUrl" | "firstPublishedDate" | "publishReference" | "canBeSyndicated" | "canBeDistributed">, Pick<{
1423
+ title: import("zod").ZodString;
1424
+ standfirst: import("zod").ZodOptional<import("zod").ZodString>;
1425
+ byline: import("zod").ZodOptional<import("zod").ZodString>;
1426
+ bodyXML: import("zod").ZodString;
1427
+ summary: import("zod").ZodObject<{
1428
+ bodyXML: import("zod").ZodString;
1429
+ }, "strip", import("zod").ZodTypeAny, {
1430
+ bodyXML: string;
1431
+ }, {
1432
+ bodyXML: string;
1433
+ }>;
1434
+ alternativeTitles: import("zod").ZodOptional<import("zod").ZodObject<{
1435
+ promotionalTitle: import("zod").ZodString;
1436
+ }, "strip", import("zod").ZodTypeAny, {
1437
+ promotionalTitle: string;
1438
+ }, {
1439
+ promotionalTitle: string;
1440
+ }>>;
1441
+ alternativeStandfirsts: import("zod").ZodOptional<import("zod").ZodObject<{
1442
+ promotionalStandfirst: import("zod").ZodOptional<import("zod").ZodString>;
1443
+ }, "strip", import("zod").ZodTypeAny, {
1444
+ promotionalStandfirst?: string | undefined;
1445
+ }, {
1446
+ promotionalStandfirst?: string | undefined;
1447
+ }>>;
1448
+ pinnedPosts: import("zod").ZodArray<import("zod").ZodString, "many">;
1449
+ contains: import("zod").ZodArray<import("zod").ZodObject<{
1450
+ id: import("zod").ZodString;
1451
+ apiUrl: import("zod").ZodString;
1452
+ }, "strip", import("zod").ZodTypeAny, {
1453
+ id: string;
1454
+ apiUrl: string;
1455
+ }, {
1456
+ id: string;
1457
+ apiUrl: string;
1458
+ }>, "many">;
1459
+ design: import("zod").ZodObject<{
1460
+ theme: import("zod").ZodUnion<[import("zod").ZodLiteral<"special-report">, import("zod").ZodLiteral<"extra">, import("zod").ZodLiteral<"basic">, import("zod").ZodLiteral<"extra-wide">]>;
1461
+ }, "strip", import("zod").ZodTypeAny, {
1462
+ theme: "special-report" | "extra" | "basic" | "extra-wide";
1463
+ }, {
1464
+ theme: "special-report" | "extra" | "basic" | "extra-wide";
1465
+ }>;
1466
+ transcript: import("zod").ZodOptional<import("zod").ZodString>;
1467
+ }, "bodyXML">>, {
1468
+ apiUrl: import("zod").ZodString;
1469
+ type: import("zod").ZodLiteral<"http://www.ft.com/ontology/content/CustomCodeComponent">;
1470
+ path: import("zod").ZodString;
1471
+ versionRange: import("zod").ZodString;
1472
+ attributes: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodBoolean, import("zod").ZodUndefined]>>;
1473
+ }>, "strip", import("zod").ZodTypeAny, {
1474
+ id: string;
1475
+ apiUrl: string;
1476
+ type: "http://www.ft.com/ontology/content/CustomCodeComponent";
1477
+ path: string;
1478
+ publishedDate: string;
1479
+ versionRange: string;
1480
+ firstPublishedDate: string;
1481
+ canBeSyndicated: "unknown" | "yes" | "no" | "verify" | "withContributorPayment";
1482
+ bodyXML: string;
1483
+ attributes: Record<string, string | boolean | undefined>;
1484
+ canonicalWebUrl?: string | undefined;
1485
+ publishReference?: string | undefined;
1486
+ canBeDistributed?: "yes" | "no" | "verify" | undefined;
1487
+ }, {
1488
+ id: string;
1489
+ apiUrl: string;
1490
+ type: "http://www.ft.com/ontology/content/CustomCodeComponent";
1491
+ path: string;
1492
+ publishedDate: string;
1493
+ versionRange: string;
1494
+ firstPublishedDate: string;
1495
+ canBeSyndicated: "unknown" | "yes" | "no" | "verify" | "withContributorPayment";
1496
+ bodyXML: string;
1497
+ attributes: Record<string, string | boolean | undefined>;
1498
+ canonicalWebUrl?: string | undefined;
1499
+ publishReference?: string | undefined;
1500
+ canBeDistributed?: "yes" | "no" | "verify" | undefined;
1307
1501
  }>]>, "many">>;
1308
1502
  dataSource: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
1309
1503
  binaryUrl: import("zod").ZodString;