@financial-times/cp-content-pipeline-schema 3.5.0 → 3.5.1

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 (49) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/lib/generated/index.d.ts +4 -21
  3. package/lib/model/FlourishSource.d.ts +12 -5
  4. package/lib/model/FlourishSource.js +32 -28
  5. package/lib/model/FlourishSource.js.map +1 -1
  6. package/lib/model/FlourishSource.test.js +5 -5
  7. package/lib/model/FlourishSource.test.js.map +1 -1
  8. package/lib/model/Image.js +12 -0
  9. package/lib/model/Image.js.map +1 -1
  10. package/lib/model/LeadFlourish.d.ts +1 -1
  11. package/lib/model/LeadFlourish.js +4 -1
  12. package/lib/model/LeadFlourish.js.map +1 -1
  13. package/lib/model/LeadFlourish.test.js +5 -7
  14. package/lib/model/LeadFlourish.test.js.map +1 -1
  15. package/lib/model/schemas/capi/article.d.ts +3 -3
  16. package/lib/model/schemas/capi/audio.d.ts +5 -5
  17. package/lib/model/schemas/capi/base-schema.d.ts +5 -5
  18. package/lib/model/schemas/capi/base-schema.js +1 -1
  19. package/lib/model/schemas/capi/base-schema.js.map +1 -1
  20. package/lib/model/schemas/capi/content-package.d.ts +3 -3
  21. package/lib/model/schemas/capi/custom-code-component.d.ts +3 -3
  22. package/lib/model/schemas/capi/index.d.ts +20 -20
  23. package/lib/model/schemas/capi/live-blog-package.d.ts +3 -3
  24. package/lib/model/schemas/capi/placeholder.d.ts +3 -3
  25. package/lib/model/schemas/capi/video.d.ts +3 -3
  26. package/lib/resolvers/content-tree/references/Flourish.d.ts +9 -19
  27. package/lib/resolvers/content-tree/references/Flourish.js +10 -32
  28. package/lib/resolvers/content-tree/references/Flourish.js.map +1 -1
  29. package/lib/resolvers/content-tree/references/Flourish.test.js +3 -3
  30. package/lib/resolvers/content-tree/references/Flourish.test.js.map +1 -1
  31. package/lib/resolvers/content-tree/references/index.d.ts +2 -2
  32. package/lib/resolvers/content-tree/references/index.js +1 -1
  33. package/lib/resolvers/content-tree/references/index.js.map +1 -1
  34. package/lib/resolvers/index.d.ts +1 -2
  35. package/lib/resolvers/leadFlourish.d.ts +1 -1
  36. package/package.json +1 -1
  37. package/src/generated/index.ts +4 -23
  38. package/src/model/FlourishSource.test.ts +5 -5
  39. package/src/model/FlourishSource.ts +57 -39
  40. package/src/model/Image.ts +16 -0
  41. package/src/model/LeadFlourish.test.ts +6 -9
  42. package/src/model/LeadFlourish.ts +5 -1
  43. package/src/model/schemas/capi/base-schema.ts +1 -1
  44. package/src/resolvers/content-tree/references/Flourish.test.ts +4 -3
  45. package/src/resolvers/content-tree/references/Flourish.ts +16 -32
  46. package/src/resolvers/content-tree/references/index.ts +4 -4
  47. package/tsconfig.tsbuildinfo +1 -1
  48. package/typedefs/leadFlourish.graphql +1 -1
  49. package/typedefs/references/flourish.graphql +1 -11
@@ -1621,18 +1621,18 @@ export declare const customCodeComponentSchema: import("zod").ZodObject<import("
1621
1621
  dataSource: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
1622
1622
  binaryUrl: import("zod").ZodString;
1623
1623
  duration: import("zod").ZodNumber;
1624
- filesize: import("zod").ZodNumber;
1624
+ filesize: import("zod").ZodOptional<import("zod").ZodNumber>;
1625
1625
  mediaType: import("zod").ZodString;
1626
1626
  }, "strip", import("zod").ZodTypeAny, {
1627
1627
  binaryUrl: string;
1628
1628
  duration: number;
1629
1629
  mediaType: string;
1630
- filesize: number;
1630
+ filesize?: number | undefined;
1631
1631
  }, {
1632
1632
  binaryUrl: string;
1633
1633
  duration: number;
1634
1634
  mediaType: string;
1635
- filesize: number;
1635
+ filesize?: number | undefined;
1636
1636
  }>, "many">>;
1637
1637
  }, "embeds">>, "strip", import("zod").ZodTypeAny, {
1638
1638
  id: string;
@@ -1503,18 +1503,18 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
1503
1503
  dataSource: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
1504
1504
  binaryUrl: import("zod").ZodString;
1505
1505
  duration: import("zod").ZodNumber;
1506
- filesize: import("zod").ZodNumber;
1506
+ filesize: import("zod").ZodOptional<import("zod").ZodNumber>;
1507
1507
  mediaType: import("zod").ZodString;
1508
1508
  }, "strip", import("zod").ZodTypeAny, {
1509
1509
  binaryUrl: string;
1510
1510
  duration: number;
1511
1511
  mediaType: string;
1512
- filesize: number;
1512
+ filesize?: number | undefined;
1513
1513
  }, {
1514
1514
  binaryUrl: string;
1515
1515
  duration: number;
1516
1516
  mediaType: string;
1517
- filesize: number;
1517
+ filesize?: number | undefined;
1518
1518
  }>, "many">>;
1519
1519
  }, "mainImage" | "leadImages" | "alternativeImages" | "embeds">>, "strip", import("zod").ZodTypeAny, {
1520
1520
  id: string;
@@ -3585,18 +3585,18 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
3585
3585
  dataSource: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
3586
3586
  binaryUrl: import("zod").ZodString;
3587
3587
  duration: import("zod").ZodNumber;
3588
- filesize: import("zod").ZodNumber;
3588
+ filesize: import("zod").ZodOptional<import("zod").ZodNumber>;
3589
3589
  mediaType: import("zod").ZodString;
3590
3590
  }, "strip", import("zod").ZodTypeAny, {
3591
3591
  binaryUrl: string;
3592
3592
  duration: number;
3593
3593
  mediaType: string;
3594
- filesize: number;
3594
+ filesize?: number | undefined;
3595
3595
  }, {
3596
3596
  binaryUrl: string;
3597
3597
  duration: number;
3598
3598
  mediaType: string;
3599
- filesize: number;
3599
+ filesize?: number | undefined;
3600
3600
  }>, "many">>;
3601
3601
  }, "mainImage" | "leadImages" | "embeds">>, "strip", import("zod").ZodTypeAny, {
3602
3602
  id: string;
@@ -5631,18 +5631,18 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
5631
5631
  dataSource: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
5632
5632
  binaryUrl: import("zod").ZodString;
5633
5633
  duration: import("zod").ZodNumber;
5634
- filesize: import("zod").ZodNumber;
5634
+ filesize: import("zod").ZodOptional<import("zod").ZodNumber>;
5635
5635
  mediaType: import("zod").ZodString;
5636
5636
  }, "strip", import("zod").ZodTypeAny, {
5637
5637
  binaryUrl: string;
5638
5638
  duration: number;
5639
5639
  mediaType: string;
5640
- filesize: number;
5640
+ filesize?: number | undefined;
5641
5641
  }, {
5642
5642
  binaryUrl: string;
5643
5643
  duration: number;
5644
5644
  mediaType: string;
5645
- filesize: number;
5645
+ filesize?: number | undefined;
5646
5646
  }>, "many">>;
5647
5647
  }, "dataSource" | "mainImage">>, "strip", import("zod").ZodTypeAny, {
5648
5648
  id: string;
@@ -5665,7 +5665,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
5665
5665
  binaryUrl: string;
5666
5666
  duration: number;
5667
5667
  mediaType: string;
5668
- filesize: number;
5668
+ filesize?: number | undefined;
5669
5669
  }[] | undefined;
5670
5670
  webUrl?: string | undefined;
5671
5671
  canonicalWebUrl?: string | undefined;
@@ -5761,7 +5761,7 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
5761
5761
  binaryUrl: string;
5762
5762
  duration: number;
5763
5763
  mediaType: string;
5764
- filesize: number;
5764
+ filesize?: number | undefined;
5765
5765
  }[] | undefined;
5766
5766
  webUrl?: string | undefined;
5767
5767
  canonicalWebUrl?: string | undefined;
@@ -7339,18 +7339,18 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
7339
7339
  dataSource: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
7340
7340
  binaryUrl: import("zod").ZodString;
7341
7341
  duration: import("zod").ZodNumber;
7342
- filesize: import("zod").ZodNumber;
7342
+ filesize: import("zod").ZodOptional<import("zod").ZodNumber>;
7343
7343
  mediaType: import("zod").ZodString;
7344
7344
  }, "strip", import("zod").ZodTypeAny, {
7345
7345
  binaryUrl: string;
7346
7346
  duration: number;
7347
7347
  mediaType: string;
7348
- filesize: number;
7348
+ filesize?: number | undefined;
7349
7349
  }, {
7350
7350
  binaryUrl: string;
7351
7351
  duration: number;
7352
7352
  mediaType: string;
7353
- filesize: number;
7353
+ filesize?: number | undefined;
7354
7354
  }>, "many">>;
7355
7355
  }, "mainImage">>, "strip", import("zod").ZodTypeAny, {
7356
7356
  id: string;
@@ -9157,18 +9157,18 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
9157
9157
  dataSource: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
9158
9158
  binaryUrl: import("zod").ZodString;
9159
9159
  duration: import("zod").ZodNumber;
9160
- filesize: import("zod").ZodNumber;
9160
+ filesize: import("zod").ZodOptional<import("zod").ZodNumber>;
9161
9161
  mediaType: import("zod").ZodString;
9162
9162
  }, "strip", import("zod").ZodTypeAny, {
9163
9163
  binaryUrl: string;
9164
9164
  duration: number;
9165
9165
  mediaType: string;
9166
- filesize: number;
9166
+ filesize?: number | undefined;
9167
9167
  }, {
9168
9168
  binaryUrl: string;
9169
9169
  duration: number;
9170
9170
  mediaType: string;
9171
- filesize: number;
9171
+ filesize?: number | undefined;
9172
9172
  }>, "many">>;
9173
9173
  }, "embeds">>, "strip", import("zod").ZodTypeAny, {
9174
9174
  id: string;
@@ -10961,18 +10961,18 @@ export declare const schemas: (contentType: LiteralUnionScalarValues<typeof Cont
10961
10961
  dataSource: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
10962
10962
  binaryUrl: import("zod").ZodString;
10963
10963
  duration: import("zod").ZodNumber;
10964
- filesize: import("zod").ZodNumber;
10964
+ filesize: import("zod").ZodOptional<import("zod").ZodNumber>;
10965
10965
  mediaType: import("zod").ZodString;
10966
10966
  }, "strip", import("zod").ZodTypeAny, {
10967
10967
  binaryUrl: string;
10968
10968
  duration: number;
10969
10969
  mediaType: string;
10970
- filesize: number;
10970
+ filesize?: number | undefined;
10971
10971
  }, {
10972
10972
  binaryUrl: string;
10973
10973
  duration: number;
10974
10974
  mediaType: string;
10975
- filesize: number;
10975
+ filesize?: number | undefined;
10976
10976
  }>, "many">>;
10977
10977
  }, "mainImage" | "leadImages" | "leadFlourish">>, "strip", import("zod").ZodTypeAny, {
10978
10978
  id: string;
@@ -1501,18 +1501,18 @@ export declare const liveBlogPackageSchema: import("zod").ZodObject<import("zod"
1501
1501
  dataSource: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
1502
1502
  binaryUrl: import("zod").ZodString;
1503
1503
  duration: import("zod").ZodNumber;
1504
- filesize: import("zod").ZodNumber;
1504
+ filesize: import("zod").ZodOptional<import("zod").ZodNumber>;
1505
1505
  mediaType: import("zod").ZodString;
1506
1506
  }, "strip", import("zod").ZodTypeAny, {
1507
1507
  binaryUrl: string;
1508
1508
  duration: number;
1509
1509
  mediaType: string;
1510
- filesize: number;
1510
+ filesize?: number | undefined;
1511
1511
  }, {
1512
1512
  binaryUrl: string;
1513
1513
  duration: number;
1514
1514
  mediaType: string;
1515
- filesize: number;
1515
+ filesize?: number | undefined;
1516
1516
  }>, "many">>;
1517
1517
  }, "mainImage" | "leadImages" | "embeds">>, "strip", import("zod").ZodTypeAny, {
1518
1518
  id: string;
@@ -1501,18 +1501,18 @@ export declare const placeholderSchema: import("zod").ZodObject<import("zod").ob
1501
1501
  dataSource: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
1502
1502
  binaryUrl: import("zod").ZodString;
1503
1503
  duration: import("zod").ZodNumber;
1504
- filesize: import("zod").ZodNumber;
1504
+ filesize: import("zod").ZodOptional<import("zod").ZodNumber>;
1505
1505
  mediaType: import("zod").ZodString;
1506
1506
  }, "strip", import("zod").ZodTypeAny, {
1507
1507
  binaryUrl: string;
1508
1508
  duration: number;
1509
1509
  mediaType: string;
1510
- filesize: number;
1510
+ filesize?: number | undefined;
1511
1511
  }, {
1512
1512
  binaryUrl: string;
1513
1513
  duration: number;
1514
1514
  mediaType: string;
1515
- filesize: number;
1515
+ filesize?: number | undefined;
1516
1516
  }>, "many">>;
1517
1517
  }, "mainImage" | "leadImages" | "alternativeImages" | "embeds">>, "strip", import("zod").ZodTypeAny, {
1518
1518
  id: string;
@@ -1501,18 +1501,18 @@ export declare const videoSchema: import("zod").ZodObject<import("zod").objectUt
1501
1501
  dataSource: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
1502
1502
  binaryUrl: import("zod").ZodString;
1503
1503
  duration: import("zod").ZodNumber;
1504
- filesize: import("zod").ZodNumber;
1504
+ filesize: import("zod").ZodOptional<import("zod").ZodNumber>;
1505
1505
  mediaType: import("zod").ZodString;
1506
1506
  }, "strip", import("zod").ZodTypeAny, {
1507
1507
  binaryUrl: string;
1508
1508
  duration: number;
1509
1509
  mediaType: string;
1510
- filesize: number;
1510
+ filesize?: number | undefined;
1511
1511
  }, {
1512
1512
  binaryUrl: string;
1513
1513
  duration: number;
1514
1514
  mediaType: string;
1515
- filesize: number;
1515
+ filesize?: number | undefined;
1516
1516
  }>, "many">>;
1517
1517
  }, "mainImage">>, "strip", import("zod").ZodTypeAny, {
1518
1518
  id: string;
@@ -1,23 +1,13 @@
1
+ import { FlourishSource as FlourishSourceModel } from '../../../model/FlourishSource';
1
2
  export declare const Flourish: {
2
- fallbackImage(parent: import(".").ReferenceWithCAPIData<import("@financial-times/content-tree").ContentTree.Flourish>, _args: {}, context: import("../../..").QueryContext): Promise<{
3
- url?: undefined;
4
- type?: undefined;
5
- format?: undefined;
6
- sourceSet?: undefined;
7
- width?: undefined;
8
- height?: undefined;
9
- } | {
10
- url: string;
11
- type: string;
12
- format: "standard";
13
- sourceSet: never[];
14
- width: number;
15
- height: number;
16
- }>;
3
+ fallbackImage(parent: import(".").ReferenceWithCAPIData<import("@financial-times/content-tree").ContentTree.Flourish>, _args: {}, context: import("../../..").QueryContext): Promise<FlourishSourceModel | null>;
17
4
  type(parent: import(".").ReferenceWithCAPIData<import("@financial-times/content-tree").ContentTree.Flourish>): "flourish";
18
5
  };
19
- export declare const FlourishFallback: {
20
- height(parent: import("../../../generated").FlourishFallback): Promise<number | null>;
21
- width(parent: import("../../../generated").FlourishFallback): Promise<number | null>;
22
- url(parent: import("../../../generated").FlourishFallback): Promise<string | null>;
6
+ export declare const FlourishSource: {
7
+ id: (parent: FlourishSourceModel) => string;
8
+ url: (parent: FlourishSourceModel) => string;
9
+ type: (parent: FlourishSourceModel) => string;
10
+ width: (parent: FlourishSourceModel) => number;
11
+ height: (parent: FlourishSourceModel) => number;
12
+ format: (parent: FlourishSourceModel) => "standard";
23
13
  };
@@ -1,51 +1,29 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.FlourishFallback = exports.Flourish = void 0;
7
- const imageService_1 = __importDefault(require("../../../helpers/imageService"));
3
+ exports.FlourishSource = exports.Flourish = void 0;
8
4
  const FlourishSource_1 = require("../../../model/FlourishSource");
9
5
  exports.Flourish = {
10
6
  async fallbackImage(parent, _args, context) {
11
7
  if (!parent.reference) {
12
- return {};
8
+ return null;
13
9
  }
14
10
  const flourishData = {
15
11
  id: parent.reference.id,
16
12
  type: parent.reference.flourishType,
17
13
  description: parent.reference.description,
18
14
  };
19
- const flourishSource = new FlourishSource_1.FlourishSource(flourishData, context);
20
- const width = await flourishSource.width();
21
- const height = await flourishSource.height();
22
- const imageServiceWrappedUrl = (0, imageService_1.default)({
23
- url: flourishSource.flourishUrl(),
24
- systemCode: context.systemCode ?? 'cp-content-pipeline',
25
- width,
26
- });
27
- return {
28
- url: imageServiceWrappedUrl,
29
- type: flourishSource.type(),
30
- format: flourishSource.format(),
31
- sourceSet: [],
32
- width,
33
- height,
34
- };
15
+ return FlourishSource_1.FlourishSource.createWithMetadata(flourishData, context);
35
16
  },
36
17
  type(parent) {
37
18
  return parent.reference.type;
38
19
  },
39
20
  };
40
- exports.FlourishFallback = {
41
- async height(parent) {
42
- return parent.height ?? null;
43
- },
44
- async width(parent) {
45
- return parent.width ?? null;
46
- },
47
- async url(parent) {
48
- return parent.url ?? null;
49
- },
21
+ exports.FlourishSource = {
22
+ id: (parent) => parent.id(),
23
+ url: (parent) => parent.flourishUrl(),
24
+ type: (parent) => parent.type(),
25
+ width: (parent) => parent.width(),
26
+ height: (parent) => parent.height(),
27
+ format: (parent) => parent.format(),
50
28
  };
51
29
  //# sourceMappingURL=Flourish.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Flourish.js","sourceRoot":"","sources":["../../../../src/resolvers/content-tree/references/Flourish.ts"],"names":[],"mappings":";;;;;;AAAA,iFAA2D;AAK3D,kEAA8D;AAEjD,QAAA,QAAQ,GAAG;IACtB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO;QACxC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;YACtB,OAAO,EAAE,CAAA;QACX,CAAC;QACD,MAAM,YAAY,GAAG;YACnB,EAAE,EAAE,MAAM,CAAC,SAAS,CAAC,EAAE;YACvB,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,YAAY;YACnC,WAAW,EAAE,MAAM,CAAC,SAAS,CAAC,WAAW;SAC1C,CAAA;QACD,MAAM,cAAc,GAAG,IAAI,+BAAc,CAAC,YAAY,EAAE,OAAO,CAAC,CAAA;QAChE,MAAM,KAAK,GAAG,MAAM,cAAc,CAAC,KAAK,EAAE,CAAA;QAC1C,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,MAAM,EAAE,CAAA;QAE5C,MAAM,sBAAsB,GAAG,IAAA,sBAAe,EAAC;YAC7C,GAAG,EAAE,cAAc,CAAC,WAAW,EAAE;YACjC,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,qBAAqB;YACvD,KAAK;SACN,CAAC,CAAA;QAEF,OAAO;YACL,GAAG,EAAE,sBAAsB;YAC3B,IAAI,EAAE,cAAc,CAAC,IAAI,EAAE;YAC3B,MAAM,EAAE,cAAc,CAAC,MAAM,EAAE;YAC/B,SAAS,EAAE,EAAE;YACb,KAAK;YACL,MAAM;SACP,CAAA;IACH,CAAC;IAED,IAAI,CAAC,MAAM;QACT,OAAO,MAAM,CAAC,SAAS,CAAC,IAAI,CAAA;IAC9B,CAAC;CAC0B,CAAA;AAEhB,QAAA,gBAAgB,GAAG;IAC9B,KAAK,CAAC,MAAM,CAAC,MAAM;QACjB,OAAO,MAAM,CAAC,MAAM,IAAI,IAAI,CAAA;IAC9B,CAAC;IACD,KAAK,CAAC,KAAK,CAAC,MAAM;QAChB,OAAO,MAAM,CAAC,KAAK,IAAI,IAAI,CAAA;IAC7B,CAAC;IACD,KAAK,CAAC,GAAG,CAAC,MAAM;QACd,OAAO,MAAM,CAAC,GAAG,IAAI,IAAI,CAAA;IAC3B,CAAC;CACkC,CAAA"}
1
+ {"version":3,"file":"Flourish.js","sourceRoot":"","sources":["../../../../src/resolvers/content-tree/references/Flourish.ts"],"names":[],"mappings":";;;AAIA,kEAAqF;AAExE,QAAA,QAAQ,GAAG;IACtB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO;QACxC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;YACtB,OAAO,IAAI,CAAA;QACb,CAAC;QAED,MAAM,YAAY,GAAG;YACnB,EAAE,EAAE,MAAM,CAAC,SAAS,CAAC,EAAE;YACvB,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,YAAY;YACnC,WAAW,EAAE,MAAM,CAAC,SAAS,CAAC,WAAW;SAC1C,CAAA;QAED,OAAO,+BAAmB,CAAC,kBAAkB,CAC3C,YAAY,EACZ,OAAO,CACR,CAAA;IACH,CAAC;IAED,IAAI,CAAC,MAAM;QACT,OAAO,MAAM,CAAC,SAAS,CAAC,IAAI,CAAA;IAC9B,CAAC;CAC0B,CAAA;AAEhB,QAAA,cAAc,GAAG;IAC5B,EAAE,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE;IAC3B,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE;IACrC,IAAI,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE;IAC/B,KAAK,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE;IACjC,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE;IACnC,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE;CACF,CAAA"}
@@ -30,7 +30,7 @@ describe('Flourish Model', () => {
30
30
  // Regex checks for flourish url whilst leaving spaces for arguments
31
31
  // https://public.flourish.studio/{type}/{id}/thumbnail
32
32
  const flourishImageUrlRegex = new RegExp(/https:\/\/public.flourish.studio\/.*\/.*\/thumbnail/);
33
- expect(decodeURIComponent(fallbackResponse.url)).toMatch(flourishImageUrlRegex);
33
+ expect(decodeURIComponent(fallbackResponse?.url())).toMatch(flourishImageUrlRegex);
34
34
  });
35
35
  it('The Flourish id is included in the flourish image url', async () => {
36
36
  const reference = {
@@ -43,7 +43,7 @@ describe('Flourish Model', () => {
43
43
  };
44
44
  const fallbackResponse = await Flourish_1.Flourish.fallbackImage({ reference }, {}, context);
45
45
  const flourishImageUrlRegex = new RegExp(/https:\/\/public.flourish.studio\/.*\/example-id/);
46
- expect(decodeURIComponent(fallbackResponse.url)).toMatch(flourishImageUrlRegex);
46
+ expect(decodeURIComponent(fallbackResponse?.url())).toMatch(flourishImageUrlRegex);
47
47
  });
48
48
  it('The Flourish graphic type is included in the flourish image url', async () => {
49
49
  const reference = {
@@ -56,7 +56,7 @@ describe('Flourish Model', () => {
56
56
  };
57
57
  const fallbackResponse = await Flourish_1.Flourish.fallbackImage({ reference }, {}, context);
58
58
  const flourishImageUrl = 'https://public.flourish.studio/example-type';
59
- expect(fallbackResponse.url).toContain(encodeURIComponent(flourishImageUrl));
59
+ expect(fallbackResponse?.url() ?? '').toContain(encodeURIComponent(flourishImageUrl));
60
60
  });
61
61
  });
62
62
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Flourish.test.js","sourceRoot":"","sources":["../../../../src/resolvers/content-tree/references/Flourish.test.ts"],"names":[],"mappings":";;AAAA,2CAAoC;AAEpC,yCAAqC;AAIrC,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,MAAM,2BAA2B,GAAG,cAAI,CAAC,EAAE,EAAE,CAAA;IAC7C,MAAM,OAAO,GAAG;QACd,UAAU,EAAE,gBAAgB;QAC5B,WAAW,EAAE;YACX,OAAO,EAAE;gBACP,gBAAgB,EAAE,2BAA2B;aAC9C;SACF;KACyB,CAAA;IAE5B,SAAS,CAAC,GAAG,EAAE;QACb,cAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;QAChC,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE;YACnB,EAAE,CAAC,qCAAqC,EAAE,KAAK,IAAI,EAAE;gBACnD,MAAM,SAAS,GAAyB;oBACtC,IAAI,EAAE,UAAU;oBAChB,EAAE,EAAE,YAAY;oBAChB,YAAY,EAAE,cAAc;oBAC5B,WAAW,EAAE,MAAM;oBACnB,SAAS,EAAE,0BAA0B;oBACrC,WAAW,EAAE,qBAAqB;iBACnC,CAAA;gBACD,MAAM,gBAAgB,GAAG,MAAM,mBAAQ,CAAC,aAAa,CACnD,EAAE,SAAS,EAAE,EACb,EAAE,EACF,OAAO,CACR,CAAA;gBAED,oEAAoE;gBACpE,uDAAuD;gBACvD,MAAM,qBAAqB,GAAG,IAAI,MAAM,CACtC,qDAAqD,CACtD,CAAA;gBAED,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,GAAa,CAAC,CAAC,CAAC,OAAO,CAChE,qBAAqB,CACtB,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,EAAE,CAAC,uDAAuD,EAAE,KAAK,IAAI,EAAE;gBACrE,MAAM,SAAS,GAAyB;oBACtC,IAAI,EAAE,UAAU;oBAChB,EAAE,EAAE,YAAY;oBAChB,YAAY,EAAE,cAAc;oBAC5B,WAAW,EAAE,MAAM;oBACnB,SAAS,EAAE,0BAA0B;oBACrC,WAAW,EAAE,qBAAqB;iBACnC,CAAA;gBACD,MAAM,gBAAgB,GAAG,MAAM,mBAAQ,CAAC,aAAa,CACnD,EAAE,SAAS,EAAE,EACb,EAAE,EACF,OAAO,CACR,CAAA;gBAED,MAAM,qBAAqB,GAAG,IAAI,MAAM,CACtC,kDAAkD,CACnD,CAAA;gBAED,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,GAAa,CAAC,CAAC,CAAC,OAAO,CAChE,qBAAqB,CACtB,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,EAAE,CAAC,iEAAiE,EAAE,KAAK,IAAI,EAAE;gBAC/E,MAAM,SAAS,GAAyB;oBACtC,IAAI,EAAE,UAAU;oBAChB,EAAE,EAAE,YAAY;oBAChB,YAAY,EAAE,cAAc;oBAC5B,WAAW,EAAE,MAAM;oBACnB,SAAS,EAAE,0BAA0B;oBACrC,WAAW,EAAE,qBAAqB;iBACnC,CAAA;gBACD,MAAM,gBAAgB,GAAG,MAAM,mBAAQ,CAAC,aAAa,CACnD,EAAE,SAAS,EAAE,EACb,EAAE,EACF,OAAO,CACR,CAAA;gBAED,MAAM,gBAAgB,GAAG,6CAA6C,CAAA;gBAEtE,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,SAAS,CACpC,kBAAkB,CAAC,gBAAgB,CAAC,CACrC,CAAA;YACH,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"Flourish.test.js","sourceRoot":"","sources":["../../../../src/resolvers/content-tree/references/Flourish.test.ts"],"names":[],"mappings":";;AAAA,2CAAoC;AAEpC,yCAAqC;AAIrC,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,MAAM,2BAA2B,GAAG,cAAI,CAAC,EAAE,EAAE,CAAA;IAC7C,MAAM,OAAO,GAAG;QACd,UAAU,EAAE,gBAAgB;QAC5B,WAAW,EAAE;YACX,OAAO,EAAE;gBACP,gBAAgB,EAAE,2BAA2B;aAC9C;SACF;KACyB,CAAA;IAE5B,SAAS,CAAC,GAAG,EAAE;QACb,cAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;QAChC,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE;YACnB,EAAE,CAAC,qCAAqC,EAAE,KAAK,IAAI,EAAE;gBACnD,MAAM,SAAS,GAAyB;oBACtC,IAAI,EAAE,UAAU;oBAChB,EAAE,EAAE,YAAY;oBAChB,YAAY,EAAE,cAAc;oBAC5B,WAAW,EAAE,MAAM;oBACnB,SAAS,EAAE,0BAA0B;oBACrC,WAAW,EAAE,qBAAqB;iBACnC,CAAA;gBAED,MAAM,gBAAgB,GAAG,MAAM,mBAAQ,CAAC,aAAa,CACnD,EAAE,SAAS,EAAE,EACb,EAAE,EACF,OAAO,CACR,CAAA;gBAED,oEAAoE;gBACpE,uDAAuD;gBACvD,MAAM,qBAAqB,GAAG,IAAI,MAAM,CACtC,qDAAqD,CACtD,CAAA;gBAED,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,GAAG,EAAY,CAAC,CAAC,CAAC,OAAO,CACnE,qBAAqB,CACtB,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,EAAE,CAAC,uDAAuD,EAAE,KAAK,IAAI,EAAE;gBACrE,MAAM,SAAS,GAAyB;oBACtC,IAAI,EAAE,UAAU;oBAChB,EAAE,EAAE,YAAY;oBAChB,YAAY,EAAE,cAAc;oBAC5B,WAAW,EAAE,MAAM;oBACnB,SAAS,EAAE,0BAA0B;oBACrC,WAAW,EAAE,qBAAqB;iBACnC,CAAA;gBACD,MAAM,gBAAgB,GAAG,MAAM,mBAAQ,CAAC,aAAa,CACnD,EAAE,SAAS,EAAE,EACb,EAAE,EACF,OAAO,CACR,CAAA;gBAED,MAAM,qBAAqB,GAAG,IAAI,MAAM,CACtC,kDAAkD,CACnD,CAAA;gBAED,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,GAAG,EAAY,CAAC,CAAC,CAAC,OAAO,CACnE,qBAAqB,CACtB,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,EAAE,CAAC,iEAAiE,EAAE,KAAK,IAAI,EAAE;gBAC/E,MAAM,SAAS,GAAyB;oBACtC,IAAI,EAAE,UAAU;oBAChB,EAAE,EAAE,YAAY;oBAChB,YAAY,EAAE,cAAc;oBAC5B,WAAW,EAAE,MAAM;oBACnB,SAAS,EAAE,0BAA0B;oBACrC,WAAW,EAAE,qBAAqB;iBACnC,CAAA;gBACD,MAAM,gBAAgB,GAAG,MAAM,mBAAQ,CAAC,aAAa,CACnD,EAAE,SAAS,EAAE,EACb,EAAE,EACF,OAAO,CACR,CAAA;gBAED,MAAM,gBAAgB,GAAG,6CAA6C,CAAA;gBAEtE,MAAM,CAAC,gBAAgB,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAC7C,kBAAkB,CAAC,gBAAgB,CAAC,CACrC,CAAA;YACH,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import type { ContentTree } from '@financial-times/content-tree';
2
2
  import type { CapiResponse } from '../../../model/CapiResponse';
3
- import { FlourishResolvers, ImageSetResolvers, ClipSetResolvers, CustomCodeComponentResolvers, LayoutImageResolvers, RawImageResolvers, RecommendedResolvers, ReferenceResolvers, ScrollyImageResolvers, TweetResolvers, VideoReferenceResolvers, CaptionResolvers, AccessibilityResolvers, FlourishFallbackResolvers, AuthorReferenceResolvers } from '../../../generated';
3
+ import { FlourishResolvers, ImageSetResolvers, ClipSetResolvers, CustomCodeComponentResolvers, LayoutImageResolvers, RawImageResolvers, RecommendedResolvers, ReferenceResolvers, ScrollyImageResolvers, TweetResolvers, VideoReferenceResolvers, CaptionResolvers, AccessibilityResolvers, AuthorReferenceResolvers, FlourishSourceResolvers } from '../../../generated';
4
4
  export type ReferenceWithCAPIData<ReferenceType = ContentTree.Node> = {
5
5
  reference: ReferenceType;
6
6
  contentApiData?: CapiResponse;
@@ -13,6 +13,7 @@ export declare const resolvers: {
13
13
  CustomCodeComponent: CustomCodeComponentResolvers;
14
14
  VideoReference: VideoReferenceResolvers;
15
15
  Flourish: FlourishResolvers;
16
+ FlourishSource: FlourishSourceResolvers;
16
17
  Recommended: RecommendedResolvers;
17
18
  LayoutImage: LayoutImageResolvers;
18
19
  RawImage: RawImageResolvers;
@@ -20,7 +21,6 @@ export declare const resolvers: {
20
21
  MainImage: ImageSetResolvers;
21
22
  Caption: CaptionResolvers;
22
23
  Accessibility: AccessibilityResolvers;
23
- FlourishFallback: FlourishFallbackResolvers;
24
24
  AuthorReference: AuthorReferenceResolvers;
25
25
  };
26
26
  export declare const mapNodeToReference: {
@@ -21,6 +21,7 @@ exports.resolvers = {
21
21
  CustomCodeComponent: CustomCodeComponent_1.CustomCodeComponent,
22
22
  VideoReference: Video_1.Video,
23
23
  Flourish: Flourish_1.Flourish,
24
+ FlourishSource: Flourish_1.FlourishSource,
24
25
  Recommended: Recommended_1.Recommended,
25
26
  LayoutImage: LayoutImage_1.LayoutImage,
26
27
  RawImage: RawImage_1.RawImage,
@@ -28,7 +29,6 @@ exports.resolvers = {
28
29
  MainImage: ImageSet_1.ImageSet,
29
30
  Caption: ClipSet_1.Caption,
30
31
  Accessibility: ClipSet_1.Accessibility,
31
- FlourishFallback: Flourish_1.FlourishFallback,
32
32
  AuthorReference: Author_1.Author,
33
33
  };
34
34
  exports.mapNodeToReference = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/resolvers/content-tree/references/index.ts"],"names":[],"mappings":";;;AAGA,2CAAuC;AAEvC,mCAA+B;AAC/B,yCAAqC;AACrC,uCAA2D;AAC3D,+DAA2D;AAC3D,mCAA+B;AAC/B,yCAAuD;AACvD,+CAA2C;AAC3C,+CAA2C;AAC3C,yCAAqC;AACrC,iDAA6C;AAmB7C,qCAAiC;AAOpB,QAAA,SAAS,GAiBlB;IACF,SAAS,EAAT,qBAAS;IACT,KAAK,EAAL,aAAK;IACL,QAAQ,EAAR,mBAAQ;IACR,OAAO,EAAP,iBAAO;IACP,mBAAmB,EAAnB,yCAAmB;IACnB,cAAc,EAAE,aAAK;IACrB,QAAQ,EAAR,mBAAQ;IACR,WAAW,EAAX,yBAAW;IACX,WAAW,EAAX,yBAAW;IACX,QAAQ,EAAR,mBAAQ;IACR,YAAY,EAAZ,2BAAY;IACZ,SAAS,EAAE,mBAAQ;IACnB,OAAO,EAAP,iBAAO;IACP,aAAa,EAAb,uBAAa;IACb,gBAAgB,EAAhB,2BAAgB;IAChB,eAAe,EAAE,eAAM;CACxB,CAAA;AAEY,QAAA,kBAAkB,GAAG;IAChC,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,UAAU;IACvB,UAAU,EAAE,SAAS;IACrB,IAAI,EAAE,SAAS;IACf,uBAAuB,EAAE,qBAAqB;IAC9C,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,aAAa;IAC1B,cAAc,EAAE,aAAa;IAC7B,eAAe,EAAE,cAAc;IAC/B,WAAW,EAAE,UAAU;IACvB,YAAY,EAAE,WAAW;IACzB,gBAAgB,EAAE,UAAU;IAC5B,MAAM,EAAE,iBAAiB;CACkD,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/resolvers/content-tree/references/index.ts"],"names":[],"mappings":";;;AAGA,2CAAuC;AAEvC,mCAA+B;AAC/B,yCAAqC;AACrC,uCAA2D;AAC3D,+DAA2D;AAC3D,mCAA+B;AAC/B,yCAAqD;AACrD,+CAA2C;AAC3C,+CAA2C;AAC3C,yCAAqC;AACrC,iDAA6C;AAmB7C,qCAAiC;AAOpB,QAAA,SAAS,GAiBlB;IACF,SAAS,EAAT,qBAAS;IACT,KAAK,EAAL,aAAK;IACL,QAAQ,EAAR,mBAAQ;IACR,OAAO,EAAP,iBAAO;IACP,mBAAmB,EAAnB,yCAAmB;IACnB,cAAc,EAAE,aAAK;IACrB,QAAQ,EAAR,mBAAQ;IACR,cAAc,EAAd,yBAAc;IACd,WAAW,EAAX,yBAAW;IACX,WAAW,EAAX,yBAAW;IACX,QAAQ,EAAR,mBAAQ;IACR,YAAY,EAAZ,2BAAY;IACZ,SAAS,EAAE,mBAAQ;IACnB,OAAO,EAAP,iBAAO;IACP,aAAa,EAAb,uBAAa;IACb,eAAe,EAAE,eAAM;CACxB,CAAA;AAEY,QAAA,kBAAkB,GAAG;IAChC,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,UAAU;IACvB,UAAU,EAAE,SAAS;IACrB,IAAI,EAAE,SAAS;IACf,uBAAuB,EAAE,qBAAqB;IAC9C,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,aAAa;IAC1B,cAAc,EAAE,aAAa;IAC7B,eAAe,EAAE,cAAc;IAC/B,WAAW,EAAE,UAAU;IACvB,YAAY,EAAE,WAAW;IACzB,gBAAgB,EAAE,UAAU;IAC5B,MAAM,EAAE,iBAAiB;CACkD,CAAA"}
@@ -14,7 +14,7 @@ declare const resolvers: {
14
14
  type: (flourish: import("../model/LeadFlourish").LeadFlourish) => string;
15
15
  id: (flourish: import("../model/LeadFlourish").LeadFlourish) => string | null;
16
16
  description: (flourish: import("../model/LeadFlourish").LeadFlourish) => string;
17
- fallbackImage: (flourish: import("../model/LeadFlourish").LeadFlourish) => Promise<import("../model/FlourishSource").FlourishSource>;
17
+ fallbackImage: (flourish: import("../model/LeadFlourish").LeadFlourish) => Promise<import("../model/FlourishSource").FlourishSource | null>;
18
18
  };
19
19
  FlourishSource: {
20
20
  id: (parent: import("../model/FlourishSource").FlourishSource) => string;
@@ -290,7 +290,6 @@ declare const resolvers: {
290
290
  MainImage: import("../generated").ImageSetResolvers;
291
291
  Caption: import("../generated").CaptionResolvers;
292
292
  Accessibility: import("../generated").AccessibilityResolvers;
293
- FlourishFallback: import("../generated").FlourishFallbackResolvers;
294
293
  AuthorReference: import("../generated").AuthorReferenceResolvers;
295
294
  Picture: {
296
295
  __resolveType: import("../generated").TypeResolveFn<"PictureFullBleed" | "PictureInline" | "PictureStandard", import("../model/Picture").Picture, import("..").QueryContext>;
@@ -3,7 +3,7 @@ declare const resolvers: {
3
3
  type: (flourish: import("../model/LeadFlourish").LeadFlourish) => string;
4
4
  id: (flourish: import("../model/LeadFlourish").LeadFlourish) => string | null;
5
5
  description: (flourish: import("../model/LeadFlourish").LeadFlourish) => string;
6
- fallbackImage: (flourish: import("../model/LeadFlourish").LeadFlourish) => Promise<import("../model/FlourishSource").FlourishSource>;
6
+ fallbackImage: (flourish: import("../model/LeadFlourish").LeadFlourish) => Promise<import("../model/FlourishSource").FlourishSource | null>;
7
7
  };
8
8
  FlourishSource: {
9
9
  id: (parent: import("../model/FlourishSource").FlourishSource) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@financial-times/cp-content-pipeline-schema",
3
- "version": "3.5.0",
3
+ "version": "3.5.1",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -694,20 +694,11 @@ export type Design = {
694
694
 
695
695
  export type Flourish = Reference & {
696
696
  /** The fallback image to be used if the flourish graphics cannot be loaded. */
697
- readonly fallbackImage?: Maybe<FlourishFallback>;
697
+ readonly fallbackImage?: Maybe<FlourishSource>;
698
698
  /** The type of the reference, eg. 'flourish'. */
699
699
  readonly type: Scalars['String']['output'];
700
700
  };
701
701
 
702
- export type FlourishFallback = {
703
- /** The height in pixels of the fallback image. */
704
- readonly height?: Maybe<Scalars['Int']['output']>;
705
- /** The url of the fallback image. */
706
- readonly url?: Maybe<Scalars['String']['output']>;
707
- /** The width in pixels of the fallback image. */
708
- readonly width?: Maybe<Scalars['Int']['output']>;
709
- };
710
-
711
702
  export type FlourishSource = {
712
703
  /** The format of the source, eg. 'standard'. */
713
704
  readonly format: Scalars['ImageFormat']['output'];
@@ -1075,7 +1066,7 @@ export type LayoutImage = Reference & {
1075
1066
  export type LeadFlourish = {
1076
1067
  /** The description of the Flourish chart. */
1077
1068
  readonly description?: Maybe<Scalars['String']['output']>;
1078
- readonly fallbackImage: FlourishSource;
1069
+ readonly fallbackImage?: Maybe<FlourishSource>;
1079
1070
  /** The id of the Flourish chart. */
1080
1071
  readonly id?: Maybe<Scalars['String']['output']>;
1081
1072
  /** The type of the chart, eg. 'visualisation'. */
@@ -2026,7 +2017,6 @@ export type ResolversTypes = ResolversObject<{
2026
2017
  Design: ResolverTypeWrapper<Design>;
2027
2018
  Float: ResolverTypeWrapper<Scalars['Float']['output']>;
2028
2019
  Flourish: ResolverTypeWrapper<ReferenceWithCAPIData<ContentTree.Flourish>>;
2029
- FlourishFallback: ResolverTypeWrapper<FlourishFallback>;
2030
2020
  FlourishSource: ResolverTypeWrapper<FlourishSourceModel>;
2031
2021
  FollowButtonVariant: ResolverTypeWrapper<Scalars['FollowButtonVariant']['output']>;
2032
2022
  FullBleedTopper: ResolverTypeWrapper<TopperModel>;
@@ -2128,7 +2118,6 @@ export type ResolversParentTypes = ResolversObject<{
2128
2118
  Design: Design;
2129
2119
  Float: Scalars['Float']['output'];
2130
2120
  Flourish: ReferenceWithCAPIData<ContentTree.Flourish>;
2131
- FlourishFallback: FlourishFallback;
2132
2121
  FlourishSource: FlourishSourceModel;
2133
2122
  FollowButtonVariant: Scalars['FollowButtonVariant']['output'];
2134
2123
  FullBleedTopper: TopperModel;
@@ -2543,18 +2532,11 @@ export type DesignResolvers<ContextType = QueryContext, ParentType extends Resol
2543
2532
  }>;
2544
2533
 
2545
2534
  export type FlourishResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['Flourish'] = ResolversParentTypes['Flourish']> = ResolversObject<{
2546
- fallbackImage: Resolver<Maybe<ResolversTypes['FlourishFallback']>, ParentType, ContextType>;
2535
+ fallbackImage: Resolver<Maybe<ResolversTypes['FlourishSource']>, ParentType, ContextType>;
2547
2536
  type: Resolver<ResolversTypes['String'], ParentType, ContextType>;
2548
2537
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
2549
2538
  }>;
2550
2539
 
2551
- export type FlourishFallbackResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['FlourishFallback'] = ResolversParentTypes['FlourishFallback']> = ResolversObject<{
2552
- height: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
2553
- url: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
2554
- width: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
2555
- __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
2556
- }>;
2557
-
2558
2540
  export type FlourishSourceResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['FlourishSource'] = ResolversParentTypes['FlourishSource']> = ResolversObject<{
2559
2541
  format: Resolver<ResolversTypes['ImageFormat'], ParentType, ContextType>;
2560
2542
  height: Resolver<ResolversTypes['Int'], ParentType, ContextType>;
@@ -2769,7 +2751,7 @@ export type LayoutImageResolvers<ContextType = QueryContext, ParentType extends
2769
2751
 
2770
2752
  export type LeadFlourishResolvers<ContextType = QueryContext, ParentType extends ResolversParentTypes['LeadFlourish'] = ResolversParentTypes['LeadFlourish']> = ResolversObject<{
2771
2753
  description: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
2772
- fallbackImage: Resolver<ResolversTypes['FlourishSource'], ParentType, ContextType>;
2754
+ fallbackImage: Resolver<Maybe<ResolversTypes['FlourishSource']>, ParentType, ContextType>;
2773
2755
  id: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
2774
2756
  type: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
2775
2757
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
@@ -3259,7 +3241,6 @@ export type Resolvers<ContextType = QueryContext> = ResolversObject<{
3259
3241
  DeepPortraitTopper: DeepPortraitTopperResolvers<ContextType>;
3260
3242
  Design: DesignResolvers<ContextType>;
3261
3243
  Flourish: FlourishResolvers<ContextType>;
3262
- FlourishFallback: FlourishFallbackResolvers<ContextType>;
3263
3244
  FlourishSource: FlourishSourceResolvers<ContextType>;
3264
3245
  FollowButtonVariant: GraphQLScalarType;
3265
3246
  FullBleedTopper: FullBleedTopperResolvers<ContextType>;
@@ -45,7 +45,7 @@ describe('FlourishSource', () => {
45
45
 
46
46
  it('should return the correct flourishUrl', () => {
47
47
  expect(flourishSource.flourishUrl()).toBe(
48
- 'https://public.flourish.studio/test-type/1234/thumbnail?cacheBuster=5717196'
48
+ 'https://public.flourish.studio/test-type/1234/thumbnail?cacheBuster=952866'
49
49
  )
50
50
  })
51
51
 
@@ -70,9 +70,9 @@ describe('FlourishSource', () => {
70
70
  expect(decodeURIComponent(url)).toMatch(flourishImageUrlRegex)
71
71
  })
72
72
 
73
- it('should bust the cache of the fallback image every five minutes', async () => {
74
- const oldCacheBuster = '5717196'
75
- const newCacheBuster = '5717197'
73
+ it('should bust the cache of the fallback image every thirty minutes', async () => {
74
+ const oldCacheBuster = '952866'
75
+ const newCacheBuster = '952867'
76
76
 
77
77
  expect(flourishSource.flourishUrl()).toBe(
78
78
  `https://public.flourish.studio/test-type/1234/thumbnail?cacheBuster=${oldCacheBuster}`
@@ -85,7 +85,7 @@ describe('FlourishSource', () => {
85
85
  )
86
86
 
87
87
  newFlourishSource = new FlourishSource(mockFlourishData, context)
88
- jest.spyOn(Date, 'now').mockImplementation(() => 1715159100000) // 8 May 2024 09:05:00
88
+ jest.spyOn(Date, 'now').mockImplementation(() => 1715160840000) // 8 May 2024 09:34:00
89
89
  expect(newFlourishSource.flourishUrl()).toBe(
90
90
  `https://public.flourish.studio/test-type/1234/thumbnail?cacheBuster=${newCacheBuster}`
91
91
  )